X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;ds=sidebyside;f=emacs%2Frstdoc.el;h=41390bbef5d223acf32f4fa750f375adcbc9e4af;hb=df3fab18fe70ea750f6f06da30291c67de7e74f2;hp=2225aefc023a2a1776f31c53332551965952a91e;hpb=3d0fd40eb0eca54fd05460203ae754c63f633d69;p=notmuch diff --git a/emacs/rstdoc.el b/emacs/rstdoc.el index 2225aefc..41390bbe 100644 --- a/emacs/rstdoc.el +++ b/emacs/rstdoc.el @@ -24,7 +24,6 @@ ;; ;;; Commentary: -;; ;; Rstdoc provides a facility to extract all of the docstrings defined in ;; an elisp source file. Usage: @@ -36,11 +35,11 @@ (provide 'rstdoc) (defun rstdoc-batch-extract () - "Extract docstrings to and from the files on the command line" + "Extract docstrings to and from the files on the command line." (apply #'rstdoc-extract command-line-args-left)) (defun rstdoc-extract (in-file out-file) - "Write docstrings from IN-FILE to OUT-FILE" + "Write docstrings from IN-FILE to OUT-FILE." (load-file in-file) (let* ((definitions (cdr (assoc (expand-file-name in-file) load-history))) (doc-hash (make-hash-table :test 'eq))) @@ -63,15 +62,16 @@ (defun rstdoc--insert-docstring (symbol docstring) (insert (format "\n.. |docstring::%s| replace::\n" symbol)) - (insert (replace-regexp-in-string "^" " " (rstdoc--rst-quote-string docstring))) + (insert (replace-regexp-in-string "^" " " + (rstdoc--rst-quote-string docstring))) (insert "\n")) (defvar rst--escape-alist - '( ("\\\\='" . "\\\\'") - ("\\([^\\]\\)'" . "\\1`") - ("^[[:space:]\t]*$" . "|br|") - ("^[[:space:]\t]" . "|indent| ")) - "list of (regex . replacement) pairs") + '(("\\\\='" . "\\\\'") + ("\\([^\\]\\)'" . "\\1`") + ("^[[:space:]\t]*$" . "|br|") + ("^[[:space:]\t]" . "|indent| ")) + "List of (regex . replacement) pairs.") (defun rstdoc--rst-quote-string (str) (with-temp-buffer