Commit 1ddb2ea0 authored by Masatake YAMATO's avatar Masatake YAMATO Committed by Juri Linkov
Browse files

* isearch.el (isearch-yank-word-or-char): Pull next subword

when `subword-mode' is activated.  (Bug#6220)
parent a6020335
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.
......
......@@ -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 ()
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment