Browse Source

Backport commit bbf389ea6 from Emacs

* lisp/ox-publish.el (org-publish-find-property):
* lisp/ox-html.el (org-html--unlabel-latex-environment):
* lisp/org-table.el (org-table-collapse-header):
* lisp/org-plot.el (org--plot/prime-factors):
* lisp/org-agenda.el (org-agenda--mark-blocked-entry):
(org-agenda-set-restriction-lock):
* lisp/ob-lua.el (org-babel-lua-read-string):
* lisp/ob-julia.el (org-babel-julia-evaluate-external-process):
(org-babel-julia-evaluate-session):
* lisp/ob-core.el (org-babel-default-header-args): Fix
quoting in doc strings.  In code examples, the ' character is
quoted with \\=, and regularize 'foo to `foo', and quote strings
like "foo" instead of 'foo'.

Audit quoting the quote character in doc strings
bbf389ea6deab229ba18dc519fe712ec982609d1
Lars Ingebrigtsen
Fri Apr 22 16:17:22 2022 +0200

[km] Org's bugfix branch is currently receiving commits from emacs-28,
     but this commit comes from Emacs's master branch.  I'm porting it
     because it has conflicts with bugfix's 01b0fb14b (Backport from
     main: Escape single left quotes in docstrings, 2022-07-24) and
     only touches docstrings.
Lars Ingebrigtsen 3 years ago
parent
commit
cea0263784
8 changed files with 12 additions and 12 deletions
  1. 1 1
      lisp/ob-core.el
  2. 4 4
      lisp/ob-julia.el
  3. 1 1
      lisp/ob-lua.el
  4. 2 2
      lisp/org-agenda.el
  5. 1 1
      lisp/org-plot.el
  6. 1 1
      lisp/org-table.el
  7. 1 1
      lisp/ox-html.el
  8. 1 1
      lisp/ox-publish.el

+ 1 - 1
lisp/ob-core.el

@@ -480,7 +480,7 @@ value.  The value can either be a string or a closure that
 evaluates to a string.  The closure is evaluated when the source
 evaluates to a string.  The closure is evaluated when the source
 block is being evaluated (e.g. during execution or export), with
 block is being evaluated (e.g. during execution or export), with
 point at the source block.  It is not possible to use an
 point at the source block.  It is not possible to use an
-arbitrary function symbol (e.g. 'some-func), since org uses
+arbitrary function symbol (e.g. `some-func'), since org uses
 lexical binding.  To achieve the same functionality, call the
 lexical binding.  To achieve the same functionality, call the
 function within a closure (e.g. (lambda () (some-func))).
 function within a closure (e.g. (lambda () (some-func))).
 
 

+ 4 - 4
lisp/ob-julia.el

@@ -250,8 +250,8 @@ end")
 (defun org-babel-julia-evaluate-external-process
 (defun org-babel-julia-evaluate-external-process
     (body result-type result-params column-names-p)
     (body result-type result-params column-names-p)
   "Evaluate BODY in external julia process.
   "Evaluate BODY in external julia process.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string.  If RESULT-TYPE equals `value' then return the value of the
 last statement in BODY, as elisp."
 last statement in BODY, as elisp."
   (cl-case result-type
   (cl-case result-type
     (value
     (value
@@ -274,8 +274,8 @@ last statement in BODY, as elisp."
 (defun org-babel-julia-evaluate-session
 (defun org-babel-julia-evaluate-session
     (session body result-type result-params column-names-p)
     (session body result-type result-params column-names-p)
   "Evaluate BODY in SESSION.
   "Evaluate BODY in SESSION.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string.  If RESULT-TYPE equals `value' then return the value of the
 last statement in BODY, as elisp."
 last statement in BODY, as elisp."
   (cl-case result-type
   (cl-case result-type
     (value
     (value

+ 1 - 1
lisp/ob-lua.el

@@ -395,7 +395,7 @@ fd:close()"
         (org-babel-lua-table-or-string results)))))
         (org-babel-lua-table-or-string results)))))
 
 
 (defun org-babel-lua-read-string (string)
 (defun org-babel-lua-read-string (string)
-  "Strip 's from around Lua string."
+  "Strip \\=' characters from around Lua string."
   (org-unbracket-string "'" "'" string))
   (org-unbracket-string "'" "'" string))
 
 
 (provide 'ob-lua)
 (provide 'ob-lua)

+ 2 - 2
lisp/org-agenda.el

@@ -4124,7 +4124,7 @@ dimming them."                   ;FIXME: The arg isn't used, actually!
 
 
 If the header at `org-hd-marker' is blocked according to
 If the header at `org-hd-marker' is blocked according to
 `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
 `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
-'invisible and the header is not blocked by checkboxes, set the
+`invisible' and the header is not blocked by checkboxes, set the
 text property `org-todo-blocked' to `invisible', otherwise set it
 text property `org-todo-blocked' to `invisible', otherwise set it
 to t."
 to t."
   (when (get-text-property 0 'todo-state entry)
   (when (get-text-property 0 'todo-state entry)
@@ -7399,7 +7399,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")

+ 1 - 1
lisp/org-plot.el

@@ -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))

+ 1 - 1
lisp/org-table.el

@@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the buffer at point."
         (nreverse table)))))
         (nreverse table)))))
 
 
 (defun org-table-collapse-header (table &optional separator max-header-lines)
 (defun org-table-collapse-header (table &optional separator max-header-lines)
-  "Collapse the lines before 'hline into a single header.
+  "Collapse the lines before `hline' into a single header.
 
 
 The given TABLE is a list of lists as returned by `org-table-to-lisp'.
 The given TABLE is a list of lists as returned by `org-table-to-lisp'.
 The leading lines before the first `hline' symbol are considered
 The leading lines before the first `hline' symbol are considered

+ 1 - 1
lisp/ox-html.el

@@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not numbered."
 
 
 (defun org-html--unlabel-latex-environment (latex-frag)
 (defun org-html--unlabel-latex-environment (latex-frag)
   "Change environment in LATEX-FRAG string to an unnumbered one.
   "Change environment in LATEX-FRAG string to an unnumbered one.
-For instance, change an 'equation' environment to 'equation*'."
+For instance, change an `equation' environment to `equation*'."
   (replace-regexp-in-string
   (replace-regexp-in-string
    "\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
    "\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
    "\\1*"
    "\\1*"

+ 1 - 1
lisp/ox-publish.el

@@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends.  In the
 latter case, optional argument BACKEND has to be set to the
 latter case, optional argument BACKEND has to be set to the
 back-end where the option is defined, e.g.,
 back-end where the option is defined, e.g.,
 
 
-  (org-publish-find-property file :subtitle 'latex)
+  (org-publish-find-property file :subtitle \\='latex)
 
 
 Return value may be a string or a list, depending on the type of
 Return value may be a string or a list, depending on the type of
 PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."
 PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."