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: Tom Browder
Subject: Re: Can one modify a variable definition in a major mode depending on buffer name?
Date: Mon, 1 Aug 2016 20:35:53 -0500

On Monday, August 1, 2016, Michael Heerdegen <address@hidden>
wrote:

> Tom Browder <address@hidden <javascript:;>> 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?).


Thanks, Michael.  The reason I asked if that was all is that often we see a
solution that is not exactly  "cookbook"  because it leaves out things that
make it complete.  I have not tried it yet but will tomorrow.

Best regards,

-Tom


reply via email to

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