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

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

conditionally enabling a mode in define-minor-mode context


From: Matthias Dahl
Subject: conditionally enabling a mode in define-minor-mode context
Date: Sun, 11 May 2014 10:50:20 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hello @all...

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.

Basically, it is a global minor mode w/ a snobbish attitude. ;)

I cannot get my head around it how to do this w/ define-minor-mode and
define-globalized-minor-mode.

Is this possible? Or am I going at it from the wrong angle and there is
a more Emacs/elisp idiomatic way to approach this kind of problem?

Thanks a lot in advance for each and every help. :)

So long,
Matthias

-- 
Dipl.-Inf. (FH) Matthias Dahl | Software Engineer | binary-island.eu
 services: custom software [desktop, mobile, web], server administration



reply via email to

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