aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMiles Bader2007-10-27 09:07:17 +0000
committerMiles Bader2007-10-27 09:07:17 +0000
commitfdc9061358d3654e14bfc1419632e1d6c6c5c13e (patch)
tree00f5484d576513deddd938a9a277d0db860b9a5b /doc
parentebe4c71027cd6ec8583631e895e7fdd3decfc099 (diff)
parentb6ff295c434269fe824ec47cbfc87c6a02dfd94d (diff)
downloademacs-fdc9061358d3654e14bfc1419632e1d6c6c5c13e.tar.gz
emacs-fdc9061358d3654e14bfc1419632e1d6c6c5c13e.zip
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')
-rw-r--r--doc/emacs/ChangeLog4
-rw-r--r--doc/emacs/misc.texi4
-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
9 files changed, 63 insertions, 148 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 3b92f150f59..1d1ba11ef6f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -2,6 +2,10 @@
2 2
3 * fortran-xtra.texi (Fortran): F90 mode handles F2003. 3 * fortran-xtra.texi (Fortran): F90 mode handles F2003.
4 4
52007-10-24 Richard Stallman <rms@gnu.org>
6
7 * misc.texi (Interactive Shell): Cleanup last change.
8
52007-10-22 Juri Linkov <juri@jurta.org> 92007-10-22 Juri Linkov <juri@jurta.org>
6 10
7 * mini.texi (Minibuffer History): Add text about a list of minibuffer 11 * mini.texi (Minibuffer History): Add text about a list of minibuffer
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 83fc1617066..82e48bfe13b 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -488,8 +488,8 @@ also change the coding system for a running subshell by typing
488Coding}. 488Coding}.
489 489
490@cindex @env{INSIDE_EMACS} environment variable 490@cindex @env{INSIDE_EMACS} environment variable
491 Emacs sets the environment variable @env{INSIDE_EMACS} (to a 491 Emacs sets the environment variable @env{INSIDE_EMACS} in the
492comma-separated list including the Emacs version) in the subshell. 492subshell to a comma-separated list including the Emacs version.
493Programs can check this variable to determine whether they are running 493Programs can check this variable to determine whether they are running
494inside an Emacs subshell. 494inside an Emacs subshell.
495 495
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 @@
8 8
9 * customize.texi (Variable Definitions): Add :risky and :safe keywords. 9 * customize.texi (Variable Definitions): Add :risky and :safe keywords.
10 10
112007-10-24 Richard Stallman <rms@gnu.org>
12
13 * elisp.texi (Top): Delete Frame-Local Variables from subnode menu.
14
15 * variables.texi (Frame-Local Variables): Node deleted.
16 (Variables): Delete Frame-Local Variables from menu.
17 (Local Variables, Buffer-Local Variables, Intro to Buffer-Local)
18 (Default Value): Don't mention frame-local vars.
19
20 * os.texi (Idle Timers): current-idle-time returns nil if not idle.
21
22 * loading.texi (Unloading): Document FEATURE-unload-function
23 instead of FEATURE-unload-hook.
24
25 * frames.texi (Multiple Displays): Don't mention frame-local vars.
26
112007-10-22 Juri Linkov <juri@jurta.org> 272007-10-22 Juri Linkov <juri@jurta.org>
12 28
13 * minibuf.texi (Text from Minibuffer, Minibuffer Completion) 29 * 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
421* Setting Variables:: Storing new values in variables. 421* Setting Variables:: Storing new values in variables.
422* Variable Scoping:: How Lisp chooses among local and global values. 422* Variable Scoping:: How Lisp chooses among local and global values.
423* Buffer-Local Variables:: Variable values in effect only in one buffer. 423* Buffer-Local Variables:: Variable values in effect only in one buffer.
424* Frame-Local Variables:: Variable values in effect only in one frame.
425* Future Local Variables:: New kinds of local values we might add some day. 424* Future Local Variables:: New kinds of local values we might add some day.
426* File Local Variables:: Handling local variable lists in files. 425* File Local Variables:: Handling local variable lists in files.
427* Variable Aliases:: Variables that are aliases for other variables. 426* 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
141to. These variables include @code{default-minibuffer-frame}, 141to. These variables include @code{default-minibuffer-frame},
142@code{defining-kbd-macro}, @code{last-kbd-macro}, and 142@code{defining-kbd-macro}, @code{last-kbd-macro}, and
143@code{system-key-alist}. They are always terminal-local, and can never 143@code{system-key-alist}. They are always terminal-local, and can never
144be buffer-local (@pxref{Buffer-Local Variables}) or frame-local. 144be buffer-local (@pxref{Buffer-Local Variables}).
145 145
146 A single X server can handle more than one screen. A display name 146 A single X server can handle more than one screen. A display name
147@samp{@var{host}:@var{server}.@var{screen}} has three parts; the last 147@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}.
1326@item call-interactively 1326@item call-interactively
1327See @ref{Interactive Call}. 1327See @ref{Interactive Call}.
1328 1328
1329@item called-interactively-p
1330See @ref{Distinguish Interactive}.
1331
1329@item commandp 1332@item commandp
1330See @ref{Interactive Call}. 1333See @ref{Interactive Call}.
1331 1334
@@ -1351,7 +1354,7 @@ See @ref{Function Indirection}.
1351See @ref{Using Interactive}. 1354See @ref{Using Interactive}.
1352 1355
1353@item interactive-p 1356@item interactive-p
1354See @ref{Interactive Call}. 1357See @ref{Distinguish Interactive}.
1355 1358
1356@item mapatoms 1359@item mapatoms
1357See @ref{Creating Symbols}. 1360See @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},
862It then restores any autoloads formerly associated with those symbols. 862It then restores any autoloads formerly associated with those symbols.
863(Loading saves these in the @code{autoload} property of the symbol.) 863(Loading saves these in the @code{autoload} property of the symbol.)
864 864
865@vindex unload-feature-special-hooks
866Before restoring the previous definitions, @code{unload-feature} runs 865Before restoring the previous definitions, @code{unload-feature} runs
867@code{remove-hook} to remove functions in the library from certain 866@code{remove-hook} to remove functions in the library from certain
868hooks. These hooks include variables whose names end in @samp{hook} 867hooks. These hooks include variables whose names end in @samp{hook}
869or @samp{-hooks}, plus those listed in 868or @samp{-hooks}, plus those listed in
870@code{unload-feature-special-hooks}. This is to prevent Emacs from 869@code{unload-feature-special-hooks}, as well as
871ceasing to function because important hooks refer to functions that 870@code{auto-mode-alist}. This is to prevent Emacs from ceasing to
872are no longer defined. 871function because important hooks refer to functions that are no longer
872defined.
873 873
874@vindex @var{feature}-unload-hook 874Standard unloading activities also undoes ELP profiling of functions
875in that library, unprovides any features provided by the library, and
876cancels timers held in variables defined by the library.
877
878@vindex @var{feature}-unload-function
875If these measures are not sufficient to prevent malfunction, a library 879If these measures are not sufficient to prevent malfunction, a library
876can define an explicit unload hook. If @code{@var{feature}-unload-hook} 880can define an explicit unloader named @code{@var{feature}-unload-function}.
877is defined, it is run as a normal hook before restoring the previous 881If that symbol is defined as a function, @code{unload-feature} calls
878definitions, @emph{instead of} the usual hook-removing actions. The 882it with no arguments before doing anything else. It can do whatever
879unload hook ought to undo all the global state changes made by the 883is appropriate to unload the library. If it returns @code{nil},
880library that might cease to work once the library is unloaded. 884@code{unload-feature} proceeds to take the normal unload actions.
881@code{unload-feature} can cause problems with libraries that fail to do 885Otherwise it considers the job to be done.
882this, so it should be used with caution.
883 886
884Ordinarily, @code{unload-feature} refuses to unload a library on which 887Ordinarily, @code{unload-feature} refuses to unload a library on which
885other loaded libraries depend. (A library @var{a} depends on library 888other 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.
1561 1561
1562@c Emacs 19 feature 1562@c Emacs 19 feature
1563@defun current-idle-time 1563@defun current-idle-time
1564This function returns the length of time Emacs has been idle, as a 1564If Emacs is idle, this function returns the length of time Emacs has
1565list of three integers: @code{(@var{high} @var{low} @var{microsec})}. 1565been idle, as a list of three integers: @code{(@var{high} @var{low}
1566The integers @var{high} and @var{low} combine to give the number of 1566@var{microsec})}. The integers @var{high} and @var{low} combine to
1567seconds of idleness, which is 1567give the number of seconds of idleness, which is
1568@ifnottex 1568@ifnottex
1569@var{high} * 2**16 + @var{low}. 1569@var{high} * 2**16 + @var{low}.
1570@end ifnottex 1570@end ifnottex
@@ -1576,6 +1576,9 @@ The third element, @var{microsec}, gives the microseconds since the
1576start of the current second (or 0 for systems that return time with 1576start of the current second (or 0 for systems that return time with
1577the resolution of only one second). 1577the resolution of only one second).
1578 1578
1579When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
1580This is a convenient way to test whether Emacs is idle.
1581
1579The main use of this function is when an idle timer function wants to 1582The main use of this function is when an idle timer function wants to
1580``take a break'' for a while. It can set up another idle timer to 1583``take a break'' for a while. It can set up another idle timer to
1581call the same function again, after a few seconds more idleness. 1584call 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.
39* Setting Variables:: Storing new values in variables. 39* Setting Variables:: Storing new values in variables.
40* Variable Scoping:: How Lisp chooses among local and global values. 40* Variable Scoping:: How Lisp chooses among local and global values.
41* Buffer-Local Variables:: Variable values in effect only in one buffer. 41* Buffer-Local Variables:: Variable values in effect only in one buffer.
42* Frame-Local Variables:: Variable values in effect only in one frame.
43* Future Local Variables:: New kinds of local values we might add some day. 42* Future Local Variables:: New kinds of local values we might add some day.
44* File Local Variables:: Handling local variable lists in files. 43* File Local Variables:: Handling local variable lists in files.
45* Variable Aliases:: Variables that are aliases for other variables. 44* Variable Aliases:: Variables that are aliases for other variables.
@@ -255,11 +254,10 @@ Macro calls (@pxref{Macros}).
255@end itemize 254@end itemize
256 255
257 Variables can also have buffer-local bindings (@pxref{Buffer-Local 256 Variables can also have buffer-local bindings (@pxref{Buffer-Local
258Variables}) and frame-local bindings (@pxref{Frame-Local Variables}); a 257Variables}); a few variables have terminal-local bindings
259few variables have terminal-local bindings (@pxref{Multiple Displays}). 258(@pxref{Multiple Displays}). These kinds of bindings work somewhat
260These kinds of bindings work somewhat like ordinary local bindings, but 259like ordinary local bindings, but they are localized depending on
261they are localized depending on ``where'' you are in Emacs, rather than 260``where'' you are in Emacs, rather than localized in time.
262localized in time.
263 261
264@defvar max-specpdl-size 262@defvar max-specpdl-size
265@anchor{Definition of max-specpdl-size} 263@anchor{Definition of max-specpdl-size}
@@ -1085,16 +1083,12 @@ use short names like @code{x}.
1085@cindex buffer-local variables 1083@cindex buffer-local variables
1086 1084
1087 Global and local variable bindings are found in most programming 1085 Global and local variable bindings are found in most programming
1088languages in one form or another. Emacs, however, also supports additional, 1086languages in one form or another. Emacs, however, also supports
1089unusual kinds of variable binding: @dfn{buffer-local} bindings, which 1087additional, unusual kinds of variable binding, such as
1090apply only in one buffer, and @dfn{frame-local} bindings, which apply only in 1088@dfn{buffer-local} bindings, which apply only in one buffer. Having
1091one frame. Having different values for a variable in different buffers 1089different values for a variable in different buffers is an important
1092and/or frames is an important customization method. 1090customization method. (A few variables have bindings that are local
1093 1091to each terminal; see @ref{Multiple Displays}.)
1094 This section describes buffer-local bindings; for frame-local
1095bindings, see the following section, @ref{Frame-Local Variables}. (A few
1096variables have bindings that are local to each terminal; see
1097@ref{Multiple Displays}.)
1098 1092
1099@menu 1093@menu
1100* Intro to Buffer-Local:: Introduction and concepts. 1094* Intro to Buffer-Local:: Introduction and concepts.
@@ -1121,8 +1115,7 @@ this is the global binding.
1121other buffers. The default binding is shared by all the buffers that 1115other buffers. The default binding is shared by all the buffers that
1122don't have their own bindings for the variable. (This includes all 1116don't have their own bindings for the variable. (This includes all
1123newly-created buffers.) If you set the variable in a buffer that does 1117newly-created buffers.) If you set the variable in a buffer that does
1124not have a buffer-local binding for it, this sets the default binding 1118not have a buffer-local binding for it, this sets the default binding,
1125(assuming there are no frame-local bindings to complicate the matter),
1126so the new value is visible in all the buffers that see the default 1119so the new value is visible in all the buffers that see the default
1127binding. 1120binding.
1128 1121
@@ -1153,11 +1146,11 @@ the default binding untouched. This means that the default value cannot
1153be changed with @code{setq} in any buffer; the only way to change it is 1146be changed with @code{setq} in any buffer; the only way to change it is
1154with @code{setq-default}. 1147with @code{setq-default}.
1155 1148
1156 @strong{Warning:} When a variable has buffer-local or frame-local 1149 @strong{Warning:} When a variable has buffer-local
1157bindings in one or more buffers, @code{let} rebinds the binding that's 1150bindings in one or more buffers, @code{let} rebinds the binding that's
1158currently in effect. For instance, if the current buffer has a 1151currently in effect. For instance, if the current buffer has a
1159buffer-local value, @code{let} temporarily rebinds that. If no 1152buffer-local value, @code{let} temporarily rebinds that. If no
1160buffer-local or frame-local bindings are in effect, @code{let} rebinds 1153buffer-local bindings are in effect, @code{let} rebinds
1161the default value. If inside the @code{let} you then change to a 1154the default value. If inside the @code{let} you then change to a
1162different current buffer in which a different binding is in effect, 1155different current buffer in which a different binding is in effect,
1163you won't see the @code{let} binding any more. And if you exit the 1156you won't see the @code{let} binding any more. And if you exit the
@@ -1421,7 +1414,7 @@ this variable.
1421@c Emacs 19 feature 1414@c Emacs 19 feature
1422 The special forms @code{defvar} and @code{defconst} also set the 1415 The special forms @code{defvar} and @code{defconst} also set the
1423default value (if they set the variable at all), rather than any 1416default value (if they set the variable at all), rather than any
1424buffer-local or frame-local value. 1417buffer-local value.
1425 1418
1426@defun default-value symbol 1419@defun default-value symbol
1427This function returns @var{symbol}'s default value. This is the value 1420This function returns @var{symbol}'s default value. This is the value
@@ -1520,112 +1513,6 @@ an ordinary evaluated argument.
1520@end example 1513@end example
1521@end defun 1514@end defun
1522 1515
1523@node Frame-Local Variables
1524@section Frame-Local Variables
1525@cindex frame-local variables
1526
1527 Just as variables can have buffer-local bindings, they can also have
1528frame-local bindings. These bindings belong to one frame, and are in
1529effect when that frame is selected. Frame-local bindings are actually
1530frame parameters: you create a frame-local binding in a specific frame
1531by calling @code{modify-frame-parameters} and specifying the variable
1532name as the parameter name.
1533
1534 To enable frame-local bindings for a certain variable, call the function
1535@code{make-variable-frame-local}.
1536
1537@deffn Command make-variable-frame-local variable
1538Enable the use of frame-local bindings for @var{variable}. This does
1539not in itself create any frame-local bindings for the variable; however,
1540if some frame already has a value for @var{variable} as a frame
1541parameter, that value automatically becomes a frame-local binding.
1542
1543If @var{variable} does not have a default value, then calling this
1544command will give it a default value of @code{nil}. If @var{variable}
1545already has a default value, that value remains unchanged.
1546
1547If the variable is terminal-local, this function signals an error,
1548because such variables cannot have frame-local bindings as well.
1549@xref{Multiple Displays}. A few variables that are implemented
1550specially in Emacs can be buffer-local, but can never be frame-local.
1551
1552This command returns @var{variable}.
1553@end deffn
1554
1555 Buffer-local bindings take precedence over frame-local bindings. Thus,
1556consider a variable @code{foo}: if the current buffer has a buffer-local
1557binding for @code{foo}, that binding is active; otherwise, if the
1558selected frame has a frame-local binding for @code{foo}, that binding is
1559active; otherwise, the default binding of @code{foo} is active.
1560
1561 Here is an example. First we prepare a few bindings for @code{foo}:
1562
1563@example
1564(setq f1 (selected-frame))
1565(make-variable-frame-local 'foo)
1566
1567;; @r{Make a buffer-local binding for @code{foo} in @samp{b1}.}
1568(set-buffer (get-buffer-create "b1"))
1569(make-local-variable 'foo)
1570(setq foo '(b 1))
1571
1572;; @r{Make a frame-local binding for @code{foo} in a new frame.}
1573;; @r{Store that frame in @code{f2}.}
1574(setq f2 (make-frame))
1575(modify-frame-parameters f2 '((foo . (f 2))))
1576@end example
1577
1578 Now we examine @code{foo} in various contexts. Whenever the
1579buffer @samp{b1} is current, its buffer-local binding is in effect,
1580regardless of the selected frame:
1581
1582@example
1583(select-frame f1)
1584(set-buffer (get-buffer-create "b1"))
1585foo
1586 @result{} (b 1)
1587
1588(select-frame f2)
1589(set-buffer (get-buffer-create "b1"))
1590foo
1591 @result{} (b 1)
1592@end example
1593
1594@noindent
1595Otherwise, the frame gets a chance to provide the binding; when frame
1596@code{f2} is selected, its frame-local binding is in effect:
1597
1598@example
1599(select-frame f2)
1600(set-buffer (get-buffer "*scratch*"))
1601foo
1602 @result{} (f 2)
1603@end example
1604
1605@noindent
1606When neither the current buffer nor the selected frame provides
1607a binding, the default binding is used:
1608
1609@example
1610(select-frame f1)
1611(set-buffer (get-buffer "*scratch*"))
1612foo
1613 @result{} nil
1614@end example
1615
1616@noindent
1617When the active binding of a variable is a frame-local binding, setting
1618the variable changes that binding. You can observe the result with
1619@code{frame-parameters}:
1620
1621@example
1622(select-frame f2)
1623(set-buffer (get-buffer "*scratch*"))
1624(setq foo 'nobody)
1625(assq 'foo (frame-parameters f2))
1626 @result{} (foo . nobody)
1627@end example
1628
1629@node Future Local Variables 1516@node Future Local Variables
1630@section Possible Future Local Variables 1517@section Possible Future Local Variables
1631 1518