bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#36095: [PATCH] Do not use syntax-ppss-table in syntax-propertize whe


From: Dario Gjorgjevski
Subject: bug#36095: [PATCH] Do not use syntax-ppss-table in syntax-propertize when nil
Date: Wed, 05 Jun 2019 11:15:48 +0200

Commit 0b3982b1a3 changed syntax-propertize to use syntax-ppss-table
explicitly, similarly to syntax-ppss.  However, it also attempts to do
this when syntax-ppss-table is nil, resulting in an error.  This patch
fixes that.

>From bfa012db3b137262cbdfff827c3b8d367750e0ab Mon Sep 17 00:00:00 2001
From: Dario Gjorgjevski <dario.gjorgjevski+git@gmail.com>
Date: Wed, 5 Jun 2019 11:07:49 +0200
Subject: [PATCH] Do not use syntax-ppss-table in syntax-propertize when nil

* lisp/emacs-lisp/syntax.el (syntax-propertize): Use (syntax-table)
instead of syntax-ppss-table when the latter is nil.
---
 lisp/emacs-lisp/syntax.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 1aec1988ab..60ed531e63 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -304,7 +304,7 @@ syntax-propertize
                  #'syntax-ppss-flush-cache 99 t))
       (save-excursion
         (with-silent-modifications
-          (with-syntax-table syntax-ppss-table
+          (with-syntax-table (or syntax-ppss-table (syntax-table))
             (make-local-variable 'syntax-propertize--done) ;Just in case!
             (let* ((start (max (min syntax-propertize--done (point-max))
                                (point-min)))
-- 
2.20.1

-- 
Dario Gjorgjevski :: <dario.gjorgjevski@gmail.com>
                  :: 744A 4F0B 4F1C 9371
                  :: +48 1525 8666837

reply via email to

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