summaryrefslogtreecommitdiff
path: root/test/lisp/progmodes/elisp-mode-tests.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2020-12-23 19:57:27 +0000
committerJoão Távora <joaotavora@gmail.com>2021-09-27 01:07:11 +0100
commit68d73eb154c745cbba7b3fd6a0a0a087d7c157da (patch)
tree1b276611e4dabd49a33daa165e38d2cb464340c1 /test/lisp/progmodes/elisp-mode-tests.el
parent71857d410635743d437ce1ee73dff69de50030d6 (diff)
downloademacs-68d73eb154c745cbba7b3fd6a0a0a087d7c157da.tar.gz
Rework Elisp shorthands to only allow only prefix substitution
This simplification in requirements makes for more complex C code but that code is much less wasteful in Lisp strings than the previous implementation. * src/lread.c (read1): Rework. (Fintern): Rework. (Fintern_soft): Rework. (Funintern): Rework. (oblookup_considering_shorthand): Rewrite. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-read-buffer) (elisp-shorthand-read-from-string): Use new format of elisp-shorthands. * test/lisp/progmodes/elisp-resources/simple-shorthand-test.el (f-test) (f-test2, f-test3): Use new form of elisp-shorthands.
Diffstat (limited to 'test/lisp/progmodes/elisp-mode-tests.el')
-rw-r--r--test/lisp/progmodes/elisp-mode-tests.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el
index fadf858b717..d5d3f336fac 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -1028,7 +1028,7 @@ evaluation of BODY."
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
(should (equal (let ((elisp-shorthands
- '(("^s-" . "shorthand-longhand-"))))
+ '(("s-" . "shorthand-longhand-"))))
(with-temp-buffer
(insert shorthand-sname)
(goto-char (point-min))
@@ -1042,7 +1042,7 @@ evaluation of BODY."
(expected (intern (format "shorthand-longhand-%s" gsym))))
(cl-assert (not (intern-soft shorthand-sname)))
(should (equal (let ((elisp-shorthands
- '(("^s-" . "shorthand-longhand-"))))
+ '(("s-" . "shorthand-longhand-"))))
(car (read-from-string shorthand-sname)))
expected))
(should (not (intern-soft shorthand-sname)))))