aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2000-12-08 00:06:01 +0000
committerKenichi Handa2000-12-08 00:06:01 +0000
commit58d2b9863b1ef9bc95be089ca8def335fd4c481e (patch)
tree5b0dbb3ec6cff17510f7643ae43e05d53c74c0e6
parentf9d5f611fd465e02e6155c494abd9542328e964f (diff)
downloademacs-58d2b9863b1ef9bc95be089ca8def335fd4c481e.tar.gz
emacs-58d2b9863b1ef9bc95be089ca8def335fd4c481e.zip
(quail-insert-decode-map): Check the
frame width of a window displaying the current buffer, not that of the selected frame. (quail-help): Make sure that the help buffer has window before inserting text in it.
-rw-r--r--lisp/international/quail.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 805cf203bbb..02ebd110a8e 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -2306,7 +2306,8 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
2306 (or (> (length x) (length y)) 2306 (or (> (length x) (length y))
2307 (and (= (length x) (length y)) 2307 (and (= (length x) (length y))
2308 (not (string< x y)))))))) 2308 (not (string< x y))))))))
2309 (let ((frame-width (frame-width)) 2309 (let ((frame-width (frame-width (window-frame (get-buffer-window
2310 (current-buffer) 'visible))))
2310 (single-key-width 3) 2311 (single-key-width 3)
2311 (single-trans-width 4) 2312 (single-trans-width 4)
2312 (multiple-key-width 3) 2313 (multiple-key-width 3)
@@ -2399,10 +2400,17 @@ package to describe."
2399 (setq package (assoc package quail-package-alist)) 2400 (setq package (assoc package quail-package-alist))
2400 (setq package quail-current-package)) 2401 (setq package quail-current-package))
2401 (let ((help-xref-mule-regexp help-xref-mule-regexp-template)) 2402 (let ((help-xref-mule-regexp help-xref-mule-regexp-template))
2403 ;; At first, make sure that the help buffer has window.
2402 (with-output-to-temp-buffer "*Help*" 2404 (with-output-to-temp-buffer "*Help*"
2403 (save-excursion 2405 (save-excursion
2404 (set-buffer standard-output) 2406 (set-buffer standard-output)
2405 (setq quail-current-package package) 2407 (setq quail-current-package package)))
2408 ;; Then, insert text in the help buffer while paying attention to
2409 ;; the width of the frame in which the buffer displayed.
2410 (save-excursion
2411 (progn
2412 (set-buffer (get-buffer "*Help*"))
2413 (setq buffer-read-only nil)
2406 (insert "Input method: " (quail-name) 2414 (insert "Input method: " (quail-name)
2407 " (mode line indicator:" 2415 " (mode line indicator:"
2408 (quail-title) 2416 (quail-title)