Procházet zdrojové kódy

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.
Carsten Dominik před 15 roky
rodič
revize
05ef736ac0
2 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 5 0
      lisp/ChangeLog
  2. 2 2
      lisp/org-exp.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-08-10  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org-exp.el (org-export-preprocess-apply-macros): Allow newlines
+	in macro calls.
+
 2009-08-09  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-latex.el (org-export-latex-listings)

+ 2 - 2
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