comparison lisp/international/quail.el @ 31584:a5e682286ab6

(quail-start-translation): Translate KEY if necessary even if it doesn't have any mapping in the current input method. (quail-start-conversion): Likewise. (quail-help): The output message is improved.
author Kenichi Handa <handa@m17n.org>
date Wed, 13 Sep 2000 12:10:29 +0000
parents 84fcbc8496b7
children c6cdd9deac21
comparison
equal deleted inserted replaced
31583:d147cc8cb658 31584:a5e682286ab6
1347 (if (and input-method-exit-on-first-char generated-events) 1347 (if (and input-method-exit-on-first-char generated-events)
1348 (list (car generated-events)) 1348 (list (car generated-events))
1349 generated-events)) 1349 generated-events))
1350 1350
1351 ;; Since KEY doesn't start any translation, just return it. 1351 ;; Since KEY doesn't start any translation, just return it.
1352 ;; But, translate KEY if necessary.
1353 (if (and (integerp key)
1354 (quail-kbd-translate))
1355 (setq key (quail-keyboard-translate key)))
1352 (list key))) 1356 (list key)))
1353 1357
1354 (defun quail-start-conversion (key) 1358 (defun quail-start-conversion (key)
1355 "Start conversion of the typed character KEY by the current Quail package." 1359 "Start conversion of the typed character KEY by the current Quail package."
1356 ;; Check the possibility of translating KEY. 1360 ;; Check the possibility of translating KEY.
1427 (if (and input-method-exit-on-first-char generated-events) 1431 (if (and input-method-exit-on-first-char generated-events)
1428 (list (car generated-events)) 1432 (list (car generated-events))
1429 generated-events)) 1433 generated-events))
1430 1434
1431 ;; Since KEY doesn't start any translation, just return it. 1435 ;; Since KEY doesn't start any translation, just return it.
1436 ;; But, translate KEY if necessary.
1437 (if (and (integerp key)
1438 (quail-kbd-translate))
1439 (setq key (quail-keyboard-translate key)))
1432 (list key))) 1440 (list key)))
1433 1441
1434 (defun quail-terminate-translation () 1442 (defun quail-terminate-translation ()
1435 "Terminate the translation of the current key." 1443 "Terminate the translation of the current key."
1436 (setq quail-translating nil) 1444 (setq quail-translating nil)
2405 ;; Show keyboard layout if the current package requests it.. 2413 ;; Show keyboard layout if the current package requests it..
2406 (when (quail-show-layout) 2414 (when (quail-show-layout)
2407 (insert " 2415 (insert "
2408 KEYBOARD LAYOUT 2416 KEYBOARD LAYOUT
2409 --------------- 2417 ---------------
2410 Physical key layout for this input method is as below. 2418 This input method is designed to pretend you are using a keyboard
2411 You can input a character in the table by typing a key 2419 with the following \"virtual\" layout:
2412 at the same location on your keyboard.\n") 2420 ")
2413 (setq done-list 2421 (setq done-list
2414 (quail-insert-kbd-layout quail-keyboard-layout)) 2422 (quail-insert-kbd-layout quail-keyboard-layout))
2415 (insert "It is assumed that your keyboard type is `") 2423 (insert "\
2424 The input method implements that result by assuming you have
2425 a `")
2416 (help-insert-xref-button 2426 (help-insert-xref-button
2417 quail-keyboard-layout-type 2427 quail-keyboard-layout-type
2418 #'quail-show-keyboard-layout quail-keyboard-layout-type 2428 #'quail-show-keyboard-layout quail-keyboard-layout-type
2419 "mouse-2, RET: show this layout") 2429 "mouse-2, RET: show this layout")
2420 (insert "'. 2430 (insert "' keyboard layout, and translating characters accordingly.
2421 If the layout is different from your keyboard, or you see the 2431 If the layout is different from your keyboard, or you see the
2422 different characters when you type keys according to this layout, 2432 different characters when you type keys according to this layout,
2423 adjust the variable `quail-keyboard-layout-type' ") 2433 adjust the variable `quail-keyboard-layout-type' ")
2424 (help-insert-xref-button 2434 (help-insert-xref-button
2425 "[customize it]" 2435 "[customize it]"