aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2012-09-30 17:18:38 +0800
committerChong Yidong2012-09-30 17:18:38 +0800
commit48de8b12215e22390db1bc822e809708070ab938 (patch)
tree125595be25583796bec86a019f75c8049164133e
parent5938d5196d09aff887aa74603c102b1f303a613a (diff)
downloademacs-48de8b12215e22390db1bc822e809708070ab938.tar.gz
emacs-48de8b12215e22390db1bc822e809708070ab938.zip
Update docs for a bunch of 24.3 changes.
* doc/emacs/killing.texi (Rectangles): Document copy-rectangle-as-kill. * doc/emacs/search.texi (Special Isearch): Document the lax space search feature and M-s SPC. (Regexp Search): Move main search-whitespace-regexp description to Special Isearch. (Replace): Document replace-lax-whitespace. * doc/emacs/basic.texi (Position Info): Document C-u M-=. (Moving Point): Document move-to-column. * doc/emacs/display.texi (Useless Whitespace): Add delete-trailing-lines. * doc/emacs/misc.texi (emacsclient Options): Document the effect of initial-buffer-choice on client frames. Document server-auth-dir. Do not document server-host, which is bad security practice. * doc/emacs/building.texi (Lisp Libraries): Docstring lookups can trigger autoloading. Document help-enable-auto-load. * doc/emacs/mini.texi (Yes or No Prompts): New node. * doc/emacs/ack.texi (Acknowledgments): Remove obsolete packages. * doc/lispref/commands.texi (Click Events): Define "mouse position list". Remove mention of unimplemented horizontal scroll bars. (Drag Events, Motion Events): Refer to "mouse position list". (Accessing Mouse): Document posnp. * doc/lispref/errors.texi (Standard Errors): Tweak arith-error description. Tweak markup. Remove domain-error and friends, which seem to be unused after the floating-point code revamp. * doc/lispref/functions.texi (Obsolete Functions): Obsolescence also affects documentation commands. Various clarifications. (Declare Form): New node. * doc/lispref/loading.texi (Autoload): * doc/lispref/help.texi (Documentation Basics): The special sequences can trigger autoloading. * doc/lispref/macros.texi (Defining Macros): Move description of `declare' to Declare Form node. * doc/lispref/numbers.texi (Integer Basics): Copyedits. (Float Basics): Consider IEEE floating point always available. (Random Numbers): Document actual limits. (Arithmetic Operations): Clarify division by zero. Don't mention the machine-independence of negative division since it does not happen in practice. * doc/lispref/os.texi (Idle Timers): Minor clarifications. (User Identification): Add system-users and system-groups. * doc/lispref/strings.texi (String Basics): Copyedits. * lisp/minibuffer.el (minibuffer-local-filename-syntax): Doc fix. * lisp/server.el (server-host): Document the security implications. (server-auth-key): Doc fix. * lisp/startup.el (initial-buffer-choice): Doc fix. * src/fns.c (Frandom): Doc fix.
-rw-r--r--doc/emacs/ChangeLog26
-rw-r--r--doc/emacs/ack.texi29
-rw-r--r--doc/emacs/basic.texi24
-rw-r--r--doc/emacs/building.texi10
-rw-r--r--doc/emacs/display.texi14
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/entering.texi5
-rw-r--r--doc/emacs/help.texi2
-rw-r--r--doc/emacs/killing.texi9
-rw-r--r--doc/emacs/mini.texi51
-rw-r--r--doc/emacs/misc.texi76
-rw-r--r--doc/emacs/search.texi38
-rw-r--r--doc/lispref/ChangeLog42
-rw-r--r--doc/lispref/commands.texi142
-rw-r--r--doc/lispref/elisp.texi1
-rw-r--r--doc/lispref/errors.texi160
-rw-r--r--doc/lispref/frames.texi24
-rw-r--r--doc/lispref/functions.texi109
-rw-r--r--doc/lispref/help.texi16
-rw-r--r--doc/lispref/loading.texi8
-rw-r--r--doc/lispref/macros.texi39
-rw-r--r--doc/lispref/numbers.texi176
-rw-r--r--doc/lispref/os.texi110
-rw-r--r--doc/lispref/strings.texi45
-rw-r--r--etc/NEWS89
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/minibuffer.el2
-rw-r--r--lisp/server.el25
-rw-r--r--lisp/startup.el5
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fns.c5
31 files changed, 754 insertions, 540 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index e0ed850c394..c1894fb900b 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,29 @@
12012-09-30 Chong Yidong <cyd@gnu.org>
2
3 * killing.texi (Rectangles): Document copy-rectangle-as-kill.
4
5 * search.texi (Special Isearch): Document the lax space search
6 feature and M-s SPC.
7 (Regexp Search): Move main search-whitespace-regexp description to
8 Special Isearch.
9 (Replace): Document replace-lax-whitespace.
10
11 * basic.texi (Position Info): Document C-u M-=.
12 (Moving Point): Document move-to-column.
13
14 * display.texi (Useless Whitespace): Add delete-trailing-lines.
15
16 * misc.texi (emacsclient Options): Document the effect of
17 initial-buffer-choice on client frames. Document server-auth-dir.
18 Do not document server-host, which is bad security practice.
19
20 * building.texi (Lisp Libraries): Docstring lookups can trigger
21 autoloading. Document help-enable-auto-load.
22
23 * mini.texi (Yes or No Prompts): New node.
24
25 * ack.texi (Acknowledgments): Remove obsolete packages.
26
12012-09-27 Glenn Morris <rgm@gnu.org> 272012-09-27 Glenn Morris <rgm@gnu.org>
2 28
3 * cal-xtra.texi (Advanced Calendar/Diary Usage): 29 * cal-xtra.texi (Advanced Calendar/Diary Usage):
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index 487e3c19c16..8d1e4221a6c 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -644,10 +644,9 @@ statically scoped Emacs lisp.
644@item 644@item
645Daniel LaLiberte wrote @file{edebug.el}, a source-level debugger for 645Daniel LaLiberte wrote @file{edebug.el}, a source-level debugger for
646Emacs Lisp; @file{cl-specs.el}, specifications to help @code{edebug} 646Emacs Lisp; @file{cl-specs.el}, specifications to help @code{edebug}
647debug code written using David Gillespie's Common Lisp support; 647debug code written using David Gillespie's Common Lisp support; and
648@file{cust-print.el}, a customizable package for printing lisp 648@file{isearch.el}, Emacs's incremental search minor mode. He also
649objects; and @file{isearch.el}, Emacs's incremental search minor mode. 649co-wrote @file{hideif.el} (q.v.@:).
650He also co-wrote @file{hideif.el} (q.v.@:).
651 650
652@item 651@item
653Karl Landstrom and Daniel Colascione wrote @file{js.el}, a mode for 652Karl Landstrom and Daniel Colascione wrote @file{js.el}, a mode for
@@ -1301,15 +1300,14 @@ providing electric accent keys.
1301Colin Walters wrote Ibuffer, an enhanced buffer menu. 1300Colin Walters wrote Ibuffer, an enhanced buffer menu.
1302 1301
1303@item 1302@item
1304Barry Warsaw wrote @file{assoc.el}, a set of utility functions for 1303Barry Warsaw wrote @file{cc-mode.el}, a mode for editing C, C@t{++},
1305working with association lists; @file{cc-mode.el}, a mode for editing 1304and Java code, based on earlier work by Dave Detlefs, Stewart Clamen,
1306C, C@t{++}, and Java code, based on earlier work by Dave Detlefs, 1305and Richard Stallman; @file{elp.el}, a profiler for Emacs Lisp
1307Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler for 1306programs; @file{man.el}, a mode for reading Unix manual pages;
1308Emacs Lisp programs; @file{man.el}, a mode for reading Unix manual 1307@file{regi.el}, providing an AWK-like functionality for use in lisp
1309pages; @file{regi.el}, providing an AWK-like functionality for use in 1308programs; @file{reporter.el}, providing customizable bug reporting for
1310lisp programs; @file{reporter.el}, providing customizable bug 1309lisp packages; and @file{supercite.el}, a minor mode for quoting
1311reporting for lisp packages; and @file{supercite.el}, a minor mode for 1310sections of mail messages and news articles.
1312quoting sections of mail messages and news articles.
1313 1311
1314@item 1312@item
1315Christoph Wedler wrote @file{antlr-mode.el}, a major mode for ANTLR 1313Christoph Wedler wrote @file{antlr-mode.el}, a major mode for ANTLR
@@ -1351,9 +1349,8 @@ Directory Client; and @code{eshell}, a command shell implemented
1351entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:). 1349entirely in Emacs Lisp. He also contributed to Org mode (q.v.@:).
1352 1350
1353@item 1351@item
1354Mike Williams wrote @file{mouse-sel.el}, providing enhanced mouse 1352Mike Williams wrote @file{thingatpt.el}, a library of functions for
1355selection; and @file{thingatpt.el}, a library of functions for finding 1353finding the ``thing'' (word, line, s-expression) at point.
1356the ``thing'' (word, line, s-expression) containing point.
1357 1354
1358@item 1355@item
1359Roland Winkler wrote @file{proced.el}, a system process editor. 1356Roland Winkler wrote @file{proced.el}, a system process editor.
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 16ccdba0866..42bd2a4fde2 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -267,7 +267,8 @@ necessary (@code{scroll-up-command}). @xref{Scrolling}.
267Scroll one screen backward, and move point onscreen if necessary 267Scroll one screen backward, and move point onscreen if necessary
268(@code{scroll-down-command}). @xref{Scrolling}. 268(@code{scroll-down-command}). @xref{Scrolling}.
269 269
270@item M-x goto-char 270@item M-g c
271@kindex M-g c
271@findex goto-char 272@findex goto-char
272Read a number @var{n} and move point to buffer position @var{n}. 273Read a number @var{n} and move point to buffer position @var{n}.
273Position 1 is the beginning of the buffer. 274Position 1 is the beginning of the buffer.
@@ -285,6 +286,13 @@ also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument.
285@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it 286@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it
286a plain prefix argument. 287a plain prefix argument.
287 288
289@item M-g @key{TAB}
290@kindex M-g TAB
291@findex move-to-column
292Read a number @var{n} and move to column @var{n} in the current line.
293Column 0 is the leftmost column. If called with a prefix argument,
294move to the column number specified by the argument's numeric value.
295
288@item C-x C-n 296@item C-x C-n
289@kindex C-x C-n 297@kindex C-x C-n
290@findex set-goal-column 298@findex set-goal-column
@@ -619,12 +627,16 @@ narrowed region and the line number relative to the whole buffer.
619 627
620@kindex M-= 628@kindex M-=
621@findex count-words-region 629@findex count-words-region
622@findex count-words
623 @kbd{M-=} (@code{count-words-region}) displays a message reporting 630 @kbd{M-=} (@code{count-words-region}) displays a message reporting
624the number of lines, words, and characters in the region. @kbd{M-x 631the number of lines, words, and characters in the region
625count-words} displays a similar message for the entire buffer, or for 632(@pxref{Mark}, for an explanation of the region). With a prefix
626the region if the region is @dfn{active}. @xref{Mark}, for an 633argument, @kbd{C-u M-=}, the command displays a count for the entire
627explanation of the region. 634buffer.
635
636@findex count-words
637 The command @kbd{M-x count-words} does the same job, but with a
638different calling convention. It displays a count for the region if
639the region is active, and for the buffer otherwise.
628 640
629@kindex C-x = 641@kindex C-x =
630@findex what-cursor-position 642@findex what-cursor-position
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 21948f181fb..eaee16ac8d5 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -1393,13 +1393,21 @@ putting a line like this in your init file (@pxref{Init File}):
1393@end example 1393@end example
1394 1394
1395@cindex autoload 1395@cindex autoload
1396 Some commands are @dfn{autoloaded}: when you run them, Emacs 1396 Some commands are @dfn{autoloaded}; when you run them, Emacs
1397automatically loads the associated library first. For instance, the 1397automatically loads the associated library first. For instance, the
1398@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you 1398@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
1399call it, Emacs automatically loads the @code{compile} library first. 1399call it, Emacs automatically loads the @code{compile} library first.
1400In contrast, the command @kbd{M-x recompile} is not autoloaded, so it 1400In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
1401is unavailable until you load the @code{compile} library. 1401is unavailable until you load the @code{compile} library.
1402 1402
1403@vindex help-enable-auto-load
1404 Automatic loading can also occur when you look up the documentation
1405of an autoloaded command (@pxref{Name Help}), if the documentation
1406refers to other functions and variables in its library (loading the
1407library lets Emacs properly set up the hyperlinks in the @file{*Help*}
1408buffer). To disable this feature, change the variable
1409@code{help-enable-auto-load} to @code{nil}.
1410
1403@vindex load-dangerous-libraries 1411@vindex load-dangerous-libraries
1404@cindex Lisp files byte-compiled by XEmacs 1412@cindex Lisp files byte-compiled by XEmacs
1405 By default, Emacs refuses to load compiled Lisp files which were 1413 By default, Emacs refuses to load compiled Lisp files which were
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 2238570eaa9..2313d117a90 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -1044,9 +1044,9 @@ the left fringe, but no arrow bitmaps, use @code{((top . left)
1044@cindex whitespace, trailing 1044@cindex whitespace, trailing
1045@vindex show-trailing-whitespace 1045@vindex show-trailing-whitespace
1046 It is easy to leave unnecessary spaces at the end of a line, or 1046 It is easy to leave unnecessary spaces at the end of a line, or
1047empty lines at the end of a file, without realizing it. In most 1047empty lines at the end of a buffer, without realizing it. In most
1048cases, this @dfn{trailing whitespace} has no effect, but there are 1048cases, this @dfn{trailing whitespace} has no effect, but sometimes it
1049special circumstances where it matters, and it can be a nuisance. 1049can be a nuisance.
1050 1050
1051 You can make trailing whitespace at the end of a line visible by 1051 You can make trailing whitespace at the end of a line visible by
1052setting the buffer-local variable @code{show-trailing-whitespace} to 1052setting the buffer-local variable @code{show-trailing-whitespace} to
@@ -1061,9 +1061,13 @@ the location of point is enough to show you that the spaces are
1061present. 1061present.
1062 1062
1063@findex delete-trailing-whitespace 1063@findex delete-trailing-whitespace
1064@vindex delete-trailing-lines
1064 Type @kbd{M-x delete-trailing-whitespace} to delete all trailing 1065 Type @kbd{M-x delete-trailing-whitespace} to delete all trailing
1065whitespace within the buffer. If the region is active, it deletes all 1066whitespace. This command deletes all extra spaces at the end of each
1066trailing whitespace in the region instead. 1067line in the buffer, and all empty lines at the end of the buffer; to
1068ignore the latter, change the varaible @code{delete-trailing-lines} to
1069@code{nil}. If the region is active, the command instead deletes
1070extra spaces at the end of each line in the region.
1067 1071
1068@vindex indicate-empty-lines 1072@vindex indicate-empty-lines
1069@cindex unused lines 1073@cindex unused lines
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index c18123d7b29..a2eaaf673e5 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -267,6 +267,7 @@ The Minibuffer
267* Minibuffer History:: Reusing recent minibuffer arguments. 267* Minibuffer History:: Reusing recent minibuffer arguments.
268* Repetition:: Re-executing commands that used the minibuffer. 268* Repetition:: Re-executing commands that used the minibuffer.
269* Passwords:: Entering passwords in the echo area. 269* Passwords:: Entering passwords in the echo area.
270* Yes or No Prompts:: Replying yes or no in the echo area.
270 271
271Completion 272Completion
272 273
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi
index de143516ce8..224ab356d08 100644
--- a/doc/emacs/entering.texi
+++ b/doc/emacs/entering.texi
@@ -79,11 +79,6 @@ non-@code{nil} value. (In that case, even if you specify one or more
79files on the command line, Emacs opens but does not display them.) 79files on the command line, Emacs opens but does not display them.)
80The value of @code{initial-buffer-choice} should be the name of 80The value of @code{initial-buffer-choice} should be the name of
81the desired file or directory. 81the desired file or directory.
82@ignore
83@c I do not think this should be mentioned. AFAICS it is just a dodge
84@c around inhibit-startup-screen not being settable on a site-wide basis.
85or @code{t}, which means to display the @file{*scratch*} buffer.
86@end ignore
87 82
88@node Exiting 83@node Exiting
89@section Exiting Emacs 84@section Exiting Emacs
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index d09885c5edd..050ecd150ab 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -243,7 +243,7 @@ by the innermost Lisp expression in the buffer around point,
243(That name appears as the default while you enter the argument.) For 243(That name appears as the default while you enter the argument.) For
244example, if point is located following the text @samp{(make-vector 244example, if point is located following the text @samp{(make-vector
245(car x)}, the innermost list containing point is the one that starts 245(car x)}, the innermost list containing point is the one that starts
246with @samp{(make-vector}, so @kbd{C-h f @key{RET}} will describe the 246with @samp{(make-vector}, so @kbd{C-h f @key{RET}} describes the
247function @code{make-vector}. 247function @code{make-vector}.
248 248
249 @kbd{C-h f} is also useful just to verify that you spelled a 249 @kbd{C-h f} is also useful just to verify that you spelled a
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 1eb53d0d2ec..5510816b067 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -709,6 +709,9 @@ rectangle, depending on the command that uses them.
709@item C-x r k 709@item C-x r k
710Kill the text of the region-rectangle, saving its contents as the 710Kill the text of the region-rectangle, saving its contents as the
711``last killed rectangle'' (@code{kill-rectangle}). 711``last killed rectangle'' (@code{kill-rectangle}).
712@item C-x r M-w
713Save the text of the region-rectangle as the ``last killed rectangle''
714(@code{copy-rectangle-as-kill}).
712@item C-x r d 715@item C-x r d
713Delete the text of the region-rectangle (@code{delete-rectangle}). 716Delete the text of the region-rectangle (@code{delete-rectangle}).
714@item C-x r y 717@item C-x r y
@@ -757,6 +760,12 @@ yanking a rectangle is so different from yanking linear text that
757different yank commands have to be used. Yank-popping is not defined 760different yank commands have to be used. Yank-popping is not defined
758for rectangles. 761for rectangles.
759 762
763@kindex C-x r M-w
764@findex copy-rectangle-as-kill
765 @kbd{C-x r M-w} (@code{copy-rectangle-as-kill}) is the equivalent of
766@kbd{M-w} for rectangles: it records the rectangle as the ``last
767killed rectangle'', without deleting the text from the buffer.
768
760@kindex C-x r y 769@kindex C-x r y
761@findex yank-rectangle 770@findex yank-rectangle
762 To yank the last killed rectangle, type @kbd{C-x r y} 771 To yank the last killed rectangle, type @kbd{C-x r y}
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 2856db7a4fa..5d2fc804498 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -45,6 +45,7 @@ do not echo.
45* Minibuffer History:: Reusing recent minibuffer arguments. 45* Minibuffer History:: Reusing recent minibuffer arguments.
46* Repetition:: Re-executing commands that used the minibuffer. 46* Repetition:: Re-executing commands that used the minibuffer.
47* Passwords:: Entering passwords in the echo area. 47* Passwords:: Entering passwords in the echo area.
48* Yes or No Prompts:: Replying yes or no in the echo area.
48@end menu 49@end menu
49 50
50@node Minibuffer File 51@node Minibuffer File
@@ -733,3 +734,53 @@ password (@pxref{Killing}). You may type either @key{RET} or
733@key{ESC} to submit the password. Any other self-inserting character 734@key{ESC} to submit the password. Any other self-inserting character
734key inserts the associated character into the password, and all other 735key inserts the associated character into the password, and all other
735input is ignored. 736input is ignored.
737
738@node Yes or No Prompts
739@section Yes or No Prompts
740
741 An Emacs command may require you to answer a ``yes or no'' question
742during the course of its execution. Such queries come in two main
743varieties.
744
745@cindex y or n prompt
746 For the first type of ``yes or no'' query, the prompt ends with
747@samp{(y or n)}. Such a query does not actually use the minibuffer;
748the prompt appears in the echo area, and you answer by typing either
749@samp{y} or @samp{n}, which immediately delivers the response. For
750example, if you type @kbd{C-x C-w} (@kbd{write-file}) to save a
751buffer, and enter the name of an existing file, Emacs issues a prompt
752like this:
753
754@smallexample
755File `foo.el' exists; overwrite? (y or n)
756@end smallexample
757
758@noindent
759Because this query does not actually use the minibuffer, the usual
760minibuffer editing commands cannot be used. However, you can perform
761some window scrolling operations while the query is active: @kbd{C-l}
762recenters the selected window; @kbd{M-v} (or @key{PageDown} or
763@key{next}) scrolls forward; @kbd{C-v} (or @key{PageUp}, or
764@key{prior}) scrolls backward; @kbd{C-M-v} scrolls forward in the next
765window; and @kbd{C-M-S-v} scrolls backward in the next window. Typing
766@kbd{C-g} dismisses the query, and quits the command that issued it
767(@pxref{Quitting}).
768
769@cindex yes or no prompt
770 The second type of ``yes or no'' query is typically employed if
771giving the wrong answer would have serious consequences; it uses the
772minibuffer, and features a prompt ending with @samp{(yes or no)}. For
773example, if you invoke @kbd{C-x k} (@code{kill-buffer}) on a
774file-visiting buffer with unsaved changes, Emacs activates the
775minibuffer with a prompt like this:
776
777@smallexample
778Buffer foo.el modified; kill anyway? (yes or no)
779@end smallexample
780
781@noindent
782To answer, you must type @samp{yes} or @samp{no} into the minibuffer,
783followed by @key{RET}. The minibuffer behaves as described in the
784previous sections; you can switch to another window with @kbd{C-x o},
785use the history commands @kbd{M-p} and @kbd{M-f}, etc. Type @kbd{C-g}
786to quit the minibuffer and the querying command.
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 5d7a51a01f5..4f0a1009e30 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1509,15 +1509,11 @@ precedence.
1509@cindex client frame 1509@cindex client frame
1510@item -c 1510@item -c
1511Create a new graphical @dfn{client frame}, instead of using an 1511Create a new graphical @dfn{client frame}, instead of using an
1512existing Emacs frame. If you omit a filename argument while supplying 1512existing Emacs frame. See below for the special behavior of @kbd{C-x
1513the @samp{-c} option, the new frame displays the @file{*scratch*} 1513C-c} in a client frame. If Emacs cannot create a new graphical frame
1514buffer (@pxref{Buffers}). See below for the special behavior of 1514(e.g.@: if it cannot connect to the X server), it tries to create a
1515@kbd{C-x C-c} in a client frame. 1515text terminal client frame, as though you had supplied the @samp{-t}
1516 1516option instead.
1517If Emacs is unable to create a new graphical frame (e.g.@: if it is
1518unable to connect to the X server), it tries to create a text terminal
1519client frame, as though you had supplied the @samp{-t} option instead
1520(see below).
1521 1517
1522On MS-Windows, a single Emacs session cannot display frames on both 1518On MS-Windows, a single Emacs session cannot display frames on both
1523graphical and text terminals, nor on multiple text terminals. Thus, 1519graphical and text terminals, nor on multiple text terminals. Thus,
@@ -1525,6 +1521,11 @@ if the Emacs server is running on a text terminal, the @samp{-c}
1525option, like the @samp{-t} option, creates a new frame in the server's 1521option, like the @samp{-t} option, creates a new frame in the server's
1526current text terminal. @xref{Windows Startup}. 1522current text terminal. @xref{Windows Startup}.
1527 1523
1524If you omit a filename argument while supplying the @samp{-c} option,
1525the new frame displays the @file{*scratch*} buffer by default. If
1526@code{initial-buffer-choice} is a string (@pxref{Entering Emacs}), the
1527new frame displays that file or directory instead.
1528
1528@item -F @var{alist} 1529@item -F @var{alist}
1529@itemx --frame-parameters=@var{alist} 1530@itemx --frame-parameters=@var{alist}
1530Set the parameters for a newly-created graphical frame 1531Set the parameters for a newly-created graphical frame
@@ -1545,38 +1546,24 @@ evaluate, @emph{not} as a list of files to visit.
1545@item -f @var{server-file} 1546@item -f @var{server-file}
1546@itemx --server-file=@var{server-file} 1547@itemx --server-file=@var{server-file}
1547@cindex @env{EMACS_SERVER_FILE} environment variable 1548@cindex @env{EMACS_SERVER_FILE} environment variable
1548@cindex server file
1549@vindex server-use-tcp
1550@vindex server-host
1551Specify a @dfn{server file} for connecting to an Emacs server via TCP. 1549Specify a @dfn{server file} for connecting to an Emacs server via TCP.
1552 1550
1553An Emacs server usually uses an operating system feature called a 1551An Emacs server usually uses an operating system feature called a
1554``local socket'' to listen for connections. Some operating systems, 1552``local socket'' to listen for connections. Some operating systems,
1555such as Microsoft Windows, do not support local sockets; in that case, 1553such as Microsoft Windows, do not support local sockets; in that case,
1556Emacs uses TCP instead. When you start the Emacs server, Emacs 1554the server communicates with @command{emacsclient} via TCP.
1557creates a server file containing some TCP information that
1558@command{emacsclient} needs for making the connection. By default,
1559the server file is in @file{~/.emacs.d/server/}. On Microsoft
1560Windows, if @command{emacsclient} does not find the server file there,
1561it looks in the @file{.emacs.d/server/} subdirectory of the directory
1562pointed to by the @env{APPDATA} environment variable. You can tell
1563@command{emacsclient} to use a specific server file with the @samp{-f}
1564or @samp{--server-file} option, or by setting the
1565@env{EMACS_SERVER_FILE} environment variable.
1566
1567Even if local sockets are available, you can tell Emacs to use TCP by
1568setting the variable @code{server-use-tcp} to @code{t}. One advantage
1569of TCP is that the server can accept connections from remote machines.
1570For this to work, you must (i) set the variable @code{server-host} to
1571the hostname or IP address of the machine on which the Emacs server
1572runs, and (ii) provide @command{emacsclient} with the server file.
1573(One convenient way to do the latter is to put the server file on a
1574networked file system such as NFS.)
1575 1555
1556@vindex server-auth-dir
1557@cindex server file
1576@vindex server-port 1558@vindex server-port
1577 When the Emacs server is using TCP, the variable @code{server-port} 1559When you start a TCP Emacs server, Emacs creates a @dfn{server file}
1578determines the port number to listen on; the default value, 1560containing the TCP information to be used by @command{emacsclient} to
1579@code{nil}, means to choose a random port when the server starts. 1561connect to the server. The variable @code{server-auth-dir} specifies
1562the directory containing the server file; by default, this is
1563@file{~/.emacs.d/server/}. To tell @command{emacsclient} to connect
1564to the server over TCP with a specific server file, use the @samp{-f}
1565or @samp{--server-file} option, or set the @env{EMACS_SERVER_FILE}
1566environment variable.
1580 1567
1581@item -n 1568@item -n
1582@itemx --no-wait 1569@itemx --no-wait
@@ -1606,19 +1593,14 @@ server it finds. (This option is not supported on MS-Windows.)
1606@itemx --tty 1593@itemx --tty
1607@itemx -nw 1594@itemx -nw
1608Create a new client frame on the current text terminal, instead of 1595Create a new client frame on the current text terminal, instead of
1609using an existing Emacs frame. This is similar to the @samp{-c} 1596using an existing Emacs frame. This behaves just like the @samp{-c}
1610option, above, except that it creates a text terminal frame 1597option, described above, except that it creates a text terminal frame
1611(@pxref{Non-Window Terminals}). If you omit a filename argument while 1598(@pxref{Non-Window Terminals}).
1612supplying this option, the new frame displays the @file{*scratch*} 1599
1613buffer (@pxref{Buffers}). See below for the special behavior of 1600On MS-Windows, @samp{-t} behaves just like @samp{-c} if the Emacs
1614@kbd{C-x C-c} in a client frame. 1601server is using the graphical display, but if the Emacs server is
1615 1602running on a text terminal, it creates a new frame in the current text
1616On MS-Windows, a single Emacs session cannot display frames on both 1603terminal.
1617graphical and text terminals, nor on multiple text terminals. Thus,
1618if the Emacs server is using the graphical display, @samp{-t} behaves
1619like @samp{-c} (see above); whereas if the Emacs server is running on
1620a text terminal, it creates a new frame in its current text terminal.
1621@xref{Windows Startup}.
1622@end table 1604@end table
1623 1605
1624 The new graphical or text terminal frames created by the @samp{-c} 1606 The new graphical or text terminal frames created by the @samp{-c}
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index d5c9783b772..21db02c8ab8 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -17,7 +17,6 @@ thing, but search for patterns instead of fixed strings.
17(@pxref{Operating on Files}), or ask the @code{grep} program to do it 17(@pxref{Operating on Files}), or ask the @code{grep} program to do it
18(@pxref{Grep Searching}). 18(@pxref{Grep Searching}).
19 19
20
21@menu 20@menu
22* Incremental Search:: Search happens as you type the string. 21* Incremental Search:: Search happens as you type the string.
23* Nonincremental Search:: Specify entire string and then search. 22* Nonincremental Search:: Specify entire string and then search.
@@ -218,6 +217,24 @@ search.
218 Some of the characters you type during incremental search have 217 Some of the characters you type during incremental search have
219special effects. 218special effects.
220 219
220@cindex lax space matching
221@kindex M-s SPC @r{(Incremental search)}
222@kindex SPC @r{(Incremental search)}
223@findex isearch-toggle-lax-whitespace
224@vindex search-whitespace-regexp
225 By default, incremental search performs @dfn{lax space matching}:
226each space, or sequence of spaces, matches any sequence of one or more
227spaces in the text. Hence, @samp{foo bar} matches @samp{foo bar},
228@samp{foo bar}, @samp{foo bar}, and so on (but not @samp{foobar}).
229More precisely, Emacs matches each sequence of space characters in the
230search string to a regular expression specified by the variable
231@code{search-whitespace-regexp}. For example, set it to
232@samp{"[[:space:]\n]+"} to make spaces match sequences of newlines as
233well as spaces. To toggle lax space matching, type @kbd{M-s SPC}
234(@code{isearch-toggle-lax-whitespace}). To disable this feature
235entirely, change @code{search-whitespace-regexp} to @code{nil}; then
236each space in the search string matches exactly one space
237
221 If the search string you entered contains only lower-case letters, 238 If the search string you entered contains only lower-case letters,
222the search is case-insensitive; as long as an upper-case letter exists 239the search is case-insensitive; as long as an upper-case letter exists
223in the search string, the search becomes case-sensitive. If you 240in the search string, the search becomes case-sensitive. If you
@@ -492,12 +509,12 @@ Incremental regexp and non-regexp searches have independent defaults.
492They also have separate search rings, which you can access with 509They also have separate search rings, which you can access with
493@kbd{M-p} and @kbd{M-n}. 510@kbd{M-p} and @kbd{M-n}.
494 511
495@vindex search-whitespace-regexp 512 Just as in ordinary incremental search, any @key{SPC} typed in
496 If you type @key{SPC} in incremental regexp search, it matches any 513incremental regexp search matches any sequence of one or more
497sequence of whitespace characters, including newlines. If you want to 514whitespace characters. The variable @code{search-whitespace-regexp}
498match just a space, type @kbd{C-q @key{SPC}}. You can control what a 515specifies the regexp for the lax space matching, and @kbd{M-s SPC}
499bare space matches by setting the variable 516(@code{isearch-toggle-lax-whitespace}) toggles the feature.
500@code{search-whitespace-regexp} to the desired regexp. 517@xref{Special Isearch}.
501 518
502 In some cases, adding characters to the regexp in an incremental 519 In some cases, adding characters to the regexp in an incremental
503regexp search can make the cursor move back and start again. For 520regexp search can make the cursor move back and start again. For
@@ -974,6 +991,13 @@ instead (@pxref{Mark}). The basic replace commands replace one
974is possible to perform several replacements in parallel, using the 991is possible to perform several replacements in parallel, using the
975command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). 992command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}).
976 993
994@vindex replace-lax-whitespace
995 Unlike incremental search, the replacement commands do not use lax
996space matching (@pxref{Special Isearch}) by default. To enable lax
997space matching for replacement, change the variable
998@code{replace-lax-whitespace} to @code{t}. (This only affects how
999Emacs finds the text to replace, not the replacement text.)
1000
977@menu 1001@menu
978* Unconditional Replace:: Replacing all matches for a string. 1002* Unconditional Replace:: Replacing all matches for a string.
979* Regexp Replace:: Replacing all matches for a regexp. 1003* Regexp Replace:: Replacing all matches for a regexp.
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 76f06edaacb..b5c847b4b72 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,45 @@
12012-09-30 Chong Yidong <cyd@gnu.org>
2
3 * commands.texi (Click Events): Define "mouse position list".
4 Remove mention of unimplemented horizontal scroll bars.
5 (Drag Events, Motion Events): Refer to "mouse position list".
6 (Accessing Mouse): Document posnp.
7
8 * errors.texi (Standard Errors): Tweak arith-error description.
9 Tweak markup. Remove domain-error and friends, which seem to be
10 unused after the floating-point code revamp.
11
12 * functions.texi (Obsolete Functions): Obsolescence also affects
13 documentation commands. Various clarifications.
14 (Declare Form): New node.
15
16 * strings.texi (String Basics): Copyedits.
17
18 * os.texi (Idle Timers): Minor clarifications.
19 (User Identification): Add system-users and system-groups.
20
21 * macros.texi (Defining Macros): Move description of `declare' to
22 Declare Form node.
23
24 * loading.texi (Autoload):
25 * help.texi (Documentation Basics): The special sequences can
26 trigger autoloading.
27
28 * numbers.texi (Integer Basics): Copyedits.
29 (Float Basics): Consider IEEE floating point always available.
30 (Random Numbers): Document actual limits.
31 (Arithmetic Operations): Clarify division by zero. Don't mention
32 the machine-independence of negative division since it does not
33 happen in practice.
34
352012-09-28 Chong Yidong <cyd@gnu.org>
36
37 * os.texi (Startup Summary): Document leim-list.el change.
38
392012-09-25 Chong Yidong <cyd@gnu.org>
40
41 * functions.texi (Defining Functions): defun is now a macro.
42
12012-09-28 Leo Liu <sdl.web@gmail.com> 432012-09-28 Leo Liu <sdl.web@gmail.com>
2 44
3 * files.texi (Files): Fix typo. 45 * files.texi (Files): Fix typo.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index dc0fa4c639d..93dba237013 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1275,12 +1275,21 @@ describe events by their types; thus, if there is a key binding for
1275@var{event-type} is @code{mouse-1}. 1275@var{event-type} is @code{mouse-1}.
1276 1276
1277@item @var{position} 1277@item @var{position}
1278This is the position where the mouse click occurred. The actual 1278@cindex mouse position list
1279format of @var{position} depends on what part of a window was clicked 1279This is a @dfn{mouse position list} specifying where the mouse click
1280on. 1280occurred; see below for details.
1281 1281
1282For mouse click events in the text area, mode line, header line, or in 1282@item @var{click-count}
1283the marginal areas, @var{position} has this form: 1283This is the number of rapid repeated presses so far of the same mouse
1284button. @xref{Repeat Events}.
1285@end table
1286
1287 To access the contents of a mouse position list in the
1288@var{position} slot of a click event, you should typically use the
1289functions documented in @ref{Accessing Mouse}. The explicit format of
1290the list depends on where the click occurred. For clicks in the text
1291area, mode line, header line, or in the fringe or marginal areas, the
1292mouse position list has the form
1284 1293
1285@example 1294@example
1286(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp} 1295(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
@@ -1289,18 +1298,16 @@ the marginal areas, @var{position} has this form:
1289@end example 1298@end example
1290 1299
1291@noindent 1300@noindent
1292The meanings of these list elements are documented below. 1301The meanings of these list elements are as follows:
1293@xref{Accessing Mouse}, for functions that let you easily access these
1294elements.
1295 1302
1296@table @asis 1303@table @asis
1297@item @var{window} 1304@item @var{window}
1298This is the window in which the click occurred. 1305The window in which the click occurred.
1299 1306
1300@item @var{pos-or-area} 1307@item @var{pos-or-area}
1301This is the buffer position of the character clicked on in the text 1308The buffer position of the character clicked on in the text area; or,
1302area, or if clicked outside the text area, it is the window area in 1309if the click was outside the text area, the window area where it
1303which the click occurred. It is one of the symbols @code{mode-line}, 1310occurred. It is one of the symbols @code{mode-line},
1304@code{header-line}, @code{vertical-line}, @code{left-margin}, 1311@code{header-line}, @code{vertical-line}, @code{left-margin},
1305@code{right-margin}, @code{left-fringe}, or @code{right-fringe}. 1312@code{right-margin}, @code{left-fringe}, or @code{right-fringe}.
1306 1313
@@ -1310,22 +1317,23 @@ happens after the imaginary prefix keys for the event are registered
1310by Emacs. @xref{Key Sequence Input}. 1317by Emacs. @xref{Key Sequence Input}.
1311 1318
1312@item @var{x}, @var{y} 1319@item @var{x}, @var{y}
1313These are the relative pixel coordinates of the click. For clicks in 1320The relative pixel coordinates of the click. For clicks in the text
1314the text area of a window, the coordinate origin @code{(0 . 0)} is 1321area of a window, the coordinate origin @code{(0 . 0)} is taken to be
1315taken to be the top left corner of the text area. @xref{Window 1322the top left corner of the text area. @xref{Window Sizes}. For
1316Sizes}. For clicks in a mode line or header line, the coordinate 1323clicks in a mode line or header line, the coordinate origin is the top
1317origin is the top left corner of the window itself. For fringes, 1324left corner of the window itself. For fringes, margins, and the
1318margins, and the vertical border, @var{x} does not have meaningful 1325vertical border, @var{x} does not have meaningful data. For fringes
1319data. For fringes and margins, @var{y} is relative to the bottom edge 1326and margins, @var{y} is relative to the bottom edge of the header
1320of the header line. In all cases, the @var{x} and @var{y} coordinates 1327line. In all cases, the @var{x} and @var{y} coordinates increase
1321increase rightward and downward respectively. 1328rightward and downward respectively.
1322 1329
1323@item @var{timestamp} 1330@item @var{timestamp}
1324This is the time at which the event occurred, in milliseconds. 1331The time at which the event occurred, as an integer number of
1332milliseconds since a system-dependent initial time.
1325 1333
1326@item @var{object} 1334@item @var{object}
1327This is either @code{nil} if there is no string-type text property at 1335Either @code{nil} if there is no string-type text property at the
1328the click position, or a cons cell of the form (@var{string} 1336click position, or a cons cell of the form (@var{string}
1329. @var{string-pos}) if there is one: 1337. @var{string-pos}) if there is one:
1330 1338
1331@table @asis 1339@table @asis
@@ -1371,8 +1379,7 @@ These are the pixel width and height of @var{object} or, if this is
1371@code{nil}, those of the character glyph clicked on. 1379@code{nil}, those of the character glyph clicked on.
1372@end table 1380@end table
1373 1381
1374@sp 1 1382For clicks on a scroll bar, @var{position} has this form:
1375For mouse clicks on a scroll-bar, @var{position} has this form:
1376 1383
1377@example 1384@example
1378(@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part}) 1385(@var{window} @var{area} (@var{portion} . @var{whole}) @var{timestamp} @var{part})
@@ -1380,32 +1387,35 @@ For mouse clicks on a scroll-bar, @var{position} has this form:
1380 1387
1381@table @asis 1388@table @asis
1382@item @var{window} 1389@item @var{window}
1383This is the window whose scroll-bar was clicked on. 1390The window whose scroll bar was clicked on.
1384 1391
1385@item @var{area} 1392@item @var{area}
1386This is the scroll bar where the click occurred. It is one of the 1393This is the symbol @code{vertical-scroll-bar}.
1387symbols @code{vertical-scroll-bar} or @code{horizontal-scroll-bar}.
1388 1394
1389@item @var{portion} 1395@item @var{portion}
1390This is the distance of the click from the top or left end of 1396The number of pixels from the top of the scroll bar to the click
1391the scroll bar. 1397position. On some toolkits, including GTK+, Emacs cannot extract this
1398data, so the value is always @code{0}.
1392 1399
1393@item @var{whole} 1400@item @var{whole}
1394This is the length of the entire scroll bar. 1401The total length, in pixels, of the scroll bar. On some toolkits,
1402including GTK+, Emacs cannot extract this data, so the value is always
1403@code{0}.
1395 1404
1396@item @var{timestamp} 1405@item @var{timestamp}
1397This is the time at which the event occurred, in milliseconds. 1406The time at which the event occurred, in milliseconds. On some
1407toolkits, including GTK+, Emacs cannot extract this data, so the value
1408is always @code{0}.
1398 1409
1399@item @var{part} 1410@item @var{part}
1400This is the part of the scroll-bar which was clicked on. It is one 1411The part of the scroll bar on which the click occurred. It is one of
1401of the symbols @code{above-handle}, @code{handle}, @code{below-handle}, 1412the symbols @code{handle} (the scroll bar handle), @code{above-handle}
1402@code{up}, @code{down}, @code{top}, @code{bottom}, and @code{end-scroll}. 1413(the area above the handle), @code{below-handle} (the area below the
1414handle), @code{up} (the up arrow at one end of the scroll bar), or
1415@code{down} (the down arrow at one end of the scroll bar).
1416@c The `top', `bottom', and `end-scroll' codes don't seem to be used.
1403@end table 1417@end table
1404 1418
1405@item @var{click-count}
1406This is the number of rapid repeated presses so far of the same mouse
1407button. @xref{Repeat Events}.
1408@end table
1409 1419
1410@node Drag Events 1420@node Drag Events
1411@subsection Drag Events 1421@subsection Drag Events
@@ -1429,10 +1439,9 @@ For a drag event, the name of the symbol @var{event-type} contains the
1429prefix @samp{drag-}. For example, dragging the mouse with button 2 1439prefix @samp{drag-}. For example, dragging the mouse with button 2
1430held down generates a @code{drag-mouse-2} event. The second and third 1440held down generates a @code{drag-mouse-2} event. The second and third
1431elements of the event give the starting and ending position of the 1441elements of the event give the starting and ending position of the
1432drag. They have the same form as @var{position} in a click event 1442drag, as mouse position lists (@pxref{Click Events}). You can access
1433(@pxref{Click Events}) that is not on the scroll bar part of the 1443the second element of any mouse event in the same way, with no need to
1434window. You can access the second element of any mouse event in the 1444distinguish drag events from others.
1435same way, with no need to distinguish drag events from others.
1436 1445
1437The @samp{drag-} prefix follows the modifier key prefixes such as 1446The @samp{drag-} prefix follows the modifier key prefixes such as
1438@samp{C-} and @samp{M-}. 1447@samp{C-} and @samp{M-}.
@@ -1575,13 +1584,14 @@ represented by lists that look like this:
1575(mouse-movement POSITION) 1584(mouse-movement POSITION)
1576@end example 1585@end example
1577 1586
1578The second element of the list describes the current position of the 1587@noindent
1579mouse, just as in a click event (@pxref{Click Events}). 1588@var{position} is a mouse position list (@pxref{Click Events}),
1589specifying the current position of the mouse cursor.
1580 1590
1581The special form @code{track-mouse} enables generation of motion events 1591The special form @code{track-mouse} enables generation of motion
1582within its body. Outside of @code{track-mouse} forms, Emacs does not 1592events within its body. Outside of @code{track-mouse} forms, Emacs
1583generate events for mere motion of the mouse, and these events do not 1593does not generate events for mere motion of the mouse, and these
1584appear. @xref{Mouse Tracking}. 1594events do not appear. @xref{Mouse Tracking}.
1585 1595
1586@node Focus Events 1596@node Focus Events
1587@subsection Focus Events 1597@subsection Focus Events
@@ -1648,13 +1658,11 @@ frame has already been made visible, Emacs has no work to do.
1648@cindex @code{wheel-up} event 1658@cindex @code{wheel-up} event
1649@cindex @code{wheel-down} event 1659@cindex @code{wheel-down} event
1650@item (wheel-up @var{position}) 1660@item (wheel-up @var{position})
1651@item (wheel-down @var{position}) 1661@itemx (wheel-down @var{position})
1652These kinds of event are generated by moving a mouse wheel. Their 1662These kinds of event are generated by moving a mouse wheel. The
1653usual meaning is a kind of scroll or zoom. 1663@var{position} element is a mouse position list (@pxref{Click
1654 1664Events}), specifying the position of the mouse cursor when the event
1655The element @var{position} is a list describing the position of the 1665occurred.
1656event, in the same format as used in a mouse-click event (@pxref{Click
1657Events}).
1658 1666
1659@vindex mouse-wheel-up-event 1667@vindex mouse-wheel-up-event
1660@vindex mouse-wheel-down-event 1668@vindex mouse-wheel-down-event
@@ -1922,14 +1930,8 @@ must be the last element of the list. For example,
1922 This section describes convenient functions for accessing the data in 1930 This section describes convenient functions for accessing the data in
1923a mouse button or motion event. 1931a mouse button or motion event.
1924 1932
1925 These two functions return the starting or ending position of a 1933 The following two functions return a mouse position list
1926mouse-button event, as a list of this form (@pxref{Click Events}): 1934(@pxref{Click Events}), specifying the position of a mouse event.
1927
1928@example
1929(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
1930 @var{object} @var{text-pos} (@var{col} . @var{row})
1931 @var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height}))
1932@end example
1933 1935
1934@defun event-start event 1936@defun event-start event
1935This returns the starting position of @var{event}. 1937This returns the starting position of @var{event}.
@@ -1948,9 +1950,15 @@ event, the value is actually the starting position, which is the only
1948position such events have. 1950position such events have.
1949@end defun 1951@end defun
1950 1952
1953@defun posnp object
1954This function returns non-@code{nil} if @var{object} is a mouse
1955oposition list, in either of the formats documented in @ref{Click
1956Events}); and @code{nil} otherwise.
1957@end defun
1958
1951@cindex mouse position list, accessing 1959@cindex mouse position list, accessing
1952 These functions take a position list as described above, and 1960 These functions take a mouse position list as argument, and return
1953return various parts of it. 1961various parts of it:
1954 1962
1955@defun posn-window position 1963@defun posn-window position
1956Return the window that @var{position} is in. 1964Return the window that @var{position} is in.
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index db770616820..d46cb071bf7 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -516,6 +516,7 @@ Functions
516* Obsolete Functions:: Declaring functions obsolete. 516* Obsolete Functions:: Declaring functions obsolete.
517* Inline Functions:: Defining functions that the compiler 517* Inline Functions:: Defining functions that the compiler
518 will expand inline. 518 will expand inline.
519* Declare Form:: Adding additional information about a function.
519* Declaring Functions:: Telling the compiler that a function is defined. 520* Declaring Functions:: Telling the compiler that a function is defined.
520* Function Safety:: Determining whether a function is safe to call. 521* Function Safety:: Determining whether a function is safe to call.
521* Related Topics:: Cross-references to specific Lisp primitives 522* Related Topics:: Cross-references to specific Lisp primitives
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index a822a2d9608..b7b26c8708c 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -37,78 +37,69 @@ handled.
37 37
38@table @code 38@table @code
39@item error 39@item error
40@code{"error"}@* 40The message is @samp{error}. @xref{Errors}.
41@xref{Errors}.
42 41
43@item quit 42@item quit
44@code{"Quit"}@* 43The message is @samp{Quit}. @xref{Quitting}.
45@xref{Quitting}.
46 44
47@item args-out-of-range 45@item args-out-of-range
48@code{"Args out of range"}@* 46The message is @samp{Args out of range}. This happens when trying to
49This happens when trying to access an element beyond the range of a 47access an element beyond the range of a sequence, buffer, or other
50sequence or buffer.@* 48container-like object. @xref{Sequences Arrays Vectors}, and
51@xref{Sequences Arrays Vectors}, @xref{Text}. 49@xref{Text}.
52 50
53@item arith-error 51@item arith-error
54@code{"Arithmetic error"}@* 52The message is @samp{Arithmetic error}. This occurs when trying to
53perform integer division by zero. @xref{Numeric Conversions}, and
55@xref{Arithmetic Operations}. 54@xref{Arithmetic Operations}.
56 55
57@item beginning-of-buffer 56@item beginning-of-buffer
58@code{"Beginning of buffer"}@* 57The message is @samp{Beginning of buffer}. @xref{Character Motion}.
59@xref{Character Motion}.
60 58
61@item buffer-read-only 59@item buffer-read-only
62@code{"Buffer is read-only"}@* 60The message is @samp{Buffer is read-only}. @xref{Read Only Buffers}.
63@xref{Read Only Buffers}.
64 61
65@item circular-list 62@item circular-list
66@code{"List contains a loop"}@* 63The message is @samp{List contains a loop}. This happens when a
67This happens when some operations (e.g. resolving face names) 64circular structure is encountered. @xref{Circular Objects}.
68encounter circular structures.@*
69@xref{Circular Objects}.
70 65
71@item cl-assertion-failed 66@item cl-assertion-failed
72@code{"Assertion failed"}@* 67The message is @samp{Assertion failed}. This happens when the
73This happens when the @code{assert} macro fails a test.@* 68@code{assert} macro fails a test. @xref{Assertions,,, cl, Common Lisp
74@xref{Assertions,,, cl, Common Lisp Extensions}. 69Extensions}.
75 70
76@item coding-system-error 71@item coding-system-error
77@code{"Invalid coding system"}@* 72The message is @samp{Invalid coding system}. @xref{Lisp and Coding
78@xref{Lisp and Coding Systems}. 73Systems}.
79 74
80@item cyclic-function-indirection 75@item cyclic-function-indirection
81@code{"Symbol's chain of function indirections contains a loop"}@* 76The message is @samp{Symbol's chain of function indirections contains
82@xref{Function Indirection}. 77a loop}. @xref{Function Indirection}.
83 78
84@item cyclic-variable-indirection 79@item cyclic-variable-indirection
85@code{"Symbol's chain of variable indirections contains a loop"}@* 80The message is @samp{Symbol's chain of variable indirections contains
86@xref{Variable Aliases}. 81a loop}. @xref{Variable Aliases}.
87 82
88@item dbus-error 83@item dbus-error
89@code{"D-Bus error"}@* 84The message is @samp{D-Bus error}. This is only defined if Emacs was
90This is only defined if Emacs was compiled with D-Bus support.@* 85compiled with D-Bus support. @xref{Errors and Events,,, dbus, D-Bus
91@xref{Errors and Events,,, dbus, D-Bus integration in Emacs}. 86integration in Emacs}.
92 87
93@item end-of-buffer 88@item end-of-buffer
94@code{"End of buffer"}@* 89The message is @samp{End of buffer}. @xref{Character Motion}.
95@xref{Character Motion}.
96 90
97@item end-of-file 91@item end-of-file
98@code{"End of file during parsing"}@* 92The message is @samp{End of file during parsing}. Note that this is
99Note that this is not a subcategory of @code{file-error}, 93not a subcategory of @code{file-error}, because it pertains to the
100because it pertains to the Lisp reader, not to file I/O.@* 94Lisp reader, not to file I/O. @xref{Input Functions}.
101@xref{Input Functions}.
102 95
103@item file-already-exists 96@item file-already-exists
104This is a subcategory of @code{file-error}.@* 97This is a subcategory of @code{file-error}. @xref{Writing to Files}.
105@xref{Writing to Files}.
106 98
107@item file-date-error 99@item file-date-error
108This is a subcategory of @code{file-error}. It occurs when 100This is a subcategory of @code{file-error}. It occurs when
109@code{copy-file} tries and fails to set the last-modification time of 101@code{copy-file} tries and fails to set the last-modification time of
110the output file.@* 102the output file. @xref{Changing Files}.
111@xref{Changing Files}.
112 103
113@item file-error 104@item file-error
114We do not list the error-strings of this error and its subcategories, 105We do not list the error-strings of this error and its subcategories,
@@ -116,122 +107,109 @@ because the error message is normally constructed from the data items
116alone when the error condition @code{file-error} is present. Thus, 107alone when the error condition @code{file-error} is present. Thus,
117the error-strings are not very relevant. However, these error symbols 108the error-strings are not very relevant. However, these error symbols
118do have @code{error-message} properties, and if no data is provided, 109do have @code{error-message} properties, and if no data is provided,
119the @code{error-message} property @emph{is} used.@* 110the @code{error-message} property @emph{is} used. @xref{Files}.
120@xref{Files}.
121 111
122@c jka-compr.el 112@c jka-compr.el
123@item compression-error 113@item compression-error
124This is a subcategory of @code{file-error}, which results from 114This is a subcategory of @code{file-error}, which results from
125problems handling a compressed file.@* 115problems handling a compressed file. @xref{How Programs Do Loading}.
126@xref{How Programs Do Loading}.
127 116
128@c userlock.el 117@c userlock.el
129@item file-locked 118@item file-locked
130This is a subcategory of @code{file-error}.@* 119This is a subcategory of @code{file-error}. @xref{File Locks}.
131@xref{File Locks}.
132 120
133@c userlock.el 121@c userlock.el
134@item file-supersession 122@item file-supersession
135This is a subcategory of @code{file-error}.@* 123This is a subcategory of @code{file-error}. @xref{Modification Time}.
136@xref{Modification Time}.
137 124
138@c net/ange-ftp.el 125@c net/ange-ftp.el
139@item ftp-error 126@item ftp-error
140This is a subcategory of @code{file-error}, which results from problems 127This is a subcategory of @code{file-error}, which results from
141in accessing a remote file using ftp.@* 128problems in accessing a remote file using ftp. @xref{Remote Files,,,
142@xref{Remote Files,,, emacs, The GNU Emacs Manual}. 129emacs, The GNU Emacs Manual}.
143 130
144@item invalid-function 131@item invalid-function
145@code{"Invalid function"}@* 132The message is @samp{Invalid function}. @xref{Function Indirection}.
146@xref{Function Indirection}.
147 133
148@item invalid-read-syntax 134@item invalid-read-syntax
149@code{"Invalid read syntax"}@* 135The message is @samp{Invalid read syntax}. @xref{Printed
150@xref{Printed Representation}. 136Representation}.
151 137
152@item invalid-regexp 138@item invalid-regexp
153@code{"Invalid regexp"}@* 139The message is @samp{Invalid regexp}. @xref{Regular Expressions}.
154@xref{Regular Expressions}.
155 140
156@c simple.el 141@c simple.el
157@item mark-inactive 142@item mark-inactive
158@code{"The mark is not active now"}@* 143The message is @samp{The mark is not active now}. @xref{The Mark}.
159@xref{The Mark}.
160 144
161@item no-catch 145@item no-catch
162@code{"No catch for tag"}@* 146The message is @samp{No catch for tag}. @xref{Catch and Throw}.
163@xref{Catch and Throw}.
164 147
165@ignore 148@ignore
166@c Not actually used for anything? Probably definition should be removed. 149@c Not actually used for anything? Probably definition should be removed.
167@item protected-field 150@item protected-field
168@code{"Attempt to modify a protected field"} 151The message is @samp{Attempt to modify a protected fiel.
169@end ignore 152@end ignore
170 153
171@item scan-error 154@item scan-error
172@code{"Scan error"}@* 155The message is @samp{Scan error}. This happens when certain
173This happens when certain syntax-parsing functions 156syntax-parsing functions find invalid syntax or mismatched
174find invalid syntax or mismatched parentheses.@* 157parentheses. @xref{List Motion}, and @xref{Parsing Expressions}.
175@xref{List Motion}, and @ref{Parsing Expressions}.
176 158
177@item search-failed 159@item search-failed
178@code{"Search failed"}@* 160The message is @samp{Search failed}. @xref{Searching and Matching}.
179@xref{Searching and Matching}.
180 161
181@item setting-constant 162@item setting-constant
182@code{"Attempt to set a constant symbol"}@* 163The message is @samp{Attempt to set a constant symbol}. This happens
183The values of the symbols @code{nil} and @code{t}, 164when attempting to assign values to @code{nil}, @code{t}, and keyword
184and any symbols that start with @samp{:}, 165symbols. @xref{Constant Variables}.
185may not be changed.@*
186@xref{Constant Variables, , Variables that Never Change}.
187 166
188@c simple.el 167@c simple.el
189@item text-read-only 168@item text-read-only
190@code{"Text is read-only"}@* 169The message is @samp{Text is read-only}. This is a subcategory of
191This is a subcategory of @code{buffer-read-only}.@* 170@code{buffer-read-only}. @xref{Special Properties}.
192@xref{Special Properties}.
193 171
194@item undefined-color 172@item undefined-color
195@code{"Undefined color"}@* 173The message is @samp{Undefined color}. @xref{Color Names}.
196@xref{Color Names}.
197 174
198@item void-function 175@item void-function
199@code{"Symbol's function definition is void"}@* 176The message is @samp{Symbol's function definition is void}.
200@xref{Function Cells}. 177@xref{Function Cells}.
201 178
202@item void-variable 179@item void-variable
203@code{"Symbol's value as variable is void"}@* 180The message is @samp{Symbol's value as variable is void}.
204@xref{Accessing Variables}. 181@xref{Accessing Variables}.
205 182
206@item wrong-number-of-arguments 183@item wrong-number-of-arguments
207@code{"Wrong number of arguments"}@* 184The message is @samp{Wrong number of arguments}. @xref{Classifying
208@xref{Classifying Lists}. 185Lists}.
209 186
210@item wrong-type-argument 187@item wrong-type-argument
211@code{"Wrong type argument"}@* 188The message is @samp{Wrong type argument}. @xref{Type Predicates}.
212@xref{Type Predicates}.
213@end table 189@end table
214 190
191@ignore The following seem to be unused now.
215 The following kinds of error, which are classified as special cases of 192 The following kinds of error, which are classified as special cases of
216@code{arith-error}, can occur on certain systems for invalid use of 193@code{arith-error}, can occur on certain systems for invalid use of
217mathematical functions. @xref{Math Functions}. 194mathematical functions. @xref{Math Functions}.
218 195
219@table @code 196@table @code
220@item domain-error 197@item domain-error
221@code{"Arithmetic domain error"} 198The message is @samp{Arithmetic domain error}.
222 199
223@item overflow-error 200@item overflow-error
224@code{"Arithmetic overflow error"}@* 201The message is @samp{Arithmetic overflow error}. This is a subcategory
225This is a subcategory of @code{domain-error}. 202of @code{domain-error}.
226 203
227@item range-error 204@item range-error
228@code{"Arithmetic range error"} 205The message is @code{Arithmetic range error}.
229 206
230@item singularity-error 207@item singularity-error
231@code{"Arithmetic singularity error"}@* 208The mssage is @samp{Arithmetic singularity error}. This is a
232This is a subcategory of @code{domain-error}. 209subcategory of @code{domain-error}.
233 210
234@item underflow-error 211@item underflow-error
235@code{"Arithmetic underflow error"}@* 212The message is @samp{Arithmetic underflow error}. This is a
236This is a subcategory of @code{domain-error}. 213subcategory of @code{domain-error}.
237@end table 214@end table
215@end ignore
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 356a891fbcd..af6f4b4c079 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1529,24 +1529,14 @@ track of such changes. @xref{Misc Events}.
1529@node Raising and Lowering 1529@node Raising and Lowering
1530@section Raising and Lowering Frames 1530@section Raising and Lowering Frames
1531 1531
1532 Most window systems use a desktop metaphor. Part of this metaphor is 1532@cindex raising a frame
1533the idea that windows are stacked in a notional third dimension
1534perpendicular to the screen surface, and thus ordered from ``highest''
1535to ``lowest''. Where two windows overlap, the one higher up covers
1536the one underneath. Even a window at the bottom of the stack can be
1537seen if no other window overlaps it.
1538
1539@c @cindex raising a frame redundant with raise-frame
1540@cindex lowering a frame 1533@cindex lowering a frame
1541 A window's place in this ordering is not fixed; in fact, users tend 1534 Most window systems use a desktop metaphor. Part of this metaphor
1542to change the order frequently. @dfn{Raising} a window means moving 1535is the idea that system-level windows (e.g.@: Emacs frames) are
1543it ``up'', to the top of the stack. @dfn{Lowering} a window means 1536stacked in a notional third dimension perpendicular to the screen
1544moving it to the bottom of the stack. This motion is in the notional 1537surface. Where two overlap, the one higher up covers the one
1545third dimension only, and does not change the position of the window 1538underneath. You can @dfn{raise} or @dfn{lower} a frame using the
1546on the screen. 1539functions @code{raise-frame} and @code{lower-frame}.
1547
1548 With Emacs, frames constitute the windows in the metaphor sketched
1549above. You can raise and lower frames using these functions:
1550 1540
1551@deffn Command raise-frame &optional frame 1541@deffn Command raise-frame &optional frame
1552This function raises frame @var{frame} (default, the selected frame). 1542This function raises frame @var{frame} (default, the selected frame).
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 9e1d3f9c6ae..cab6d12a3d8 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -23,6 +23,7 @@ define them.
23* Closures:: Functions that enclose a lexical environment. 23* Closures:: Functions that enclose a lexical environment.
24* Obsolete Functions:: Declaring functions obsolete. 24* Obsolete Functions:: Declaring functions obsolete.
25* Inline Functions:: Functions that the compiler will expand inline. 25* Inline Functions:: Functions that the compiler will expand inline.
26* Declare Form:: Adding additional information about a function.
26* Declaring Functions:: Telling the compiler that a function is defined. 27* Declaring Functions:: Telling the compiler that a function is defined.
27* Function Safety:: Determining whether a function is safe to call. 28* Function Safety:: Determining whether a function is safe to call.
28* Related Topics:: Cross-references to specific Lisp primitives 29* Related Topics:: Cross-references to specific Lisp primitives
@@ -521,7 +522,7 @@ Scheme.)
521is called @dfn{defining a function}, and it is done with the 522is called @dfn{defining a function}, and it is done with the
522@code{defun} special form. 523@code{defun} special form.
523 524
524@defspec defun name argument-list body-forms... 525@defmac defun name argument-list body-forms...
525@code{defun} is the usual way to define new Lisp functions. It 526@code{defun} is the usual way to define new Lisp functions. It
526defines the symbol @var{name} as a function that looks like this: 527defines the symbol @var{name} as a function that looks like this:
527 528
@@ -578,7 +579,7 @@ without any hesitation or notification. Emacs does not prevent you
578from doing this, because redefining a function is sometimes done 579from doing this, because redefining a function is sometimes done
579deliberately, and there is no way to distinguish deliberate 580deliberately, and there is no way to distinguish deliberate
580redefinition from unintentional redefinition. 581redefinition from unintentional redefinition.
581@end defspec 582@end defmac
582 583
583@cindex function aliases 584@cindex function aliases
584@defun defalias name definition &optional docstring 585@defun defalias name definition &optional docstring
@@ -1132,29 +1133,46 @@ examining or altering the structure of closure objects.
1132@node Obsolete Functions 1133@node Obsolete Functions
1133@section Declaring Functions Obsolete 1134@section Declaring Functions Obsolete
1134 1135
1135You can use @code{make-obsolete} to declare a function obsolete. This 1136 You can mark a named function as @dfn{obsolete}, meaning that it may
1136indicates that the function may be removed at some stage in the future. 1137be removed at some point in the future. This causes Emacs to warn
1138that the function is obsolete whenever it byte-compiles code
1139containing that function, and whenever it displays the documentation
1140for that function. In all other respects, an obsolete function
1141behaves like any other function.
1142
1143 The easiest way to mark a function as obsolete is to put a
1144@code{(declare (obsolete @dots{}))} form in the function's
1145@code{defun} definition. @xref{Declare Form}. Alternatively, you can
1146use the @code{make-obsolete} function, described below.
1147
1148 A macro (@pxref{Macros}) can also be marked obsolete with
1149@code{make-obsolete}; this has the same effects as for a function. An
1150alias for a function or macro can also be marked as obsolete; this
1151makes the alias itself obsolete, not the function or macro which it
1152resolves to.
1137 1153
1138@defun make-obsolete obsolete-name current-name &optional when 1154@defun make-obsolete obsolete-name current-name &optional when
1139This function makes the byte compiler warn that the function 1155This function marks @var{obsolete-name} as obsolete.
1140@var{obsolete-name} is obsolete. If @var{current-name} is a symbol, the 1156@var{obsolete-name} should be a symbol naming a function or macro, or
1141warning message says to use @var{current-name} instead of 1157an alias for a function or macro.
1142@var{obsolete-name}. @var{current-name} does not need to be an alias for 1158
1143@var{obsolete-name}; it can be a different function with similar 1159If @var{current-name} is a symbol, the warning message says to use
1144functionality. If @var{current-name} is a string, it is the warning 1160@var{current-name} instead of @var{obsolete-name}. @var{current-name}
1145message. 1161does not need to be an alias for @var{obsolete-name}; it can be a
1162different function with similar functionality. @var{current-name} can
1163also be a string, which serves as the warning message. The message
1164should begin in lower case, and end with a period. It can also be
1165@code{nil}, in which case the warning message provides no additional
1166details.
1146 1167
1147If provided, @var{when} should be a string indicating when the function 1168If provided, @var{when} should be a string indicating when the function
1148was first made obsolete---for example, a date or a release number. 1169was first made obsolete---for example, a date or a release number.
1149@end defun 1170@end defun
1150 1171
1151You can define a function as an alias and declare it obsolete at the
1152same time using the macro @code{define-obsolete-function-alias}:
1153
1154@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring 1172@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring
1155This macro marks the function @var{obsolete-name} obsolete and also 1173This convenience macro marks the function @var{obsolete-name} obsolete
1156defines it as an alias for the function @var{current-name}. It is 1174and also defines it as an alias for the function @var{current-name}.
1157equivalent to the following: 1175It is equivalent to the following:
1158 1176
1159@example 1177@example
1160(defalias @var{obsolete-name} @var{current-name} @var{docstring}) 1178(defalias @var{obsolete-name} @var{current-name} @var{docstring})
@@ -1236,6 +1254,63 @@ body uses the arguments, as you do for macros.
1236 After an inline function is defined, its inline expansion can be 1254 After an inline function is defined, its inline expansion can be
1237performed later on in the same file, just like macros. 1255performed later on in the same file, just like macros.
1238 1256
1257@node Declare Form
1258@section The @code{declare} Form
1259@findex declare
1260
1261 @code{declare} is a special macro which can be used to add ``meta''
1262properties to a function or macro: for example, marking it as
1263obsolete, or giving its forms a special @key{TAB} indentation
1264convention in Emacs Lisp mode.
1265
1266@anchor{Definition of declare}
1267@defmac declare @var{specs}@dots{}
1268This macro ignores its arguments and evaluates to @code{nil}; it has
1269no run-time effect. However, when a @code{declare} form occurs as the
1270@emph{very first form} in the body of a @code{defun} function
1271definition or a @code{defmacro} macro definition (@pxref{Defining
1272Macros}, for a description of @code{defmacro}), it appends the
1273properties specified by @var{specs} to the function or macro. This
1274work is specially performed by the @code{defun} and @code{defmacro}
1275macros.
1276
1277Note that if you put a @code{declare} form in an interactive function,
1278it should go before the @code{interactive} form.
1279
1280Each element in @var{specs} should have the form @code{(@var{property}
1281@var{args}@dots{})}, which should not be quoted. These have the
1282following effects:
1283
1284@table @code
1285@item (advertised-calling-convention @var{signature} @var{when})
1286This acts like a call to @code{set-advertised-calling-convention}
1287(@pxref{Obsolete Functions}); @var{signature} specifies the correct
1288argument list for calling the function or macro, and @var{when} should
1289be a string indicating when the variable was first made obsolete.
1290
1291@item (debug @var{edebug-form-spec})
1292This is valid for macros only. When stepping through the macro with
1293Edebug, use @var{edebug-form-spec}. @xref{Instrumenting Macro Calls}.
1294
1295@item (doc-string @var{n})
1296Use element number @var{n}, if any, as the documentation string.
1297
1298@item (indent @var{indent-spec})
1299Indent calls to this function or macro according to @var{indent-spec}.
1300This is typically used for macros, though it works for functions too.
1301@xref{Indenting Macros}.
1302
1303@item (obsolete @var{current-name} @var{when})
1304Mark the function or macro as obsolete, similar to a call to
1305@code{make-obsolete} (@pxref{Obsolete Functions}). @var{current-name}
1306should be a symbol (in which case the warning message says to use that
1307instead), a string (specifying the warning message), or @code{nil} (in
1308which case the warning message gives no extra details). @var{when}
1309should be a string indicating when the function or macro was first
1310made obsolete.
1311@end table
1312@end defmac
1313
1239@node Declaring Functions 1314@node Declaring Functions
1240@section Telling the Compiler that a Function is Defined 1315@section Telling the Compiler that a Function is Defined
1241@cindex function declaration 1316@cindex function declaration
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 5dd8f3c11f5..1375a057a5a 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -58,11 +58,17 @@ use @kbd{C-h f} (@code{describe-function}) or @kbd{C-h v}
58are many other conventions for documentation strings; see 58are many other conventions for documentation strings; see
59@ref{Documentation Tips}. 59@ref{Documentation Tips}.
60 60
61 Documentation strings can contain several special substrings, which 61 Documentation strings can contain several special text sequences,
62stand for key bindings to be looked up in the current keymaps when the 62referring to key bindings which are looked up in the current keymaps
63documentation is displayed. This allows documentation strings to refer 63when the user views the documentation. This allows the help commands
64to the keys for related commands and be accurate even when a user 64to display the correct keys even if a user rearranges the default key
65rearranges the key bindings. (@xref{Keys in Documentation}.) 65bindings. @xref{Keys in Documentation}.
66
67 In the documentation string of an autoloaded command
68(@pxref{Autoload}), these special text sequences have an additional
69special effect: they cause @kbd{C-h f} (@code{describe-function}) on
70the command to trigger autoloading. (This is needed for correctly
71setting up the hyperlinks in the @file{*Help*} buffer).
66 72
67@vindex emacs-lisp-docstring-fill-column 73@vindex emacs-lisp-docstring-fill-column
68 Emacs Lisp mode fills documentation strings to the width 74 Emacs Lisp mode fills documentation strings to the width
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 3c9bee96639..aa243185359 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -384,11 +384,13 @@ non-@acronym{ASCII} characters written as @code{?v@var{literal}}.
384@section Autoload 384@section Autoload
385@cindex autoload 385@cindex autoload
386 386
387 The @dfn{autoload} facility allows you to register the existence of 387 The @dfn{autoload} facility lets you register the existence of a
388a function or macro, but put off loading the file that defines it. 388function or macro, but put off loading the file that defines it. The
389The first call to the function automatically reads the proper file, in 389first call to the function automatically loads the proper library, in
390order to install the real definition and other associated code, then 390order to install the real definition and other associated code, then
391runs the real definition as if it had been loaded all along. 391runs the real definition as if it had been loaded all along.
392Autoloading can also be triggered by looking up the documentation of
393the function or macro (@pxref{Documentation Basics}).
392 394
393 There are two ways to set up an autoloaded function: by calling 395 There are two ways to set up an autoloaded function: by calling
394@code{autoload}, and by writing a special ``magic'' comment in the 396@code{autoload}, and by writing a special ``magic'' comment in the
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index efe298bf647..0a5152a43a1 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -235,43 +235,8 @@ of constants and nonconstant parts. To make this easier, use the
235@end example 235@end example
236 236
237 The body of a macro definition can include a @code{declare} form, 237 The body of a macro definition can include a @code{declare} form,
238which can specify how @key{TAB} should indent macro calls, and how to 238which specifies additional properties about the macro. @xref{Declare
239step through them for Edebug. 239Form}.
240
241@defmac declare @var{specs}@dots{}
242@anchor{Definition of declare}
243A @code{declare} form is used in a macro definition to specify various
244additional information about it. The following specifications are
245currently supported:
246
247@table @code
248@item (debug @var{edebug-form-spec})
249Specify how to step through macro calls for Edebug.
250@xref{Instrumenting Macro Calls}.
251
252@item (indent @var{indent-spec})
253Specify how to indent calls to this macro. @xref{Indenting Macros},
254for more details.
255
256@item (doc-string @var{number})
257Specify which element of the macro is the documentation string, if
258any.
259@end table
260
261A @code{declare} form only has its special effect in the body of a
262@code{defmacro} form if it immediately follows the documentation
263string, if present, or the argument list otherwise. (Strictly
264speaking, @emph{several} @code{declare} forms can follow the
265documentation string or argument list, but since a @code{declare} form
266can have several @var{specs}, they can always be combined into a
267single form.) When used at other places in a @code{defmacro} form, or
268outside a @code{defmacro} form, @code{declare} just returns @code{nil}
269without evaluating any @var{specs}.
270@end defmac
271
272 No macro absolutely needs a @code{declare} form, because that form
273has no effect on how the macro expands, on what the macro means in the
274program. It only affects the secondary features listed above.
275 240
276@node Problems with Macros 241@node Problems with Macros
277@section Common Problems Using Macros 242@section Common Problems Using Macros
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 7c9672a38c0..a086f2b3af1 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -48,9 +48,8 @@ to
48@tex 48@tex
49@math{2^{29}-1}), 49@math{2^{29}-1}),
50@end tex 50@end tex
51but some machines provide a wider range. Many examples in this 51but many machines provide a wider range. Many examples in this
52chapter assume that an integer has 30 bits and that floating point 52chapter assume the minimum integer width of 30 bits.
53numbers are IEEE double precision.
54@cindex overflow 53@cindex overflow
55 54
56 The Lisp reader reads an integer as a sequence of digits with optional 55 The Lisp reader reads an integer as a sequence of digits with optional
@@ -160,8 +159,9 @@ The value of this variable is the smallest integer that Emacs Lisp can
160handle. It is negative. 159handle. It is negative.
161@end defvar 160@end defvar
162 161
163 @xref{Character Codes, max-char}, for the maximum value of a valid 162 In Emacs Lisp, text characters are represented by integers. Any
164character codepoint. 163integer between zero and the value of @code{max-char}, inclusive, is
164considered to be valid as a character. @xref{String Basics}.
165 165
166@node Float Basics 166@node Float Basics
167@section Floating Point Basics 167@section Floating Point Basics
@@ -171,8 +171,8 @@ character codepoint.
171not integral. The precise range of floating point numbers is 171not integral. The precise range of floating point numbers is
172machine-specific; it is the same as the range of the C data type 172machine-specific; it is the same as the range of the C data type
173@code{double} on the machine you are using. Emacs uses the 173@code{double} on the machine you are using. Emacs uses the
174@acronym{IEEE} floating point standard where possible (the standard is 174@acronym{IEEE} floating point standard, which is supported by all
175supported by most modern computers). 175modern computers.
176 176
177 The read syntax for floating point numbers requires either a decimal 177 The read syntax for floating point numbers requires either a decimal
178point (with at least one digit following), an exponent, or both. For 178point (with at least one digit following), an exponent, or both. For
@@ -316,17 +316,16 @@ compare them, then you test whether two values are the same
316@emph{object}. By contrast, @code{=} compares only the numeric values 316@emph{object}. By contrast, @code{=} compares only the numeric values
317of the objects. 317of the objects.
318 318
319 At present, each integer value has a unique Lisp object in Emacs Lisp. 319 In Emacs Lisp, each integer value is a unique Lisp object.
320Therefore, @code{eq} is equivalent to @code{=} where integers are 320Therefore, @code{eq} is equivalent to @code{=} where integers are
321concerned. It is sometimes convenient to use @code{eq} for comparing an 321concerned. It is sometimes convenient to use @code{eq} for comparing
322unknown value with an integer, because @code{eq} does not report an 322an unknown value with an integer, because @code{eq} does not report an
323error if the unknown value is not a number---it accepts arguments of any 323error if the unknown value is not a number---it accepts arguments of
324type. By contrast, @code{=} signals an error if the arguments are not 324any type. By contrast, @code{=} signals an error if the arguments are
325numbers or markers. However, it is a good idea to use @code{=} if you 325not numbers or markers. However, it is better programming practice to
326can, even for comparing integers, just in case we change the 326use @code{=} if you can, even for comparing integers.
327representation of integers in a future Emacs version. 327
328 328 Sometimes it is useful to compare numbers with @code{equal}, which
329 Sometimes it is useful to compare numbers with @code{equal}; it
330treats two numbers as equal if they have the same data type (both 329treats two numbers as equal if they have the same data type (both
331integers, or both floating point) and the same value. By contrast, 330integers, or both floating point) and the same value. By contrast,
332@code{=} can treat an integer and a floating point number as equal. 331@code{=} can treat an integer and a floating point number as equal.
@@ -439,15 +438,16 @@ If @var{number} is already a floating point number, @code{float} returns
439it unchanged. 438it unchanged.
440@end defun 439@end defun
441 440
442There are four functions to convert floating point numbers to integers; 441 There are four functions to convert floating point numbers to
443they differ in how they round. All accept an argument @var{number} 442integers; they differ in how they round. All accept an argument
444and an optional argument @var{divisor}. Both arguments may be 443@var{number} and an optional argument @var{divisor}. Both arguments
445integers or floating point numbers. @var{divisor} may also be 444may be integers or floating point numbers. @var{divisor} may also be
446@code{nil}. If @var{divisor} is @code{nil} or omitted, these 445@code{nil}. If @var{divisor} is @code{nil} or omitted, these
447functions convert @var{number} to an integer, or return it unchanged 446functions convert @var{number} to an integer, or return it unchanged
448if it already is an integer. If @var{divisor} is non-@code{nil}, they 447if it already is an integer. If @var{divisor} is non-@code{nil}, they
449divide @var{number} by @var{divisor} and convert the result to an 448divide @var{number} by @var{divisor} and convert the result to an
450integer. An @code{arith-error} results if @var{divisor} is 0. 449integer. integer. If @var{divisor} is zero (whether integer or
450floating-point), Emacs signals an @code{arith-error} error.
451 451
452@defun truncate number &optional divisor 452@defun truncate number &optional divisor
453This returns @var{number}, converted to an integer by rounding towards 453This returns @var{number}, converted to an integer by rounding towards
@@ -524,14 +524,12 @@ depending on your machine.
524@section Arithmetic Operations 524@section Arithmetic Operations
525@cindex arithmetic operations 525@cindex arithmetic operations
526 526
527 Emacs Lisp provides the traditional four arithmetic operations: 527 Emacs Lisp provides the traditional four arithmetic operations
528addition, subtraction, multiplication, and division. Remainder and modulus 528(addition, subtraction, multiplication, and division), as well as
529functions supplement the division functions. The functions to 529remainder and modulus functions, and functions to add or subtract 1.
530add or subtract 1 are provided because they are traditional in Lisp and 530Except for @code{%}, each of these functions accepts both integer and
531commonly used. 531floating point arguments, and returns a floating point number if any
532 532argument is a floating point number.
533 All of these functions except @code{%} return a floating point value
534if any argument is floating.
535 533
536 It is important to note that in Emacs Lisp, arithmetic functions 534 It is important to note that in Emacs Lisp, arithmetic functions
537do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to 535do not check for overflow. Thus @code{(1+ 536870911)} may evaluate to
@@ -620,40 +618,49 @@ quotient. If there are additional arguments @var{divisors}, then it
620divides @var{dividend} by each divisor in turn. Each argument may be a 618divides @var{dividend} by each divisor in turn. Each argument may be a
621number or a marker. 619number or a marker.
622 620
623If all the arguments are integers, then the result is an integer too. 621If all the arguments are integers, the result is an integer, obtained
624This means the result has to be rounded. On most machines, the result 622by rounding the quotient towards zero after each division.
625is rounded towards zero after each division, but some machines may round 623(Hypothetically, some machines may have different rounding behavior
626differently with negative arguments. This is because the Lisp function 624for negative arguments, because @code{/} is implemented using the C
627@code{/} is implemented using the C division operator, which also 625division operator, which permits machine-dependent rounding; but this
628permits machine-dependent rounding. As a practical matter, all known 626does not happen in practice.)
629machines round in the standard fashion.
630
631@cindex @code{arith-error} in division
632If you divide an integer by 0, an @code{arith-error} error is signaled.
633(@xref{Errors}.) Floating point division by zero returns either
634infinity or a NaN if your machine supports @acronym{IEEE} floating point;
635otherwise, it signals an @code{arith-error} error.
636 627
637@example 628@example
638@group 629@group
639(/ 6 2) 630(/ 6 2)
640 @result{} 3 631 @result{} 3
641@end group 632@end group
633@group
642(/ 5 2) 634(/ 5 2)
643 @result{} 2 635 @result{} 2
636@end group
637@group
644(/ 5.0 2) 638(/ 5.0 2)
645 @result{} 2.5 639 @result{} 2.5
640@end group
641@group
646(/ 5 2.0) 642(/ 5 2.0)
647 @result{} 2.5 643 @result{} 2.5
644@end group
645@group
648(/ 5.0 2.0) 646(/ 5.0 2.0)
649 @result{} 2.5 647 @result{} 2.5
648@end group
649@group
650(/ 25 3 2) 650(/ 25 3 2)
651 @result{} 4 651 @result{} 4
652@end group
652@group 653@group
653(/ -17 6) 654(/ -17 6)
654 @result{} -2 @r{(could in theory be @minus{}3 on some machines)} 655 @result{} -2
655@end group 656@end group
656@end example 657@end example
658
659@cindex @code{arith-error} in division
660If you divide an integer by the integer 0, Emacs signals an
661@code{arith-error} error (@pxref{Errors}). If you divide a floating
662point number by 0, or divide by the floating point number 0.0, the
663result is either positive or negative infinity (@pxref{Float Basics}).
657@end defun 664@end defun
658 665
659@defun % dividend divisor 666@defun % dividend divisor
@@ -661,10 +668,18 @@ otherwise, it signals an @code{arith-error} error.
661This function returns the integer remainder after division of @var{dividend} 668This function returns the integer remainder after division of @var{dividend}
662by @var{divisor}. The arguments must be integers or markers. 669by @var{divisor}. The arguments must be integers or markers.
663 670
664For negative arguments, the remainder is in principle machine-dependent 671For any two integers @var{dividend} and @var{divisor},
665since the quotient is; but in practice, all known machines behave alike. 672
673@example
674@group
675(+ (% @var{dividend} @var{divisor})
676 (* (/ @var{dividend} @var{divisor}) @var{divisor}))
677@end group
678@end example
666 679
667An @code{arith-error} results if @var{divisor} is 0. 680@noindent
681always equals @var{dividend}. If @var{divisor} is zero, Emacs signals
682an @code{arith-error} error.
668 683
669@example 684@example
670(% 9 4) 685(% 9 4)
@@ -676,18 +691,6 @@ An @code{arith-error} results if @var{divisor} is 0.
676(% -9 -4) 691(% -9 -4)
677 @result{} -1 692 @result{} -1
678@end example 693@end example
679
680For any two integers @var{dividend} and @var{divisor},
681
682@example
683@group
684(+ (% @var{dividend} @var{divisor})
685 (* (/ @var{dividend} @var{divisor}) @var{divisor}))
686@end group
687@end example
688
689@noindent
690always equals @var{dividend}.
691@end defun 694@end defun
692 695
693@defun mod dividend divisor 696@defun mod dividend divisor
@@ -697,10 +700,9 @@ in other words, the remainder after division of @var{dividend}
697by @var{divisor}, but with the same sign as @var{divisor}. 700by @var{divisor}, but with the same sign as @var{divisor}.
698The arguments must be numbers or markers. 701The arguments must be numbers or markers.
699 702
700Unlike @code{%}, @code{mod} returns a well-defined result for negative 703Unlike @code{%}, @code{mod} permits floating point arguments; it
701arguments. It also permits floating point arguments; it rounds the 704rounds the quotient downward (towards minus infinity) to an integer,
702quotient downward (towards minus infinity) to an integer, and uses that 705and uses that quotient to compute the remainder.
703quotient to compute the remainder.
704 706
705If @var{divisor} is zero, @code{mod} signals an @code{arith-error} 707If @var{divisor} is zero, @code{mod} signals an @code{arith-error}
706error if both arguments are integers, and returns a NaN otherwise. 708error if both arguments are integers, and returns a NaN otherwise.
@@ -1086,8 +1088,8 @@ numbers as arguments.
1086@defun sin arg 1088@defun sin arg
1087@defunx cos arg 1089@defunx cos arg
1088@defunx tan arg 1090@defunx tan arg
1089These are the ordinary trigonometric functions, with argument measured 1091These are the basic trigonometric functions, with argument @var{arg}
1090in radians. 1092measured in radians.
1091@end defun 1093@end defun
1092 1094
1093@defun asin arg 1095@defun asin arg
@@ -1154,20 +1156,6 @@ This function returns the logarithm of @var{arg}, with base
1154returns a NaN. 1156returns a NaN.
1155@end defun 1157@end defun
1156 1158
1157@ignore
1158@defun expm1 arg
1159This function returns @code{(1- (exp @var{arg}))}, but it is more
1160accurate than that when @var{arg} is negative and @code{(exp @var{arg})}
1161is close to 1.
1162@end defun
1163
1164@defun log1p arg
1165This function returns @code{(log (1+ @var{arg}))}, but it is more
1166accurate than that when @var{arg} is so small that adding 1 to it would
1167lose accuracy.
1168@end defun
1169@end ignore
1170
1171@defun log10 arg 1159@defun log10 arg
1172This function returns the logarithm of @var{arg}, with base 10: 1160This function returns the logarithm of @var{arg}, with base 10:
1173@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}. 1161@code{(log10 @var{x})} @equiv{} @code{(log @var{x} 10)}.
@@ -1201,20 +1189,20 @@ The mathematical constant @math{pi} (3.14159@dots{}).
1201@section Random Numbers 1189@section Random Numbers
1202@cindex random numbers 1190@cindex random numbers
1203 1191
1204A deterministic computer program cannot generate true random numbers. 1192 A deterministic computer program cannot generate true random
1205For most purposes, @dfn{pseudo-random numbers} suffice. A series of 1193numbers. For most purposes, @dfn{pseudo-random numbers} suffice. A
1206pseudo-random numbers is generated in a deterministic fashion. The 1194series of pseudo-random numbers is generated in a deterministic
1207numbers are not truly random, but they have certain properties that 1195fashion. The numbers are not truly random, but they have certain
1208mimic a random series. For example, all possible values occur equally 1196properties that mimic a random series. For example, all possible
1209often in a pseudo-random series. 1197values occur equally often in a pseudo-random series.
1210 1198
1211In Emacs, pseudo-random numbers are generated from a ``seed''. 1199 Pseudo-random numbers are generated from a ``seed''. Starting from
1212Starting from any given seed, the @code{random} function always 1200any given seed, the @code{random} function always generates the same
1213generates the same sequence of numbers. Emacs typically starts with a 1201sequence of numbers. By default, Emacs initializes the random seed at
1214different seed each time, so the sequence of values of @code{random} 1202startup, in such a way that the sequence of values of @code{random}
1215typically differs in each Emacs run. 1203(with overwhelming likelihood) differs in each Emacs run.
1216 1204
1217Sometimes you want the random number sequence to be repeatable. For 1205 Sometimes you want the random number sequence to be repeatable. For
1218example, when debugging a program whose behavior depends on the random 1206example, when debugging a program whose behavior depends on the random
1219number sequence, it is helpful to get the same behavior in each 1207number sequence, it is helpful to get the same behavior in each
1220program run. To make the sequence repeat, execute @code{(random "")}. 1208program run. To make the sequence repeat, execute @code{(random "")}.
@@ -1227,8 +1215,10 @@ This function returns a pseudo-random integer. Repeated calls return a
1227series of pseudo-random integers. 1215series of pseudo-random integers.
1228 1216
1229If @var{limit} is a positive integer, the value is chosen to be 1217If @var{limit} is a positive integer, the value is chosen to be
1230nonnegative and less than @var{limit}. Otherwise, the value 1218nonnegative and less than @var{limit}. Otherwise, the value might be
1231might be any integer representable in Lisp. 1219any integer representable in Lisp, i.e.@: an integer between
1220@code{most-negative-fixnum} and @code{most-positive-fixnum}
1221(@pxref{Integer Basics}).
1232 1222
1233If @var{limit} is @code{t}, it means to choose a new seed based on the 1223If @var{limit} is @code{t}, it means to choose a new seed based on the
1234current time of day and on Emacs's process @acronym{ID} number. 1224current time of day and on Emacs's process @acronym{ID} number.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 68e53c78972..54754f8e5e9 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -70,13 +70,11 @@ in their turn. The files @file{subdirs.el} are normally generated
70automatically when Emacs is installed. 70automatically when Emacs is installed.
71 71
72@item 72@item
73It registers input methods by loading any @file{leim-list.el} file 73If the library @file{leim-list.el} exists, Emacs loads it. This
74found in the @code{load-path}. 74optional library is intended for registering input methods; Emacs
75 75looks for it in @code{load-path} (@pxref{Library Search}), skipping
76@c It removes PWD from the environment if it is not accurate. 76those directories containing the standard Emacs libraries (since
77@c It abbreviates default-directory. 77@file{leim-list.el} should not exist in those directories).
78
79@c Now normal-top-level calls command-line.
80 78
81@vindex before-init-time 79@vindex before-init-time
82@item 80@item
@@ -1159,6 +1157,20 @@ This function returns the effective @acronym{UID} of the user.
1159The value may be a floating point number. 1157The value may be a floating point number.
1160@end defun 1158@end defun
1161 1159
1160@defun system-users
1161This function returns a list of strings, listing the user names on the
1162system. If Emacs cannot retrieve this information, the return value
1163is a list containing just the value of @code{user-real-login-name}.
1164@end defun
1165
1166@cindex user groups
1167@defun system-groups
1168This function returns a list of strings, listing the names of user
1169groups on the system. If Emacs cannot retrieve this information, the
1170return value is @code{nil}.
1171@end defun
1172
1173
1162@node Time of Day 1174@node Time of Day
1163@section Time of Day 1175@section Time of Day
1164 1176
@@ -1812,6 +1824,29 @@ minutes, and even if there have been garbage collections and autosaves.
1812input. Then it becomes idle again, and all the idle timers that are 1824input. Then it becomes idle again, and all the idle timers that are
1813set up to repeat will subsequently run another time, one by one. 1825set up to repeat will subsequently run another time, one by one.
1814 1826
1827 Do not write an idle timer function containing a loop which does a
1828certain amount of processing each time around, and exits when
1829@code{(input-pending-p)} is non-@code{nil}. This approach seems very
1830natural but has two problems:
1831
1832@itemize
1833@item
1834It blocks out all process output (since Emacs accepts process output
1835only while waiting).
1836
1837@item
1838It blocks out any idle timers that ought to run during that time.
1839@end itemize
1840
1841@noindent
1842Similarly, do not write an idle timer function that sets up another
1843idle timer (including the same idle timer) with @var{secs} argument
1844less than or equal to the current idleness time. Such a timer will
1845run almost immediately, and continue running again and again, instead
1846of waiting for the next time Emacs becomes idle. The correct approach
1847is to reschedule with an appropriate increment of the current value of
1848the idleness time, as described below.
1849
1815@defun current-idle-time 1850@defun current-idle-time
1816If Emacs is idle, this function returns the length of time Emacs has 1851If Emacs is idle, this function returns the length of time Emacs has
1817been idle, as a list of four integers: @code{(@var{sec-high} 1852been idle, as a list of four integers: @code{(@var{sec-high}
@@ -1820,60 +1855,34 @@ been idle, as a list of four integers: @code{(@var{sec-high}
1820 1855
1821When Emacs is not idle, @code{current-idle-time} returns @code{nil}. 1856When Emacs is not idle, @code{current-idle-time} returns @code{nil}.
1822This is a convenient way to test whether Emacs is idle. 1857This is a convenient way to test whether Emacs is idle.
1858@end defun
1823 1859
1824The main use of this function is when an idle timer function wants to 1860 The main use of @code{current-idle-time} is when an idle timer
1825``take a break'' for a while. It can set up another idle timer to 1861function wants to ``take a break'' for a while. It can set up another
1826call the same function again, after a few seconds more idleness. 1862idle timer to call the same function again, after a few seconds more
1827Here's an example: 1863idleness. Here's an example:
1828 1864
1829@smallexample 1865@example
1830(defvar resume-timer nil 1866(defvar my-resume-timer nil
1831 "Timer that `timer-function' used to reschedule itself, or nil.") 1867 "Timer for `my-timer-function' to reschedule itself, or nil.")
1832 1868
1833(defun timer-function () 1869(defun my-timer-function ()
1834 ;; @r{If the user types a command while @code{resume-timer}} 1870 ;; @r{If the user types a command while @code{my-resume-timer}}
1835 ;; @r{is active, the next time this function is called from} 1871 ;; @r{is active, the next time this function is called from}
1836 ;; @r{its main idle timer, deactivate @code{resume-timer}.} 1872 ;; @r{its main idle timer, deactivate @code{my-resume-timer}.}
1837 (when resume-timer 1873 (when my-resume-timer
1838 (cancel-timer resume-timer)) 1874 (cancel-timer my-resume-timer))
1839 ...@var{do the work for a while}... 1875 ...@var{do the work for a while}...
1840 (when @var{taking-a-break} 1876 (when @var{taking-a-break}
1841 (setq resume-timer 1877 (setq my-resume-timer
1842 (run-with-idle-timer 1878 (run-with-idle-timer
1843 ;; Compute an idle time @var{break-length} 1879 ;; Compute an idle time @var{break-length}
1844 ;; more than the current value. 1880 ;; more than the current value.
1845 (time-add (current-idle-time) 1881 (time-add (current-idle-time)
1846 (seconds-to-time @var{break-length})) 1882 (seconds-to-time @var{break-length}))
1847 nil 1883 nil
1848 'timer-function)))) 1884 'my-timer-function))))
1849@end smallexample 1885@end example
1850@end defun
1851
1852 Do not write an idle timer function containing a loop which does a
1853certain amount of processing each time around, and exits when
1854@code{(input-pending-p)} is non-@code{nil}. This approach seems very
1855natural but has two problems:
1856
1857@itemize
1858@item
1859It blocks out all process output (since Emacs accepts process output
1860only while waiting).
1861
1862@item
1863It blocks out any idle timers that ought to run during that time.
1864@end itemize
1865
1866@noindent
1867For similar reasons, do not write an idle timer function that sets
1868up another idle time (including the same idle timer) with the
1869@var{secs} argument less or equal to the current idleness time. Such
1870a timer will run almost immediately, and continue running again and
1871again, instead of waiting for the next time Emacs becomes idle.
1872
1873@noindent
1874The correct approach is for the idle timer to reschedule itself after
1875a brief pause, using the method in the @code{timer-function} example
1876above.
1877 1886
1878@node Terminal Input 1887@node Terminal Input
1879@section Terminal Input 1888@section Terminal Input
@@ -1907,7 +1916,6 @@ If @var{flow} is non-@code{nil}, then Emacs uses @sc{xon/xoff}
1907(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This 1916(@kbd{C-q}, @kbd{C-s}) flow control for output to the terminal. This
1908has no effect except in @sc{cbreak} mode. 1917has no effect except in @sc{cbreak} mode.
1909 1918
1910@c Emacs 19 feature
1911The argument @var{meta} controls support for input character codes 1919The argument @var{meta} controls support for input character codes
1912above 127. If @var{meta} is @code{t}, Emacs converts characters with 1920above 127. If @var{meta} is @code{t}, Emacs converts characters with
1913the 8th bit set into Meta characters. If @var{meta} is @code{nil}, 1921the 8th bit set into Meta characters. If @var{meta} is @code{nil},
@@ -1916,7 +1924,6 @@ it as a parity bit. If @var{meta} is neither @code{t} nor @code{nil},
1916Emacs uses all 8 bits of input unchanged. This is good for terminals 1924Emacs uses all 8 bits of input unchanged. This is good for terminals
1917that use 8-bit character sets. 1925that use 8-bit character sets.
1918 1926
1919@c Emacs 19 feature
1920If @var{quit-char} is non-@code{nil}, it specifies the character to 1927If @var{quit-char} is non-@code{nil}, it specifies the character to
1921use for quitting. Normally this character is @kbd{C-g}. 1928use for quitting. Normally this character is @kbd{C-g}.
1922@xref{Quitting}. 1929@xref{Quitting}.
@@ -1925,7 +1932,6 @@ use for quitting. Normally this character is @kbd{C-g}.
1925The @code{current-input-mode} function returns the input mode settings 1932The @code{current-input-mode} function returns the input mode settings
1926Emacs is currently using. 1933Emacs is currently using.
1927 1934
1928@c Emacs 19 feature
1929@defun current-input-mode 1935@defun current-input-mode
1930This function returns the current mode for reading keyboard input. It 1936This function returns the current mode for reading keyboard input. It
1931returns a list, corresponding to the arguments of @code{set-input-mode}, 1937returns a list, corresponding to the arguments of @code{set-input-mode},
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index b7097e057c0..865435c91b3 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -35,28 +35,31 @@ keyboard character events.
35@node String Basics 35@node String Basics
36@section String and Character Basics 36@section String and Character Basics
37 37
38 Characters are represented in Emacs Lisp as integers; 38 A character is a Lisp object which represents a single character of
39whether an integer is a character or not is determined only by how it is 39text. In Emacs Lisp, characters are simply integers; whether an
40used. Thus, strings really contain integers. @xref{Character Codes}, 40integer is a character or not is determined only by how it is used.
41for details about character representation in Emacs. 41@xref{Character Codes}, for details about character representation in
42 42Emacs.
43 The length of a string (like any array) is fixed, and cannot be 43
44altered once the string exists. Strings in Lisp are @emph{not} 44 A string is a fixed sequence of characters. It is a type of
45terminated by a distinguished character code. (By contrast, strings in 45sequence called a @dfn{array}, meaning that its length is fixed and
46C are terminated by a character with @acronym{ASCII} code 0.) 46cannot be altered once it is created (@pxref{Sequences Arrays
47Vectors}). Unlike in C, Emacs Lisp strings are @emph{not} terminated
48by a distinguished character code.
47 49
48 Since strings are arrays, and therefore sequences as well, you can 50 Since strings are arrays, and therefore sequences as well, you can
49operate on them with the general array and sequence functions. 51operate on them with the general array and sequence functions
50(@xref{Sequences Arrays Vectors}.) For example, you can access or 52documented in @ref{Sequences Arrays Vectors}. For example, you can
51change individual characters in a string using the functions @code{aref} 53access or change individual characters in a string using the functions
52and @code{aset} (@pxref{Array Functions}). However, note that 54@code{aref} and @code{aset} (@pxref{Array Functions}). However, note
53@code{length} should @emph{not} be used for computing the width of a 55that @code{length} should @emph{not} be used for computing the width
54string on display; use @code{string-width} (@pxref{Width}) instead. 56of a string on display; use @code{string-width} (@pxref{Width})
55 57instead.
56 There are two text representations for non-@acronym{ASCII} characters in 58
57Emacs strings (and in buffers): unibyte and multibyte (@pxref{Text 59 There are two text representations for non-@acronym{ASCII}
58Representations}). For most Lisp programming, you don't need to be 60characters in Emacs strings (and in buffers): unibyte and multibyte.
59concerned with these two representations. 61For most Lisp programming, you don't need to be concerned with these
62two representations. @xref{Text Representations}, for details.
60 63
61 Sometimes key sequences are represented as unibyte strings. When a 64 Sometimes key sequences are represented as unibyte strings. When a
62unibyte string is a key sequence, string elements in the range 128 to 65unibyte string is a key sequence, string elements in the range 128 to
@@ -88,7 +91,7 @@ for information about the syntax of characters and strings.
88representations and to encode and decode character codes. 91representations and to encode and decode character codes.
89 92
90@node Predicates for Strings 93@node Predicates for Strings
91@section The Predicates for Strings 94@section Predicates for Strings
92 95
93For more information about general sequence and array predicates, 96For more information about general sequence and array predicates,
94see @ref{Sequences Arrays Vectors}, and @ref{Arrays}. 97see @ref{Sequences Arrays Vectors}, and @ref{Arrays}.
diff --git a/etc/NEWS b/etc/NEWS
index 616db77fe02..0aff5e40251 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -76,6 +76,7 @@ You can explicitly require a specific version by passing
76 76
77* Startup Changes in Emacs 24.3 77* Startup Changes in Emacs 24.3
78 78
79+++
79** Emacs no longer searches for `leim-list.el' files beneath the standard 80** Emacs no longer searches for `leim-list.el' files beneath the standard
80lisp/ directory. There should not be any there anyway. If you have 81lisp/ directory. There should not be any there anyway. If you have
81been adding them there, put them somewhere else, eg site-lisp. 82been adding them there, put them somewhere else, eg site-lisp.
@@ -89,10 +90,12 @@ been adding them there, put them somewhere else, eg site-lisp.
89** minibuffer-electric-default-mode can rewrite (default ...) to [...]. 90** minibuffer-electric-default-mode can rewrite (default ...) to [...].
90Just set minibuffer-eldef-shorten-default to t before enabling the mode. 91Just set minibuffer-eldef-shorten-default to t before enabling the mode.
91 92
93+++
92** Most y-or-n prompts now allow you to scroll the selected window. 94** Most y-or-n prompts now allow you to scroll the selected window.
93Typing C-v or M-v at a y-or-n prompt scrolls forward or backward 95Typing C-v or M-v at a y-or-n prompt scrolls forward or backward
94respectively, without exiting from the prompt. 96respectively, without exiting from the prompt.
95 97
98---
96** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the 99** In minibuffer filename prompts, `C-M-f' and `C-M-b' now move to the
97next and previous path separator, respectively. 100next and previous path separator, respectively.
98 101
@@ -107,12 +110,14 @@ invokes `set-buffer-file-coding-system'.
107 110
108** Help changes 111** Help changes
109 112
113+++
110*** `C-h f' (describe-function) can now perform autoloading. 114*** `C-h f' (describe-function) can now perform autoloading.
111When this command is called for an autoloaded function whose docstring 115When this command is called for an autoloaded function whose docstring
112contains a key substitution construct, that function's library is 116contains a key substitution construct, that function's library is
113automatically loaded, so that the documentation can be shown 117automatically loaded, so that the documentation can be shown
114correctly. To disable this, set `help-enable-auto-load' to nil. 118correctly. To disable this, set `help-enable-auto-load' to nil.
115 119
120---
116*** `C-h f' now reports previously-autoloaded functions as "autoloaded", 121*** `C-h f' now reports previously-autoloaded functions as "autoloaded",
117even after their associated libraries have been loaded (and the 122even after their associated libraries have been loaded (and the
118autoloads have been redefined as functions). 123autoloads have been redefined as functions).
@@ -136,11 +141,11 @@ treated as images.
136:background image spec property. 141:background image spec property.
137 142
138** Server and client changes 143** Server and client changes
139 144+++
140*** emacsclient now obeys string values for `initial-buffer-choice', 145*** emacsclient now obeys string values for `initial-buffer-choice',
141if it is told to open a new frame without specifying any file to visit 146if it is told to open a new frame without specifying any file to visit
142or expression to evaluate. 147or expression to evaluate.
143 148---
144*** New option `server-auth-key' specifies a shared server key. 149*** New option `server-auth-key' specifies a shared server key.
145 150
146** In the Package Menu, newly-available packages are listed as "new", 151** In the Package Menu, newly-available packages are listed as "new",
@@ -155,6 +160,7 @@ On encountering a fatal error, Emacs now outputs a textual description
155of the fatal signal, and a short backtrace on platforms like glibc 160of the fatal signal, and a short backtrace on platforms like glibc
156that support backtraces. 161that support backtraces.
157 162
163---
158** If your Emacs was built from a bzr checkout, the new variable 164** If your Emacs was built from a bzr checkout, the new variable
159`emacs-bzr-version' contains information about the bzr revision used. 165`emacs-bzr-version' contains information about the bzr revision used.
160 166
@@ -185,38 +191,25 @@ The PCL-CVS commands are still available via the keyboard.
185* Editing Changes in Emacs 24.3 191* Editing Changes in Emacs 24.3
186 192
187** Navigation command changes 193** Navigation command changes
188 194+++
189*** New binding `M-g c' for `goto-char'. 195*** New binding `M-g c' for `goto-char'.
190 196+++
191*** New binding `M-g TAB' for `move-to-column'. 197*** New binding `M-g TAB' for `move-to-column'.
192 198+++
193*** `M-g TAB' (`move-to-column') prompts for a column number if called 199*** `M-g TAB' (`move-to-column') prompts for a column number if called
194interactively with no prefix arg. Previously, it moved to column 1. 200interactively with no prefix arg. Previously, it moved to column 1.
195 201
196+++
197** `C-x 8 RET' is now bound to `insert-char', which is now a command.
198`ucs-insert' is now an obsolete alias for `insert-char'.
199
200---
201** The `z' key no longer has a binding in most special modes.
202It used to be bound to `kill-this-buffer', but `z' is too easy to
203accidentally type.
204
205** New option `delete-trailing-lines' specifies whether
206M-x delete-trailing-whitespace should delete trailing lines at the end
207of the buffer. It defaults to t.
208
209** Search and Replace changes 202** Search and Replace changes
210 203+++
211*** Non-regexp Isearch now performs "lax" space matching. 204*** Non-regexp Isearch now performs "lax" space matching.
212Each sequence of spaces in the supplied search string may match any 205Each sequence of spaces in the supplied search string may match any
213sequence of one or more whitespace characters, as specified by the 206sequence of one or more whitespace characters, as specified by the
214variable `search-whitespace-regexp'. (This variable is also used by a 207variable `search-whitespace-regexp'. (This variable is also used by a
215similar existing feature for regexp Isearch). 208similar existing feature for regexp Isearch).
216 209+++
217*** New Isearch command `M-s SPC' toggles lax space matching. 210*** New Isearch command `M-s SPC' toggles lax space matching.
218This applies to both ordinary and regexp Isearch. 211This applies to both ordinary and regexp Isearch.
219 212+++
220*** New option `replace-lax-whitespace'. 213*** New option `replace-lax-whitespace'.
221If non-nil, `query-replace' uses flexible whitespace matching too. 214If non-nil, `query-replace' uses flexible whitespace matching too.
222The default is nil. 215The default is nil.
@@ -225,6 +218,20 @@ The default is nil.
225and `M-s _' in Isearch toggles symbol search mode. 218and `M-s _' in Isearch toggles symbol search mode.
226`M-s c' in Isearch toggles search case-sensitivity. 219`M-s c' in Isearch toggles search case-sensitivity.
227 220
221+++
222** `C-x 8 RET' is now bound to `insert-char', which is now a command.
223`ucs-insert' is now an obsolete alias for `insert-char'.
224
225---
226** The `z' key no longer has a binding in most special modes.
227It used to be bound to `kill-this-buffer', but `z' is too easy to
228accidentally type.
229
230+++
231** New option `delete-trailing-lines' specifies whether
232M-x delete-trailing-whitespace should delete trailing lines at the end
233of the buffer. It defaults to t.
234
228** Register changes 235** Register changes
229+++ 236+++
230*** `C-x r +' is now overloaded to invoke `append-to-register. 237*** `C-x r +' is now overloaded to invoke `append-to-register.
@@ -233,8 +240,10 @@ and `M-s _' in Isearch toggles symbol search mode.
233the text to put between collected texts for use with M-x 240the text to put between collected texts for use with M-x
234append-to-register and M-x prepend-to-register. 241append-to-register and M-x prepend-to-register.
235 242
243+++
236** `C-u M-=' now counts lines/words/characters in the entire buffer. 244** `C-u M-=' now counts lines/words/characters in the entire buffer.
237 245
246+++
238** New command `C-x r M-w' (copy-rectangle-as-kill). 247** New command `C-x r M-w' (copy-rectangle-as-kill).
239It copies the region-rectangle as the last rectangle kill. 248It copies the region-rectangle as the last rectangle kill.
240 249
@@ -246,17 +255,17 @@ just removing them, as done by `yank-excluded-properties'.
246* Changes in Specialized Modes and Packages in Emacs 24.3 255* Changes in Specialized Modes and Packages in Emacs 24.3
247 256
248** Apropos 257** Apropos
249 258---
250*** The faces used by Apropos are now directly customizable. 259*** The faces used by Apropos are now directly customizable.
251These faces are named `apropos-symbol', `apropos-keybinding', and so on; 260These faces are named `apropos-symbol', `apropos-keybinding', and so on;
252see the `apropos' Custom group for details. 261see the `apropos' Custom group for details.
253 262---
254**** The old options whose values specified faces to use were removed 263*** The old options whose values specified faces to use were removed
255(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.). 264(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.).
256 265
257** Buffer Menu 266** Buffer Menu
258This package has been rewritten to use Tabulated List mode. 267This package has been rewritten to use Tabulated List mode.
259 268---
260*** Option `Buffer-menu-buffer+size-width' is now obsolete. 269*** Option `Buffer-menu-buffer+size-width' is now obsolete.
261Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead. 270Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
262 271
@@ -580,22 +589,22 @@ enabled.
580 589
581 590
582** Obsolete packages: 591** Obsolete packages:
583 592+++
584*** assoc.el 593*** assoc.el
585In most cases, assoc+member+push+delq work just as well. 594In most cases, assoc+member+push+delq work just as well.
586And in any case it's just a terrible package: ugly semantics, terrible 595And in any case it's just a terrible package: ugly semantics, terrible
587inefficiency, and not namespace-clean. 596inefficiency, and not namespace-clean.
588 597---
589*** bruce.el 598*** bruce.el
590 599---
591*** ledit.el 600*** ledit.el
592 601---
593*** mailpost.el 602*** mailpost.el
594 603+++
595*** mouse-sel.el 604*** mouse-sel.el
596 605---
597*** patcomp.el 606*** patcomp.el
598 607+++
599*** cust-print.el 608*** cust-print.el
600 609
601 610
@@ -603,11 +612,13 @@ inefficiency, and not namespace-clean.
603 612
604* Incompatible Lisp Changes in Emacs 24.3 613* Incompatible Lisp Changes in Emacs 24.3
605 614
615+++
606** (random) by default now returns a different random sequence in 616** (random) by default now returns a different random sequence in
607every Emacs run. Use (random S), where S is a string, to set the 617every Emacs run. Use (random S), where S is a string, to set the
608random seed to a value based on S, in order to get a repeatable 618random seed to a value based on S, in order to get a repeatable
609sequence in later calls. 619sequence in later calls.
610 620
621---
611** The function `x-select-font' can return a font spec, instead of a 622** The function `x-select-font' can return a font spec, instead of a
612font name as a string. Whether it returns a font spec or a font name 623font name as a string. Whether it returns a font spec or a font name
613depends on the graphical library. 624depends on the graphical library.
@@ -628,6 +639,7 @@ and are now undefined. For backwards compatibility, defun and
628defmacro currently return the name of the newly defined function/macro 639defmacro currently return the name of the newly defined function/macro
629but this should not be relied upon. 640but this should not be relied upon.
630 641
642---
631** `face-spec-set' no longer sets frame-specific attributes when the 643** `face-spec-set' no longer sets frame-specific attributes when the
632third argument is a frame (that usage was obsolete since Emacs 22.2). 644third argument is a frame (that usage was obsolete since Emacs 22.2).
633 645
@@ -772,23 +784,24 @@ in Emacs 24.1:
772**** `display-buffer-function' 784**** `display-buffer-function'
773 785
774** Time 786** Time
775 787---
776*** `current-time-string' no longer requires that its argument's year 788*** `current-time-string' no longer requires that its argument's year
777must be in the range 1000..9999. It now works with any year supported 789must be in the range 1000..9999. It now works with any year supported
778by the underlying C implementation. 790by the underlying C implementation.
779 791---
780*** `current-time' now returns extended-format time stamps 792*** `current-time' now returns extended-format time stamps
781(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds. 793(HIGH LOW USEC PSEC), where the new PSEC slot specifies picoseconds.
782PSEC is typically a multiple of 1000 on current machines. Other 794PSEC is typically a multiple of 1000 on current machines. Other
783functions that use this format, such as file-attributes and 795functions that use this format, such as file-attributes and
784format-time-string, have been changed accordingly. Old-format time 796format-time-string, have been changed accordingly. Old-format time
785stamps are still accepted. 797stamps are still accepted.
786 798---
787*** The format of timers in timer-list and timer-idle-list is now 799*** The format of timers in timer-list and timer-idle-list is now
788[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS]. 800[TRIGGERED-P HI-SECS LO-SECS USECS REPEAT-DELAY FUNCTION ARGS IDLE-DELAY PSECS].
789The PSECS slot is new, and uses picosecond resolution. It can be 801The PSECS slot is new, and uses picosecond resolution. It can be
790accessed via the new timer--psecs accessor. 802accessed via the new timer--psecs accessor.
791 803
804+++
792** Floating point functions now always return special values like NaN, 805** Floating point functions now always return special values like NaN,
793instead of signaling errors, if given invalid args, e.g. (log -1.0). 806instead of signaling errors, if given invalid args, e.g. (log -1.0).
794Previously, they returned NaNs on some platforms but signaled errors 807Previously, they returned NaNs on some platforms but signaled errors
@@ -806,18 +819,22 @@ result in a warning describing the cycle.
806 819
807*** `autoloadp' 820*** `autoloadp'
808*** `autoload-do-load'. 821*** `autoload-do-load'.
822+++
809*** `buffer-narrowed-p' tests if the buffer is narrowed. 823*** `buffer-narrowed-p' tests if the buffer is narrowed.
810*** `file-name-base' returns a file name sans directory and extension. 824*** `file-name-base' returns a file name sans directory and extension.
811*** `function-get' fetches a function property, following aliases. 825*** `function-get' fetches a function property, following aliases.
826+++
812*** `posnp' tests if an object is a `posn'. 827*** `posnp' tests if an object is a `posn'.
813*** `set-temporary-overlay-map' sets up a temporary overlay map. 828*** `set-temporary-overlay-map' sets up a temporary overlay map.
829+++
814*** `system-users' returns the user names on the system. 830*** `system-users' returns the user names on the system.
831+++
815*** `system-groups' returns the group names on the system. 832*** `system-groups' returns the group names on the system.
816*** `tty-top-frame' returns the topmost frame of a text terminal. 833*** `tty-top-frame' returns the topmost frame of a text terminal.
817 834
818** New macros `setq-local' and `defvar-local'. 835** New macros `setq-local' and `defvar-local'.
819 836
820** New fringe bitmap exclamation-mark. 837** New fringe bitmap `exclamation-mark'.
821 838
822** Face underlining can now use a wave. 839** Face underlining can now use a wave.
823See the "Face Attributes" section of the Elisp manual. 840See the "Face Attributes" section of the Elisp manual.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 3e1b93ae3ba..d7b8163ae9e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -34,6 +34,13 @@
34 34
352012-09-30 Chong Yidong <cyd@gnu.org> 352012-09-30 Chong Yidong <cyd@gnu.org>
36 36
37 * server.el (server-host): Document the security implications.
38 (server-auth-key): Doc fix.
39
40 * startup.el (initial-buffer-choice): Doc fix.
41
42 * minibuffer.el (minibuffer-local-filename-syntax): Doc fix.
43
37 * simple.el (delete-trailing-whitespace): Avoid an unnecessary 44 * simple.el (delete-trailing-whitespace): Avoid an unnecessary
38 restriction change. 45 restriction change.
39 46
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 27c53744d54..cf990019abc 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -2332,7 +2332,7 @@ and `read-file-name-function'."
2332 (modify-syntax-entry c "." table)) 2332 (modify-syntax-entry c "." table))
2333 '(?/ ?: ?\\)) 2333 '(?/ ?: ?\\))
2334 table) 2334 table)
2335 "Syntax table to be used in minibuffer for reading file name.") 2335 "Syntax table used when reading a file name in the minibuffer.")
2336 2336
2337;; minibuffer-completing-file-name is a variable used internally in minibuf.c 2337;; minibuffer-completing-file-name is a variable used internally in minibuf.c
2338;; to determine whether to use minibuffer-local-filename-completion-map or 2338;; to determine whether to use minibuffer-local-filename-completion-map or
diff --git a/lisp/server.el b/lisp/server.el
index 4fd55bcf6d1..73c253a87a6 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -101,7 +101,12 @@
101 101
102(defcustom server-host nil 102(defcustom server-host nil
103 "The name or IP address to use as host address of the server process. 103 "The name or IP address to use as host address of the server process.
104If set, the server accepts remote connections; otherwise it is local." 104If set, the server accepts remote connections; otherwise it is local.
105
106DO NOT give this a non-nil value unless you know what you are
107doing! On unsecured networks, accepting remote connections is
108very dangerous, because server-client communication (including
109session authentication) is not encrypted."
105 :group 'server 110 :group 'server
106 :type '(choice 111 :type '(choice
107 (string :tag "Name or IP address") 112 (string :tag "Name or IP address")
@@ -140,12 +145,12 @@ directory residing in a NTFS partition instead."
140 145
141(defcustom server-auth-key nil 146(defcustom server-auth-key nil
142 "Server authentication key. 147 "Server authentication key.
148This is only used if `server-use-tcp' is non-nil.
143 149
144Normally, the authentication key is randomly generated when the 150Normally, the authentication key is randomly generated when the
145server starts, which guarantees some level of security. It is 151server starts. It is recommended to leave it that way. Using a
146recommended to leave it that way. Using a long-lived shared key 152long-lived shared key will decrease security (especially since
147will decrease security (especially since the key is transmitted as 153the key is transmitted as plain-text).
148plain text).
149 154
150In some situations however, it can be difficult to share randomly 155In some situations however, it can be difficult to share randomly
151generated passwords with remote hosts (eg. no shared directory), 156generated passwords with remote hosts (eg. no shared directory),
@@ -153,11 +158,13 @@ so you can set the key with this variable and then copy the
153server file to the remote host (with possible changes to IP 158server file to the remote host (with possible changes to IP
154address and/or port if that applies). 159address and/or port if that applies).
155 160
156The key must consist of 64 ASCII printable characters except for 161Note that the usual security risks of using the server over
157space (this means characters from ! to ~; or from code 33 to 126). 162remote TCP, arising from the fact that client-server
163communications are unencrypted, still apply.
158 164
159You can use \\[server-generate-key] to get a random authentication 165The key must consist of 64 ASCII printable characters except for
160key." 166space (this means characters from ! to ~; or from code 33 to
167126). You can use \\[server-generate-key] to get a random key."
161 :group 'server 168 :group 'server
162 :type '(choice 169 :type '(choice
163 (const :tag "Random" nil) 170 (const :tag "Random" nil)
diff --git a/lisp/startup.el b/lisp/startup.el
index 243c9621752..6658e16683b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -43,7 +43,10 @@
43If the value is nil and `inhibit-startup-screen' is nil, show the 43If the value is nil and `inhibit-startup-screen' is nil, show the
44startup screen. If the value is a string, visit the specified file 44startup screen. If the value is a string, visit the specified file
45or directory using `find-file'. If t, open the `*scratch*' 45or directory using `find-file'. If t, open the `*scratch*'
46buffer." 46buffer.
47
48A string value also causes emacsclient to open the specified file
49or directory when no target file is specified."
47 :type '(choice 50 :type '(choice
48 (const :tag "Startup screen" nil) 51 (const :tag "Startup screen" nil)
49 (directory :tag "Directory" :value "~/") 52 (directory :tag "Directory" :value "~/")
diff --git a/src/ChangeLog b/src/ChangeLog
index 12992f1de0a..122dbd903fe 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12012-09-30 Chong Yidong <cyd@gnu.org>
2
3 * fns.c (Frandom): Doc fix.
4
12012-09-30 Martin Rudalics <rudalics@gmx.at> 52012-09-30 Martin Rudalics <rudalics@gmx.at>
2 6
3 * window.c (Vwindow_combination_limit): New default value. 7 * window.c (Vwindow_combination_limit): New default value.
diff --git a/src/fns.c b/src/fns.c
index b4bb9e83fa8..6d6f019b311 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -61,8 +61,9 @@ DEFUN ("identity", Fidentity, Sidentity, 1, 1, 0,
61 61
62DEFUN ("random", Frandom, Srandom, 0, 1, 0, 62DEFUN ("random", Frandom, Srandom, 0, 1, 0,
63 doc: /* Return a pseudo-random number. 63 doc: /* Return a pseudo-random number.
64All integers representable in Lisp are equally likely. 64All integers representable in Lisp, i.e. between `most-negative-fixnum'
65 On most systems, this is 29 bits' worth. 65and `most-positive-fixnum', inclusive, are equally likely.
66
66With positive integer LIMIT, return random number in interval [0,LIMIT). 67With positive integer LIMIT, return random number in interval [0,LIMIT).
67With argument t, set the random number seed from the current time and pid. 68With argument t, set the random number seed from the current time and pid.
68Other values of LIMIT are ignored. */) 69Other values of LIMIT are ignored. */)