]> git.eshelyaron.com Git - emacs.git/commitdiff
* isearch.el (isearch-yank-word-or-char): Pull next subword
authorMasatake YAMATO <yamato@redhat.com>
Thu, 20 May 2010 22:33:09 +0000 (01:33 +0300)
committerJuri Linkov <juri@jurta.org>
Thu, 20 May 2010 22:33:09 +0000 (01:33 +0300)
when `subword-mode' is activated.  (Bug#6220)

lisp/ChangeLog
lisp/isearch.el
lisp/progmodes/subword.el

index 15dc5d2aa9a9d3f8abe05181ea21990866b6043b..4735ee6000bdf93f88ae93e4d6493a5d350eb6e9 100644 (file)
@@ -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.
index c44238ede24d37be8377ffa8ec42b6e6fa13e947..ea5836edc4d8734e82d126fa1bd30b2954c1879f 100644 (file)
@@ -1540,14 +1540,18 @@ or it might return the position of the end of the line."
   (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 ()
index 4081791ae2e8474188ef2ad06e0d7742cd562fb4..7df42c8b9a2585c53babb639f72c534bc6e63a14 100644 (file)
@@ -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: