aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorTom Tromey2013-07-26 14:02:53 -0600
committerTom Tromey2013-07-26 14:02:53 -0600
commitcc231cbe45d27a1906d268fb72d3b4105a2e9c65 (patch)
treec011828e2a3a18e77eaa8849e3cccb805d798f42 /doc/lispref
parentb34a529f177a6ea32da5cb1254f91bf9d71838db (diff)
parentfec9206062b420aca84f53d05a72c3ee43244022 (diff)
downloademacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.tar.gz
emacs-cc231cbe45d27a1906d268fb72d3b4105a2e9c65.zip
merge from trunk
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog37
-rw-r--r--doc/lispref/Makefile.in2
-rw-r--r--doc/lispref/elisp.texi3
-rw-r--r--doc/lispref/errors.texi5
-rw-r--r--doc/lispref/eval.texi11
-rw-r--r--doc/lispref/files.texi12
-rw-r--r--doc/lispref/os.texi155
-rw-r--r--doc/lispref/windows.texi11
8 files changed, 222 insertions, 14 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index f8b7406c427..32717946b04 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,38 @@
12013-07-24 Michael Albinus <michael.albinus@gmx.de>
2
3 * errors.texi (Standard Errors): Fix typo.
4
5 * files.texi (Magic File Names):
6 * os.texi (File Notifications): Remove file-notify-supported-p.
7
82013-07-24 Paul Eggert <eggert@cs.ucla.edu>
9
10 * eval.texi (Special Forms): Mention 'lambda'. Also, say that
11 non-well-formed expressions result in unspecified behavior, though
12 Emacs will not crash.
13
142013-07-22 Michael Albinus <michael.albinus@gmx.de>
15
16 * files.texi (Magic File Names): Add file-notify-add-watch,
17 file-notify-rm-watch and file-notify-supported-p. Move
18 file-remote-p down.
19
20 * errors.texi (Standard Errors): Add file-notify-error.
21
22 * os.texi (Desktop Notifications): Rename from Notifications.
23 (File Notifications): New node.
24
25 * elisp.texi (Top): Update menu for these changes.
26
272013-07-19 Xue Fuqiao <xfq.free@gmail.com>
28
29 * windows.texi (Display Action Functions): Mention next-window.
30
312013-07-16 Xue Fuqiao <xfq.free@gmail.com>
32
33 * windows.texi (Selecting Windows): Fix the introduction of
34 `set-frame-selected-window''s arguments.
35
12013-07-10 Paul Eggert <eggert@cs.ucla.edu> 362013-07-10 Paul Eggert <eggert@cs.ucla.edu>
2 37
3 Timestamp fixes for undo (Bug#14824). 38 Timestamp fixes for undo (Bug#14824).
@@ -1045,7 +1080,7 @@
1045 * display.texi (Face Attributes): Copyedits. Add a few cindex entries. 1080 * display.texi (Face Attributes): Copyedits. Add a few cindex entries.
1046 Overlining no longer behaves exactly like underlining. 1081 Overlining no longer behaves exactly like underlining.
1047 1082
10482012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com> 10832012-06-16 Aurélien Aptel <aurelien.aptel@gmail.com>
1049 1084
1050 * display.texi (Face Attributes): 1085 * display.texi (Face Attributes):
1051 Document wave-style underline face attribute. 1086 Document wave-style underline face attribute.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index c548b67d4ca..4c1d63ab5c8 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -1,4 +1,4 @@
1# Makefile for the GNU Emacs Lisp Reference Manual. 1### @configure_input@
2 2
3# Copyright (C) 1990-1996, 1998-2013 Free Software Foundation, Inc. 3# Copyright (C) 1990-1996, 1998-2013 Free Software Foundation, Inc.
4 4
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 0d9432d5e01..9c013140999 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1489,7 +1489,8 @@ Operating System Interface
1489* Batch Mode:: Running Emacs without terminal interaction. 1489* Batch Mode:: Running Emacs without terminal interaction.
1490* Session Management:: Saving and restoring state with 1490* Session Management:: Saving and restoring state with
1491 X Session Management. 1491 X Session Management.
1492* Notifications:: Desktop notifications. 1492* Desktop Notifications:: Desktop notifications.
1493* File Notifications:: File notifications.
1493* Dynamic Libraries:: On-demand loading of support libraries. 1494* Dynamic Libraries:: On-demand loading of support libraries.
1494 1495
1495Starting Up Emacs 1496Starting Up Emacs
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index 3f3984e40d2..87cfcfa532c 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -123,6 +123,11 @@ This is a subcategory of @code{file-error}. @xref{File Locks}.
123@item file-supersession 123@item file-supersession
124This is a subcategory of @code{file-error}. @xref{Modification Time}. 124This is a subcategory of @code{file-error}. @xref{Modification Time}.
125 125
126@c filenotify.el
127@item file-notify-error
128This is a subcategory of @code{file-error}. It happens, when a file
129could not be watched for changes. @xref{File Notifications}.
130
126@c net/ange-ftp.el 131@c net/ange-ftp.el
127@item ftp-error 132@item ftp-error
128This is a subcategory of @code{file-error}, which results from 133This is a subcategory of @code{file-error}, which results from
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 4b5ef187383..4b83d575fef 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -432,6 +432,14 @@ do.
432and which are used without evaluation. Whether a particular argument is 432and which are used without evaluation. Whether a particular argument is
433evaluated may depend on the results of evaluating other arguments. 433evaluated may depend on the results of evaluating other arguments.
434 434
435 If an expression's first symbol is that of a special form, the
436expression should follow the rules of that special form; otherwise,
437Emacs's behavior is not well-defined (though it will not crash). For
438example, @code{((lambda (x) x . 3) 4)} contains a subexpression that
439begins with @code{lambda} but is not a well-formed @code{lambda}
440expression, so Emacs may signal an error, or may return 3 or 4 or
441@code{nil}, or may behave in other ways.
442
435 Here is a list, in alphabetical order, of all of the special forms in 443 Here is a list, in alphabetical order, of all of the special forms in
436Emacs Lisp with a reference to where each is described. 444Emacs Lisp with a reference to where each is described.
437 445
@@ -463,6 +471,9 @@ Emacs Lisp with a reference to where each is described.
463@item interactive 471@item interactive
464@pxref{Interactive Call} 472@pxref{Interactive Call}
465 473
474@item lambda
475@pxref{Lambda Expressions}
476
466@item let 477@item let
467@itemx let* 478@itemx let*
468@pxref{Local Variables} 479@pxref{Local Variables}
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 951d55ac90f..77b097ae90a 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -2772,16 +2772,17 @@ first, before handlers for jobs such as remote file access.
2772@code{file-equal-p}, 2772@code{file-equal-p},
2773@code{file-executable-p}, @code{file-exists-p}, 2773@code{file-executable-p}, @code{file-exists-p},
2774@code{file-in-directory-p}, 2774@code{file-in-directory-p},
2775@code{file-local-copy}, @code{file-remote-p}, 2775@code{file-local-copy},
2776@code{file-modes}, @code{file-name-all-completions}, 2776@code{file-modes}, @code{file-name-all-completions},
2777@code{file-name-as-directory}, 2777@code{file-name-as-directory},
2778@code{file-name-completion}, 2778@code{file-name-completion},
2779@code{file-name-directory}, 2779@code{file-name-directory},
2780@code{file-name-nondirectory}, 2780@code{file-name-nondirectory},
2781@code{file-name-sans-versions}, @code{file-newer-than-file-p}, 2781@code{file-name-sans-versions}, @code{file-newer-than-file-p},
2782@code{file-notify-add-watch}, @code{file-notify-rm-watch},
2782@code{file-ownership-preserved-p}, 2783@code{file-ownership-preserved-p},
2783@code{file-readable-p}, @code{file-regular-p}, 2784@code{file-readable-p}, @code{file-regular-p},
2784@code{file-selinux-context}, 2785@code{file-remote-p}, @code{file-selinux-context},
2785@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p}, 2786@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p},
2786@code{find-backup-file-name}, 2787@code{find-backup-file-name},
2787@c Not sure why it was here: @code{find-file-noselect},@* 2788@c Not sure why it was here: @code{find-file-noselect},@*
@@ -2820,20 +2821,21 @@ first, before handlers for jobs such as remote file access.
2820@code{file-accessible-direc@discretionary{}{}{}tory-p}, 2821@code{file-accessible-direc@discretionary{}{}{}tory-p},
2821@code{file-acl}, 2822@code{file-acl},
2822@code{file-attributes}, 2823@code{file-attributes},
2823@code{file-direct@discretionary{}{}{}ory-p}, 2824@code{file-direc@discretionary{}{}{}tory-p},
2824@code{file-equal-p}, 2825@code{file-equal-p},
2825@code{file-executable-p}, @code{file-exists-p}, 2826@code{file-executable-p}, @code{file-exists-p},
2826@code{file-in-directory-p}, 2827@code{file-in-directory-p},
2827@code{file-local-copy}, @code{file-remote-p}, 2828@code{file-local-copy},
2828@code{file-modes}, @code{file-name-all-completions}, 2829@code{file-modes}, @code{file-name-all-completions},
2829@code{file-name-as-directory}, 2830@code{file-name-as-directory},
2830@code{file-name-completion}, 2831@code{file-name-completion},
2831@code{file-name-directory}, 2832@code{file-name-directory},
2832@code{file-name-nondirec@discretionary{}{}{}tory}, 2833@code{file-name-nondirec@discretionary{}{}{}tory},
2833@code{file-name-sans-versions}, @code{file-newer-than-file-p}, 2834@code{file-name-sans-versions}, @code{file-newer-than-file-p},
2835@code{file-notify-add-watch}, @code{file-notify-rm-watch},
2834@code{file-ownership-pre@discretionary{}{}{}served-p}, 2836@code{file-ownership-pre@discretionary{}{}{}served-p},
2835@code{file-readable-p}, @code{file-regular-p}, 2837@code{file-readable-p}, @code{file-regular-p},
2836@code{file-selinux-context}, 2838@code{file-remote-p}, @code{file-selinux-context},
2837@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p}, 2839@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p},
2838@code{find-backup-file-name}, 2840@code{find-backup-file-name},
2839@c Not sure why it was here: @code{find-file-noselect}, 2841@c Not sure why it was here: @code{find-file-noselect},
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index b481c330f9f..071fcf526da 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -34,7 +34,8 @@ terminal and the screen.
34* X11 Keysyms:: Operating on key symbols for X Windows. 34* X11 Keysyms:: Operating on key symbols for X Windows.
35* Batch Mode:: Running Emacs without terminal interaction. 35* Batch Mode:: Running Emacs without terminal interaction.
36* Session Management:: Saving and restoring state with X Session Management. 36* Session Management:: Saving and restoring state with X Session Management.
37* Notifications:: Desktop notifications. 37* Desktop Notifications:: Desktop notifications.
38* File Notifications:: File notifications.
38* Dynamic Libraries:: On-demand loading of support libraries. 39* Dynamic Libraries:: On-demand loading of support libraries.
39@end menu 40@end menu
40 41
@@ -2270,7 +2271,7 @@ Emacs is restarted by the session manager.
2270@end group 2271@end group
2271@end example 2272@end example
2272 2273
2273@node Notifications 2274@node Desktop Notifications
2274@section Desktop Notifications 2275@section Desktop Notifications
2275@cindex desktop notifications 2276@cindex desktop notifications
2276 2277
@@ -2510,6 +2511,156 @@ If @var{SPEC_VERSION} is @code{nil}, the server supports a
2510specification prior to @samp{"1.0"}. 2511specification prior to @samp{"1.0"}.
2511@end defun 2512@end defun
2512 2513
2514@node File Notifications
2515@section Notifications on File Changes
2516@cindex file notifications
2517
2518Several operating systems support watching of filesystems for changes
2519of files. If configured properly, Emacs links a respective library
2520like @file{gfilenotify}, @file{inotify}, or @file{w32notify}
2521statically. These libraries enable watching of filesystems on the
2522local machine.
2523
2524It is also possible to watch filesystems on remote machines,
2525@pxref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}
2526This does not depend on one of the libraries linked to Emacs.
2527
2528Since all these libraries emit different events on notified file
2529changes, there is the Emacs library @code{filenotify} which provides a
2530unique interface.
2531
2532@defun file-notify-add-watch file flags callback
2533Add a watch for filesystem events pertaining to @var{file}. This
2534arranges for filesystem events pertaining to @var{file} to be reported
2535to Emacs.
2536
2537The returned value is a descriptor for the added watch. Its type
2538depends on the underlying library, it cannot be assumed to be an
2539integer as in the example below. It should be used for comparison by
2540@code{equal} only.
2541
2542If the @var{file} cannot be watched for some reason, this function
2543signals a @code{file-notify-error} error.
2544
2545Sometimes, mounted filesystems cannot be watched for file changes.
2546This is not detected by this function, a non-@code{nil} return value
2547does not guarantee that changes on @var{file} will be notified.
2548
2549@var{flags} is a list of conditions to set what will be watched for.
2550It can include the following symbols:
2551
2552@table @code
2553@item change
2554watch for file changes
2555@item attribute-change
2556watch for file attribute changes, like permissions or modification
2557time
2558@end table
2559
2560If @var{file} is a directory, changes for all files in that directory
2561will be notified. This does not work recursively.
2562
2563When any event happens, Emacs will call the @var{callback} function
2564passing it a single argument @var{event}, which is of the form
2565
2566@lisp
2567(@var{descriptor} @var{action} @var{file} [@var{file1}])
2568@end lisp
2569
2570@var{descriptor} is the same object as the one returned by this
2571function. @var{action} is the description of the event. It could be
2572any one of the following symbols:
2573
2574@table @code
2575@item created
2576@var{file} was created
2577@item deleted
2578@var{file} was deleted
2579@item changed
2580@var{file} has changed
2581@item renamed
2582@var{file} has been renamed to @var{file1}
2583@item attribute-changed
2584a @var{file} attribute was changed
2585@end table
2586
2587@var{file} and @var{file1} are the name of the file(s) whose event is
2588being reported. For example:
2589
2590@example
2591@group
2592(require 'filenotify)
2593 @result{} filenotify
2594@end group
2595
2596@group
2597(defun my-notify-callback (event)
2598 (message "Event %S" event))
2599 @result{} my-notify-callback
2600@end group
2601
2602@group
2603(file-notify-add-watch
2604 "/tmp" '(change attribute-change) 'my-notify-callback)
2605 @result{} 35025468
2606@end group
2607
2608@group
2609(write-region "foo" nil "/tmp/foo")
2610 @result{} Event (35025468 created "/tmp/.#foo")
2611 Event (35025468 created "/tmp/foo")
2612 Event (35025468 changed "/tmp/foo")
2613 Event (35025468 deleted "/tmp/.#foo")
2614@end group
2615
2616@group
2617(write-region "bla" nil "/tmp/foo")
2618 @result{} Event (35025468 created "/tmp/.#foo")
2619 Event (35025468 changed "/tmp/foo") [2 times]
2620 Event (35025468 deleted "/tmp/.#foo")
2621@end group
2622
2623@group
2624(set-file-modes "/tmp/foo" (default-file-modes))
2625 @result{} Event (35025468 attribute-changed "/tmp/foo")
2626@end group
2627@end example
2628
2629Whether the action @code{renamed} is returned, depends on the used
2630watch library. It can be expected, when a directory is watched, and
2631both @var{file} and @var{file1} belong to this directory. Otherwise,
2632the actions @code{deleted} and @code{created} could be returned in a
2633random order.
2634
2635@example
2636@group
2637(rename-file "/tmp/foo" "/tmp/bla")
2638 @result{} Event (35025468 renamed "/tmp/foo" "/tmp/bla")
2639@end group
2640
2641@group
2642(file-notify-add-watch
2643 "/var/tmp" '(change attribute-change) 'my-notify-callback)
2644 @result{} 35025504
2645@end group
2646
2647@group
2648(rename-file "/tmp/bla" "/var/tmp/bla")
2649 @result{} ;; gfilenotify
2650 Event (35025468 renamed "/tmp/bla" "/var/tmp/bla")
2651
2652 @result{} ;; inotify
2653 Event (35025504 created "/var/tmp/bla")
2654 Event (35025468 deleted "/tmp/bla")
2655@end group
2656@end example
2657@end defun
2658
2659@defun file-notify-rm-watch descriptor
2660Removes an existing file watch specified by its @var{descriptor}.
2661@var{descriptor} should be an object returned by
2662@code{file-notify-add-watch}.
2663@end defun
2513 2664
2514@node Dynamic Libraries 2665@node Dynamic Libraries
2515@section Dynamically Loaded Libraries 2666@section Dynamically Loaded Libraries
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index f2a4b3849dd..1f65f687014 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -1355,10 +1355,9 @@ within that frame. @var{frame} should be a live frame; if omitted or
1355 1355
1356@defun set-frame-selected-window frame window &optional norecord 1356@defun set-frame-selected-window frame window &optional norecord
1357This function makes @var{window} the window selected within the frame 1357This function makes @var{window} the window selected within the frame
1358@var{frame}. @var{frame} should be a live frame; if omitted or 1358@var{frame}. @var{frame} should be a live frame; if @code{nil}, it
1359@code{nil}, it defaults to the selected frame. @var{window} should be 1359defaults to the selected frame. @var{window} should be a live window;
1360a live window; if omitted or @code{nil}, it defaults to the selected 1360if @code{nil}, it defaults to the selected window.
1361window.
1362 1361
1363If @var{frame} is the selected frame, this makes @var{window} the 1362If @var{frame} is the selected frame, this makes @var{window} the
1364selected window. 1363selected window.
@@ -1925,6 +1924,10 @@ frames to search for a reusable window:
1925A frame means consider windows on that frame only. 1924A frame means consider windows on that frame only.
1926@end itemize 1925@end itemize
1927 1926
1927Note that these meanings differ slightly from those of the
1928@var{all-frames} argument to @code{next-window} (@pxref{Cyclic Window
1929Ordering}).
1930
1928If @var{alist} contains no @code{reusable-frames} entry, this function 1931If @var{alist} contains no @code{reusable-frames} entry, this function
1929normally searches just the selected frame; however, if the variable 1932normally searches just the selected frame; however, if the variable
1930@code{pop-up-frames} is non-@code{nil}, it searches all frames on the 1933@code{pop-up-frames} is non-@code{nil}, it searches all frames on the