diff options
| author | Richard M. Stallman | 1995-10-09 19:39:45 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-09 19:39:45 +0000 |
| commit | ab4b18358fa636b07dd0fa88d54a2f8d89ef0079 (patch) | |
| tree | f36d80805581df8700923694c2a4879abd7e7b3a | |
| parent | b1c7e43439f490bbc186a2f0137fc450819a9ea0 (diff) | |
| download | emacs-ab4b18358fa636b07dd0fa88d54a2f8d89ef0079.tar.gz emacs-ab4b18358fa636b07dd0fa88d54a2f8d89ef0079.zip | |
Explain when to use make-variable-buffer-local.
| -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 | |||
| 1213 | local to the current buffer at the time. | 1213 | local to the current buffer at the time. |
| 1214 | 1214 | ||
| 1215 | The value returned is @var{variable}. | 1215 | The value returned is @var{variable}. |
| 1216 | |||
| 1217 | @strong{Note:} It is a mistake to use @code{make-variable-buffer-local} | ||
| 1218 | for user-option variables, simply because users @emph{might} want to | ||
| 1219 | customize them differently in different buffers. Users can make any | ||
| 1220 | variable local, when they wish to. | ||
| 1221 | |||
| 1222 | The main use of @code{make-variable-buffer-local} is when a variable is | ||
| 1223 | used for internal purposes, and the Lisp program depends on having | ||
| 1224 | separate values in separate buffers. | ||
| 1216 | @end deffn | 1225 | @end deffn |
| 1217 | 1226 | ||
| 1218 | @defun local-variable-p variable &optional buffer | 1227 | @defun local-variable-p variable &optional buffer |