Fix docstring quoting problems with ‘ '’

Problem reported by Artur Malabarba in:
http://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01513.html
Most of these fixes are to documentation; many involve fixing
longstanding quoting glitches that are independent of the
recent substitute-command-keys changes.  The changes to code are:
* lisp/cedet/mode-local.el (mode-local-augment-function-help)
(describe-mode-local-overload):
Substitute docstrings before displaying them.
* lisp/emacs-lisp/cl-macs.el (cl--transform-lambda):
Quote the generated docstring for later substitution.
This commit is contained in:
Paul Eggert 2015-11-17 15:28:50 -08:00
parent abf673af29
commit ac16149ba4
142 changed files with 432 additions and 430 deletions

View file

@ -1629,7 +1629,7 @@ COMPILE argument of `ad-activate' was supplied as nil."
Only proper subtrees are considered, for example, if TREE is (1 (2 (3)) 4)
then the subtrees will be 1 (2 (3)) 2 (3) 3 4, dotted structures are
allowed too. Once a qualifying subtree has been found its subtrees will
not be considered anymore. (ad-substitute-tree 'atom 'identity tree)
not be considered anymore. (ad-substitute-tree \\='atom \\='identity tree)
generates a copy of TREE."
(cond ((consp tReE)
(cons (if (funcall sUbTrEe-TeSt (car tReE))
@ -2419,7 +2419,7 @@ as if they had been supplied to a function with TARGET-ARGLIST directly.
Excess source arguments will be neglected, missing source arguments will be
supplied as nil. Returns a `funcall' or `apply' form with the second element
being `function' which has to be replaced by an actual function argument.
Example: (ad-map-arglists '(a &rest args) '(w x y z)) will return
Example: (ad-map-arglists \\='(a &rest args) \\='(w x y z)) will return
(funcall ad--addoit-function a (car args) (car (cdr args)) (nth 2 args))."
(let* ((parsed-source-arglist (ad-parse-arglist source-arglist))
(source-reqopt-args (append (nth 0 parsed-source-arglist)

View file

@ -561,7 +561,7 @@ Note that if you don't care about the order in which FUNCTION is
applied, just that the resulting list is in the correct order,
then
(avl-tree-mapf function 'cons tree (not reverse))
(avl-tree-mapf function \\='cons tree (not reverse))
is more efficient."
(nreverse (avl-tree-mapf fun 'cons tree reverse)))

View file

@ -43,7 +43,7 @@
(defun backquote-list*-function (first &rest list)
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
For example (backquote-list* \\='a \\='b \\='c) => (a b . c)"
;; The recursive solution is much nicer:
;; (if list (cons first (apply 'backquote-list*-function list)) first))
;; but Emacs is not very good at efficiently processing recursion.
@ -60,7 +60,7 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
(defmacro backquote-list*-macro (first &rest list)
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
For example (backquote-list* \\='a \\='b \\='c) => (a b . c)"
;; The recursive solution is much nicer:
;; (if list (list 'cons first (cons 'backquote-list*-macro list)) first))
;; but Emacs is not very good at efficiently processing such things.

View file

@ -265,8 +265,8 @@ This option is enabled by default because it reduces Emacs memory usage."
(defcustom byte-optimize-log nil
"If non-nil, the byte-compiler will log its optimizations.
If this is 'source, then only source-level optimizations will be logged.
If it is 'byte, then only byte-level optimizations will be logged.
If this is `source', then only source-level optimizations will be logged.
If it is `byte', then only byte-level optimizations will be logged.
The information is logged to `byte-compile-log-buffer'."
:group 'bytecomp
:type '(choice (const :tag "none" nil)
@ -1691,7 +1691,7 @@ Any other non-nil value of ARG means to ask the user.
If optional argument LOAD is non-nil, loads the file after compiling.
If compilation is needed, this functions returns the result of
`byte-compile-file'; otherwise it returns 'no-byte-compile."
`byte-compile-file'; otherwise it returns `no-byte-compile'."
(interactive
(let ((file buffer-file-name)
(file-name nil)

View file

@ -479,7 +479,7 @@ See `chart-sort-matchlist' for more details."
(defun chart-sort-matchlist (namelst numlst pred)
"Sort NAMELST and NUMLST (both sequence objects) based on predicate PRED.
PRED should be the equivalent of '<, except it must expect two
PRED should be the equivalent of `<', except it must expect two
cons cells of the form (NAME . NUM). See `sort' for more details."
;; 1 - create 1 list of cons cells
(let ((newlist nil)
@ -571,7 +571,7 @@ R1 and R2 are dotted pairs. Colorize it with FACE."
(defun chart-bar-quickie (dir title namelst nametitle numlst numtitle
&optional max sort-pred)
"Wash over the complex EIEIO stuff and create a nice bar chart.
Create it going in direction DIR ['horizontal 'vertical] with TITLE
Create it going in direction DIR [`horizontal' `vertical'] with TITLE
using a name sequence NAMELST labeled NAMETITLE with values NUMLST
labeled NUMTITLE.
Optional arguments:

View file

@ -298,9 +298,10 @@ FORM is of the form (ARGS . BODY)."
(if (stringp (car header)) (pop header))
;; Be careful with make-symbol and (back)quote,
;; see bug#12884.
(let ((print-gensym nil) (print-quoted t))
(format "%S" (cons 'fn (cl--make-usage-args
orig-args)))))
(help--docstring-quote
(let ((print-gensym nil) (print-quoted t))
(format "%S" (cons 'fn (cl--make-usage-args
orig-args))))))
header)))
;; FIXME: we'd want to choose an arg name for the &rest param
;; and pass that as `expr' to cl--do-arglist, but that ends up
@ -2829,8 +2830,8 @@ is a shorthand for (NAME NAME)."
(defun cl-struct-sequence-type (struct-type)
"Return the sequence used to build STRUCT-TYPE.
STRUCT-TYPE is a symbol naming a struct type. Return 'vector or
'list, or nil if STRUCT-TYPE is not a struct type. "
STRUCT-TYPE is a symbol naming a struct type. Return `vector' or
`list', or nil if STRUCT-TYPE is not a struct type. "
(declare (side-effect-free t) (pure t))
(cl--struct-class-type (cl--struct-get-class struct-type)))

View file

@ -148,7 +148,7 @@ BODY contains code to execute each time the mode is enabled or disabled.
For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\"
:lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
:lighter \" Foo\" :require \\='foo :global t :group \\='hassle :version \"27.5\"
...BODY CODE...)"
(declare (doc-string 2)
(debug (&define name string-or-null-p
@ -502,7 +502,7 @@ Valid keywords and arguments are:
:inherit Parent keymap.
:group Ignored.
:suppress Non-nil to call `suppress-keymap' on keymap,
'nodigits to suppress digits as prefix arguments."
`nodigits' to suppress digits as prefix arguments."
(let (inherit dense suppress)
(while args
(let ((key (pop args))

View file

@ -187,7 +187,7 @@ using :expected-result. See `ert-test-result-type-p' for a
description of valid values for RESULT-TYPE.
\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] \
[:tags '(TAG...)] BODY...)"
[:tags \\='(TAG...)] BODY...)"
(declare (debug (&define :name test
name sexp [&optional stringp]
[&rest keywordp sexp] def-body))

View file

@ -534,7 +534,7 @@ This macro only makes sense when used in a place."
"Return a reference to PLACE.
This is like the `&' operator of the C language.
Note: this only works reliably with lexical binding mode, except for very
simple PLACEs such as (function-symbol 'foo) which will also work in dynamic
simple PLACEs such as (function-symbol \\='foo) which will also work in dynamic
binding mode."
(let ((code
(gv-letplace (getter setter) place

View file

@ -117,10 +117,10 @@ For instance, the following code
essentially expands to
(let ((.title (cdr (assq 'title alist)))
(.body (cdr (assq 'body alist)))
(.site (cdr (assq 'site alist)))
(.site.contents (cdr (assq 'contents (cdr (assq 'site alist))))))
(let ((.title (cdr (assq \\='title alist)))
(.body (cdr (assq \\='body alist)))
(.site (cdr (assq \\='site alist)))
(.site.contents (cdr (assq \\='contents (cdr (assq \\='site alist))))))
(if (and .title .body)
.body
.site