Fix doc string quoting problems with '

The Emacs doc string convention is to document values as-is when that
is clear, and surrounded by `single quotes' otherwise. For example, a
doc string "(a b c)" stands for a list of symbols, and the doc string
"`a'" stands for a single symbol. The doc string "\\=`a" is typically
not correct for that single symbol, because that is equivalent to
"(quote a)" and the typical intent is to talk about the symbol, not
about the Lisp quoting construct.  One needs "\\=`X" only when talking
about something intended to be equivalent to "(quote X)", as in the
doc string "(provide \\='org-xyz)".
This commit is contained in:
Paul Eggert 2022-07-25 12:54:49 -07:00
parent 4504473779
commit 6013cb161d
11 changed files with 45 additions and 32 deletions

View File

@ -514,7 +514,7 @@ functionality is also supported for default header arguments by
providing the header argument multiple times in the alist. For
example:
\\='((:var . \"foo=\\\"bar\\\"\")
((:var . \"foo=\\\"bar\\\"\")
(:var . \"bar=\\\"foo\\\"\"))")
(put 'org-babel-default-header-args 'safe-local-variable
@ -2627,7 +2627,7 @@ in the buffer."
If the `default-directory' is different from the containing
file's directory then expand relative links.
If the optional TYPE is passed as \\='attachment and the path is a
If the optional TYPE is passed as `attachment' and the path is a
descendant of the DEFAULT-DIRECTORY, the generated link will be
specified as an an \"attachment:\" style link."
(when (stringp result)

View File

@ -1645,8 +1645,9 @@ alpha-up Sort headlines alphabetically.
alpha-down Sort headlines alphabetically, reversed.
The different possibilities will be tried in sequence, and testing stops
if one comparison returns a \"not-equal\". For example, the default
`(time-up category-keep priority-down)'
if one comparison returns a \"not-equal\". For example,
(setq org-agenda-sorting-strategy
\\='(time-up category-keep priority-down))
means: Pull out all entries having a specified time of day and sort them,
in order to make a time schedule for the current day the first thing in the
agenda listing for the day. Of the entries without a time indication, keep
@ -2109,10 +2110,11 @@ the lower-case version of all tags."
(defcustom org-agenda-bulk-custom-functions nil
"Alist of characters and custom functions for bulk actions.
For example, this value makes those two functions available:
For example, this makes those two functions available:
\\='((?R set-category)
(?C bulk-cut))
(setq org-agenda-bulk-custom-functions
\\='((?R set-category)
(?C bulk-cut)))
With selected entries in an agenda buffer, `B R' will call
the custom function `set-category' on the selected entries.
@ -2123,7 +2125,8 @@ used for each call to your bulk custom function. The argument
collecting function will be run once and should return a list of
arguments to pass to the bulk function. For example:
\\='((?R set-category get-category))
(setq org-agenda-bulk-custom-functions
\\='((?R set-category get-category)))
Now, `B R' will call the custom `get-category' which would prompt
the user once for a category. That category is then passed as an
@ -2732,7 +2735,8 @@ For example, if you have a custom agenda command \"p\" and you
want this command to be accessible only from plain text files,
use this:
\\='((\"p\" ((in-file . \"\\\\.txt\\\\'\"))))
(setq org-agenda-custom-commands-contexts
\\='((\"p\" ((in-file . \"\\\\.txt\\\\'\")))))
Here are the available contexts definitions:
@ -2750,7 +2754,8 @@ accessible if there is at least one valid check.
You can also bind a key to another agenda custom command
depending on contextual rules.
\\='((\"p\" \"q\" ((in-file . \"\\\\.txt\\\\'\"))))
(setq org-agenda-custom-commands-contexts
\\='((\"p\" \"q\" ((in-file . \"\\\\.txt\\\\'\")))))
Here it means: in .txt files, use \"p\" as the key for the
agenda command otherwise associated with \"q\". (The command
@ -7877,7 +7882,7 @@ Argument ARG is the prefix argument."
When in a restricted subtree, remove it.
The restriction will span over the entire file if TYPE is `file',
or if type is \\='(4), or if the cursor is before the first headline
or if TYPE is (4), or if the cursor is before the first headline
in the file. Otherwise, only apply the restriction to the current
subtree."
(interactive "P")
@ -11304,7 +11309,7 @@ argument: an entry from `org-agenda-get-day-entries'.
FILTER can also be an alist with the car of each cell being
either `headline' or `category'. For example:
\\='((headline \"IMPORTANT\")
((headline \"IMPORTANT\")
(category \"Work\"))
will only add headlines containing IMPORTANT or headlines

View File

@ -43,7 +43,8 @@
(defcustom org-attach-git-annex-auto-get 'ask
"Confirmation preference for automatically getting annex files.
If \\='ask, prompt using `y-or-n-p'. If t, always get. If nil, never get."
If this is the symbol `ask', prompt using `y-or-n-p'.
If t, always get. If nil, never get."
:group 'org-attach
:package-version '(Org . "9.0")
:version "26.1"

View File

@ -560,7 +560,8 @@ For example, if you have a capture template \"c\" and you want
this template to be accessible only from `message-mode' buffers,
use this:
\\='((\"c\" ((in-mode . \"message-mode\"))))
(setq org-capture-templates-contexts
\\='((\"c\" ((in-mode . \"message-mode\")))))
Here are the available contexts definitions:
@ -578,7 +579,8 @@ accessible if there is at least one valid check.
You can also bind a key to another capture template depending on
contextual rules.
\\='((\"c\" \"d\" ((in-mode . \"message-mode\"))))
(setq org-capture-templates-contexts
\\='((\"c\" \"d\" ((in-mode . \"message-mode\")))))
Here it means: in `message-mode buffers', use \"c\" as the
key for the capture template otherwise associated with \"d\".

View File

@ -597,7 +597,7 @@ See also `org-agenda-deadline-faces'.")
(0.0 . org-upcoming-distant-deadline))
"Faces for showing deadlines in the agenda.
This is a list of cons cells. The cdr of each cell is a face to be used,
and it can also just be like \\='(:foreground \"yellow\").
and it can also just be like (:foreground \"yellow\").
Each car is a fraction of the head-warning time that must have passed for
this the face in the cdr to be used for display. The numbers must be
given in descending order. The head-warning time is normally taken

View File

@ -382,7 +382,7 @@ The following properties are known:
using isearch.
- :isearch-open :: non-nil means that isearch can reveal text hidden
using this spec. This property does nothing
when \\='isearch-ignore property is non-nil.
when `isearch-ignore' property is non-nil.
- :front-sticky :: non-nil means that text prepended to the folded text
is automatically folded.
- :rear-sticky :: non-nil means that text appended to the folded text
@ -709,7 +709,7 @@ The folding spec properties will be set to PROPERTIES (see
SPEC must be a symbol.
BUFFER can be a buffer to remove SPEC in, nil to remove SPEC in current
buffer, or \\='all to remove SPEC in all open `org-mode' buffers and all
buffer, or `all' to remove SPEC in all open `org-mode' buffers and all
future org buffers."
(org-fold-core--check-spec spec)
(when (eq buffer 'all)
@ -778,7 +778,7 @@ If SPEC-OR-ALIAS is a folding spec, only check the given folding spec."
Return nil if there is no folding at point or POM.
If SPEC-OR-ALIAS is nil, return a folding spec with highest priority
among present at `point' or POM.
If SPEC-OR-ALIAS is \\='all, return the list of all present folding
If SPEC-OR-ALIAS is `all', return the list of all present folding
specs.
If SPEC-OR-ALIAS is a valid folding spec or a spec alias, return the
corresponding folding spec (if the text is folded using that spec)."

View File

@ -522,7 +522,7 @@ is selected, only the bare key is returned."
For example, in this alist:
\(org-uniquify-alist \\='((a 1) (b 2) (a 3)))
=> \\='((a 1 3) (b 2))
=> ((a 1 3) (b 2))
merge (a 1) and (a 3) into (a 1 3).

View File

@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the number of values."
collect (cons n (/ (length m) normaliser)))))
(defun org--plot/prime-factors (value)
"Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)."
"Return the prime decomposition of VALUE, e.g. for 12, (3 2 2)."
(let ((factors '(1)) (i 1))
(while (/= 1 value)
(setq i (1+ i))

View File

@ -230,12 +230,13 @@ Each element is a cell of the format
Where FACE is either a defined face or an anonymous face.
For instance, the following value would color the background of
For instance, the following would color the background of
emacs-lisp source blocks and python source blocks in purple and
green, respectability.
\\='((\"emacs-lisp\" (:background \"#EEE2FF\"))
(\"python\" (:background \"#e5ffb8\")))"
(setq org-src-block-faces
\\='((\"emacs-lisp\" (:background \"#EEE2FF\"))
(\"python\" (:background \"#e5ffb8\"))))"
:group 'org-edit-structure
:type '(repeat (list (string :tag "language")
(choice

View File

@ -3457,7 +3457,7 @@ lines to the buffer:
(defcustom org-hidden-keywords nil
"List of symbols corresponding to keywords to be hidden in the Org buffer.
For example, a value \\='(title) for this list makes the document's title
For example, a value (title) for this list makes the document's title
appear in the buffer without the initial \"#+TITLE:\" part."
:group 'org-appearance
:package-version '(Org . "9.5")

View File

@ -872,8 +872,12 @@ This option can also be set with the OPTIONS keyword, e.g.,
This variable allows providing shortcuts for export snippets.
For example, with a value of \\='((\"h\" . \"html\")), the
HTML back-end will recognize the contents of \"@@h:<b>@@\" as
For example, with:
(setq org-export-snippet-translation-alist
\\='((\"h\" . \"html\")))
the HTML back-end will recognize the contents of \"@@h:<b>@@\" as
HTML code while every other back-end will ignore it."
:group 'org-export-general
:version "24.4"
@ -1182,7 +1186,7 @@ keywords are understood:
Menu entry for the export dispatcher. It should be a list
like:
\\='(KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU)
(KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU)
where :
@ -1206,17 +1210,17 @@ keywords are understood:
If it is an alist, associations should follow the
pattern:
\\='(KEY DESCRIPTION ACTION)
(KEY DESCRIPTION ACTION)
where KEY, DESCRIPTION and ACTION are described above.
Valid values include:
\\='(?m \"My Special Back-end\" my-special-export-function)
(?m \"My Special Back-end\" my-special-export-function)
or
\\='(?l \"Export to LaTeX\"
(?l \"Export to LaTeX\"
((?p \"As PDF file\" org-latex-export-to-pdf)
(?o \"As PDF file and open\"
(lambda (a s v b)
@ -1227,7 +1231,7 @@ keywords are understood:
or the following, which will be added to the previous
sub-menu,
\\='(?l 1
(?l 1
((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex)
(?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf)))