From cad9a82ea404d2057240d32e5c6d8c0d4451fffe Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 15 May 2009 16:20:52 +0200 Subject: [PATCH] Macros: Use semicolon as argument separator --- lisp/ChangeLog | 3 +++ lisp/org-exp.el | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68c175d30..855d239a3 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2009-05-15 Carsten Dominik + * 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. 2009-05-14 Carsten Dominik diff --git a/lisp/org-exp.el b/lisp/org-exp.el index c4dcde588..67ef205f2 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -1988,7 +1988,7 @@ TYPE must be a string, any of: (defun org-export-preprocess-apply-macros () "Replace macro references." (goto-char (point-min)) - (let (sy val key args s n) + (let (sy val key args args2 s n) (while (re-search-forward "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\(.*?\\))\\)?}}}" nil t) @@ -2000,7 +2000,15 @@ TYPE must be a string, any of: (intern (concat ":" key))))) (save-match-data (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) (while (string-match "\\$\\([0-9]+\\)" val s) (setq s (1+ (match-beginning 0))