When Xemacs (and Emacs for that matter) starts up it looks for a file in your home directory called ".emacs" (note the leading dot - thus it is a hidden file).
This file contains user specific information and customizations to the Xemacs/Emacs editors. You can setup this file to do all sorts of customizations from building additional menu bars to highlighting to utility functionality.
There are 2 ways of going about customizing Xemacs/emacs...
I find that I tend to use a mixture of both manual and automatic editing of the ".emacs" file.
This is the sample .emacs file that we were distributing in CMSC 201...
(custom-set-faces)
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-x?" 'help-command)
;; set style to "Ellemtel" for C++
(add-hook 'c++-mode-hook
'(lambda ()
(c-set-style "ellemtel")))
;; set style to "Ellemtel" for C
(add-hook 'c-mode-hook
'(lambda ()
(c-set-style "ellemtel")))
;; special effects for 'C'
(add-hook 'c-mode-hook 'turn-on-font-lock)
|
I have some more stuff in my emacs file...
;; File: .emacs
;; Author: Daniel J. Hood
;; set backspace to delete left of cursor instead of help
;; set ctl-x? to be the new help
(global-set-key "\C-h" 'delete-backward-char)
(global-set-key "\C-x?" 'help-command)
;; set style to "Ellemtel" for C++
(add-hook 'c++-mode-hook
'(lambda ()
(c-set-style "ellemtel")))
;; set style to "Ellemtel" for C
(add-hook 'c-mode-hook
'(lambda ()
(c-set-style "ellemtel")))
;; no spaces please
(setq-default indent-tabs-mode nil)
(setq default-tab-width 4)
;; line & col nums
(setq line-number-mode t)
(setq column-number-mode t)
;; font coloring
(setq font-lock-auto-fontify t)
(setq font-lock-mode-maximum-decoration t)
(require 'font-lock)
;; my email
(custom-set-variables
'(user-mail-address "your_username_here@umbc.edu" t)
'(query-user-mail-address nil))
;; some key bindings
(global-set-key [(f1)] (lambda () (interactive) (manual-entry (current-word))))
(global-set-key [f2] 'ispell-word)
;; map that mouse wheel
(global-set-key [button4] 'scroll-down)
(global-set-key [button5] 'scroll-up)
|