From 44f2202e84f320e99c914bf331fb49c9f3225d02 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 17 Nov 2008 18:05:42 +0000 Subject: [PATCH] (custom-group-value-create): Don't insert docstring twice. --- lisp/cus-edit.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 1d63ac63634..b0cd67411ac 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -4005,7 +4005,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))) - (insert (widget-docstring widget)) + (if (< (length (widget-docstring widget)) 50) + (insert (widget-docstring widget))) ;; Create visibility indicator. (unless (eq custom-buffer-style 'links) (insert "--------") @@ -4032,8 +4033,9 @@ If GROUPS-ONLY non-nil, return only those members that are groups." ;; Update buttons. (widget-put widget :buttons buttons) ;; Insert documentation. - (widget-add-documentation-string-button - widget :visibility-widget 'custom-visibility) + (if (>= (length (widget-docstring widget)) 50) + (widget-add-documentation-string-button + widget :visibility-widget 'custom-visibility)) ;; Parent groups. (if nil ;;; This should test that the buffer -- 2.39.2