emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master f97628f: * lisp/emacs-lisp/syntax.el (syntax-proper


From: Stefan Monnier
Subject: [Emacs-diffs] master f97628f: * lisp/emacs-lisp/syntax.el (syntax-propertize): `ignore` is like nil
Date: Wed, 8 May 2019 15:18:37 -0400 (EDT)

branch: master
commit f97628f58e520c13b70ff618dda34e66da3dc81b
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    * lisp/emacs-lisp/syntax.el (syntax-propertize): `ignore` is like nil
    
    (syntax-ppss-after-change-function): Mark it as obsolete.
    * lisp/font-lock.el (font-lock-apply-syntactic-highlight):
    Use syntax-ppss-flush-cache instead.
---
 lisp/emacs-lisp/syntax.el | 5 +++--
 lisp/font-lock.el         | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index d09d6c1..f1904e6 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -286,7 +286,7 @@ END) suitable for `syntax-propertize-function'."
 (defun syntax-propertize (pos)
   "Ensure that syntax-table properties are set until POS (a buffer point)."
   (when (< syntax-propertize--done pos)
-    (if (null syntax-propertize-function)
+    (if (memq syntax-propertize-function '(nil ignore))
         (setq syntax-propertize--done (max (point-max) pos))
       ;; (message "Needs to syntax-propertize from %s to %s"
       ;;          syntax-propertize--done pos)
@@ -404,7 +404,8 @@ These are valid when the buffer has no restriction.")
 (defvar-local syntax-ppss-narrow-start nil
   "Start position of the narrowing for `syntax-ppss-narrow'.")
 
-(defalias 'syntax-ppss-after-change-function 'syntax-ppss-flush-cache)
+(define-obsolete-function-alias 'syntax-ppss-after-change-function
+  #'syntax-ppss-flush-cache "27.1")
 (defun syntax-ppss-flush-cache (beg &rest ignored)
   "Flush the cache of `syntax-ppss' starting at position BEG."
   ;; Set syntax-propertize to refontify anything past beg.
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index d0f7096..7ff4e60 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1501,7 +1501,7 @@ see `font-lock-syntactic-keywords'."
       ;; Flush the syntax-cache.  I believe this is not necessary for
       ;; font-lock's use of syntax-ppss, but I'm not 100% sure and it can
       ;; still be necessary for other users of syntax-ppss anyway.
-      (syntax-ppss-after-change-function start)
+      (syntax-ppss-flush-cache start)
       (cond
        ((not override)
        ;; Cannot override existing fontification.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]