1.
just create .emacs file and put something like this
(set-background-color "DarkSlateGray")
(set-foreground-color "Wheat")
(set-face-background 'modeline "lightgoldenrod2")
(set-face-foreground 'modeline "DarkSlateGray")
(set-cursor-color "Orchid")
(set-face-foreground 'font-lock-comment-face "Gray")
(set-face-foreground 'font-lock-string-face "Gold3")
(set-face-foreground 'font-lock-function-name-face "LightBlue")
(set-face-foreground 'font-lock-keyword-face "cyan1")
(set-face-foreground 'font-lock-type-face "Violet")
(set-face-foreground 'font-lock-builtin-face "Cyan")
(set-face-foreground 'font-lock-variable-name-face "Gold")
(set-face-foreground 'font-lock-constant-face "Magenta")
(set-face-foreground 'scroll-bar "Wheat")
(set-face-background 'scroll-bar "lightgoldenrod2")
(set-face-foreground 'tool-bar "Wheat")
(set-face-background 'tool-bar "lightgoldenrod2")
(set-face-foreground 'font-lock-builtin-face "Cyan")
the list of predefined colors is shown typing M-x list-colors-display
and you can also check and change the colors of things by
M-x customize-face
2.
There are two sections in ~/.emacs: a free-form section and the one
starting with "(custom-set-variables" and having as comment a warning
not to edit this section. Usually this section is "maintained" by the
customise interface in GNU Emacs. Look at menu entries "Options ->
Customize Emacs!" Another way is to determine the characteristics of
some character (C-u C-x = in GNU Emacs 22) and then choose (RET or
[long-]click on the underlined hyperlink) the "face value" to enter
the customisation interface. In GNU Emacs 21 you would need to invoke
describe-text-properties.
In the free-form or Lisp section you can use for example:
(setq initial-frame-alist '(
(mouse-color . "midnightblue")
(foreground-color . "grey20")
(background-color . "alice blue")
(internal-border-width . 2)
(line-spacing . 1)
(active-alpha . 0.875)
(inactive-alpha . 0.75)
(font . "-*-*-medium-r-normal--10-*-*-*-*-*-fontset-
hiraginomin")
(top . 25) (left . 650) (width . 91) (height . 50)))
(setq default-frame-alist '(
(border-color . "#4e3831")
(foreground-color . "grey10")
(background-color . "ghost white")
(vertical-scroll-bars . left)
(cursor-color . "purple")
(cursor-type . box)
(active-alpha . 0.75)
(inactive-alpha . 0.875)
(font . "-*-*-medium-r-normal--9-*-*-*-*-*-fontset-
hiraginokaku")
(top . 50) (left . 150) (width . 89) (height . 56)))
X11 users can use X Ressources (look into the GNU Emacs manual, i.e.
C-h i m Emacs and then search for the "Command Line Options and
Arguments" node), which are organised in files like ~/.Xdefaults or
~/.Xressources (depends on the actual code in ~/.xinit or similiar
files which set up the X11 environment). ~/.Xdefaults or
~/.Xressources can #include other files with set X application
defaults. A lot "templates" exist in directories like /usr/X11R6/lib/
X11/app-defaults or /usr/X11R7/share/X11/app-defaults.
阅读(2083) | 评论(0) | 转发(0) |