Merge from origin/emacs-27
3b0938c042
(origin/emacs-27) Render Ido suggestions using an overlayd5d90dc412
* doc/misc/tramp.texi (Bug Reports): Encourage use of "ema...ac09e8e121
* lisp/vc/smerge-mode.el (smerge-match-conflict): Fix bug#...7e37e61f4b
Correct statement about ftcr and recommend HarfBuzz4aec94da37
Avoid leaving artifacts when the system caret is used on w325abd8d73b0
Improve display of temporary echo messages
This commit is contained in:
commit
5715eb94e9
8 changed files with 68 additions and 21 deletions
|
@ -2301,17 +2301,17 @@ available font backends: @code{x} (the X core font driver), @code{xft}
|
|||
HarfBuzz text shaping). If built with Cairo drawing, there are also
|
||||
three potentially available font backends on X: @code{x}, @code{ftcr}
|
||||
(the FreeType font driver on Cairo), and @code{ftcrhb} (the FreeType
|
||||
font driver on Cairo with HarfBuzz text shaping). Note that the
|
||||
@code{ftcr} and @code{ftcrhb} drivers are mutually exclusive (and
|
||||
similarly for @code{xft} and @code{xfthb}), with the choice being made
|
||||
at build time. On MS-Windows, there are currently three available
|
||||
font backends: @code{gdi} (the core MS-Windows font driver),
|
||||
@code{uniscribe} (font driver for OTF and TTF fonts with text shaping
|
||||
by the Uniscribe engine), and @code{harfbuzz} (font driver for OTF and
|
||||
TTF fonts with HarfBuzz text shaping) (@pxref{Windows Fonts,,, emacs,
|
||||
The GNU Emacs Manual}). On other systems, there is only one available
|
||||
font backend, so it does not make sense to modify this frame
|
||||
parameter.
|
||||
font driver on Cairo with HarfBuzz text shaping). When Emacs is built
|
||||
with HarfBuzz, the default font driver is @code{ftcrhb}, although use
|
||||
of the @code{ftcr} driver is still possible, but not recommended. On
|
||||
MS-Windows, there are currently three available font backends:
|
||||
@code{gdi} (the core MS-Windows font driver), @code{uniscribe} (font
|
||||
driver for OTF and TTF fonts with text shaping by the Uniscribe
|
||||
engine), and @code{harfbuzz} (font driver for OTF and TTF fonts with
|
||||
HarfBuzz text shaping) (@pxref{Windows Fonts,,, emacs, The GNU Emacs
|
||||
Manual}). The @code{harfbuzz} driver is similarly recommended. On
|
||||
other systems, there is only one available font backend, so it does
|
||||
not make sense to modify this frame parameter.
|
||||
|
||||
@vindex background-mode@r{, a frame parameter}
|
||||
@item background-mode
|
||||
|
|
|
@ -3823,7 +3823,11 @@ help the development team find the best solution and avoid unrelated
|
|||
detours.
|
||||
|
||||
To exclude cache-related problems, flush all caches before running the
|
||||
test, @ref{Cleanup remote connections}.
|
||||
test, @ref{Cleanup remote connections}. Alternatively, and often
|
||||
better for analysis, reproduce the problem in a clean Emacs session
|
||||
started with @command{emacs -Q}. Then, @value{tramp} does not load
|
||||
the persistency file (@pxref{Connection caching}), and it does not use
|
||||
passwords from @file{auth-source.el} (@pxref{Password handling}).
|
||||
|
||||
When including @value{tramp}'s messages in the bug report, increase
|
||||
the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the
|
||||
|
|
10
lisp/ido.el
10
lisp/ido.el
|
@ -4492,6 +4492,8 @@ For details of keybindings, see `ido-find-file'."
|
|||
(ido-tidy))
|
||||
(throw 'ido contents))))
|
||||
|
||||
(defvar ido--overlay nil)
|
||||
|
||||
(defun ido-exhibit ()
|
||||
"Post command hook for Ido."
|
||||
;; Find matching files and display a list in the minibuffer.
|
||||
|
@ -4726,7 +4728,13 @@ For details of keybindings, see `ido-find-file'."
|
|||
(let ((inf (ido-completions contents)))
|
||||
(setq ido-show-confirm-message nil)
|
||||
(ido-trace "inf" inf)
|
||||
(insert inf))
|
||||
(when ido--overlay
|
||||
(delete-overlay ido--overlay))
|
||||
(let ((o (make-overlay (point-max) (point-max) nil t t)))
|
||||
(when (> (length inf) 0)
|
||||
(put-text-property 0 1 'cursor t inf))
|
||||
(overlay-put o 'after-string inf)
|
||||
(setq ido--overlay o)))
|
||||
))))
|
||||
|
||||
(defun ido-completions (name)
|
||||
|
|
|
@ -766,7 +766,7 @@ and `clear-minibuffer-message' called automatically via
|
|||
(defun set-minibuffer-message (message)
|
||||
"Temporarily display MESSAGE at the end of the minibuffer.
|
||||
The text is displayed for `minibuffer-message-clear-timeout' seconds
|
||||
(if the value is a number), or until the next input event arrives,
|
||||
\(if the value is a number), or until the next input event arrives,
|
||||
whichever comes first.
|
||||
Unlike `minibuffer-message', this function is called automatically
|
||||
via `set-message-function'."
|
||||
|
@ -790,8 +790,14 @@ via `set-message-function'."
|
|||
;; The current C cursor code doesn't know to use the overlay's
|
||||
;; marker's stickiness to figure out whether to place the cursor
|
||||
;; before or after the string, so let's spoon-feed it the pos.
|
||||
(put-text-property 0 1 'cursor t message))
|
||||
(put-text-property 0 1 'cursor 1 message))
|
||||
(overlay-put minibuffer-message-overlay 'after-string message)
|
||||
;; Make sure the overlay with the message is displayed before
|
||||
;; any other overlays in that position, in case they have
|
||||
;; resize-mini-windows set to nil and the other overlay strings
|
||||
;; are too long for the mini-window width. This makes sure the
|
||||
;; temporary message will always be visible.
|
||||
(overlay-put minibuffer-message-overlay 'priority 1100)
|
||||
|
||||
(when (numberp minibuffer-message-clear-timeout)
|
||||
(setq minibuffer-message-timer
|
||||
|
|
|
@ -797,7 +797,10 @@ An error is raised if not inside a conflict."
|
|||
(filename (or (match-string 1) ""))
|
||||
|
||||
(_ (re-search-forward smerge-end-re))
|
||||
(_ (cl-assert (< orig-point (match-end 0))))
|
||||
(_ (when (< (match-end 0) orig-point)
|
||||
;; Point is not within the conflict we found,
|
||||
;; so this conflict is not ours.
|
||||
(signal 'search-failed (list smerge-begin-re))))
|
||||
|
||||
(lower-end (match-beginning 0))
|
||||
(end (match-end 0))
|
||||
|
|
|
@ -3743,11 +3743,10 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
|
|||
{
|
||||
struct frame *f = XFRAME (WINDOW_FRAME (w));
|
||||
|
||||
block_input ();
|
||||
|
||||
/* Pseudo windows don't have cursors, so don't display them here. */
|
||||
if (!w->pseudo_window_p)
|
||||
{
|
||||
block_input ();
|
||||
|
||||
if (cursor_on_p)
|
||||
display_and_set_cursor (w, true,
|
||||
|
@ -3761,6 +3760,7 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
|
|||
else
|
||||
gui_draw_vertical_border (w);
|
||||
}
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
/* If a row with mouse-face was overwritten, arrange for
|
||||
|
@ -3778,7 +3778,6 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
|
|||
FRAME_RIF (f)->update_window_end_hook (w,
|
||||
cursor_on_p,
|
||||
mouse_face_overwritten_p);
|
||||
unblock_input ();
|
||||
}
|
||||
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
@ -4360,6 +4359,14 @@ scrolling_window (struct window *w, int tab_line_p)
|
|||
return 0;
|
||||
#endif
|
||||
|
||||
/* Can't scroll the display of w32 GUI frames when position of point
|
||||
is indicated by the system caret, because scrolling the display
|
||||
will then "copy" the pixles used by the caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (w32_use_visible_system_caret)
|
||||
return 0;
|
||||
#endif
|
||||
|
||||
/* Give up if some rows in the desired matrix are not enabled. */
|
||||
if (! MATRIX_ROW_ENABLED_P (desired_matrix, i))
|
||||
return -1;
|
||||
|
|
|
@ -560,7 +560,8 @@ static void
|
|||
w32_update_window_begin (struct window *w)
|
||||
{
|
||||
/* Hide the system caret during an update. */
|
||||
if (w32_use_visible_system_caret && w32_system_caret_hwnd)
|
||||
if (w32_use_visible_system_caret && w32_system_caret_hwnd
|
||||
&& w == w32_system_caret_window)
|
||||
{
|
||||
SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0,
|
||||
0, 6000, NULL);
|
||||
|
@ -657,7 +658,8 @@ w32_update_window_end (struct window *w, bool cursor_on_p,
|
|||
/* Unhide the caret. This won't actually show the cursor, unless it
|
||||
was visible before the corresponding call to HideCaret in
|
||||
w32_update_window_begin. */
|
||||
if (w32_use_visible_system_caret && w32_system_caret_hwnd)
|
||||
if (w32_use_visible_system_caret && w32_system_caret_hwnd
|
||||
&& w == w32_system_caret_window)
|
||||
{
|
||||
SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0,
|
||||
0, 6000, NULL);
|
||||
|
|
17
src/xdisp.c
17
src/xdisp.c
|
@ -19191,6 +19191,14 @@ try_window_reusing_current_matrix (struct window *w)
|
|||
if (!NILP (Vdisplay_line_numbers))
|
||||
return false;
|
||||
|
||||
/* Can't scroll the display of w32 GUI frames when position of point
|
||||
is indicated by the system caret, because scrolling the display
|
||||
will then "copy" the pixles used by the caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (w32_use_visible_system_caret)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
/* The variable new_start now holds the new window start. The old
|
||||
start `start' can be determined from the current matrix. */
|
||||
SET_TEXT_POS_FROM_MARKER (new_start, w->start);
|
||||
|
@ -20175,6 +20183,15 @@ try_window_id (struct window *w)
|
|||
if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row))
|
||||
GIVE_UP (20);
|
||||
|
||||
/* Can't let scroll_run_hook below run on w32 GUI frames when
|
||||
position of point is indicated by the system caret, because
|
||||
scrolling the display will then "copy" the pixles used by the
|
||||
caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (FRAME_W32_P (f) && w32_use_visible_system_caret)
|
||||
GIVE_UP (25);
|
||||
#endif
|
||||
|
||||
/* Compute the position at which we have to start displaying new
|
||||
lines. Some of the lines at the top of the window might be
|
||||
reusable because they are not displaying changed text. Find the
|
||||
|
|
Loading…
Add table
Reference in a new issue