summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2021-10-16 09:18:37 -0700
committerGlenn Morris <rgm@gnu.org>2021-10-16 09:18:37 -0700
commit536968304bd2ab70819b2920fc015e4bf9330636 (patch)
tree9a3936312a2e00c0b15888a59a4273425dc2ba18
parentffff168d5fb14fbfa74f7c04fab0235a14bb7e64 (diff)
parente8488808dfe1460ce07042a1a523097ab90cf079 (diff)
downloademacs-536968304bd2ab70819b2920fc015e4bf9330636.tar.gz
emacs-536968304bd2ab70819b2920fc015e4bf9330636.tar.bz2
emacs-536968304bd2ab70819b2920fc015e4bf9330636.zip
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
-rw-r--r--doc/lispref/display.texi12
-rw-r--r--doc/lispref/objects.texi10
-rw-r--r--doc/lispref/os.texi5
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/bookmark.el2
-rw-r--r--lisp/emacs-lisp/comp.el9
-rw-r--r--lisp/filenotify.el4
-rw-r--r--lisp/gnus/gnus-undo.el2
-rw-r--r--lisp/help-fns.el2
-rw-r--r--lisp/menu-bar.el2
-rw-r--r--lisp/mwheel.el2
-rw-r--r--lisp/progmodes/compile.el3
-rw-r--r--lisp/window.el8
-rw-r--r--src/process.c22
-rw-r--r--src/xdisp.c19
-rw-r--r--test/lisp/filenotify-tests.el2
16 files changed, 65 insertions, 41 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 52fe97b2993..16577d13c19 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 365d5ac8d61..a20343f4c7a 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 e3dcd6c7783..7c7673f9c5c 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 2c45710a580..121e484a0ee 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 5c4a9803b39..22520ebb7af 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 0052fd0f8db..0a105052570 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 a2a27625e4e..26954cc73f2 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 182c8743e09..0717a7ccfba 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 03bbc979a9c..2b759a5a5c5 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 6dd1896a29e..980ba2fcd19 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 def77587747..51410e3ef4c 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 2b480e89507..14da5880203 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 bc0ccd72a0b..132f0930ceb 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 746cdc0428a..6731f8808f5 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 012c2ad8bf2..f4ea7de1907 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 e8a647df909..0fe72f278dc 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))