aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Colascione2018-02-22 17:28:38 -0800
committerDaniel Colascione2018-02-22 17:50:39 -0800
commitb7542b2a0a00adc8d216697db0b8afd8d568de00 (patch)
treec1d328a250a84b1063d3778f535ddfa9c8849dee
parentea1604537ae7ea69c8e1bad9c63024d6727e33fd (diff)
downloademacs-b7542b2a0a00adc8d216697db0b8afd8d568de00.tar.gz
emacs-b7542b2a0a00adc8d216697db0b8afd8d568de00.zip
Remove unnecessary explicit subword-mode use from isearch
* lisp/isearch.el (isearch-yank-word-or-char): Remove explicit use of subword-mode. These days, subword-mode use is an automatic side effect of forward-word.
-rw-r--r--lisp/isearch.el9
1 files changed, 2 insertions, 7 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 41350c2d303..1835469bb2c 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2089,19 +2089,14 @@ If optional ARG is non-nil, pull in the next ARG characters."
2089 (interactive "p") 2089 (interactive "p")
2090 (isearch-yank-internal (lambda () (forward-char arg) (point)))) 2090 (isearch-yank-internal (lambda () (forward-char arg) (point))))
2091 2091
2092(declare-function subword-forward "subword" (&optional arg))
2093(defun isearch-yank-word-or-char () 2092(defun isearch-yank-word-or-char ()
2094 "Pull next character, subword or word from buffer into search string. 2093 "Pull next character or word from buffer into search string."
2095Subword is used when `subword-mode' is activated. "
2096 (interactive) 2094 (interactive)
2097 (isearch-yank-internal 2095 (isearch-yank-internal
2098 (lambda () 2096 (lambda ()
2099 (if (or (= (char-syntax (or (char-after) 0)) ?w) 2097 (if (or (= (char-syntax (or (char-after) 0)) ?w)
2100 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) 2098 (= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
2101 (if (or (and (boundp 'subword-mode) subword-mode) 2099 (forward-word 1)
2102 (and (boundp 'superword-mode) superword-mode))
2103 (subword-forward 1)
2104 (forward-word 1))
2105 (forward-char 1)) 2100 (forward-char 1))
2106 (point)))) 2101 (point))))
2107 2102