unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58015: 28.1; `make-autoload' doesn't respect `:group' of `defgroup'
@ 2022-09-23  5:16 taku0
  2022-09-23 16:06 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: taku0 @ 2022-09-23  5:16 UTC (permalink / raw)
  To: 58015

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))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#58015: 28.1; `make-autoload' doesn't respect `:group' of `defgroup'
  2022-09-23  5:16 bug#58015: 28.1; `make-autoload' doesn't respect `:group' of `defgroup' taku0
@ 2022-09-23 16:06 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-23 16:06 UTC (permalink / raw)
  To: taku0; +Cc: 58015

taku0 <e8vdgnvs_taku0@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.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-23 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-23  5:16 bug#58015: 28.1; `make-autoload' doesn't respect `:group' of `defgroup' taku0
2022-09-23 16:06 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).