diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-01-01 17:40:38 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-01-01 17:40:38 +0100 |
commit | 43fbf8a540a137dd669b973432bd24514b680207 (patch) | |
tree | bdb09e3f9c7b368f419bca21e3f933d8ea474c99 | |
parent | 80268c0e075bb69e7890146a8d7240e920fc786c (diff) | |
download | org-mode-43fbf8a540a137dd669b973432bd24514b680207.tar.gz |
Fix last commit
* lisp/org.el (org-do-latex-and-related): Silence byte-compiler.
-rw-r--r-- | lisp/org.el | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/org.el b/lisp/org.el index 8c9cac5..db3c11b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -6117,17 +6117,16 @@ Result depends on variable `org-highlight-latex-and-related'." (append re-latex re-entities re-sub) "\\|")))) -(defun org-do-latex-and-related (limit) +(defun org-do-latex-and-related (_limit) "Highlight LaTeX snippets and environments, entities and sub/superscript. -LIMIT bounds the search for syntax to highlight. Stop at first -highlighted object, if any. Return t if some highlighting was -done, nil otherwise." +Stop at first highlighted object, if any. Return t if some +highlighting was done, nil otherwise." (when (org-string-nw-p org-latex-and-related-regexp) (catch 'found (while (re-search-forward org-latex-and-related-regexp nil t) ;; on purpose, we ignore LIMIT (unless (cl-some (lambda (f) (memq f '(org-code org-verbatim underline - org-special-keyword))) + org-special-keyword))) (save-excursion (goto-char (1+ (match-beginning 0))) (face-at-point nil t))) @@ -6138,7 +6137,8 @@ done, nil otherwise." (font-lock-prepend-text-property (+ offset (match-beginning 0)) (match-end 0) 'face 'org-latex-and-related) - (add-text-properties start end '(font-lock-multiline t))) + (add-text-properties (+ offset (match-beginning 0)) (match-end 0) + '(font-lock-multiline t))) (throw 'found t))) nil))) |