From 05ef736ac043e4c4ffc13ad59876e960d93b2d92 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 10 Aug 2009 10:08:34 +0200 Subject: [PATCH] Allow Macros to span several lines. However, if you are using arguments, it is required that the opening parenthesis is attached to the macro name, and that the closing parenthesis is attached to the three closing braces. --- lisp/ChangeLog | 5 +++++ lisp/org-exp.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e4ebe57af..6c1575d70 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2009-08-10 Carsten Dominik + + * org-exp.el (org-export-preprocess-apply-macros): Allow newlines + in macro calls. + 2009-08-09 Carsten Dominik * org-latex.el (org-export-latex-listings) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index cab68495d..b1ec2d35d 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2057,7 +2057,7 @@ TYPE must be a string, any of: (goto-char (point-min)) (let (sy val key args args2 s n) (while (re-search-forward - "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\(.*?\\))\\)?}}}" + "{{{\\([a-zA-Z][-a-zA-Z0-9_]*\\)\\((\\([^\000]*?\\))\\)?}}}" nil t) (setq key (downcase (match-string 1)) args (match-string 3)) @@ -2067,7 +2067,7 @@ TYPE must be a string, any of: (intern (concat ":" key))))) (save-match-data (when args - (setq args (org-split-string args ",[ \t]*") args2 nil) + (setq args (org-split-string args ",[ \t\n]*") args2 nil) (while args (while (string-match "\\\\\\'" (car args)) ;; repair bad splits