summaryrefslogtreecommitdiff
path: root/lisp/help-fns.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-06-13 09:35:10 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-06-13 09:35:46 -0700
commit8afef016e2bc413c7a4913554ea6ed2c55474de6 (patch)
treedddc5194079a7a04941838ef9ab0626cf30daf90 /lisp/help-fns.el
parenteb92f89c2125aaf8fdf93cdd85ab46ae278dd950 (diff)
downloademacs-8afef016e2bc413c7a4913554ea6ed2c55474de6.tar.gz
Better fix for documenting `X as "`X"
Fix suggested by Stefan Monnier. * lisp/help-fns.el (help-fns--signature): Insert "`X", not "(\` X)", when documenting `X (Bug#20759). * lisp/help.el (help-split-fundoc, help--make-usage-docstring): Don't treat `X specially, as help-fns--signature now handles this.
Diffstat (limited to 'lisp/help-fns.el')
-rw-r--r--lisp/help-fns.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 931e8af4df0..80f30e88fa4 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -383,9 +383,13 @@ suitable file is found, return nil."
(help--docstring-quote
(format-kbd-macro real-def))))
(t "[Missing arglist. Please make a bug report.]")))
+ ;; Insert "`X", not "(\` X)", when documenting `X.
+ (use1 (replace-regexp-in-string
+ "\\`(\\\\=\\\\\\\\=` \\([^\n ]*\\))\\'"
+ "\\\\=`\\1" use t))
(high (if raw
- (cons use doc)
- (help-highlight-arguments (substitute-command-keys use)
+ (cons use1 doc)
+ (help-highlight-arguments (substitute-command-keys use1)
(substitute-command-keys doc)))))
(let ((fill-begin (point))
(high-usage (car high))