]> git.eshelyaron.com Git - emacs.git/commit
Fix behavior of 'eshell-hist-ignoredups' when set to 'erase'
authorJim Porter <jporterbugs@gmail.com>
Thu, 24 Aug 2023 01:27:45 +0000 (18:27 -0700)
committerJim Porter <jporterbugs@gmail.com>
Thu, 24 Aug 2023 01:27:45 +0000 (18:27 -0700)
commit7b0f24ab1f9770408a08181ab9f8ac2b43e5ab9b
tree57850039a7f5b1dd5b4a59f0aa42da856e4fb014
parent1986484d4d0b77e5c9f00217cdf2da28b6b6cf11
Fix behavior of 'eshell-hist-ignoredups' when set to 'erase'

* lisp/eshell/em-hist.el (eshell-add-input-to-history): Refactor to
use 'pcase' and correct the logic for the 'erase' case.

* test/lisp/eshell/em-hist-tests.el: Require our test helpers.
(eshell-write-readonly-history): Rename to...
(em-hist-test/write-readonly-history): ... this.
(em-hist-test/add-to-history/allow-dups)
(em-hist-test/add-to-history/no-consecutive-dups)
(em-hist-test/add-to-history/erase-dups): New tests (bug#63360).
lisp/eshell/em-hist.el
test/lisp/eshell/em-hist-tests.el