[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX-diffs] [elpa] externals/auctex 7565d7c 19/43: Remove compatibili
From: |
Tassilo Horn |
Subject: |
[AUCTeX-diffs] [elpa] externals/auctex 7565d7c 19/43: Remove compatibility code for older emacsen |
Date: |
Sat, 11 Apr 2020 15:05:21 -0400 (EDT) |
branch: externals/auctex
commit 7565d7c8d9e8bb78bdd3635824979a7bb78b2e07
Author: Ikumi Keita <address@hidden>
Commit: Ikumi Keita <address@hidden>
Remove compatibility code for older emacsen
Since `font-lock-multiline' is available in all supported emacsen, we
no longer need `font-latex-multiline'.
* font-latex.el (font-latex-setup): Remove `boundp' check.
(font-latex-unfontify-region): Delete unnecessary code.
(font-lock-after-change-function): Delete obsolete advice.
(font-latex-put-multiline-property-maybe): Remove.
(font-latex-match-command-with-arguments):
(font-latex-match-command-in-braces):
(font-latex-match-math-env):
(font-latex-match-math-envII):
(font-latex-match-quotation):
Remove call on `font-latex-put-multiline-property-maybe'.
---
font-latex.el | 59 ++++++-----------------------------------------------------
1 file changed, 6 insertions(+), 53 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 72bd2d2..de7d5ea 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1258,9 +1258,8 @@ triggers Font Lock to recognize the change."
"Setup this buffer for LaTeX font-lock. Usually called from a hook."
(font-latex-set-syntactic-keywords)
- ;; Activate multi-line fontification facilities if available.
- (when (boundp 'font-lock-multiline)
- (set (make-local-variable 'font-lock-multiline) t))
+ ;; Activate multi-line fontification facilities.
+ (set (make-local-variable 'font-lock-multiline) t)
;; Functions for extending the region.
(dolist (elt '(font-latex-extend-region-backwards-command-with-args
@@ -1372,11 +1371,6 @@ If optional argument is non-nil, print status messages."
(defun font-latex-unfontify-region (beg end &rest ignored)
"Unfontify region from BEG to END."
(font-lock-default-unfontify-region beg end)
- ;; XEmacs does not provide `font-lock-extra-managed-props', so
- ;; remove the `font-latex-multiline' property manually. (The
- ;; property is only added if `font-lock-multiline' is bound.)
- (unless (boundp 'font-lock-multiline)
- (remove-text-properties beg end '(font-latex-multiline)))
(remove-text-properties beg end '(script-level))
(let ((start beg))
(while (< beg end)
@@ -1388,30 +1382,6 @@ If optional argument is non-nil, print status messages."
(setq beg next)))
(remove-text-properties start end '(invisible))))
-(defadvice font-lock-after-change-function (before font-latex-after-change
- activate)
- "Extend region for fontification of multiline constructs.
-This is only necessary if the editor does not provide multiline
-fontification facilities like `font-lock-multiline' itself."
- (unless (boundp 'font-lock-multiline)
- (let ((ad-beg (ad-get-arg 0))
- (ad-end (ad-get-arg 1)))
- (save-excursion
- (goto-char ad-beg)
- (beginning-of-line)
- (when (get-text-property (point) 'font-latex-multiline)
- (setq ad-beg (previous-single-property-change (point)
- 'font-latex-multiline))
- (when (numberp ad-beg)
- (ad-set-arg 0 ad-beg)))
- (goto-char ad-end)
- (end-of-line)
- (when (get-text-property (point) 'font-latex-multiline)
- (setq ad-end (next-single-property-change (point)
- 'font-latex-multiline))
- (when (numberp ad-end)
- (ad-set-arg 1 ad-end)))))))
-
(defun font-latex-after-hacking-local-variables ()
"Refresh fontification if required by updates of file-local variables.
This function is added to `hack-local-variables-hook' and
@@ -1528,16 +1498,6 @@ In docTeX mode \"%\" at the start of a line will be
treated as whitespace."
t))
(forward-comment 1)))
-(defun font-latex-put-multiline-property-maybe (beg end)
- "Add a multiline property if no equivalent is provided by the editor.
-The text property is used to find the start or end of a multiline
-construct when unfontifying a region. Emacs adds such a text
-property automatically if `font-lock-multiline' is set to t and
-extends the region to be unfontified automatically as well."
- (unless (boundp 'font-lock-multiline)
- (put-text-property beg end 'font-latex-multiline t)))
-
-
;;; Match functions
(defvar font-latex-matched-faces nil
@@ -1657,7 +1617,6 @@ Returns nil if none of KEYWORDS is found."
(1+ error-indicator-pos))
match-data))
(push 'font-latex-warning-face font-latex-matched-faces))
- (font-latex-put-multiline-property-maybe beg end)
(store-match-data match-data)
(throw 'match t))))))
@@ -1710,11 +1669,9 @@ Returns nil if no command is found."
(narrow-to-region (point-min) limit)
(forward-char -1) ; Move on the opening bracket
(if (font-latex-find-matching-close ?\{ ?\})
- (progn
- (font-latex-put-multiline-property-maybe beg (1- (point)))
- (store-match-data (list kbeg kbeg
- kbeg kend
- beg (1- (point)))))
+ (store-match-data (list kbeg kbeg
+ kbeg kend
+ beg (1- (point))))
(goto-char kend)
(store-match-data (list (1- kbeg) kbeg
kbeg kend
@@ -1816,9 +1773,7 @@ Used for patterns like:
limit 'move)
(string= (match-string 1) close-tag))
;; Found closing tag.
- (progn
- (font-latex-put-multiline-property-maybe beg (point))
- (store-match-data (list beg beg beg (point))))
+ (store-match-data (list beg beg beg (point)))
;; Did not find closing tag.
(goto-char (+ beg 2))
(store-match-data (list beg (point) (point) (point))))
@@ -1886,7 +1841,6 @@ The \\begin{equation} incl. arguments in the same line and
(setq end (match-beginning 0))
(goto-char beg)
(setq end beg))
- (font-latex-put-multiline-property-maybe beg end)
(store-match-data (list beg end))
t)))
@@ -1979,7 +1933,6 @@ set to french, and >>german<< (and 8-bit) are used if set
to german."
(progn
(goto-char after-beg)
(store-match-data (list after-beg after-beg beg after-beg)))
- (font-latex-put-multiline-property-maybe beg (point))
(store-match-data (list beg (point) (point) (point))))
(throw 'match t)))))))
- [AUCTeX-diffs] [elpa] externals/auctex 8a2cdac 02/43: Add new style/fbox.el, (continued)
- [AUCTeX-diffs] [elpa] externals/auctex 8a2cdac 02/43: Add new style/fbox.el, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 4c1bb12 10/43: ; * tex-style.el (LaTeX-exam-reftex-quick-id-key): Fix docstring., Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 45f0298 07/43: * font-latex.el (font-latex-setup): Remove XEmacs compat code., Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex e35f85a 06/43: Update style/caption.el to package version 3.4a, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 6c25ffe 08/43: Adjust Makefile clean targets, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex d308a1e 14/43: Fix handling of LaTeX font declaration macros, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 68247ff 18/43: Delete obsolete comment, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex f2bac9d 11/43: Improve environment insertion (bug#35284), Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 8cd9db3 17/43: Add changelog for my previous bug fix, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 3424aae 15/43: Update style/fbox.el to package version 0.04, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 7565d7c 19/43: Remove compatibility code for older emacsen,
Tassilo Horn <=
- [AUCTeX-diffs] [elpa] externals/auctex 8979812 20/43: Don't use obsolete variable, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 88edbf8 22/43: Improve support for extended NFSS macros, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex c1e0419 23/43: Adjust style/fontaxes.el to LaTeX kernel, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 0bc0ff5 29/43: Add fontification support \textnormal macro, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 1d2e61d 26/43: Add new font macros in the related menus, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex cc3f860 32/43: Fix regexp for parsing optional arguments, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 0d3393d 36/43: * preview.el.in (preview-gs-open): Use wrapper function., Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 811c52a 34/43: Update style/listings.el, Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex 520585a 25/43: ; * style/revtex4-2.el: Silence the compiler., Tassilo Horn, 2020/04/11
- [AUCTeX-diffs] [elpa] externals/auctex ae89690 28/43: * doc/auctex.texi (Font Specifiers): Document new font macros., Tassilo Horn, 2020/04/11