unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nicholas Vollmer <nv@parenthetic.dev>
To: 71382@debbugs.gnu.org
Subject: bug#71382: 30.0.50; [WISHLIST] loaddefs-generate--make-autoload should expose variables which can be added to
Date: Wed, 05 Jun 2024 06:40:26 -0400	[thread overview]
Message-ID: <871q5bpt9h.fsf@parenthetic.dev> (raw)


When improving EXWM, we wanted to write a macro which expanded to 
a global minor mode definition. However, adding an ;;;###autoload 
cookie did not generate the proper autoloads because 
loaddefs-generate--make-autoload had no way of knowing our macro 
needed to be expanded first. It would be nice if these lists in 
loaddefs-generate--make-autoload  could be moved out into a 
variable, so it can be added to programmatically:

     ;; For complex cases, try again on the macro-expansion.
     ((and (memq car '(easy-mmode-define-global-mode 
     define-global-minor-mode
                       define-globalized-minor-mode defun defmacro
		       easy-mmode-define-minor-mode define-minor-mode
                       define-inline cl-defun cl-defmacro 
                       cl-defgeneric
                       cl-defstruct pcase-defmacro iter-defun 
                       cl-iter-defun))
           (macrop car)


     ;; For special function-like operators, use the `autoload' 
     function.

     ((memq car '(define-skeleton define-derived-mode
                   define-compilation-mode define-generic-mode
		   easy-mmode-define-global-mode define-global-minor-mode
		   define-globalized-minor-mode
		   easy-mmode-define-minor-mode define-minor-mode
		   cl-defun defun* cl-defmacro defmacro*
                   define-overloadable-function
                   transient-define-prefix transient-define-suffix
                   transient-define-infix 
                   transient-define-argument))

That would prevent another package like transient from having to 
patch loaddefs-gen.el directly.





                 reply	other threads:[~2024-06-05 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871q5bpt9h.fsf@parenthetic.dev \
    --to=nv@parenthetic.dev \
    --cc=71382@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).