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

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

Can one modify a variable definition in a major mode depending on buffer


From: Tom Browder
Subject: Can one modify a variable definition in a major mode depending on buffer name?
Date: Sat, 30 Jul 2016 12:33:57 -0500

On Saturday, July 30, 2016, John Mastro <address@hidden
<javascript:_e(%7B%7D,'cvml','address@hidden');>> wrote:

> >   (let*((filename       (buffer-name))
> >         (filename-parts (split-string filename "\\."))
> >         (extention      (cadr filename-parts) ))
> >     (when (string-equal extention "nqp")
> >       (setq-local perl-propaganda "Do it today, in a different way!") )))
>
> aka (when (string-match-p "\\.nqp\\'" (buffer-name)) ...


Thanks, John. It seems like elisp has the same motto as Perl, i.e.,
"TIMTOWTDI."

Best,

-Tom


reply via email to

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