* autoload function with arguments
@ 2024-08-15 1:09 Heime
2024-08-15 5:19 ` Joel Reicher
0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-08-15 1:09 UTC (permalink / raw)
To: Heime via Users list for the GNU Emacs text editor
I am making a minor-mode. Is an autoload function with arguments allowed.
As with
;;;###autoload
(defun tema-mdhooks (actn)
"Manage the activation of tema-minor-mode for various major modes."
(let ( (mdhooks '(sh-mode-hook emacs-lisp-mode-hook))
(hook-fn (cond
((eq actn 'add) #'add-hook)
((eq actn 'remove) #'remove-hook)
(t (error "ACTM %s is invalid" actm)))) )
(dolist (mdhook mdhooks)
(funcall hook-fn mdhook #'tema-minor-mode)) ))
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: autoload function with arguments
2024-08-15 1:09 autoload function with arguments Heime
@ 2024-08-15 5:19 ` Joel Reicher
2024-08-15 12:07 ` Heime
0 siblings, 1 reply; 5+ messages in thread
From: Joel Reicher @ 2024-08-15 5:19 UTC (permalink / raw)
To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor
Heime <heimeborgia@protonmail.com> writes:
> I am making a minor-mode. Is an autoload function with
> arguments allowed.
What do you mean by "allowed"? Did you get an error when you used
your code?
You can also check (info "(elisp) Autoload") or look at some
sample core code if you are worried.
Cheers,
- Joel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: autoload function with arguments
2024-08-15 5:19 ` Joel Reicher
@ 2024-08-15 12:07 ` Heime
2024-08-16 11:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 5+ messages in thread
From: Heime @ 2024-08-15 12:07 UTC (permalink / raw)
To: Joel Reicher; +Cc: Heime via Users list for the GNU Emacs text editor
Sent with Proton Mail secure email.
On Thursday, August 15th, 2024 at 5:19 PM, Joel Reicher <joel.reicher@gmail.com> wrote:
> Heime heimeborgia@protonmail.com writes:
>
> > I am making a minor-mode. Is an autoload function with
> > arguments allowed.
>
>
> What do you mean by "allowed"? Did you get an error when you used
> your code?
>
> You can also check (info "(elisp) Autoload") or look at some
> sample core code if you are worried. - Joel
Have you seen packages that autoload functions with arguments ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: autoload function with arguments
2024-08-15 12:07 ` Heime
@ 2024-08-16 11:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-08-18 22:35 ` Heime
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-08-16 11:14 UTC (permalink / raw)
To: help-gnu-emacs
> Have you seen packages that autoload functions with arguments ?
I'd ask
grep -A1 ';;;###autoload' **/*.el
- Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: autoload function with arguments
2024-08-16 11:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
@ 2024-08-18 22:35 ` Heime
0 siblings, 0 replies; 5+ messages in thread
From: Heime @ 2024-08-18 22:35 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
Sent with Proton Mail secure email.
On Friday, August 16th, 2024 at 11:14 PM, Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:
> > Have you seen packages that autoload functions with arguments ?
>
>
> I'd ask
>
> grep -A1 ';;;###autoload' **/*.el
>
>
> - Stefan
Right. There exist almost everything. Anything goes with autoload it seems to me.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-08-18 22:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15 1:09 autoload function with arguments Heime
2024-08-15 5:19 ` Joel Reicher
2024-08-15 12:07 ` Heime
2024-08-16 11:14 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-08-18 22:35 ` Heime
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.