aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorPaul Eggert2024-03-11 00:03:39 -0700
committerPaul Eggert2024-03-11 00:34:27 -0700
commit2d61ebb505977af4f9fd90f92a776599a73f8501 (patch)
tree3ac892ed33305f86f65444caed2dd56e3a41c298 /test/src
parentbbc53e0bcf3fe18e7c1cd51fb8719cf62b9f6c71 (diff)
downloademacs-2d61ebb505977af4f9fd90f92a776599a73f8501.tar.gz
emacs-2d61ebb505977af4f9fd90f92a776599a73f8501.zip
Change bare-symbol back to match intent
Also, attempt to document the intent better. Problem reported by Alan Mackenzie (Bug#69684). * src/data.c (Fbare_symbol): Do not signal if the SYM is a symbol with position and symbols-with-pos-enabled is nil. Instead, ignore symbols-with-pos-enabled, as that was the intent. * test/src/data-tests.el (data-tests-bare-symbol): New test, to help prevent this bug from reoccurring.
Diffstat (limited to 'test/src')
-rw-r--r--test/src/data-tests.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/data-tests.el b/test/src/data-tests.el
index 8af7e902109..ad3b2071254 100644
--- a/test/src/data-tests.el
+++ b/test/src/data-tests.el
@@ -833,4 +833,9 @@ comparing the subr with a much slower Lisp implementation."
833 (should-error (defalias 'data-tests--da-c 'data-tests--da-d) 833 (should-error (defalias 'data-tests--da-c 'data-tests--da-d)
834 :type 'cyclic-function-indirection)) 834 :type 'cyclic-function-indirection))
835 835
836(ert-deftest data-tests-bare-symbol ()
837 (dolist (symbols-with-pos-enabled '(nil t))
838 (dolist (sym (list nil t 'xyzzy (make-symbol "")))
839 (should (eq sym (bare-symbol (position-symbol sym 0)))))))
840
836;;; data-tests.el ends here 841;;; data-tests.el ends here