summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2018-12-17 09:49:26 +0100
committerBastien <bzg@gnu.org>2018-12-17 09:49:26 +0100
commita311f29db10e2d9eb491c292df4dc54ff027d774 (patch)
tree1e3e67873c99cca535841d97b76a22b261563af9
parentf89189c6188c93b57f2efdc52f294586b99c624b (diff)
parent6656f11596602648b57a84e0bfea54802b8e7d34 (diff)
downloadorg-mode-a311f29db10e2d9eb491c292df4dc54ff027d774.tar.gz
Merge branch 'master' of code.orgmode.org:bzg/org-mode
-rw-r--r--lisp/org.el31
1 files changed, 14 insertions, 17 deletions
diff --git a/lisp/org.el b/lisp/org.el
index c62b448..22d6374 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6260,12 +6260,11 @@ done, nil otherwise."
(when (org-string-nw-p org-latex-and-related-regexp)
(catch 'found
(while (re-search-forward org-latex-and-related-regexp limit t)
- (unless (cl-some
- (lambda (f) (memq f '(org-code org-verbatim underline
- org-special-keyword)))
- (save-excursion
- (goto-char (1+ (match-beginning 0)))
- (face-at-point nil t)))
+ (unless (cl-some (lambda (f) (memq f '(org-code org-verbatim underline
+ org-special-keyword)))
+ (save-excursion
+ (goto-char (1+ (match-beginning 0)))
+ (face-at-point nil t)))
(let* ((start (if (memq (char-after (1+ (match-beginning 0)))
'(?_ ?^))
(1+ (match-beginning 0))
@@ -6277,19 +6276,17 @@ done, nil otherwise."
(cond
((string-match "\\`[ \t]*\\\\begin{\\([a-zA-Z0-9\\*]+\\)}"
m)
- (let ((closing
- (format "\\\\end{%s}[ \t]*$"
- (regexp-quote (match-string 1 m)))))
- (or (re-search-forward closing nil t) e)))
+ (let ((re (format "\\\\end{%s}[ \t]*$"
+ (regexp-quote (match-string 1 m)))))
+ (or (re-search-forward re nil t) e)))
((string-match "\\\\end{\\([a-zA-Z0-9\\*]+\\)}[ \t]*\\'" m)
- (let ((opening
- (format "^[ \t]*\\\\begin{%s}"
- (regexp-quote (match-string 1 m)))))
- (setq start (or (save-excursion
- (re-search-backward opening nil t))
- b))
+ (let ((re (format "^[ \t]*\\\\begin{%s}"
+ (regexp-quote (match-string 1 m)))))
+ (setq start
+ (or (save-excursion (re-search-backward re nil t))
+ b))
(line-end-position)))
- ((string-match "\\\\[a-zA-Z]+\\*?{" m)
+ ((string-match "\\`\\\\[a-zA-Z]+\\*?{\\'" m)
(search-forward "}" nil t))
(t e)))))
(font-lock-prepend-text-property