Function: widget-documentation-link-action

widget-documentation-link-action is a byte-compiled function defined in wid-edit.el.gz.

Signature

(widget-documentation-link-action WIDGET &optional EVENT)

Documentation

Display documentation for WIDGET's value. Ignore optional argument EVENT.

Source Code

;; Defined in /usr/src/emacs/lisp/wid-edit.el.gz
(defun widget-documentation-link-action (widget &optional _event)
  "Display documentation for WIDGET's value.  Ignore optional argument EVENT."
  (let* ((string (widget-get widget :value))
	 (symbol (intern string)))
    (cond
     ((and (fboundp symbol) (boundp symbol))
      ;; If there are two doc strings, give the user a way to pick one.
      (apropos (concat "\\`" (regexp-quote string) "\\'")))
     ((fboundp symbol)
      (describe-function symbol))
     ((facep symbol)
      (describe-face symbol))
     ((featurep symbol)
      (describe-package symbol))
     ((or (boundp symbol) (get symbol 'variable-documentation))
      (describe-variable symbol))
     (t
      (message "No documentation available for %s" symbol)))))