annotate .emacs.d/color-theme-6.6.0/README @ 0:2764b4f45f9f

1st commit
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Mon, 21 Apr 2014 04:30:59 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 Sharing your current color setup:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 Use `color-theme-submit'. If you have already invested time in
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 customizing Emacs faces, please consider sharing your current setup.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 Make sure that color-theme.el is in your `load-path'. Type M-x
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 load-library RET color-theme RET to load all the functions. Type M-x
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 color-theme-submit RET and mail the result to the maintainer of this
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 package (see above for mail addres).
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 If you want to make sure that all your customization was exported,
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 type M-x list-faces-display RET to get a list of all faces currently
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 defined. This is the list of faces that `color-theme-print' uses.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 Installing a color theme:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 Make sure that color-theme.el is in your `load-path'. Type M-x
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 load-library RET color-theme RET to load all the functions.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 The main function to call is color-theme-select. Type M-x
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 color-theme-select RET. That creates a Color Theme Selection
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 buffer. Press RET or `i' on a color theme to install it for the
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 rest of your session.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 If you want to install the color theme as soon as Emacs is started
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 up, read the description of the theme you like and remember the
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 name of the color theme function. Press `d' on a color theme in
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 the Color Theme Selection buffer to read the description. Assuming
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 you like the Gnome2 theme, you'll find that the function to use is
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 called `color-theme-gnome2'. Add the following to the end of your
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 .emacs (removing the leading `;;').
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 (require 'color-theme)
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 (color-theme-gnome2)
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 Changing menu colors:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 In Emacs 21 on X, you can set the menu colors and font using the
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 menu face. Example for your .emacs file:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 (set-face-font 'menu "7x14")
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 (set-face-foreground 'menu "white").
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 If are using X, you can set the menu foreground and background using
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 a resource file, usually .Xdefaults or .Xresources. Usually
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 .Xdefaults is used when you start your session using a display
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 manager such as xdm or gdm. .Xresources is usually used when you
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 start X directly via a shell script such as startx. If you set
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 Emacs*Background and Emacs*Foreground in such a resource file, the
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 foreground and background of Emacs including the menu will be set.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 If your .emacs then loads a color theme, the foreground and
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 background are changed -- with the exception of the menu. There is
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 no way to manipulate the menu foreground and background color from
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 elisp. You can also set more specific menu resources for Emacs in
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 the resource file. Here is a sample entry for your resource file:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 Emacs*Background: DarkSlateGray
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 Emacs*Foreground: wheat
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 Creating your own color theme:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 Use M-x customize-face and customize the faces. Make sure to "Set
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 for Current Session" -- you don't want to save these using custom!
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 When you are done, call M-x color-theme-print to produce the elisp
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 code required to recreate your theme. Better yet, use M-x
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 color-theme-submit to mail it to the maintainer. That way it will be
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 added to future versions of color-theme.el.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 For more information on the elisp format of a color theme, start with
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 the documentation of `color-theme-install' using C-h f
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 color-theme-install.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 When your color theme is just a variation of an existing color theme,
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 take a look at `color-theme-robin-hood' in order to see an example of
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 how to do it. Essentially you want to call all the parent color
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 themes before installing your changes. For all but the first parent
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 color theme, you need to make sure that `color-theme-is-cumulative'
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 is bound to t. If you don't do that, users that set
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 `color-theme-is-cumulative' to nil will only install your changes
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 without the parent color themes.
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 Making a color theme work for both Emacs and XEmacs:
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 Once you have printed the color-theme, you can make sure it looks
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 similar in both Emacs and XEmacs by running
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 `color-theme-analyze-defun' on the printed theme. This function
2764b4f45f9f 1st commit
Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 will check for missing faces for the other editor...