Subject: Re: bug#36871: 26.1; I-search-toggle-csse-fold

From: Juri Linkov <[email-masked]>
Date: Mon, 05 Aug 2019 23:39:58 +0300

tags 36871 + fixed
close 36871 27.0.50
quit

>>> Shouldn't toggling commands activate isearch-mode?
>>
>> I meant the same guarding like in isearch-yank-kill:
>
>> @@ -1971,6 +1971,7 @@ isearch-define-mode-toggle
>>           ,(format "Toggle %s searching on or off.%s" mode
>>                    (if docstring (concat "\n" docstring) ""))
>>           (interactive)
>> +         (unless isearch-mode (isearch-mode t))
>
> +1 from me, I like this better than throwing an error.

So I pushed to master.  Now an additional interesting question:
it seems that now some global isearch-activating commands are
obsolete, e.g. currently ‘M-s w’ runs the command isearch-forward-word.
Now it could be rebound to ‘isearch-toggle-word’, i.e.

the current

  (define-key search-map "w" 'isearch-forward-word)

could be replaced with

  (define-key search-map "w" 'isearch-toggle-word)