mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 12:21:25 -08:00
(mouse-choose-completion): Really go to minibuffer; no save-excursion.
This commit is contained in:
parent
3070929adb
commit
324710caf5
1 changed files with 9 additions and 10 deletions
|
|
@ -880,16 +880,15 @@ and selects that window."
|
|||
(let ((beg (point)))
|
||||
(skip-chars-forward "^ \t\n")
|
||||
(setq choice (buffer-substring beg (point))))))
|
||||
(save-excursion
|
||||
(set-buffer (window-buffer (minibuffer-window)))
|
||||
(goto-char (max (point-min) (- (point-max) (length choice))))
|
||||
(while (and (not (eobp))
|
||||
(let ((tail (buffer-substring (point) (point-max))))
|
||||
(not (string= tail (substring choice 0 (length tail))))))
|
||||
(forward-char 1))
|
||||
(insert choice)
|
||||
(delete-region (point) (point-max))
|
||||
(minibuffer-complete-and-exit))))
|
||||
(set-buffer (window-buffer (minibuffer-window)))
|
||||
(goto-char (max (point-min) (- (point-max) (length choice))))
|
||||
(while (and (not (eobp))
|
||||
(let ((tail (buffer-substring (point) (point-max))))
|
||||
(not (string= tail (substring choice 0 (length tail))))))
|
||||
(forward-char 1))
|
||||
(insert choice)
|
||||
(delete-region (point) (point-max))
|
||||
(minibuffer-complete-and-exit)))
|
||||
|
||||
;; Font selection.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue