diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/international/quail.el | 147 |
2 files changed, 80 insertions, 72 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 654926e7e9d..158d4024f65 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2000-12-20 Miles Bader <miles@gnu.org> | ||
| 2 | |||
| 3 | * international/quail.el (quail-help): Resize the help window | ||
| 4 | again after it has all its contents. Remove unneeded progn. | ||
| 5 | |||
| 1 | 2000-12-19 Gerd Moellmann <gerd@gnu.org> | 6 | 2000-12-19 Gerd Moellmann <gerd@gnu.org> |
| 2 | 7 | ||
| 3 | * pcmpl-linux.el: Fix copy/paste error. | 8 | * pcmpl-linux.el: Fix copy/paste error. |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index df9abb99675..8e378104898 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; quail.el --- Provides simple input method for multilingual text | 1 | ;;; quail.el --- Provides simple input method for multilingual text |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | 3 | ;; Copyright (C) 1995, 2000 Electrotechnical Laboratory, JAPAN. |
| 4 | ;; Licensed to the Free Software Foundation. | 4 | ;; Licensed to the Free Software Foundation. |
| 5 | 5 | ||
| 6 | ;; Author: Kenichi HANDA <handa@etl.go.jp> | 6 | ;; Author: Kenichi HANDA <handa@etl.go.jp> |
| @@ -2407,54 +2407,53 @@ package to describe." | |||
| 2407 | ;; Then, insert text in the help buffer while paying attention to | 2407 | ;; Then, insert text in the help buffer while paying attention to |
| 2408 | ;; the width of the frame in which the buffer displayed. | 2408 | ;; the width of the frame in which the buffer displayed. |
| 2409 | (save-excursion | 2409 | (save-excursion |
| 2410 | (progn | 2410 | (set-buffer (get-buffer "*Help*")) |
| 2411 | (set-buffer (get-buffer "*Help*")) | 2411 | (setq buffer-read-only nil) |
| 2412 | (setq buffer-read-only nil) | 2412 | (insert "Input method: " (quail-name) |
| 2413 | (insert "Input method: " (quail-name) | 2413 | " (mode line indicator:" |
| 2414 | " (mode line indicator:" | 2414 | (quail-title) |
| 2415 | (quail-title) | 2415 | ")\n\n") |
| 2416 | ")\n\n") | 2416 | (save-restriction |
| 2417 | (save-restriction | 2417 | (narrow-to-region (point) (point)) |
| 2418 | (narrow-to-region (point) (point)) | 2418 | (insert (quail-docstring)) |
| 2419 | (insert (quail-docstring)) | 2419 | (goto-char (point-min)) |
| 2420 | (goto-char (point-min)) | 2420 | (with-syntax-table emacs-lisp-mode-syntax-table |
| 2421 | (with-syntax-table emacs-lisp-mode-syntax-table | 2421 | (while (re-search-forward "\\\\<\\sw\\(\\sw\\|\\s_\\)+>" nil t) |
| 2422 | (while (re-search-forward "\\\\<\\sw\\(\\sw\\|\\s_\\)+>" nil t) | 2422 | (let ((sym (intern-soft |
| 2423 | (let ((sym (intern-soft | 2423 | (buffer-substring (+ (match-beginning 0) 2) |
| 2424 | (buffer-substring (+ (match-beginning 0) 2) | 2424 | (1- (point)))))) |
| 2425 | (1- (point)))))) | 2425 | (if (and (boundp sym) |
| 2426 | (if (and (boundp sym) | 2426 | (stringp (symbol-value sym))) |
| 2427 | (stringp (symbol-value sym))) | 2427 | (replace-match (symbol-value sym) t t))))) |
| 2428 | (replace-match (symbol-value sym) t t))))) | 2428 | (goto-char (point-max))) |
| 2429 | (goto-char (point-max))) | 2429 | (or (bolp) |
| 2430 | (or (bolp) | 2430 | (insert "\n")) |
| 2431 | (insert "\n")) | 2431 | (insert "\n") |
| 2432 | (insert "\n") | 2432 | |
| 2433 | 2433 | (let ((done-list nil)) | |
| 2434 | (let ((done-list nil)) | 2434 | ;; Show keyboard layout if the current package requests it.. |
| 2435 | ;; Show keyboard layout if the current package requests it.. | 2435 | (when (quail-show-layout) |
| 2436 | (when (quail-show-layout) | 2436 | (insert " |
| 2437 | (insert " | ||
| 2438 | KEYBOARD LAYOUT | 2437 | KEYBOARD LAYOUT |
| 2439 | --------------- | 2438 | --------------- |
| 2440 | This input method works by translating individual input characters. | 2439 | This input method works by translating individual input characters. |
| 2441 | Assuming that your actual keyboard has the `") | 2440 | Assuming that your actual keyboard has the `") |
| 2442 | (help-insert-xref-button | 2441 | (help-insert-xref-button |
| 2443 | quail-keyboard-layout-type | 2442 | quail-keyboard-layout-type |
| 2444 | #'quail-show-keyboard-layout quail-keyboard-layout-type | 2443 | #'quail-show-keyboard-layout quail-keyboard-layout-type |
| 2445 | "mouse-2, RET: show this layout") | 2444 | "mouse-2, RET: show this layout") |
| 2446 | (insert "' layout, | 2445 | (insert "' layout, |
| 2447 | translation results in the following \"virtual\" keyboard layout: | 2446 | translation results in the following \"virtual\" keyboard layout: |
| 2448 | ") | 2447 | ") |
| 2449 | (setq done-list | 2448 | (setq done-list |
| 2450 | (quail-insert-kbd-layout quail-keyboard-layout)) | 2449 | (quail-insert-kbd-layout quail-keyboard-layout)) |
| 2451 | (insert "If your keyboard has a different layout, rearranged from | 2450 | (insert "If your keyboard has a different layout, rearranged from |
| 2452 | `") | 2451 | `") |
| 2453 | (help-insert-xref-button | 2452 | (help-insert-xref-button |
| 2454 | "standard" | 2453 | "standard" |
| 2455 | #'quail-show-keyboard-layout "standard" | 2454 | #'quail-show-keyboard-layout "standard" |
| 2456 | "mouse-2, RET: show this layout") | 2455 | "mouse-2, RET: show this layout") |
| 2457 | (insert "', the \"virtual\" keyboard you get with this input method | 2456 | (insert "', the \"virtual\" keyboard you get with this input method |
| 2458 | will be rearranged in the same way. | 2457 | will be rearranged in the same way. |
| 2459 | 2458 | ||
| 2460 | You can set the variable `quail-keyboard-layout-type' to specify | 2459 | You can set the variable `quail-keyboard-layout-type' to specify |
| @@ -2462,43 +2461,47 @@ the physical layout of your keyboard; the tables shown in | |||
| 2462 | documentation of input methods including this one are based on the | 2461 | documentation of input methods including this one are based on the |
| 2463 | physical keyboard layout as specified with that variable. | 2462 | physical keyboard layout as specified with that variable. |
| 2464 | ") | 2463 | ") |
| 2465 | (help-insert-xref-button | 2464 | (help-insert-xref-button |
| 2466 | "[customize keyboard layout]" | 2465 | "[customize keyboard layout]" |
| 2467 | #'customize-variable 'quail-keyboard-layout-type | 2466 | #'customize-variable 'quail-keyboard-layout-type |
| 2468 | "mouse-2, RET: set keyboard layout type") | 2467 | "mouse-2, RET: set keyboard layout type") |
| 2469 | (insert "\n")) | 2468 | (insert "\n")) |
| 2470 | 2469 | ||
| 2471 | ;; Show key sequences. | 2470 | ;; Show key sequences. |
| 2472 | (let ((decode-map (list 'decode-map)) | 2471 | (let ((decode-map (list 'decode-map)) |
| 2473 | elt pos num) | 2472 | elt pos num) |
| 2474 | (setq num (quail-build-decode-map (list (quail-map)) "" decode-map | 2473 | (setq num (quail-build-decode-map (list (quail-map)) "" decode-map |
| 2475 | 0 512 done-list)) | 2474 | 0 512 done-list)) |
| 2476 | (when (> num 0) | 2475 | (when (> num 0) |
| 2477 | (insert " | 2476 | (insert " |
| 2478 | KEY SEQUENCE | 2477 | KEY SEQUENCE |
| 2479 | ----------- | 2478 | ----------- |
| 2480 | ") | 2479 | ") |
| 2481 | (if (quail-show-layout) | 2480 | (if (quail-show-layout) |
| 2482 | (insert "You can also input more characters") | 2481 | (insert "You can also input more characters") |
| 2483 | (insert "You can input characters")) | 2482 | (insert "You can input characters")) |
| 2484 | (insert " by the following key sequences:\n") | 2483 | (insert " by the following key sequences:\n") |
| 2485 | (quail-insert-decode-map decode-map)))) | 2484 | (quail-insert-decode-map decode-map)))) |
| 2486 | 2485 | ||
| 2487 | (quail-help-insert-keymap-description | 2486 | (quail-help-insert-keymap-description |
| 2488 | (quail-translation-keymap) | 2487 | (quail-translation-keymap) |
| 2489 | "\ | 2488 | "\ |
| 2490 | KEY BINDINGS FOR TRANSLATION | 2489 | KEY BINDINGS FOR TRANSLATION |
| 2491 | ----------------------------\n") | 2490 | ----------------------------\n") |
| 2492 | (insert ?\n) | 2491 | (insert ?\n) |
| 2493 | (if (quail-conversion-keymap) | 2492 | (if (quail-conversion-keymap) |
| 2494 | (quail-help-insert-keymap-description | 2493 | (quail-help-insert-keymap-description |
| 2495 | (quail-conversion-keymap) | 2494 | (quail-conversion-keymap) |
| 2496 | "\ | 2495 | "\ |
| 2497 | KEY BINDINGS FOR CONVERSION | 2496 | KEY BINDINGS FOR CONVERSION |
| 2498 | ---------------------------\n")) | 2497 | ---------------------------\n")) |
| 2499 | (help-setup-xref (list #'quail-help (quail-name)) | 2498 | (help-setup-xref (list #'quail-help (quail-name)) |
| 2500 | (interactive-p)) | 2499 | (interactive-p)) |
| 2501 | (setq quail-current-package nil))))) | 2500 | (setq quail-current-package nil) |
| 2501 | ;; Resize the help window again, now that it has all its contents. | ||
| 2502 | (save-selected-window | ||
| 2503 | (select-window (get-buffer-window (current-buffer))) | ||
| 2504 | (run-hooks 'temp-buffer-show-hook))))) | ||
| 2502 | 2505 | ||
| 2503 | (defun quail-help-insert-keymap-description (keymap &optional header) | 2506 | (defun quail-help-insert-keymap-description (keymap &optional header) |
| 2504 | (let (pos1 pos2 eol) | 2507 | (let (pos1 pos2 eol) |