diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-06-20 12:02:31 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2011-06-20 12:02:31 -0400 |
commit | bcd70d976f1035f84f55fa6969b9c0c419b7cc06 (patch) | |
tree | 50dc843ae8030ef911c788a795f3b14d689045a7 /lisp/international | |
parent | aebf69c8b3dc592ea315c187feb5f69b884a850e (diff) |
Use completion-at-point rather than completion-in-region.
* lisp/wid-edit.el: Use lexical scoping and move towards completion-at-point.
(widget-complete): Use new :completion-function property.
(widget-completions-at-point): New function.
(default): Use :completion-function instead of :complete.
(widget-default-completions): Rename from widget-default-complete, rewrite.
(widget-string-complete, widget-file-complete, widget-color-complete):
Remove functions.
(file, symbol, function, variable, coding-system, color):
* lisp/international/mule-cmds.el (default-input-method, charset)
(language-info-custom-alist):
* lisp/cus-edit.el (face): Use new property :completions.
* lisp/progmodes/pascal.el (pascal-completions-at-point): New function.
(pascal-mode): Use it.
(pascal-mode-map): Use completion-at-point.
(pascal-toggle-completions): Make obsolete.
(pascal-complete-word, pascal-show-completions):
* lisp/progmodes/octave-mod.el (octave-complete-symbol):
Redefine as obsolete alias.
* lisp/progmodes/octave-inf.el (inferior-octave-completion-at-point):
Signal absence of completion info for old Octave,
(inferior-octave-complete): Redefine as obsolete alias.
* lisp/progmodes/meta-mode.el: Use lexical-binding and completion-at-point.
(meta-completions-at-point): Rename from meta-complete-symbol and
adapt it for use on completion-at-point-functions.
(meta-common-mode): Use it.
(meta-looking-at-backward, meta-match-buffer): Remove.
(meta-complete-symbol): Redefine as obsolete alias.
(meta-common-mode-map): Use completion-at-point.
* lisp/progmodes/make-mode.el: Use lexical-binding and completion-at-point.
(makefile-mode-map): Use completion-at-point.
(makefile-completions-at-point): Rename from makefile-complete and
adapt it for use on completion-at-point-functions.
(makefile-mode): Use it.
(makefile-complete): Redefine as obsolete alias.
Diffstat (limited to 'lisp/international')
-rw-r--r-- | lisp/international/mule-cmds.el | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 5f4d3ea849e..b3f17bb3fcf 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -1308,11 +1308,11 @@ 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 - :completion-ignore-case t - :complete-function widget-string-complete - :completion-alist input-method-alist - :prompt-history input-method-history)) + :type '(choice (const nil) + (string + :completions (apply-partially + #'completion-table-case-fold input-method-alist) + :prompt-history input-method-history)) :set-after '(current-language-environment)) (put 'input-method-function 'permanent-local t) @@ -1875,10 +1875,10 @@ specifies the character set for the major languages of Western Europe." (define-widget 'charset 'symbol "An Emacs charset." :tag "Charset" - :complete-function (lambda () - (interactive) - (lisp-complete-symbol 'charsetp)) - :completion-ignore-case t + :completions (apply-partially #'completion-table-with-predicate + (apply-partially #'completion-table-case-fold + obarray) + #'charsetp 'strict) :value 'ascii :validate (lambda (widget) (unless (charsetp (widget-value widget)) @@ -1912,9 +1912,9 @@ See `set-language-info-alist' for use in programs." (set-language-environment current-language-environment))) :type `(alist :key-type (string :tag "Language environment" - :completion-ignore-case t - :complete-function widget-string-complete - :completion-alist language-info-alist) + :completions + (apply-partially #'completion-table-case-fold + language-info-alist)) :value-type (alist :key-type symbol :options ((documentation string) @@ -1927,9 +1927,9 @@ See `set-language-info-alist' for use in programs." (nonascii-translation charset) (input-method (string - :completion-ignore-case t - :complete-function widget-string-complete - :completion-alist input-method-alist + :completions + (apply-partially #'completion-table-case-fold + input-method-alist) :prompt-history input-method-history)) (features (repeat symbol)) (unibyte-display coding-system))))) |