all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* god-mode color
@ 2014-08-26 15:49 BP
  2014-08-28 22:03 ` Michael Heerdegen
  0 siblings, 1 reply; 2+ messages in thread
From: BP @ 2014-08-26 15:49 UTC (permalink / raw)
  To: help-gnu-emacs

Hi everyone!

I'm trying to make some cosmetic changes of my emacs depending on god-mode state. For now I have this :

(defun my-update-color ()
  (setq cursor-type (if (or god-local-mode buffer-read-only)
                        'box
                      'bar))
  (set-cursor-color (if (or god-local-mode buffer-read-only)
                        "firebrick1"
                      "LawnGreen"))
  (set-face-background 'mode-line (if (or god-local-mode buffer-read-only)
                        "red4"
                      "DarkCyan")))

(add-hook 'god-mode-enabled-hook 'my-update-color)
(add-hook 'god-mode-disabled-hook 'my-update-color)

However my-update-color is not called when I switch to another buffer and the appearance of emacs remains unchanged whatever the state of god-mode in the new buffer.

Does anyone have an idea to make the color update correctly?

Thanks,

BP


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

end of thread, other threads:[~2014-08-28 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 15:49 god-mode color BP
2014-08-28 22:03 ` Michael Heerdegen

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.