From unknown Tue Aug 19 01:10:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#19685 <19685@debbugs.gnu.org> To: bug#19685 <19685@debbugs.gnu.org> Subject: Status: [PATCH] define-minor-mode docstring generation bug Reply-To: bug#19685 <19685@debbugs.gnu.org> Date: Tue, 19 Aug 2025 08:10:58 +0000 retitle 19685 [PATCH] define-minor-mode docstring generation bug reassign 19685 emacs submitter 19685 Kelly Dean severity 19685 normal tag 19685 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 25 03:53:58 2015 Received: (at submit) by debbugs.gnu.org; 25 Jan 2015 08:53:58 +0000 Received: from localhost ([127.0.0.1]:55590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFIxC-000478-6B for submit@debbugs.gnu.org; Sun, 25 Jan 2015 03:53:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34654) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YFIxA-00046v-W4 for submit@debbugs.gnu.org; Sun, 25 Jan 2015 03:53:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFIx4-0004gW-VA for submit@debbugs.gnu.org; Sun, 25 Jan 2015 03:53:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFIx4-0004gR-TE for submit@debbugs.gnu.org; Sun, 25 Jan 2015 03:53:50 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFIx3-0000bb-V2 for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2015 03:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFIx0-0004fd-Pd for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2015 03:53:49 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:52379) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFIx0-0004fN-JL for bug-gnu-emacs@gnu.org; Sun, 25 Jan 2015 03:53:46 -0500 Received: from mfilter27-d.gandi.net (mfilter27-d.gandi.net [217.70.178.155]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id A72A1A80B6 for ; Sun, 25 Jan 2015 09:53:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter27-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter27-d.gandi.net (mfilter27-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id KnDhtn3KgLyt for ; Sun, 25 Jan 2015 09:53:44 +0100 (CET) X-Originating-IP: 66.220.3.179 Received: from localhost (gm179.geneticmail.com [66.220.3.179]) (Authenticated sender: kelly@prtime.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id AA38AA80B1 for ; Sun, 25 Jan 2015 09:53:42 +0100 (CET) From: Kelly Dean To: bug-gnu-emacs@gnu.org Subject: [PATCH] define-minor-mode docstring generation bug Date: Sun, 25 Jan 2015 08:52:42 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Try this: (define-minor-mode foo "foo" :global t) The variable it creates includes a docstring with =E2=8C=9CSetting this variable directly does not take effect=E2=8C=9D. That's a bug. The attached dmm-docstring-gen-bug.patch fixes it. Also attached is dmm-docstring-clarification.patch. (Not a bug, but might= as well include it here.) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=dmm-docstring-gen-bug.patch --- emacs-24.4/lisp/emacs-lisp/easy-mmode.el +++ emacs-24.4/lisp/emacs-lisp/easy-mmode.el @@ -158,7 +158,8 @@ ;; Allow skipping the first three args. (cond ((keywordp init-value) - (setq body `(,init-value ,lighter ,keymap ,@body) + (setq body (if keymap `(,init-value ,lighter ,keymap ,@body) + `(,init-value ,lighter)) init-value nil lighter nil keymap nil)) ((keywordp lighter) (setq body `(,lighter ,keymap ,@body) lighter nil keymap nil)) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=dmm-docstring-clarification.patch --- emacs-24.4/lisp/emacs-lisp/easy-mmode.el +++ emacs-24.4/lisp/emacs-lisp/easy-mmode.el @@ -114,9 +114,11 @@ BODY contains code to execute each time the mode is enabled or disabled. It is executed after toggling the mode, and before running MODE-hook. Before the actual body code, you can write keyword arguments, i.e. - alternating keywords and values. These following special keywords - are supported (other keywords are passed to `defcustom' if the minor - mode is global): + alternating keywords and values. If you provide BODY, then you must + provide INIT-VALUE, LIGHTER, and KEYMAP, or provide at least one + keyword argument, or both; otherwise, BODY would be misinterpreted. + The following special keywords are supported (other keywords are passed + to `defcustom' if the minor mode is global): :group GROUP Custom group name to use in all generated `defcustom' forms. Defaults to MODE without the possible trailing \"-mode\". --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 17 20:05:40 2015 Received: (at 19685-done) by debbugs.gnu.org; 18 Feb 2015 01:05:40 +0000 Received: from localhost ([127.0.0.1]:46758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YNt5A-0007AX-5B for submit@debbugs.gnu.org; Tue, 17 Feb 2015 20:05:40 -0500 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:40698) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YNt57-0007AO-4I for 19685-done@debbugs.gnu.org; Tue, 17 Feb 2015 20:05:38 -0500 Received: from mfilter1-d.gandi.net (mfilter1-d.gandi.net [217.70.178.130]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 93043A80CA for <19685-done@debbugs.gnu.org>; Wed, 18 Feb 2015 02:05:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter1-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter1-d.gandi.net (mfilter1-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id fzhVWDCP+EN4 for <19685-done@debbugs.gnu.org>; Wed, 18 Feb 2015 02:05:35 +0100 (CET) X-Originating-IP: 66.220.3.179 Received: from localhost (gm179.geneticmail.com [66.220.3.179]) (Authenticated sender: kelly@prtime.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 57AE1A80BC for <19685-done@debbugs.gnu.org>; Wed, 18 Feb 2015 02:05:34 +0100 (CET) From: Kelly Dean To: 19685-done@debbugs.gnu.org Subject: Re: define-minor-mode docstring generation bug Date: Wed, 18 Feb 2015 01:04:16 +0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 19685-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Fixed in trunk. From unknown Tue Aug 19 01:10:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 18 Mar 2015 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator