[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master cbd59395bd: Add char-folding of double quotes in isearch-fold-quo
From: |
Juri Linkov |
Subject: |
master cbd59395bd: Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510) |
Date: |
Fri, 6 May 2022 14:07:15 -0400 (EDT) |
branch: master
commit cbd59395bdccd924ebe39430f32d2d72546a841a
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
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.
---
lisp/isearch.el | 4 ++--
test/lisp/subr-tests.el | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/isearch.el b/lisp/isearch.el
index b404efd42a..96168f94bd 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 6bcac2a5eb..8f3ee66e00 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))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master cbd59395bd: Add char-folding of double quotes in isearch-fold-quotes-mode (bug#24510),
Juri Linkov <=