From: Michael Heerdegen <michael_heerdegen@web.de>
To: Tom Browder <tom.browder@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Can one modify a variable definition in a major mode depending on buffer name?
Date: Tue, 02 Aug 2016 03:28:59 +0200 [thread overview]
Message-ID: <87fuqoc61w.fsf@web.de> (raw)
In-Reply-To: <CAFMGiz-E+yuuKqy_+bCienEFxYkMKkz9eLs8bNjvyiNFGqhZzg@mail.gmail.com> (Tom Browder's message of "Sat, 30 Jul 2016 12:48:32 -0500")
Tom Browder <tom.browder@gmail.com> writes:
> > (add-to-list 'auto-mode-alist '("\\.nqp\\'" . nqp-mode))
> >
> > (define-derived-mode nqp-mode perl-mode "NQP"
> > "Major mode for NQP's subset of Perl 6."
> > (setq-local the-var-i-need-to-change the-new-value))
>
>
> Stefan, are those lines the entire contents of a "nqp-mode.el" file?
[I'm not Stefan]
Yes, that should exactly do what you want. It's more or less the
canonical solution for your problem (do you miss anything?).
Michael.
next prev parent reply other threads:[~2016-08-02 1:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 12:54 Can one modify a variable definition in a major mode depending on buffer name? Tom Browder
2016-07-30 14:26 ` Emanuel Berg
2016-07-30 16:22 ` Tom Browder
2016-07-30 17:00 ` Emanuel Berg
2016-07-30 17:28 ` Tom Browder
2016-07-30 16:37 ` John Mastro
2016-07-30 17:33 ` Tom Browder
2016-07-30 17:37 ` Stefan Monnier
2016-07-30 17:48 ` Tom Browder
2016-07-30 17:48 ` Tom Browder
2016-08-02 1:28 ` Michael Heerdegen [this message]
2016-08-02 1:35 ` Tom Browder
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuqoc61w.fsf@web.de \
--to=michael_heerdegen@web.de \
--cc=help-gnu-emacs@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=tom.browder@gmail.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.
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.