# HG changeset patch # User Chong Yidong # Date 1226945142 0 # Node ID ad3c9b9265d38dbc622a935f415484a9a597ac73 # Parent 800639e86fb28fc99858087cc7dfd54322649cff (custom-group-value-create): Don't insert docstring twice. diff -r 800639e86fb2 -r ad3c9b9265d3 lisp/cus-edit.el --- a/lisp/cus-edit.el Mon Nov 17 18:05:30 2008 +0000 +++ b/lisp/cus-edit.el Mon Nov 17 18:05:42 2008 +0000 @@ -4005,7 +4005,8 @@ (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 @@ ;; 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