]> git.eshelyaron.com Git - emacs.git/commitdiff
(variable-link): New widget.
authorKarl Heuer <kwzh@gnu.org>
Thu, 16 Oct 1997 18:22:36 +0000 (18:22 +0000)
committerKarl Heuer <kwzh@gnu.org>
Thu, 16 Oct 1997 18:22:36 +0000 (18:22 +0000)
(widget-variable-link-action): New function.
(function-link): New widget.
(widget-function-link-action): New function.

lisp/wid-edit.el

index a2e484967702d8e60c385bd735497f15b612325e..0419d05472a037446d5a08f4f5dd92f6ce1ae6fe 100644 (file)
@@ -1750,6 +1750,26 @@ If END is omitted, it defaults to the length of LIST."
   (require 'browse-url)
   (funcall browse-url-browser-function (widget-value widget)))
 
+;;; The `function-link' Widget.
+
+(define-widget 'function-link 'link
+  "A link to an Emacs function."
+  :action 'widget-function-link-action)
+
+(defun widget-function-link-action (widget &optional event)
+  "Show the function specified by WIDGET."
+  (describe-function (widget-value widget)))
+
+;;; The `variable-link' Widget.
+
+(define-widget 'variable-link 'link
+  "A link to an Emacs variable."
+  :action 'widget-variable-link-action)
+
+(defun widget-variable-link-action (widget &optional event)
+  "Show the variable specified by WIDGET."
+  (describe-variable (widget-value widget)))
+
 ;;; The `file-link' Widget.
 
 (define-widget 'file-link 'link