]> git.eshelyaron.com Git - emacs.git/commitdiff
(elisp-tests-syntax-propertize): New test for bug#24542
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 13 Apr 2024 01:54:53 +0000 (21:54 -0400)
committerEshel Yaron <me@eshelyaron.com>
Sun, 14 Apr 2024 17:09:35 +0000 (19:09 +0200)
* test/lisp/progmodes/elisp-mode-tests.el (elisp-tests-syntax-propertize):
New test.

(cherry picked from commit e8adb8cf5a51ef172fb07786b71e3140b9358764)

test/lisp/progmodes/elisp-mode-tests.el

index 1d1ef9981e56192e950539f6157fd96076fc500b..591c32a8271284bc3d9dc5de3fa18f31ccf3416e 100644 (file)
@@ -1131,5 +1131,14 @@ evaluation of BODY."
                         (emacs-lisp-mode)
                         (indent-region (point-min) (point-max)))))
 
+(ert-deftest elisp-tests-syntax-propertize ()
+  (with-temp-buffer
+    (emacs-lisp-mode)
+    (insert "(a '@)")                   ;bug#24542
+    (should (equal (scan-sexps (+ (point-min) 3) 1) (1- (point-max))))
+    (erase-buffer)
+    (insert "(a ,@)")
+    (should-error (scan-sexps (+ (point-min) 3) 1))))
+
 (provide 'elisp-mode-tests)
 ;;; elisp-mode-tests.el ends here