diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-10-09 19:39:45 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-10-09 19:39:45 +0000 |
commit | 03a5d31b21bbd810b54a4d5c68d5e967a0e2a71f (patch) | |
tree | 98e2ca6ea4232ab53e5160d346a1bfaa4729652b /lispref | |
parent | 57f9d812599317761935102adc3fa0a7d95ce408 (diff) | |
download | emacs-03a5d31b21bbd810b54a4d5c68d5e967a0e2a71f.tar.gz |
Explain when to use make-variable-buffer-local.
Diffstat (limited to 'lispref')
-rw-r--r-- | lispref/variables.texi | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lispref/variables.texi b/lispref/variables.texi index c3bd61541d8..22813ea5b63 100644 --- a/lispref/variables.texi +++ b/lispref/variables.texi @@ -1213,6 +1213,15 @@ buffer-local, so that any subsequent attempt to set it will make it local to the current buffer at the time. The value returned is @var{variable}. + +@strong{Note:} It is a mistake to use @code{make-variable-buffer-local} +for user-option variables, simply because users @emph{might} want to +customize them differently in different buffers. Users can make any +variable local, when they wish to. + +The main use of @code{make-variable-buffer-local} is when a variable is +used for internal purposes, and the Lisp program depends on having +separate values in separate buffers. @end deffn @defun local-variable-p variable &optional buffer |