[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
Can one modify a variable definition in a major mode depending on buffer name?
Sat, 30 Jul 2016 07:54:09 -0500
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.