1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Handle curved quotes in info files

* lisp/calc/calc-help.el (calc-describe-thing):
* lisp/info.el (Info-find-index-name)
(Info-try-follow-nearest-node, Info-fontify-node):
* lisp/vc/ediff-help.el (ediff-help-for-quick-help):
In info files, process quotes ‘like this’ the same way we process
quotes `like this'.  This catches a few places we missed earlier.
This commit is contained in:
Paul Eggert 2015-05-26 12:29:38 -07:00
parent d86ef9fc4a
commit 5e9756e4c6
3 changed files with 57 additions and 55 deletions

View file

@ -365,21 +365,23 @@ C-w Describe how there is no warranty for Calc."
(let (Info-history)
(Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
(or (let ((case-fold-search nil))
(or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
(or target (regexp-quote thing))
(or target (regexp-quote thing))
(or target (regexp-quote thing))) nil t)
(or (re-search-forward
(format "\\[[`]%s[']\\]\\|([`]%s['])\\|\\<The[ \n][`]%s[']"
(or target (regexp-quote thing))
(or target (regexp-quote thing))
(or target (regexp-quote thing))) nil t)
(and not-quoted
(let ((case-fold-search t))
(search-forward (or target thing) nil t)))
(search-forward (format "`%s'" (or target thing)) nil t)
(search-forward (format "[`]%s[']" (or target thing)) nil t)
(search-forward (or target thing) nil t)))
(let ((case-fold-search t))
(or (re-search-forward (format "\\[`%s'\\]\\|(`%s')\\|\\<The[ \n]`%s'"
(or target (regexp-quote thing))
(or target (regexp-quote thing))
(or target (regexp-quote thing))) nil t)
(search-forward (format "`%s'" (or target thing)) nil t)
(or (re-search-forward
(format "\\[[`]%s[']\\]\\|([`]%s['])\\|\\<The[ \n][`]%s[']"
(or target (regexp-quote thing))
(or target (regexp-quote thing))
(or target (regexp-quote thing))) nil t)
(search-forward (format "[`]%s[']" (or target thing)) nil t)
(search-forward (or target thing) nil t))))
(beginning-of-line)
(message "Found `%s' in %s" thing where)))