README 3.7 KB

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