* Switching Themes using custom functions
@ 2013-11-10 11:37 G. Martin Butz
0 siblings, 0 replies; only message in thread
From: G. Martin Butz @ 2013-11-10 11:37 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
as I sometimes want to switch themes and I have several custom colors
(e.g. power line colors) I build some functions to do that (badly hacked
as my lisp knowledge is close to zero). Here is an example:
(defun theme-s ()
"Switch to Solarized-Theme"
(interactive)
;; disable current theme
(defadvice load-theme
(before theme-dont-propagate activate)
(mapcar #'disable-theme custom-enabled-themes))
(load-theme 'solarized-dark t)
;; power line (solarized)
(set-face-attribute 'mode-line nil
:background "#586e75"
:box nil)
(set-face-attribute 'mode-line-inactive nil
:box nil)
(setq powerline-color1 "#002b36")
(setq powerline-color2 "#073642")
(set-face-background 'region "#839496")
(set-face-background 'hl-line "#073642")
(set-face-background 'region "#454545")
(set-face-background 'fringe "#002b36")
(set-face-foreground 'fringe "#002b36")
(setq indicate-buffer-boundaries 'right)
(setq indicate-empty-lines nil)
(setq-default cursor-type 'bar)
(set-cursor-color "#fdf6e3")
)
This basically works but I wonder why e.g. the region background color
is not loaded when using this function. I can eval the function and all
works well but if I call the function some of it will be applied and
some of it not (especially the region background color).
Any idea what I am doing wrong?
Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| G. Martin Butz, mb@mkblog.org, 0421 98749324, www.mkblog.org |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-10 11:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-10 11:37 Switching Themes using custom functions G. Martin Butz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).