comparison lisp/isearch.el @ 42196:36ab766521c0

(isearch-forward, isearch-edit-string): Make doc strings mention keybinding for `isearch-yank-word-or-char', rather than `isearch-yank-word', since the former is bound now and the latter is not. (isearch-yank-word-or-char): Fix formatting.
author Karl Fogel <kfogel@red-bean.com>
date Wed, 19 Dec 2001 22:48:02 +0000
parents a2dac1893064
children 67d86dad5454
comparison
equal deleted inserted replaced
42195:62319d759514 42196:36ab766521c0
441 Type \\[isearch-delete-char] to cancel characters from end of search string. 441 Type \\[isearch-delete-char] to cancel characters from end of search string.
442 Type \\[isearch-exit] to exit, leaving point at location found. 442 Type \\[isearch-exit] to exit, leaving point at location found.
443 Type LFD (C-j) to match end of line. 443 Type LFD (C-j) to match end of line.
444 Type \\[isearch-repeat-forward] to search again forward,\ 444 Type \\[isearch-repeat-forward] to search again forward,\
445 \\[isearch-repeat-backward] to search again backward. 445 \\[isearch-repeat-backward] to search again backward.
446 Type \\[isearch-yank-word] to yank word from buffer onto end of search\ 446 Type \\[isearch-yank-word-or-char] to yank word from buffer onto end of search\
447 string and search for it. 447 string and search for it.
448 Type \\[isearch-yank-line] to yank rest of line onto end of search string\ 448 Type \\[isearch-yank-line] to yank rest of line onto end of search string\
449 and search for it. 449 and search for it.
450 Type \\[isearch-yank-kill] to yank last killed text onto end of search string\ 450 Type \\[isearch-yank-kill] to yank last killed text onto end of search string\
451 and search for it. 451 and search for it.
777 \\[isearch-reverse-exit-minibuffer] to resume isearching backward. 777 \\[isearch-reverse-exit-minibuffer] to resume isearching backward.
778 \\[isearch-ring-advance-edit] to replace the search string with the next item in the search ring. 778 \\[isearch-ring-advance-edit] to replace the search string with the next item in the search ring.
779 \\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring. 779 \\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring.
780 \\[isearch-complete-edit] to complete the search string using the search ring. 780 \\[isearch-complete-edit] to complete the search string using the search ring.
781 \\<isearch-mode-map> 781 \\<isearch-mode-map>
782 If first char entered is \\[isearch-yank-word], then do word search instead." 782 If first char entered is \\[isearch-yank-word-or-char], then do word search instead."
783 783
784 ;; This code is very hairy for several reasons, explained in the code. 784 ;; This code is very hairy for several reasons, explained in the code.
785 ;; Mainly, isearch-mode must be terminated while editing and then restarted. 785 ;; Mainly, isearch-mode must be terminated while editing and then restarted.
786 ;; If there were a way to catch any change of buffer from the minibuffer, 786 ;; If there were a way to catch any change of buffer from the minibuffer,
787 ;; this could be simplified greatly. 787 ;; this could be simplified greatly.
1109 (isearch-yank-internal (lambda () (forward-char 1) (point)))) 1109 (isearch-yank-internal (lambda () (forward-char 1) (point))))
1110 1110
1111 (defun isearch-yank-word-or-char () 1111 (defun isearch-yank-word-or-char ()
1112 "Pull next character or word from buffer into search string." 1112 "Pull next character or word from buffer into search string."
1113 (interactive) 1113 (interactive)
1114 (isearch-yank-internal (lambda () 1114 (isearch-yank-internal
1115 (if (or (= (char-syntax (or (char-after) 0)) ?w) 1115 (lambda ()
1116 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) 1116 (if (or (= (char-syntax (or (char-after) 0)) ?w)
1117 (forward-word 1) 1117 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
1118 (forward-char 1)) (point)))) 1118 (forward-word 1)
1119 (forward-char 1)) (point))))
1119 1120
1120 (defun isearch-yank-word () 1121 (defun isearch-yank-word ()
1121 "Pull next word from buffer into search string." 1122 "Pull next word from buffer into search string."
1122 (interactive) 1123 (interactive)
1123 (isearch-yank-internal (lambda () (forward-word 1) (point)))) 1124 (isearch-yank-internal (lambda () (forward-word 1) (point))))