From b27a8f15549f12b363acfde8101849af10e9b401 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 28 Sep 2021 13:30:02 +0200 Subject: Signal error on newline in internal--format-docstring-line * lisp/subr.el (internal--format-docstring-line): Signal error when trying to fill a line containing a newline. * lisp/cedet/semantic/decorate/mode.el (define-semantic-decoration-style): * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Don't pass newlines to 'internal--format-docstring-line'. --- lisp/emacs-lisp/easy-mmode.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 0e4d6eeb7bb..d37bca24a0f 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -496,15 +496,17 @@ on if the hook has explicitly disabled it. (define-minor-mode ,global-mode ,(concat (format "Toggle %s in all buffers.\n" pretty-name) (internal--format-docstring-line - "With prefix ARG, enable %s if ARG is positive; otherwise, \ -disable it.\n\n" + (concat "With prefix ARG, enable %s if ARG is positive; " + "otherwise, disable it.") pretty-global-name) + "\n\n" "If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number.\n\n" (internal--format-docstring-line - "%s is enabled in all buffers where `%s' would do it.\n\n" + "%s is enabled in all buffers where `%s' would do it." pretty-name turn-on) + "\n\n" (internal--format-docstring-line "See `%s' for more information on %s." mode pretty-name) -- cgit v1.2.3