summaryrefslogtreecommitdiff
path: root/doc/lispref
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-27 09:07:17 +0000
committerMiles Bader <miles@gnu.org>2007-10-27 09:07:17 +0000
commit124bd28c27d71cdfd08447db14f90846ca2ad69d (patch)
tree64987dd2b36416e57adaee33e57078a0aa12a20b /doc/lispref
parentf52ac803d032dc1be70d31a7b01577bf7fc51c17 (diff)
parent6b10c960a569602891e26e95ce87d07786e19e9b (diff)
downloademacs-124bd28c27d71cdfd08447db14f90846ca2ad69d.tar.gz
Merge from emacs--rel--22
Patches applied: * emacs--rel--22 (patch 131-137) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 261-262) - Update from CVS Revision: emacs@sv.gnu.org/emacs--devo--0--patch-908
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog16
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/frames.texi2
-rw-r--r--doc/lispref/functions.texi5
-rw-r--r--doc/lispref/loading.texi27
-rw-r--r--doc/lispref/os.texi11
-rw-r--r--doc/lispref/variables.texi141
7 files changed, 57 insertions, 146 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index e74d8889e01..282fa19bfa1 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -8,6 +8,22 @@
* customize.texi (Variable Definitions): Add :risky and :safe keywords.
+2007-10-24 Richard Stallman <rms@gnu.org>
+
+ * elisp.texi (Top): Delete Frame-Local Variables from subnode menu.
+
+ * variables.texi (Frame-Local Variables): Node deleted.
+ (Variables): Delete Frame-Local Variables from menu.
+ (Local Variables, Buffer-Local Variables, Intro to Buffer-Local)
+ (Default Value): Don't mention frame-local vars.
+
+ * os.texi (Idle Timers): current-idle-time returns nil if not idle.
+
+ * loading.texi (Unloading): Document FEATURE-unload-function
+ instead of FEATURE-unload-hook.
+
+ * frames.texi (Multiple Displays): Don't mention frame-local vars.
+
2007-10-22 Juri Linkov <juri@jurta.org>
* minibuf.texi (Text from Minibuffer, Minibuffer Completion)
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 8cd25ed59d3..695144738fc 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -421,7 +421,6 @@ Variables
* 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.
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index ee07302d76b..cd29d44ab76 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -141,7 +141,7 @@ is the one for the terminal that the currently selected frame belongs
to. These variables include @code{default-minibuffer-frame},
@code{defining-kbd-macro}, @code{last-kbd-macro}, and
@code{system-key-alist}. They are always terminal-local, and can never
-be buffer-local (@pxref{Buffer-Local Variables}) or frame-local.
+be buffer-local (@pxref{Buffer-Local Variables}).
A single X server can handle more than one screen. A display name
@samp{@var{host}:@var{server}.@var{screen}} has three parts; the last
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 111edb7afc0..601644629e5 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1326,6 +1326,9 @@ See @ref{Autoload}.
@item call-interactively
See @ref{Interactive Call}.
+@item called-interactively-p
+See @ref{Distinguish Interactive}.
+
@item commandp
See @ref{Interactive Call}.
@@ -1351,7 +1354,7 @@ See @ref{Function Indirection}.
See @ref{Using Interactive}.
@item interactive-p
-See @ref{Interactive Call}.
+See @ref{Distinguish Interactive}.
@item mapatoms
See @ref{Creating Symbols}.
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 9b582fe5cf8..cbea262cc45 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -862,24 +862,27 @@ library with @code{defun}, @code{defalias}, @code{defsubst},
It then restores any autoloads formerly associated with those symbols.
(Loading saves these in the @code{autoload} property of the symbol.)
-@vindex unload-feature-special-hooks
Before restoring the previous definitions, @code{unload-feature} runs
@code{remove-hook} to remove functions in the library from certain
hooks. These hooks include variables whose names end in @samp{hook}
or @samp{-hooks}, plus those listed in
-@code{unload-feature-special-hooks}. This is to prevent Emacs from
-ceasing to function because important hooks refer to functions that
-are no longer defined.
+@code{unload-feature-special-hooks}, as well as
+@code{auto-mode-alist}. This is to prevent Emacs from ceasing to
+function because important hooks refer to functions that are no longer
+defined.
-@vindex @var{feature}-unload-hook
+Standard unloading activities also undoes ELP profiling of functions
+in that library, unprovides any features provided by the library, and
+cancels timers held in variables defined by the library.
+
+@vindex @var{feature}-unload-function
If these measures are not sufficient to prevent malfunction, a library
-can define an explicit unload hook. If @code{@var{feature}-unload-hook}
-is defined, it is run as a normal hook before restoring the previous
-definitions, @emph{instead of} the usual hook-removing actions. The
-unload hook ought to undo all the global state changes made by the
-library that might cease to work once the library is unloaded.
-@code{unload-feature} can cause problems with libraries that fail to do
-this, so it should be used with caution.
+can define an explicit unloader named @code{@var{feature}-unload-function}.
+If that symbol is defined as a function, @code{unload-feature} calls
+it with no arguments before doing anything else. It can do whatever
+is appropriate to unload the library. If it returns @code{nil},
+@code{unload-feature} proceeds to take the normal unload actions.
+Otherwise it considers the job to be done.
Ordinarily, @code{unload-feature} refuses to unload a library on which
other loaded libraries depend. (A library @var{a} depends on library
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 68fba8d9774..bff759215da 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1561,10 +1561,10 @@ set up to repeat will subsequently run another time, one by one.
@c Emacs 19 feature
@defun current-idle-time
-This function returns the length of time Emacs has been idle, as a
-list of three integers: @code{(@var{high} @var{low} @var{microsec})}.
-The integers @var{high} and @var{low} combine to give the number of
-seconds of idleness, which is
+If Emacs is idle, this function returns the length of time Emacs has
+been idle, as a list of three integers: @code{(@var{high} @var{low}
+@var{microsec})}. The integers @var{high} and @var{low} combine to
+give the number of seconds of idleness, which is
@ifnottex
@var{high} * 2**16 + @var{low}.
@end ifnottex
@@ -1576,6 +1576,9 @@ The third element, @var{microsec}, gives the microseconds since the
start of the current second (or 0 for systems that return time with
the resolution of only one second).
+When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
+This is a convenient way to test whether Emacs is idle.
+
The main use of this function is when an idle timer function wants to
``take a break'' for a while. It can set up another idle timer to
call the same function again, after a few seconds more idleness.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index d5f1035c169..0ca217dbe47 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -39,7 +39,6 @@ variable.
* 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 @@ Macro calls (@pxref{Macros}).
@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 @@ use short names like @code{x}.
@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
-@ref{Multiple Displays}.)
+languages in one form or another. Emacs, however, also supports
+additional, unusual kinds of variable binding, such as
+@dfn{buffer-local} 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 @@ this is the global binding.
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 @@ the default binding untouched. This means that the default value cannot
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 @@ this variable.
@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 @@ an ordinary evaluated argument.
@end example
@end defun
-@node Frame-Local Variables
-@section Frame-Local Variables
-@cindex 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
-@code{make-variable-frame-local}.
-
-@deffn 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.
-@xref{Multiple 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}.
-@end 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}:
-
-@example
-(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))))
-@end 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:
-
-@example
-(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)
-@end example
-
-@noindent
-Otherwise, the frame gets a chance to provide the binding; when frame
-@code{f2} is selected, its frame-local binding is in effect:
-
-@example
-(select-frame f2)
-(set-buffer (get-buffer "*scratch*"))
-foo
- @result{} (f 2)
-@end example
-
-@noindent
-When neither the current buffer nor the selected frame provides
-a binding, the default binding is used:
-
-@example
-(select-frame f1)
-(set-buffer (get-buffer "*scratch*"))
-foo
- @result{} nil
-@end example
-
-@noindent
-When the active binding of a variable is a frame-local binding, setting
-the variable changes that binding. You can observe the result with
-@code{frame-parameters}:
-
-@example
-(select-frame f2)
-(set-buffer (get-buffer "*scratch*"))
-(setq foo 'nobody)
-(assq 'foo (frame-parameters f2))
- @result{} (foo . nobody)
-@end example
-
@node Future Local Variables
@section Possible Future Local Variables