changeset 31578:48f674467ba6

(widget-default-format-handler): DTRT when doc-property is a function.
author Dave Love <fx@gnu.org>
date Wed, 13 Sep 2000 10:34:52 +0000
parents 486ff96e18b9
children 56845f87c178
files lisp/wid-edit.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/wid-edit.el	Wed Sep 13 09:19:05 2000 +0000
+++ b/lisp/wid-edit.el	Wed Sep 13 10:34:52 2000 +0000
@@ -1302,13 +1302,13 @@
     (cond ((eq escape ?h)
 	   (let* ((doc-property (widget-get widget :documentation-property))
 		  (doc-try (cond ((widget-get widget :doc))
+				 ((functionp doc-property)
+				  (funcall doc-property
+					   (widget-get widget :value)))
 				 ((symbolp doc-property)
 				  (documentation-property
 				   (widget-get widget :value)
-				   doc-property))
-				 (t
-				  (funcall doc-property
-					   (widget-get widget :value)))))
+				   doc-property))))
 		  (doc-text (and (stringp doc-try)
 				 (> (length doc-try) 1)
 				 doc-try))
@@ -1635,7 +1635,7 @@
   :action 'widget-field-action
   :validate 'widget-field-validate
   :valid-regexp ""
-  :error "Field's value doesn't match allowed form"
+  :error "Field's value doesn't match allowed forms"
   :value-create 'widget-field-value-create
   :value-delete 'widget-field-value-delete
   :value-get 'widget-field-value-get