unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: goncholden via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: goncholden via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Using variables to set defaults to parameters
Date: Thu, 03 Feb 2022 14:55:57 +0000	[thread overview]
Message-ID: <-FFY39s9gf027CaRqTOHR5D_xsFqho--WNpfqfGxVCqZebyGIOwTYInT6s8m2nNkEBEvuPRudAmVVAO4LwOCGp0OFNM7lKwmL3EP0obBLJo=@protonmail.com> (raw)

I am currently defining a minor-mode with default parameters, but want to pass defaulted variables
instead. What is the way to do this, using setq ?

(define-minor-mode rich-minor-mode
"Brief description" nil "" nil

then changed to

(setq initval nil)
(setq mdline-indic "")
(setq other nil)

(define-minor-mode rich-minor-mode
"Brief description" initval mdline-indic other

             reply	other threads:[~2022-02-03 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 14:55 goncholden via Users list for the GNU Emacs text editor [this message]
2022-02-03 16:24 ` Using variables to set defaults to parameters Stefan Monnier via Users list for the GNU Emacs text editor
2022-02-03 18:20   ` goncholden
2022-02-03 18:43     ` goncholden

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='-FFY39s9gf027CaRqTOHR5D_xsFqho--WNpfqfGxVCqZebyGIOwTYInT6s8m2nNkEBEvuPRudAmVVAO4LwOCGp0OFNM7lKwmL3EP0obBLJo=@protonmail.com' \
    --to=help-gnu-emacs@gnu.org \
    --cc=goncholden@protonmail.com \
    /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).