(make-variable-buffer-local 'current-input-method-title)
(put 'current-input-method-title 'permanent-local t)
+(define-widget 'mule-input-method-string 'string
+ "String widget with completion for input method."
+ :completions
+ (lambda (string pred action)
+ (let ((completion-ignore-case t))
+ (complete-with-action action input-method-alist string pred)))
+ :prompt-history 'input-method-history)
+
(defcustom default-input-method nil
"Default input method for multilingual text (a string).
This is the input method activated automatically by the command
`toggle-input-method' (\\[toggle-input-method])."
:link '(custom-manual "(emacs)Input Methods")
:group 'mule
- :type '(choice (const nil)
- (string
- :completions (apply-partially
- #'completion-table-case-fold input-method-alist)
- :prompt-history input-method-history))
+ :type `(choice (const nil)
+ mule-input-method-string)
:set-after '(current-language-environment))
(put 'input-method-function 'permanent-local t)
(define-widget 'charset 'symbol
"An Emacs charset."
:tag "Charset"
- :completions (apply-partially #'completion-table-with-predicate
- (apply-partially #'completion-table-case-fold
- obarray)
- #'charsetp 'strict)
+ :completions
+ (lambda (string pred action)
+ (let ((completion-ignore-case t))
+ (completion-table-with-predicate
+ obarray #'charsetp 'strict string pred action)))
:value 'ascii
:validate (lambda (widget)
(unless (charsetp (widget-value widget))
:type `(alist
:key-type (string :tag "Language environment"
:completions
- (apply-partially #'completion-table-case-fold
- language-info-alist))
+ (lambda (string pred action)
+ (let ((completion-ignore-case t))
+ (complete-with-action
+ action language-info-alist string pred))))
:value-type
(alist :key-type symbol
:options ((documentation string)
(coding-system (repeat coding-system))
(coding-priority (repeat coding-system))
(nonascii-translation charset)
- (input-method
- (string
- :completions
- (apply-partially #'completion-table-case-fold
- input-method-alist)
- :prompt-history input-method-history))
+ (input-method mule-input-method-string)
(features (repeat symbol))
(unibyte-display coding-system)))))