+2011-05-03 Leo Liu <sdl.web@gmail.com>
+
+ * NEWS: Mention the new command isearch-yank-pop.
+
2011-05-03 Teodor Zlatanov <tzz@lifelogs.com>
* NEWS: Mention new library gnutls.el and explain GnuTLS
*** C-y in Isearch is now bound to isearch-yank-kill, instead of
isearch-yank-line.
+---
+*** M-y in Isearch is now bound to isearch-yank-pop, instead of
+isearch-yank-kill.
+
+++
*** M-s C-e in Isearch is now bound to isearch-yank-line.
+2011-05-03 Leo Liu <sdl.web@gmail.com>
+
+ * isearch.el (isearch-yank-pop): New command.
+ (isearch-mode-map): bind it to `M-y'.
+ (isearch-forward): Mention it.
+
2011-05-03 Stefan Monnier <monnier@iro.umontreal.ca>
* simple.el (minibuffer-complete-shell-command): Remove.
(define-key map "\M-n" 'isearch-ring-advance)
(define-key map "\M-p" 'isearch-ring-retreat)
- (define-key map "\M-y" 'isearch-yank-kill)
+ (define-key map "\M-y" 'isearch-yank-pop)
(define-key map "\M-\t" 'isearch-complete)
Type \\[isearch-yank-line] to yank rest of line onto end of search string\
and search for it.
Type \\[isearch-yank-kill] to yank the last string of killed text.
+Type \\[isearch-yank-pop] to replace string just yanked into search prompt
+ with string killed before it.
Type \\[isearch-quote-char] to quote control character to search for it.
\\[isearch-abort] while searching or when search has failed cancels input\
back to what has
(interactive)
(isearch-yank-string (current-kill 0)))
+(defun isearch-yank-pop ()
+ "Replace just-yanked search string with previously killed string."
+ (interactive)
+ (if (not (memq last-command '(isearch-yank-kill isearch-yank-pop)))
+ ;; Fall back on `isearch-yank-kill' for the benefits of people
+ ;; who are used to the old behavior of `M-y' in isearch mode. In
+ ;; future, this fallback may be changed if we ever change
+ ;; `yank-pop' to do something like the kill-ring-browser.
+ (isearch-yank-kill)
+ (isearch-pop-state)
+ (isearch-yank-string (current-kill 1))))
+
(defun isearch-yank-x-selection ()
"Pull current X selection into search string."
(interactive)