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

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

RE: conditionally enabling a mode in define-minor-mode context


From: Drew Adams
Subject: RE: conditionally enabling a mode in define-minor-mode context
Date: Sun, 11 May 2014 12:30:34 -0700 (PDT)

> I'm currently working on a new minor mode which requires that for every
> newly opened buffer/file which matches several dynamic conditions, it
> enables itself (that is key bindings, lighter and such) and otherwise it
> silently does nothing (no key bindings, lighter or whatever). Those
> conditions go beyond simply tying it to certain major modes or alike.
> 
> Is this possible?

Without thinking much about it, I'm guessing you could define two minor
modes, one of which you turn on everywhere and which controls the
conditional enabling of the other.  Again, just a thought, without
reflection - ignore if not helpful.



reply via email to

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