summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJens Schmidt <jschmidt4gnu@vodafonemail.de>2023-05-20 23:03:29 +0200
committerEli Zaretskii <eliz@gnu.org>2023-05-21 09:16:23 +0300
commit2a5c946f8793d712c8739629d1bfdb14146c69cf (patch)
treea256051464e8dd0d6ff4595eaa3d79c53c951712 /lisp
parent6b60c8142ea10b774cd01db39f803f806df5fc5b (diff)
downloademacs-2a5c946f8793d712c8739629d1bfdb14146c69cf.tar.gz
emacs-2a5c946f8793d712c8739629d1bfdb14146c69cf.tar.bz2
emacs-2a5c946f8793d712c8739629d1bfdb14146c69cf.zip
Preserve mark in comint-history-isearch
This preserves mark in `comint-history-isearch-backward' and friends, which tend to set the mark on completion of the isearch to unexpected positions. * lisp/comint.el (comint-history-isearch-end): Set `isearch-opoint' to point. (Bug#63616)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/comint.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 682b555a33c..328b073dc8a 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1542,6 +1542,8 @@ Intended to be added to `isearch-mode-hook' in `comint-mode'."
(setq isearch-message-function nil)
(setq isearch-wrap-function nil)
(setq isearch-push-state-function nil)
+ ;; Force isearch to not change mark.
+ (setq isearch-opoint (point))
(kill-local-variable 'isearch-lazy-count)
(remove-hook 'isearch-mode-end-hook 'comint-history-isearch-end t)
(unless isearch-suspended