From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org>
Subject: autoload function with arguments
Date: Thu, 15 Aug 2024 01:09:06 +0000 [thread overview]
Message-ID: <42nLYdyOmiMuAfVSG6ZJi02CR6X0Cp6tWOp-xlkwcYuZFURB3XvFnv34TPwMafIDTDOGQBKckERRBexiCuqGpbufKaztTlZ-fjSmzh5eob0=@protonmail.com> (raw)
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)) ))
next reply other threads:[~2024-08-15 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 1:09 Heime [this message]
2024-08-15 5:19 ` autoload function with arguments 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
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='42nLYdyOmiMuAfVSG6ZJi02CR6X0Cp6tWOp-xlkwcYuZFURB3XvFnv34TPwMafIDTDOGQBKckERRBexiCuqGpbufKaztTlZ-fjSmzh5eob0=@protonmail.com' \
--to=heimeborgia@protonmail.com \
--cc=help-gnu-emacs@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.
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).