bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Noam Postavsky
Subject: bug#36871: 26.1; I-search-toggle-csse-fold
Date: Wed, 31 Jul 2019 20:05:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux)

retitle 36871 isearch-toggle-case-fold outside of isearch causes unexpected 
fontification
tags 36871 = confirmed
severity 36871 minor
quit

"a_subscriber" <a_subscriber@mail.ru> writes:

> 1. Start emacs -Q
> 2. Input some text (see step1.jpg)
> 3. M-x isearch-toggle-case-fold   (see step2.jpg)
> 4. C-s (isearch) HELLO  (see step3.jpg)
> 5. C-g
> 6. M-x isearch-toggle-case-fold
> 7. and see result on step4.jpg

Ah, it's not the region, it's highlighting from a not-quite-activated
isearch.  The problem is that isearch-toggle-case-fold wasn't really
expected to be called outside of isearch.  I think throwing an error in
this case makes sense (I tried also just avoiding the call to
isearch-update when isearch-mode is nil which does avoid the OP's
problem, but the actual toggling part doesn't work).

--- i/lisp/isearch.el
+++ w/lisp/isearch.el
@@ -1971,6 +1971,8 @@ isearch-define-mode-toggle
          ,(format "Toggle %s searching on or off.%s" mode
                   (if docstring (concat "\n" docstring) ""))
          (interactive)
+         (unless isearch-mode
+           (user-error "isearch not active"))
          ,@(when function
              `((setq isearch-regexp-function
                      (unless (eq isearch-regexp-function #',function)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]