Skip to content

Commit 01b0fb1

Browse files
rpluimyantar92
authored andcommitted
Backport from main: Escape single left quotes in docstrings
* lisp/ob-core.el (org-babel-default-header-args): * lisp/ob-julia.el (org-babel-julia-evaluate-external-process): (org-babel-julia-evaluate-session): * lisp/ob-lua.el (org-babel-lua-read-string): * lisp/ob-table.el (org-sbe): * lisp/oc-basic.el (org-cite-basic--shorten-names): * lisp/org-agenda.el (org-agenda-sorting-strategy): (org-agenda--mark-blocked-entry): (org-agenda-set-restriction-lock): * lisp/org-fold-core.el (org-fold-core--specs): (org-fold-core-remove-folding-spec): (org-fold-core-get-folding-spec): (org-fold-core--isearch-overlays): * lisp/org-plot.el (org--plot/prime-factors): * lisp/org-table.el (org-table-collapse-header): * lisp/org.el (org-special-ctrl-o): (org-latex-to-html-convert-command): * lisp/ox-html.el (org-html--unlabel-latex-environment): * lisp/ox-publish.el (org-publish-find-property): Use \\=' when there's a need for a single left quote in a docstring. The emacs-29 byte compiler complains about such usage.
1 parent afe50b7 commit 01b0fb1

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

lisp/ob-core.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ value. The value can either be a string or a closure that
480480
evaluates to a string. The closure is evaluated when the source
481481
block is being evaluated (e.g. during execution or export), with
482482
point at the source block. It is not possible to use an
483-
arbitrary function symbol (e.g. 'some-func), since org uses
483+
arbitrary function symbol (e.g. \\='some-func), since org uses
484484
lexical binding. To achieve the same functionality, call the
485485
function within a closure (e.g. (lambda () (some-func))).
486486

lisp/ob-julia.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ end")
250250
(defun org-babel-julia-evaluate-external-process
251251
(body result-type result-params column-names-p)
252252
"Evaluate BODY in external julia process.
253-
If RESULT-TYPE equals 'output then return standard output as a
254-
string. If RESULT-TYPE equals 'value then return the value of the
253+
If RESULT-TYPE equals \\='output then return standard output as a
254+
string. If RESULT-TYPE equals \\='value then return the value of the
255255
last statement in BODY, as elisp."
256256
(cl-case result-type
257257
(value
@@ -274,8 +274,8 @@ last statement in BODY, as elisp."
274274
(defun org-babel-julia-evaluate-session
275275
(session body result-type result-params column-names-p)
276276
"Evaluate BODY in SESSION.
277-
If RESULT-TYPE equals 'output then return standard output as a
278-
string. If RESULT-TYPE equals 'value then return the value of the
277+
If RESULT-TYPE equals \\='output then return standard output as a
278+
string. If RESULT-TYPE equals \\='value then return the value of the
279279
last statement in BODY, as elisp."
280280
(cl-case result-type
281281
(value

lisp/ob-lua.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ fd:close()"
395395
(org-babel-lua-table-or-string results)))))
396396

397397
(defun org-babel-lua-read-string (string)
398-
"Strip 's from around Lua string."
398+
"Strip single quotes from around Lua string."
399399
(org-unbracket-string "'" "'" string))
400400

401401
(provide 'ob-lua)

lisp/ob-table.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ is the equivalent of the following source code block:
8484
#+end_src
8585
8686
NOTE: The quotation marks around the function name,
87-
'source-block', are optional.
87+
\\='source-block\\=', are optional.
8888
8989
NOTE: By default, string variable names are interpreted as
9090
references to source-code blocks, to force interpretation of a

lisp/org-agenda.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ alpha-down Sort headlines alphabetically, reversed.
16151615

16161616
The different possibilities will be tried in sequence, and testing stops
16171617
if one comparison returns a \"not-equal\". For example, the default
1618-
'(time-up category-keep priority-down)
1618+
\\='(time-up category-keep priority-down)
16191619
means: Pull out all entries having a specified time of day and sort them,
16201620
in order to make a time schedule for the current day the first thing in the
16211621
agenda listing for the day. Of the entries without a time indication, keep
@@ -4124,7 +4124,7 @@ dimming them." ;FIXME: The arg isn't used, actually!
41244124

41254125
If the header at `org-hd-marker' is blocked according to
41264126
`org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
4127-
'invisible and the header is not blocked by checkboxes, set the
4127+
\\='invisible and the header is not blocked by checkboxes, set the
41284128
text property `org-todo-blocked' to `invisible', otherwise set it
41294129
to t."
41304130
(when (get-text-property 0 'todo-state entry)
@@ -7399,7 +7399,7 @@ Argument ARG is the prefix argument."
73997399
When in a restricted subtree, remove it.
74007400

74017401
The restriction will span over the entire file if TYPE is `file',
7402-
or if type is '(4), or if the cursor is before the first headline
7402+
or if type is \\='(4), or if the cursor is before the first headline
74037403
in the file. Otherwise, only apply the restriction to the current
74047404
subtree."
74057405
(interactive "P")

lisp/org-plot.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the number of values."
280280
collect (cons n (/ (length m) normaliser)))))
281281

282282
(defun org--plot/prime-factors (value)
283-
"Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)."
283+
"Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)."
284284
(let ((factors '(1)) (i 1))
285285
(while (/= 1 value)
286286
(setq i (1+ i))

lisp/org-table.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the buffer at point."
54655465
(nreverse table)))))
54665466

54675467
(defun org-table-collapse-header (table &optional separator max-header-lines)
5468-
"Collapse the lines before 'hline into a single header.
5468+
"Collapse the lines before \\='hline into a single header.
54695469

54705470
The given TABLE is a list of lists as returned by `org-table-to-lisp'.
54715471
The leading lines before the first `hline' symbol are considered

lisp/org.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ OK to kill that hidden subtree. When nil, kill without remorse."
16941694
(const :tag "Never kill a hidden subtree with C-k" error)))
16951695

16961696
(defcustom org-special-ctrl-o t
1697-
"Non-nil means, make `C-o' insert a row in tables."
1697+
"Non-nil means, make `open-line' (\\[open-line]) insert a row in tables."
16981698
:group 'org-edit-structure
16991699
:type 'boolean)
17001700

@@ -3301,7 +3301,7 @@ Replace format-specifiers in the command as noted below and use
33013301
%i: The LaTeX fragment to be converted.
33023302

33033303
For example, this could be used with LaTeXML as
3304-
\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"."
3304+
\"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 2>/dev/null\"."
33053305
:group 'org-latex
33063306
:package-version '(Org . "9.4")
33073307
:type '(choice

lisp/ox-html.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not numbered."
29092909

29102910
(defun org-html--unlabel-latex-environment (latex-frag)
29112911
"Change environment in LATEX-FRAG string to an unnumbered one.
2912-
For instance, change an 'equation' environment to 'equation*'."
2912+
For instance, change an \\='equation\\=' environment to \\='equation*\\='."
29132913
(replace-regexp-in-string
29142914
"\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
29152915
"\\1*"

lisp/ox-publish.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends. In the
839839
latter case, optional argument BACKEND has to be set to the
840840
back-end where the option is defined, e.g.,
841841

842-
(org-publish-find-property file :subtitle 'latex)
842+
(org-publish-find-property file :subtitle \\='latex)
843843

844844
Return value may be a string or a list, depending on the type of
845845
PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."

0 commit comments

Comments
 (0)