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

Previous Next

Package: emacs;

Reported by: taku0 <e8vdgnvs_taku0 <at> tatapa.org>

Date: Fri, 23 Sep 2022 05:35:02 UTC

Severity: normal

Found in version 28.1

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 58015 in the body.
You can then email your comments to 58015 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#58015; Package emacs. (Fri, 23 Sep 2022 05:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to taku0 <e8vdgnvs_taku0 <at> tatapa.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 23 Sep 2022 05:35:02 GMT) Full text and rfc822 format available.

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

From: taku0 <e8vdgnvs_taku0 <at> tatapa.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1; `make-autoload' doesn't respect `:group' of `defgroup'
Date: Fri, 23 Sep 2022 14:16:09 +0900
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))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#58015; Package emacs. (Fri, 23 Sep 2022 16:08:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: taku0 <e8vdgnvs_taku0 <at> tatapa.org>
Cc: 58015 <at> debbugs.gnu.org
Subject: Re: bug#58015: 28.1; `make-autoload' doesn't respect `:group' of
 `defgroup'
Date: Fri, 23 Sep 2022 18:06:49 +0200
taku0 <e8vdgnvs_taku0 <at> tatapa.org> 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.




bug marked as fixed in version 29.1, send any further explanations to 58015 <at> debbugs.gnu.org and taku0 <e8vdgnvs_taku0 <at> tatapa.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 23 Sep 2022 16:08:02 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. (Sat, 22 Oct 2022 11:24:04 GMT) Full text and rfc822 format available.

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

Previous Next


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