summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2009-02-18 12:55:35 +0000
committerMartin Rudalics <rudalics@gmx.at>2009-02-18 12:55:35 +0000
commitc19aae894a0f873f259701e912224bf4831dec7a (patch)
tree829c7ab2f696f2bdf07af8da02e616774cc5f17b /lisp/cus-edit.el
parent0d3e93a66f621c5229c14df56a31c7f19ed52251 (diff)
downloademacs-c19aae894a0f873f259701e912224bf4831dec7a.tar.gz
(custom-group-value-create): Don't throw an error
when WIDGET has no doc-string. (Bug#2356)
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 0de131f7a7f..3c2985a3b9b 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -3877,7 +3877,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(symbol (widget-value widget))
(members (custom-group-members symbol
(and (eq custom-buffer-style 'tree)
- custom-browse-only-groups))))
+ custom-browse-only-groups)))
+ (doc (widget-docstring widget)))
(cond ((and (eq custom-buffer-style 'tree)
(eq state 'hidden)
(or members (custom-unloaded-widget-p widget)))
@@ -4005,8 +4006,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(let ((start (point)))
(insert tag " group: ")
(widget-specify-sample widget start (point)))
- (if (< (length (widget-docstring widget)) 50)
- (insert (widget-docstring widget)))
+ (when (and doc (< (length doc) 50))
+ (insert doc))
;; Create visibility indicator.
(unless (eq custom-buffer-style 'links)
(insert "--------")
@@ -4033,9 +4034,9 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
;; Update buttons.
(widget-put widget :buttons buttons)
;; Insert documentation.
- (if (>= (length (widget-docstring widget)) 50)
- (widget-add-documentation-string-button
- widget :visibility-widget 'custom-visibility))
+ (when (and doc (>= (length doc) 50))
+ (widget-add-documentation-string-button
+ widget :visibility-widget 'custom-visibility))
;; Parent groups.
(if nil ;;; This should test that the buffer