Mercurial > emacs
comparison lisp/international/quail.el @ 54520:1fb2ee02e2aa
(quail-insert-decode-map): Use window-width instead of frame-width.
author | Juri Linkov <juri@jurta.org> |
---|---|
date | Tue, 23 Mar 2004 07:37:37 +0000 |
parents | eaf2b356b68a |
children | 21d4358a7507 |
comparison
equal
deleted
inserted
replaced
54519:2d359989a04e | 54520:1fb2ee02e2aa |
---|---|
2287 (function (lambda (x y) | 2287 (function (lambda (x y) |
2288 (setq x (car x) y (car y)) | 2288 (setq x (car x) y (car y)) |
2289 (or (> (length x) (length y)) | 2289 (or (> (length x) (length y)) |
2290 (and (= (length x) (length y)) | 2290 (and (= (length x) (length y)) |
2291 (not (string< x y)))))))) | 2291 (not (string< x y)))))))) |
2292 (let ((frame-width (frame-width (window-frame (get-buffer-window | 2292 (let ((window-width (window-width (get-buffer-window |
2293 (current-buffer) 'visible)))) | 2293 (current-buffer) 'visible))) |
2294 (single-key-width 3) | 2294 (single-key-width 3) |
2295 (single-trans-width 4) | 2295 (single-trans-width 4) |
2296 (multiple-key-width 3) | 2296 (multiple-key-width 3) |
2297 (single-list nil) | 2297 (single-list nil) |
2298 (multiple-list nil) | 2298 (multiple-list nil) |
2317 (setq single-key-width width)) | 2317 (setq single-key-width width)) |
2318 (if (> width multiple-key-width) | 2318 (if (> width multiple-key-width) |
2319 (setq multiple-key-width width))) | 2319 (setq multiple-key-width width))) |
2320 (when single-list | 2320 (when single-list |
2321 (setq col-width (+ single-key-width 1 single-trans-width 1) | 2321 (setq col-width (+ single-key-width 1 single-trans-width 1) |
2322 cols (/ frame-width col-width) | 2322 cols (/ window-width col-width) |
2323 rows (/ (length single-list) cols)) | 2323 rows (/ (length single-list) cols)) |
2324 (if (> (% (length single-list) cols) 0) | 2324 (if (> (% (length single-list) cols) 0) |
2325 (setq rows (1+ rows))) | 2325 (setq rows (1+ rows))) |
2326 (insert "key") | 2326 (insert "key") |
2327 (indent-to (1+ single-key-width)) | 2327 (indent-to (1+ single-key-width)) |
2363 (if (vectorp (cdr elt)) | 2363 (if (vectorp (cdr elt)) |
2364 (mapc (function | 2364 (mapc (function |
2365 (lambda (x) | 2365 (lambda (x) |
2366 (let ((width (if (integerp x) (char-width x) | 2366 (let ((width (if (integerp x) (char-width x) |
2367 (string-width x)))) | 2367 (string-width x)))) |
2368 (when (> (+ (current-column) 1 width) frame-width) | 2368 (when (> (+ (current-column) 1 width) window-width) |
2369 (insert "\n") | 2369 (insert "\n") |
2370 (indent-to multiple-key-width)) | 2370 (indent-to multiple-key-width)) |
2371 (insert " " x)))) | 2371 (insert " " x)))) |
2372 (cdr elt)) | 2372 (cdr elt)) |
2373 (insert " " (cdr elt))) | 2373 (insert " " (cdr elt))) |
2400 (let ((temp-buffer-show-hook nil)) | 2400 (let ((temp-buffer-show-hook nil)) |
2401 (with-output-to-temp-buffer (help-buffer) | 2401 (with-output-to-temp-buffer (help-buffer) |
2402 (with-current-buffer standard-output | 2402 (with-current-buffer standard-output |
2403 (setq quail-current-package package-def)))) | 2403 (setq quail-current-package package-def)))) |
2404 ;; Then, insert text in the help buffer while paying attention to | 2404 ;; Then, insert text in the help buffer while paying attention to |
2405 ;; the width of the frame in which the buffer displayed. | 2405 ;; the width of the window in which the buffer displayed. |
2406 (with-current-buffer (help-buffer) | 2406 (with-current-buffer (help-buffer) |
2407 (setq buffer-read-only nil) | 2407 (setq buffer-read-only nil) |
2408 (insert "Input method: " (quail-name) | 2408 (insert "Input method: " (quail-name) |
2409 " (mode line indicator:" | 2409 " (mode line indicator:" |
2410 (quail-title) | 2410 (quail-title) |