mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
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 bookmarksb5a0eda978
Prefer "graphical displays" to "X terminals" in documentation4ad0fc0dd0
Precise documentation of file-notify-add-watchf5b8df14c6
Fixes to account for windows' tab linesced72b6e4c
* Fix `native-compile-target-directory' effectiveness on t...502788bc3d
Add missing single quotes in the Emacs manual1af45ad04e
; * 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
This commit is contained in:
commit
536968304b
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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))))))))))
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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 ()
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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'.
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
19
src/xdisp.c
19
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);
|
||||
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user