1
Fork 0
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:
Richard M. Stallman 1993-08-12 22:21:12 +00:00
parent 3070929adb
commit 324710caf5

View file

@ -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.