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

Programming in Emacs Lisp

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

8.4.1 defvar and an asterisk

In the past, Emacs used the defvar special form both for internal variables that you would not expect a user to change and for variables that you do expect a user to change. Although you can still use defvar for user customizable variables, please use defcustom instead, since that special form provides a path into the Customization commands. (See section Setting Variables with defcustom.)

When you specified a variable using the defvar special form, you could distinguish a readily settable variable from others by typing an asterisk, `*', in the first column of its documentation string. For example:

(defvar shell-command-default-error-buffer nil
  "*Buffer name for `shell-command' ... error output.
... ")

This means that you could (and still can) use the edit-options command to change the value of shell-command-default-error-buffer temporarily.

However, options set using edit-options are set only for the duration of your editing session. The new values are not saved between sessions. Each time Emacs starts, it reads the original value, unless you change the value within your `.emacs' file, either by setting it manually or by using customize. See section Your `.emacs' File.

For me, the major use of the edit-options command is to suggest variables that I might want to set in my `.emacs' file. I urge you to look through the list. (See section `Editing Variable Values' in The GNU Emacs Manual.)

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