summaryrefslogtreecommitdiff
path: root/lisp/wid-edit.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2001-01-12 12:54:42 +0000
committerDave Love <fx@gnu.org>2001-01-12 12:54:42 +0000
commitbd1f16ce5be34e17a4fda890720635414e6b0efd (patch)
treeab1d3f8bc110a9f94dd99b3029234aac193b7c8a /lisp/wid-edit.el
parent50a8310e770ba4c48038d825fda65972721fc401 (diff)
downloademacs-bd1f16ce5be34e17a4fda890720635414e6b0efd.tar.gz
(function): Add :match-alternatives.
(widget-color-action): Doc fix.
Diffstat (limited to 'lisp/wid-edit.el')
-rw-r--r--lisp/wid-edit.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 34d9fb75a9d..fe58e1acf39 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2910,6 +2910,7 @@ It will read a file name from the minibuffer when invoked."
;;; (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 @@ It will read a directory name from the minibuffer when invoked."
: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 @@ It will read a directory name from the minibuffer when invoked."
"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 @@ To use this type, you must define :match or :match-alternatives."
;;; 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 @@ To use this type, you must define :match or :match-alternatives."
(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))