Browse Source

org.el: use a shy regex for fontifying macros

* lisp/org.el (org-set-font-lock-defaults): use a shy regex for
identifying macros to fontify

Before this change, the xxx in the following text would be erroneously
fontified with the macro face:

{{{macro1()}}} xxx {{{macro2()}}}
Aaron Ecay 11 years ago
parent
commit
5b9e79c8b8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -6269,7 +6269,7 @@ needs to be inserted at a specific position in the font-lock sequence.")
 	   ;; Diary sexps.
 	   ;; Diary sexps.
 	   '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t))
 	   '("^&?%%(.*\\|<%%([^>\n]*?>" (0 'org-sexp-date t))
 	   ;; Macro
 	   ;; Macro
-	   '("{{{.+}}}" (0 'org-macro t))
+	   '("{{{.+?}}}" (0 'org-macro t))
 	   '(org-hide-wide-columns (0 nil append))
 	   '(org-hide-wide-columns (0 nil append))
 	   ;; TODO keyword
 	   ;; TODO keyword
 	   (list (format org-heading-keyword-regexp-format
 	   (list (format org-heading-keyword-regexp-format