summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/syntax.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2021-03-12 16:42:51 +0100
committerAndrea Corallo <akrl@sdf.org>2021-03-12 16:42:51 +0100
commit82bd6d57d54d4cdb205d921c2476d1dbb17f4188 (patch)
treefca7c47620f8d246015b85aab8dd91e440847743 /lisp/emacs-lisp/syntax.el
parentd9cd55a4f1c3f391b996dfbe77ed24306b37ac9f (diff)
parenta0854f939ce3a1de2c8cbc5e38b106a8df4480f6 (diff)
downloademacs-82bd6d57d54d4cdb205d921c2476d1dbb17f4188.tar.gz
emacs-82bd6d57d54d4cdb205d921c2476d1dbb17f4188.tar.bz2
emacs-82bd6d57d54d4cdb205d921c2476d1dbb17f4188.zip
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
-rw-r--r--lisp/emacs-lisp/syntax.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index bee2f9639e7..6d5b04b83bb 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -290,12 +290,13 @@ all RULES in total."
',(string-to-syntax (nth 1 action)))
,@(nthcdr 2 action))
`((let ((mb (match-beginning ,gn))
- (me (match-end ,gn))
- (syntax ,(nth 1 action)))
- (if syntax
- (put-text-property
- mb me 'syntax-table syntax))
- ,@(nthcdr 2 action)))))
+ (me (match-end ,gn)))
+ ,(macroexp-let2 nil syntax (nth 1 action)
+ `(progn
+ (if ,syntax
+ (put-text-property
+ mb me 'syntax-table ,syntax))
+ ,@(nthcdr 2 action)))))))
(t
`((let ((mb (match-beginning ,gn))
(me (match-end ,gn))