aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xautogen/configure24
-rw-r--r--doc/lispref/ChangeLog15
-rw-r--r--doc/lispref/elisp.texi2
-rw-r--r--doc/lispref/windows.texi226
-rw-r--r--etc/NEWS14
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/net/dbus.el22
-rw-r--r--lisp/progmodes/cfengine.el33
-rw-r--r--src/ChangeLog5
-rw-r--r--src/dbusbind.c8
10 files changed, 280 insertions, 80 deletions
diff --git a/autogen/configure b/autogen/configure
index 8483168848a..1f304212838 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -8057,14 +8057,9 @@ case $opsys in
8057 LIB_STANDARD=-lc 8057 LIB_STANDARD=-lc
8058 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o' 8058 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o'
8059 ;; 8059 ;;
8060 netbsd | openbsd ) 8060 netbsd | openbsd )
8061 if test -f $CRT_DIR/crti.o; then 8061 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8062 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o' 8062 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
8063 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8064 else
8065 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o'
8066 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crtbegin.o'
8067 fi
8068 ;; 8063 ;;
8069esac 8064esac
8070 8065
@@ -8163,6 +8158,19 @@ fi # crt_files != ""
8163 8158
8164 8159
8165 8160
8161case $opsys in
8162 netbsd | openbsd )
8163 if test -f $CRT_DIR/crti.o; then
8164
8165 test -f $CRT_DIR/crtn.o || \
8166 as_fn_error "Required file not found: crtn.o" "$LINENO" 5
8167
8168 LIB_STANDARD='-lgcc -lc -lgcc $(CRT_DIR)/crtend.o $(CRT_DIR)/crtn.o'
8169 START_FILES='pre-crt0.o $(CRT_DIR)/crt0.o $(CRT_DIR)/crti.o $(CRT_DIR)/crtbegin.o'
8170 fi
8171 ;;
8172esac
8173
8166 8174
8167 8175
8168 8176
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index c99d5658950..423e052068b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,18 @@
12011-09-25 Martin Rudalics <rudalics@gmx.at>
2
3 * windows.texi (Windows and Frames, Display Action Functions)
4 (Switching Buffers): Fix some typos.
5 (Buffers and Windows): Remove reference to window-auto-delete.
6 Reword description of replace-buffer-in-windows.
7 (Window History): Fix some typos and refer to frame local buffer
8 list.
9 (Quitting Windows): New node.
10 (Window Configurations): Add descriptions of window-state-get
11 and window-state-put.
12 (Window Parameters): Describe variable ignore-window-parameters.
13 Sketch some window parameters currently in use.
14 * elisp.texi (Top): Update node listing.
15
12011-09-25 Chong Yidong <cyd@stupidchicken.com> 162011-09-25 Chong Yidong <cyd@stupidchicken.com>
2 17
3 * windows.texi (Display Action Functions) 18 * windows.texi (Display Action Functions)
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 45eaeb85ad8..8350c9b7080 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -942,6 +942,8 @@ Windows
942* Window History:: Each window remembers the buffers displayed in it. 942* Window History:: Each window remembers the buffers displayed in it.
943* Dedicated Windows:: How to avoid displaying another buffer in 943* Dedicated Windows:: How to avoid displaying another buffer in
944 a specific window. 944 a specific window.
945* Quitting Windows:: How to restore the state prior to displaying a
946 buffer.
945* Window Point:: Each window has its own location of point. 947* Window Point:: Each window has its own location of point.
946* Window Start and End:: Buffer positions indicating which text is 948* Window Start and End:: Buffer positions indicating which text is
947 on-screen in a window. 949 on-screen in a window.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 6565a014415..96d489d1203 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -29,6 +29,8 @@ is displayed in windows.
29* Window History:: Each window remembers the buffers displayed in it. 29* Window History:: Each window remembers the buffers displayed in it.
30* Dedicated Windows:: How to avoid displaying another buffer in 30* Dedicated Windows:: How to avoid displaying another buffer in
31 a specific window. 31 a specific window.
32* Quitting Windows:: How to restore the state prior to displaying a
33 buffer.
32* Window Point:: Each window has its own location of point. 34* Window Point:: Each window has its own location of point.
33* Window Start and End:: Buffer positions indicating which text is 35* Window Start and End:: Buffer positions indicating which text is
34 on-screen in a window. 36 on-screen in a window.
@@ -294,7 +296,7 @@ optional argument @var{window} can be an arbitrary window and defaults
294to the selected one. The return value is @code{nil} if @var{window} is 296to the selected one. The return value is @code{nil} if @var{window} is
295a live window or its children form a vertical combination. In the 297a live window or its children form a vertical combination. In the
296example above @code{(window-left-child W4)} is @code{W6} while 298example above @code{(window-left-child W4)} is @code{W6} while
297@code{(window-top-child W3)} is @code{nil}. 299@code{(window-left-child W3)} is @code{nil}.
298@end defun 300@end defun
299 301
300@defun window-child window 302@defun window-child window
@@ -2078,15 +2080,15 @@ buffer using @code{switch-to-prev-buffer} (@pxref{Window History}).
2078buffer; it defaults to the current buffer. 2080buffer; it defaults to the current buffer.
2079 2081
2080If a window displaying @var{buffer-or-name} is dedicated 2082If a window displaying @var{buffer-or-name} is dedicated
2081(@pxref{Dedicated Windows}) has never displayed any other buffers and 2083(@pxref{Dedicated Windows}), has never displayed any other buffers and
2082is not the only window on its frame, that window is deleted. If that 2084is not the only window on its frame, that window is deleted. If that
2083window is the only window on its frame and there are other frames on 2085window is the only window on its frame and there are other frames on the
2084the frame's terminal, that frame is deleted too; otherwise, some other 2086frame's terminal, that frame is deleted too; otherwise, the buffer
2085buffer is displayed in that window, as explained above. A user can 2087provided by the function @code{switch-to-prev-buffer} (@pxref{Window
2086prevent the deletion of windows and/or frames by customizing the 2088History}) is displayed instead.
2087option @code{window-auto-delete}.
2088@end deffn 2089@end deffn
2089 2090
2091
2090@node Switching Buffers 2092@node Switching Buffers
2091@section Switching to a Buffer in a Window 2093@section Switching to a Buffer in a Window
2092@cindex switching to a buffer 2094@cindex switching to a buffer
@@ -2123,12 +2125,12 @@ list---both the global buffer list and the selected frame's buffer
2123list (@pxref{The Buffer List}). However, this is not done if the 2125list (@pxref{The Buffer List}). However, this is not done if the
2124optional argument @var{norecord} is non-@code{nil}. 2126optional argument @var{norecord} is non-@code{nil}.
2125 2127
2126If this function is unable to display in the seleted window---usually 2128If this function is unable to display the buffer in the selected
2127because the selected window is a minibuffer window or is strongly 2129window---usually because the selected window is a minibuffer window or
2128dedicated to its buffer (@pxref{Dedicated Windows})---then it normally 2130is strongly dedicated to its buffer (@pxref{Dedicated Windows})---then
2129tries to display in some other window, in the manner of 2131it normally tries to display the buffer in some other window, in the
2130@code{pop-to-buffer} (see below). However, if the optional argument 2132manner of @code{pop-to-buffer} (see below). However, if the optional
2131@var{force-same-window} is non-@code{nil}, it signals an error 2133argument @var{force-same-window} is non-@code{nil}, it signals an error
2132instead. 2134instead.
2133@end deffn 2135@end deffn
2134 2136
@@ -2356,7 +2358,7 @@ window. It uses @code{split-window-sensibly} as a subroutine
2356 2358
2357@defun display-buffer-use-some-window buffer alist 2359@defun display-buffer-use-some-window buffer alist
2358This function tries to display @var{buffer} by choosing an existing 2360This function tries to display @var{buffer} by choosing an existing
2359buffer and displaying the buffer in that window. It can fail if all 2361window and displaying the buffer in that window. It can fail if all
2360windows are dedicated to another buffer (@pxref{Dedicated Windows}). 2362windows are dedicated to another buffer (@pxref{Dedicated Windows}).
2361@end defun 2363@end defun
2362 2364
@@ -2629,16 +2631,16 @@ If all options described above fail to produce a suitable window,
2629resort, it will try to display @var{buffer-or-name} on a separate frame. 2631resort, it will try to display @var{buffer-or-name} on a separate frame.
2630In that case, the value of @code{pop-up-frames} is disregarded. 2632In that case, the value of @code{pop-up-frames} is disregarded.
2631 2633
2634
2632@node Window History 2635@node Window History
2633@section Window History 2636@section Window History
2634@cindex window history 2637@cindex window history
2635 2638
2636 Each window remembers the buffers it has displayed earlier and the 2639Each window remembers the buffers it has displayed earlier and the order
2637order in which these buffers have been removed from it. This history 2640in which these buffers have been removed from it. This history is used,
2638is used, for example, by @code{replace-buffer-in-windows} 2641for example, by @code{replace-buffer-in-windows} (@pxref{Buffers and
2639(@pxref{Buffers and Windows}). This list is set automatically 2642Windows}). This list is automatically maintained by Emacs, but you can
2640maintained by Emacs, but you can use the following functions to 2643use the following functions to explicitly inspect or alter it:
2641explicitly inspect or alter it:
2642 2644
2643@defun window-prev-buffers &optional window 2645@defun window-prev-buffers &optional window
2644This function returns a list specifying the previous contents of 2646This function returns a list specifying the previous contents of
@@ -2652,7 +2654,7 @@ buffer was last shown, and @var{window-pos} is the point position when
2652that buffer was last shown. 2654that buffer was last shown.
2653 2655
2654The list is ordered so that earlier elements correspond to more 2656The list is ordered so that earlier elements correspond to more
2655recently-shown buffers, and the first element corresponds to the 2657recently-shown buffers, and the first element usually corresponds to the
2656buffer most recently removed from the window. 2658buffer most recently removed from the window.
2657@end defun 2659@end defun
2658 2660
@@ -2671,8 +2673,9 @@ below). This list is mainly used by @code{switch-to-prev-buffer} and
2671 2673
2672@defun window-next-buffers &optional window 2674@defun window-next-buffers &optional window
2673This function returns the list of buffers recently re-shown in 2675This function returns the list of buffers recently re-shown in
2674@var{window} via @code{switch-to-prev-buffer}. @var{window} should be 2676@var{window} via @code{switch-to-prev-buffer}. The @var{window}
2675a live window or @code{nil} (meaning the selected window). 2677argument must denote a live window or @code{nil} (meaning the selected
2678window).
2676@end defun 2679@end defun
2677 2680
2678@defun set-window-next-buffers window next-buffers 2681@defun set-window-next-buffers window next-buffers
@@ -2707,8 +2710,8 @@ or killed or has been already shown by a recent invocation of
2707 2710
2708If repeated invocations of this command have already shown all buffers 2711If repeated invocations of this command have already shown all buffers
2709previously shown in @var{window}, further invocations will show buffers 2712previously shown in @var{window}, further invocations will show buffers
2710from the global buffer list starting with the buffer returned by 2713from the buffer list of the frame @var{window} appears on (@pxref{The
2711@code{last-buffer} (@pxref{The Buffer List}). 2714Buffer List}).
2712@end deffn 2715@end deffn
2713 2716
2714@deffn Command switch-to-next-buffer &optional window 2717@deffn Command switch-to-next-buffer &optional window
@@ -2717,12 +2720,12 @@ the effect of the last @code{switch-to-prev-buffer} command in
2717@var{window}. The argument @var{window} must be a live window and 2720@var{window}. The argument @var{window} must be a live window and
2718defaults to the selected one. 2721defaults to the selected one.
2719 2722
2720If there is no recent invocation of a @code{switch-to-prev-buffer} 2723If there is no recent invocation of a @code{switch-to-prev-buffer} that
2721that can be undone, this function tries to show the first buffer from 2724can be undone, this function tries to show a buffer from the buffer list
2722the global buffer list as returned by @code{other-buffer} (@pxref{The 2725of the frame @var{window} appears on (@pxref{The Buffer List}).
2723Buffer List}).
2724@end deffn 2726@end deffn
2725 2727
2728
2726@node Dedicated Windows 2729@node Dedicated Windows
2727@section Dedicated Windows 2730@section Dedicated Windows
2728@cindex dedicated window 2731@cindex dedicated window
@@ -2776,6 +2779,59 @@ display. Other functions do not treat @code{t} differently from any
2776non-@code{nil} value. 2779non-@code{nil} value.
2777@end defun 2780@end defun
2778 2781
2782
2783@node Quitting Windows
2784@section Quitting Windows
2785
2786When you want to get rid of a window used for displaying a buffer you
2787can use the function @code{delete-window} (@pxref{Deleting Windows}) to
2788remove that window from its frame. If the buffer has been shown on a
2789separate frame, you might want to call @code{delete-frame}
2790(@pxref{Deleting Frames}) instead. If, on the other hand, a window has
2791been reused for displaying the buffer, you might prefer showing the
2792buffer previously shown in that window by calling the function
2793@code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you
2794might want to either bury (@pxref{The Buffer List}) or kill
2795(@pxref{Killing Buffers}) the window's buffer.
2796
2797 The following function uses information on how the window for
2798displaying the buffer was obtained in the first place thus attempting to
2799automatize the above decisions for you.
2800
2801@deffn Command quit-window &optional kill window
2802This command quits @var{window} and buries its buffer. The argument
2803@var{window} must be a live window and defaults to the selected one.
2804With prefix argument @var{kill} non-@code{nil}, it kills the buffer
2805instead of burying it.
2806
2807Quitting @var{window} means to proceed as follows: If @var{window} was
2808created specially for displaying its current buffer, delete @var{window}
2809provided its frame contains at least one other live window. If
2810@var{window} is the only window on its frame and other frames still
2811exist, delete the frame together with @var{window}. If, however, there
2812are no other frames left, display some other buffer in @var{window}.
2813
2814If @var{window} was reused for displaying its buffer, this command tries
2815to display the buffer previously shown in it. It also tries to restore
2816the window start (@pxref{Window Start and End}) and point (@pxref{Window
2817Point}) positions of the previously shown buffer. If, in addition, the
2818current buffer was temporarily resized, this command will also try to
2819restore the original height of @var{window}.
2820
2821The three cases described so far require that the buffer shown in
2822@var{window} is still the buffer displayed by the last buffer display
2823function for this window. If another buffer has been shown in the
2824meantime or the buffer previously shown no longer exists, this command
2825calls @code{switch-to-prev-buffer} (@pxref{Window History}) to show some
2826other buffer instead.
2827@end deffn
2828
2829The function @code{quit-window} bases its decisions on information
2830stored in @var{window}'s @code{quit-restore} window parameter
2831(@pxref{Window Parameters}) and resets that parameter to @code{nil}
2832after it's done.
2833
2834
2779@node Window Point 2835@node Window Point
2780@section Windows and Point 2836@section Windows and Point
2781@cindex window position 2837@cindex window position
@@ -3522,14 +3578,13 @@ argument because it always uses the frame that @var{window} is on.
3522@cindex window configurations 3578@cindex window configurations
3523@cindex saving window information 3579@cindex saving window information
3524 3580
3525 A @dfn{window configuration} records the entire layout of one 3581A @dfn{window configuration} records the entire layout of one
3526frame---all windows, their sizes, which buffers they contain, how those 3582frame---all windows, their sizes, which buffers they contain, how those
3527buffers are scrolled, and their values of point and the mark; also their 3583buffers are scrolled, and their values of point and the mark; also their
3528fringes, margins, and scroll bar settings. It also includes the value 3584fringes, margins, and scroll bar settings. It also includes the value
3529of @code{minibuffer-scroll-window}. As a special exception, the window 3585of @code{minibuffer-scroll-window}. As a special exception, the window
3530configuration does not record the value of point in the selected window 3586configuration does not record the value of point in the selected window
3531for the current buffer. Also, the window configuration does not record 3587for the current buffer.
3532the values of window parameters; see @ref{Window Parameters}.
3533 3588
3534 You can bring back an entire frame layout by restoring a previously 3589 You can bring back an entire frame layout by restoring a previously
3535saved window configuration. If you want to record the layout of all 3590saved window configuration. If you want to record the layout of all
@@ -3639,24 +3694,62 @@ sense, but are not implemented because we did not need them. See the
3639file @file{winner.el} for some more operations on windows 3694file @file{winner.el} for some more operations on windows
3640configurations. 3695configurations.
3641 3696
3697 The objects returned by @code{current-window-configuration} die
3698together with the Emacs process. In order to store a window
3699configuration on disk and read it back in another Emacs session the
3700following two functions can be used.
3701
3702@defun window-state-get &optional window markers
3703This function returns the state of @var{window} as a Lisp object. The
3704argument @var{window} can be any window and defaults to the root window
3705of the selected frame.
3706
3707The optional argument @var{markers} non-@code{nil} means to use markers
3708for sampling positions like @code{window-point} or @code{window-start}.
3709This argument should be non-@code{nil} only if the value is used for
3710putting the state back in the same session since markers slow down
3711processing.
3712@end defun
3713
3714The value returned by @code{window-state-get} can be converted by using
3715one of the functions defined by Desktop Save Mode (@pxref{Desktop Save
3716Mode}) to an object that can be written to a file. Such objects can be
3717read back and converted to a Lisp object representing the state of the
3718window. That Lisp object can be used as argument for the following
3719function in order to restore the state window in another window.
3720
3721@defun window-state-put state &optional window ignore
3722This function puts the window state @var{state} into @var{window}. The
3723argument @var{state} should be the state of a window returned by an
3724earlier invocation of @code{window-state-get}, see above. The optional
3725argument @var{window} must specify a live window and defaults to the
3726selected one.
3727
3728The optional argument @var{ignore} non-@code{nil} means to ignore
3729minimum window sizes and fixed size restrictions. If @var{ignore}
3730equals @code{safe}, this means subwindows can get as small as one line
3731and/or two columns.
3732@end defun
3733
3734
3642@node Window Parameters 3735@node Window Parameters
3643@section Window Parameters 3736@section Window Parameters
3644@cindex window parameters 3737@cindex window parameters
3645 3738
3646This sections describes how window parameters can be used to associate 3739This section describes how window parameters can be used to associate
3647additional information with windows. 3740additional information with windows.
3648 3741
3649@defun window-parameter window parameter 3742@defun window-parameter window parameter
3650This function returns @var{window}'s value for @var{parameter}. The 3743This function returns @var{window}'s value for @var{parameter}. The
3651default for @var{window} is the selected window. If @var{window} 3744default for @var{window} is the selected window. If @var{window} has no
3652has no setting for @var{parameter}, this function returns @code{nil}. 3745setting for @var{parameter}, this function returns @code{nil}.
3653@end defun 3746@end defun
3654 3747
3655@defun window-parameters &optional window 3748@defun window-parameters &optional window
3656This function returns all parameters of @var{window} and their values. 3749This function returns all parameters of @var{window} and their values.
3657The default for @var{window} is the selected window. The return value 3750The default for @var{window} is the selected window. The return value,
3658is an association list of elements of the form @code{(@var{parameter} 3751if non-@code{nil} is an association list whose elements have the form
3659. @var{value})}. 3752@code{(@var{parameter} . @var{value})}.
3660@end defun 3753@end defun
3661 3754
3662@defun set-window-parameter window parameter value 3755@defun set-window-parameter window parameter value
@@ -3665,13 +3758,56 @@ This function sets @var{window}'s value of @var{parameter} to
3665is the selected window. 3758is the selected window.
3666@end defun 3759@end defun
3667 3760
3668Currently, window parameters are not saved in window configurations and 3761Some functions, notably @code{delete-window},
3669consequently not restored by @code{set-window-configuration}. Hence, 3762@code{delete-other-windows} and @code{split-window} may behave specially
3670any change of a parameter introduced via @code{set-window-parameter} can 3763when their @var{window} argument has a parameter set. You can override
3671be undone only by invoking @code{set-window-parameter} for the same 3764such special behavior by binding the following variable to a
3672parameter again. Since @code{save-window-excursion} relies on window 3765non-@code{nil} value:
3673configurations (@pxref{Window Configurations}), window parameters are 3766
3674not saved and restored by that special form, either. 3767@defvar ignore-window-parameters
3768If this variable is non-@code{nil}, some standard functions do not
3769process window parameters. The functions currently affected by this are
3770@code{split-window}, @code{delete-window}, @code{delete-other-windows}
3771and @code{other-window}.
3772
3773An application can bind this variable to a non-@code{nil} value around
3774calls to these functions. If it does so, the application is fully
3775responsible for correctly assigning the parameters of all involved
3776windows when exiting that function.
3777@end defvar
3778
3779The following parameters are currently used by the window management
3780code.
3781
3782@table @asis
3783@item @code{delete-window}
3784This parameter affects the execution of @code{delete-window}
3785(@pxref{Deleting Windows}).
3786
3787@item @code{delete-other-windows}
3788This parameter affects the execution of @code{delete-other-windows}
3789(@pxref{Deleting Windows}).
3790
3791@item @code{split-window}
3792This parameter affects the execution of @code{split-window}
3793(@pxref{Splitting Windows}).
3794
3795@item @code{other-window}
3796This parameter affects the execution of @code{other-window}
3797(@pxref{Cyclic Window Ordering}).
3798
3799@item @code{no-other-window}
3800This parameter marks the window as not selectable by @code{other-window}
3801(@pxref{Cyclic Window Ordering}).
3802@end table
3803
3804In addition, the parameters @code{window-atom} and @code{window-side}
3805are reserved and should not be used by applications. The
3806@code{quit-restore} parameter tells how to proceed with a window when
3807the buffer it shows is no more needed. This parameter is installed by
3808the buffer display functions (@pxref{Choosing Window}) and consulted by
3809the function @code{quit-window} (@pxref{Quitting Windows}).
3810
3675 3811
3676@node Window Hooks 3812@node Window Hooks
3677@section Hooks for Window Scrolling and Changes 3813@section Hooks for Window Scrolling and Changes
diff --git a/etc/NEWS b/etc/NEWS
index 3158295bbcb..a5e7de93d7d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -425,6 +425,11 @@ These maximize and minize the size of a window within its frame.
425These functions allow to navigate through the live buffers that have 425These functions allow to navigate through the live buffers that have
426been shown in a specific window. 426been shown in a specific window.
427 427
428+++
429*** New functions `window-state-get' and `window-state-put'.
430These functions allow to save and restore the state of an arbitrary
431frame or window as an Elisp object.
432
428** The inactive minibuffer has its own major mode `minibuffer-inactive-mode'. 433** The inactive minibuffer has its own major mode `minibuffer-inactive-mode'.
429This is handy for minibuffer-only frames, and is also used for the "mouse-1 434This is handy for minibuffer-only frames, and is also used for the "mouse-1
430pops up *Messages*" feature, which can now easily be changed. 435pops up *Messages*" feature, which can now easily be changed.
@@ -1030,11 +1035,11 @@ and `window-body-height' are provided.
1030*** Window parameters specific to window handling functions. 1035*** Window parameters specific to window handling functions.
1031For each window you can specify a parameter to override the default 1036For each window you can specify a parameter to override the default
1032behavior of a number of functions like `split-window', `delete-window' 1037behavior of a number of functions like `split-window', `delete-window'
1033and `delete-other-windows'. 1038and `delete-other-windows'. The variable `ignore-window-parameters'
1039allows to ignore processing such parameters.
1034 1040
1035+++ 1041+++
1036*** New semantics of third argument of `split-window'. 1042*** New semantics of third argument of `split-window'.
1037
1038The third argument of `split-window' has been renamed to SIDE and can be 1043The third argument of `split-window' has been renamed to SIDE and can be
1039set to any of the values 'below, 'right, 'above, or 'left to make the 1044set to any of the values 'below, 'right, 'above, or 'left to make the
1040new window appear on the corresponding side of the window that shall be 1045new window appear on the corresponding side of the window that shall be
@@ -1097,6 +1102,11 @@ are user-customizable variables.
1097 1102
1098See the docstring of `display-buffer' for details. 1103See the docstring of `display-buffer' for details.
1099 1104
1105+++
1106*** New behavior of `quit-window'.
1107The behavior of `quit-window' has been changed in order to restore the
1108state before the last buffer display operation in that window.
1109
1100** Completion 1110** Completion
1101 1111
1102*** New variable completion-extra-properties used to specify extra properties 1112*** New variable completion-extra-properties used to specify extra properties
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 662dd7a7f99..92324036dc5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12011-09-25 Michael Albinus <michael.albinus@gmx.de>
2
3 * net/dbus.el (dbus-unregister-object): Don't release services for
4 registered signals. (Bug#9581)
5
62011-09-25 Teodor Zlatanov <tzz@lifelogs.com>
7
8 * progmodes/cfengine.el (cfengine-auto-mode): Add convenience
9 function that picks between cfengine 2 and 3 support
10 automatically. Update docs accordingly.
11
12011-09-22 Ken Manheimer <ken.manheimer@gmail.com> 122011-09-22 Ken Manheimer <ken.manheimer@gmail.com>
2 13
3 * allout.el (allout-this-command-hid-stuff): Buffer-local variable 14 * allout.el (allout-this-command-hid-stuff): Buffer-local variable
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index cbf9fe6ed86..ba7d7115ffc 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -140,11 +140,14 @@ association to the service from D-Bus."
140 140
141 ;; Find the corresponding entry in the hash table. 141 ;; Find the corresponding entry in the hash table.
142 (let* ((key (car object)) 142 (let* ((key (car object))
143 (value (cdr object)) 143 (value (cadr object))
144 (bus (car key))
145 (service (car value))
144 (entry (gethash key dbus-registered-objects-table)) 146 (entry (gethash key dbus-registered-objects-table))
145 ret) 147 ret)
148 ;; key has the structure (BUS INTERRFACE MEMBER).
149 ;; value has the structure (SERVICE PATH [HANDLER]).
146 ;; entry has the structure ((UNAME SERVICE PATH MEMBER [RULE]) ...). 150 ;; entry has the structure ((UNAME SERVICE PATH MEMBER [RULE]) ...).
147 ;; value has the structure ((SERVICE PATH [HANDLER]) ...).
148 ;; MEMBER is either a string (the handler), or a cons cell (a 151 ;; MEMBER is either a string (the handler), or a cons cell (a
149 ;; property value). UNAME and property values are not taken into 152 ;; property value). UNAME and property values are not taken into
150 ;; account for comparision. 153 ;; account for comparision.
@@ -152,8 +155,8 @@ association to the service from D-Bus."
152 ;; Loop over the registered functions. 155 ;; Loop over the registered functions.
153 (dolist (elt entry) 156 (dolist (elt entry)
154 (when (equal 157 (when (equal
155 (car value) 158 value
156 (butlast (cdr elt) (- (length (cdr elt)) (length (car value))))) 159 (butlast (cdr elt) (- (length (cdr elt)) (length value))))
157 (setq ret t) 160 (setq ret t)
158 ;; Compute new hash value. If it is empty, remove it from the 161 ;; Compute new hash value. If it is empty, remove it from the
159 ;; hash table. 162 ;; hash table.
@@ -162,17 +165,16 @@ association to the service from D-Bus."
162 ;; Remove match rule of signals. 165 ;; Remove match rule of signals.
163 (let ((rule (nth 4 elt))) 166 (let ((rule (nth 4 elt)))
164 (when (stringp rule) 167 (when (stringp rule)
168 (setq service nil) ; We do not need to unregister the service.
165 (dbus-call-method 169 (dbus-call-method
166 (car key) dbus-service-dbus dbus-path-dbus dbus-interface-dbus 170 bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
167 "RemoveMatch" rule))))) 171 "RemoveMatch" rule)))))
168 ;; Check, whether there is still a registered function or property 172 ;; Check, whether there is still a registered function or property
169 ;; for the given service. If not, unregister the service from the 173 ;; for the given service. If not, unregister the service from the
170 ;; bus. 174 ;; bus.
171 (dolist (elt entry) 175 (when service
172 (let ((service (cadr elt)) 176 (dolist (elt entry)
173 (bus (car key)) 177 (let (found)
174 found)
175 (when service
176 (maphash 178 (maphash
177 (lambda (k v) 179 (lambda (k v)
178 (dolist (e v) 180 (dolist (e v)
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index 7989c60f80c..eea822328f1 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -26,16 +26,21 @@
26;; Provides support for editing GNU Cfengine files, including 26;; Provides support for editing GNU Cfengine files, including
27;; font-locking, Imenu and indention, but with no special keybindings. 27;; font-locking, Imenu and indention, but with no special keybindings.
28 28
29;; Possible customization for auto-mode selection: 29;; The CFEngine 3.x support doesn't have Imenu support but patches are
30;; (push '(("^cfagent.conf\\'" . cfengine-mode)) auto-mode-alist) 30;; welcome.
31;; (push '(("^cf\\." . cfengine-mode)) auto-mode-alist)
32;; (push '(("\\.cf\\'" . cfengine-mode)) auto-mode-alist)
33 31
34;; Or, if you want to use the CFEngine 3.x support: 32;; You can set it up so either cfengine-mode (2.x and earlier) or
33;; cfengine3-mode (3.x) will be picked, depending on the buffer
34;; contents:
35 35
36;; (push '(("^cfagent.conf\\'" . cfengine3-mode)) auto-mode-alist) 36;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode))
37;; (push '(("^cf\\." . cfengine3-mode)) auto-mode-alist) 37
38;; (push '(("\\.cf\\'" . cfengine3-mode)) auto-mode-alist) 38;; OR you can choose to always use a specific version, if you prefer
39;; it
40
41;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode))
42;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine-mode))
43;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine-mode))
39 44
40;; This is not the same as the mode written by Rolf Ebert 45;; This is not the same as the mode written by Rolf Ebert
41;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does 46;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does
@@ -466,6 +471,18 @@ to the action header."
466 #'cfengine-beginning-of-defun) 471 #'cfengine-beginning-of-defun)
467 (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun)) 472 (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun))
468 473
474;;;###autoload
475(defun cfengine-auto-mode ()
476 "Choose between `cfengine-mode' and `cfengine3-mode' depending
477on the buffer contents"
478 (let ((v3 nil))
479 (save-restriction
480 (goto-char (point-min))
481 (while (not (or (eobp) v3))
482 (setq v3 (looking-at (concat cfengine3-defuns-regex "\\>")))
483 (forward-line)))
484 (if v3 (cfengine3-mode) (cfengine-mode))))
485
469(provide 'cfengine3) 486(provide 'cfengine3)
470(provide 'cfengine) 487(provide 'cfengine)
471 488
diff --git a/src/ChangeLog b/src/ChangeLog
index 1769f91aaf2..ff76a9a8c78 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -767,6 +767,11 @@
767 rather than rolling our own approximation. 767 rather than rolling our own approximation.
768 (SCROLL_BAR_VEC_SIZE): Remove; not used. 768 (SCROLL_BAR_VEC_SIZE): Remove; not used.
769 769
7702011-09-25 Michael Albinus <michael.albinus@gmx.de>
771
772 * dbusbind.c (Fdbus_register_signal): When service is not
773 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
774
7702011-09-25 Glenn Morris <rgm@gnu.org> 7752011-09-25 Glenn Morris <rgm@gnu.org>
771 776
772 * buffer.c (truncate-lines): Doc fix. 777 * buffer.c (truncate-lines): Doc fix.
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 0b6d6929a4d..352f2fc1ff8 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -2071,13 +2071,7 @@ usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARG
2071 && (SBYTES (service) > 0) 2071 && (SBYTES (service) > 0)
2072 && (strcmp (SSDATA (service), DBUS_SERVICE_DBUS) != 0) 2072 && (strcmp (SSDATA (service), DBUS_SERVICE_DBUS) != 0)
2073 && (strncmp (SSDATA (service), ":", 1) != 0)) 2073 && (strncmp (SSDATA (service), ":", 1) != 0))
2074 { 2074 uname = call2 (intern ("dbus-get-name-owner"), bus, service);
2075 uname = call2 (intern ("dbus-get-name-owner"), bus, service);
2076 /* When there is no unique name, we mark it with an empty
2077 string. */
2078 if (NILP (uname))
2079 uname = empty_unibyte_string;
2080 }
2081 else 2075 else
2082 uname = service; 2076 uname = service;
2083 2077