------------------------------------------------------------ revno: 116691 committer: Juanma Barranquero branch nick: trunk timestamp: Fri 2014-03-07 01:01:19 +0100 message: lisp/ChangeLog*: Fix typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-06 13:41:58 +0000 +++ lisp/ChangeLog 2014-03-07 00:01:19 +0000 @@ -34,8 +34,8 @@ 2014-03-05 Martin Rudalics - * window.el (window-min-height, window-min-width): Rewrite - doc-strings. + * window.el (window-min-height, window-min-width): + Rewrite doc-strings. (window-body-size): Add PIXELWISE argument to make it consistent with its callees. @@ -48,8 +48,8 @@ * net/eww.el (eww-mode-map): [tab] doesn't work on tty. (eww-setup-buffer): Clear next/prev/etc more reliably. - (eww-textarea-map): [tab] doesn't work on tty. Reported by Mario - Lang. + (eww-textarea-map): [tab] doesn't work on tty. + Reported by Mario Lang. * net/shr.el (shr-map): Ditto. @@ -219,10 +219,10 @@ 2014-02-28 Martin Rudalics Revert recent with-temp-buffer-window change (Bug#16816, Bug#16882). - * window.el (with-temp-buffer-window): Revert change from - 2014-02-21. Suggested by Thierry Volpiatto. - . Fix doc-string based on a - suggestion by Nicolas Richard . + * window.el (with-temp-buffer-window): Revert change from 2014-02-21. + Suggested by Thierry Volpiatto . + Fix doc-string based on a suggestion by Nicolas Richard + . * help.el (with-help-window): Fix doc-string. 2014-02-28 Ivan Kanis @@ -426,7 +426,7 @@ 2014-02-22 Daniel Colascione - * net/secrets.el (secrets-create-item,secrets-search-items): + * net/secrets.el (secrets-create-item, secrets-search-items): Check that attribute values are strings, avoiding the construction of invalid dbus messages. @@ -5647,7 +5647,7 @@ (ruby-smie-rules): Adjust handling of open-paren, now that it's never followed by implicit semi-colons. Add rule for string concatenation and for indentation at BOB. - (ruby-forward-sexp, ruby-backward-sexp): Adjust for when smie is in use. + (ruby-forward-sexp, ruby-backward-sexp): Adjust for when SMIE is in use. * emacs-lisp/smie.el (smie-next-sexp): Don't go back to pos before calling next-sexp, since next-token may have skipped chars which @@ -10634,7 +10634,7 @@ * eshell/em-term.el (eshell-visual-command-p): New function. (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. - * eshell/em-dirs.el (eshell-dirs-initialise): + * eshell/em-dirs.el (eshell-dirs-initialize): * eshell/em-script.el (eshell-script-initialize): Add missing #' to lambda. @@ -10776,7 +10776,7 @@ 2013-06-05 Leo Liu - Re-implement smie matching block highlight using + Re-implement SMIE matching block highlight using show-paren-data-function. (Bug#14395) * emacs-lisp/smie.el (smie-matching-block-highlight) (smie--highlight-matching-block-overlay) @@ -12936,9 +12936,9 @@ 2013-04-19 Masatake YAMATO * progmodes/sh-script.el (sh-imenu-generic-expression): - Handle function names with a single character. (Bug#14111) + Handle function names with a single character. (Bug#14111) -2013-04-19 Dima Kogan (tiny change) +2013-04-19 Dima Kogan (tiny change) * progmodes/gud.el (gud-perldb-marker-filter): Understand position info for subroutines defined in an eval (bug#14182). === modified file 'lisp/ChangeLog.15' --- lisp/ChangeLog.15 2014-01-21 08:49:46 +0000 +++ lisp/ChangeLog.15 2014-03-07 00:01:19 +0000 @@ -12151,7 +12151,7 @@ (version-list-not-zero, version<, version<=, version=): Doc fix. (Bug#5744). -2010-02-31 Dan Nicolaescu +2010-03-31 Dan Nicolaescu * vc.el (vc-root-diff): Doc fix. ------------------------------------------------------------ revno: 116690 committer: martin rudalics branch nick: trunk timestamp: Thu 2014-03-06 14:41:58 +0100 message: More window code related fixes and documentation changes. * window.c (Fother_window_for_scrolling): Check that Vother_window_scroll_buffer is a buffer. * window.el (fit-frame-to-buffer, fit-frame-to-buffer-margins): Fix doc-strings. (fit-frame-to-buffer): New argument ONLY. Remove dependency on fit-frame-to-buffer variable. Fix doc-string. (fit-window-to-buffer): Set ONLY argument in call of fit-frame-to-buffer. Fix doc-string. * frames.texi (Size and Position): Rewrite entries for `fit-frame-to-buffer' and `fit-frame-to-buffer-margins'. Add description for `fit-frame-to-buffer-sizes'. * windows.texi (Resizing Windows): Add descriptions for pixelwise resizing. Add entries for `window-resize-pixelwise' and `fit-window-to-buffer-horizontally'. Rewrite `fit-window-to-buffer' entry. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-03-06 12:39:47 +0000 +++ doc/lispref/ChangeLog 2014-03-06 13:41:58 +0000 @@ -1,3 +1,13 @@ +2014-03-06 Martin Rudalics + + * frames.texi (Size and Position): Rewrite entries for + `fit-frame-to-buffer' and `fit-frame-to-buffer-margins'. Add + description for `fit-frame-to-buffer-sizes'. + * windows.texi (Resizing Windows): Add descriptions for + pixelwise resizing. Add entries for `window-resize-pixelwise' + and `fit-window-to-buffer-horizontally'. Rewrite + `fit-window-to-buffer' entry. + 2014-03-06 Xue Fuqiao * internals.texi (Window Internals): Remove field `region_showing'. === modified file 'doc/lispref/frames.texi' --- doc/lispref/frames.texi 2014-03-05 13:50:48 +0000 +++ doc/lispref/frames.texi 2014-03-06 13:41:58 +0000 @@ -1180,19 +1180,48 @@ @c FIXME? Belongs more in Emacs manual than here? @c But, e.g., fit-window-to-buffer is in this manual. -@deffn Command fit-frame-to-buffer &optional frame max-height min-height -This command adjusts the height of @var{frame} (the default is the -selected frame) to fit its contents. The optional arguments -@var{max-height} and @var{min-height} specify the maximum and minimum -new frame heights, respectively. - -@vindex fit-frame-to-buffer-bottom-margin -The default minimum height corresponds to @code{window-min-height}. -The default maximum height is the screen height below the current top -position of the frame, minus any margin specified by the option -@code{fit-frame-to-buffer-bottom-margin}. +If you have a frame that displays only one window, you can fit that +frame to its buffer using the command @code{fit-frame-to-buffer}. + +@deffn Command fit-frame-to-buffer &optional frame max-height min-height max-width min-width only +This command adjusts the size of @var{frame} to display the contents of +its buffer exactly. @var{frame} can be any live frame and defaults to +the selected one. Fitting is done only if @var{frame}'s root window is +live. The arguments @var{max-height}, @var{min-height}, @var{max-width} +and @var{min-width} specify bounds on the new total size of +@var{frame}'s root window. @var{min-height} and @var{min-width} default +to the values of @code{window-min-height} and @code{window-min-width} +respectively. + +If the optional argument @var{only} is @code{vertically}, this function +may resize the frame vertically only. If @var{only} is +@code{horizontally}, it may resize the frame horizontally only. @end deffn +The behavior of @code{fit-frame-to-buffer} can be controlled with the +help of the two options listed next. + +@defopt fit-frame-to-buffer-margins +This option can be used to specify margins around frames to be fit by +@code{fit-frame-to-buffer}. Such margins can be useful to avoid, for +example, that such frames overlap the taskbar. + +It specifies the numbers of pixels to be left free on the left, above, +the right, and below a frame that shall be fit. The default specifies +@code{nil} for each which means to use no margins. The value specified +here can be overridden for a specific frame by that frame's +@code{fit-frame-to-buffer-margins} parameter, if present. +@end defopt + +@defopt fit-frame-to-buffer-sizes +This option specifies size boundaries for @code{fit-frame-to-buffer}. +It specifies the total maximum and minimum lines and maximum and minimum +columns of the root window of any frame that shall be fit to its buffer. +If any of these values is non-@code{nil}, it overrides the corresponding +argument of @code{fit-frame-to-buffer}. +@end defopt + + @node Geometry @subsection Geometry === modified file 'doc/lispref/windows.texi' --- doc/lispref/windows.texi 2014-03-05 13:50:48 +0000 +++ doc/lispref/windows.texi 2014-03-06 13:41:58 +0000 @@ -691,10 +691,9 @@ that the window cannot be resized. Normally, the variables @code{window-min-height} and -@code{window-min-width} specify the smallest allowable window size. -@xref{Change Window,, Deleting and Rearranging Windows, emacs, The GNU -Emacs Manual}. However, if the optional argument @var{ignore} is -non-@code{nil}, this function ignores @code{window-min-height} and +@code{window-min-width} specify the smallest allowable window size +(@pxref{Window Sizes}). However, if the optional argument @var{ignore} +is non-@code{nil}, this function ignores @code{window-min-height} and @code{window-min-width}, as well as @code{window-size-fixed}. Instead, it considers the minimum-height window to be one consisting of a header, a mode line and a bottom divider (if any), plus a text area one line @@ -755,44 +754,74 @@ @cindex pixelwise, resizing windows @defopt window-resize-pixelwise -If the value of this user option is non-@code{nil}, window resizing -operations will be pixelwise. This currently affects the following -functions: @code{split-window}, @code{maximize-window}, -@code{minimize-window}, @code{fit-window-to-buffer} and -@code{fit-frame-to-buffer}, and all functions that symmetrically -resize a parent window. +If the value of this option is non-@code{nil}, windows are resized in +units of pixels. This currently affects functions like +@code{split-window} (@pxref{Splitting Windows}), @code{maximize-window}, +@code{minimize-window}, @code{fit-window-to-buffer}, +@code{shrink-window-if-larger-than-buffer} (all listed below) and +@code{fit-frame-to-buffer} (@pxref{Size and Position}). Note that when a frame's pixel size is not a multiple of the frame's character size, at least one window may get resized pixelwise even if -this option is nil. The default value of this user option is +this option is @code{nil}. The default value of this option is @code{nil}. @end defopt The following commands resize windows in more specific ways. When called interactively, they act on the selected window. -@deffn Command fit-window-to-buffer &optional window max-height min-height override -This command adjusts the height of @var{window} to fit the text in it. -It returns non-@code{nil} if it was able to resize @var{window}, and -@code{nil} otherwise. If @var{window} is omitted or @code{nil}, it -defaults to the selected window. Otherwise, it should be a live -window. - -The optional argument @var{max-height}, if non-@code{nil}, specifies -the maximum total height that this function can give @var{window}. -The optional argument @var{min-height}, if non-@code{nil}, specifies -the minimum total height that it can give, which overrides the -variable @code{window-min-height}. - -If the optional argument @var{override} is non-@code{nil}, this -function ignores any size restrictions imposed by -@code{window-min-height} and @code{window-min-width}. - -@vindex fit-frame-to-buffer -If the option @code{fit-frame-to-buffer} is non-@code{nil}, this -command may resize the frame to fit its contents. +@deffn Command fit-window-to-buffer &optional window max-height min-height max-width min-width +This command adjusts the height or width of @var{window} to fit the text +in it. It returns non-@code{nil} if it was able to resize @var{window}, +and @code{nil} otherwise. If @var{window} is omitted or @code{nil}, it +defaults to the selected window. Otherwise, it should be a live window. + +If @var{window} is part of a vertical combination, this function adjusts +@var{window}'s height. The new height is calculated from the actual +height of the accessible portion of its buffer. The optional argument +@var{max-height}, if non-@code{nil}, specifies the maximum total height +that this function can give @var{window}. The optional argument +@var{min-height}, if non-@code{nil}, specifies the minimum total height +that it can give, which overrides the variable @code{window-min-height}. +Both @var{max-height} and @var{min-height} are specified in lines and +include mode and header line and a bottom divider, if any. + +If @var{window} is part of a horizontal combination and the value of the +option @code{fit-window-to-buffer-horizontally} (see below) is +non-@code{nil}, this function adjusts @var{window}'s height. The new +width of @var{window} is calculated from the maximum length of its +buffer's lines that follow the current start position of @var{window}. +The optional argument @var{max-width} specifies a maximum width and +defaults to the width of @var{window}'s frame. The optional argument +@var{min-width} specifies a minimum width and defaults to +@code{window-min-width}. Both @var{max-width} and @var{min-width} are +specified in columns and include fringes, margins and scrollbars, if +any. + +If the option @code{fit-frame-to-buffer} (see below) is non-@code{nil}, +this function will try to resize the frame of @var{window} to fit its +contents by calling @code{fit-frame-to-buffer} (@pxref{Size and +Position}). @end deffn +@defopt fit-window-to-buffer-horizontally +If this is non-@code{nil}, @code{fit-window-to-buffer} can resize +windows horizontally. If this is @code{nil} (the default) +@code{fit-window-to-buffer} never resizes windows horizontally. If this +is @code{only}, it can resize windows horizontally only. Any other +value means @code{fit-window-to-buffer} can resize windows in both +dimensions. +@end defopt + +@defopt fit-frame-to-buffer +If this option is non-@code{nil}, @code{fit-window-to-buffer} can fit a +frame to its buffer. A frame is fit if and only if its root window is a +live window and this option is non-@code{nil}. If this is +@code{horizontally}, frames are fit horizontally only. If this is +@code{vertically}, frames are fit vertically only. Any other +non-@code{nil} value means frames can be resized in both dimensions. +@end defopt + @deffn Command shrink-window-if-larger-than-buffer &optional window This command attempts to reduce @var{window}'s height as much as possible while still showing its full buffer, but no less than @@ -804,8 +833,12 @@ This command does nothing if the window is already too short to display all of its buffer, or if any of the buffer is scrolled off-screen, or if the window is the only live window in its frame. + +This command calls @code{fit-window-to-buffer} (see above) to do its +work. @end deffn + @cindex balancing window sizes @deffn Command balance-windows &optional window-or-frame This function balances windows in a way that gives more space to === modified file 'etc/NEWS' --- etc/NEWS 2014-03-06 04:11:08 +0000 +++ etc/NEWS 2014-03-06 13:41:58 +0000 @@ -226,6 +226,11 @@ window sizes now have an additional argument that allows changes to apply, or values to be returned, in pixels instead of lines/columns. ++++ +*** The functions `window-body-height' and `window-body-width' now never +count partially visible lines or columns if called with a nil PIXELWISE +argument. + *** Emacs can now draw dividers between adjacent windows. To put dividers between side-by-side/vertically stacked windows customize the frame parameters `right-divider-width' and `bottom-divider-width' to @@ -246,14 +251,13 @@ `fit-frame-to-buffer' and `fit-window-to-buffer' to accurately fit a window to its buffer as it will be displayed. -*** `fit-window-to-buffer' can now resize windows horizontally. +*** `fit-window-to-buffer' can now resize windows in both dimensions. This behavior is controlled by the new option -`fit-window-to-buffer-horizontally'. +`fit-window-to-buffer-horizontally'. The new option +`fit-frame-to-buffer' allows to fit the window's frame to its buffer. -*** `fit-frame-to-buffer' can now fit frames in both directions. -This behavior is controlled by the option `fit-frame-to-buffer' which -tells in which direction(s) the frame shall be fit. The new options -`fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes' allow to +*** `fit-frame-to-buffer' now fits frames in both dimensions. The new +options `fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes' control the size of the frame and its position on screen. *** Temp Buffer Resize Mode can now adjust height and width of windows === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-06 13:23:04 +0000 +++ lisp/ChangeLog 2014-03-06 13:41:58 +0000 @@ -1,3 +1,12 @@ +2014-03-06 Martin Rudalics + + * window.el (fit-frame-to-buffer, fit-frame-to-buffer-margins): + Fix doc-strings. + (fit-frame-to-buffer): New argument ONLY. Remove dependency on + fit-frame-to-buffer variable. Fix doc-string. + (fit-window-to-buffer): Set ONLY argument in call of + fit-frame-to-buffer. Fix doc-string. + 2014-03-06 Michael Albinus * net/tramp.el (tramp-error): VEC-OR-PROC can be nil. === modified file 'lisp/window.el' --- lisp/window.el 2014-03-05 13:50:48 +0000 +++ lisp/window.el 2014-03-06 13:41:58 +0000 @@ -6813,34 +6813,27 @@ ;; `fit-frame-to-buffer' eventually wants to know the real frame sizes ;; counting title bar and outer borders. (defcustom fit-frame-to-buffer nil - "Non-nil means `fit-frame-to-buffer' can fit a frame to its buffer. + "Non-nil means `fit-window-to-buffer' can fit a frame to its buffer. A frame is fit if and only if its root window is a live window and this option is non-nil. If this is `horizontally', frames are resized horizontally only. If this is `vertically', frames are resized vertically only. Any other non-nil value means -frames can be resized in both dimensions. See also -`fit-frame-to-buffer-margins' and `fit-frame-to-buffer-sizes'. - -If this is non-nil and a window is the only window of its frame, -`fit-window-to-buffer' will invoke `fit-frame-to-buffer' to fit -the frame to its buffer." +frames can be resized in both dimensions." :type 'boolean :version "24.4" :group 'help) (defcustom fit-frame-to-buffer-margins '(nil nil nil nil) "Margins around frame for `fit-frame-to-buffer'. -This list specifies the numbers of pixels to be left free on the -left, above, the right, and below a frame that shall be fit to -its buffer. The value specified here can be overridden for a -specific frame by that frame's `fit-frame-to-buffer-margins' -parameter, if present. - -This variable controls how fitting a frame to the size of its -buffer coordinates with the size of your display. If you don't -specify a value here, the size of the display's workarea is used. - -See also `fit-frame-to-buffer-sizes'." +This option allows to specify the numbers of pixels to be left +free on the left, above, the right, and below a frame that shall +be fit to its buffer. Set these to avoid that such a frame +obscurs other desktop objects like the taskbar. The default is +nil for each side which means to not add any margins. + +The value specified here can be overridden for a specific frame +by that frame's `fit-frame-to-buffer-margins' parameter, if +present. See also `fit-frame-to-buffer-sizes'." :version "24.4" :type '(list (choice @@ -6917,7 +6910,7 @@ (<= left (- right margin)) (<= margin right)) margin)) -(defun fit-frame-to-buffer (&optional frame max-height min-height max-width min-width) +(defun fit-frame-to-buffer (&optional frame max-height min-height max-width min-width only) "Adjust size of FRAME to display the contents of its buffer exactly. FRAME can be any live frame and defaults to the selected one. Fit only if FRAME's root window is live. MAX-HEIGHT, MIN-HEIGHT, @@ -6925,9 +6918,12 @@ FRAME's root window. MIN-HEIGHT and MIN-WIDTH default to the values of `window-min-height' and `window-min-width' respectively. -The option `fit-frame-to-buffer' controls whether this function -has any effect. New position and size of FRAME are additionally -determined by the options `fit-frame-to-buffer-sizes' and +If the optional argument ONLY is `vertically', resize the frame +vertically only. If ONLY is `horizontally', resize the frame +horizontally only. + +The new position and size of FRAME can be additionally determined +by customizing the options `fit-frame-to-buffer-sizes' and `fit-frame-to-buffer-margins' or the corresponding parameters of FRAME." (interactive) @@ -6936,13 +6932,7 @@ (fboundp 'display-monitor-attributes-list)) (user-error "Cannot resize frame in non-graphic Emacs")) (setq frame (window-normalize-frame frame)) - (when (and (window-live-p (frame-root-window frame)) - fit-frame-to-buffer - (or (not window-size-fixed) - (and (eq window-size-fixed 'height) - (not (eq fit-frame-to-buffer 'vertically))) - (and (eq window-size-fixed 'width) - (not (eq fit-frame-to-buffer 'horizontally))))) + (when (window-live-p (frame-root-window frame)) (with-selected-window (frame-root-window frame) (let* ((window (frame-root-window frame)) (char-width (frame-char-width)) @@ -7069,11 +7059,11 @@ (width (+ (car value) (window-right-divider-width))) (height (+ (cdr value) (window-bottom-divider-width)))) ;; Don't change height or width when the window's size is fixed - ;; in either direction. + ;; in either direction or ONLY forbids it. (cond - ((eq window-size-fixed 'width) + ((or (eq window-size-fixed 'width) (eq only 'vertically)) (setq width nil)) - ((eq window-size-fixed 'height) + ((or (eq window-size-fixed 'height) (eq only 'horizontally)) (setq height nil))) ;; Fit width to constraints. (when width @@ -7141,13 +7131,13 @@ WINDOW must be a live window and defaults to the selected one. If WINDOW is part of a vertical combination, adjust WINDOW's -height. The new height is calculated from the number of lines of +height. The new height is calculated from the actual height of the accessible portion of its buffer. The optional argument MAX-HEIGHT specifies a maximum height and defaults to the height of WINDOW's frame. The optional argument MIN-HEIGHT specifies a minimum height and defaults to `window-min-height'. Both -MAX-HEIGHT and MIN-HEIGHT are specified in lines and include the -mode line and header line, if any. +MAX-HEIGHT and MIN-HEIGHT are specified in lines and include mode +and header line and a bottom divider, if any. If WINDOW is part of a horizontal combination and the value of the option `fit-window-to-buffer-horizontally' is non-nil, adjust @@ -7157,11 +7147,11 @@ specifies a maximum width and defaults to the width of WINDOW's frame. The optional argument MIN-WIDTH specifies a minimum width and defaults to `window-min-width'. Both MAX-WIDTH and MIN-WIDTH -are specified in columns and include fringes, margins and -scrollbars, if any. +are specified in columns and include fringes, margins, a +scrollbar and a vertical divider, if any. Fit pixelwise if the option `window-resize-pixelwise' is non-nil. -If WINDOW is its frame's root window, then if the option +If WINDOW is its frame's root window and the option `fit-frame-to-buffer' is non-nil, call `fit-frame-to-buffer' to adjust the frame's size. @@ -7177,7 +7167,9 @@ ;; Fit WINDOW's frame to buffer. (fit-frame-to-buffer (window-frame window) - max-height min-height max-width min-width)) + max-height min-height max-width min-width + (and (memq fit-frame-to-buffer '(vertically horizontally)) + fit-frame-to-buffer))) (with-selected-window window (let* ((pixelwise window-resize-pixelwise) (char-height (frame-char-height)) === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-06 11:18:22 +0000 +++ src/ChangeLog 2014-03-06 13:41:58 +0000 @@ -1,3 +1,8 @@ +2014-03-06 Martin Rudalics + + * window.c (Fother_window_for_scrolling): Check that + Vother_window_scroll_buffer is a buffer. + 2014-03-06 Dmitry Antipov * xterm.c (xim_initialize): Always pass a copy of resource name === modified file 'src/window.c' --- src/window.c 2014-03-05 13:50:48 +0000 +++ src/window.c 2014-03-06 13:41:58 +0000 @@ -5431,6 +5431,7 @@ window = Vminibuf_scroll_window; /* If buffer is specified and live, scroll that buffer. */ else if (!NILP (Vother_window_scroll_buffer) + && BUFFERP (Vother_window_scroll_buffer) && BUFFER_LIVE_P (XBUFFER (Vother_window_scroll_buffer))) { window = Fget_buffer_window (Vother_window_scroll_buffer, Qnil); ------------------------------------------------------------ revno: 116689 committer: Michael Albinus branch nick: trunk timestamp: Thu 2014-03-06 14:23:04 +0100 message: * net/tramp.el (tramp-error): VEC-OR-PROC can be nil. (tramp-action-password): Clear password cache if needed. (tramp-read-passwd): Do not clear password cache. * net/tramp-gvfs.el (tramp-gvfs-handler-askpassword): Clear password cache unless it is the first password request. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-06 04:11:08 +0000 +++ lisp/ChangeLog 2014-03-06 13:23:04 +0000 @@ -1,3 +1,12 @@ +2014-03-06 Michael Albinus + + * net/tramp.el (tramp-error): VEC-OR-PROC can be nil. + (tramp-action-password): Clear password cache if needed. + (tramp-read-passwd): Do not clear password cache. + + * net/tramp-gvfs.el (tramp-gvfs-handler-askpassword): Clear password + cache unless it is the first password request. + 2014-03-06 Glenn Morris * simple.el (newline): Doc tweak. === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2014-02-20 14:24:13 +0000 +++ lisp/net/tramp-gvfs.el 2014-03-06 13:23:04 +0000 @@ -1180,10 +1180,14 @@ (zerop (logand flags tramp-gvfs-password-need-username)))) (setq user (read-string "User name: "))) (when (and (zerop (length domain)) - (not (zerop (logand flags tramp-gvfs-password-need-domain)))) + (not + (zerop (logand flags tramp-gvfs-password-need-domain)))) (setq domain (read-string "Domain name: "))) (tramp-message l 6 "%S %S %S %d" message user domain flags) + (unless (tramp-get-connection-property l "first-password-request" nil) + (tramp-clear-passwd l)) + (setq tramp-current-method l-method tramp-current-user user tramp-current-host l-host @@ -1474,7 +1478,7 @@ (format "Opening connection for %s using %s" host method) (format "Opening connection for %s@%s using %s" user host method)) - ;; Enable auth-source and password-cache. + ;; Enable `auth-source'. (tramp-set-connection-property vec "first-password-request" t) ;; There will be a callback of "askPassword" when a password is === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2014-02-27 11:59:04 +0000 +++ lisp/net/tramp.el 2014-03-06 13:23:04 +0000 @@ -1560,12 +1560,13 @@ `tramp-message'. Finally, signal SIGNAL is raised." (let (tramp-message-show-message) (tramp-backtrace vec-or-proc) - (tramp-message - vec-or-proc 1 "%s" - (error-message-string - (list signal - (get signal 'error-message) - (apply 'format fmt-string arguments)))) + (when vec-or-proc + (tramp-message + vec-or-proc 1 "%s" + (error-message-string + (list signal + (get signal 'error-message) + (apply 'format fmt-string arguments))))) (signal signal (list (apply 'format fmt-string arguments))))) (defsubst tramp-error-with-buffer @@ -3400,6 +3401,12 @@ (with-current-buffer (process-buffer proc) (let ((enable-recursive-minibuffers t) (case-fold-search t)) + ;; Let's check whether a wrong password has been sent already. + ;; Sometimes, the process returns a new password request + ;; immediately after rejecting the previous (wrong) one. + (goto-char (point-min)) + (when (search-forward-regexp tramp-wrong-passwd-regexp nil t) + (tramp-clear-passwd vec)) (tramp-check-for-regexp proc tramp-password-prompt-regexp) (tramp-message vec 3 "Sending %s" (match-string 1)) ;; We don't call `tramp-send-string' in order to hide the @@ -3508,8 +3515,8 @@ PROC and VEC indicate the remote connection to be used. POS, if set, is the starting point of the region to be deleted in the connection buffer." - ;; Enable `auth-source' and `password-cache'. We must use - ;; tramp-current-* variables in case we have several hops. + ;; Enable `auth-source'. We must use tramp-current-* variables in + ;; case we have several hops. (tramp-set-connection-property (tramp-dissect-file-name (tramp-make-tramp-file-name @@ -4131,9 +4138,6 @@ "password" tramp-current-host tramp-current-method))) ;; Try the password cache. (when (functionp 'password-read) - (unless (tramp-get-connection-property - v "first-password-request" nil) - (tramp-compat-funcall 'password-cache-remove key)) (let ((password (tramp-compat-funcall 'password-read pw-prompt key))) (tramp-compat-funcall 'password-cache-add key password) ------------------------------------------------------------ revno: 116688 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2014-03-06 20:39:47 +0800 message: Doc fix. * doc/lispref/internals.texi (Window Internals): Remove field `region_showing'. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-03-06 02:10:33 +0000 +++ doc/lispref/ChangeLog 2014-03-06 12:39:47 +0000 @@ -1,3 +1,7 @@ +2014-03-06 Xue Fuqiao + + * internals.texi (Window Internals): Remove field `region_showing'. + 2014-03-06 Glenn Morris * searching.texi (Replacing Match): === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2014-03-06 10:53:26 +0000 +++ doc/lispref/internals.texi 2014-03-06 12:39:47 +0000 @@ -1439,11 +1439,6 @@ @code{nil} meaning none is known. If it is a buffer, don't display the line number as long as the window shows that buffer. -@item region_showing -If the region (or part of it) is highlighted in this window, this field -holds the mark position that made one end of that region. Otherwise, -this field is @code{nil}. - @item column_number_displayed The column number currently displayed in this window's mode line, or @code{nil} if column numbers are not being displayed. ------------------------------------------------------------ revno: 116687 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-03-06 15:18:22 +0400 message: * xterm.c (xim_initialize): Always pass a copy of resource name to XRegisterIMInstantiateCallback and eassert whether return value is True. Passing copy is important because Xlib doesn't make its own copy and resource name argument usually points to SSDATA (Vx_resource_name), which may be changed from Lisp. (xim_close_display): For XUnregisterIMInstantiateCallback, always eassert return value and pass exactly the same values as were used for XRegisterIMInstantiateCallback. Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib sources to check why if you are interested. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-03-05 13:50:48 +0000 +++ src/ChangeLog 2014-03-06 11:18:22 +0000 @@ -1,3 +1,16 @@ +2014-03-06 Dmitry Antipov + + * xterm.c (xim_initialize): Always pass a copy of resource name + to XRegisterIMInstantiateCallback and eassert whether return + value is True. Passing copy is important because Xlib doesn't + make its own copy and resource name argument usually points to + SSDATA (Vx_resource_name), which may be changed from Lisp. + (xim_close_display): For XUnregisterIMInstantiateCallback, + always eassert return value and pass exactly the same values + as were used for XRegisterIMInstantiateCallback. Otherwise + XUnregisterIMInstantiateCallback will always fail. See Xlib + sources to check why if you are interested. + 2014-03-05 Martin Rudalics * dispnew.c (change_frame_size_1): Add new_lines instead of === modified file 'src/xterm.c' --- src/xterm.c 2014-03-04 11:02:36 +0000 +++ src/xterm.c 2014-03-06 11:18:22 +0000 @@ -7955,17 +7955,18 @@ { #ifdef HAVE_X11R6_XIM struct xim_inst_t *xim_inst = xmalloc (sizeof *xim_inst); + Bool ret; dpyinfo->xim_callback_data = xim_inst; xim_inst->dpyinfo = dpyinfo; xim_inst->resource_name = xstrdup (resource_name); - XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb, - resource_name, emacs_class, - xim_instantiate_callback, - /* This is XPointer in XFree86 - but (XPointer *) on Tru64, at - least, hence the configure test. */ - (XRegisterIMInstantiateCallback_arg6) xim_inst); + ret = XRegisterIMInstantiateCallback + (dpyinfo->display, dpyinfo->xrdb, xim_inst->resource_name, + emacs_class, xim_instantiate_callback, + /* This is XPointer in XFree86 but (XPointer *) + on Tru64, at least, hence the configure test. */ + (XRegisterIMInstantiateCallback_arg6) xim_inst); + eassert (ret == True); #else /* not HAVE_X11R6_XIM */ xim_open_dpy (dpyinfo, resource_name); #endif /* not HAVE_X11R6_XIM */ @@ -7983,12 +7984,18 @@ if (use_xim) { #ifdef HAVE_X11R6_XIM + struct xim_inst_t *xim_inst = dpyinfo->xim_callback_data; + if (dpyinfo->display) - XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->xrdb, - NULL, emacs_class, - xim_instantiate_callback, NULL); - xfree (dpyinfo->xim_callback_data->resource_name); - xfree (dpyinfo->xim_callback_data); + { + Bool ret = XUnregisterIMInstantiateCallback + (dpyinfo->display, dpyinfo->xrdb, xim_inst->resource_name, + emacs_class, xim_instantiate_callback, + (XRegisterIMInstantiateCallback_arg6) xim_inst); + eassert (ret == True); + } + xfree (xim_inst->resource_name); + xfree (xim_inst); #endif /* HAVE_X11R6_XIM */ if (dpyinfo->display) XCloseIM (dpyinfo->xim); ------------------------------------------------------------ revno: 116686 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2014-03-06 12:12:25 +0100 message: etc/tutorials/TUTORIAL.es: Adapt to change in English language tutorial. diff: === modified file 'etc/ChangeLog' --- etc/ChangeLog 2014-03-06 01:59:47 +0000 +++ etc/ChangeLog 2014-03-06 11:12:25 +0000 @@ -1,3 +1,7 @@ +2014-03-06 Juanma Barranquero + + * tutorials/TUTORIAL.es: Adapt to change in English language tutorial. + 2014-03-06 Glenn Morris * tutorials/TUTORIAL: Mention electric behavior of RET. === modified file 'etc/tutorials/TUTORIAL.es' --- etc/tutorials/TUTORIAL.es 2014-01-01 07:43:34 +0000 +++ etc/tutorials/TUTORIAL.es 2014-03-06 11:12:25 +0000 @@ -332,7 +332,7 @@ flechas curvas en las estrechas franjas vacías (los "márgenes" derecho e izquierdo) a cada lado del área de texto, para indicar que la línea continúa. Si está utilizando una terminal, la continuación se señala -mediante una barra invertida ("\") en la última columna de la derecha. +mediante una barra invertida (`\') en la última columna de la derecha. >> Inserte texto hasta que llegue al margen derecho, y siga insertando. Verá aparecer una línea de continuación. @@ -351,6 +351,20 @@ >> Teclee para reinsertar la nueva línea que borró. +La tecla es especial, porque, aparte de insertar un carácter +de nueva línea, puede tener otros efectos. En función del texto +circundante, puede además insertar espacio en blanco tras el carácter +de fin de línea, de forma que, al seguir tecleando en la línea recién +creada, el texto que tecleamos quede alineado con el de la línea +anterior. Este comportamiento (que la pulsación de una tecla no solo +inserte el carácter correspondiente) se denomina "eléctrico". + +>> Veamos un ejemplo de comportamiento "eléctrico" de + Teclee al final de esta línea. + +Fíjese que, tras insertar el carácter de nueva línea, Emacs inserta +también espacios para que el cursor se sitúe bajo la "T" de "Teclee". + Recuerde que a la mayoría de los comandos de Emacs se les puede dar un factor de repetición; esto incluye los caracteres de texto. Repetir un carácter de texto lo inserta varias veces. ------------------------------------------------------------ revno: 116685 committer: Xue Fuqiao branch nick: trunk timestamp: Thu 2014-03-06 18:53:26 +0800 message: Comment diff: === modified file 'doc/lispref/internals.texi' --- doc/lispref/internals.texi 2014-02-21 08:04:15 +0000 +++ doc/lispref/internals.texi 2014-03-06 10:53:26 +0000 @@ -1266,6 +1266,8 @@ no access to the parent windows; they operate on the windows at the leaves of the tree, which actually display buffers. +@c FIXME: These two slots and the `buffer' slot below were replaced +@c with a single slot `contents' on 2013-03-28. --xfq @item hchild @itemx vchild These fields contain the window's leftmost child and its topmost child ------------------------------------------------------------ revno: 116684 committer: Glenn Morris branch nick: trunk timestamp: Wed 2014-03-05 20:11:08 -0800 message: * lisp/simple.el (newline): Doc tweak. * etc/NEWS: Related edit. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-03-05 17:14:48 +0000 +++ etc/NEWS 2014-03-06 04:11:08 +0000 @@ -351,6 +351,10 @@ ** Indentation changes +*** `electric-indent-mode' is now enabled by default. +E.g., typing RET reindents the current line and indents the new line. +`C-j' inserts a newline but does not indent. + +++ *** The behavior of `C-x TAB' (`indent-rigidly') has changed. When invoked without a prefix argument, it now activates a transient @@ -358,8 +362,6 @@ the text indentation in the region. Typing any other key resumes normal editing behavior. -*** `electric-indent-mode' is enabled by default. - +++ *** `tab-stop-list' is now implicitly extended to infinity by repeating the last step. Its default value is changed to nil, which means a tab === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-03-06 02:01:02 +0000 +++ lisp/ChangeLog 2014-03-06 04:11:08 +0000 @@ -1,5 +1,7 @@ 2014-03-06 Glenn Morris + * simple.el (newline): Doc tweak. + * emacs-lisp/shadow.el (load-path-shadows-find): Ignore dir-locals. (Bug#12357) === modified file 'lisp/simple.el' --- lisp/simple.el 2014-03-04 03:14:11 +0000 +++ lisp/simple.el 2014-03-06 04:11:08 +0000 @@ -383,8 +383,9 @@ text-property `hard'. With ARG, insert that many newlines. -To turn off indentation by this command, disable Electric Indent mode -\(see \\[electric-indent-mode]). +If `electric-indent-mode' is enabled, this indents the final new line +that it adds, and reindents the preceding line. To just insert +a newline, use \\[electric-indent-just-newline]. Calls `auto-fill-function' if the current column number is greater than the value of `fill-column' and ARG is nil.