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 providing the header argument multiple times in the alist. For
example: example:
\\='((:var . \"foo=\\\"bar\\\"\") ((:var . \"foo=\\\"bar\\\"\")
(:var . \"bar=\\\"foo\\\"\"))") (:var . \"bar=\\\"foo\\\"\"))")
(put 'org-babel-default-header-args 'safe-local-variable (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 If the `default-directory' is different from the containing
file's directory then expand relative links. 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 descendant of the DEFAULT-DIRECTORY, the generated link will be
specified as an an \"attachment:\" style link." specified as an an \"attachment:\" style link."
(when (stringp result) (when (stringp result)

View File

@ -1645,8 +1645,9 @@ alpha-up Sort headlines alphabetically.
alpha-down Sort headlines alphabetically, reversed. alpha-down Sort headlines alphabetically, reversed.
The different possibilities will be tried in sequence, and testing stops The different possibilities will be tried in sequence, and testing stops
if one comparison returns a \"not-equal\". For example, the default if one comparison returns a \"not-equal\". For example,
`(time-up category-keep priority-down)' (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, 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 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 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 (defcustom org-agenda-bulk-custom-functions nil
"Alist of characters and custom functions for bulk actions. "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) (setq org-agenda-bulk-custom-functions
(?C bulk-cut)) \\='((?R set-category)
(?C bulk-cut)))
With selected entries in an agenda buffer, `B R' will call With selected entries in an agenda buffer, `B R' will call
the custom function `set-category' on the selected entries. 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 collecting function will be run once and should return a list of
arguments to pass to the bulk function. For example: 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 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 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, want this command to be accessible only from plain text files,
use this: use this:
\\='((\"p\" ((in-file . \"\\\\.txt\\\\'\")))) (setq org-agenda-custom-commands-contexts
\\='((\"p\" ((in-file . \"\\\\.txt\\\\'\")))))
Here are the available contexts definitions: 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 You can also bind a key to another agenda custom command
depending on contextual rules. 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 Here it means: in .txt files, use \"p\" as the key for the
agenda command otherwise associated with \"q\". (The command 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. When in a restricted subtree, remove it.
The restriction will span over the entire file if TYPE is `file', 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 in the file. Otherwise, only apply the restriction to the current
subtree." subtree."
(interactive "P") (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 FILTER can also be an alist with the car of each cell being
either `headline' or `category'. For example: either `headline' or `category'. For example:
\\='((headline \"IMPORTANT\") ((headline \"IMPORTANT\")
(category \"Work\")) (category \"Work\"))
will only add headlines containing IMPORTANT or headlines will only add headlines containing IMPORTANT or headlines

View File

@ -43,7 +43,8 @@
(defcustom org-attach-git-annex-auto-get 'ask (defcustom org-attach-git-annex-auto-get 'ask
"Confirmation preference for automatically getting annex files. "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 :group 'org-attach
:package-version '(Org . "9.0") :package-version '(Org . "9.0")
:version "26.1" :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, this template to be accessible only from `message-mode' buffers,
use this: use this:
\\='((\"c\" ((in-mode . \"message-mode\")))) (setq org-capture-templates-contexts
\\='((\"c\" ((in-mode . \"message-mode\")))))
Here are the available contexts definitions: 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 You can also bind a key to another capture template depending on
contextual rules. 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 Here it means: in `message-mode buffers', use \"c\" as the
key for the capture template otherwise associated with \"d\". 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)) (0.0 . org-upcoming-distant-deadline))
"Faces for showing deadlines in the agenda. "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, 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 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 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 given in descending order. The head-warning time is normally taken

View File

@ -382,7 +382,7 @@ The following properties are known:
using isearch. using isearch.
- :isearch-open :: non-nil means that isearch can reveal text hidden - :isearch-open :: non-nil means that isearch can reveal text hidden
using this spec. This property does nothing 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 - :front-sticky :: non-nil means that text prepended to the folded text
is automatically folded. is automatically folded.
- :rear-sticky :: non-nil means that text appended to the folded text - :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. SPEC must be a symbol.
BUFFER can be a buffer to remove SPEC in, nil to remove SPEC in current 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." future org buffers."
(org-fold-core--check-spec spec) (org-fold-core--check-spec spec)
(when (eq buffer 'all) (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. Return nil if there is no folding at point or POM.
If SPEC-OR-ALIAS is nil, return a folding spec with highest priority If SPEC-OR-ALIAS is nil, return a folding spec with highest priority
among present at `point' or POM. 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. specs.
If SPEC-OR-ALIAS is a valid folding spec or a spec alias, return the 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)." 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: For example, in this alist:
\(org-uniquify-alist \\='((a 1) (b 2) (a 3))) \(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). 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))))) collect (cons n (/ (length m) normaliser)))))
(defun org--plot/prime-factors (value) (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)) (let ((factors '(1)) (i 1))
(while (/= 1 value) (while (/= 1 value)
(setq i (1+ i)) (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. 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 emacs-lisp source blocks and python source blocks in purple and
green, respectability. green, respectability.
\\='((\"emacs-lisp\" (:background \"#EEE2FF\")) (setq org-src-block-faces
(\"python\" (:background \"#e5ffb8\")))" \\='((\"emacs-lisp\" (:background \"#EEE2FF\"))
(\"python\" (:background \"#e5ffb8\"))))"
:group 'org-edit-structure :group 'org-edit-structure
:type '(repeat (list (string :tag "language") :type '(repeat (list (string :tag "language")
(choice (choice

View File

@ -3457,7 +3457,7 @@ lines to the buffer:
(defcustom org-hidden-keywords nil (defcustom org-hidden-keywords nil
"List of symbols corresponding to keywords to be hidden in the Org buffer. "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." appear in the buffer without the initial \"#+TITLE:\" part."
:group 'org-appearance :group 'org-appearance
:package-version '(Org . "9.5") :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. This variable allows providing shortcuts for export snippets.
For example, with a value of \\='((\"h\" . \"html\")), the For example, with:
HTML back-end will recognize the contents of \"@@h:<b>@@\" as
(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." HTML code while every other back-end will ignore it."
:group 'org-export-general :group 'org-export-general
:version "24.4" :version "24.4"
@ -1182,7 +1186,7 @@ keywords are understood:
Menu entry for the export dispatcher. It should be a list Menu entry for the export dispatcher. It should be a list
like: like:
\\='(KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU) (KEY DESCRIPTION-OR-ORDINAL ACTION-OR-MENU)
where : where :
@ -1206,17 +1210,17 @@ keywords are understood:
If it is an alist, associations should follow the If it is an alist, associations should follow the
pattern: pattern:
\\='(KEY DESCRIPTION ACTION) (KEY DESCRIPTION ACTION)
where KEY, DESCRIPTION and ACTION are described above. where KEY, DESCRIPTION and ACTION are described above.
Valid values include: Valid values include:
\\='(?m \"My Special Back-end\" my-special-export-function) (?m \"My Special Back-end\" my-special-export-function)
or or
\\='(?l \"Export to LaTeX\" (?l \"Export to LaTeX\"
((?p \"As PDF file\" org-latex-export-to-pdf) ((?p \"As PDF file\" org-latex-export-to-pdf)
(?o \"As PDF file and open\" (?o \"As PDF file and open\"
(lambda (a s v b) (lambda (a s v b)
@ -1227,7 +1231,7 @@ keywords are understood:
or the following, which will be added to the previous or the following, which will be added to the previous
sub-menu, sub-menu,
\\='(?l 1 (?l 1
((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex) ((?B \"As TEX buffer (Beamer)\" org-beamer-export-as-latex)
(?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf))) (?P \"As PDF file (Beamer)\" org-beamer-export-to-pdf)))