comparison lisp/international/mule-cmds.el @ 19083:8fdb29b769ed

Doc fixes; fix error message text.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Aug 1997 21:59:55 +0000
parents 6ed970c33b7d
children 9e0468e59b5f
comparison
equal deleted inserted replaced
19082:e159c69a45f0 19083:8fdb29b769ed
339 (update-leim-list-file (car l))) 339 (update-leim-list-file (car l)))
340 (setq l (cdr l))))) 340 (setq l (cdr l)))))
341 341
342 (defvar current-input-method nil 342 (defvar current-input-method nil
343 "The current input method for multilingual text. 343 "The current input method for multilingual text.
344 If nil, it means no input method is activated now.") 344 If nil, that means no input method is activated now.")
345 (make-variable-buffer-local 'current-input-method) 345 (make-variable-buffer-local 'current-input-method)
346 (put 'current-input-method 'permanent-local t) 346 (put 'current-input-method 'permanent-local t)
347 347
348 (defvar current-input-method-title nil 348 (defvar current-input-method-title nil
349 "Title string of the current input method shown in mode line.") 349 "Title string of the current input method shown in mode line.")
441 (funcall inactivate-current-input-method-function) 441 (funcall inactivate-current-input-method-function)
442 (setq current-input-method nil)))) 442 (setq current-input-method nil))))
443 443
444 (defun select-input-method (input-method) 444 (defun select-input-method (input-method)
445 "Select and activate INPUT-METHOD. 445 "Select and activate INPUT-METHOD.
446 Both the default and local values of default-input-method are 446 This sets both the default and local values of `default-input-method'
447 set to the selected input method. 447 to the input method you specify.
448 See also the function `register-input-method'." 448 See also the function `register-input-method'."
449 (interactive 449 (interactive
450 (let* ((default (or previous-input-method default-input-method)) 450 (let* ((default (or previous-input-method default-input-method))
451 (initial (if default (cons default 0)))) 451 (initial (if default (cons default 0))))
452 (if (not enable-multibyte-characters) 452 (if (not enable-multibyte-characters)
457 457
458 (defun toggle-input-method (&optional arg) 458 (defun toggle-input-method (&optional arg)
459 "Turn on or off a multilingual text input method for the current buffer. 459 "Turn on or off a multilingual text input method for the current buffer.
460 With arg, read an input method from minibuffer and turn it on. 460 With arg, read an input method from minibuffer and turn it on.
461 Without arg, if some input method is currently activated, turn it off, 461 Without arg, if some input method is currently activated, turn it off,
462 else turn on default-input-method (which see). 462 else turn on the default input method (see `default-input-method').
463 In the latter case, if default-input-method is nil, select an input method 463 In the latter case, if default-input-method is nil, select an input method
464 interactively." 464 interactively."
465 (interactive "P") 465 (interactive "P")
466 (let* ((default (or previous-input-method default-input-method)) 466 (let* ((default (or previous-input-method default-input-method))
467 (initial (if default (cons default 0)))) 467 (initial (if default (cons default 0))))
468 (if (and current-input-method (not arg)) 468 (if (and current-input-method (not arg))
469 (inactivate-input-method) 469 (inactivate-input-method)
470 (if (not enable-multibyte-characters) 470 (if (not enable-multibyte-characters)
471 (error "Can't activate any input method while enable-multibyte-characters is nil")) 471 (error "Can't activate any input method while multibyte characters are disabled"))
472 (activate-input-method 472 (activate-input-method
473 (if (or arg (not default-input-method)) 473 (if (or arg (not default-input-method))
474 (read-input-method-name "Input method: " initial t) 474 (read-input-method-name "Input method: " initial t)
475 default-input-method))))) 475 default-input-method)))))
476 476
485 (let ((elt (assoc input-method input-method-alist))) 485 (let ((elt (assoc input-method input-method-alist)))
486 (princ (format "Input method: %s (`%s' in mode line) for %s\n %s\n" 486 (princ (format "Input method: %s (`%s' in mode line) for %s\n %s\n"
487 input-method (nth 3 elt) (nth 1 elt) (nth 4 elt))))))) 487 input-method (nth 3 elt) (nth 1 elt) (nth 4 elt)))))))
488 488
489 (defun describe-current-input-method () 489 (defun describe-current-input-method ()
490 "Describe the input method currently turned on." 490 "Describe the input method currently in use."
491 (if current-input-method 491 (if current-input-method
492 (if (and (symbolp describe-current-input-method-function) 492 (if (and (symbolp describe-current-input-method-function)
493 (fboundp describe-current-input-method-function)) 493 (fboundp describe-current-input-method-function))
494 (funcall describe-current-input-method-function) 494 (funcall describe-current-input-method-function)
495 (message "No way to describe the current input method `%s'" 495 (message "No way to describe the current input method `%s'"
571 ;; charsets, and coding systems. This function is intended to be 571 ;; charsets, and coding systems. This function is intended to be
572 ;; called from the menu: 572 ;; called from the menu:
573 ;; [menu-bar mule describe-language-environment LANGUAGE] 573 ;; [menu-bar mule describe-language-environment LANGUAGE]
574 ;; and should not run it by `M-x describe-current-input-method-function'. 574 ;; and should not run it by `M-x describe-current-input-method-function'.
575 (defun describe-specified-language-support () 575 (defun describe-specified-language-support ()
576 "Describe how Emacs supports the specified langugage." 576 "Describe how Emacs supports the specified language environment."
577 (interactive) 577 (interactive)
578 (let (language-name) 578 (let (language-name)
579 (if (not (and (symbolp last-command-event) 579 (if (not (and (symbolp last-command-event)
580 (setq language-name (symbol-name last-command-event)))) 580 (setq language-name (symbol-name last-command-event))))
581 (error "Bogus calling sequence")) 581 (error "Bogus calling sequence"))
632 ;;; Charset property 632 ;;; Charset property
633 633
634 (defsubst get-charset-property (charset propname) 634 (defsubst get-charset-property (charset propname)
635 "Return the value of CHARSET's PROPNAME property. 635 "Return the value of CHARSET's PROPNAME property.
636 This is the last value stored with 636 This is the last value stored with
637 `(put-charset-property CHARSET PROPNAME VALUE)'." 637 (put-charset-property CHARSET PROPNAME VALUE)."
638 (plist-get (charset-plist charset) propname)) 638 (plist-get (charset-plist charset) propname))
639 639
640 (defsubst put-charset-property (charset propname value) 640 (defsubst put-charset-property (charset propname value)
641 "Store CHARSETS's PROPNAME property with value VALUE. 641 "Store CHARSETS's PROPNAME property with value VALUE.
642 It can be retrieved with `(get-charset-property CHARSET PROPNAME)'." 642 It can be retrieved with `(get-charset-property CHARSET PROPNAME)'."
649 (defvar char-code-property-table 649 (defvar char-code-property-table
650 (make-char-table 'char-code-property-table) 650 (make-char-table 'char-code-property-table)
651 "Char-table containing a property list of each character code. 651 "Char-table containing a property list of each character code.
652 652
653 See also the documentation of `get-char-code-property' and 653 See also the documentation of `get-char-code-property' and
654 `put-char-code-property'") 654 `put-char-code-property'.")
655 655
656 (defun get-char-code-property (char propname) 656 (defun get-char-code-property (char propname)
657 "Return the value of CHAR's PROPNAME property in `char-code-property-table'." 657 "Return the value of CHAR's PROPNAME property in `char-code-property-table'."
658 (let ((plist (aref char-code-property-table char))) 658 (let ((plist (aref char-code-property-table char)))
659 (if (listp plist) 659 (if (listp plist)