Merge from origin/emacs-26

ebe065f Prevent errant scroll on mouse click (Bug#31546)
ffd2018 Minor documentation fix
cf4dc95 * lisp/window.el (window-toggle-side-windows): Doc fix.  (Bug...
This commit is contained in:
Glenn Morris 2018-06-18 12:14:26 -07:00
commit 988b53ed2d
4 changed files with 17 additions and 10 deletions

View file

@ -3730,6 +3730,7 @@ argument @var{window}, then returns its result.
@end defun
@cindex window end position
@cindex last visible position in a window
@defun window-end &optional window update
This function returns the position where display of its buffer ends in
@var{window}. The default for @var{window} is the selected window.
@ -3752,7 +3753,8 @@ Even if @var{update} is non-@code{nil}, @code{window-end} does not
attempt to scroll the display if point has moved off the screen, the
way real redisplay would do. It does not alter the
@code{window-start} value. In effect, it reports where the displayed
text will end if scrolling is not required.
text will end if scrolling is not required. Note that the position it
returns might be only partially visible.
@end defun
@vindex window-group-end-function

View file

@ -1219,7 +1219,11 @@ The region will be defined with mark and point."
(bounds (window-edges start-window))
(make-cursor-line-fully-visible nil)
(top (nth 1 bounds))
(bottom (if (window-minibuffer-p start-window)
(bottom (if (or (window-minibuffer-p start-window)
;; Do not account for the mode line if there
;; is no mode line, which is common for child
;; frames.
(not mode-line-format))
(nth 3 bounds)
;; Don't count the mode line.
(1- (nth 3 bounds))))

View file

@ -1144,15 +1144,16 @@ explicitly provided via a `window-parameters' entry in ALIST."
buffer best-window 'reuse alist dedicated)))))))))
(defun window-toggle-side-windows (&optional frame)
"Toggle side windows on specified FRAME.
"Toggle display of side windows on specified FRAME.
FRAME must be a live frame and defaults to the selected one.
If FRAME has at least one side window, save FRAME's state in the
FRAME's `window-state' frame parameter and delete all side
windows on FRAME afterwards. Otherwise, if FRAME has a
`window-state' parameter, use that to restore any side windows on
FRAME leaving FRAME's main window alone. Signal an error if
FRAME has no side window and no saved state is found."
If FRAME has at least one side window, delete all side
windows on FRAME after saving FRAME's state in the
FRAME's `window-state' frame parameter. Otherwise,
restore any side windows recorded in FRAME's `window-state'
parameter, leaving FRAME's main window alone. Signal an
error if FRAME has no side windows and no saved state for
it is found."
(interactive)
(let* ((frame (window-normalize-frame frame))
(window--sides-inhibit-check t)

View file

@ -2603,7 +2603,7 @@ so some key presses (TAB) are swallowed by the system. */
if (f && FRAME_NS_P (f))
{
view = FRAME_NS_VIEW (*fp);
view = FRAME_NS_VIEW (f);
position = [[view window] mouseLocationOutsideOfEventStream];
position = [view convertPoint: position fromView: nil];