all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* advice on a variable
@ 2002-12-17  7:33 Ittay Freiman
  2002-12-17  9:26 ` Kai Großjohann
  2002-12-17 16:43 ` Kevin Rodgers
  0 siblings, 2 replies; 3+ messages in thread
From: Ittay Freiman @ 2002-12-17  7:33 UTC (permalink / raw)


hi,

i'm writing a minor mode which binds some keys in a minor mode map. i
would like it to be turned on/off globally, but i also want it to be
disabled for some buffer types / major modes.

the best 'trick' would be, i think, to be able to advice the mode
variable (a.k.a ittay-mode) so that when its value is gotten it will
actually run a function that, based on the current buffer and the
global value will return t/nil. then i put the mode variable and the
map in minor-mode-map-alist.

how can this be done? (i've tried using defcustom with :get, but
simply evaluating the variable's value doesn't go through it). I don't
want to make it local and set its values based in hooks.

thanx,
ittay

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

end of thread, other threads:[~2002-12-17 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-17  7:33 advice on a variable Ittay Freiman
2002-12-17  9:26 ` Kai Großjohann
2002-12-17 16:43 ` Kevin Rodgers

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.