From: Alex Schroeder <alex@emacswiki.org>
Cc: krooger@debian.org, emacs-devel@gnu.org
Subject: Re: color-theme.el
Date: Sun, 25 Aug 2002 15:38:57 +0200 [thread overview]
Message-ID: <874rdjf47i.fsf_-_@emacswiki.org> (raw)
In-Reply-To: <200208250527.g7P5RSs12119@wijiji.santafe.edu> (Richard Stallman's message of "Sat, 24 Aug 2002 23:27:28 -0600 (MDT)")
Richard Stallman <rms@gnu.org> writes:
> May I also take this time to ask that color-theme.el be added to the
> Emacs distribution.
>
> What does this do, and how can I talk with the author?
I am the author. :)
Basically, it provides around 50 elisp functions that will change lots
of faces, frame-parameters, and variables, such as to change the look
of Emacs completely.
Since all 50 functions redefine lots of faces, the source file is VERY
large:
~/WWW/home/tuning $ ls -l ~/elisp/color-theme
total 635
drwxrwxr-x 2 alex alex 4096 Aug 10 20:58 CVS
-rw-rw-r-- 1 alex alex 4195 Apr 30 00:32 color-theme-maker.el
-rw-rw-r-- 1 alex alex 634752 Aug 10 20:57 color-theme.el
-rw-rw-r-- 1 alex alex 569761 Aug 25 15:31 color-theme.elc
-rw-rw-r-- 1 alex alex 3097 Sep 1 2001 make-theme.el
The color-theme-maker.el allows you to combine several color themes
into new themes, by example taking all faces definitions of faces
starting with "gnus-" from theme A and all other faces from theme B.
make-theme.el allows you to split the color-theme.el file
automatically into an "engine" and on file per theme function. We
could make only the engine part of Emacs, and let people distribute
themes by themselves.
Here is a very short example -- my favorite theme. It installs
color-theme-gnome2, and then it does some slight modifications. It
also illustrates that many themes include faces for packages that are
not part of Emacs. I would not go through the trouble of removing
these, since I depend on theme contributions by users.
(defun color-theme-robin-hood ()
"`color-theme-gnome2' with navajo white on green."
(interactive)
(color-theme-gnome2)
(let ((color-theme-is-cumulative t))
(color-theme-install
'(color-theme-robin-hood
((foreground-color . "navajo white")
(background-color . "#304020"))
((CUA-mode-read-only-cursor-color . "white"))
(default ((t (nil))))
(fringe ((t (:background "#003700"))))
(header-line ((t (:background "#030" :foreground "#AA7"))))
(ido-subdir-face ((t (:foreground "MediumSlateBlue"))))
(menu ((t (:background "#304020" :foreground "navajo white"))))
(modeline ((t (:background "dark olive green" :foreground "wheat"))))
(semantic-dirty-token-face ((t (:background "grey22"))))
(tool-bar ((t (:background "#304020" :foreground "wheat" :box (:line-width 1 :style released-button)))))
(tooltip ((t (:background "lemon chiffon" :foreground "black"))))))))
The color theme selection buffer looks something like this:
[Reset] Undo changes, if possible.
[Quit] Bury this buffer.
Aalto Dark Jari Aalto <jari.aalto@poboxes.com>
Aalto Light Jari Aalto <jari.aalto@poboxes.com>
Alice Blue Girish Bharadwaj <girishb@gbvsoft.com>
Arjen Arjen Wiersma <arjen@wiersma.org>
Bharadwaj Girish Bharadwaj <girishb@gbvsoft.com>
Billw Bill White <billw@wolfram.com>
BlackOnGray Sudhir Bhojwani <sbhojwani@altoweb.com>
Blipp Blopp Thomas Sicheritz-Ponten<thomas@biopython.org>
Black Jonadab <jonadab@bright.net>
Blue Mood Nelson Loyola <nloyola@yahoo.com>
Blue Sea Alex Schroeder <alex@gnu.org>
Cheap Goldenrod Alex Schroeder <alex@gnu.org>
etc.
As you can see, we would need assignments by all the authors. Since
their email addresses are part of the source, however, this should be
easy to get.
Alex.
PS: Here is the commentary of color-theme.el.
;;; Commentary:
;; Sharing your current color setup:
;;
;; Use `color-theme-submit'. If you have already invested time in
;; customizing Emacs faces, please consider sharing your current setup.
;; Make sure that color-theme.el is in your `load-path'. Type M-x
;; load-library RET color-theme RET to load all the functions. Type M-x
;; color-theme-submit RET and mail the result to the maintainer of this
;; package (see above for mail addres).
;;
;; If you want to make sure that all your customization was exported,
;; type M-x list-faces-display RET to get a list of all faces currently
;; defined. This is the list of faces that `color-theme-print' uses.
;; Installing a color theme:
;;
;; Make sure that color-theme.el is in your `load-path'. Type M-x
;; load-library RET color-theme RET to load all the functions.
;;
;; The main function to call is color-theme-select. Type M-x
;; color-theme-select RET. That creates a Color Theme Selection
;; buffer. Press RET or `i' on a color theme to install it for the
;; rest of your session.
;;
;; If you want to install the color theme as soon as Emacs is started
;; up, read the description of the theme you like and remember the
;; name of the color theme function. Press `d' on a color theme in
;; the Color Theme Selection buffer to read the description. Assuming
;; you like the Gnome2 theme, you'll find that the function to use is
;; called `color-theme-gnome2'. Add the following to the end of your
;; .emacs (removing the leading `;;').
;;
;; (require 'color-theme)
;; (color-theme-gnome2)
;; Changing menu colors:
;;
;; In Emacs 21 on X, you can set the menu colors and font using the
;; menu face. Example for your .emacs file:
;;
;; (set-face-font 'menu "7x14")
;; (set-face-foreground 'menu "white").
;;
;; If are using X, you can set the menu foreground and background using
;; a resource file, usually .Xdefaults or .Xresources. Usually
;; .Xdefaults is used when you start your session using a display
;; manager such as xdm or gdm. .Xresources is usually used when you
;; start X directly via a shell script such as startx. If you set
;; Emacs*Background and Emacs*Foreground in such a resource file, the
;; foreground and background of Emacs including the menu will be set.
;; If your .emacs then loads a color theme, the foreground and
;; background are changed -- with the exception of the menu. There is
;; no way to manipulate the menu foreground and background color from
;; elisp. You can also set more specific menu resources for Emacs in
;; the resource file. Here is a sample entry for your resource file:
;;
;; Emacs*Background: DarkSlateGray
;; Emacs*Foreground: wheat
;; Creating your own color theme:
;;
;; Use M-x customize-face and customize the faces. Make sure to "Set
;; for Current Session" -- you don't want to save these using custom!
;; When you are done, call M-x color-theme-print to produce the elisp
;; code required to recreate your theme. Better yet, use M-x
;; color-theme-submit to mail it to the maintainer. That way it will be
;; added to future versions of color-theme.el.
;;
;; For more information on the elisp format of a color theme, start with
;; the documentation of `color-theme-install' using C-h f
;; color-theme-install.
;;
;; When your color theme is just a variation of an existing color theme,
;; take a look at `color-theme-robin-hood' in order to see an example of
;; how to do it. Essentially you want to call all the parent color
;; themes before installing your changes. For all but the first parent
;; color theme, you need to make sure that `color-theme-is-cumulative'
;; is bound to t. If you don't do that, users that set
;; `color-theme-is-cumulative' to nil will only install your changes
;; without the parent color themes.
;; Making a color theme work for both Emacs and XEmacs:
;;
;; The most important thing is to add missing faces for the other
;; editor. These are the most important faces to check:
;;
;; In Emacs In XEmacs
;; `font-lock-builtin-face' `font-lock-reference-face'
;; `font-lock-doc-face' `font-lock-doc-string-face'
;; `font-lock-constant-face' `font-lock-preprocessor-face'
;; `modeline' `modeline-buffer-id'
;; `modeline' `modeline-mousable'
;; `modeline' `modeline-mousable-minor-mode'
;; `region' `primary-selection'
;; `region' `zmacs-region'
;; `font-lock-string-face' `dired-face-boring'
;; `font-lock-function-name-face' `dired-face-directory'
;; `default' `dired-face-executable'
;; `font-lock-warning-face' `dired-face-flagged'
;; `font-lock-warning-face' `dired-face-marked'
;; `default' `dired-face-permissions'
;; `default' `dired-face-setuid'
;; `default' `dired-face-socket'
;; `font-lock-keyword-face' `dired-face-symlink'
;;
;; Further comments:
;;
;; In Emacs 21 `modeline' is just an alias for `mode-line'. I recommend
;; the use of `modeline' until further notice.
;;
;; The support for :foreground and :background attributes works for
;; Emacs 20 and 21 as well as for XEmacs. :inverse-video is taken care
;; of while printing color themes.
;;
;; I don't recommend making font sizes part of a color theme. Most
;; users would be surprised to see their font sizes change when they
;; install a color-theme. Therefore, remove all :height attributes if
;; the value is an integer. If the value is a float, this is ok -- the
;; value is relative to the default height. One notable exceptions is
;; for a color-theme created for visually impaired people. These *must*
;; use a larger font in order to be usable.
;;
;; The tool-bar should not be part of the frame-parameters, since it
;; should not appear or disappear depending on the color theme. The
;; apppearance of the toolbar, however, can be changed by the color
;; theme. For Emacs 21, use the `tool-bar' face. The easiest way to do
;; this is to give it the default fore- and background colors. This can
;; be achieved using (tool-bar ((t (nil)))) in the theme. Usually it
;; makes more sense, however, to provide the same colors as used in the
;; `menu' face, and to specify a :box attribute. In order to alleviate
;; potential Emacs/XEmacs incompatibilities, `toolbar' will be defined
;; as an alias for `tool-bar' if it does not exist, and vice-versa.
;; This is done eventhough the face `toolbar' seems to have no effect on
;; XEmacs. If you look at XEmacs lisp/faces.el, however, you will find
;; that it is in fact referenced for XPM stuff.
;;
;; Similarly, the `fringe' face defines what the left and right borders
;; of the frame look like in Emacs 21. To give them default fore- and
;; background colors, use (fringe ((t (nil)))) in your color theme.
;; Usually it makes more sense to choose a color slightly lighter or
;; darker from the default background.
next prev parent reply other threads:[~2002-08-25 13:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-24 4:32 IRC Client for Emacs Jonathan Walther
2002-08-24 5:11 ` Damien Elmes
2002-08-24 16:50 ` color-theme.el Alex Schroeder
2002-08-26 12:45 ` color-theme.el Per Abrahamsen
2002-08-27 19:05 ` color-theme.el Richard Stallman
2002-08-28 14:19 ` color-theme.el Per Abrahamsen
2002-08-28 23:33 ` color-theme.el Richard Stallman
2002-08-29 11:55 ` color-theme.el Per Abrahamsen
2002-08-29 17:14 ` color-theme.el Alex Schroeder
2002-08-30 19:17 ` color-theme.el Richard Stallman
2002-08-31 11:38 ` color-theme.el Alex Schroeder
2002-09-01 13:14 ` color-theme.el Richard Stallman
2002-09-01 16:07 ` color-theme.el Alex Schroeder
2002-09-07 14:15 ` color-theme.el Alex Schroeder
2002-09-09 0:21 ` color-theme.el Richard Stallman
2002-08-27 23:18 ` color-theme.el Alex Schroeder
2002-08-28 14:37 ` color-theme.el Per Abrahamsen
2002-08-28 18:37 ` color-theme.el Alex Schroeder
2002-08-29 12:12 ` color-theme.el Per Abrahamsen
2002-08-31 16:58 ` color-theme.el Richard Stallman
2002-09-01 0:05 ` color-theme.el Alex Schroeder
2002-09-02 0:01 ` color-theme.el Richard Stallman
2002-09-02 20:37 ` color-theme.el Alex Schroeder
2002-09-07 14:17 ` color-theme.el Alex Schroeder
2002-08-25 5:27 ` IRC Client for Emacs Richard Stallman
2002-08-25 13:38 ` Alex Schroeder [this message]
2002-08-25 15:56 ` color-theme.el Eli Zaretskii
2002-09-02 0:02 ` color-theme.el Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874rdjf47i.fsf_-_@emacswiki.org \
--to=alex@emacswiki.org \
--cc=emacs-devel@gnu.org \
--cc=krooger@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.