aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-06-02 22:50:57 -0700
committerPaul Eggert2015-06-02 22:52:44 -0700
commit8e06d22bb654c649da6f32bd235a84eb2f4d188d (patch)
tree5892c615c581c3905d01c5d27562627fd8c837c1
parentf2211e51b7bd5247dfc22ecde8e6c4be3821b6fb (diff)
downloademacs-8e06d22bb654c649da6f32bd235a84eb2f4d188d.tar.gz
emacs-8e06d22bb654c649da6f32bd235a84eb2f4d188d.zip
Support quotes 'like this' in info files
This is possible when 'makeinfo --disable-encoding' is used in Texinfo 5. * lisp/calc/calc-help.el (calc-describe-thing): * lisp/gnus/gnus-art.el (gnus-button-alist): * lisp/info.el (Info-find-index-name): * lisp/vc/ediff-help.el (ediff-help-for-quick-help): Also support quotes 'like this'. * lisp/calc/calc-help.el (calc-describe-thing): Simplify. * lisp/finder.el (finder-font-lock-keywords): Remove var that hasn't been used in years, instead of bothering to fix its quoting.
-rw-r--r--lisp/calc/calc-help.el34
-rw-r--r--lisp/finder.el4
-rw-r--r--lisp/gnus/gnus-art.el8
-rw-r--r--lisp/info.el4
-rw-r--r--lisp/vc/ediff-help.el82
5 files changed, 62 insertions, 70 deletions
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index aace2a95585..b2e7df1b718 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -364,25 +364,21 @@ C-w Describe how there is no warranty for Calc."
364 (error "Can't find `%s' in %s" thing where))) 364 (error "Can't find `%s' in %s" thing where)))
365 (let (Info-history) 365 (let (Info-history)
366 (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1)))) 366 (Info-goto-node (buffer-substring (match-beginning 1) (match-end 1))))
367 (or (let ((case-fold-search nil)) 367 (let* ((string-target (or target thing))
368 (or (re-search-forward 368 (quoted (format "['`‘]%s['’]" (regexp-quote string-target)))
369 (format "\\[[`‘]%s['’]\\]\\|([`‘]%s['’])\\|\\<The[ \n][`‘]%s['’]" 369 (bracketed (format "\\[%s\\]\\|(%s)\\|\\<The[ \n]%s"
370 (or target (regexp-quote thing)) 370 quoted quoted quoted)))
371 (or target (regexp-quote thing)) 371 (or (let ((case-fold-search nil))
372 (or target (regexp-quote thing))) nil t) 372 (or (re-search-forward bracketed nil t)
373 (and not-quoted 373 (and not-quoted
374 (let ((case-fold-search t)) 374 (let ((case-fold-search t))
375 (search-forward (or target thing) nil t))) 375 (search-forward string-target nil t)))
376 (search-forward (format "[`‘]%s['’]" (or target thing)) nil t) 376 (re-search-forward quoted nil t)
377 (search-forward (or target thing) nil t))) 377 (search-forward string-target nil t)))
378 (let ((case-fold-search t)) 378 (let ((case-fold-search t))
379 (or (re-search-forward 379 (or (re-search-forward bracketed nil t)
380 (format "\\[[`‘]%s['’]\\]\\|([`‘]%s['’])\\|\\<The[ \n][`‘]%s['’]" 380 (re-search-forward quoted nil t)
381 (or target (regexp-quote thing)) 381 (search-forward string-target nil t)))))
382 (or target (regexp-quote thing))
383 (or target (regexp-quote thing))) nil t)
384 (search-forward (format "[`‘]%s['’]" (or target thing)) nil t)
385 (search-forward (or target thing) nil t))))
386 (beginning-of-line) 382 (beginning-of-line)
387 (message "Found `%s' in %s" thing where))) 383 (message "Found `%s' in %s" thing where)))
388 384
diff --git a/lisp/finder.el b/lisp/finder.el
index 306f2e27d57..1ab59f175b8 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -114,10 +114,6 @@ Each element has the form (KEYWORD . DESCRIPTION).")
114 st) 114 st)
115 "Syntax table used while in `finder-mode'.") 115 "Syntax table used while in `finder-mode'.")
116 116
117(defvar finder-font-lock-keywords
118 '(("[`‘]\\([^'`‘’]+\\)['’]" 1 font-lock-constant-face prepend))
119 "Font-lock keywords for Finder mode.")
120
121(defvar finder-headmark nil 117(defvar finder-headmark nil
122 "Internal Finder mode variable, local in Finder buffer.") 118 "Internal Finder mode variable, local in Finder buffer.")
123 119
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 0ac9fb5b4de..d83eaddf165 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -7827,11 +7827,11 @@ positives are possible."
7827 ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]" 7827 ("/\\([a-z][-a-z0-9]+\\.el\\)\\>[^.?]"
7828 ;; Exclude [.?] for URLs in gmane.emacs.cvs 7828 ;; Exclude [.?] for URLs in gmane.emacs.cvs
7829 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) 7829 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
7830 ("[`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]" 7830 ("['`‘]\\([a-z][-a-z0-9]+\\.el\\)['’]"
7831 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1) 7831 1 (>= gnus-button-emacs-level 8) gnus-button-handle-library 1)
7832 ("[`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]" 7832 ("['`‘]\\([a-z][a-z0-9]+-[a-z0-9]+-[-a-z0-9]*[a-z]\\|\\(gnus\\|message\\)-[-a-z]+\\)['’]"
7833 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1) 7833 0 (>= gnus-button-emacs-level 8) gnus-button-handle-symbol 1)
7834 ("[`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]" 7834 ("['`‘]\\([a-z][a-z0-9]+-[a-z]+\\)['’]"
7835 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1) 7835 0 (>= gnus-button-emacs-level 9) gnus-button-handle-symbol 1)
7836 ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)" 7836 ("(setq[ \t\n]+\\([a-z][a-z0-9]+-[-a-z0-9]+\\)[ \t\n]+.+)"
7837 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1) 7837 1 (>= gnus-button-emacs-level 7) gnus-button-handle-describe-variable 1)
@@ -7841,7 +7841,7 @@ positives are possible."
7841 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2) 7841 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-function 2)
7842 ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>" 7842 ("\\b\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+v[ \t\n]+\\([^ \t\n]+\\)[ \t\n]+RET\\>"
7843 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2) 7843 0 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-variable 2)
7844 ("[`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^'’]+\\)\\)['’]" 7844 ("['`‘]\\(\\(C-h\\|<?[Ff]1>?\\)[ \t\n]+k[ \t\n]+\\([^'’]+\\)\\)['’]"
7845 ;; Unlike the other regexps we really have to require quoting 7845 ;; Unlike the other regexps we really have to require quoting
7846 ;; here to determine where it ends. 7846 ;; here to determine where it ends.
7847 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3) 7847 1 (>= gnus-button-emacs-level 1) gnus-button-handle-describe-key 3)
diff --git a/lisp/info.el b/lisp/info.el
index 80428e700a0..59ce465f5aa 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -3378,10 +3378,10 @@ Give an empty topic name to go to the Index node itself."
3378 (re-search-forward (format 3378 (re-search-forward (format
3379 "[a-zA-Z]+: [a-zA-Z0-9_ *&]+ %s\\( \\|$\\)" 3379 "[a-zA-Z]+: [a-zA-Z0-9_ *&]+ %s\\( \\|$\\)"
3380 (regexp-quote name)) nil t) 3380 (regexp-quote name)) nil t)
3381 (search-forward (format "[`‘]%s['’]" name) nil t) 3381 (search-forward (format "['`‘]%s['’]" name) nil t)
3382 (and (string-match "\\`.*\\( (.*)\\)\\'" name) 3382 (and (string-match "\\`.*\\( (.*)\\)\\'" name)
3383 (search-forward 3383 (search-forward
3384 (format "[`‘]%s['’]" (substring name 0 (match-beginning 1))) 3384 (format "['`‘]%s['’]" (substring name 0 (match-beginning 1)))
3385 nil t)) 3385 nil t))
3386 (search-forward name nil t) 3386 (search-forward name nil t)
3387 ;; Try again without the " <1>" makeinfo can append 3387 ;; Try again without the " <1>" makeinfo can append
diff --git a/lisp/vc/ediff-help.el b/lisp/vc/ediff-help.el
index 67acc6663a3..3d46869b252 100644
--- a/lisp/vc/ediff-help.el
+++ b/lisp/vc/ediff-help.el
@@ -195,47 +195,47 @@ the value of this variable and the variables `ediff-help-message-*' in
195 (ediff-documentation "Quick Help Commands") 195 (ediff-documentation "Quick Help Commands")
196 196
197 (let (case-fold-search) 197 (let (case-fold-search)
198 (cond ((string= cmd "?") (re-search-forward "^[`‘]\\?['’]")) 198 (cond ((string= cmd "?") (re-search-forward "^['`‘]\\?['’]"))
199 ((string= cmd "G") (re-search-forward "^[`‘]G['’]")) 199 ((string= cmd "G") (re-search-forward "^['`‘]G['’]"))
200 ((string= cmd "E") (re-search-forward "^[`‘]E['’]")) 200 ((string= cmd "E") (re-search-forward "^['`‘]E['’]"))
201 ((string= cmd "wd") (re-search-forward "^[`‘]wd['’]")) 201 ((string= cmd "wd") (re-search-forward "^['`‘]wd['’]"))
202 ((string= cmd "wx") (re-search-forward "^[`‘]wa['’]")) 202 ((string= cmd "wx") (re-search-forward "^['`‘]wa['’]"))
203 ((string= cmd "a/b") (re-search-forward "^[`‘]a['’]")) 203 ((string= cmd "a/b") (re-search-forward "^['`‘]a['’]"))
204 ((string= cmd "x") (re-search-forward "^[`‘]a['’]")) 204 ((string= cmd "x") (re-search-forward "^['`‘]a['’]"))
205 ((string= cmd "xy") (re-search-forward "^[`‘]ab['’]")) 205 ((string= cmd "xy") (re-search-forward "^['`‘]ab['’]"))
206 ((string= cmd "p,DEL") (re-search-forward "^[`‘]p['’]")) 206 ((string= cmd "p,DEL") (re-search-forward "^['`‘]p['’]"))
207 ((string= cmd "n,SPC") (re-search-forward "^[`‘]n['’]")) 207 ((string= cmd "n,SPC") (re-search-forward "^['`‘]n['’]"))
208 ((string= cmd "j") (re-search-forward "^[`‘]j['’]")) 208 ((string= cmd "j") (re-search-forward "^['`‘]j['’]"))
209 ((string= cmd "gx") (re-search-forward "^[`‘]ga['’]")) 209 ((string= cmd "gx") (re-search-forward "^['`‘]ga['’]"))
210 ((string= cmd "!") (re-search-forward "^[`‘]!['’]")) 210 ((string= cmd "!") (re-search-forward "^['`‘]!['’]"))
211 ((string= cmd "*") (re-search-forward "^[`‘]\\*['’]")) 211 ((string= cmd "*") (re-search-forward "^['`‘]\\*['’]"))
212 ((string= cmd "m") (re-search-forward "^[`‘]m['’]")) 212 ((string= cmd "m") (re-search-forward "^['`‘]m['’]"))
213 ((string= cmd "|") (re-search-forward "^[`‘]|['’]")) 213 ((string= cmd "|") (re-search-forward "^['`‘]|['’]"))
214 ((string= cmd "@") (re-search-forward "^[`‘]@['’]")) 214 ((string= cmd "@") (re-search-forward "^['`‘]@['’]"))
215 ((string= cmd "h") (re-search-forward "^[`‘]h['’]")) 215 ((string= cmd "h") (re-search-forward "^['`‘]h['’]"))
216 ((string= cmd "r") (re-search-forward "^[`‘]r['’]")) 216 ((string= cmd "r") (re-search-forward "^['`‘]r['’]"))
217 ((string= cmd "rx") (re-search-forward "^[`‘]ra['’]")) 217 ((string= cmd "rx") (re-search-forward "^['`‘]ra['’]"))
218 ((string= cmd "##") (re-search-forward "^[`‘]##['’]")) 218 ((string= cmd "##") (re-search-forward "^['`‘]##['’]"))
219 ((string= cmd "#c") (re-search-forward "^[`‘]#c['’]")) 219 ((string= cmd "#c") (re-search-forward "^['`‘]#c['’]"))
220 ((string= cmd "#f/#h") (re-search-forward "^[`‘]#f['’]")) 220 ((string= cmd "#f/#h") (re-search-forward "^['`‘]#f['’]"))
221 ((string= cmd "X") (re-search-forward "^[`‘]A['’]")) 221 ((string= cmd "X") (re-search-forward "^['`‘]A['’]"))
222 ((string= cmd "v/V") (re-search-forward "^[`‘]v['’]")) 222 ((string= cmd "v/V") (re-search-forward "^['`‘]v['’]"))
223 ((string= cmd "</>") (re-search-forward "^[`‘]<['’]")) 223 ((string= cmd "</>") (re-search-forward "^['`‘]<['’]"))
224 ((string= cmd "~") (re-search-forward "^[`‘]~['’]")) 224 ((string= cmd "~") (re-search-forward "^['`‘]~['’]"))
225 ((string= cmd "i") (re-search-forward "^[`‘]i['’]")) 225 ((string= cmd "i") (re-search-forward "^['`‘]i['’]"))
226 ((string= cmd "D") (re-search-forward "^[`‘]D['’]")) 226 ((string= cmd "D") (re-search-forward "^['`‘]D['’]"))
227 ((string= cmd "R") (re-search-forward "^[`‘]R['’]")) 227 ((string= cmd "R") (re-search-forward "^['`‘]R['’]"))
228 ((string= cmd "M") (re-search-forward "^[`‘]M['’]")) 228 ((string= cmd "M") (re-search-forward "^['`‘]M['’]"))
229 ((string= cmd "z/q") (re-search-forward "^[`‘]z['’]")) 229 ((string= cmd "z/q") (re-search-forward "^['`‘]z['’]"))
230 ((string= cmd "%") (re-search-forward "^[`‘]%['’]")) 230 ((string= cmd "%") (re-search-forward "^['`‘]%['’]"))
231 ((string= cmd "C-l") (re-search-forward "^[`‘]C-l['’]")) 231 ((string= cmd "C-l") (re-search-forward "^['`‘]C-l['’]"))
232 ((string= cmd "$$") (re-search-forward "^[`‘]\\$\\$['’]")) 232 ((string= cmd "$$") (re-search-forward "^['`‘]\\$\\$['’]"))
233 ((string= cmd "$*") (re-search-forward "^[`‘]\\$\\*['’]")) 233 ((string= cmd "$*") (re-search-forward "^['`‘]\\$\\*['’]"))
234 ((string= cmd "/") (re-search-forward "^[`‘]/['’]")) 234 ((string= cmd "/") (re-search-forward "^['`‘]/['’]"))
235 ((string= cmd "&") (re-search-forward "^[`‘]&['’]")) 235 ((string= cmd "&") (re-search-forward "^['`‘]&['’]"))
236 ((string= cmd "s") (re-search-forward "^[`‘]s['’]")) 236 ((string= cmd "s") (re-search-forward "^['`‘]s['’]"))
237 ((string= cmd "+") (re-search-forward "^[`‘]\\+['’]")) 237 ((string= cmd "+") (re-search-forward "^['`‘]\\+['’]"))
238 ((string= cmd "=") (re-search-forward "^[`‘]=['’]")) 238 ((string= cmd "=") (re-search-forward "^['`‘]=['’]"))
239 (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer"))) 239 (t (error "Undocumented command! Type `G' in Ediff Control Panel to drop a note to the Ediff maintainer")))
240 ) ; let case-fold-search 240 ) ; let case-fold-search
241 )) 241 ))