comparison lispref/variables.texi @ 13166:c61ffdb6d9df

Explain when to use make-variable-buffer-local.
author Richard M. Stallman <rms@gnu.org>
date Mon, 09 Oct 1995 19:39:45 +0000
parents 259b1abdec5f
children 66d807bdc5b4
comparison
equal deleted inserted replaced
13165:e5431229a09f 13166:c61ffdb6d9df
1211 This function marks @var{variable} (a symbol) automatically 1211 This function marks @var{variable} (a symbol) automatically
1212 buffer-local, so that any subsequent attempt to set it will make it 1212 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
1219 This returns @code{t} if @var{variable} is buffer-local in buffer 1228 This returns @code{t} if @var{variable} is buffer-local in buffer
1220 @var{buffer} (which defaults to the current buffer); otherwise, 1229 @var{buffer} (which defaults to the current buffer); otherwise,