aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasatake YAMATO2010-05-21 01:33:09 +0300
committerJuri Linkov2010-05-21 01:33:09 +0300
commit1ddb2ea0f3425c5eb53dff1a6703ebb73f41f622 (patch)
tree187369324f41ad9b322230b0c913a5555b17a3a5
parenta602033560060cf8b1a7ca2faed46257441047c2 (diff)
downloademacs-1ddb2ea0f3425c5eb53dff1a6703ebb73f41f622.tar.gz
emacs-1ddb2ea0f3425c5eb53dff1a6703ebb73f41f622.zip
* isearch.el (isearch-yank-word-or-char): Pull next subword
when `subword-mode' is activated. (Bug#6220)
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/isearch.el8
-rw-r--r--lisp/progmodes/subword.el2
3 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 15dc5d2aa9a..4735ee6000b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-12-15 Masatake YAMATO <yamato@redhat.com>
2
3 * isearch.el (isearch-yank-word-or-char): Pull next subword
4 when `subword-mode' is activated. (Bug#6220)
5
12010-05-20 Mark A. Hershberger <mah@everybody.org> 62010-05-20 Mark A. Hershberger <mah@everybody.org>
2 7
3 * isearch.el (isearch-update-post-hook): New hook. 8 * isearch.el (isearch-update-post-hook): New hook.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index c44238ede24..ea5836edc4d 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1540,14 +1540,18 @@ or it might return the position of the end of the line."
1540 (interactive "p") 1540 (interactive "p")
1541 (isearch-yank-internal (lambda () (forward-char arg) (point)))) 1541 (isearch-yank-internal (lambda () (forward-char arg) (point))))
1542 1542
1543(declare-function subword-forward "subword" (&optional arg))
1543(defun isearch-yank-word-or-char () 1544(defun isearch-yank-word-or-char ()
1544 "Pull next character or word from buffer into search string." 1545 "Pull next character, subword or word from buffer into search string.
1546Subword is used when `subword-mode' is activated. "
1545 (interactive) 1547 (interactive)
1546 (isearch-yank-internal 1548 (isearch-yank-internal
1547 (lambda () 1549 (lambda ()
1548 (if (or (= (char-syntax (or (char-after) 0)) ?w) 1550 (if (or (= (char-syntax (or (char-after) 0)) ?w)
1549 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) 1551 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
1550 (forward-word 1) 1552 (if (and (boundp 'subword-mode) subword-mode)
1553 (subword-forward 1)
1554 (forward-word 1))
1551 (forward-char 1)) (point)))) 1555 (forward-char 1)) (point))))
1552 1556
1553(defun isearch-yank-word () 1557(defun isearch-yank-word ()
diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
index 4081791ae2e..7df42c8b9a2 100644
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -76,7 +76,7 @@
76;; the old `c-forward-into-nomenclature' originally contributed by 76;; the old `c-forward-into-nomenclature' originally contributed by
77;; Terry_Glanfield dot Southern at rxuk dot xerox dot com. 77;; Terry_Glanfield dot Southern at rxuk dot xerox dot com.
78 78
79;; TODO: ispell-word and subword oriented C-w in isearch. 79;; TODO: ispell-word.
80 80
81;;; Code: 81;;; Code:
82 82