summaryrefslogtreecommitdiff
path: root/lisp/cus-edit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/cus-edit.el')
-rw-r--r--lisp/cus-edit.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index e0a76b21ff8..61e6881139a 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2520,6 +2520,7 @@ try matching its doc string against `custom-guess-doc-alist'."
(get (or (get symbol 'custom-get) 'default-value))
(prefix (widget-get widget :custom-prefix))
(last (widget-get widget :custom-last))
+ (style (widget-get widget :custom-style))
(value (let ((shown-value (widget-get widget :shown-value)))
(cond (shown-value
(car shown-value))
@@ -2633,7 +2634,7 @@ try matching its doc string against `custom-guess-doc-alist'."
(unless (eq (preceding-char) ?\n)
(widget-insert "\n"))
;; Create the magic button.
- (unless (eq (widget-get widget :custom-style) 'simple)
+ (unless (eq style 'simple)
(let ((magic (widget-create-child-and-convert
widget 'custom-magic nil)))
(widget-put widget :custom-magic magic)
@@ -2641,8 +2642,10 @@ try matching its doc string against `custom-guess-doc-alist'."
(widget-put widget :buttons buttons)
;; Insert documentation.
(widget-put widget :documentation-indent 3)
- (widget-add-documentation-string-button
- widget :visibility-widget 'custom-visibility)
+ (unless (and (eq style 'simple)
+ (eq state 'hidden))
+ (widget-add-documentation-string-button
+ widget :visibility-widget 'custom-visibility))
;; The comment field
(unless (eq state 'hidden)