]> git.eshelyaron.com Git - emacs.git/commitdiff
Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510)
authorJuri Linkov <juri@linkov.net>
Fri, 6 May 2022 18:06:47 +0000 (21:06 +0300)
committerJuri Linkov <juri@linkov.net>
Fri, 6 May 2022 18:06:47 +0000 (21:06 +0300)
* lisp/isearch.el (isearch-fold-quotes-mode): Add char-folding of
double quotation marks.

* test/lisp/subr-tests.el (test-local-set-state): Test values
after setting state.

lisp/isearch.el
test/lisp/subr-tests.el

index b404efd42a1322ee422380f523c4a842a1746c8d..96168f94bd5b7076e2dd75401e204d8991781537 100644 (file)
@@ -4467,7 +4467,6 @@ CASE-FOLD non-nil means the search was case-insensitive."
   (isearch-update))
 
 \f
-
 (defvar isearch-fold-quotes-mode--state)
 (define-minor-mode isearch-fold-quotes-mode
   "Minor mode to aid searching for \\=` characters in help modes."
@@ -4480,7 +4479,8 @@ CASE-FOLD non-nil means the search was case-insensitive."
                      (thread-last
                        (regexp-quote string)
                        (replace-regexp-in-string "`" "[`‘]")
-                       (replace-regexp-in-string "'" "['’]")))))
+                       (replace-regexp-in-string "'" "['’]")
+                       (replace-regexp-in-string "\"" "[\"“”]")))))
     (buffer-local-restore-state isearch-fold-quotes-mode--state)))
 
 (provide 'isearch)
index 6bcac2a5eba55169e9d7767eb851558e7acd2367..8f3ee66e00d53843e52d8100d00659dbe83cfd5b 100644 (file)
@@ -1065,6 +1065,9 @@ final or penultimate step during initialization."))
     (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))