[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#55209: 29.0.50; Let easy-mmode--mode-docstring handle empty DOC
From: |
daanturo |
Subject: |
bug#55209: 29.0.50; Let easy-mmode--mode-docstring handle empty DOC |
Date: |
Mon, 2 May 2022 01:41:42 +0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 |
>From 4f9bb869c736ffc10be6a83d33024247fd6f0573 Mon Sep 17 00:00:00 2001
From: Daanturo <daanturo@gmail.com>
Date: Mon, 2 May 2022 00:53:40 +0700
Subject: [PATCH] Allow empty docstrings for minor modes
* lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): handle
empty DOC case.
---
lisp/emacs-lisp/easy-mmode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 8a76eaf58c..4348efe363 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -106,7 +106,8 @@ it is disabled.")
;; Compose a new doc string.
(with-temp-buffer
(let ((lines (if doc
- (string-lines doc)
+ (or (string-lines doc)
+ '(""))
(list (format "Toggle %s on or off." mode-pretty-name)))))
;; Insert the first line from the doc string.
(insert (pop lines))
--
2.36.0
--
Daanturo.
- bug#55209: 29.0.50; Let easy-mmode--mode-docstring handle empty DOC,
daanturo <=