Emacs: customize my svg-mode-line-theme

This commit is contained in:
Tom Willemsen 2013-03-11 00:33:42 +01:00
parent 937e273292
commit 07586eb43b

View file

@ -433,10 +433,31 @@
a theme. a theme.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun oni:smt/minor-mode-indicator-text (widget)
(let ((text (concat
(when (bound-and-true-p auto-complete-mode) "C")
(when (bound-and-true-p auto-fill-mode) "F")
(when (bound-and-true-p eldoc-mode) "D"))))
(if (plusp (length text))
(concat " " text)
"")))
(smt/deftheme yoshi
:prototype 'black-crystal
:local-widgets
(lambda (theme)
(let ((parent-local-widgets
(smt/t-local-widgets (smt/t-prototype theme))))
(append (list (cons 'minor-modes
(smt/make-widget
:prototye 'minor-modes
:text 'oni:smt/minor-mode-indicator-text)))
parent-local-widgets))))
(defun oni:enable-svg-mode-line-theme () (defun oni:enable-svg-mode-line-theme ()
"Enable `svg-mode-line-theme' and select a theme." "Enable `svg-mode-line-theme' and select a theme."
(smt/enable) (smt/enable)
(smt/set-theme 'black-crystal)) (smt/set-theme 'yoshi))
(add-hook 'emacs-startup-hook 'oni:enable-svg-mode-line-theme) (add-hook 'emacs-startup-hook 'oni:enable-svg-mode-line-theme)
#+END_SRC #+END_SRC