[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex ab3bfaf103 13/60: Don't use obsol
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex ab3bfaf103 13/60: Don't use obsolete font-lock-syntactic-keywords |
Date: |
Fri, 8 Apr 2022 11:52:48 -0400 (EDT) |
branch: externals/auctex
commit ab3bfaf1033f0d6e0ecfe3172794a6363450b207
Author: Tassilo Horn <tsdh@gnu.org>
Commit: Tassilo Horn <tsdh@gnu.org>
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.
---
font-latex.el | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 8b1fec608d..14005e2cbd 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))))
- [AUCTeX-diffs] [elpa] externals/auctex e625dc05ea 01/60: Improve keymap handling, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex e625dc05ea 01/60: Improve keymap handling, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 0847db39c9 03/60: Improve file query in style/ltxtable.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 7119e9b58c 14/60: ; Fix tests relying on font-lock has put syntax properties already, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 3e95554c27 19/60: Reduce code duplication in style/sidecap.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 163dcb75bd 02/60: Fix label insertion at env. insertion with active region (bug#28382), Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f464242eab 29/60: Enable indent by square bracket, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex f686fbca6d 16/60: Add new test, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex e37c7a8b39 31/60: Revise documentation about simultaneous process, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 844e758a47 07/60: Improve indent in tabular-like environments, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 0e0551126d 17/60: * doc/changes.texi: Document switch from initial input to default., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex ab3bfaf103 13/60: Don't use obsolete font-lock-syntactic-keywords,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 2be733a3e3 28/60: Add new style/l3doc.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex dff1592319 09/60: Adjust argument list of `TeX-arg-length', Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex c43d21326d 42/60: Follow similar update of latex.el in context.el, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b2cea20056 53/60: ; Delete unnecessary quoting in docstrings, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 4e4c48556b 08/60: ; Trivial cleanup, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex b3d4a509d0 39/60: ; * doc/auctex.texi (Indenting): Fix wording., Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 4bcda2d50c 35/60: Improve indentation in env from algpseudocode package, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 1823017839 55/60: Wrap the 'function' environment better with %, Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex 36655f6a5e 24/60: Revert "Fix simultaneity", Tassilo Horn, 2022/04/08
- [AUCTeX-diffs] [elpa] externals/auctex fce8b94ca8 41/60: Update documentation with respect to indent, Tassilo Horn, 2022/04/08