1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-21 18:23:59 +00:00

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.
This commit is contained in:
Juri Linkov 2022-05-06 21:06:47 +03:00
parent c57a6644ef
commit cbd59395bd
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View 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))