[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 255e768 11/30: Cater for case where fontificatio
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 255e768 11/30: Cater for case where fontification match goes over limit |
Date: |
Fri, 25 Sep 2020 11:00:13 -0400 (EDT) |
branch: externals/auctex
commit 255e768d2b150484b9e9b29e05ee5b5886d343d2
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Cater for case where fontification match goes over limit
* font-latex.el (font-latex-match-quotation): Cater for case
where fontification match goes over limit.
Drop `string-make-multibyte'. It's no longer necessary because
all supported emacsen handle multibyte strings well enough.
(font-latex--updated-region-end): Adjust comments.
---
font-latex.el | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/font-latex.el b/font-latex.el
index 6ce901f..4736cfb 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1320,11 +1320,11 @@ then call `font-latex-set-syntactic-keywords'.")))
(make-obsolete 'font-latex-update-font-lock nil "12.2.4")
(defvar font-latex--updated-region-end nil
-;; During hilighting of math expression, matched range sometimes exceeds
-;; the given end limit. So record the actual end in this variable to
+;; During font lock operation, matched range sometimes exceeds the
+;; given end limit. So record the actual end in this variable to
;; notify the font lock machinery.
-;; Match function of math expression should do the following two if
-;; the end of the actual match goes beyond the limit:
+;; Match functions should do the following two if the end of the
+;; actual match goes beyond the limit:
;; 1. If the value of this variable is smaller than limit, set this
;; variable to that limit.
;; 2. When the end of the actual match exceeds this variable,
@@ -2018,12 +2018,9 @@ set to french, and >>german<< (and 8-bit) are used if
set to german."
(match-beginning 0))
(let* ((beg (match-beginning 0))
(after-beg (match-end 0))
- (opening-quote (match-string 0))
+ (opening-quote (match-string-no-properties 0))
(closing-quote
- (nth 1 (assoc (if (fboundp 'string-make-multibyte)
- (string-make-multibyte (match-string 0))
- (match-string 0))
- font-latex-quote-list)))
+ (nth 1 (assoc opening-quote font-latex-quote-list)))
(nest-count 0)
(point-of-surrender (+ beg font-latex-multiline-boundary)))
;; Find closing quote taking nested quotes into account.
@@ -2032,7 +2029,8 @@ set to french, and >>german<< (and 8-bit) are used if set
to german."
(concat opening-quote "\\|" closing-quote)
point-of-surrender 'move)
(when (and (< (point) point-of-surrender) (not (eobp)))
- (if (string= (match-string 0) opening-quote)
+ (if (string= (match-string-no-properties 0)
+ opening-quote)
(setq nest-count (1+ nest-count))
(when (/= nest-count 0)
(setq nest-count (1- nest-count)))))))
@@ -2043,7 +2041,14 @@ 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)))
- (store-match-data (list beg (point) (point) (point))))
+ (let ((p (point)))
+ (if (< font-latex--updated-region-end limit)
+ (setq font-latex--updated-region-end limit))
+ (when (< font-latex--updated-region-end p)
+ (font-lock-unfontify-region
+ font-latex--updated-region-end p)
+ (setq font-latex--updated-region-end p))
+ (store-match-data (list beg p p p))))
(throw 'match t)))))))
(defun font-latex-extend-region-backwards-quotation ()
- [elpa] externals/auctex 59b7942 17/30: ; Silence the compiler, (continued)
- [elpa] externals/auctex 59b7942 17/30: ; Silence the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 07b79fc 24/30: ; Silence the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 087b030 28/30: Simplify mode line for emacs 27, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex b06ca0a 25/30: Fix document, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 0692e51 23/30: ; Silence the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 601e6a3 01/30: Get rid of gabage in generated texi file, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 4d58d7d 09/30: Don't extend font lock region too eagerly (bug#42267), Tassilo Horn, 2020/09/25
- [elpa] externals/auctex d7cba92 21/30: Prepare for pdf output for PSTricks documents, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex a27850f 10/30: Fix previous commit and add new test, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 67ecb0b 18/30: ; Silence the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 255e768 11/30: Cater for case where fontification match goes over limit,
Tassilo Horn <=
- [elpa] externals/auctex 92aa02b 29/30: Merge remote-tracking branch 'origin/master' into externals/auctex, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex be4a912 26/30: ; Silence the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 3ef28a5 20/30: Add an extra check for tex-buf.el in some style hooks, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex f04a508 22/30: Restore all math environments in texmathp.el, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex 1bc7a21 30/30: ; Regenerate docs, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex ef1f670 27/30: ; Partially revert silencing the compiler, Tassilo Horn, 2020/09/25
- [elpa] externals/auctex b21889e 19/30: Merge prv-emacs.el into preview.el.in, Tassilo Horn, 2020/09/25