emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lispref/Attic/variables.texi, v [EMACS_22


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lispref/Attic/variables.texi, v [EMACS_22_BASE]
Date: Wed, 24 Oct 2007 08:20:05 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Branch:         EMACS_22_BASE
Changes by:     Richard M. Stallman <rms>       07/10/24 08:20:04

Index: variables.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/lispref/Attic/variables.texi,v
retrieving revision 1.94
retrieving revision 1.94.2.1
diff -u -b -r1.94 -r1.94.2.1
--- variables.texi      7 Apr 2007 01:46:25 -0000       1.94
+++ variables.texi      24 Oct 2007 08:20:03 -0000      1.94.2.1
@@ -39,7 +39,6 @@
 * Setting Variables::     Storing new values in variables.
 * Variable Scoping::      How Lisp chooses among local and global values.
 * Buffer-Local Variables::  Variable values in effect only in one buffer.
-* Frame-Local Variables::   Variable values in effect only in one frame.
 * Future Local Variables::  New kinds of local values we might add some day.
 * File Local Variables::  Handling local variable lists in files.
 * Variable Aliases::      Variables that are aliases for other variables.
@@ -255,11 +254,10 @@
 @end itemize
 
   Variables can also have buffer-local bindings (@pxref{Buffer-Local
-Variables}) and frame-local bindings (@pxref{Frame-Local Variables}); a
-few variables have terminal-local bindings (@pxref{Multiple Displays}).
-These kinds of bindings work somewhat like ordinary local bindings, but
-they are localized depending on ``where'' you are in Emacs, rather than
-localized in time.
+Variables}); a few variables have terminal-local bindings
+(@pxref{Multiple Displays}).  These kinds of bindings work somewhat
+like ordinary local bindings, but they are localized depending on
+``where'' you are in Emacs, rather than localized in time.
 
 @defvar max-specpdl-size
 @anchor{Definition of max-specpdl-size}
@@ -1085,16 +1083,12 @@
 @cindex buffer-local variables
 
   Global and local variable bindings are found in most programming
-languages in one form or another.  Emacs, however, also supports additional,
-unusual kinds of variable binding: @dfn{buffer-local} bindings, which
-apply only in one buffer, and @dfn{frame-local} bindings, which apply only in
-one frame.  Having different values for a variable in different buffers
-and/or frames is an important customization method.
-
-  This section describes buffer-local bindings; for frame-local
-bindings, see the following section, @ref{Frame-Local Variables}.  (A few
-variables have bindings that are local to each terminal; see
address@hidden Displays}.)
+languages in one form or another.  Emacs, however, also supports
+additional, unusual kinds of variable binding, such as
address@hidden bindings, which apply only in one buffer.  Having
+different values for a variable in different buffers is an important
+customization method.  (A few variables have bindings that are local
+to each terminal; see @ref{Multiple Displays}.)
 
 @menu
 * Intro to Buffer-Local::      Introduction and concepts.
@@ -1121,8 +1115,7 @@
 other buffers.  The default binding is shared by all the buffers that
 don't have their own bindings for the variable.  (This includes all
 newly-created buffers.)  If you set the variable in a buffer that does
-not have a buffer-local binding for it, this sets the default binding
-(assuming there are no frame-local bindings to complicate the matter),
+not have a buffer-local binding for it, this sets the default binding,
 so the new value is visible in all the buffers that see the default
 binding.
 
@@ -1153,11 +1146,11 @@
 be changed with @code{setq} in any buffer; the only way to change it is
 with @code{setq-default}.
 
-  @strong{Warning:} When a variable has buffer-local or frame-local
+  @strong{Warning:} When a variable has buffer-local
 bindings in one or more buffers, @code{let} rebinds the binding that's
 currently in effect.  For instance, if the current buffer has a
 buffer-local value, @code{let} temporarily rebinds that.  If no
-buffer-local or frame-local bindings are in effect, @code{let} rebinds
+buffer-local bindings are in effect, @code{let} rebinds
 the default value.  If inside the @code{let} you then change to a
 different current buffer in which a different binding is in effect,
 you won't see the @code{let} binding any more.  And if you exit the
@@ -1421,7 +1414,7 @@
 @c Emacs 19 feature
   The special forms @code{defvar} and @code{defconst} also set the
 default value (if they set the variable at all), rather than any
-buffer-local or frame-local value.
+buffer-local value.
 
 @defun default-value symbol
 This function returns @var{symbol}'s default value.  This is the value
@@ -1520,112 +1513,6 @@
 @end example
 @end defun
 
address@hidden Frame-Local Variables
address@hidden Frame-Local Variables
address@hidden frame-local variables
-
-  Just as variables can have buffer-local bindings, they can also have
-frame-local bindings.  These bindings belong to one frame, and are in
-effect when that frame is selected.  Frame-local bindings are actually
-frame parameters: you create a frame-local binding in a specific frame
-by calling @code{modify-frame-parameters} and specifying the variable
-name as the parameter name.
-
-  To enable frame-local bindings for a certain variable, call the function
address@hidden
-
address@hidden Command make-variable-frame-local variable
-Enable the use of frame-local bindings for @var{variable}.  This does
-not in itself create any frame-local bindings for the variable; however,
-if some frame already has a value for @var{variable} as a frame
-parameter, that value automatically becomes a frame-local binding.
-
-If @var{variable} does not have a default value, then calling this
-command will give it a default value of @code{nil}.  If @var{variable}
-already has a default value, that value remains unchanged.
-
-If the variable is terminal-local, this function signals an error,
-because such variables cannot have frame-local bindings as well.
address@hidden Displays}.  A few variables that are implemented
-specially in Emacs can be buffer-local, but can never be frame-local.
-
-This command returns @var{variable}.
address@hidden deffn
-
-  Buffer-local bindings take precedence over frame-local bindings.  Thus,
-consider a variable @code{foo}: if the current buffer has a buffer-local
-binding for @code{foo}, that binding is active; otherwise, if the
-selected frame has a frame-local binding for @code{foo}, that binding is
-active; otherwise, the default binding of @code{foo} is active.
-
-  Here is an example.  First we prepare a few bindings for @code{foo}:
-
address@hidden
-(setq f1 (selected-frame))
-(make-variable-frame-local 'foo)
-
-;; @r{Make a buffer-local binding for @code{foo} in @samp{b1}.}
-(set-buffer (get-buffer-create "b1"))
-(make-local-variable 'foo)
-(setq foo '(b 1))
-
-;; @r{Make a frame-local binding for @code{foo} in a new frame.}
-;; @r{Store that frame in @code{f2}.}
-(setq f2 (make-frame))
-(modify-frame-parameters f2 '((foo . (f 2))))
address@hidden example
-
-  Now we examine @code{foo} in various contexts.  Whenever the
-buffer @samp{b1} is current, its buffer-local binding is in effect,
-regardless of the selected frame:
-
address@hidden
-(select-frame f1)
-(set-buffer (get-buffer-create "b1"))
-foo
-     @result{} (b 1)
-
-(select-frame f2)
-(set-buffer (get-buffer-create "b1"))
-foo
-     @result{} (b 1)
address@hidden example
-
address@hidden
-Otherwise, the frame gets a chance to provide the binding; when frame
address@hidden is selected, its frame-local binding is in effect:
-
address@hidden
-(select-frame f2)
-(set-buffer (get-buffer "*scratch*"))
-foo
-     @result{} (f 2)
address@hidden example
-
address@hidden
-When neither the current buffer nor the selected frame provides
-a binding, the default binding is used:
-
address@hidden
-(select-frame f1)
-(set-buffer (get-buffer "*scratch*"))
-foo
-     @result{} nil
address@hidden example
-
address@hidden
-When the active binding of a variable is a frame-local binding, setting
-the variable changes that binding.  You can observe the result with
address@hidden:
-
address@hidden
-(select-frame f2)
-(set-buffer (get-buffer "*scratch*"))
-(setq foo 'nobody)
-(assq 'foo (frame-parameters f2))
-     @result{} (foo . nobody)
address@hidden example
-
 @node Future Local Variables
 @section Possible Future Local Variables
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]