GNU bug report logs - #58015
28.1; `make-autoload' doesn't respect `:group' of `defgroup'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: taku0 <e8vdgnvs_taku0@HIDDEN>; Done: Lars Ingebrigtsen <larsi@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 29.1, send any further explanations to 58015 <at> debbugs.gnu.org and taku0 <e8vdgnvs_taku0@HIDDEN> Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 58015 <at> debbugs.gnu.org:


Received: (at 58015) by debbugs.gnu.org; 23 Sep 2022 16:07:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 12:07:05 2022
Received: from localhost ([127.0.0.1]:41501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oblCi-0006IH-KD
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 12:07:04 -0400
Received: from quimby.gnus.org ([95.216.78.240]:38402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1oblCg-0006Hl-Oy
 for 58015 <at> debbugs.gnu.org; Fri, 23 Sep 2022 12:07:03 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References:
 In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=kNYESgnX+048e8ZMMUFrhPmojfK+nrJ9N7royXzcwNk=; b=DIQ65o6v/eoTFHBBWRnIhbCuij
 ez0t4ugE3er2e9Aw+G4phyo/G+b3x3/ohih8BNWj6kMFJOoWjiF2uR00ewoZa+qRvbLMI459YuWIb
 HTb6l0ocMV/T7HCd9Y9HhMTfurxSh+6iCXroVSI5YArpyEorlVpNxQ64coaNdBLQyMHk=;
Received: from [84.212.220.105] (helo=joga)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1oblCU-0003NF-Eu; Fri, 23 Sep 2022 18:06:54 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: taku0 <e8vdgnvs_taku0@HIDDEN>
Subject: Re: bug#58015: 28.1; `make-autoload' doesn't respect `:group' of
 `defgroup'
In-Reply-To: <ec51bd8b-7f80-9f01-c3a1-92c6f9b54b92@HIDDEN> (taku0's
 message of "Fri, 23 Sep 2022 14:16:09 +0900")
References: <ec51bd8b-7f80-9f01-c3a1-92c6f9b54b92@HIDDEN>
X-Now-Playing: Kate Bush's _Never For Ever_: "Babooshka"
Date: Fri, 23 Sep 2022 18:06:49 +0200
Message-ID: <87k05u3wiu.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: taku0 <e8vdgnvs_taku0@HIDDEN> writes: > We have two
 problems
 to fix: > > * `make-autoload' should emit `(custom-add-load 'languages
 'swift-mode)'.
 > * `cus-load' should not override existing `custom-loads'. 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 58015
Cc: 58015 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

taku0 <e8vdgnvs_taku0@HIDDEN> writes:

> We have two problems to fix:
>
> * `make-autoload' should emit `(custom-add-load 'languages 'swift-mode)'.
> * `cus-load' should not override existing `custom-loads'.

I've now fixed this in Emacs 29.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#58015; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Sep 2022 05:34:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 23 01:34:43 2022
Received: from localhost ([127.0.0.1]:39088 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1obbKk-000675-0G
	for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 01:34:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:51256)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <e8vdgnvs_taku0@HIDDEN>) id 1obb2z-0005ZN-Mg
 for submit <at> debbugs.gnu.org; Fri, 23 Sep 2022 01:16:25 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:43926)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <e8vdgnvs_taku0@HIDDEN>)
 id 1obb2z-0000fA-9w
 for bug-gnu-emacs@HIDDEN; Fri, 23 Sep 2022 01:16:21 -0400
Received: from www772.sakura.ne.jp ([59.106.19.222]:60799)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <e8vdgnvs_taku0@HIDDEN>)
 id 1obb2v-0006Ar-I5
 for bug-gnu-emacs@HIDDEN; Fri, 23 Sep 2022 01:16:20 -0400
Received: from [192.168.0.5] (pb6abe944.tokyff01.ap.so-net.ne.jp
 [182.171.233.68]) (authenticated bits=0)
 by www772.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 28N5G9bs092234
 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Fri, 23 Sep 2022 14:16:10 +0900 (JST)
 (envelope-from e8vdgnvs_taku0@HIDDEN)
Message-ID: <ec51bd8b-7f80-9f01-c3a1-92c6f9b54b92@HIDDEN>
Date: Fri, 23 Sep 2022 14:16:09 +0900
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
 Thunderbird/91.10.0
Content-Language: en-US
To: bug-gnu-emacs@HIDDEN
From: taku0 <e8vdgnvs_taku0@HIDDEN>
Subject: 28.1; `make-autoload' doesn't respect `:group' of `defgroup'
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=59.106.19.222;
 envelope-from=e8vdgnvs_taku0@HIDDEN; helo=www772.sakura.ne.jp
X-Spam_score_int: 1
X-Spam_score: 0.1
X-Spam_bar: /
X-Spam_report: (0.1 / 5.0 requ) BAYES_00=-1.9, HK_RANDOM_ENVFROM=0.999,
 HK_RANDOM_FROM=1, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 23 Sep 2022 01:34:39 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

When `;;;###autoload' magic comment is attached to a `defgroup' with `:group',
`make-autoload' doesn't add the group to the parent group.


Example:

With the following code in swift-mode.el, I expect the `swift' group appears
under `languages' group even if the `swift-mode' package isn't loaded yet:

    ;;;###autoload
    (defgroup swift nil
      "Major-mode for Apple's Swift programming language."
      :group 'languages)


We have two problems to fix:

* `make-autoload' should emit `(custom-add-load 'languages 'swift-mode)'.
* `cus-load' should not override existing `custom-loads'.


I have included the following workarounds in `swift-mode' for now:
https://github.com/swift-emacs/swift-mode/blob/7552428931b5b8fe8b40e835484dc9d669bf2e87/swift-mode.el#L52-L57

    ;; WORKAROUND: `update-directory-autoloads' does not handle `:group'.
    ;;;###autoload (custom-add-load 'languages 'swift-mode)

    ;; WORKAROUND: `cus-load' overrides `custom-loads'
    ;;;###autoload (with-eval-after-load 'cus-load
    ;;;###autoload   (custom-add-load 'languages 'swift-mode))

Thanks,
taku0.


In GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: NixOS 22.05 (Quokka)

Configured using:
 'configure
 --prefix=/nix/store/bbx5czfbx2drp5f19gxbivn6fcx1iyd4-emacs-28.1
 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
 --with-cairo'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM GTK3 ZLIB

Important settings:
  value of $LANG: ja_JP.UTF-8
  value of $XMODIFIERS: @im=uim
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
/run/current-system/sw/share/emacs/site-lisp/site-start hides /nix/store/bbx5czfbx2drp5f19gxbivn6fcx1iyd4-emacs-28.1/share/emacs/site-lisp/site-start

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils seq byte-opt gv bytecomp
byte-compile cconv japan-util iso-transl tooltip eldoc paren electric
uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote threads dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 56999 7728)
 (symbols 48 6798 1)
 (strings 32 18661 1737)
 (string-bytes 1 647490)
 (vectors 16 15535)
 (vector-slots 8 283325 14019)
 (floats 8 21 41)
 (intervals 56 342 0)
 (buffers 992 11))




Acknowledgement sent to taku0 <e8vdgnvs_taku0@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#58015; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 23 Sep 2022 16:15:02 UTC

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