; Fix RefTeX docstrings

* lisp/textmodes/reftex-cite.el (reftex-parse-bibitem)
(reftex-format-bibitem): Quote backslash.

* lisp/textmodes/reftex-vars.el
(reftex-cite-cleanup-optional-args): Fix example with 2 optional
arguments.
This commit is contained in:
Arash Esbati 2022-05-13 12:18:15 +02:00
parent dae431bf0a
commit ebf43cc444
2 changed files with 3 additions and 3 deletions

View file

@ -580,7 +580,7 @@ If FORMAT is non-nil `format' entry accordingly."
(concat key "\n " authors " " year " " extra "\n " title "\n\n")))
(defun reftex-parse-bibitem (item)
"Parse a \bibitem entry in ITEM."
"Parse a \\bibitem entry in ITEM."
(let ((key "") (text ""))
(when (string-match "\\`{\\([^}]+\\)}\\([^\000]*\\)" item)
(setq key (match-string 1 item)
@ -596,7 +596,7 @@ If FORMAT is non-nil `format' entry accordingly."
(cons "&entry" (concat key " " text)))))
(defun reftex-format-bibitem (item)
"Format a \bibitem entry in ITEM so that it is (relatively) nice to look at."
"Format a \\bibitem entry in ITEM so that it is (relatively) nice to look at."
(let ((text (reftex-get-bib-field "&text" item))
(key (reftex-get-bib-field "&key" item))
(lines nil))

View file

@ -1318,7 +1318,7 @@ macro before insertion. For example, it will change
\\cite[][]{Jones} -> \\cite{Jones}
\\cite[][Chapter 1]{Jones} -> \\cite[Chapter 1]{Jones}
\\cite[see][]{Jones} -> \\cite[see][]{Jones}
\\cite[see][Chapter 1]{Jones} -> \\cite{Jones}
\\cite[see][Chapter 1]{Jones} -> \\cite[see][Chapter 1]{Jones}
It is possible that other packages have other conventions about which
optional argument is interpreted how - that is why this cleaning up
can be turned off."