emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Stefan Monnier
Subject: [Emacs-diffs] master 7b82d51: * lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Allow empty rules
Date: Fri, 2 Nov 2018 17:47:18 -0400 (EDT)

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

    * lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Allow empty rules
---
 lisp/emacs-lisp/syntax.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index ad1a966..a4b7015 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -176,7 +176,7 @@ Note: back-references in REGEXPs do not work."
          (re
           (mapconcat
            (lambda (rule)
-             (let* ((orig-re (eval (car rule)))
+             (let* ((orig-re (eval (car rule) t))
                     (re orig-re))
                (when (and (assq 0 rule) (cdr rules))
                  ;; If there's more than 1 rule, and the rule want to apply
@@ -190,7 +190,7 @@ Note: back-references in REGEXPs do not work."
                       (cond
                        ((assq 0 rule) (if (zerop offset) t
                                         `(match-beginning ,offset)))
-                       ((null (cddr rule))
+                       ((and (cdr rule) (null (cddr rule)))
                         `(match-beginning ,(+ offset (car (cadr rule)))))
                        (t
                         `(or ,@(mapcar



reply via email to

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