From: Tom Browder <tom.browder@gmail.com>
To: 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 07:54:09 -0500 [thread overview]
Message-ID: <CAFMGiz9Qq7TUMqxM4EjGsTcZVn3-S65XrnE6jORQSSuih-_zhw@mail.gmail.com> (raw)
I think I can do that, with some experimentation, but can anyone confirm
that it's reasonably possible?
My use case is modifying our perl6-mode for the slight difference in
allowable identifiers between Perl 6 and NQP (Not Quite Perl). By
convention, nqp files end in ".nqp" so that the buffer name should be a
good way to automatically change the single regex bound to a var name in
the mode file. That would save having to write another major mode just for
such a small change.
Thanks.
Best regards,
-Tom
next reply other threads:[~2016-07-30 12:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 12:54 Tom Browder [this message]
2016-07-30 14:26 ` Can one modify a variable definition in a major mode depending on buffer name? 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
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=CAFMGiz9Qq7TUMqxM4EjGsTcZVn3-S65XrnE6jORQSSuih-_zhw@mail.gmail.com \
--to=tom.browder@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.