all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* conditionally enabling a mode in define-minor-mode context
@ 2014-05-11  8:50 Matthias Dahl
  2014-05-11 19:30 ` Drew Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Dahl @ 2014-05-11  8:50 UTC (permalink / raw)
  To: help-gnu-emacs

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-13 15:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-11  8:50 conditionally enabling a mode in define-minor-mode context Matthias Dahl
2014-05-11 19:30 ` Drew Adams
2014-05-13 15:14   ` Matthias Dahl

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.