GNU bug report logs - #55209
29.0.50; Let easy-mmode--mode-docstring handle empty DOC

Previous Next

Package: emacs;

Reported by: daanturo <daanturo <at> gmail.com>

Date: Sun, 1 May 2022 18:45:02 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55209 in the body.
You can then email your comments to 55209 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#55209; Package emacs. (Sun, 01 May 2022 18:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to daanturo <daanturo <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 01 May 2022 18:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: daanturo <daanturo <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; Let easy-mmode--mode-docstring handle empty DOC
Date: Mon, 2 May 2022 01:41:42 +0700
From 4f9bb869c736ffc10be6a83d33024247fd6f0573 Mon Sep 17 00:00:00 2001
From: Daanturo <daanturo <at> 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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55209; Package emacs. (Sun, 01 May 2022 18:51:02 GMT) Full text and rfc822 format available.

Message #8 received at 55209 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: daanturo <daanturo <at> gmail.com>
Cc: 55209 <at> debbugs.gnu.org
Subject: Re: bug#55209: 29.0.50; Let easy-mmode--mode-docstring handle empty
 DOC
Date: Sun, 01 May 2022 20:49:51 +0200
daanturo <daanturo <at> gmail.com> writes:

> * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): handle
> empty DOC case.

[...]

> ;; Compose a new doc string.
> (with-temp-buffer
> (let ((lines (if doc
> - (string-lines doc)
> + (or (string-lines doc)
> + '(""))

Is this patch against an old checkout?  The code currently looks like
this:

    ;; Compose a new doc string.
    (with-temp-buffer
      (let ((lines (if doc
                       (string-lines doc)
                     (list (format "Toggle %s on or off." mode-pretty-name)))))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 01 May 2022 18:51:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#55209; Package emacs. (Mon, 02 May 2022 08:33:02 GMT) Full text and rfc822 format available.

Message #13 received at 55209 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: daanturo <daanturo <at> gmail.com>
Cc: 55209 <at> debbugs.gnu.org
Subject: Re: bug#55209: 29.0.50; Let easy-mmode--mode-docstring handle empty
 DOC
Date: Mon, 02 May 2022 10:32:48 +0200
daanturo <daanturo <at> gmail.com> writes:

> * lisp/emacs-lisp/easy-mmode.el (easy-mmode--mode-docstring): handle
> empty DOC case.

I've fixed this in Emacs 29 now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 29.1, send any further explanations to 55209 <at> debbugs.gnu.org and daanturo <daanturo <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 02 May 2022 08:34:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 May 2022 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.