• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/international/

Lines Matching defs:method

56 (define-key mule-keymap "\C-\\" 'set-input-method)
78 (define-key-after mule-menu-keymap [toggle-input-method]
79 '(menu-item "Toggle Input Method" toggle-input-method)
81 (define-key-after mule-menu-keymap [set-input-method]
82 '(menu-item "Select Input Method..." set-input-method)
84 (define-key-after mule-menu-keymap [describe-input-method]
85 '(menu-item "Describe Input Method" describe-input-method))
86 (define-key-after mule-menu-keymap [separator-input-method]
106 (define-key-after mule-menu-keymap [describe-input-method]
107 '(menu-item "Describe Input Method..." describe-input-method
108 :help "Keyboard layout for a specific input method")
187 (define-key global-map "\C-\\" 'toggle-input-method)
192 ;; (define-key global-map [?\S- ] 'toggle-input-method)
198 "\\(input method\\)\\|"
1107 input-method value is a default input method for this language
1158 ((eq key 'input-method)
1159 (set-language-environment-input-method lang-env))
1274 in the format of Lisp expression for registering each input method.
1285 ;; (register-input-method
1289 ;; See the function `register-input-method' for the meanings of the arguments.
1298 (defvar leim-list-entry-regexp "^(register-input-method"
1314 (defvar current-input-method nil
1315 "The current input method for multilingual text.
1316 If nil, that means no input method is activated now.")
1317 (make-variable-buffer-local 'current-input-method)
1318 (put 'current-input-method 'permanent-local t)
1320 (defvar current-input-method-title nil
1321 "Title string of the current input method shown in mode line.")
1322 (make-variable-buffer-local 'current-input-method-title)
1323 (put 'current-input-method-title 'permanent-local t)
1325 (defcustom default-input-method nil
1326 "*Default input method for multilingual text (a string).
1327 This is the input method activated automatically by the command
1328 `toggle-input-method' (\\[toggle-input-method])."
1334 :completion-alist input-method-alist
1335 :prompt-history input-method-history))
1338 (put 'input-method-function 'permanent-local t)
1340 (defvar input-method-history nil
1342 (make-variable-buffer-local 'input-method-history)
1343 (put 'input-method-history 'permanent-local t)
1345 (defvar inactivate-current-input-method-function nil
1346 "Function to call for inactivating the current input method.
1347 Every input method should set this to an appropriate value when activated.
1350 This function should never change the value of `current-input-method'.
1351 It is set to nil by the function `inactivate-input-method'.")
1352 (make-variable-buffer-local 'inactivate-current-input-method-function)
1353 (put 'inactivate-current-input-method-function 'permanent-local t)
1355 (defvar describe-current-input-method-function nil
1356 "Function to call for describing the current input method.
1358 (make-variable-buffer-local 'describe-current-input-method-function)
1359 (put 'describe-current-input-method-function 'permanent-local t)
1361 (defvar input-method-alist nil
1362 "Alist of input method names vs how to use them.
1365 See the function `register-input-method' for the meanings of the elements.")
1367 (defun register-input-method (input-method lang-env &rest args)
1368 "Register INPUT-METHOD as an input method for language environment LANG-ENV.
1371 ACTIVATE-FUNC is a function to call to activate this method.
1372 TITLE is a string to show in the mode line when this method is active.
1373 DESCRIPTION is a string describing this method and what it is good for.
1381 In case you want to register a new Quail input method by yourself, be
1382 careful to use the same input method title as given in the third
1386 The commands `describe-input-method' and `list-input-methods' need
1392 (if (symbolp input-method)
1393 (setq input-method (symbol-name input-method)))
1395 (slot (assoc input-method input-method-alist)))
1398 (setq slot (cons input-method info))
1399 (setq input-method-alist (cons slot input-method-alist)))))
1401 (defun read-input-method-name (prompt &optional default inhibit-null)
1402 "Read a name of input method from a minibuffer prompting with PROMPT.
1411 ;; As it is quite normal to change input method in the
1415 ;; This binding is necessary because input-method-history is
1417 (input-method (completing-read prompt input-method-alist
1418 nil t nil 'input-method-history
1420 (if (and input-method (symbolp input-method))
1421 (setq input-method (symbol-name input-method)))
1422 (if (> (length input-method) 0)
1423 input-method
1425 (error "No valid input method is specified")))))
1427 (defun activate-input-method (input-method)
1428 "Switch to input method INPUT-METHOD for the current buffer.
1429 If some other input method is already active, turn it off first.
1430 If INPUT-METHOD is nil, deactivate any current input method."
1431 (if (and input-method (symbolp input-method))
1432 (setq input-method (symbol-name input-method)))
1433 (if (and current-input-method
1434 (not (string= current-input-method input-method)))
1435 (inactivate-input-method))
1436 (unless (or current-input-method (null input-method))
1437 (let ((slot (assoc input-method input-method-alist)))
1439 (error "Can't activate input method `%s'" input-method))
1440 (setq current-input-method-title nil)
1443 (apply (nth 2 slot) input-method (nthcdr 5 slot))
1447 (apply (car func) input-method (nthcdr 5 slot)))
1448 (error "Can't activate input method `%s'" input-method))))
1449 (setq current-input-method input-method)
1450 (or (stringp current-input-method-title)
1451 (setq current-input-method-title (nth 3 slot)))
1453 (run-hooks 'input-method-activate-hook)
1456 (defun inactivate-input-method ()
1457 "Turn off the current input method."
1458 (when current-input-method
1459 (if input-method-history
1460 (unless (string= current-input-method (car input-method-history))
1461 (setq input-method-history
1462 (cons current-input-method
1463 (delete current-input-method input-method-history))))
1464 (setq input-method-history (list current-input-method)))
1466 (funcall inactivate-current-input-method-function)
1468 (run-hooks 'input-method-inactivate-hook)
1469 (setq current-input-method nil
1470 input-method-function nil
1471 current-input-method-title nil)
1474 (defun set-input-method (input-method &optional interactive)
1475 "Select and activate input method INPUT-METHOD for the current buffer.
1476 This also sets the default input method to the one you specify.
1477 If INPUT-METHOD is nil, this function turns off the input method, and
1478 also causes you to be prompted for a name of an input method the next
1479 time you invoke \\[toggle-input-method].
1481 which marks the variable `default-input-method' as set for Custom buffers.
1483 To deactivate the input method interactively, use \\[toggle-input-method].
1484 To deactivate it programmatically, use \\[inactivate-input-method]."
1486 (let* ((default (or (car input-method-history) default-input-method)))
1487 (list (read-input-method-name
1488 (if default "Select input method (default %s): " "Select input method: ")
1491 (activate-input-method input-method)
1492 (setq default-input-method input-method)
1494 (customize-mark-as-set 'default-input-method))
1495 default-input-method)
1497 (defun toggle-input-method (&optional arg interactive)
1498 "Enable or disable multilingual text input method for the current buffer.
1499 Only one input method can be enabled at any time in a given buffer.
1501 The normal action is to enable an input method if none was
1502 enabled, and disable the current one otherwise. Which input method
1504 recently used, or the one specified by `default-input-method', or
1505 as a last resort by reading the name of an input method in the
1508 With a prefix argument, read an input method name with the minibuffer
1509 and enable that one. The default is the most recent input method specified
1510 \(not including the currently active input method, if any).
1513 which marks the variable `default-input-method' as set for Custom buffers."
1516 (if (and current-input-method (not arg))
1517 (inactivate-input-method)
1518 (let ((default (or (car input-method-history) default-input-method)))
1519 (if (and arg default (equal current-input-method default)
1520 (> (length input-method-history) 1))
1521 (setq default (nth 1 input-method-history)))
1522 (activate-input-method
1525 (read-input-method-name
1526 (if default "Input method (default %s): " "Input method: " )
1529 (unless default-input-method
1531 (setq default-input-method current-input-method)
1533 (customize-mark-as-set 'default-input-method)))))))
1535 (defun describe-input-method (input-method)
1536 "Describe input method INPUT-METHOD."
1538 (list (read-input-method-name
1539 "Describe input method (default current choice): ")))
1540 (if (and input-method (symbolp input-method))
1541 (setq input-method (symbol-name input-method)))
1542 (help-setup-xref (list #'describe-input-method
1543 (or input-method current-input-method))
1546 (if (null input-method)
1547 (describe-current-input-method)
1548 (let ((current current-input-method))
1552 (activate-input-method input-method)
1553 (describe-current-input-method))
1554 (activate-input-method current))
1556 (activate-input-method current)
1557 (help-setup-xref (list #'describe-input-method input-method)
1560 (let ((elt (assoc input-method input-method-alist)))
1562 "Input method: %s (`%s' in mode line) for %s\n %s\n"
1563 input-method (nth 3 elt) (nth 1 elt) (nth 4 elt))))))))))
1565 (defun describe-current-input-method ()
1566 "Describe the input method currently in use.
1567 This is a subroutine for `describe-input-method'."
1568 (if current-input-method
1569 (if (and (symbolp describe-current-input-method-function)
1570 (fboundp describe-current-input-method-function))
1571 (funcall describe-current-input-method-function)
1572 (message "No way to describe the current input method `%s'"
1573 current-input-method)
1575 (error "No input method is activated now")))
1577 (defun read-multilingual-string (prompt &optional initial-input input-method)
1579 The input method selected last time is activated in minibuffer.
1582 Optional 3rd argument INPUT-METHOD specifies the input method
1585 (setq input-method
1586 (or input-method
1587 current-input-method
1588 default-input-method
1589 (read-input-method-name "Input method: " nil t)))
1590 (if (and input-method (symbolp input-method))
1591 (setq input-method (symbol-name input-method)))
1592 (let ((prev-input-method current-input-method))
1595 (activate-input-method input-method)
1597 (activate-input-method prev-input-method))))
1602 (defcustom input-method-verbose-flag 'default
1607 area. When you use the input method in the minibuffer, the guidance
1620 See also the variable `input-method-highlight-flag'."
1625 (defcustom input-method-highlight-flag t
1627 For instance, while you are in the middle of a Quail input method sequence,
1629 The underlining goes away when you finish or abort the input method sequence.
1630 See also the variable `input-method-verbose-flag'."
1634 (defvar input-method-activate-hook nil
1635 "Normal hook run just after an input method is activated.
1637 The variable `current-input-method' keeps the input method name
1640 (defvar input-method-inactivate-hook nil
1641 "Normal hook run just after an input method is inactivated.
1643 The variable `current-input-method' still keeps the input method name
1646 (defvar input-method-after-insert-chunk-hook nil
1647 "Normal hook run just after an input method insert some chunk of text.")
1649 (defvar input-method-exit-on-first-char nil
1650 "This flag controls when an input method returns.
1651 Usually, the input method does not return while there's a possibility
1653 But, it this flag is non-nil, the input method returns as soon as
1656 (defvar input-method-use-echo-area nil
1657 "This flag controls how an input method shows an intermediate key sequence.
1658 Usually, the input method inserts the intermediate key sequence,
1663 (defvar input-method-exit-on-invalid-key nil
1664 "This flag controls the behavior of an input method on invalid key input.
1666 handled by the input method, the key is handled by turning off the
1667 input method temporarily. After that key, the input method is re-enabled.
1668 But, if this flag is non-nil, the input method is never back on.")
1856 This sets the coding system priority and the default input method
1887 (set-language-environment-input-method language-name)
1946 (defun set-language-environment-input-method (language-name)
1947 "Do various input method setups for language environment LANGUAGE-NAME."
1948 (let ((input-method (get-language-info language-name 'input-method)))
1949 (when input-method
1950 (setq default-input-method input-method)
1951 (if input-method-history
1952 (setq input-method-history
1953 (cons input-method
1954 (delete input-method input-method-history)))))))
2031 ;; and should not run it by `M-x describe-current-input-method-function'.
2072 (let ((input-method (get-language-info language-name 'input-method))
2073 (l (copy-sequence input-method-alist)))
2075 (when input-method
2076 (insert " (default " input-method ")")
2077 (setq input-method (assoc input-method input-method-alist))
2078 (setq l (cons input-method (delete input-method l))))
2084 (help-xref-button 0 'help-input-method (car (car l)))
2464 the default input method and sometimes other things.