diff options
| author | Stefan Monnier | 2018-11-02 17:47:11 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2018-11-02 17:47:11 -0400 |
| commit | 7b82d514371f77072b30a4a6a75cba6684ea56b4 (patch) | |
| tree | ead084dddca64495a9f7bea3034e2959785235f2 | |
| parent | aee434c3e0e05b4e490753598e4601feb9b9616e (diff) | |
| download | emacs-7b82d514371f77072b30a4a6a75cba6684ea56b4.tar.gz emacs-7b82d514371f77072b30a4a6a75cba6684ea56b4.zip | |
* lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Allow empty rules
| -rw-r--r-- | lisp/emacs-lisp/syntax.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index ad1a9665ff0..a4b7015f732 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." | |||
| 176 | (re | 176 | (re |
| 177 | (mapconcat | 177 | (mapconcat |
| 178 | (lambda (rule) | 178 | (lambda (rule) |
| 179 | (let* ((orig-re (eval (car rule))) | 179 | (let* ((orig-re (eval (car rule) t)) |
| 180 | (re orig-re)) | 180 | (re orig-re)) |
| 181 | (when (and (assq 0 rule) (cdr rules)) | 181 | (when (and (assq 0 rule) (cdr rules)) |
| 182 | ;; If there's more than 1 rule, and the rule want to apply | 182 | ;; 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." | |||
| 190 | (cond | 190 | (cond |
| 191 | ((assq 0 rule) (if (zerop offset) t | 191 | ((assq 0 rule) (if (zerop offset) t |
| 192 | `(match-beginning ,offset))) | 192 | `(match-beginning ,offset))) |
| 193 | ((null (cddr rule)) | 193 | ((and (cdr rule) (null (cddr rule))) |
| 194 | `(match-beginning ,(+ offset (car (cadr rule))))) | 194 | `(match-beginning ,(+ offset (car (cadr rule))))) |
| 195 | (t | 195 | (t |
| 196 | `(or ,@(mapcar | 196 | `(or ,@(mapcar |