Now on revision 106877. ------------------------------------------------------------ revno: 106877 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-01-16 18:04:28 +0100 message: .bzrignore: Ignore etc/__pycache__. diff: === modified file '.bzrignore' --- .bzrignore 2011-12-03 04:06:45 +0000 +++ .bzrignore 2012-01-16 17:04:28 +0000 @@ -6,6 +6,7 @@ ./config.status ./data ./etc/icons +./etc/__pycache__ ./lock ./README.W32 ./site-lisp === modified file 'ChangeLog' --- ChangeLog 2012-01-05 09:46:05 +0000 +++ ChangeLog 2012-01-16 17:04:28 +0000 @@ -1,3 +1,7 @@ +2012-01-16 Juanma Barranquero + + * .bzrignore: Ignore etc/__pycache__. + 2011-12-17 Paul Eggert Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201). ------------------------------------------------------------ revno: 106876 committer: Juanma Barranquero branch nick: trunk timestamp: Mon 2012-01-16 18:00:33 +0100 message: doc/lispref/windows.texi (Window Parameters): Use @pxref. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-01-16 09:34:41 +0000 +++ doc/lispref/ChangeLog 2012-01-16 17:00:33 +0000 @@ -1,3 +1,7 @@ +2012-01-16 Juanma Barranquero + + * windows.texi (Window Parameters): Use @pxref. + 2012-01-16 Martin Rudalics * windows.texi (Window Configurations, Window Parameters): === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2012-01-16 09:34:41 +0000 +++ doc/lispref/windows.texi 2012-01-16 17:00:33 +0000 @@ -3277,7 +3277,7 @@ @end defun By default, functions saving and restoring window configurations or the -states of windows (@xref{Window Configurations}) do not care about +states of windows (@pxref{Window Configurations}) do not care about window parameters. This means, that when you change the value of a parameter within the body of a @code{save-window-excursion}, the previous value is not restored upon exit of that macro. It also means ------------------------------------------------------------ revno: 106875 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10514 author: Volker Sobek committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-01-16 11:00:08 -0500 message: * doc/emacs/programs.texi (Comment Commands): Typo. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2012-01-15 15:26:39 +0000 +++ doc/emacs/ChangeLog 2012-01-16 16:00:08 +0000 @@ -1,3 +1,7 @@ +2012-01-16 Volker Sobek (tiny change) + + * programs.texi (Comment Commands): Typo (bug#10514). + 2012-01-15 Chong Yidong * xresources.texi (X Resources): Describe GTK+ case first. @@ -21,8 +25,7 @@ 2012-01-14 Chong Yidong - * cmdargs.texi (Action Arguments): No need to mention - EMACSLOADPATH. + * cmdargs.texi (Action Arguments): No need to mention EMACSLOADPATH. (General Variables): Add xref to Lisp Libraries. (Initial Options): Copyedits. (Resume Arguments): Node deleted; emacs.bash/csh are obsolete. @@ -8847,7 +8850,7 @@ ;; coding: utf-8 ;; End: - Copyright (C) 1993-1999, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc. This file is part of GNU Emacs. === modified file 'doc/emacs/programs.texi' --- doc/emacs/programs.texi 2012-01-05 09:46:05 +0000 +++ doc/emacs/programs.texi 2012-01-16 16:00:08 +0000 @@ -952,7 +952,7 @@ comment on the current line, along with the whitespace before it. Since the comment is saved to the kill ring, you can reinsert it on another line by moving to the end of that line, doing @kbd{C-y}, and -then @kbd{M-;} to realign the command. You can achieve the same +then @kbd{M-;} to realign the comment. You can achieve the same effect as @kbd{C-u M-;} by typing @kbd{M-x comment-kill} (@code{comment-dwim} actually calls @code{comment-kill} as a subroutine when it is given a prefix argument). ------------------------------------------------------------ revno: 106874 fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10062 committer: Stefan Monnier branch nick: trunk timestamp: Mon 2012-01-16 10:50:28 -0500 message: * lisp/minibuffer.el (completion--replace): Strip properties. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-01-16 09:34:41 +0000 +++ lisp/ChangeLog 2012-01-16 15:50:28 +0000 @@ -1,3 +1,7 @@ +2012-01-16 Stefan Monnier + + * minibuffer.el (completion--replace): Strip properties (bug#10062). + 2012-01-16 Martin Rudalics * window.el (window-state-ignored-parameters): Remove variable. @@ -47,7 +51,7 @@ Fix Emacs bug #10463 - put `widen's around the critical spots. - * progmodes/cc-engine.el (c-in-literal, c-literal-limits): put a + * progmodes/cc-engine.el (c-in-literal, c-literal-limits): Put a widen around each invocation of c-state-pp-to-literal. Remove an unused let variable. @@ -58,8 +62,8 @@ 2012-01-10 Chong Yidong - * net/network-stream.el (network-stream-open-starttls): Avoid - emitting a confusing error message when the server gives a bad + * net/network-stream.el (network-stream-open-starttls): + Avoid emitting a confusing error message when the server gives a bad response to the capability command. 2012-01-10 Glenn Morris @@ -152,8 +156,8 @@ * custom.el (enable-theme): Don't set custom-safe-themes. - * cus-theme.el (custom-theme-merge-theme): Ignore - custom-enabled-themes and custom-safe-themes. + * cus-theme.el (custom-theme-merge-theme): + Ignore custom-enabled-themes and custom-safe-themes. 2012-01-05 Michael R. Mauger @@ -176,8 +180,8 @@ 2012-01-03 Chong Yidong - * shell.el (shell-dynamic-complete-functions): Put - pcomplete-completions-at-point, so as to try + * shell.el (shell-dynamic-complete-functions): + Put pcomplete-completions-at-point, so as to try comint-filename-completion first (Bug#10417). 2012-01-02 Richard Stallman @@ -202,8 +206,8 @@ 2012-01-01 Eli Zaretskii - * term/w32-win.el (dynamic-library-alist) : Load - libgnutls-28.dll, from GnuTLS version 3.x, in preference to + * term/w32-win.el (dynamic-library-alist) : + Load libgnutls-28.dll, from GnuTLS version 3.x, in preference to libgnutls-26.dll. 2011-12-31 Andreas Schwab @@ -255,11 +259,10 @@ 2011-12-24 Alan Mackenzie Introduce a mechanism to widen the region used in context font - locking. Use this to protect declarations from losing their - contexts. + locking. Use this to protect declarations from losing their contexts. - * progmodes/cc-langs.el (c-before-font-lock-functions): Replace - c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). + * progmodes/cc-langs.el (c-before-font-lock-functions): + Replace c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming). (c-before-context-fontification-functions): New defvar, a list of functions to be run just before context (etc.) font locking. @@ -411,22 +414,19 @@ * progmodes/cc-langs (c-label-kwds): Let AWK take the same expression as the rest. - (c-nonlabel-token-key): Allow string literals for AWK. Refactor - for the other modes. + (c-nonlabel-token-key): Allow string literals for AWK. + Refactor for the other modes. Large brace-block initialisation makes CC Mode slow: Fix. - Tidy up and accelerate c-in-literal, etc. by using the - c-parse-state + Tidy up and accelerate c-in-literal, etc. by using the c-parse-state routines. Limit backward searching in c-font-lock-enclosing.decl. * progmodes/cc-engine.el (c-state-pp-to-literal): Return the pp-state and literal type in addition to the limits. - (c-state-safe-place): New defun, extracted from - c-state-literal-at. + (c-state-safe-place): New defun, extracted from c-state-literal-at. (c-state-literal-at): Use the above new defun. - (c-slow-in-literal, c-fast-in-literal): Removed. - (c-in-literal, c-literal-limits): Amended to use - c-state-pp-to-literal. + (c-slow-in-literal, c-fast-in-literal): Remove. + (c-in-literal, c-literal-limits): Amend to use c-state-pp-to-literal. * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for being in a literal. Add a limit for backward searching. @@ -500,8 +500,8 @@ 2011-12-10 Eli Zaretskii * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the - `from' or `to' address before taking its substring. Fixes - incorrect display in Rmail summary buffer whereby an RFC2047 + `from' or `to' address before taking its substring. + Fixes incorrect display in Rmail summary buffer whereby an RFC2047 encoded name is chopped in the middle of the encoded string, and thus displayed encoded. @@ -720,8 +720,8 @@ (verilog-uvm-statement-re): Support UVM indentation and highlighting, with old OVM keywords only. (verilog-auto-tieoff, verilog-auto-tieoff-declaration): - Support AUTOTIEOFF creating non-wire data types. Suggested by Jonathan - Greenlaw. + Support AUTOTIEOFF creating non-wire data types. + Suggested by Jonathan Greenlaw. (verilog-auto-insert-lisp, verilog-delete-to-paren) (verilog-forward-sexp-cmt, verilog-forward-sexp-ign-cmt) (verilog-inject-sense, verilog-read-inst-pins) @@ -807,11 +807,11 @@ Andrew Drake. (verilog-auto-star-safe, verilog-delete-auto-star-implicit) (verilog-inst-comment-re): Fix not deleting Interfaced comment - when expanding .* in interfaces, bug320. Reported by Pierre-David - Pfister. + when expanding .* in interfaces, bug320. + Reported by Pierre-David Pfister. (verilog-read-module-name): Fix import statements between module - name and open parenthesis, bug317. Reported by Pierre-David - Pfister. + name and open parenthesis, bug317. + Reported by Pierre-David Pfister. (verilog-simplify-range-expression): Fix simplification of multiplications inside AUTOWIRE connections, bug303. (verilog-auto-inst-port): Support parameter expansion in @@ -1065,8 +1065,7 @@ 2011-11-19 Andreas Schwab - * progmodes/sh-script.el (sh-assignment-regexp): Add entry for - bash. + * progmodes/sh-script.el (sh-assignment-regexp): Add entry for bash. 2011-11-19 Juri Linkov @@ -1191,8 +1190,7 @@ * window.el (window-resize, delete-window, split-window): Replace window-splits by window-combination-resize. - * cus-start.el (window-splits): Replace by - window-combination-resize. + * cus-start.el (window-splits): Replace by window-combination-resize. 2011-11-17 Glenn Morris @@ -1257,8 +1255,7 @@ * window.el (split-window, window-state-get-1) (window-state-put-1, window-state-put-2): Rename occurrences of window-nest to window-combination-limit. - * cus-start.el (window-nest): Rename to - window-combination-limit. + * cus-start.el (window-nest): Rename to window-combination-limit. 2011-11-16 Chong Yidong === modified file 'lisp/minibuffer.el' --- lisp/minibuffer.el 2012-01-05 09:46:05 +0000 +++ lisp/minibuffer.el 2012-01-16 15:50:28 +0000 @@ -571,6 +571,10 @@ (defun completion--replace (beg end newtext) "Replace the buffer text between BEG and END with NEWTEXT. Moves point to the end of the new text." + ;; The properties on `newtext' include things like + ;; completions-first-difference, which we don't want to include + ;; upon insertion. + (set-text-properties 0 (length newtext) nil newtext) ;; Maybe this should be in subr.el. ;; You'd think this is trivial to do, but details matter if you want ;; to keep markers "at the right place" and be robust in the face of ------------------------------------------------------------ revno: 106873 committer: martin rudalics branch nick: trunk timestamp: Mon 2012-01-16 10:34:41 +0100 message: Provide persistent window parameters. * window.c (Vwindow_persistent_parameters): New variable. (Fset_window_configuration, save_window_save): Handle persistent window parameters. * window.el (window-state-ignored-parameters): Remove variable. (window--state-get-1): Rename argument MARKERS to IGNORE. Handle persistent window parameters. Make copy of clone-of parameter only if requested. (Bug#10348) (window--state-put-2): Install a window parameter only if it has a non-nil value or an existing parameter shall be overwritten. * windows.texi (Window Configurations, Window Parameters): Describe persistent window parameters. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-01-09 05:29:45 +0000 +++ doc/lispref/ChangeLog 2012-01-16 09:34:41 +0000 @@ -1,3 +1,8 @@ +2012-01-16 Martin Rudalics + + * windows.texi (Window Configurations, Window Parameters): + Describe persistent window parameters. + 2011-12-27 Stefan Monnier * variables.texi (Creating Buffer-Local): Warn against misuses of === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2012-01-05 09:46:05 +0000 +++ doc/lispref/windows.texi 2012-01-16 09:34:41 +0000 @@ -3104,7 +3104,9 @@ @defun current-window-configuration &optional frame This function returns a new object representing @var{frame}'s current window configuration. The default for @var{frame} is the selected -frame. +frame. This function saves copies of window parameters listed by the +variable @code{window-persistent-parameters}, see @ref{Window +Parameters} for details. @end defun @defun set-window-configuration configuration @@ -3206,24 +3208,30 @@ The objects returned by @code{current-window-configuration} die together with the Emacs process. In order to store a window -configuration on disk and read it back in another Emacs session the -following two functions can be used. +configuration on disk and read it back in another Emacs session, the +functions described next can be used. These functions are also useful +to clone the state of a frame into an arbitrary live window +(@code{set-window-configuration} effectively clones the windows of a +frame into the root window of that very frame only). -@defun window-state-get &optional window markers +@defun window-state-get &optional window ignore This function returns the state of @var{window} as a Lisp object. The argument @var{window} can be any window and defaults to the root window of the selected frame. -The optional argument @var{markers} non-@code{nil} means to use markers -for sampling positions like @code{window-point} or @code{window-start}. -This argument should be non-@code{nil} only if the value is used for -putting the state back in the same session since markers slow down -processing. +If the optional argument @var{ignore} is non-@code{nil}, this means to +not use markers for sampling positions like @code{window-point} or +@code{window-start}. This argument should be non-@code{nil} when the +state shall be written on disk and read back in another session. + +The variable @code{window-persistent-parameters} specifies whether and +which window parameters are saved by this function, see @ref{Window +Parameters} for details. @end defun -The value returned by @code{window-state-get} can be converted by using +The value returned by @code{window-state-get} can be converted, using one of the functions defined by Desktop Save Mode (@pxref{Desktop Save -Mode}) to an object that can be written to a file. Such objects can be +Mode}), to an object that can be written to a file. Such objects can be read back and converted to a Lisp object representing the state of the window. That Lisp object can be used as argument for the following function in order to restore the state window in another window. @@ -3268,6 +3276,51 @@ is the selected window. @end defun +By default, functions saving and restoring window configurations or the +states of windows (@xref{Window Configurations}) do not care about +window parameters. This means, that when you change the value of a +parameter within the body of a @code{save-window-excursion}, the +previous value is not restored upon exit of that macro. It also means +that when you clone via @code{window-state-put} a window state saved +earlier by @code{window-state-get}, the cloned windows come up with no +parameters at all. The following variable allows to override the +standard behavior. + +@defvar window-persistent-parameters +This variable is an alist specifying which parameters get saved by +@code{current-window-configuration} and @code{window-state-get} and +subsequently restored by @code{set-window-configuration} and +@code{window-state-put}, see @ref{Window Configurations}. + +The @sc{car} of each entry of this alist is the symbol specifying the +parameter. The @sc{cdr} must be one of the following: + +@table @asis +@item @code{state} +This value means the parameter is saved by @code{window-state-get} +provided its @var{ignore} argument is @code{nil}. The function +@code{current-window-configuration} does not save this parameter. + +@item @code{nil} +This value specifies that the parameter is saved by +@code{current-window-configuration} and, provided its @var{ignore} +argument is @code{nil}, by @code{window-state-get}. + +@item @code{t} +This means that the parameter is saved unconditionally by both +@code{current-window-configuration} and @code{window-state-get}. This +value should not be used for parameters whose values do not have a read +syntax. Otherwise, invoking @code{window-state-put} in another session +may fail with an @code{invalid-read-syntax} error. +@end table + +Parameters that have been saved are restored to their previous values by +@code{set-window-configuration} respectively are installed by +@code{window-state-put}. Parameters that have not been saved are left +alone by @code{set-window-configuration} respectively are not installed +by @code{window-state-put}. +@end defvar + Some functions, notably @code{delete-window}, @code{delete-other-windows} and @code{split-window} may behave specially when their @var{window} argument has a parameter set. You can override @@ -3287,7 +3340,7 @@ @end defvar The following parameters are currently used by the window management -code. +code: @table @asis @item @code{delete-window} @@ -3309,14 +3362,20 @@ @item @code{no-other-window} This parameter marks the window as not selectable by @code{other-window} (@pxref{Cyclic Window Ordering}). + +@item @code{clone-of} +This parameter specifies the window this one has been cloned from and is +installed by @code{window-state-get}, see @ref{Window Configurations}. + +@item @code{quit-restore} +This parameter tells how to proceed with a window when the buffer it +shows is no more needed. It is installed by the buffer display +functions (@pxref{Choosing Window}) and consulted by the function +@code{quit-window} (@pxref{Quitting Windows}). @end table In addition, the parameters @code{window-atom} and @code{window-side} -are reserved and should not be used by applications. The -@code{quit-restore} parameter tells how to proceed with a window when -the buffer it shows is no more needed. This parameter is installed by -the buffer display functions (@pxref{Choosing Window}) and consulted by -the function @code{quit-window} (@pxref{Quitting Windows}). +are reserved and should not be used by applications. @node Window Hooks === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-01-15 16:03:30 +0000 +++ lisp/ChangeLog 2012-01-16 09:34:41 +0000 @@ -1,3 +1,12 @@ +2012-01-16 Martin Rudalics + + * window.el (window-state-ignored-parameters): Remove variable. + (window--state-get-1): Rename argument MARKERS to IGNORE. + Handle persistent window parameters. Make copy of clone-of + parameter only if requested. (Bug#10348) + (window--state-put-2): Install a window parameter only if it has + a non-nil value or an existing parameter shall be overwritten. + 2012-01-15 Michael Albinus * net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie. === modified file 'lisp/window.el' --- lisp/window.el 2012-01-05 09:46:05 +0000 +++ lisp/window.el 2012-01-16 09:34:41 +0000 @@ -3568,10 +3568,7 @@ )) ;;; Window states, how to get them and how to put them in a window. -(defvar window-state-ignored-parameters '(quit-restore) - "List of window parameters ignored by `window-state-get'.") - -(defun window--state-get-1 (window &optional markers) +(defun window--state-get-1 (window &optional ignore) "Helper function for `window-state-get'." (let* ((type (cond @@ -3589,12 +3586,27 @@ (normal-width . ,(window-normal-size window t)) (combination-limit . ,(window-combination-limit window)) ,@(let (list) - (dolist (parameter (window-parameters window)) - (unless (memq (car parameter) - window-state-ignored-parameters) - (setq list (cons parameter list)))) - (unless (window-parameter window 'clone-of) - ;; Make a clone-of parameter. + ;; Make copies of persistent window parameters whose cdr + ;; is either t or, when IGNORE is non-nil, is either nil + ;; or `state'. + (dolist (pers window-persistent-parameters) + (when (and (consp pers) + (or (eq (cdr pers) t) + (and (memq (cdr pers) '(state nil)) + (not ignore)))) + (let ((par (assq (car pers) (window-parameters window)))) + (setq list (cons (cons (car pers) (when par (cdr par))) + list))))) + ;; Save `clone-of' parameter unless IGNORE or + ;; `window-persistent-parameters' prevail. + (when (and (not (assq 'clone-of (window-parameters window))) + (let ((clone-of + (assq 'clone-of + window-persistent-parameters))) + (when clone-of + (if ignore + (eq (cdr clone-of) t) + (memq (cdr clone-of) '(state nil)))))) (setq list (cons (cons 'clone-of window) list))) (when list `((parameters . ,list)))) @@ -3616,30 +3628,31 @@ (scroll-bars . ,(window-scroll-bars window)) (vscroll . ,(window-vscroll window)) (dedicated . ,(window-dedicated-p window)) - (point . ,(if markers (copy-marker point) point)) - (start . ,(if markers (copy-marker start) start)) + (point . ,(if ignore point (copy-marker point))) + (start . ,(if ignore start (copy-marker start))) ,@(when mark - `((mark . ,(if markers - (copy-marker mark) mark))))))))))) + `((mark . ,(if ignore + mark (copy-marker mark)))))))))))) (tail (when (memq type '(vc hc)) (let (list) (setq window (window-child window)) (while window - (setq list (cons (window--state-get-1 window markers) list)) + (setq list (cons (window--state-get-1 window ignore) list)) (setq window (window-right window))) (nreverse list))))) (append head tail))) -(defun window-state-get (&optional window markers) +(defun window-state-get (&optional window ignore) "Return state of WINDOW as a Lisp object. WINDOW can be any window and defaults to the root window of the selected frame. -Optional argument MARKERS non-nil means use markers for sampling -positions like `window-point' or `window-start'. MARKERS should -be non-nil only if the value is used for putting the state back -in the same session (note that markers slow down processing). +Optional argument IGNORE non-nil means do not use markers for +sampling positions like `window-point' or `window-start' and do +not record parameters unless `window-persistent-parameters' +requests it. IGNORE should be non-nil when the return value +shall be written to a file and read back in another session. The return value can be used as argument for `window-state-put' to put the state recorded here into an arbitrary window. The @@ -3665,7 +3678,7 @@ ;; These are probably not needed. ,@(when (window-size-fixed-p window) `((fixed-height . t))) ,@(when (window-size-fixed-p window t) `((fixed-width . t)))) - (window--state-get-1 window markers))) + (window--state-get-1 window ignore))) (defvar window-state-put-list nil "Helper variable for `window-state-put'.") @@ -3744,10 +3757,15 @@ (state (cdr (assq 'buffer item)))) (when combination-limit (set-window-combination-limit window combination-limit)) - ;; Process parameters. + ;; Assign saved window parameters. If a parameter's value is nil, + ;; don't assign it unless the new window has it set already (which + ;; shouldn't happen unless some `window-configuration-change-hook' + ;; function installed it). (when parameters (dolist (parameter parameters) - (set-window-parameter window (car parameter) (cdr parameter)))) + (when (or (cdr parameter) + (window-parameter window (car parameter))) + (set-window-parameter window (car parameter) (cdr parameter))))) ;; Process buffer related state. (when state ;; We don't want to raise an error here so we create a buffer if === modified file 'src/ChangeLog' --- src/ChangeLog 2012-01-14 20:15:01 +0000 +++ src/ChangeLog 2012-01-16 09:34:41 +0000 @@ -1,3 +1,9 @@ +2012-01-16 Martin Rudalics + + * window.c (Vwindow_persistent_parameters): New variable. + (Fset_window_configuration, save_window_save): Handle persistent + window parameters. + 2012-01-14 Eli Zaretskii * w32fns.c (signal_user_input): Don't do a QUIT, to avoid === modified file 'src/window.c' --- src/window.c 2012-01-05 09:46:05 +0000 +++ src/window.c 2012-01-16 09:34:41 +0000 @@ -57,7 +57,7 @@ static Lisp_Object Qwindow_resize_root_window, Qwindow_resize_root_window_vertically; static Lisp_Object Qscroll_up, Qscroll_down, Qscroll_command; static Lisp_Object Qsafe, Qabove, Qbelow; -static Lisp_Object Qauto_buffer_name; +static Lisp_Object Qauto_buffer_name, Qclone_of, Qstate; static int displayed_window_lines (struct window *); static struct window *decode_window (Lisp_Object); @@ -5410,6 +5410,7 @@ { Lisp_Object window; Lisp_Object dead_windows = Qnil; + register Lisp_Object tem, par, pers; register struct window *w; register struct saved_window *p; struct window *root_window; @@ -5543,7 +5544,28 @@ w->vertical_scroll_bar_type = p->vertical_scroll_bar_type; w->dedicated = p->dedicated; w->combination_limit = p->combination_limit; - w->window_parameters = p->window_parameters; + /* Restore any window parameters that have been saved. + Parameters that have not been saved are left alone. */ + for (tem = p->window_parameters; CONSP (tem); tem = XCDR (tem)) + { + pers = XCAR (tem); + if (CONSP (pers)) + { + if (NILP (XCDR (pers))) + { + par = Fassq (XCAR (pers), w->window_parameters); + if (CONSP (par) && !NILP (XCDR (par))) + /* Reset a parameter to nil if and only if it + has a non-nil association. Don't make new + associations. */ + Fsetcdr (par, Qnil); + } + else + /* Always restore a non-nil value. */ + Fset_window_parameter (window, XCAR (pers), XCDR (pers)); + } + } + XSETFASTINT (w->last_modified, 0); XSETFASTINT (w->last_overlay_modified, 0); @@ -5810,7 +5832,7 @@ { register struct saved_window *p; register struct window *w; - register Lisp_Object tem; + register Lisp_Object tem, pers, par; for (;!NILP (window); window = w->next) { @@ -5838,12 +5860,60 @@ p->vertical_scroll_bar_type = w->vertical_scroll_bar_type; p->dedicated = w->dedicated; p->combination_limit = w->combination_limit; - p->window_parameters = w->window_parameters; + p->window_parameters = Qnil; + + if (!NILP (Vwindow_persistent_parameters)) + { + /* Run cycle detection on Vwindow_persistent_parameters. */ + Lisp_Object tortoise, hare; + + hare = tortoise = Vwindow_persistent_parameters; + while (CONSP (hare)) + { + hare = XCDR (hare); + if (!CONSP (hare)) + break; + + hare = XCDR (hare); + tortoise = XCDR (tortoise); + + if (EQ (hare, tortoise)) + /* Reset Vwindow_persistent_parameters to Qnil. */ + { + Vwindow_persistent_parameters = Qnil; + break; + } + } + + for (tem = Vwindow_persistent_parameters; CONSP (tem); + tem = XCDR (tem)) + { + pers = XCAR (tem); + /* Save values for persistent window parameters whose cdr + is either nil or t. */ + if (CONSP (pers) && (NILP (XCDR (pers)) || EQ (XCDR (pers), Qt))) + { + par = Fassq (XCAR (pers), w->window_parameters); + if (NILP (par)) + /* If the window has no value for the parameter, + make one. */ + p->window_parameters = Fcons (Fcons (XCAR (pers), Qnil), + p->window_parameters); + else + /* If the window has a value for the parameter, + save it. */ + p->window_parameters = Fcons (Fcons (XCAR (par), + XCDR (par)), + p->window_parameters); + } + } + } + if (!NILP (w->buffer)) { - /* Save w's value of point in the window configuration. - If w is the selected window, then get the value of point - from the buffer; pointm is garbage in the selected window. */ + /* Save w's value of point in the window configuration. If w + is the selected window, then get the value of point from + the buffer; pointm is garbage in the selected window. */ if (EQ (window, selected_window)) { p->pointm = Fmake_marker (); @@ -6433,6 +6503,8 @@ DEFSYM (Qabove, "above"); DEFSYM (Qbelow, "below"); DEFSYM (Qauto_buffer_name, "auto-buffer-name"); + DEFSYM (Qclone_of, "clone-of"); + DEFSYM (Qstate, "state"); staticpro (&Vwindow_list); @@ -6542,6 +6614,31 @@ function `set-window-combination-limit'. */); Vwindow_combination_limit = Qnil; + DEFVAR_LISP ("window-persistent-parameters", Vwindow_persistent_parameters, + doc: /* Alist of persistent window parameters. +Parameters in this list are saved by `current-window-configuration' and +`window-state-get' and subsequently restored to their previous values by +`set-window-configuration' and `window-state-put'. + +The car of each entry of this alist is the symbol specifying the +parameter. The cdr is one of the following: + +The symbol `state' means the parameter is saved by `window-state-get' +provided its IGNORE argument is nil. `current-window-configuration' +does not save this parameter. + +nil means the parameter is saved by `current-window-configuration' and, +provided its IGNORE argument is nil, by `window-state-get'. + +t means the parameter is saved unconditionally by both +`current-window-configuration' and `window-state-get'. Parameters +without read syntax (like windows or frames) should not use that. + +Parameters not saved by `current-window-configuration' or +`window-state-get' are left alone by `set-window-configuration' +respectively are not installed by `window-state-put'. */); + Vwindow_persistent_parameters = list1 (Fcons (Qclone_of, Qstate)); + defsubr (&Sselected_window); defsubr (&Sminibuffer_window); defsubr (&Swindow_minibuffer_p); ------------------------------------------------------------ revno: 106872 committer: Michael Albinus branch nick: trunk timestamp: Sun 2012-01-15 17:03:30 +0100 message: * net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2012-01-14 18:16:28 +0000 +++ lisp/ChangeLog 2012-01-15 16:03:30 +0000 @@ -1,3 +1,7 @@ +2012-01-15 Michael Albinus + + * net/tramp-sh.el (tramp-remote-path): Set tramp-autoload cookie. + 2012-01-14 Eli Zaretskii * info.el (Info-toc-build): If the Info file has no "Up" pointer, === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2012-01-05 09:46:05 +0000 +++ lisp/net/tramp-sh.el 2012-01-15 16:03:30 +0000 @@ -512,6 +512,7 @@ ;; GNU/Linux (Debian, Suse): /bin:/usr/bin ;; FreeBSD: /usr/bin:/bin:/usr/sbin:/sbin: - beware trailing ":"! ;; IRIX64: /usr/bin +;;;###tramp-autoload (defcustom tramp-remote-path '(tramp-default-remote-path "/bin" "/usr/bin" "/usr/sbin" "/usr/local/bin" "/local/bin" "/local/freeware/bin" "/local/gnu/bin"