emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/isearch.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el
Date: Mon, 10 Dec 2001 15:45:27 -0500

Index: emacs/lisp/isearch.el
diff -c emacs/lisp/isearch.el:1.203 emacs/lisp/isearch.el:1.204
*** emacs/lisp/isearch.el:1.203 Mon Dec  3 01:13:55 2001
--- emacs/lisp/isearch.el       Mon Dec 10 15:45:27 2001
***************
*** 291,297 ****
      (define-key map " " 'isearch-whitespace-chars)
      (define-key map [?\S-\ ] 'isearch-whitespace-chars)
      
!     (define-key map "\C-w" 'isearch-yank-word)
      (define-key map "\C-y" 'isearch-yank-line)
  
      ;; Define keys for regexp chars * ? |.
--- 291,297 ----
      (define-key map " " 'isearch-whitespace-chars)
      (define-key map [?\S-\ ] 'isearch-whitespace-chars)
      
!     (define-key map "\C-w" 'isearch-yank-word-or-char)
      (define-key map "\C-y" 'isearch-yank-line)
  
      ;; Define keys for regexp chars * ? |.
***************
*** 1095,1100 ****
--- 1095,1109 ----
    "Pull next letter from buffer into search string."
    (interactive)
    (isearch-yank-internal (lambda () (forward-char 1) (point))))
+ 
+ (defun isearch-yank-word-or-char ()
+   "Pull next character or word from buffer into search string."
+   (interactive)
+   (isearch-yank-internal (lambda () 
+                          (if (or (= (char-syntax (or (char-after) 0)) ?w)
+                                  (= (char-syntax (or (char-after (1+ 
(point))) 0)) ?w))
+                              (forward-word 1)
+                            (forward-char 1)) (point))))
  
  (defun isearch-yank-word ()
    "Pull next word from buffer into search string."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]