GNU bug report logs - #21737
24.5; Minor feature request: `comint-previous-matching-input-from-input' and point

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Thu, 22 Oct 2015 20:30:05 UTC

Severity: wishlist

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stephen Perry <stevoooo <at> gmail.com>
To: John Wiegley <jwiegley <at> gmail.com>
Cc: 21737 <at> debbugs.gnu.org
Subject: bug#21737: Acknowledgement (24.5; Minor feature request: `comint-previous-matching-input-from-input' and point)
Date: Mon, 16 Nov 2015 18:55:13 +0000
Updated patch:

diff --git a/lisp/comint.el b/lisp/comint.el
index e70fe88..b7a906e 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -283,6 +283,13 @@ comint-move-point-for-output
 		 (const others))
   :group 'comint)
 
+(defcustom comint-move-point-to-end-on-match nil
+  "Controls whether point moves to the end of the matched input.
+If nil, then point remains in the current position.
+If t, point moves to the end of matched input."
+  :type 'boolean
+  :group 'comint)
+
 (defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output)
 
 (defcustom comint-scroll-show-maximum-output t
@@ -1220,7 +1227,8 @@ comint-previous-matching-input-from-input
     (comint-previous-matching-input
      (concat "^" (regexp-quote comint-matching-input-from-input-string))
      n)
-    (goto-char opoint)))
+    (unless comint-move-point-to-end-on-match
+      (goto-char opoint))))
 
 (defun comint-next-matching-input-from-input (n)
   "Search forwards through input history for match for current input.






This bug report was last modified 4 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.