From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: add argument to a derived-mode
Date: Fri, 13 Jan 2017 09:37:07 -0500 [thread overview]
Message-ID: <jwv4m13uiw5.fsf-monnier+gmane.emacs.help@gnu.org> (raw)
In-Reply-To: 20170112163817.14999b2a@gauss
> Is there a way to use define-derived-mode to
> create a major mode that takes an argument if
> the base mode does not?
Major modes do not take arguments, no.
Instead, you'll want to define 2 functions:
- a major mode
- the function you want, with its argument, and which internally calls
the major mode.
Stefan
next prev parent reply other threads:[~2017-01-13 14:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 0:38 add argument to a derived-mode Joe Riel
2017-01-13 14:37 ` Stefan Monnier [this message]
2017-01-15 20:49 ` Joe Riel
2017-01-15 22:33 ` Stefan Monnier
2017-01-16 1:53 ` Joe Riel
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=jwv4m13uiw5.fsf-monnier+gmane.emacs.help@gnu.org \
--to=monnier@iro.umontreal.ca \
--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).