diff lisp/custom/wid-edit.el @ 203:850242ba4a81 r20-3b28

Import from CVS: tag r20-3b28
author cvs
date Mon, 13 Aug 2007 10:02:21 +0200
parents acd284d43ca1
children e45d5e7c476e
line wrap: on
line diff
--- a/lisp/custom/wid-edit.el	Mon Aug 13 10:01:24 2007 +0200
+++ b/lisp/custom/wid-edit.el	Mon Aug 13 10:02:21 2007 +0200
@@ -1776,6 +1776,26 @@
   (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