changeset 108720:762db3570fa8

* isearch.el (isearch-yank-word-or-char): Pull next subword when `subword-mode' is activated. (Bug#6220)
author Juri Linkov <juri@jurta.org>
date Fri, 21 May 2010 01:33:09 +0300
parents bd94528648ad
children c465f7b92264
files lisp/ChangeLog lisp/isearch.el lisp/progmodes/subword.el
diffstat 3 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri May 21 01:16:19 2010 +0300
+++ b/lisp/ChangeLog	Fri May 21 01:33:09 2010 +0300
@@ -1,3 +1,8 @@
+2009-12-15  Masatake YAMATO  <yamato@redhat.com>
+
+	* isearch.el (isearch-yank-word-or-char): Pull next subword
+	when `subword-mode' is activated.  (Bug#6220)
+
 2010-05-20  Mark A. Hershberger  <mah@everybody.org>
 
 	* isearch.el (isearch-update-post-hook): New hook.
--- a/lisp/isearch.el	Fri May 21 01:16:19 2010 +0300
+++ b/lisp/isearch.el	Fri May 21 01:33:09 2010 +0300
@@ -1540,14 +1540,18 @@
   (interactive "p")
   (isearch-yank-internal (lambda () (forward-char arg) (point))))
 
+(declare-function subword-forward "subword" (&optional arg))
 (defun isearch-yank-word-or-char ()
-  "Pull next character or word from buffer into search string."
+  "Pull next character, subword or word from buffer into search string.
+Subword is used when `subword-mode' is activated. "
   (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)
+	 (if (and (boundp 'subword-mode) subword-mode)
+	     (subword-forward 1)
+	   (forward-word 1))
        (forward-char 1)) (point))))
 
 (defun isearch-yank-word ()
--- a/lisp/progmodes/subword.el	Fri May 21 01:16:19 2010 +0300
+++ b/lisp/progmodes/subword.el	Fri May 21 01:33:09 2010 +0300
@@ -76,7 +76,7 @@
 ;; the old `c-forward-into-nomenclature' originally contributed by
 ;; Terry_Glanfield dot Southern at rxuk dot xerox dot com.
 
-;; TODO: ispell-word and subword oriented C-w in isearch.
+;; TODO: ispell-word.
 
 ;;; Code: