# HG changeset patch # User Dave Love # Date 979304082 0 # Node ID 689589ab80b3b9f88ca7e9fa8376773a6fea8adf # Parent 9d5252e923a309c42d5842eed142c5b8fbc1e6a6 (function): Add :match-alternatives. (widget-color-action): Doc fix. diff -r 9d5252e923a3 -r 689589ab80b3 lisp/wid-edit.el --- a/lisp/wid-edit.el Fri Jan 12 12:40:28 2001 +0000 +++ b/lisp/wid-edit.el Fri Jan 12 12:54:42 2001 +0000 @@ -2910,6 +2910,7 @@ ;;; (widget-setup) ;;; (widget-apply widget :notify widget event))) +;; Fixme: use file-name-as-directory. (define-widget 'directory 'file "A directory widget. It will read a directory name from the minibuffer when invoked." @@ -2960,6 +2961,7 @@ :prompt-match 'fboundp :prompt-history 'widget-function-prompt-value-history :action 'widget-field-action + :match-alternatives '(functionp) :validate (lambda (widget) (unless (functionp (widget-value widget)) (widget-put widget :error (format "Invalid function: %S" @@ -2972,7 +2974,6 @@ "History of input to `widget-variable-prompt-value'.") (define-widget 'variable 'symbol - ;; Should complete on variables. "A Lisp variable." :prompt-match 'boundp :prompt-history 'widget-variable-prompt-value-history @@ -3346,6 +3347,7 @@ ;;; The `color' Widget. +;; Fixme: match (define-widget 'color 'editable-field "Choose a color name (with sample)." :format "%t: %v (%{sample%})\n" @@ -3387,7 +3389,7 @@ (error 'default)))) (defun widget-color-action (widget &optional event) - ;; Prompt for a color. + "Prompt for a color." (let* ((tag (widget-apply widget :menu-tag-get)) (prompt (concat tag ": ")) (value (widget-value widget))