diff options
| author | Glenn Morris | 2020-01-22 07:55:18 -0800 |
|---|---|---|
| committer | Glenn Morris | 2020-01-22 07:55:18 -0800 |
| commit | 5715eb94e90b33ace59dd4c4ccb6e2122bc6db72 (patch) | |
| tree | 1c3aef6f5135b25738cd0d3a98ad807ec698ac1e | |
| parent | a1bfb926ca484190298045fc9e775002fe872bb5 (diff) | |
| parent | 3b0938c0420de2b845e7e8f8fbbb57ddc61718f2 (diff) | |
| download | emacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.tar.gz emacs-5715eb94e90b33ace59dd4c4ccb6e2122bc6db72.zip | |
Merge from origin/emacs-27
3b0938c042 (origin/emacs-27) Render Ido suggestions using an overlay
d5d90dc412 * 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 HarfBuzz
4aec94da37 Avoid leaving artifacts when the system caret is used on w32
5abd8d73b0 Improve display of temporary echo messages
| -rw-r--r-- | doc/lispref/frames.texi | 22 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 6 | ||||
| -rw-r--r-- | lisp/ido.el | 10 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 10 | ||||
| -rw-r--r-- | lisp/vc/smerge-mode.el | 5 | ||||
| -rw-r--r-- | src/dispnew.c | 13 | ||||
| -rw-r--r-- | src/w32term.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 17 |
8 files changed, 68 insertions, 21 deletions
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index a8d95a21011..2bb505c1c7a 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi | |||
| @@ -2301,17 +2301,17 @@ available font backends: @code{x} (the X core font driver), @code{xft} | |||
| 2301 | HarfBuzz text shaping). If built with Cairo drawing, there are also | 2301 | HarfBuzz text shaping). If built with Cairo drawing, there are also |
| 2302 | three potentially available font backends on X: @code{x}, @code{ftcr} | 2302 | three potentially available font backends on X: @code{x}, @code{ftcr} |
| 2303 | (the FreeType font driver on Cairo), and @code{ftcrhb} (the FreeType | 2303 | (the FreeType font driver on Cairo), and @code{ftcrhb} (the FreeType |
| 2304 | font driver on Cairo with HarfBuzz text shaping). Note that the | 2304 | font driver on Cairo with HarfBuzz text shaping). When Emacs is built |
| 2305 | @code{ftcr} and @code{ftcrhb} drivers are mutually exclusive (and | 2305 | with HarfBuzz, the default font driver is @code{ftcrhb}, although use |
| 2306 | similarly for @code{xft} and @code{xfthb}), with the choice being made | 2306 | of the @code{ftcr} driver is still possible, but not recommended. On |
| 2307 | at build time. On MS-Windows, there are currently three available | 2307 | MS-Windows, there are currently three available font backends: |
| 2308 | font backends: @code{gdi} (the core MS-Windows font driver), | 2308 | @code{gdi} (the core MS-Windows font driver), @code{uniscribe} (font |
| 2309 | @code{uniscribe} (font driver for OTF and TTF fonts with text shaping | 2309 | driver for OTF and TTF fonts with text shaping by the Uniscribe |
| 2310 | by the Uniscribe engine), and @code{harfbuzz} (font driver for OTF and | 2310 | engine), and @code{harfbuzz} (font driver for OTF and TTF fonts with |
| 2311 | TTF fonts with HarfBuzz text shaping) (@pxref{Windows Fonts,,, emacs, | 2311 | HarfBuzz text shaping) (@pxref{Windows Fonts,,, emacs, The GNU Emacs |
| 2312 | The GNU Emacs Manual}). On other systems, there is only one available | 2312 | Manual}). The @code{harfbuzz} driver is similarly recommended. On |
| 2313 | font backend, so it does not make sense to modify this frame | 2313 | other systems, there is only one available font backend, so it does |
| 2314 | parameter. | 2314 | not make sense to modify this frame parameter. |
| 2315 | 2315 | ||
| 2316 | @vindex background-mode@r{, a frame parameter} | 2316 | @vindex background-mode@r{, a frame parameter} |
| 2317 | @item background-mode | 2317 | @item background-mode |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index f568c19544c..75b14d8613f 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3823,7 +3823,11 @@ help the development team find the best solution and avoid unrelated | |||
| 3823 | detours. | 3823 | detours. |
| 3824 | 3824 | ||
| 3825 | To exclude cache-related problems, flush all caches before running the | 3825 | To exclude cache-related problems, flush all caches before running the |
| 3826 | test, @ref{Cleanup remote connections}. | 3826 | test, @ref{Cleanup remote connections}. Alternatively, and often |
| 3827 | better for analysis, reproduce the problem in a clean Emacs session | ||
| 3828 | started with @command{emacs -Q}. Then, @value{tramp} does not load | ||
| 3829 | the persistency file (@pxref{Connection caching}), and it does not use | ||
| 3830 | passwords from @file{auth-source.el} (@pxref{Password handling}). | ||
| 3827 | 3831 | ||
| 3828 | When including @value{tramp}'s messages in the bug report, increase | 3832 | When including @value{tramp}'s messages in the bug report, increase |
| 3829 | the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the | 3833 | the verbosity level to 6 (@pxref{Traces and Profiles, Traces}) in the |
diff --git a/lisp/ido.el b/lisp/ido.el index 83b88e4e81c..355be5eaa66 100644 --- a/lisp/ido.el +++ b/lisp/ido.el | |||
| @@ -4492,6 +4492,8 @@ For details of keybindings, see `ido-find-file'." | |||
| 4492 | (ido-tidy)) | 4492 | (ido-tidy)) |
| 4493 | (throw 'ido contents)))) | 4493 | (throw 'ido contents)))) |
| 4494 | 4494 | ||
| 4495 | (defvar ido--overlay nil) | ||
| 4496 | |||
| 4495 | (defun ido-exhibit () | 4497 | (defun ido-exhibit () |
| 4496 | "Post command hook for Ido." | 4498 | "Post command hook for Ido." |
| 4497 | ;; Find matching files and display a list in the minibuffer. | 4499 | ;; Find matching files and display a list in the minibuffer. |
| @@ -4726,7 +4728,13 @@ For details of keybindings, see `ido-find-file'." | |||
| 4726 | (let ((inf (ido-completions contents))) | 4728 | (let ((inf (ido-completions contents))) |
| 4727 | (setq ido-show-confirm-message nil) | 4729 | (setq ido-show-confirm-message nil) |
| 4728 | (ido-trace "inf" inf) | 4730 | (ido-trace "inf" inf) |
| 4729 | (insert inf)) | 4731 | (when ido--overlay |
| 4732 | (delete-overlay ido--overlay)) | ||
| 4733 | (let ((o (make-overlay (point-max) (point-max) nil t t))) | ||
| 4734 | (when (> (length inf) 0) | ||
| 4735 | (put-text-property 0 1 'cursor t inf)) | ||
| 4736 | (overlay-put o 'after-string inf) | ||
| 4737 | (setq ido--overlay o))) | ||
| 4730 | )))) | 4738 | )))) |
| 4731 | 4739 | ||
| 4732 | (defun ido-completions (name) | 4740 | (defun ido-completions (name) |
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 4831bf72e9d..0589211877a 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el | |||
| @@ -766,7 +766,7 @@ and `clear-minibuffer-message' called automatically via | |||
| 766 | (defun set-minibuffer-message (message) | 766 | (defun set-minibuffer-message (message) |
| 767 | "Temporarily display MESSAGE at the end of the minibuffer. | 767 | "Temporarily display MESSAGE at the end of the minibuffer. |
| 768 | The text is displayed for `minibuffer-message-clear-timeout' seconds | 768 | The text is displayed for `minibuffer-message-clear-timeout' seconds |
| 769 | (if the value is a number), or until the next input event arrives, | 769 | \(if the value is a number), or until the next input event arrives, |
| 770 | whichever comes first. | 770 | whichever comes first. |
| 771 | Unlike `minibuffer-message', this function is called automatically | 771 | Unlike `minibuffer-message', this function is called automatically |
| 772 | via `set-message-function'." | 772 | via `set-message-function'." |
| @@ -790,8 +790,14 @@ via `set-message-function'." | |||
| 790 | ;; The current C cursor code doesn't know to use the overlay's | 790 | ;; The current C cursor code doesn't know to use the overlay's |
| 791 | ;; marker's stickiness to figure out whether to place the cursor | 791 | ;; marker's stickiness to figure out whether to place the cursor |
| 792 | ;; before or after the string, so let's spoon-feed it the pos. | 792 | ;; before or after the string, so let's spoon-feed it the pos. |
| 793 | (put-text-property 0 1 'cursor t message)) | 793 | (put-text-property 0 1 'cursor 1 message)) |
| 794 | (overlay-put minibuffer-message-overlay 'after-string message) | 794 | (overlay-put minibuffer-message-overlay 'after-string message) |
| 795 | ;; Make sure the overlay with the message is displayed before | ||
| 796 | ;; any other overlays in that position, in case they have | ||
| 797 | ;; resize-mini-windows set to nil and the other overlay strings | ||
| 798 | ;; are too long for the mini-window width. This makes sure the | ||
| 799 | ;; temporary message will always be visible. | ||
| 800 | (overlay-put minibuffer-message-overlay 'priority 1100) | ||
| 795 | 801 | ||
| 796 | (when (numberp minibuffer-message-clear-timeout) | 802 | (when (numberp minibuffer-message-clear-timeout) |
| 797 | (setq minibuffer-message-timer | 803 | (setq minibuffer-message-timer |
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el index d4984bbd38b..85868b91ecc 100644 --- a/lisp/vc/smerge-mode.el +++ b/lisp/vc/smerge-mode.el | |||
| @@ -797,7 +797,10 @@ An error is raised if not inside a conflict." | |||
| 797 | (filename (or (match-string 1) "")) | 797 | (filename (or (match-string 1) "")) |
| 798 | 798 | ||
| 799 | (_ (re-search-forward smerge-end-re)) | 799 | (_ (re-search-forward smerge-end-re)) |
| 800 | (_ (cl-assert (< orig-point (match-end 0)))) | 800 | (_ (when (< (match-end 0) orig-point) |
| 801 | ;; Point is not within the conflict we found, | ||
| 802 | ;; so this conflict is not ours. | ||
| 803 | (signal 'search-failed (list smerge-begin-re)))) | ||
| 801 | 804 | ||
| 802 | (lower-end (match-beginning 0)) | 805 | (lower-end (match-beginning 0)) |
| 803 | (end (match-end 0)) | 806 | (end (match-end 0)) |
diff --git a/src/dispnew.c b/src/dispnew.c index 9af1ce259d4..d094ca61798 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -3743,11 +3743,10 @@ gui_update_window_end (struct window *w, bool cursor_on_p, | |||
| 3743 | { | 3743 | { |
| 3744 | struct frame *f = XFRAME (WINDOW_FRAME (w)); | 3744 | struct frame *f = XFRAME (WINDOW_FRAME (w)); |
| 3745 | 3745 | ||
| 3746 | block_input (); | ||
| 3747 | |||
| 3748 | /* Pseudo windows don't have cursors, so don't display them here. */ | 3746 | /* Pseudo windows don't have cursors, so don't display them here. */ |
| 3749 | if (!w->pseudo_window_p) | 3747 | if (!w->pseudo_window_p) |
| 3750 | { | 3748 | { |
| 3749 | block_input (); | ||
| 3751 | 3750 | ||
| 3752 | if (cursor_on_p) | 3751 | if (cursor_on_p) |
| 3753 | display_and_set_cursor (w, true, | 3752 | display_and_set_cursor (w, true, |
| @@ -3761,6 +3760,7 @@ gui_update_window_end (struct window *w, bool cursor_on_p, | |||
| 3761 | else | 3760 | else |
| 3762 | gui_draw_vertical_border (w); | 3761 | gui_draw_vertical_border (w); |
| 3763 | } | 3762 | } |
| 3763 | unblock_input (); | ||
| 3764 | } | 3764 | } |
| 3765 | 3765 | ||
| 3766 | /* If a row with mouse-face was overwritten, arrange for | 3766 | /* 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, | |||
| 3778 | FRAME_RIF (f)->update_window_end_hook (w, | 3778 | FRAME_RIF (f)->update_window_end_hook (w, |
| 3779 | cursor_on_p, | 3779 | cursor_on_p, |
| 3780 | mouse_face_overwritten_p); | 3780 | mouse_face_overwritten_p); |
| 3781 | unblock_input (); | ||
| 3782 | } | 3781 | } |
| 3783 | 3782 | ||
| 3784 | #endif /* HAVE_WINDOW_SYSTEM */ | 3783 | #endif /* HAVE_WINDOW_SYSTEM */ |
| @@ -4360,6 +4359,14 @@ scrolling_window (struct window *w, int tab_line_p) | |||
| 4360 | return 0; | 4359 | return 0; |
| 4361 | #endif | 4360 | #endif |
| 4362 | 4361 | ||
| 4362 | /* Can't scroll the display of w32 GUI frames when position of point | ||
| 4363 | is indicated by the system caret, because scrolling the display | ||
| 4364 | will then "copy" the pixles used by the caret. */ | ||
| 4365 | #ifdef HAVE_NTGUI | ||
| 4366 | if (w32_use_visible_system_caret) | ||
| 4367 | return 0; | ||
| 4368 | #endif | ||
| 4369 | |||
| 4363 | /* Give up if some rows in the desired matrix are not enabled. */ | 4370 | /* Give up if some rows in the desired matrix are not enabled. */ |
| 4364 | if (! MATRIX_ROW_ENABLED_P (desired_matrix, i)) | 4371 | if (! MATRIX_ROW_ENABLED_P (desired_matrix, i)) |
| 4365 | return -1; | 4372 | return -1; |
diff --git a/src/w32term.c b/src/w32term.c index c38e7409d90..4eb5045fc5b 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -560,7 +560,8 @@ static void | |||
| 560 | w32_update_window_begin (struct window *w) | 560 | w32_update_window_begin (struct window *w) |
| 561 | { | 561 | { |
| 562 | /* Hide the system caret during an update. */ | 562 | /* Hide the system caret during an update. */ |
| 563 | if (w32_use_visible_system_caret && w32_system_caret_hwnd) | 563 | if (w32_use_visible_system_caret && w32_system_caret_hwnd |
| 564 | && w == w32_system_caret_window) | ||
| 564 | { | 565 | { |
| 565 | SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0, | 566 | SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_HIDE_CARET, 0, 0, |
| 566 | 0, 6000, NULL); | 567 | 0, 6000, NULL); |
| @@ -657,7 +658,8 @@ w32_update_window_end (struct window *w, bool cursor_on_p, | |||
| 657 | /* Unhide the caret. This won't actually show the cursor, unless it | 658 | /* Unhide the caret. This won't actually show the cursor, unless it |
| 658 | was visible before the corresponding call to HideCaret in | 659 | was visible before the corresponding call to HideCaret in |
| 659 | w32_update_window_begin. */ | 660 | w32_update_window_begin. */ |
| 660 | if (w32_use_visible_system_caret && w32_system_caret_hwnd) | 661 | if (w32_use_visible_system_caret && w32_system_caret_hwnd |
| 662 | && w == w32_system_caret_window) | ||
| 661 | { | 663 | { |
| 662 | SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0, | 664 | SendMessageTimeout (w32_system_caret_hwnd, WM_EMACS_SHOW_CARET, 0, 0, |
| 663 | 0, 6000, NULL); | 665 | 0, 6000, NULL); |
diff --git a/src/xdisp.c b/src/xdisp.c index 516013ce4ba..a5efbb39bed 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -19191,6 +19191,14 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 19191 | if (!NILP (Vdisplay_line_numbers)) | 19191 | if (!NILP (Vdisplay_line_numbers)) |
| 19192 | return false; | 19192 | return false; |
| 19193 | 19193 | ||
| 19194 | /* Can't scroll the display of w32 GUI frames when position of point | ||
| 19195 | is indicated by the system caret, because scrolling the display | ||
| 19196 | will then "copy" the pixles used by the caret. */ | ||
| 19197 | #ifdef HAVE_NTGUI | ||
| 19198 | if (w32_use_visible_system_caret) | ||
| 19199 | return false; | ||
| 19200 | #endif | ||
| 19201 | |||
| 19194 | /* The variable new_start now holds the new window start. The old | 19202 | /* The variable new_start now holds the new window start. The old |
| 19195 | start `start' can be determined from the current matrix. */ | 19203 | start `start' can be determined from the current matrix. */ |
| 19196 | SET_TEXT_POS_FROM_MARKER (new_start, w->start); | 19204 | SET_TEXT_POS_FROM_MARKER (new_start, w->start); |
| @@ -20175,6 +20183,15 @@ try_window_id (struct window *w) | |||
| 20175 | if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row)) | 20183 | if (MATRIX_ROW_START_CHARPOS (row) == MATRIX_ROW_END_CHARPOS (row)) |
| 20176 | GIVE_UP (20); | 20184 | GIVE_UP (20); |
| 20177 | 20185 | ||
| 20186 | /* Can't let scroll_run_hook below run on w32 GUI frames when | ||
| 20187 | position of point is indicated by the system caret, because | ||
| 20188 | scrolling the display will then "copy" the pixles used by the | ||
| 20189 | caret. */ | ||
| 20190 | #ifdef HAVE_NTGUI | ||
| 20191 | if (FRAME_W32_P (f) && w32_use_visible_system_caret) | ||
| 20192 | GIVE_UP (25); | ||
| 20193 | #endif | ||
| 20194 | |||
| 20178 | /* Compute the position at which we have to start displaying new | 20195 | /* Compute the position at which we have to start displaying new |
| 20179 | lines. Some of the lines at the top of the window might be | 20196 | lines. Some of the lines at the top of the window might be |
| 20180 | reusable because they are not displaying changed text. Find the | 20197 | reusable because they are not displaying changed text. Find the |