diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 43f3e7dfd..77b298237 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,7 @@ * org.el (org-hide-archived-subtrees): Don't jump to end of subtree if the match was not in a headline. + (org-inside-latex-macro-p): Allow more complex arguments. 2010-02-15 Carsten Dominik diff --git a/lisp/org.el b/lisp/org.el index 93e63da44..a276d3b54 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14770,7 +14770,11 @@ looks only before point, not after." "Is point inside a LaTeX macro or its arguments?" (save-match-data (org-in-regexp - "\\\\[a-zA-Z]+\\*?\\(\\[[^][\n{}]*\\]\\)?\\({[^{}\n]*}\\)?"))) + "\\\\[a-zA-Z]+\\*?\\(\\(\\[[^][\n{}]*\\]\\)\\|\\({[^{}\n]*}\\)\\)*"))) + +(defun test () + (interactive) + (message "%s" (org-inside-latex-macro-p))) (defun org-try-cdlatex-tab () "Check if it makes sense to execute `cdlatex-tab', and do it if yes.