]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/syntax.el (syntax-propertize-rules): Use `macroexp-let2`
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Mar 2021 02:47:10 +0000 (21:47 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 12 Mar 2021 02:47:10 +0000 (21:47 -0500)
This also silences the recently introduced compilation warning.

lisp/emacs-lisp/syntax.el

index bee2f9639e77ef3f6875c3aeb6ffe5b5f91cce7e..6d5b04b83bb68b90bb1206dd1fb537f433f07d94 100644 (file)
@@ -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))