[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, 29 Apr 2022 09:51:09 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) |
>> It's possible to enable char-fold search only in Info mode,
>> but probably this should be left for user customization,
>> because this problem is not Info-specific: most likely the user
>> might want ` and ‘ to be treated equivalently pretty much everywhere.
>
> My thorough research shows that 99.7% of Emacs users don't see a ‘
> outside of *Help* and *info*, so doing something special there seems
> useful.
>
>> But still if the user want this only in Info, it's very easy to type
>> C-s M-s ' `list.
>
> That does more than just fold `' with ‘’, though.
So only folding `' with ‘’ is required? Then it's easy to do:
diff --git a/lisp/info.el b/lisp/info.el
index 8ca6c54979..656a3b0b11 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -41,7 +41,9 @@
;;; Code:
-(eval-when-compile (require 'cl-lib))
+(eval-when-compile
+ (require 'cl-lib)
+ (require 'subr-x))
(defgroup info nil
"Info subsystem."
@@ -2147,7 +2149,10 @@ Info-isearch-search
(funcall isearch-regexp-function string lax)
(word-search-regexp string lax))))
(isearch-regexp string)
- (t (regexp-quote string)))
+ (t (thread-last
+ (regexp-quote string)
+ (replace-regexp-in-string "`" "[`‘]")
+ (replace-regexp-in-string "'" "['’]"))))
bound noerror count
(unless isearch-forward 'backward)))
(point))
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Lars Ingebrigtsen, 2022/04/28
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Drew Adams, 2022/04/28
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Juri Linkov, 2022/04/28
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Lars Ingebrigtsen, 2022/04/28
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Drew Adams, 2022/04/28
- bug#24510: 25.1; Info: searching for ` does not find what looks like `,
Juri Linkov <=
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Lars Ingebrigtsen, 2022/04/29
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Drew Adams, 2022/04/29
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Juri Linkov, 2022/04/29
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Lars Ingebrigtsen, 2022/04/30
- bug#24510: 25.1; Info: searching for ` does not find what looks like `, Drew Adams, 2022/04/29
bug#24510: 25.1; Info: searching for ` does not find what looks like `, Drew Adams, 2022/04/28