(bindings--define-key map [set-keyboard-coding-system]
'(menu-item "For Keyboard" set-keyboard-coding-system
:help "How to decode keyboard input"))
-
+
(bindings--define-key map [separator-2] menu-bar-separator)
(bindings--define-key map [set-file-name-coding-system]
'(menu-item "For File Name" set-file-name-coding-system
`(menu-item "Describe Language Environment"
,describe-language-environment-map
:help "Show multilingual settings for a specific language"))
-
+
(bindings--define-key map [separator-coding-system] menu-bar-separator)
(bindings--define-key map [view-hello-file]
'(menu-item "Show Multilingual Sample Text" view-hello-file
(make-variable-buffer-local 'input-method-history)
(put 'input-method-history 'permanent-local t)
-(defvar inactivate-current-input-method-function nil
- "Function to call for inactivating the current input method.
+(define-obsolete-variable-alias
+ 'inactivate-current-input-method-function
+ 'deactivate-current-input-method-function "24.2")
+(defvar deactivate-current-input-method-function nil
+ "Function to call for deactivating the current input method.
Every input method should set this to an appropriate value when activated.
This function is called with no argument.
This function should never change the value of `current-input-method'.
-It is set to nil by the function `inactivate-input-method'.")
-(make-variable-buffer-local 'inactivate-current-input-method-function)
-(put 'inactivate-current-input-method-function 'permanent-local t)
+It is set to nil by the function `deactivate-input-method'.")
+(make-variable-buffer-local 'deactivate-current-input-method-function)
+(put 'deactivate-current-input-method-function 'permanent-local t)
(defvar describe-current-input-method-function nil
"Function to call for describing the current input method.
(setq input-method (symbol-name input-method)))
(if (and current-input-method
(not (string= current-input-method input-method)))
- (inactivate-input-method))
+ (deactivate-input-method))
(unless (or current-input-method (null input-method))
(let ((slot (assoc input-method input-method-alist)))
(if (null slot)
(run-hooks 'input-method-activate-hook)
(force-mode-line-update)))))
-(defun inactivate-input-method ()
+(defun deactivate-input-method ()
"Turn off the current input method."
(when current-input-method
(if input-method-history
(progn
(setq input-method-function nil
current-input-method-title nil)
- (funcall inactivate-current-input-method-function))
+ (funcall deactivate-current-input-method-function))
(unwind-protect
- (run-hooks 'input-method-inactivate-hook)
+ (run-hooks
+ 'input-method-inactivate-hook ; for backward compatibility
+ 'input-method-deactivate-hook)
(setq current-input-method nil)
(force-mode-line-update)))))
+(define-obsolete-function-alias
+ 'inactivate-input-method
+ 'deactivate-input-method "24.2")
+
(defun set-input-method (input-method &optional interactive)
"Select and activate input method INPUT-METHOD for the current buffer.
This also sets the default input method to the one you specify.
which marks the variable `default-input-method' as set for Custom buffers.
To deactivate the input method interactively, use \\[toggle-input-method].
-To deactivate it programmatically, use `inactivate-input-method'."
+To deactivate it programmatically, use `deactivate-input-method'."
(interactive
(let* ((default (or (car input-method-history) default-input-method)))
(list (read-input-method-name
(if toggle-input-method-active
(error "Recursive use of `toggle-input-method'"))
(if (and current-input-method (not arg))
- (inactivate-input-method)
+ (deactivate-input-method)
(let ((toggle-input-method-active t)
(default (or (car input-method-history) default-input-method)))
(if (and arg default (equal current-input-method default)
:type 'hook
:group 'mule)
-(defcustom input-method-inactivate-hook nil
- "Normal hook run just after an input method is inactivated.
+(define-obsolete-variable-alias
+ 'input-method-inactivate-hook
+ 'input-method-deactivate-hook "24.2")
+
+(defcustom input-method-deactivate-hook nil
+ "Normal hook run just after an input method is deactivated.
The variable `current-input-method' still keeps the input method name
-just inactivated."
+just deactivated."
:type 'hook
- :group 'mule)
+ :group 'mule
+ :version "24.2")
(defcustom input-method-after-insert-chunk-hook nil
"Normal hook run just after an input method insert some chunk of text."
;; On Windows, override locale-coding-system,
;; default-file-name-coding-system, keyboard-coding-system,
- ;; terminal-coding-system with the appropriate codepages.
+ ;; terminal-coding-system with system codepage.
(when (boundp 'w32-ansi-code-page)
- (let ((ansi-code-page-coding (intern (format "cp%d" w32-ansi-code-page)))
- (oem-code-page-coding
- (intern (format "cp%d" (w32-get-console-codepage))))
- (oem-code-page-output-coding
- (intern (format "cp%d" (w32-get-console-output-codepage))))
- ansi-cs-p oem-cs-p oem-o-cs-p)
- (setq ansi-cs-p (coding-system-p ansi-code-page-coding))
- (setq oem-cs-p (coding-system-p oem-code-page-coding))
- (setq oem-o-cs-p (coding-system-p oem-code-page-output-coding))
- ;; Set the keyboard and display encoding to either the current
- ;; ANSI codepage of the OEM codepage, depending on whether
- ;; this is a GUI or a TTY frame.
- (when ansi-cs-p
- (unless frame (setq locale-coding-system ansi-code-page-coding))
- (when (display-graphic-p frame)
- (set-keyboard-coding-system ansi-code-page-coding frame)
- (set-terminal-coding-system ansi-code-page-coding frame))
- (setq default-file-name-coding-system ansi-code-page-coding))
- (when oem-cs-p
- (unless (display-graphic-p frame)
- (set-keyboard-coding-system oem-code-page-coding frame)
- (set-terminal-coding-system
- (if oem-o-cs-p oem-code-page-output-coding oem-code-page-coding)
- frame)))))
+ (let ((code-page-coding (intern (format "cp%d" w32-ansi-code-page))))
+ (when (coding-system-p code-page-coding)
+ (unless frame (setq locale-coding-system code-page-coding))
+ (set-keyboard-coding-system code-page-coding frame)
+ (set-terminal-coding-system code-page-coding frame)
+ (setq default-file-name-coding-system code-page-coding))))
(when (eq system-type 'darwin)
;; On Darwin, file names are always encoded in utf-8, no matter