[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. ab3bfaf1033f0d6e0ecfe
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] GNU AUCTeX branch, master, updated. ab3bfaf1033f0d6e0ecfe3172794a6363450b207 |
Date: |
Wed, 2 Mar 2022 15:11:20 -0500 (EST) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".
The branch, master has been updated
via ab3bfaf1033f0d6e0ecfe3172794a6363450b207 (commit)
from 259ffc34c474f559d840e5ab4701780629bc8791 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ab3bfaf1033f0d6e0ecfe3172794a6363450b207
Author: Tassilo Horn <tsdh@gnu.org>
Date: Wed Mar 2 21:09:34 2022 +0100
Don't use obsolete font-lock-syntactic-keywords
That's obsolete since Emacs 24.1 and probably going to be removed in
Emacs 29.1.
* font-latex.el (font-latex-set-syntactic-keywords):
(font-latex-syntax-propertize-function): Delete function.
(font-latex--make-syntax-propertize-function): New function.
(font-latex-setup): Regenerate syntax-propertize-function.
diff --git a/font-latex.el b/font-latex.el
index 8b1fec60..14005e2c 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1095,7 +1095,10 @@ have changed."
(setq font-latex-doctex-syntactic-keywords
(append font-latex-syntactic-keywords
;; For docTeX comment-in-doc.
- '(("\\(\\^\\)\\^A" (1 (font-latex-doctex-^^A)))))))
+ '(("\\(\\^\\)\\^A" (1 (font-latex-doctex-^^A))))))
+ ;; Finally, compute our `syntax-propertize-function' anew.
+ (setq-local syntax-propertize-function
+ (font-latex--make-syntax-propertize-function)))
;;; Syntactic fontification
@@ -1258,14 +1261,12 @@ triggers Font Lock to recognize the change."
(when (fboundp 'font-lock-flush)
(font-lock-flush)))
-(defun font-latex-syntax-propertize-function (start end)
- "The `syntax-propertize-function' for (La)TeX documents."
- (with-no-warnings
- (let ((font-lock-syntactic-keywords
- (if (derived-mode-p 'doctex-mode)
- font-latex-doctex-syntactic-keywords
- font-latex-syntactic-keywords)))
- (font-lock-fontify-syntactic-keywords-region start end))))
+(defun font-latex--make-syntax-propertize-function ()
+ "Return a `syntax-propertize-function' for (La|Doc)TeX documents."
+ (let ((kws (if (derived-mode-p 'doctex-mode)
+ font-latex-doctex-syntactic-keywords
+ font-latex-syntactic-keywords)))
+ (syntax-propertize-via-font-lock kws)))
;;;###autoload
(defun font-latex-setup ()
@@ -1282,10 +1283,10 @@ triggers Font Lock to recognize the change."
;; `VirTeX-common-initialization' and place it in the different
;; `xxx-mode' calls instead, but _after_ `major-mode' is set.
(let ((defaults
- `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2)
- nil nil ,font-latex-syntax-alist nil))
+ `((font-latex-keywords font-latex-keywords-1 font-latex-keywords-2)
+ nil nil ,font-latex-syntax-alist nil))
(variables
- '((font-lock-mark-block-function . mark-paragraph)
+ `((font-lock-mark-block-function . mark-paragraph)
(font-lock-fontify-region-function
. font-latex-fontify-region)
(font-lock-unfontify-region-function
@@ -1298,7 +1299,7 @@ triggers Font Lock to recognize the change."
font-latex-extend-region-backwards-quotation
font-latex-extend-region-backwards-math)
(syntax-propertize-function
- . font-latex-syntax-propertize-function)
+ . ,(font-latex--make-syntax-propertize-function))
(syntax-propertize-extend-region-functions
syntax-propertize-wholelines
font-latex-sp-extend-region-backwards-verb-env))))
-----------------------------------------------------------------------
Summary of changes:
font-latex.el | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
hooks/post-receive
--
GNU AUCTeX
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [AUCTeX-diffs] GNU AUCTeX branch, master, updated. ab3bfaf1033f0d6e0ecfe3172794a6363450b207,
Tassilo Horn <=