From b7542b2a0a00adc8d216697db0b8afd8d568de00 Mon Sep 17 00:00:00 2001 From: Daniel Colascione Date: Thu, 22 Feb 2018 17:28:38 -0800 Subject: [PATCH] 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. --- lisp/isearch.el | 9 ++------- 1 file 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." (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, subword or word from buffer into search string. -Subword is used when `subword-mode' is activated. " + "Pull next character or word from buffer into search string." (interactive) (isearch-yank-internal (lambda () (if (or (= (char-syntax (or (char-after) 0)) ?w) (= (char-syntax (or (char-after (1+ (point))) 0)) ?w)) - (if (or (and (boundp 'subword-mode) subword-mode) - (and (boundp 'superword-mode) superword-mode)) - (subword-forward 1) - (forward-word 1)) + (forward-word 1) (forward-char 1)) (point)))) -- 2.39.2