emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master a397fa0: Improve docstrings auto-generated by `define-minor-m


From: Michael Albinus
Subject: Re: master a397fa0: Improve docstrings auto-generated by `define-minor-mode'
Date: Fri, 04 Oct 2019 13:49:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

address@hidden (Juanma Barranquero) writes:

> branch: master
> commit a397fa06d18d6ae37a3a1288f269e1ae9eb3b569
> Author: Juanma Barranquero <address@hidden>
> Commit: Juanma Barranquero <address@hidden>
>
>     Improve docstrings auto-generated by `define-minor-mode'
>
>     * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring):
>     When using `easy-mmode--arg-docstring' to auto-generate a
>     docstring, refill it up to `emacs-lisp-docstring-fill-column'.
> ---
>  lisp/emacs-lisp/easy-mmode.el | 16 +++++++++++-----
>  1 file changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
> index 5e7b29e..6d5b514 100644
> --- a/lisp/emacs-lisp/easy-mmode.el
> +++ b/lisp/emacs-lisp/easy-mmode.el
> @@ -95,11 +95,17 @@ if ARG is `toggle'; disable the mode otherwise.")
>  \\{%s}" mode-pretty-name keymap-sym))))
>      (if (string-match-p "\\bARG\\b" doc)
>          doc
> -      (let ((argdoc (format easy-mmode--arg-docstring
> -                            mode-pretty-name)))
> -        (replace-regexp-in-string "\\(\n\n\\|\\'\\)\\(.\\|\n\\)*\\'"
> -                                  (concat argdoc "\\1")
> -                                  doc nil nil 1)))))
> +      (let* ((fill-prefix nil)
> +             (docstring-fc (bound-and-true-p 
> emacs-lisp-docstring-fill-column))
> +             (fill-column (if (integerp docstring-fc) docstring-fc 65))
> +             (argdoc (format easy-mmode--arg-docstring
> +                             mode-pretty-name)))
> +        (with-temp-buffer
> +          (insert (replace-regexp-in-string 
> "\\(\n\n\\|\\'\\)\\(.\\|\n\\)*\\'"
> +                                            (concat argdoc "\\1")
> +                                            doc nil nil 1))
> +          (fill-region (point-min) (point-max) 'left t)
> +          (buffer-string))))))

This has broken the build on emba. See 
<https://emba.gnu.org/emacs/emacs/-/jobs/3602/raw>.

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]