Function: custom-comment-show

custom-comment-show is a byte-compiled function defined in cus-edit.el.gz.

Signature

(custom-comment-show WIDGET)

Documentation

Show the comment editable field that belongs to WIDGET.

Source Code

;; Defined in /usr/src/emacs/lisp/cus-edit.el.gz
;; Those functions are for the menu. WIDGET is NOT the comment widget. It's
;; the global custom one
(defun custom-comment-show (widget)
  "Show the comment editable field that belongs to WIDGET."
  (let ((child (car (widget-get widget :children)))
        ;; Just to be safe, we will restore this value after redrawing.
        (old-shown-value (widget-get widget :shown-value)))
    (widget-put widget :comment-shown t)
    ;; Save the changes made by the user before redrawing, to avoid
    ;; losing customizations in progress.  (Bug#5358)
    (if (eq (widget-type widget) 'custom-face)
        (if (eq (widget-type child) 'custom-face-edit)
            (widget-put widget :shown-value `((t ,(widget-value child))))
          (widget-put widget :shown-value (widget-value child)))
      (widget-put widget :shown-value (list (widget-value child))))
    (custom-redraw widget)
    (widget-put widget :shown-value old-shown-value)
    (widget-setup)))