From: Juri Linkov Date: Fri, 6 May 2022 18:06:47 +0000 (+0300) Subject: Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510) X-Git-Tag: emacs-29.0.90~1931^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cbd59395bdccd924ebe39430f32d2d72546a841a;p=emacs.git Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510) * 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. --- diff --git a/lisp/isearch.el b/lisp/isearch.el index b404efd42a1..96168f94bd5 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -4467,7 +4467,6 @@ CASE-FOLD non-nil means the search was case-insensitive." (isearch-update)) - (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) diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 6bcac2a5eba..8f3ee66e00d 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -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))