This is a small change to allow yanking buffer characters into the search
string, analogous to the other isearch-yank-* functions. I'm currently
working on isearch-yank-pixel ;->
This may be too trivial to include, but I find it useful, especially when
wanting to yank what is part of a word as defined by the mode's syntax
table.
The default binding is C-'.
regards,
--
/ buzzword, n:
davep (|) The fly in the ointment of computer literacy.
/
$
--- isearch-mode.el.ORIG 2005-02-04 10:08:26.055452885 -0500
+++ isearch-mode.el 2005-02-04 10:08:38.616638394 -0500
@@ -272,6 +272,7 @@
;(define-key map " " 'isearch-whitespace-chars)
(define-key map "\M- " 'isearch-whitespace-chars)
+ (define-key map [(control \')] 'isearch-yank-char)
(define-key map "\C-w" 'isearch-yank-word)
(define-key map "\C-y" 'isearch-yank-line)
(define-key map "\M-y" 'isearch-yank-kill)
@@ -419,6 +420,8 @@
Type LFD (C-j) to match end of line.
Type \\[isearch-repeat-forward] to search again forward,\
\\[isearch-repeat-backward] to search again backward.
+Type \\[isearch-yank-char] to yank char from buffer onto end of search\
+ string and search for it.
Type \\[isearch-yank-word] to yank word from buffer onto end of search\
string and search for it.
Type \\[isearch-yank-line] to yank rest of line onto end of search string\
@@ -1020,6 +1023,11 @@
isearch-yank-flag t))
(isearch-search-and-update))
+(defun isearch-yank-char ()
+ "Pull next char from buffer into search string."
+ (interactive)
+ (isearch-yank 'forward-char))
+
(defun isearch-yank-word ()
"Pull next word from buffer into search string."
(interactive)
@@ -1495,6 +1503,7 @@
(put 'isearch-exit 'isearch-command t)
(put 'isearch-printing-char 'isearch-command t)
(put 'isearch-printing-char 'isearch-command t)
+(put 'isearch-yank-char 'isearch-command t)
(put 'isearch-yank-word 'isearch-command t)
(put 'isearch-yank-line 'isearch-command t)
(put 'isearch-yank-kill 'isearch-command t)
2005-02-08 David A. Panariti <davep.xemacs(a)meduseld.net>
Add support for yanking buffer characters into search string:
* isearch-mode.el: (isearch-mode-map): Add default binding (C-').
* isearch-mode.el: (isearch-forward): Add command description to
help string.
* isearch-mode.el: (isearch-yank-char): New. Implements the
character yanking.
* isearch-mode.el: (put 'isearch-yank-char 'isearch-command t)
Put required property on command so it doesn't cause an exit from
isearch-mode.