diff options
| -rwxr-xr-x | autogen/configure | 24 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 15 | ||||
| -rw-r--r-- | doc/lispref/elisp.texi | 2 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 226 | ||||
| -rw-r--r-- | etc/NEWS | 14 | ||||
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/net/dbus.el | 22 | ||||
| -rw-r--r-- | lisp/progmodes/cfengine.el | 33 | ||||
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/dbusbind.c | 8 |
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 | ;; |
| 8069 | esac | 8064 | esac |
| 8070 | 8065 | ||
| @@ -8163,6 +8158,19 @@ fi # crt_files != "" | |||
| 8163 | 8158 | ||
| 8164 | 8159 | ||
| 8165 | 8160 | ||
| 8161 | case $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 | ;; | ||
| 8172 | esac | ||
| 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 @@ | |||
| 1 | 2011-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 | |||
| 1 | 2011-09-25 Chong Yidong <cyd@stupidchicken.com> | 16 | 2011-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 | |||
| 294 | to the selected one. The return value is @code{nil} if @var{window} is | 296 | to the selected one. The return value is @code{nil} if @var{window} is |
| 295 | a live window or its children form a vertical combination. In the | 297 | a live window or its children form a vertical combination. In the |
| 296 | example above @code{(window-left-child W4)} is @code{W6} while | 298 | example 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}). | |||
| 2078 | buffer; it defaults to the current buffer. | 2080 | buffer; it defaults to the current buffer. |
| 2079 | 2081 | ||
| 2080 | If a window displaying @var{buffer-or-name} is dedicated | 2082 | If 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 |
| 2082 | is not the only window on its frame, that window is deleted. If that | 2084 | is not the only window on its frame, that window is deleted. If that |
| 2083 | window is the only window on its frame and there are other frames on | 2085 | window is the only window on its frame and there are other frames on the |
| 2084 | the frame's terminal, that frame is deleted too; otherwise, some other | 2086 | frame's terminal, that frame is deleted too; otherwise, the buffer |
| 2085 | buffer is displayed in that window, as explained above. A user can | 2087 | provided by the function @code{switch-to-prev-buffer} (@pxref{Window |
| 2086 | prevent the deletion of windows and/or frames by customizing the | 2088 | History}) is displayed instead. |
| 2087 | option @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 | |||
| 2123 | list (@pxref{The Buffer List}). However, this is not done if the | 2125 | list (@pxref{The Buffer List}). However, this is not done if the |
| 2124 | optional argument @var{norecord} is non-@code{nil}. | 2126 | optional argument @var{norecord} is non-@code{nil}. |
| 2125 | 2127 | ||
| 2126 | If this function is unable to display in the seleted window---usually | 2128 | If this function is unable to display the buffer in the selected |
| 2127 | because the selected window is a minibuffer window or is strongly | 2129 | window---usually because the selected window is a minibuffer window or |
| 2128 | dedicated to its buffer (@pxref{Dedicated Windows})---then it normally | 2130 | is strongly dedicated to its buffer (@pxref{Dedicated Windows})---then |
| 2129 | tries to display in some other window, in the manner of | 2131 | it normally tries to display the buffer in some other window, in the |
| 2130 | @code{pop-to-buffer} (see below). However, if the optional argument | 2132 | manner of @code{pop-to-buffer} (see below). However, if the optional |
| 2131 | @var{force-same-window} is non-@code{nil}, it signals an error | 2133 | argument @var{force-same-window} is non-@code{nil}, it signals an error |
| 2132 | instead. | 2134 | instead. |
| 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 |
| 2358 | This function tries to display @var{buffer} by choosing an existing | 2360 | This function tries to display @var{buffer} by choosing an existing |
| 2359 | buffer and displaying the buffer in that window. It can fail if all | 2361 | window and displaying the buffer in that window. It can fail if all |
| 2360 | windows are dedicated to another buffer (@pxref{Dedicated Windows}). | 2362 | windows 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, | |||
| 2629 | resort, it will try to display @var{buffer-or-name} on a separate frame. | 2631 | resort, it will try to display @var{buffer-or-name} on a separate frame. |
| 2630 | In that case, the value of @code{pop-up-frames} is disregarded. | 2632 | In 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 | 2639 | Each window remembers the buffers it has displayed earlier and the order |
| 2637 | order in which these buffers have been removed from it. This history | 2640 | in which these buffers have been removed from it. This history is used, |
| 2638 | is used, for example, by @code{replace-buffer-in-windows} | 2641 | for example, by @code{replace-buffer-in-windows} (@pxref{Buffers and |
| 2639 | (@pxref{Buffers and Windows}). This list is set automatically | 2642 | Windows}). This list is automatically maintained by Emacs, but you can |
| 2640 | maintained by Emacs, but you can use the following functions to | 2643 | use the following functions to explicitly inspect or alter it: |
| 2641 | explicitly inspect or alter it: | ||
| 2642 | 2644 | ||
| 2643 | @defun window-prev-buffers &optional window | 2645 | @defun window-prev-buffers &optional window |
| 2644 | This function returns a list specifying the previous contents of | 2646 | This 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 | |||
| 2652 | that buffer was last shown. | 2654 | that buffer was last shown. |
| 2653 | 2655 | ||
| 2654 | The list is ordered so that earlier elements correspond to more | 2656 | The list is ordered so that earlier elements correspond to more |
| 2655 | recently-shown buffers, and the first element corresponds to the | 2657 | recently-shown buffers, and the first element usually corresponds to the |
| 2656 | buffer most recently removed from the window. | 2658 | buffer 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 |
| 2673 | This function returns the list of buffers recently re-shown in | 2675 | This 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} |
| 2675 | a live window or @code{nil} (meaning the selected window). | 2677 | argument must denote a live window or @code{nil} (meaning the selected |
| 2678 | window). | ||
| 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 | ||
| 2708 | If repeated invocations of this command have already shown all buffers | 2711 | If repeated invocations of this command have already shown all buffers |
| 2709 | previously shown in @var{window}, further invocations will show buffers | 2712 | previously shown in @var{window}, further invocations will show buffers |
| 2710 | from the global buffer list starting with the buffer returned by | 2713 | from the buffer list of the frame @var{window} appears on (@pxref{The |
| 2711 | @code{last-buffer} (@pxref{The Buffer List}). | 2714 | Buffer 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 |
| 2718 | defaults to the selected one. | 2721 | defaults to the selected one. |
| 2719 | 2722 | ||
| 2720 | If there is no recent invocation of a @code{switch-to-prev-buffer} | 2723 | If there is no recent invocation of a @code{switch-to-prev-buffer} that |
| 2721 | that can be undone, this function tries to show the first buffer from | 2724 | can be undone, this function tries to show a buffer from the buffer list |
| 2722 | the global buffer list as returned by @code{other-buffer} (@pxref{The | 2725 | of the frame @var{window} appears on (@pxref{The Buffer List}). |
| 2723 | Buffer 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 | |||
| 2776 | non-@code{nil} value. | 2779 | non-@code{nil} value. |
| 2777 | @end defun | 2780 | @end defun |
| 2778 | 2781 | ||
| 2782 | |||
| 2783 | @node Quitting Windows | ||
| 2784 | @section Quitting Windows | ||
| 2785 | |||
| 2786 | When you want to get rid of a window used for displaying a buffer you | ||
| 2787 | can use the function @code{delete-window} (@pxref{Deleting Windows}) to | ||
| 2788 | remove that window from its frame. If the buffer has been shown on a | ||
| 2789 | separate frame, you might want to call @code{delete-frame} | ||
| 2790 | (@pxref{Deleting Frames}) instead. If, on the other hand, a window has | ||
| 2791 | been reused for displaying the buffer, you might prefer showing the | ||
| 2792 | buffer previously shown in that window by calling the function | ||
| 2793 | @code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you | ||
| 2794 | might 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 | ||
| 2798 | displaying the buffer was obtained in the first place thus attempting to | ||
| 2799 | automatize the above decisions for you. | ||
| 2800 | |||
| 2801 | @deffn Command quit-window &optional kill window | ||
| 2802 | This command quits @var{window} and buries its buffer. The argument | ||
| 2803 | @var{window} must be a live window and defaults to the selected one. | ||
| 2804 | With prefix argument @var{kill} non-@code{nil}, it kills the buffer | ||
| 2805 | instead of burying it. | ||
| 2806 | |||
| 2807 | Quitting @var{window} means to proceed as follows: If @var{window} was | ||
| 2808 | created specially for displaying its current buffer, delete @var{window} | ||
| 2809 | provided its frame contains at least one other live window. If | ||
| 2810 | @var{window} is the only window on its frame and other frames still | ||
| 2811 | exist, delete the frame together with @var{window}. If, however, there | ||
| 2812 | are no other frames left, display some other buffer in @var{window}. | ||
| 2813 | |||
| 2814 | If @var{window} was reused for displaying its buffer, this command tries | ||
| 2815 | to display the buffer previously shown in it. It also tries to restore | ||
| 2816 | the window start (@pxref{Window Start and End}) and point (@pxref{Window | ||
| 2817 | Point}) positions of the previously shown buffer. If, in addition, the | ||
| 2818 | current buffer was temporarily resized, this command will also try to | ||
| 2819 | restore the original height of @var{window}. | ||
| 2820 | |||
| 2821 | The three cases described so far require that the buffer shown in | ||
| 2822 | @var{window} is still the buffer displayed by the last buffer display | ||
| 2823 | function for this window. If another buffer has been shown in the | ||
| 2824 | meantime or the buffer previously shown no longer exists, this command | ||
| 2825 | calls @code{switch-to-prev-buffer} (@pxref{Window History}) to show some | ||
| 2826 | other buffer instead. | ||
| 2827 | @end deffn | ||
| 2828 | |||
| 2829 | The function @code{quit-window} bases its decisions on information | ||
| 2830 | stored in @var{window}'s @code{quit-restore} window parameter | ||
| 2831 | (@pxref{Window Parameters}) and resets that parameter to @code{nil} | ||
| 2832 | after 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 | 3581 | A @dfn{window configuration} records the entire layout of one |
| 3526 | frame---all windows, their sizes, which buffers they contain, how those | 3582 | frame---all windows, their sizes, which buffers they contain, how those |
| 3527 | buffers are scrolled, and their values of point and the mark; also their | 3583 | buffers are scrolled, and their values of point and the mark; also their |
| 3528 | fringes, margins, and scroll bar settings. It also includes the value | 3584 | fringes, margins, and scroll bar settings. It also includes the value |
| 3529 | of @code{minibuffer-scroll-window}. As a special exception, the window | 3585 | of @code{minibuffer-scroll-window}. As a special exception, the window |
| 3530 | configuration does not record the value of point in the selected window | 3586 | configuration does not record the value of point in the selected window |
| 3531 | for the current buffer. Also, the window configuration does not record | 3587 | for the current buffer. |
| 3532 | the 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 |
| 3535 | saved window configuration. If you want to record the layout of all | 3590 | saved 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 | |||
| 3639 | file @file{winner.el} for some more operations on windows | 3694 | file @file{winner.el} for some more operations on windows |
| 3640 | configurations. | 3695 | configurations. |
| 3641 | 3696 | ||
| 3697 | The objects returned by @code{current-window-configuration} die | ||
| 3698 | together with the Emacs process. In order to store a window | ||
| 3699 | configuration on disk and read it back in another Emacs session the | ||
| 3700 | following two functions can be used. | ||
| 3701 | |||
| 3702 | @defun window-state-get &optional window markers | ||
| 3703 | This function returns the state of @var{window} as a Lisp object. The | ||
| 3704 | argument @var{window} can be any window and defaults to the root window | ||
| 3705 | of the selected frame. | ||
| 3706 | |||
| 3707 | The optional argument @var{markers} non-@code{nil} means to use markers | ||
| 3708 | for sampling positions like @code{window-point} or @code{window-start}. | ||
| 3709 | This argument should be non-@code{nil} only if the value is used for | ||
| 3710 | putting the state back in the same session since markers slow down | ||
| 3711 | processing. | ||
| 3712 | @end defun | ||
| 3713 | |||
| 3714 | The value returned by @code{window-state-get} can be converted by using | ||
| 3715 | one of the functions defined by Desktop Save Mode (@pxref{Desktop Save | ||
| 3716 | Mode}) to an object that can be written to a file. Such objects can be | ||
| 3717 | read back and converted to a Lisp object representing the state of the | ||
| 3718 | window. That Lisp object can be used as argument for the following | ||
| 3719 | function in order to restore the state window in another window. | ||
| 3720 | |||
| 3721 | @defun window-state-put state &optional window ignore | ||
| 3722 | This function puts the window state @var{state} into @var{window}. The | ||
| 3723 | argument @var{state} should be the state of a window returned by an | ||
| 3724 | earlier invocation of @code{window-state-get}, see above. The optional | ||
| 3725 | argument @var{window} must specify a live window and defaults to the | ||
| 3726 | selected one. | ||
| 3727 | |||
| 3728 | The optional argument @var{ignore} non-@code{nil} means to ignore | ||
| 3729 | minimum window sizes and fixed size restrictions. If @var{ignore} | ||
| 3730 | equals @code{safe}, this means subwindows can get as small as one line | ||
| 3731 | and/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 | ||
| 3646 | This sections describes how window parameters can be used to associate | 3739 | This section describes how window parameters can be used to associate |
| 3647 | additional information with windows. | 3740 | additional information with windows. |
| 3648 | 3741 | ||
| 3649 | @defun window-parameter window parameter | 3742 | @defun window-parameter window parameter |
| 3650 | This function returns @var{window}'s value for @var{parameter}. The | 3743 | This function returns @var{window}'s value for @var{parameter}. The |
| 3651 | default for @var{window} is the selected window. If @var{window} | 3744 | default for @var{window} is the selected window. If @var{window} has no |
| 3652 | has no setting for @var{parameter}, this function returns @code{nil}. | 3745 | setting 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 |
| 3656 | This function returns all parameters of @var{window} and their values. | 3749 | This function returns all parameters of @var{window} and their values. |
| 3657 | The default for @var{window} is the selected window. The return value | 3750 | The default for @var{window} is the selected window. The return value, |
| 3658 | is an association list of elements of the form @code{(@var{parameter} | 3751 | if 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 | |||
| 3665 | is the selected window. | 3758 | is the selected window. |
| 3666 | @end defun | 3759 | @end defun |
| 3667 | 3760 | ||
| 3668 | Currently, window parameters are not saved in window configurations and | 3761 | Some functions, notably @code{delete-window}, |
| 3669 | consequently not restored by @code{set-window-configuration}. Hence, | 3762 | @code{delete-other-windows} and @code{split-window} may behave specially |
| 3670 | any change of a parameter introduced via @code{set-window-parameter} can | 3763 | when their @var{window} argument has a parameter set. You can override |
| 3671 | be undone only by invoking @code{set-window-parameter} for the same | 3764 | such special behavior by binding the following variable to a |
| 3672 | parameter again. Since @code{save-window-excursion} relies on window | 3765 | non-@code{nil} value: |
| 3673 | configurations (@pxref{Window Configurations}), window parameters are | 3766 | |
| 3674 | not saved and restored by that special form, either. | 3767 | @defvar ignore-window-parameters |
| 3768 | If this variable is non-@code{nil}, some standard functions do not | ||
| 3769 | process window parameters. The functions currently affected by this are | ||
| 3770 | @code{split-window}, @code{delete-window}, @code{delete-other-windows} | ||
| 3771 | and @code{other-window}. | ||
| 3772 | |||
| 3773 | An application can bind this variable to a non-@code{nil} value around | ||
| 3774 | calls to these functions. If it does so, the application is fully | ||
| 3775 | responsible for correctly assigning the parameters of all involved | ||
| 3776 | windows when exiting that function. | ||
| 3777 | @end defvar | ||
| 3778 | |||
| 3779 | The following parameters are currently used by the window management | ||
| 3780 | code. | ||
| 3781 | |||
| 3782 | @table @asis | ||
| 3783 | @item @code{delete-window} | ||
| 3784 | This parameter affects the execution of @code{delete-window} | ||
| 3785 | (@pxref{Deleting Windows}). | ||
| 3786 | |||
| 3787 | @item @code{delete-other-windows} | ||
| 3788 | This parameter affects the execution of @code{delete-other-windows} | ||
| 3789 | (@pxref{Deleting Windows}). | ||
| 3790 | |||
| 3791 | @item @code{split-window} | ||
| 3792 | This parameter affects the execution of @code{split-window} | ||
| 3793 | (@pxref{Splitting Windows}). | ||
| 3794 | |||
| 3795 | @item @code{other-window} | ||
| 3796 | This parameter affects the execution of @code{other-window} | ||
| 3797 | (@pxref{Cyclic Window Ordering}). | ||
| 3798 | |||
| 3799 | @item @code{no-other-window} | ||
| 3800 | This parameter marks the window as not selectable by @code{other-window} | ||
| 3801 | (@pxref{Cyclic Window Ordering}). | ||
| 3802 | @end table | ||
| 3803 | |||
| 3804 | In addition, the parameters @code{window-atom} and @code{window-side} | ||
| 3805 | are reserved and should not be used by applications. The | ||
| 3806 | @code{quit-restore} parameter tells how to proceed with a window when | ||
| 3807 | the buffer it shows is no more needed. This parameter is installed by | ||
| 3808 | the buffer display functions (@pxref{Choosing Window}) and consulted by | ||
| 3809 | the 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 |
| @@ -425,6 +425,11 @@ These maximize and minize the size of a window within its frame. | |||
| 425 | These functions allow to navigate through the live buffers that have | 425 | These functions allow to navigate through the live buffers that have |
| 426 | been shown in a specific window. | 426 | been shown in a specific window. |
| 427 | 427 | ||
| 428 | +++ | ||
| 429 | *** New functions `window-state-get' and `window-state-put'. | ||
| 430 | These functions allow to save and restore the state of an arbitrary | ||
| 431 | frame 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'. |
| 429 | This is handy for minibuffer-only frames, and is also used for the "mouse-1 | 434 | This is handy for minibuffer-only frames, and is also used for the "mouse-1 |
| 430 | pops up *Messages*" feature, which can now easily be changed. | 435 | pops 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. |
| 1031 | For each window you can specify a parameter to override the default | 1036 | For each window you can specify a parameter to override the default |
| 1032 | behavior of a number of functions like `split-window', `delete-window' | 1037 | behavior of a number of functions like `split-window', `delete-window' |
| 1033 | and `delete-other-windows'. | 1038 | and `delete-other-windows'. The variable `ignore-window-parameters' |
| 1039 | allows 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 | |||
| 1038 | The third argument of `split-window' has been renamed to SIDE and can be | 1043 | The third argument of `split-window' has been renamed to SIDE and can be |
| 1039 | set to any of the values 'below, 'right, 'above, or 'left to make the | 1044 | set to any of the values 'below, 'right, 'above, or 'left to make the |
| 1040 | new window appear on the corresponding side of the window that shall be | 1045 | new window appear on the corresponding side of the window that shall be |
| @@ -1097,6 +1102,11 @@ are user-customizable variables. | |||
| 1097 | 1102 | ||
| 1098 | See the docstring of `display-buffer' for details. | 1103 | See the docstring of `display-buffer' for details. |
| 1099 | 1104 | ||
| 1105 | +++ | ||
| 1106 | *** New behavior of `quit-window'. | ||
| 1107 | The behavior of `quit-window' has been changed in order to restore the | ||
| 1108 | state 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 @@ | |||
| 1 | 2011-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 | |||
| 6 | 2011-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 | |||
| 1 | 2011-09-22 Ken Manheimer <ken.manheimer@gmail.com> | 12 | 2011-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 | ||
| 477 | on 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 | ||
| 770 | 2011-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 | |||
| 770 | 2011-09-25 Glenn Morris <rgm@gnu.org> | 775 | 2011-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 | ||