summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-06-20 12:02:31 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-06-20 12:02:31 -0400
commitbcd70d976f1035f84f55fa6969b9c0c419b7cc06 (patch)
tree50dc843ae8030ef911c788a795f3b14d689045a7 /lisp/cus-edit.el
parentaebf69c8b3dc592ea315c187feb5f69b884a850e (diff)
downloademacs-bcd70d976f1035f84f55fa6969b9c0c419b7cc06.tar.gz
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/cus-edit.el')
-rw-r--r--lisp/cus-edit.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index f14c055d7a8..7c96b526f41 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3830,9 +3830,8 @@ restoring it to the state of a face that has never been customized."
:sample-face-get 'widget-face-sample-face-get
:notify 'widget-face-notify
:match (lambda (_widget value) (facep value))
- :complete-function (lambda ()
- (interactive)
- (lisp-complete-symbol 'facep))
+ :completions (apply-partially #'completion-table-with-predicate
+ obarray #'facep 'strict)
:prompt-match 'facep
:prompt-history 'widget-face-prompt-value-history
:validate (lambda (widget)