www.delorie.com/gnu/docs/emacs-lisp-intro/emacs-lisp-intro_6.html   search  
Buy the book!

Programming in Emacs Lisp

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

A Note for Novices

If you don't know GNU Emacs, you can still read this document profitably. However, I recommend you learn Emacs, if only to learn to move around your computer screen. You can teach yourself how to use Emacs with the on-line tutorial. To use it, type C-h t. (This means you press and release the CTRL key and the h at the same time, and then press and release t.)

Also, I often refer to one of Emacs' standard commands by listing the keys which you press to invoke the command and then giving the name of the command in parentheses, like this: M-C-\ (indent-region). What this means is that the indent-region command is customarily invoked by typing M-C-\. (You can, if you wish, change the keys that are typed to invoke the command; this is called rebinding. See section Keymaps.) The abbreviation M-C-\ means that you type your META key, CTRL key and \ key all at the same time. (On many modern keyboards the META key is labelled ALT.) Sometimes a combination like this is called a keychord, since it is similar to the way you play a chord on a piano. If your keyboard does not have a META key, the ESC key prefix is used in place of it. In this case, M-C-\ means that you press and release your ESC key and then type the CTRL key and the \ key at the same time. But usually M-C-\ means press the CTRL key along with the key that is labelled ALT and, at the same time, press the \ key.

In addition to typing a lone keychord, you can prefix what you type with C-u, which is called the `universal argument'. The C-u keychord passes an argument to the subsequent command. Thus, to indent a region of plain text by 6 spaces, mark the region, and then type C-u 6 M-C-\. (If you do not specify a number, Emacs either passes the number 4 to the command or otherwise runs the command differently than it would otherwise.) See section `Numeric Arguments' in The GNU Emacs Manual.

If you are reading this in Info using GNU Emacs, you can read through this whole document just by pressing the space bar, SPC. (To learn about Info, type C-h i and then select Info.)

A note on terminology: when I use the word Lisp alone, I often am referring to the various dialects of Lisp in general, but when I speak of Emacs Lisp, I am referring to GNU Emacs Lisp in particular.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003