To define a key binding, use an expression of this form:
(define-key key-map keystrokes function)To set an Emacs variable, use an expression of this form:
(setq variable value)The section below gives some typical customizations you might perform in your .emacs file. Note that comments are preceded by semicolon characters.
(define-key esc-map "G" 'goto-line) ; Esc-G runs the goto-line ; function. (define-key ctl-x-map "t" 'transpose-lines) ; Ctrl-x t runs the ; transpose-lines function. (setq require-final-newline t) ; Make sure file always ; ends with a newline. (setq default-major-mode 'text-mode) ; Default mode is text-mode. (setq text-mode-hook ; Enable auto-fill-mode '(lambda () (auto-fill-mode 1))) ; whenever using text-mode. (setq delete-auto-save-files t) ; Delete unnecessary ; auto-save files. (display-time) ; Display current time and ; load average on mode line.