help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can one modify a variable definition in a major mode depending on bu


From: Michael Heerdegen
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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]