emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bb7b75d 1/3: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master bb7b75d 1/3: Merge from origin/emacs-26
Date: Tue, 20 Nov 2018 12:38:52 -0500 (EST)

branch: master
commit bb7b75d7110c7a46407aa4efc33446ace0cba631
Merge: e1b2c21 070e82b
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    070e82b ; * src/window.c (window_scroll): Improve commentary.
    60457d7 Improve documentation of the window tree
    ea1a014 Fix window scrolling on TTY frames when there's no mode line
    df7ed10 Fix decoding XML files encoded in ISO-8859
    7851ae8 (tag: emacs-26.1.90) ; ChangeLog.3 update
    1958808 * etc/AUTHORS: Update.
    7252507 Fix description of some window hooks
    88762b4 Run 'window--adjust-process-windows' when frame size changes ...
    d6542ea Avoid errors in zone.el when there's overlay at EOB
---
 ChangeLog.3                | 103 ++++++++++++++++++++++++++++++++++++++++++++-
 doc/lispref/windows.texi   |  45 ++++++++++----------
 etc/AUTHORS                |   8 ++--
 lisp/international/mule.el |   6 ++-
 lisp/play/zone.el          |   2 +-
 lisp/window.el             |   7 +++
 src/window.c               |  24 +++++------
 src/window.h               |  12 ++++--
 8 files changed, 160 insertions(+), 47 deletions(-)

diff --git a/ChangeLog.3 b/ChangeLog.3
index 6e1f68f..194fa68 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -1,3 +1,104 @@
+2018-11-18  Martin Rudalics  <address@hidden>
+
+       Fix description of some window hooks
+
+       * doc/lispref/windows.texi (Window Hooks): Remove text that
+       warns against using 'save-window-excursion' while running
+       'window-size-change-functions', it's no more relevant.
+       Clarify description of 'window-configuration-change-hook'.
+
+2018-11-18  Gary Fredericks  <address@hidden>  (tiny change)
+
+       Run 'window--adjust-process-windows' when frame size changes (Bug#32720)
+
+       * lisp/window.el (window-size-change-functions): Run
+       'window--adjust-process-windows' from
+       'window-size-change-functions' too (Bug#32720, "another issue"
+       in Bug#33230).
+
+2018-11-16  Eli Zaretskii  <address@hidden>
+
+       Avoid errors in zone.el when there's overlay at EOB
+
+       * lisp/play/zone.el (zone): Make sure the window-end position
+       is calculated accurately, to avoid errors from
+       buffer-substring.  (Bug#33384)
+
+2018-11-16  Eli Zaretskii  <address@hidden>
+
+       Document Emacs 26 behavior of Dired's 'Z' on directories
+
+       * doc/emacs/dired.texi (Operating on Files): Document behavior
+       of 'Z' on directories.
+
+       * etc/NEWS: Belatedly announce the new behavior of Dired's 'Z'
+       on directory names and on .tar.gz archives.
+
+2018-11-15  Eli Zaretskii  <address@hidden>
+
+       Fix a typo in the Emacs manual
+
+       * doc/emacs/rmail.texi (Rmail Deletion): Fix a typo.
+       Reported by Jorge P. de Morais Neto <address@hidden>
+       in address@hidden
+
+2018-11-15  Paul Eggert  <address@hidden>
+
+       Fix tempfile creation when byte compiling
+
+       This improves on the recent fix for master failing to build
+       on FreeBSD.  Suggested by Stefan Monnier in:
+       https://lists.gnu.org/r/emacs-devel/2018-01/msg00600.html
+       * lisp/emacs-lisp/bytecomp.el (byte-compile-file):
+       Put tempfile next to the target file, as was the original intent.
+
+       (cherry picked from commit 64c846738617d1d037eac0cefb6586c04317b0a1)
+
+2018-11-14  Markus Triska  <address@hidden>
+
+       Small documentation correction.
+
+       * doc/lispref/windows.texi (Textual Scrolling): In the description of
+       scroll-up-aggressively, refer to scroll-down-aggressively instead of
+       a recursive reference to scroll-up-aggressively.  (Bug#33369)
+
+2018-11-14  Eli Zaretskii  <address@hidden>
+
+       * src/coding.c (Fcheck_coding_systems_region): Doc fix.  (Bug#33372)
+
+2018-11-14  Michael Albinus  <address@hidden>
+
+       Fix Bug#33364
+
+       * lisp/net/tramp.el (tramp-parse-sconfig-group): Support also
+       "Host host1 host2 ..." syntax.  (Bug#33364)
+
+2018-11-13  Michael Albinus  <address@hidden>
+
+       * test/README: Explain $REMOTE_TEMPORARY_FILE_DIRECTORY.
+
+2018-11-12  Glenn Morris  <address@hidden>
+
+       Avoid kill-emacs-hook errors hanging batch mode
+
+       * src/emacs.c (Fkill_emacs): Prevent errors from kill-emacs-hook
+       hanging Emacs in batch mode.  (Bug#29955)
+
+       (cherry picked from commit 109da684c5124e22505917fe0255ca66f2a6bfc9)
+
+2018-11-12  Nicolas Petton  <address@hidden>
+
+       Bump Emacs version to 26.1.90
+
+       * README:
+       * configure.ac:
+       * msdos/sed2v2.inp:
+       * nt/README.W32: Bump Emacs version to 26.1.90.
+
+2018-11-12  Nicolas Petton  <address@hidden>
+
+       * etc/AUTHORS: Update.
+
 2018-11-12  Paul Eggert  <address@hidden>
 
        Work around dumping bug on GNU/Linux ppc64le
@@ -63347,7 +63448,7 @@
 
 This file records repository revisions from
 commit 9d56a21e6a696ad19ac65c4b405aeca44785884a (exclusive) to
-commit 1d79c2ebd9bd9aa36586e57463502373c0296d11 (inclusive).
+commit 72525076996cd709086b1afb47ab0d095322e9b7 (inclusive).
 See ChangeLog.1 for earlier changes.
 
 ;; Local Variables:
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index af497cf..b86bcca 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -198,12 +198,13 @@ relationships between live windows.  The root node of a 
window tree is
 called the @dfn{root window}.  It can be either a live window (if the
 frame has just one window), or an internal window.
 
-  A minibuffer window (@pxref{Minibuffer Windows}) is not part of its
-frame's window tree unless the frame is a minibuffer-only frame.
-Nonetheless, most of the functions in this section accept the
-minibuffer window as an argument.  Also, the function
address@hidden described at the end of this section lists the
-minibuffer window alongside the actual window tree.
+  A minibuffer window (@pxref{Minibuffer Windows}) that is not alone
+on its frame does not have a parent window, so it strictly speaking is
+not part of its frame's window tree.  Nonetheless, it is a sibling
+window of the frame's root window, and thus can be reached via
address@hidden  Also, the function @code{window-tree}
+described at the end of this section lists the minibuffer window
+alongside the actual window tree.
 
 @defun frame-root-window &optional frame-or-window
 This function returns the root window for @var{frame-or-window}.  The
@@ -6037,26 +6038,24 @@ size and has to check out these windows by using the 
method described
 in the previous paragraph.
 
 These function are usually only called when at least one window was
-added or has changed size since the last time this hook was run for the
-associated frame.  In some rare cases this hook also runs when a window
-that was added intermittently has been deleted afterwards.  In these
-cases none of the windows on the frame will appear to have changed its
-size.
-
-You may use @code{save-selected-window} in these functions
-(@pxref{Selecting Windows}).  However, do not use
address@hidden (@pxref{Window Configurations}); exiting
-that macro counts as a size change, which would cause these functions to
-be called again.
+added or has changed size since the last time this hook was run for
+the associated frame.  In some rare cases this hook also runs when a
+window that was added intermittently has been deleted afterwards.  In
+these cases none of the windows on the frame will appear to have
+changed its size.
 @end defvar
 
 @defvar window-configuration-change-hook
-A normal hook that is run every time the window configuration of a frame
-changes.  Window configuration changes include splitting and deleting
-windows, and the display of a different buffer in a window.  Resizing the
-frame or individual windows do not count as configuration changes.  Use
address@hidden, see above, when you want to track
-size changes that are not caused by the deletion or creation of windows.
+A normal hook that is run every time the window configuration of a
+frame changes.  Window configuration changes include splitting and
+deleting windows, and the display of a different buffer in a window.
+
+The hook can be also used for tracking changes of window sizes.  It
+is, however, not run when the size of a frame changes or automatic
+resizing of a minibuffer window (@pxref{Minibuffer Windows}) changes
+the size of another window.  As a rule, adding a function to
address@hidden, see above, is the recommended way
+for reliably tracking size changes of any window.
 
 The buffer-local value of this hook is run once for each window on the
 affected frame, with the relevant window selected and its buffer
diff --git a/etc/AUTHORS b/etc/AUTHORS
index 23c88d5..07cdf0a 100644
--- a/etc/AUTHORS
+++ b/etc/AUTHORS
@@ -1658,6 +1658,8 @@ Gary Delp: wrote mailpost.el (public domain)
 Gary D. Foster: wrote crisp.el scroll-all.el
 and changed gnus-group.el gnus-topic.el
 
+Gary Fredericks: changed window.el
+
 Gary Howell: changed server.el
 
 Gary Oberbrunner: changed gud.el
@@ -3124,7 +3126,7 @@ Markus Triska: wrote linum.el
 and changed bytecomp.el byte-opt.el doctor.el image-mode.el
   processes.texi calc-math.el emacs.c expand.el flymake.el flymake.texi
   flyspell.el handwrite.el internals.texi proced.el prolog.el ps-mode.el
-  speedbar.el subr.el tumme.el widget.texi xterm.c
+  speedbar.el subr.el tumme.el widget.texi windows.texi xterm.c
 
 Mark W. Eichin: changed keyboard.c xterm.c
 
@@ -3584,8 +3586,8 @@ Nicolas Graner: changed message.el
 Nicolas Petton: wrote map-tests.el map.el seq-tests.el seq.el
   thunk-tests.el thunk.el
 and co-wrote auth-source-pass.el auth-source-tests.el subr-tests.el
-and changed sequences.texi README configure.ac sed2v2.inp authors.el
-  emacs.png README.W32 emacs23.png arc-mode.el cl-extra.el emacs.svg
+and changed README sequences.texi configure.ac sed2v2.inp authors.el
+  README.W32 emacs.png emacs23.png arc-mode.el cl-extra.el emacs.svg
   manoj-dark-theme.el Emacs.icns HISTORY Makefile.in auth-source.el
   emacs.ico fns.c make-tarball.txt obarray-tests.el obarray.el
   and 35 other files
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index a4f3441..31003d1 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2501,7 +2501,11 @@ This function is intended to be added to 
`auto-coding-functions'."
                   (let ((sym-type (coding-system-type sym))
                         (bfcs-type
                          (coding-system-type buffer-file-coding-system)))
-                    (if (and (coding-system-equal 'utf-8 sym-type)
+                    ;; 'charset' will signal an error in
+                    ;; coding-system-equal, since it isn't a
+                    ;; coding-system.  So test that up front.
+                    (if (and (not (equal sym-type 'charset))
+                             (coding-system-equal 'utf-8 sym-type)
                              (coding-system-equal 'utf-8 bfcs-type))
                         buffer-file-coding-system
                      sym))
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index 4584d26..75f1364 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -109,7 +109,7 @@ If the element is a function or a list of a function and a 
number,
   (save-window-excursion
     (let ((f (selected-frame))
           (outbuf (get-buffer-create "*zone*"))
-          (text (buffer-substring (window-start) (window-end)))
+          (text (buffer-substring (window-start) (window-end nil t)))
           (wp (1+ (- (window-point)
                      (window-start)))))
       (put 'zone 'orig-buffer (current-buffer))
diff --git a/lisp/window.el b/lisp/window.el
index 172ee72..43a742b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -9353,8 +9353,15 @@ displaying that processes's buffer."
               (when size
                 (set-process-window-size process (cdr size) (car size))))))))))
 
+;; Remove the following call in Emacs 27, running
+;; 'window-size-change-functions' should suffice.
 (add-hook 'window-configuration-change-hook 'window--adjust-process-windows)
 
+;; Catch any size changes not handled by
+;; 'window-configuration-change-hook' (Bug#32720, "another issue" in
+;; Bug#33230).
+(add-hook 'window-size-change-functions (lambda (_frame)
+                                          (window--adjust-process-windows)))
 
 ;; Some of these are in tutorial--default-keys, so update that if you
 ;; change these.
diff --git a/src/window.c b/src/window.c
index 20084a1..31e9782 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4970,25 +4970,21 @@ window_wants_header_line (struct window *w)
          : 0);
 }
 
-/* Return number of lines of text (not counting mode lines) in W.  */
+/* Return number of lines of text in window W, not counting the mode
+   line and header line, if any.  Do NOT use this for windows on GUI
+   frames; use window_body_height instead.  This function is only for
+   windows on TTY frames, where it is much more efficient.  */
 
 int
 window_internal_height (struct window *w)
 {
   int ht = w->total_lines;
 
-  if (!MINI_WINDOW_P (w))
-    {
-      if (!NILP (w->parent)
-         || WINDOWP (w->contents)
-         || !NILP (w->next)
-         || !NILP (w->prev)
-         || window_wants_mode_line (w))
-       --ht;
+  if (window_wants_mode_line (w))
+    --ht;
 
-      if (window_wants_header_line (w))
-       --ht;
-    }
+  if (window_wants_header_line (w))
+    --ht;
 
   return ht;
 }
@@ -5017,8 +5013,8 @@ window_scroll (Lisp_Object window, EMACS_INT n, bool 
whole, bool noerror)
   if (whole && Vfast_but_imprecise_scrolling)
     specbind (Qfontification_functions, Qnil);
 
-  /* If we must, use the pixel-based version which is much slower than
-     the line-based one but can handle varying line heights.  */
+  /* On GUI frames, use the pixel-based version which is much slower
+     than the line-based one but can handle varying line heights.  */
   if (FRAME_WINDOW_P (XFRAME (XWINDOW (window)->frame)))
     window_scroll_pixel_based (window, n, whole, noerror);
   else
diff --git a/src/window.h b/src/window.h
index cc0b6b6..b3673a0 100644
--- a/src/window.h
+++ b/src/window.h
@@ -93,12 +93,14 @@ struct window
     /* The frame this window is on.  */
     Lisp_Object frame;
 
-    /* Following (to right or down) and preceding (to left or up) child
-       at same level of tree.  */
+    /* Following (to right or down) and preceding (to left or up)
+       child at same level of tree.  Whether this is left/right or
+       up/down is determined by the 'horizontal' flag, see below.
+       A minibuffer window has the frame's root window pointed by 'prev'.  */
     Lisp_Object next;
     Lisp_Object prev;
 
-    /* The window this one is a child of.  */
+    /* The window this one is a child of.  For a minibuffer window: nil.  */
     Lisp_Object parent;
 
     /* The normal size of the window.  These are fractions, but we do
@@ -113,7 +115,9 @@ struct window
     Lisp_Object new_normal;
     Lisp_Object new_pixel;
 
-    /* May be buffer, window, or nil.  */
+    /* For a leaf window: a buffer; for an internal window: a window;
+       for a pseudo-window (such as menu bar or tool bar): nil.  It is
+       a buffer for a minibuffer window as well.  */
     Lisp_Object contents;
 
     /* A marker pointing to where in the text to start displaying.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]