Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 22: Learning Lisp Basics |  | Previous HourNext Hour
Sections in this Hour: |  |

## Q&A

  Q Why does Emacs use Lisp as the extension language? Isn't that an ancient programming language?

  A Yes and no. Lisp is an old language--that is correct. It was developed back in the '60s, but it is still a very powerful language. Furthermore, it would require huge amounts of work to rewrite all the existing extensions already written for Emacs to another language, and the value of this would be limited.

  Q Why do I need to escape a backlash in strings?

  A In strings, a backslash is used as a control character. Thus \n specifies a newline, for example. An ordinary backslash is written as two backslashes in order to escape it in the string. If you need to escape it in the regular expression too, you need four backslashes. These four backslashes are translated to two after the expansion in the string, and these two are translated to one after the expansion in the regular expression. Don't worry; you'll get used to it.

  Q Is there any way I can see whether a given variable is buffer-local by default?

  A First you might try to read the documentation for the variable (by pressing C-h v). The documentation often mentions whether the variable is buffer-local. If that doesn't say anything, try pressing M-x and type set-variable, press Enter, and type the variable's name and value. When you finish that, look at the description of the variable again. If it is buffer-local, the description mentions both a local value and a global value.

  Q When should I use a quote (') in front of a variable or function name?

  A You should use a quote in front of the name when you want to specify a function or variable name. You should not use a quote when specifying the value of the function or variable.

Sams Teach Yourself Emacs in 24 Hours |  | ContentsIndex
Hour 22: Learning Lisp Basics |  | Previous HourNext Hour
Sections in this Hour: |  |

© Copyright Macmillan USA. All rights reserved.