diff options
author | Rasmus <rasmus@gmx.us> | 2017-08-29 10:07:08 +0200 |
---|---|---|
committer | Rasmus <rasmus@gmx.us> | 2017-08-29 10:13:31 +0200 |
commit | 3ad8ca429bac5e1354881cf4411d6f41dab36b44 (patch) | |
tree | 41d8dc789a212dc3b1e09f402714b09dc1462fc5 /lisp/org/org-element.el | |
parent | c1854b1d31e1b0a3a9e91ef41110a5fa77bedb31 (diff) | |
download | emacs-3ad8ca429bac5e1354881cf4411d6f41dab36b44.tar.gz |
Update Org to v9.0.10
Please see etc/ORG-NEWS for major changes. Note, this is a bugfix
release.
Diffstat (limited to 'lisp/org/org-element.el')
-rw-r--r-- | lisp/org/org-element.el | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 41b4a3ac78c..f4fe6447a68 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -2983,16 +2983,8 @@ Assume point is at the beginning of the LaTeX fragment." (save-excursion (let* ((begin (point)) (after-fragment - (if (eq (char-after) ?$) - (if (eq (char-after (1+ (point))) ?$) - (search-forward "$$" nil t 2) - (and (not (eq (char-before) ?$)) - (search-forward "$" nil t 2) - (not (memq (char-before (match-beginning 0)) - '(?\s ?\t ?\n ?, ?.))) - (looking-at-p - "\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)") - (point))) + (cond + ((not (eq ?$ (char-after))) (pcase (char-after (1+ (point))) (?\( (search-forward "\\)" nil t)) (?\[ (search-forward "\\]" nil t)) @@ -3000,10 +2992,23 @@ Assume point is at the beginning of the LaTeX fragment." ;; Macro. (and (looking-at "\\\\[a-zA-Z]+\\*?\\(\\(\\[[^][\n{}]*\\]\\)\ \\|\\({[^{}\n]*}\\)\\)*") - (match-end 0)))))) - (post-blank (if (not after-fragment) (throw 'no-object nil) - (goto-char after-fragment) - (skip-chars-forward " \t"))) + (match-end 0))))) + ((eq ?$ (char-after (1+ (point)))) + (search-forward "$$" nil t 2)) + (t + (and (not (eq ?$ (char-before))) + (not (memq (char-after (1+ (point))) + '(?\s ?\t ?\n ?, ?. ?\;))) + (search-forward "$" nil t 2) + (not (memq (char-before (match-beginning 0)) + '(?\s ?\t ?\n ?, ?.))) + (looking-at-p + "\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)") + (point))))) + (post-blank + (if (not after-fragment) (throw 'no-object nil) + (goto-char after-fragment) + (skip-chars-forward " \t"))) (end (point))) (list 'latex-fragment (list :value (buffer-substring-no-properties begin after-fragment) |