Add some default custom themes.
* cus-theme.el (custom-theme--listed-faces): Add cursor face. (describe-theme-1): Extract doc from unloaded themes. * custom.el (custom-theme-name-valid-p): Don't list color-themes. * themes/tango-theme.el: * themes/tango-dark-theme.el: * themes/wheatgrass-theme.el: New files.
This commit is contained in:
parent
aba1381b22
commit
2919746c64
6 changed files with 291 additions and 11 deletions
|
@ -1,3 +1,14 @@
|
|||
2010-10-12 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* cus-theme.el (custom-theme--listed-faces): Add cursor face.
|
||||
(describe-theme-1): Extract doc from unloaded themes.
|
||||
|
||||
* custom.el (custom-theme-name-valid-p): Don't list color-themes.
|
||||
|
||||
* themes/tango-theme.el:
|
||||
* themes/tango-dark-theme.el:
|
||||
* themes/wheatgrass-theme.el: New files.
|
||||
|
||||
2010-10-12 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* cus-theme.el (describe-theme, customize-themes)
|
||||
|
|
|
@ -56,7 +56,7 @@ Do not call this mode function yourself. It is meant for internal use."
|
|||
(defvar custom-theme-insert-variable-marker nil)
|
||||
(defvar custom-theme-insert-face-marker nil)
|
||||
|
||||
(defvar custom-theme--listed-faces '(default fixed-pitch
|
||||
(defvar custom-theme--listed-faces '(default cursor fixed-pitch
|
||||
variable-pitch escape-glyph minibuffer-prompt highlight region
|
||||
shadow secondary-selection trailing-whitespace
|
||||
font-lock-builtin-face font-lock-comment-delimiter-face
|
||||
|
@ -478,21 +478,37 @@ It includes all faces in list FACES."
|
|||
(princ " is a custom theme")
|
||||
(let ((fn (locate-file (concat (symbol-name theme) "-theme.el")
|
||||
(cons custom-theme-directory load-path)
|
||||
'("" "c"))))
|
||||
'("" "c")))
|
||||
doc)
|
||||
(when fn
|
||||
(princ " in `")
|
||||
(help-insert-xref-button (file-name-nondirectory fn)
|
||||
'help-theme-def fn)
|
||||
(princ "'"))
|
||||
(princ ".\n"))
|
||||
(if (not (memq theme custom-known-themes))
|
||||
(princ "It is not loaded.")
|
||||
(if (custom-theme-enabled-p theme)
|
||||
(princ "It is loaded and enabled.\n")
|
||||
(princ "It is loaded but disabled.\n"))
|
||||
(princ "\nDocumentation:\n")
|
||||
(princ (or (get theme 'theme-documentation)
|
||||
"No documentation available.")))
|
||||
(princ ".\n")
|
||||
(if (not (memq theme custom-known-themes))
|
||||
(progn
|
||||
(princ "It is not loaded.")
|
||||
;; Attempt to grab the theme documentation
|
||||
(when fn
|
||||
(with-temp-buffer
|
||||
(insert-file-contents fn)
|
||||
(let ((sexp (let ((read-circle nil))
|
||||
(condition-case nil
|
||||
(read (current-buffer))
|
||||
(end-of-file nil)))))
|
||||
(and sexp (listp sexp)
|
||||
(eq (car sexp) 'deftheme)
|
||||
(setq doc (nth 2 sexp)))))))
|
||||
(if (custom-theme-enabled-p theme)
|
||||
(princ "It is loaded and enabled.")
|
||||
(princ "It is loaded but disabled."))
|
||||
(setq doc (get theme 'theme-documentation)))
|
||||
|
||||
(princ "\n\nDocumentation:\n")
|
||||
(princ (if (stringp doc)
|
||||
doc
|
||||
"No documentation available.")))
|
||||
(princ "\n\nYou can ")
|
||||
(help-insert-xref-button "customize" 'help-theme-edit theme)
|
||||
(princ " this theme."))
|
||||
|
|
|
@ -1149,6 +1149,9 @@ NAME should be a symbol."
|
|||
(and (symbolp name)
|
||||
name
|
||||
(not (or (zerop (length (symbol-name name)))
|
||||
;; There's a third-party package named color-theme.el.
|
||||
;; Don't treat that as a theme.
|
||||
(eq name 'color)
|
||||
(eq name 'cus)
|
||||
(eq name 'user)
|
||||
(eq name 'changed)))))
|
||||
|
|
92
lisp/themes/tango-dark-theme.el
Normal file
92
lisp/themes/tango-dark-theme.el
Normal file
|
@ -0,0 +1,92 @@
|
|||
;;; tango-dark-theme.el --- Tango-based custom theme for faces
|
||||
|
||||
;; Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary
|
||||
|
||||
;; The colors in this theme come from the Tango palette, which is in
|
||||
;; the public domain: http://tango.freedesktop.org/
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme tango-dark
|
||||
"Theme for faces, based on the Tango palette on a dark background.
|
||||
Basic, Font Lock, Isearch, Gnus, and Message faces are included.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'tango-dark
|
||||
'(default ((t (:foreground "#eeeeec" :background "#2e3436"))))
|
||||
'(cursor ((t (:foreground "#2e3436" :background "#fce94f"))))
|
||||
'(highlight ((t (:foreground "#2e3436" :background "#edd400"))))
|
||||
'(region ((t (:background "#555753"))))
|
||||
'(font-lock-builtin-face ((t (:foreground "#ad7fa8"))))
|
||||
'(font-lock-comment-face ((t (:foreground "#73d216"))))
|
||||
'(font-lock-constant-face ((t (:foreground "#e6a8df"))))
|
||||
'(font-lock-function-name-face ((t (:foreground "#fce94f"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "#8cc4ff"))))
|
||||
'(font-lock-string-face ((t (:foreground "#e9b96e"))))
|
||||
'(font-lock-type-face ((t (:foreground "#a5ff4d"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "#fcaf3e"))))
|
||||
'(font-lock-warning-face ((t (:foreground "#ef2929"))))
|
||||
'(button ((t (:underline t :foreground "#729fcf"))))
|
||||
'(link ((t (:underline t :foreground "#729fcf"))))
|
||||
'(link-visited ((t (:underline t :foreground "#3465a4"))))
|
||||
'(mode-line ((t (:box (:line-width -1 :style released-button)
|
||||
:background "#d3d7cf" :foreground "black"))))
|
||||
'(mode-line-inactive ((t (:box (:line-width -1 :style released-button)
|
||||
:background "#555753" :foreground "white"))))
|
||||
'(isearch ((t (:foreground "#ffffff" :background "#ce5c00"))))
|
||||
'(lazy-highlight ((t (:background "#8f5902"))))
|
||||
'(gnus-group-news-1 ((t (:foreground "#ad7fa8"))))
|
||||
'(gnus-group-news-1-low ((t (:foreground "#75507b"))))
|
||||
'(gnus-group-news-2 ((t (:foreground "#729fcf"))))
|
||||
'(gnus-group-news-2-low ((t (:foreground "#3465a4"))))
|
||||
'(gnus-group-news-3 ((t (:foreground "#8ae234"))))
|
||||
'(gnus-group-news-3-low ((t (:foreground "#73d216"))))
|
||||
'(gnus-group-news-4 ((t (:foreground "#e9b9e6"))))
|
||||
'(gnus-group-news-4-low ((t (:foreground "#c17d11"))))
|
||||
'(gnus-group-news-5 ((t (:foreground "#fcaf3e"))))
|
||||
'(gnus-group-news-5-low ((t (:foreground "#f57900"))))
|
||||
'(gnus-group-news-low ((t (:foreground "#edd400"))))
|
||||
'(gnus-group-mail-1 ((t (:foreground "#ad7fa8"))))
|
||||
'(gnus-group-mail-1-low ((t (:foreground "#75507b"))))
|
||||
'(gnus-group-mail-2 ((t (:foreground "#729fcf"))))
|
||||
'(gnus-group-mail-2-low ((t (:foreground "#3465a4"))))
|
||||
'(gnus-group-mail-3 ((t (:foreground "#8ae234"))))
|
||||
'(gnus-group-mail-3-low ((t (:foreground "#73d216"))))
|
||||
'(gnus-group-mail-low ((t (:foreground "#edd400"))))
|
||||
'(gnus-header-content ((t (:weight normal :foreground "#c4a000"))))
|
||||
'(gnus-header-from ((t (:foreground "#edd400"))))
|
||||
'(gnus-header-subject ((t (:foreground "#8ae234"))))
|
||||
'(gnus-header-name ((t (:foreground "#729fcf"))))
|
||||
'(gnus-header-newsgroups ((t (:foreground "#c17d11"))))
|
||||
'(message-header-name ((t (:foreground "#729fcf"))))
|
||||
'(message-header-cc ((t (:foreground "#c4a000"))))
|
||||
'(message-header-other ((t (:foreground "#c17d11"))))
|
||||
'(message-header-subject ((t (:foreground "#8ae234"))))
|
||||
'(message-header-to ((t (:foreground "#edd400"))))
|
||||
'(message-cited-text ((t (:foreground "#8ae234"))))
|
||||
'(message-separator ((t (:foreground "#ad7fa8")))))
|
||||
|
||||
(provide-theme 'tango-dark)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
;;; tango-dark-theme.el ends here
|
92
lisp/themes/tango-theme.el
Normal file
92
lisp/themes/tango-theme.el
Normal file
|
@ -0,0 +1,92 @@
|
|||
;;; tango-theme.el --- Tango-based custom theme for faces
|
||||
|
||||
;; Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary
|
||||
|
||||
;; The colors in this theme come from the Tango palette, which is in
|
||||
;; the public domain: http://tango.freedesktop.org/
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme tango
|
||||
"Theme for faces, based on the Tango palette on a light background.
|
||||
Basic, Font Lock, Isearch, Gnus, and Message faces are included.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'tango
|
||||
'(default ((t (:foreground "#16191a" :background "#eeeeec"))))
|
||||
'(cursor ((t (:foreground "#eeeeec" :background "#204a87"))))
|
||||
'(highlight ((t (:background "#babdb6"))))
|
||||
'(region ((t (:background "#babdb6"))))
|
||||
'(font-lock-builtin-face ((t (:weight bold :foreground "#204a87"))))
|
||||
'(font-lock-comment-face ((t (:foreground "#204a87"))))
|
||||
'(font-lock-constant-face ((t (:weight bold :foreground "#5c3566"))))
|
||||
'(font-lock-function-name-face ((t (:weight bold :foreground "#ce5c00"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "#a40000"))))
|
||||
'(font-lock-string-face ((t (:foreground "#5c3566"))))
|
||||
'(font-lock-type-face ((t (:weight bold :foreground "#4e9a06"))))
|
||||
'(font-lock-variable-name-face ((t (:weight bold :foreground "#c17d11"))))
|
||||
'(font-lock-warning-face ((t (:foreground "#cc0000"))))
|
||||
'(button ((t (:underline t :foreground "#204a87"))))
|
||||
'(link ((t (:underline t :foreground "#204a87"))))
|
||||
'(link-visited ((t (:underline t :foreground "#3465a4"))))
|
||||
'(mode-line ((t (:box (:line-width -1 :style released-button)
|
||||
:background "#d3d7cf" :foreground "black"))))
|
||||
'(mode-line-inactive ((t (:box (:line-width -1 :style released-button)
|
||||
:background "#babdb6" :foreground "black"))))
|
||||
'(isearch ((t (:foreground "#ffffff" :background "#ce5c00"))))
|
||||
'(lazy-highlight ((t (:background "#e9b96e"))))
|
||||
'(gnus-group-news-1 ((t (:weight bold :foreground "#5c3566"))))
|
||||
'(gnus-group-news-1-low ((t (:foreground "#5c3566"))))
|
||||
'(gnus-group-news-2 ((t (:weight bold :foreground "#204a87"))))
|
||||
'(gnus-group-news-2-low ((t (:foreground "#204a87"))))
|
||||
'(gnus-group-news-3 ((t (:weight bold :foreground "#4e0a06"))))
|
||||
'(gnus-group-news-3-low ((t (:foreground "#4e0a06"))))
|
||||
'(gnus-group-news-4 ((t (:weight bold :foreground "#7a4c02"))))
|
||||
'(gnus-group-news-4-low ((t (:foreground "#7a4c02"))))
|
||||
'(gnus-group-news-5 ((t (:weight bold :foreground "#ce5c00"))))
|
||||
'(gnus-group-news-5-low ((t (:foreground "#ce5c00"))))
|
||||
'(gnus-group-news-low ((t (:foreground "#888a85"))))
|
||||
'(gnus-group-mail-1 ((t (:weight bold :foreground "#5c3566"))))
|
||||
'(gnus-group-mail-1-low ((t (:foreground "#5c3566"))))
|
||||
'(gnus-group-mail-2 ((t (:weight bold :foreground "#204a87"))))
|
||||
'(gnus-group-mail-2-low ((t (:foreground "#204a87"))))
|
||||
'(gnus-group-mail-3 ((t (:weight bold :foreground "#4e0a06"))))
|
||||
'(gnus-group-mail-3-low ((t (:foreground "#4e0a06"))))
|
||||
'(gnus-group-mail-low ((t (:foreground "#888a85"))))
|
||||
'(gnus-header-content ((t (:foreground "#4e9a06"))))
|
||||
'(gnus-header-from ((t (:weight bold :foreground "#c4a000"))))
|
||||
'(gnus-header-subject ((t (:foreground "#4e0a06"))))
|
||||
'(gnus-header-name ((t (:foreground "#204a87"))))
|
||||
'(gnus-header-newsgroups ((t (:foreground "#888a85"))))
|
||||
'(message-header-name ((t (:foreground "#204a87"))))
|
||||
'(message-header-cc ((t (:foreground "#c4a000"))))
|
||||
'(message-header-other ((t (:foreground "#c17d11"))))
|
||||
'(message-header-subject ((t (:foreground "#4e0a06"))))
|
||||
'(message-header-to ((t (:weight bold :foreground "#c4a000"))))
|
||||
'(message-cited-text ((t (:foreground "#888a85"))))
|
||||
'(message-separator ((t (:weight bold :foreground "#4e9a06")))))
|
||||
|
||||
(provide-theme 'tango)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
;;; tango-theme.el ends here
|
66
lisp/themes/wheatgrass-theme.el
Normal file
66
lisp/themes/wheatgrass-theme.el
Normal file
|
@ -0,0 +1,66 @@
|
|||
;;; wheatgrass-theme.el --- custom theme for faces
|
||||
|
||||
;; Copyright (C) 2010 Free Software Foundation, Inc.
|
||||
|
||||
;; This file is part of GNU Emacs.
|
||||
|
||||
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme wheatgrass
|
||||
"Theme for basic, Font Lock, Isearch, Gnus, and Message faces.
|
||||
The default face is wheat on a black background. Other faces
|
||||
are in shades of green, brown, and blue.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'wheatgrass
|
||||
'(default ((t (:foreground "wheat" :background "black"))))
|
||||
'(cursor ((t (:foreground "black" :background "thistle"))))
|
||||
'(highlight ((t (:foreground "white" :background "dark green"))))
|
||||
'(region ((t (:foreground "white" :background "dark green"))))
|
||||
'(font-lock-builtin-face ((t (:foreground "LightSteelBlue"))))
|
||||
'(font-lock-comment-face ((t (:foreground "SpringGreen3"))))
|
||||
'(font-lock-constant-face ((t (:foreground "turquoise"))))
|
||||
'(font-lock-function-name-face ((t (:foreground "pale green"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "white"))))
|
||||
'(font-lock-string-face ((t (:foreground "dark khaki"))))
|
||||
'(font-lock-type-face ((t (:foreground "aquamarine"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "yellow green"))))
|
||||
'(font-lock-warning-face ((t (:foreground "salmon1"))))
|
||||
'(button ((t (:underline t :foreground "cyan"))))
|
||||
'(link ((t (:underline t :foreground "cyan"))))
|
||||
'(link-visited ((t (:underline t :foreground "dark cyan"))))
|
||||
'(isearch ((t (:foreground "white" :background "dark goldenrod"))))
|
||||
'(lazy-highlight ((t (:background "gray25"))))
|
||||
'(gnus-header-content ((t (:weight normal :foreground "yellow green"))))
|
||||
'(gnus-header-from ((t (:foreground "pale green"))))
|
||||
'(gnus-header-subject ((t (:foreground "pale turquoise"))))
|
||||
'(gnus-header-name ((t (:foreground "dark sea green"))))
|
||||
'(gnus-header-newsgroups ((t (:foreground "dark khaki"))))
|
||||
'(message-header-name ((t (:foreground "dark turquoise"))))
|
||||
'(message-header-cc ((t (:foreground "yellow green"))))
|
||||
'(message-header-other ((t (:foreground "dark khaki"))))
|
||||
'(message-header-subject ((t (:foreground "pale turquoise"))))
|
||||
'(message-header-to ((t (:foreground "pale green"))))
|
||||
'(message-cited-text ((t (:foreground "SpringGreen3"))))
|
||||
'(message-separator ((t (:foreground "deep sky blue")))))
|
||||
|
||||
(provide-theme 'wheatgrass)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
;;; wheatgrass-theme.el ends here
|
Loading…
Add table
Reference in a new issue