emacs-diffs
[Top][All Lists]
Advanced

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

master 5369683 1/2: Merge from origin/emacs-28


From: Glenn Morris
Subject: master 5369683 1/2: Merge from origin/emacs-28
Date: Sat, 16 Oct 2021 12:18:47 -0400 (EDT)

branch: master
commit 536968304bd2ab70819b2920fc015e4bf9330636
Merge: ffff168 e848880
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-28
    
    e8488808df Avoid aborts when a thread is signaled while "waiting for ...
    21397cce51 Improve documentation string for 'compilation-error-regexp...
    2971a6890f * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix t...
    e842d7f29a Fix removal of fringe indication of bookmarks
    b5a0eda978 Prefer "graphical displays" to "X terminals" in documentation
    4ad0fc0dd0 Precise documentation of file-notify-add-watch
    f5b8df14c6 Fixes to account for windows' tab lines
    ced72b6e4c * Fix `native-compile-target-directory' effectiveness on t...
    502788bc3d Add missing single quotes in the Emacs manual
    1af45ad04e ; * lisp/emacs-lisp/comp.el (comp-trampoline-compile): Fix...
    12654b7423 * lisp/menu-bar.el (yank-menu-length): Fix docstring (bug#...
    
    # Conflicts:
    #   lisp/gnus/gnus-undo.el
    #   lisp/menu-bar.el
---
 doc/lispref/display.texi      | 12 ++++++------
 doc/lispref/objects.texi      | 10 +++++-----
 doc/lispref/os.texi           |  5 +++--
 lisp/bindings.el              |  2 +-
 lisp/bookmark.el              |  2 +-
 lisp/emacs-lisp/comp.el       |  9 ++++++---
 lisp/filenotify.el            |  4 +++-
 lisp/gnus/gnus-undo.el        |  2 +-
 lisp/help-fns.el              |  2 +-
 lisp/menu-bar.el              |  2 +-
 lisp/mwheel.el                |  2 +-
 lisp/progmodes/compile.el     |  3 ++-
 lisp/window.el                |  8 ++++++--
 src/process.c                 | 22 +++++++++++++++++++---
 src/xdisp.c                   | 19 ++++++++-----------
 test/lisp/filenotify-tests.el |  2 +-
 16 files changed, 65 insertions(+), 41 deletions(-)

diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 52fe97b..16577d1 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2055,7 +2055,7 @@ displayed in a given window.  This function is used by
 (@pxref{Resizing Windows}) to make a window exactly as large as the text
 it contains.
 
-@defun window-text-pixel-size &optional window from to x-limit y-limit 
mode-and-header-line
+@defun window-text-pixel-size &optional window from to x-limit y-limit 
mode-lines
 This function returns the size of the text of @var{window}'s buffer in
 pixels.  @var{window} must be a live window and defaults to the
 selected one.  The return value is a cons of the maximum pixel-width
@@ -2097,12 +2097,12 @@ calculating the pixel-height of a large buffer can take 
some time, it
 makes sense to specify this argument; in particular, if the caller
 does not know the size of the buffer.
 
-The optional argument @var{mode-and-header-line} @code{nil} or omitted
-means to not include the height of the mode- or header-line of
-@var{window} in the return value.  If it is either the symbol
-@code{mode-line} or @code{header-line}, include only the height of that
+The optional argument @var{mode-lines} @code{nil} or omitted means to
+not include the height of the mode-, tab- or header-line of @var{window}
+in the return value.  If it is either the symbol @code{mode-line},
+@code{tab-line} or @code{header-line}, include only the height of that
 line, if present, in the return value.  If it is @code{t}, include the
-height of both, if present, in the return value.
+height of all of these lines, if present, in the return value.
 @end defun
 
 @code{window-text-pixel-size} treats the text displayed in a window as a
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 365d5ac..a20343f 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -516,9 +516,9 @@ codes for these non-@acronym{ASCII} control characters 
include the
 2**26
 @end ifnottex
 bit as well as the code for the corresponding non-control character.
-Ordinary text terminals have no way of generating non-@acronym{ASCII}
-control characters, but you can generate them straightforwardly using
-X and other window systems.
+Not all text terminals can generate non-@acronym{ASCII} control
+characters, but it is straightforward to generate them using X and
+other window systems.
 
   For historical reasons, Emacs treats the @key{DEL} character as
 the control equivalent of @kbd{?}:
@@ -588,8 +588,8 @@ character is upper case or lower case.  Emacs uses the
 2**25
 @end ifnottex
 bit to indicate that the shift key was used in typing a control
-character.  This distinction is possible only when you use X terminals
-or other special terminals; ordinary text terminals do not report the
+character.  This distinction is possible only on a graphical display
+such as a GUI display on X; text terminals do not report the
 distinction.  The Lisp syntax for the shift bit is @samp{\S-}; thus,
 @samp{?\C-\S-o} or @samp{?\C-\S-O} represents the shifted-control-o
 character.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index e3dcd6c..7c7673f 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -3124,8 +3124,9 @@ watch for file attribute changes, like permissions or 
modification
 time
 @end table
 
-If @var{file} is a directory, changes for all files in that directory
-will be notified.  This does not work recursively.
+If @var{file} is a directory, @code{change} watches for file creation
+or deletion in that directory.  Some of the file notification backends
+report also file changes.  This does not work recursively.
 
 When any event happens, Emacs will call the @var{callback} function
 passing it a single argument @var{event}, which is of the form
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 2c45710..121e484 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -981,7 +981,7 @@ if `inhibit-field-text-motion' is non-nil."
 (define-key ctl-x-map "\M-:" 'repeat-complex-command)
 (define-key ctl-x-map "u" 'undo)
 (put 'undo :advertised-binding [?\C-x ?u])
-;; Many people are used to typing C-/ on X terminals and getting C-_.
+;; Many people are used to typing C-/ on GUI frames and getting C-_.
 (define-key global-map [?\C-/] 'undo)
 (define-key global-map "\C-_" 'undo)
 ;; Richard said that we should not use C-x <uppercase letter> and I have
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 5c4a980..22520eb 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -479,7 +479,7 @@ See user option `bookmark-set-fringe'."
       (dolist (buf (buffer-list))
         (with-current-buffer buf
           (when (equal filename buffer-file-name)
-            (setq overlays (overlays-in pos pos))
+            (setq overlays (overlays-in pos (1+ pos)))
             (while (and (not found) (setq temp (pop overlays)))
               (when (eq 'bookmark (overlay-get temp 'category))
                 (delete-overlay (setq found temp))))))))))
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 0052fd0..0a10505 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -3781,15 +3781,18 @@ Return the trampoline if found or nil otherwise."
                         for arg in lambda-list
                         unless (memq arg '(&optional &rest))
                         collect arg)))))
-         ;; Use speed 0 to maximize compilation speed and not to
-         ;; optimize away funcall calls!
+         ;; Use speed 1 for compilation speed and not to optimize away
+         ;; funcall calls!
          (byte-optimize nil)
          (native-comp-speed 1)
          (lexical-binding t))
     (comp--native-compile
      form nil
      (cl-loop
-      for dir in (comp-eln-load-path-eff)
+      for dir in (if native-compile-target-directory
+                     (list (expand-file-name comp-native-version-dir
+                                             native-compile-target-directory))
+                   (comp-eln-load-path-eff))
       for f = (expand-file-name
                (comp-trampoline-filename subr-name)
                dir)
diff --git a/lisp/filenotify.el b/lisp/filenotify.el
index a2a2762..26954cc 100644
--- a/lisp/filenotify.el
+++ b/lisp/filenotify.el
@@ -390,7 +390,9 @@ include the following symbols:
                         permissions or modification time
 
 If FILE is a directory, `change' watches for file creation or
-deletion in that directory.  This does not work recursively.
+deletion in that directory.  Some of the file notification
+backends report also file changes.  This does not work
+recursively.
 
 When any event happens, Emacs will call the CALLBACK function passing
 it a single argument EVENT, which is of the form
diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el
index 182c874..0717a7c 100644
--- a/lisp/gnus/gnus-undo.el
+++ b/lisp/gnus/gnus-undo.el
@@ -79,7 +79,7 @@
   "\M-\C-_" #'gnus-undo
   "\C-_" #'gnus-undo
   "\C-xu" #'gnus-undo
-  ;; many people are used to type `C-/' on X terminals and get `C-_'.
+  ;; many people are used to type `C-/' on GUI frames and get `C-_'.
   [(control /)] #'gnus-undo)
 
 (defun gnus-undo-make-menu-bar ()
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 03bbc97..2b759a5 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -823,7 +823,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED 
REAL-DEF)."
                            ;; Advised & aliased function.
                            (and advised (symbolp real-function)
                                 (not (eq 'autoload (car-safe def))))
-                           (and (subrp def)
+                           (and (subrp def) (symbolp function)
                                 (not (string= (subr-name def)
                                               (symbol-name function)))))))
         (real-def (cond
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 6dd1896..980ba2f 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2169,7 +2169,7 @@ otherwise it could decide to silently do nothing."
     (> count 1)))
 
 (defcustom yank-menu-length 20
-  "Items in `yank-menu' longer than this will be truncated."
+  "Text of items in `yank-menu' longer than this will be truncated."
   :type 'integer
   :group 'menu)
 
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index def7758..51410e3 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -103,7 +103,7 @@ less than a full screen.
 If AMOUNT is the symbol 'hscroll', this means that with MODIFIER,
 the mouse wheel will scroll horizontally instead of vertically.
 
-If AMOUNT is the symbol text-scale, this means that with
+If AMOUNT is the symbol 'text-scale', this means that with
 MODIFIER, the mouse wheel will change the face height instead of
 scrolling."
   :group 'mouse
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 2b480e8..14da588 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -662,7 +662,8 @@ has just been matched, and should correspondingly preserve 
this match data.
 TYPE is 2 or nil for a real error or 1 for warning or 0 for info.
 TYPE can also be of the form (WARNING . INFO).  In that case this
 will be equivalent to 1 if the WARNING'th subexpression matched
-or else equivalent to 0 if the INFO'th subexpression matched.
+or else equivalent to 0 if the INFO'th subexpression matched,
+or else equivalent to 2 if neither of them matched.
 See `compilation-error-face', `compilation-warning-face',
 `compilation-info-face' and `compilation-skip-threshold'.
 
diff --git a/lisp/window.el b/lisp/window.el
index bc0ccd7..132f093 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1410,9 +1410,12 @@ before writing to it."
                 (cadr fringes)
                 (window-scroll-bar-width window)
                 (window-right-divider-width window))
-        (format "height header-line: %s  mode-line: %s  divider: %s\n"
+        (format "height tab-line: %s header-line: %s  mode-line: %s\n"
+                (window-tab-line-height window)
                 (window-header-line-height window)
-                (window-mode-line-height window)
+                (window-mode-line-height window))
+        (format "height scroll-bar: %s divider: %s"
+                (window-scroll-bar-height window)
                 (window-bottom-divider-width window)))))
     (insert "\n")))
 
@@ -1675,6 +1678,7 @@ return the minimum pixel-size of WINDOW."
         ((let ((char-size (frame-char-size window))
                (pixel-height
                 (+ (window-safe-min-size window nil t)
+                   (window-tab-line-height window)
                    (window-header-line-height window)
                    (window-scroll-bar-height window)
                    (window-mode-line-height window)
diff --git a/src/process.c b/src/process.c
index 746cdc0..6731f88 100644
--- a/src/process.c
+++ b/src/process.c
@@ -683,6 +683,22 @@ clear_waiting_thread_info (void)
     }
 }
 
+/* Return TRUE if the keyboard descriptor is being monitored by the
+   current thread, FALSE otherwise.  */
+static bool
+kbd_is_ours (void)
+{
+  for (int fd = 0; fd <= max_desc; ++fd)
+    {
+      if (fd_callback_info[fd].waiting_thread != current_thread)
+       continue;
+      if ((fd_callback_info[fd].flags & (FOR_READ | KEYBOARD_FD))
+         == (FOR_READ | KEYBOARD_FD))
+       return true;
+    }
+  return false;
+}
+
 
 /* Compute the Lisp form of the process status, p->status, from
    the numeric status that was returned by `wait'.  */
@@ -5312,13 +5328,13 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
               wait_reading_process_output_1 ();
         }
 
-      /* Cause C-g and alarm signals to take immediate action,
+      /* Cause C-g signals to take immediate action,
         and cause input available signals to zero out timeout.
 
         It is important that we do this before checking for process
         activity.  If we get a SIGCHLD after the explicit checks for
         process activity, timeout is the only way we will know.  */
-      if (read_kbd < 0)
+      if (read_kbd < 0 && kbd_is_ours ())
        set_waiting_for_input (&timeout);
 
       /* If status of something has changed, and no input is
@@ -5448,7 +5464,7 @@ wait_reading_process_output (intmax_t time_limit, int 
nsecs, int read_kbd,
        {
          clear_waiting_for_input ();
          redisplay_preserve_echo_area (11);
-         if (read_kbd < 0)
+         if (read_kbd < 0 && kbd_is_ours ())
            set_waiting_for_input (&timeout);
        }
 
diff --git a/src/xdisp.c b/src/xdisp.c
index 012c2ad..f4ea7de 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10663,13 +10663,13 @@ position specified by TO.  Since calculating the text 
height of a
 large buffer can take some time, it makes sense to specify this
 argument if the size of the buffer is large or unknown.
 
-Optional argument MODE-AND-HEADER-LINE nil or omitted means do not
-include the height of the mode- or header-line of WINDOW in the return
-value.  If it is either the symbol `mode-line' or `header-line', include
+Optional argument MODE-LINES nil or omitted means do not include the
+height of the mode-, tab- or header-line of WINDOW in the return value.
+If it is the symbol `mode-line', 'tab-line' or `header-line', include
 only the height of that line, if present, in the return value.  If t,
-include the height of both, if present, in the return value.  */)
+include the height of any of these, if present, in the return value.  */)
   (Lisp_Object window, Lisp_Object from, Lisp_Object to, Lisp_Object x_limit,
-   Lisp_Object y_limit, Lisp_Object mode_and_header_line)
+   Lisp_Object y_limit, Lisp_Object mode_lines)
 {
   struct window *w = decode_live_window (window);
   Lisp_Object buffer = w->contents;
@@ -10843,18 +10843,15 @@ include the height of both, if present, in the return 
value.  */)
   if (y > max_y)
     y = max_y;
 
-  if (EQ (mode_and_header_line, Qtab_line)
-      || EQ (mode_and_header_line, Qt))
+  if (EQ (mode_lines, Qtab_line) || EQ (mode_lines, Qt))
     /* Re-add height of tab-line as requested.  */
     y = y + WINDOW_TAB_LINE_HEIGHT (w);
 
-  if (EQ (mode_and_header_line, Qheader_line)
-      || EQ (mode_and_header_line, Qt))
+  if (EQ (mode_lines, Qheader_line) || EQ (mode_lines, Qt))
     /* Re-add height of header-line as requested.  */
     y = y + WINDOW_HEADER_LINE_HEIGHT (w);
 
-  if (EQ (mode_and_header_line, Qmode_line)
-      || EQ (mode_and_header_line, Qt))
+  if (EQ (mode_lines, Qmode_line) || EQ (mode_lines, Qt))
     /* Add height of mode-line as requested.  */
     y = y + WINDOW_MODE_LINE_HEIGHT (w);
 
diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el
index e8a647d..0fe72f2 100644
--- a/test/lisp/filenotify-tests.el
+++ b/test/lisp/filenotify-tests.el
@@ -766,7 +766,7 @@ delivered."
             ;; the directory.  Except for
             ;; GFam{File,Directory}Monitor, GPollFileMonitor and
             ;; kqueue.  And GFam{File,Directory}Monitor and
-            ;; GPollFileMonitordo not raise a `changed' event.
+            ;; GPollFileMonitor do not raise a `changed' event.
             ((memq (file-notify--test-monitor)
                     '(GFamFileMonitor GFamDirectoryMonitor GPollFileMonitor))
              '(created deleted stopped))



reply via email to

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