Fix bugs in dabbrev-expand (bug#74090)
authorStephen Berman <stephen.berman@gmx.net>
Thu, 31 Oct 2024 09:46:27 +0000 (10:46 +0100)
committerStephen Berman <stephen.berman@gmx.net>
Thu, 31 Oct 2024 11:12:25 +0000 (12:12 +0100)
commit8113b5c562b88d4981231b0e332ced9fc20dc0b9
tree0ddd8d410f09818d52c5dd9830d3f1a6db75f51d
parent3101c5031e6eae31ac64392f312091ffa9bbd777
Fix bugs in dabbrev-expand (bug#74090)

* lisp/dabbrev.el (dabbrev-expand): Use the buffer where the
expansion was found when setting the internal variables used to
determine the next expansion or a replacement expansion.

* test/lisp/dabbrev-tests.el (ert-x): Require for
'ert-with-temp-directory', 'ert-resource-directory' and
'ert-resource-file'.
(with-dabbrev-test): New macro.
(dabbrev-expand-test-same-buffer-{1,2,3,4})
(dabbrev-expand-test-other-buffer-{1,2,3,4})
(dabbrev-expand-test-minibuffer-{1,2,3,4}): New tests.

* test/lisp/dabbrev-resources/dabbrev-expand.el:
* test/lisp/dabbrev-resources/INSTALL_BEGIN: New test resources.

(cherry picked from commit f6c359cb66a0e9b851e3467b1ba9cab7efa8f744)
lisp/dabbrev.el
test/lisp/dabbrev-resources/INSTALL_BEGIN [new file with mode: 0644]
test/lisp/dabbrev-resources/dabbrev-expand.el [new file with mode: 0644]
test/lisp/dabbrev-tests.el