diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/windows.texi | 57 |
2 files changed, 31 insertions, 33 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 4b9531c0e6c..44467d5f51b 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2012-01-19 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * windows.texi (Window Configurations): Rewrite references to | ||
| 4 | persistent window parameters. | ||
| 5 | (Window Parameters): Fix description of persistent window | ||
| 6 | parameters. | ||
| 7 | |||
| 1 | 2012-01-16 Juanma Barranquero <lekktu@gmail.com> | 8 | 2012-01-16 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * windows.texi (Window Parameters): Use @pxref. | 10 | * windows.texi (Window Parameters): Use @pxref. |
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 1bff30e45e1..a0f8b61ddfe 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi | |||
| @@ -3104,9 +3104,9 @@ window configuration; see @ref{Frame Configurations}. | |||
| 3104 | @defun current-window-configuration &optional frame | 3104 | @defun current-window-configuration &optional frame |
| 3105 | This function returns a new object representing @var{frame}'s current | 3105 | This function returns a new object representing @var{frame}'s current |
| 3106 | window configuration. The default for @var{frame} is the selected | 3106 | window configuration. The default for @var{frame} is the selected |
| 3107 | frame. This function saves copies of window parameters listed by the | 3107 | frame. The variable @code{window-persistent-parameters} specifies |
| 3108 | variable @code{window-persistent-parameters}, see @ref{Window | 3108 | whether and which window parameters are saved by this function, see |
| 3109 | Parameters} for details. | 3109 | @ref{Window Parameters} for details. |
| 3110 | @end defun | 3110 | @end defun |
| 3111 | 3111 | ||
| 3112 | @defun set-window-configuration configuration | 3112 | @defun set-window-configuration configuration |
| @@ -3214,27 +3214,25 @@ to clone the state of a frame into an arbitrary live window | |||
| 3214 | (@code{set-window-configuration} effectively clones the windows of a | 3214 | (@code{set-window-configuration} effectively clones the windows of a |
| 3215 | frame into the root window of that very frame only). | 3215 | frame into the root window of that very frame only). |
| 3216 | 3216 | ||
| 3217 | @defun window-state-get &optional window ignore | 3217 | @defun window-state-get &optional window writable |
| 3218 | This function returns the state of @var{window} as a Lisp object. The | 3218 | This function returns the state of @var{window} as a Lisp object. The |
| 3219 | argument @var{window} can be any window and defaults to the root window | 3219 | argument @var{window} can be any window and defaults to the root window |
| 3220 | of the selected frame. | 3220 | of the selected frame. |
| 3221 | 3221 | ||
| 3222 | If the optional argument @var{ignore} is non-@code{nil}, this means to | 3222 | If the optional argument @var{writable} is non-@code{nil}, this means to |
| 3223 | not use markers for sampling positions like @code{window-point} or | 3223 | not use markers for sampling positions like @code{window-point} or |
| 3224 | @code{window-start}. This argument should be non-@code{nil} when the | 3224 | @code{window-start}. This argument should be non-@code{nil} when the |
| 3225 | state shall be written on disk and read back in another session. | 3225 | state shall be written to disk and read back in another session. |
| 3226 | 3226 | ||
| 3227 | The variable @code{window-persistent-parameters} specifies whether and | 3227 | Together, the argument @var{writable} and the variable |
| 3228 | which window parameters are saved by this function, see @ref{Window | 3228 | @code{window-persistent-parameters} specify which window parameters are |
| 3229 | Parameters} for details. | 3229 | saved by this function, see @ref{Window Parameters} for details. |
| 3230 | @end defun | 3230 | @end defun |
| 3231 | 3231 | ||
| 3232 | The value returned by @code{window-state-get} can be converted, using | 3232 | The value returned by @code{window-state-get} can be used in the same |
| 3233 | one of the functions defined by Desktop Save Mode (@pxref{Desktop Save | 3233 | session to make a clone of a window in another window. It can be also |
| 3234 | Mode}), to an object that can be written to a file. Such objects can be | 3234 | written to disk and read back in another session. In either case, use |
| 3235 | read back and converted to a Lisp object representing the state of the | 3235 | the function described next to restore the state of the window. |
| 3236 | window. That Lisp object can be used as argument for the following | ||
| 3237 | function in order to restore the state window in another window. | ||
| 3238 | 3236 | ||
| 3239 | @defun window-state-put state &optional window ignore | 3237 | @defun window-state-put state &optional window ignore |
| 3240 | This function puts the window state @var{state} into @var{window}. The | 3238 | This function puts the window state @var{state} into @var{window}. The |
| @@ -3281,10 +3279,10 @@ states of windows (@pxref{Window Configurations}) do not care about | |||
| 3281 | window parameters. This means, that when you change the value of a | 3279 | window parameters. This means, that when you change the value of a |
| 3282 | parameter within the body of a @code{save-window-excursion}, the | 3280 | parameter within the body of a @code{save-window-excursion}, the |
| 3283 | previous value is not restored upon exit of that macro. It also means | 3281 | previous value is not restored upon exit of that macro. It also means |
| 3284 | that when you clone via @code{window-state-put} a window state saved | 3282 | that when you restore via @code{window-state-put} a window state saved |
| 3285 | earlier by @code{window-state-get}, the cloned windows come up with no | 3283 | earlier by @code{window-state-get}, all cloned windows have their |
| 3286 | parameters at all. The following variable allows to override the | 3284 | parameters reset to @code{nil}. The following variable allows to |
| 3287 | standard behavior. | 3285 | override the standard behavior. |
| 3288 | 3286 | ||
| 3289 | @defvar window-persistent-parameters | 3287 | @defvar window-persistent-parameters |
| 3290 | This variable is an alist specifying which parameters get saved by | 3288 | This variable is an alist specifying which parameters get saved by |
| @@ -3293,32 +3291,25 @@ subsequently restored by @code{set-window-configuration} and | |||
| 3293 | @code{window-state-put}, see @ref{Window Configurations}. | 3291 | @code{window-state-put}, see @ref{Window Configurations}. |
| 3294 | 3292 | ||
| 3295 | The @sc{car} of each entry of this alist is the symbol specifying the | 3293 | The @sc{car} of each entry of this alist is the symbol specifying the |
| 3296 | parameter. The @sc{cdr} must be one of the following: | 3294 | parameter. The @sc{cdr} should be one of the following: |
| 3297 | 3295 | ||
| 3298 | @table @asis | 3296 | @table @asis |
| 3299 | @item @code{state} | ||
| 3300 | This value means the parameter is saved by @code{window-state-get} | ||
| 3301 | provided its @var{ignore} argument is @code{nil}. The function | ||
| 3302 | @code{current-window-configuration} does not save this parameter. | ||
| 3303 | |||
| 3304 | @item @code{nil} | 3297 | @item @code{nil} |
| 3298 | This value means the parameter is neither saved by | ||
| 3299 | @code{window-state-get} nor by @code{current-window-configuration}. | ||
| 3300 | |||
| 3301 | @item @code{t} | ||
| 3305 | This value specifies that the parameter is saved by | 3302 | This value specifies that the parameter is saved by |
| 3306 | @code{current-window-configuration} and, provided its @var{ignore} | 3303 | @code{current-window-configuration} and, provided its @var{writable} |
| 3307 | argument is @code{nil}, by @code{window-state-get}. | 3304 | argument is @code{nil}, by @code{window-state-get}. |
| 3308 | 3305 | ||
| 3309 | @item @code{t} | 3306 | @item @code{writable} |
| 3310 | This means that the parameter is saved unconditionally by both | 3307 | This means that the parameter is saved unconditionally by both |
| 3311 | @code{current-window-configuration} and @code{window-state-get}. This | 3308 | @code{current-window-configuration} and @code{window-state-get}. This |
| 3312 | value should not be used for parameters whose values do not have a read | 3309 | value should not be used for parameters whose values do not have a read |
| 3313 | syntax. Otherwise, invoking @code{window-state-put} in another session | 3310 | syntax. Otherwise, invoking @code{window-state-put} in another session |
| 3314 | may fail with an @code{invalid-read-syntax} error. | 3311 | may fail with an @code{invalid-read-syntax} error. |
| 3315 | @end table | 3312 | @end table |
| 3316 | |||
| 3317 | Parameters that have been saved are restored to their previous values by | ||
| 3318 | @code{set-window-configuration} respectively are installed by | ||
| 3319 | @code{window-state-put}. Parameters that have not been saved are left | ||
| 3320 | alone by @code{set-window-configuration} respectively are not installed | ||
| 3321 | by @code{window-state-put}. | ||
| 3322 | @end defvar | 3313 | @end defvar |
| 3323 | 3314 | ||
| 3324 | Some functions, notably @code{delete-window}, | 3315 | Some functions, notably @code{delete-window}, |