]> git.eshelyaron.com Git - emacs.git/commit
Rework history Isearch for Eshell
authorPengji Zhang <me@pengjiz.com>
Tue, 10 Dec 2024 10:55:36 +0000 (18:55 +0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 12 Dec 2024 15:49:28 +0000 (16:49 +0100)
commitd4fee0a99ad928b0b9d67c95d16301a090d9f5d9
treedde9243d8e9e158a6640144c16aa4319f6085e33
parent3511a9ee41dd3c2a15ace36140e6baf16f5d54d1
Rework history Isearch for Eshell

This is to make history Isearch for Eshell similar to that of
'comint-mode', by hooking into Isearch properly instead of
defining new commands to emulate Isearch (bug#74287).

* lisp/eshell/em-hist.el (eshell-history-isearch): New user
option.
(eshell-goto-history, eshell--isearch-setup)
(eshell-history-isearch-end, eshell-history-isearch-search)
(eshell-history-isearch-message, eshell-history-isearch-wrap)
(eshell-history-isearch-push-state): New functions.
(eshell-isearch-backward-regexp, eshell-isearch-forward-regexp):
New commands.
(eshell--history-isearch-message-overlay)
(eshell--stored-incomplete-input, eshell--force-history-isearch):
New internal variables.
(eshell-hist-mode-map): Bind 'M-r' to
'eshell-isearch-backward-regexp' and free 'M-s' binding for
normal in-buffer search commands.
(eshell-isearch-backward, eshell-isearch-forward): Use the new
way to start searching.
(eshell-hist-initialize): Use the new Isearch setup function.
(eshell-previous-matching-input): Use 'eshell-goto-history'.
Also inhibit messages when searching.
(eshell-isearch-map, eshell-isearch-repeat-backward)
(eshell-isearch-abort, eshell-isearch-delete-char)
(eshell-isearch-return, eshell-isearch-cancel)
(eshell-isearch-repeat-forward, eshell-test-imatch)
(eshell-return-to-prompt, eshell-prepare-for-search): Remove.
These are for the old history Isearch implementation.

* doc/misc/eshell.texi (History): Document changes.

* etc/NEWS: Annouce changes.

(cherry picked from commit 3959ea66448fb371cdc67bd963cd539a90f99ee5)
doc/misc/eshell.texi
etc/NEWS
lisp/eshell/em-hist.el