From ebf43cc444ba28dc0a9197ac5a3e1ee403def2b2 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Fri, 13 May 2022 12:18:15 +0200 Subject: [PATCH] ; 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. --- lisp/textmodes/reftex-cite.el | 4 ++-- lisp/textmodes/reftex-vars.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 47f796dd537..26b14ebc79e 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el @@ -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)) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index f9d832f1556..f9f09825fa0 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -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." -- 2.39.2