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

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

bug#24510: 25.1; Info: searching for ` does not find what looks like `


From: Juri Linkov
Subject: bug#24510: 25.1; Info: searching for ` does not find what looks like `
Date: Fri, 06 May 2022 18:32:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>> +  (unless search-default-mode
>> +    (setq-local search-default-mode
>> +                (lambda (string &optional _lax)
>> +                  (thread-last
>> +                    (regexp-quote string)
>> +                    (replace-regexp-in-string "`" "[`‘]")
>> +                    (replace-regexp-in-string "'" "['’]")))))
>
> Thanks; I separated this out into a tiny minor mode, and switched that
> on in help-mode and info-mode instead.

I noticed that Info also contains double quotation marks,
so these could be added as well:

                        (replace-regexp-in-string "\"" "[\"“”]")

Also this improves tests:

diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el
index 6bcac2a5eb..8f3ee66e00 100644
--- a/test/lisp/subr-tests.el
+++ b/test/lisp/subr-tests.el
@@ -1065,6 +1065,9 @@ test-local-set-state
     (let ((state (buffer-local-set-state global 10
                                          local 20
                                          unexist 30)))
+      (should (= global 10))
+      (should (= local 20))
+      (should (= unexist 30))
       (buffer-local-restore-state state)
       (should (= global 1))
       (should (= local 2))





reply via email to

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