unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Perry <stevoooo@gmail.com>
To: 21737@debbugs.gnu.org
Subject: bug#21737: Acknowledgement (24.5; Minor feature request: `comint-previous-matching-input-from-input' and point)
Date: Fri, 13 Nov 2015 22:30:45 +0000	[thread overview]
Message-ID: <3B07598E-834E-4071-8EF2-F32AF4B15164@gmail.com> (raw)
In-Reply-To: <22057.18203.537000.988338@gargle.gargle.HOWL>

How about this for a patch?  It’s my first so be kind :-)

diff --git a/lisp/comint.el b/lisp/comint.el
index e70fe88..8d61226 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -283,6 +283,14 @@ 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 '(choice (const :tag "off" nil)
+                 (const t))
+  :group 'comint)
+
 (defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output)
 
 (defcustom comint-scroll-show-maximum-output t
@@ -1220,7 +1228,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.








  parent reply	other threads:[~2015-11-13 22:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 20:29 bug#21737: 24.5; Minor feature request: `comint-previous-matching-input-from-input' and point Eli Barzilay
     [not found] ` <handler.21737.B.14455457715661.ack@debbugs.gnu.org>
2015-10-22 20:42   ` bug#21737: Acknowledgement (24.5; Minor feature request: `comint-previous-matching-input-from-input' and point) Eli Barzilay
2015-10-23  6:26 ` bug#21737: 24.5; Minor feature request: `comint-previous-matching-input-from-input' and point Eli Zaretskii
2015-11-13 22:30 ` Stephen Perry [this message]
2015-11-16 16:50   ` bug#21737: Acknowledgement (24.5; Minor feature request: `comint-previous-matching-input-from-input' and point) John Wiegley
2015-11-16 18:55     ` Stephen Perry
2015-11-17  0:58       ` Juri Linkov
2015-11-17 13:08         ` Stephen Perry
2015-11-19  0:33           ` Juri Linkov
2020-09-17 17:42       ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B07598E-834E-4071-8EF2-F32AF4B15164@gmail.com \
    --to=stevoooo@gmail.com \
    --cc=21737@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).