emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 2a5c946f879: Preserve mark in comint-history-isearch


From: Eli Zaretskii
Subject: emacs-29 2a5c946f879: Preserve mark in comint-history-isearch
Date: Sun, 21 May 2023 02:17:07 -0400 (EDT)

branch: emacs-29
commit 2a5c946f8793d712c8739629d1bfdb14146c69cf
Author: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Commit: Eli Zaretskii <eliz@gnu.org>

    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)
---
 lisp/comint.el | 2 ++
 1 file changed, 2 insertions(+)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]