diff options
| author | Miles Bader | 2000-10-21 05:50:56 +0000 |
|---|---|---|
| committer | Miles Bader | 2000-10-21 05:50:56 +0000 |
| commit | feb5013d7cb2a3604b0a1f8bab63e57bfb56723a (patch) | |
| tree | 33eb55f6b647bd53932fd1f74a1b009043d97442 | |
| parent | d9c30bdf7f12f3201c767e1f6890fb6bf1c480e6 (diff) | |
| download | emacs-feb5013d7cb2a3604b0a1f8bab63e57bfb56723a.tar.gz emacs-feb5013d7cb2a3604b0a1f8bab63e57bfb56723a.zip | |
(quail-update-guidance):
Use `fit-window-to-buffer' instead of `set-window-text-height'.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/international/quail.el | 28 |
2 files changed, 16 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 42eebf899ff..0d2620d77c3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -3,6 +3,8 @@ | |||
| 3 | * window.el (fit-window-to-buffer): New function. | 3 | * window.el (fit-window-to-buffer): New function. |
| 4 | (shrink-window-if-larger-than-buffer): Use it. | 4 | (shrink-window-if-larger-than-buffer): Use it. |
| 5 | * help.el (resize-temp-buffer-window): Use `fit-window-to-buffer'. | 5 | * help.el (resize-temp-buffer-window): Use `fit-window-to-buffer'. |
| 6 | * international/quail.el (quail-update-guidance): Use | ||
| 7 | `fit-window-to-buffer' instead of `set-window-text-height'. | ||
| 6 | 8 | ||
| 7 | * international/quail.el (quail-show-guidance-buf): Make sure | 9 | * international/quail.el (quail-show-guidance-buf): Make sure |
| 8 | guidance window really has enough room. | 10 | guidance window really has enough room. |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 2743126b089..40357e5cbf9 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1955,19 +1955,10 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1955 | ;; Update guidance buffer. | 1955 | ;; Update guidance buffer. |
| 1956 | (if (quail-require-guidance-buf) | 1956 | (if (quail-require-guidance-buf) |
| 1957 | (let ((guidance (quail-guidance))) | 1957 | (let ((guidance (quail-guidance))) |
| 1958 | (if (not (and (eq (selected-frame) (window-frame (minibuffer-window))) | 1958 | (unless (and (eq (selected-frame) (window-frame (minibuffer-window))) |
| 1959 | (eq (selected-frame) (window-frame quail-guidance-win)))) | 1959 | (eq (selected-frame) (window-frame quail-guidance-win))) |
| 1960 | ;; The guidance window is not show in this frame, show it | 1960 | ;; The guidance window is not show in this frame, show it |
| 1961 | (quail-show-guidance-buf) | 1961 | (quail-show-guidance-buf)) |
| 1962 | ;; Make sure the height of the guidance window is OK -- | ||
| 1963 | ;; sometimes, if the minibuffer window expands due to user | ||
| 1964 | ;; input (for instance if the newly inserted character is in a | ||
| 1965 | ;; different font), it will cause the guidance window to be | ||
| 1966 | ;; only partially visible. We force a redisplay first because | ||
| 1967 | ;; this automatic expansion doesn't happen until then, and we | ||
| 1968 | ;; want to see the window sizes after the expansion. | ||
| 1969 | (sit-for 0) | ||
| 1970 | (set-window-text-height quail-guidance-win 1)) | ||
| 1971 | (cond ((or (eq guidance t) | 1962 | (cond ((or (eq guidance t) |
| 1972 | (consp guidance)) | 1963 | (consp guidance)) |
| 1973 | ;; Show the current possible translations. | 1964 | ;; Show the current possible translations. |
| @@ -1980,7 +1971,16 @@ or in a newly created frame (if the selected frame has no other windows)." | |||
| 1980 | (save-excursion | 1971 | (save-excursion |
| 1981 | (set-buffer quail-guidance-buf) | 1972 | (set-buffer quail-guidance-buf) |
| 1982 | (erase-buffer) | 1973 | (erase-buffer) |
| 1983 | (insert key))))))) | 1974 | (insert key))))) |
| 1975 | ;; Make sure the height of the guidance window is OK -- | ||
| 1976 | ;; sometimes, if the minibuffer window expands due to user | ||
| 1977 | ;; input (for instance if the newly inserted character is in a | ||
| 1978 | ;; different font), it will cause the guidance window to be | ||
| 1979 | ;; only partially visible. We force a redisplay first because | ||
| 1980 | ;; this automatic expansion doesn't happen until then, and we | ||
| 1981 | ;; want to see the window sizes after the expansion. | ||
| 1982 | (sit-for 0) | ||
| 1983 | (fit-window-to-buffer quail-guidance-win nil 1)))) | ||
| 1984 | 1984 | ||
| 1985 | ;; Update completion buffer if displayed now. We highlight the | 1985 | ;; Update completion buffer if displayed now. We highlight the |
| 1986 | ;; selected candidate string in *Completion* buffer if any. | 1986 | ;; selected candidate string in *Completion* buffer if any. |