unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Kevin Rodgers <kevin.d.rodgers@gmail.com>
Cc: 10654@debbugs.gnu.org
Subject: bug#10654: 24.0.93; isearch-yank-line moved from C-y
Date: Sat, 04 Feb 2012 02:17:55 +0200	[thread overview]
Message-ID: <87liojxvi0.fsf@mail.jurta.org> (raw)
In-Reply-To: <jgh6jl$vlq$1@dough.gmane.org> (Kevin Rodgers's message of "Fri,  03 Feb 2012 10:48:29 -0700")

> That approach would be a little less onerous if additional words or characters
> could be added to the search string by additional M-f and C-f without prefixing
> each with M-s.

If `C-k' for `isearch-yank-line' is not under consideration,
then I recommend to allow `M-s C-e C-e C-e ...' in 24.1
because `M-s C-e M-s C-e M-s C-e ...' is unusable.

This can be achieved with the patch below.

Other repeating key sequences `M-s M-f M-f M-f ...' and `M-s C-f C-f C-f ...'
could be implemented as well, but there is no urgent need for them now.

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2012-02-01 00:21:17 +0000
+++ lisp/isearch.el	2012-02-04 00:17:07 +0000
@@ -533,6 +533,9 @@ (defvar minibuffer-local-isearch-map
     map)
   "Keymap for editing Isearch strings in the minibuffer.")
 
+(defvar isearch-repeat-key nil)
+(defvar isearch-repeat-command nil)
+
 ;; Internal variables declared globally for byte-compiler.
 ;; These are all set with setq while isearching
 ;; and bound locally while editing the search string.
@@ -1662,6 +1665,8 @@
 (defun isearch-yank-line ()
   "Pull rest of line from buffer into search string."
   (interactive)
+  (setq isearch-repeat-key last-input-event
+	isearch-repeat-command 'isearch-yank-line)
   (isearch-yank-internal
    (lambda () (let ((inhibit-field-text-motion t))
 		(line-end-position (if (eolp) 2 1))))))
@@ -1962,8 +1967,13 @@ (defun isearch-other-meta-char (&optiona
                 (this-command-keys)))
 	 (main-event (aref key 0))
 	 (keylist (listify-key-sequence key))
+	 (repeat-key isearch-repeat-key)
          scroll-command isearch-point)
-    (cond ((and (= (length key) 1)
+    (setq isearch-repeat-key nil)
+    (cond ((and (eq main-event repeat-key) isearch-repeat-command)
+	   (setq isearch-repeat-key main-event)
+	   (command-execute isearch-repeat-command))
+	  ((and (= (length key) 1)
 		(let ((lookup (lookup-key local-function-key-map key)))
 		  (not (or (null lookup) (integerp lookup)
 			   (keymapp lookup)))))






  reply	other threads:[~2012-02-04  0:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 15:16 bug#10654: 24.0.93; isearch-yank-line moved from C-y Aaron S. Hawley
2012-01-30 18:54 ` Glenn Morris
2012-01-30 20:19   ` Aaron S. Hawley
2012-02-03 17:48     ` Kevin Rodgers
2012-02-04  0:17       ` Juri Linkov [this message]
2022-01-27 16:42   ` Lars Ingebrigtsen
2012-01-30 22:59 ` Juri Linkov

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=87liojxvi0.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=10654@debbugs.gnu.org \
    --cc=kevin.d.rodgers@gmail.com \
    /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).