aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2020-01-22 07:55:18 -0800
committerGlenn Morris2020-01-22 07:55:18 -0800
commit5715eb94e90b33ace59dd4c4ccb6e2122bc6db72 (patch)
tree1c3aef6f5135b25738cd0d3a98ad807ec698ac1e /lisp
parenta1bfb926ca484190298045fc9e775002fe872bb5 (diff)
parent3b0938c0420de2b845e7e8f8fbbb57ddc61718f2 (diff)
downloademacs-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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ido.el10
-rw-r--r--lisp/minibuffer.el10
-rw-r--r--lisp/vc/smerge-mode.el5
3 files changed, 21 insertions, 4 deletions
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.
768The text is displayed for `minibuffer-message-clear-timeout' seconds 768The 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,
770whichever comes first. 770whichever comes first.
771Unlike `minibuffer-message', this function is called automatically 771Unlike `minibuffer-message', this function is called automatically
772via `set-message-function'." 772via `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))