[Univ of Cambridge] [Dept of Engineering]
next up previous contents
Next: Miscellaneous Up: Key bindings Previous: Interactive bindings

Using the .emacs file

Here you will need to know (or copy) a bit of Lisp. Here are some examples.

(global-set-key "\e#" 'quoted-insert) 
(define-key c-mode-map  "\e#" 'quoted-insert)
These both set M-# to perform a quoted insert.

(global-set-key "\C-cg" 'goto-line) 
(define-key ctl-x-map "g"    'goto-line)
Make C-c g and C-x g prompt for a line number to jump to.

The function keys can also be set to do things -

(global-set-key [f1] 'goto-line)  ;; goto line number



Tim Love
Wed Jul 1 14:08:45 BST 1998