unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tom Browder <tom.browder@gmail.com>
To: John Mastro <john.b.mastro@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Can one modify a variable definition in a major mode depending on buffer name?
Date: Sat, 30 Jul 2016 12:33:57 -0500	[thread overview]
Message-ID: <CAFMGiz_HS1pqHO-J05PgkZHkmqSYnZbQ3=GBJsji=9_f7Jfc5A@mail.gmail.com> (raw)
In-Reply-To: <CAOj2CQSxPeCXT8mckSjZ-O-eMxbW-NHLCbTJa3Tr6O2bFtH_=w@mail.gmail.com>

On Saturday, July 30, 2016, John Mastro <john.b.mastro@gmail.com
<javascript:_e(%7B%7D,'cvml','john.b.mastro@gmail.com');>> 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	other threads:[~2016-07-30 17:33 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 [this message]
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
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

  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='CAFMGiz_HS1pqHO-J05PgkZHkmqSYnZbQ3=GBJsji=9_f7Jfc5A@mail.gmail.com' \
    --to=tom.browder@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=john.b.mastro@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.
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).