diff options
| author | Martin Rudalics | 2012-01-19 11:38:31 +0100 |
|---|---|---|
| committer | Martin Rudalics | 2012-01-19 11:38:31 +0100 |
| commit | 34a02f46dce0136ef10deb0f632330c76babbd9c (patch) | |
| tree | 928147730736112abdb14aeef620c783f9fe43d3 /src/window.c | |
| parent | 1259009aa17da6dc038afff96963f6d9bbd3b8e1 (diff) | |
| download | emacs-34a02f46dce0136ef10deb0f632330c76babbd9c.tar.gz emacs-34a02f46dce0136ef10deb0f632330c76babbd9c.zip | |
Fix handling of persistent window parameters.
* window.c (save_window_save, Fcurrent_window_configuration)
(Vwindow_persistent_parameters): Do not use Qstate. Rewrite
doc-strings.
* window.el (window--state-get-1, window-state-get): Do not use
special state value for window-persistent-parameters. Rename
argument IGNORE to WRITABLE. Rewrite doc-string.
(window--state-put-2): Reset all window parameters to nil before
assigning values of persistent parameters.
* windows.texi (Window Configurations): Rewrite references to
persistent window parameters.
(Window Parameters): Fix description of persistent window
parameters.
Diffstat (limited to 'src/window.c')
| -rw-r--r-- | src/window.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/window.c b/src/window.c index 3dc6029d24d..324689498ae 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -57,7 +57,7 @@ static Lisp_Object Qreplace_buffer_in_windows, Qget_mru_window; | |||
| 57 | static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; | 57 | static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; |
| 58 | static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; | 58 | static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; |
| 59 | static Lisp_Object Qsafe, Qabove, Qbelow; | 59 | static Lisp_Object Qsafe, Qabove, Qbelow; |
| 60 | static Lisp_Object Qauto_buffer_name, Qclone_of, Qstate; | 60 | static Lisp_Object Qauto_buffer_name, Qclone_of; |
| 61 | 61 | ||
| 62 | static int displayed_window_lines (struct window *); | 62 | static int displayed_window_lines (struct window *); |
| 63 | static struct window *decode_window (Lisp_Object); | 63 | static struct window *decode_window (Lisp_Object); |
| @@ -5889,9 +5889,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, int i) | |||
| 5889 | tem = XCDR (tem)) | 5889 | tem = XCDR (tem)) |
| 5890 | { | 5890 | { |
| 5891 | pers = XCAR (tem); | 5891 | pers = XCAR (tem); |
| 5892 | /* Save values for persistent window parameters whose cdr | 5892 | /* Save values for persistent window parameters. */ |
| 5893 | is either nil or t. */ | 5893 | if (CONSP (pers) && !NILP (XCDR (pers))) |
| 5894 | if (CONSP (pers) && (NILP (XCDR (pers)) || EQ (XCDR (pers), Qt))) | ||
| 5895 | { | 5894 | { |
| 5896 | par = Fassq (XCAR (pers), w->window_parameters); | 5895 | par = Fassq (XCAR (pers), w->window_parameters); |
| 5897 | if (NILP (par)) | 5896 | if (NILP (par)) |
| @@ -5966,7 +5965,9 @@ and for each displayed buffer, where display starts, and the positions of | |||
| 5966 | point and mark. An exception is made for point in the current buffer: | 5965 | point and mark. An exception is made for point in the current buffer: |
| 5967 | its value is -not- saved. | 5966 | its value is -not- saved. |
| 5968 | This also records the currently selected frame, and FRAME's focus | 5967 | This also records the currently selected frame, and FRAME's focus |
| 5969 | redirection (see `redirect-frame-focus'). */) | 5968 | redirection (see `redirect-frame-focus'). The variable |
| 5969 | `window-persistent-parameters' specifies which window parameters are | ||
| 5970 | saved by this function. */) | ||
| 5970 | (Lisp_Object frame) | 5971 | (Lisp_Object frame) |
| 5971 | { | 5972 | { |
| 5972 | register Lisp_Object tem; | 5973 | register Lisp_Object tem; |
| @@ -6504,7 +6505,6 @@ syms_of_window (void) | |||
| 6504 | DEFSYM (Qbelow, "below"); | 6505 | DEFSYM (Qbelow, "below"); |
| 6505 | DEFSYM (Qauto_buffer_name, "auto-buffer-name"); | 6506 | DEFSYM (Qauto_buffer_name, "auto-buffer-name"); |
| 6506 | DEFSYM (Qclone_of, "clone-of"); | 6507 | DEFSYM (Qclone_of, "clone-of"); |
| 6507 | DEFSYM (Qstate, "state"); | ||
| 6508 | 6508 | ||
| 6509 | staticpro (&Vwindow_list); | 6509 | staticpro (&Vwindow_list); |
| 6510 | 6510 | ||
| @@ -6616,28 +6616,28 @@ function `set-window-combination-limit'. */); | |||
| 6616 | 6616 | ||
| 6617 | DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, | 6617 | DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, |
| 6618 | doc: /* Alist of persistent window parameters. | 6618 | doc: /* Alist of persistent window parameters. |
| 6619 | Parameters in this list are saved by `current-window-configuration' and | 6619 | This alist specifies which window parameters shall get saved by |
| 6620 | `window-state-get' and subsequently restored to their previous values by | 6620 | `current-window-configuration' and `window-state-get' and subsequently |
| 6621 | `set-window-configuration' and `window-state-put'. | 6621 | restored to their previous values by `set-window-configuration' and |
| 6622 | `window-state-put'. | ||
| 6622 | 6623 | ||
| 6623 | The car of each entry of this alist is the symbol specifying the | 6624 | The car of each entry of this alist is the symbol specifying the |
| 6624 | parameter. The cdr is one of the following: | 6625 | parameter. The cdr is one of the following: |
| 6625 | 6626 | ||
| 6626 | The symbol `state' means the parameter is saved by `window-state-get' | 6627 | nil means the parameter is neither saved by `window-state-get' nor by |
| 6627 | provided its IGNORE argument is nil. `current-window-configuration' | 6628 | `current-window-configuration'. |
| 6628 | does not save this parameter. | ||
| 6629 | 6629 | ||
| 6630 | nil means the parameter is saved by `current-window-configuration' and, | 6630 | t means the parameter is saved by `current-window-configuration' and, |
| 6631 | provided its IGNORE argument is nil, by `window-state-get'. | 6631 | provided its WRITABLE argument is nil, by `window-state-get'. |
| 6632 | 6632 | ||
| 6633 | t means the parameter is saved unconditionally by both | 6633 | The symbol `writable' means the parameter is saved unconditionally by |
| 6634 | `current-window-configuration' and `window-state-get'. Parameters | 6634 | both `current-window-configuration' and `window-state-get'. Do not use |
| 6635 | without read syntax (like windows or frames) should not use that. | 6635 | this value for parameters without read syntax (like windows or frames). |
| 6636 | 6636 | ||
| 6637 | Parameters not saved by `current-window-configuration' or | 6637 | Parameters not saved by `current-window-configuration' or |
| 6638 | `window-state-get' are left alone by `set-window-configuration' | 6638 | `window-state-get' are left alone by `set-window-configuration' |
| 6639 | respectively are not installed by `window-state-put'. */); | 6639 | respectively are not installed by `window-state-put'. */); |
| 6640 | Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qstate)); | 6640 | Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qt)); |
| 6641 | 6641 | ||
| 6642 | defsubr (&Sselected_window); | 6642 | defsubr (&Sselected_window); |
| 6643 | defsubr (&Sminibuffer_window); | 6643 | defsubr (&Sminibuffer_window); |