Macros: Use semicolon as argument separator
This commit is contained in:
parent
fbe4f09cd8
commit
cad9a82ea4
|
@ -1,5 +1,8 @@
|
||||||
2009-05-15 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-05-15 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-preprocess-apply-macros): Use semicolon
|
||||||
|
as argument separator in macros.
|
||||||
|
|
||||||
* org-html.el (org-export-as-html): Add xml declaration.
|
* org-html.el (org-export-as-html): Add xml declaration.
|
||||||
|
|
||||||
2009-05-14 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-05-14 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
|
@ -1988,7 +1988,7 @@ TYPE must be a string, any of:
|
||||||
(defun org-export-preprocess-apply-macros ()
|
(defun org-export-preprocess-apply-macros ()
|
||||||
"Replace macro references."
|
"Replace macro references."
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(let (sy val key args s n)
|
(let (sy val key args args2 s n)
|
||||||
(while (re-search-forward
|
(while (re-search-forward
|
||||||
"{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\(.*?\\))\\)?}}}"
|
"{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\(.*?\\))\\)?}}}"
|
||||||
nil t)
|
nil t)
|
||||||
|
@ -2000,7 +2000,15 @@ TYPE must be a string, any of:
|
||||||
(intern (concat ":" key)))))
|
(intern (concat ":" key)))))
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(when args
|
(when args
|
||||||
(setq args (org-split-string args ","))
|
(setq args (org-split-string args ";") args2 nil)
|
||||||
|
(while args
|
||||||
|
(while (string-match "\\\\\\'" (car args))
|
||||||
|
;; repair bad splits
|
||||||
|
(setcar (cdr args) (concat (substring (car args) 0 -1)
|
||||||
|
";" (nth 1 args)))
|
||||||
|
(pop args))
|
||||||
|
(push (pop args) args2))
|
||||||
|
(setq args (nreverse args2))
|
||||||
(setq s 0)
|
(setq s 0)
|
||||||
(while (string-match "\\$\\([0-9]+\\)" val s)
|
(while (string-match "\\$\\([0-9]+\\)" val s)
|
||||||
(setq s (1+ (match-beginning 0))
|
(setq s (1+ (match-beginning 0))
|
||||||
|
|
Loading…
Reference in New Issue