]> code.delx.au - gnu-emacs/blobdiff - lisp/wid-browse.el
* test/lisp/help-fns-tests.el: Add several tests for 'describe-function'.
[gnu-emacs] / lisp / wid-browse.el
index 96e6bd236cff7f2e1c67fb2e59c8ab1a863714e7..6065ebcfb29cc77f75c10d1e0c3e5a97acbe6eb8 100644 (file)
@@ -1,7 +1,6 @@
 ;;; wid-browse.el --- functions for browsing widgets
 ;;
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
-;;   2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2016 Free Software Foundation, Inc.
 ;;
 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
 ;; Keywords: extensions
@@ -31,7 +30,6 @@
 (require 'easymenu)
 (require 'custom)
 (require 'wid-edit)
-(eval-when-compile (require 'cl))
 
 (defgroup widget-browse nil
   "Customization support for browsing widgets."
@@ -190,7 +188,7 @@ The :value of the widget shuld be the widget to be browsed."
   :value-create 'widget-browse-value-create
   :action 'widget-browse-action)
 
-(defun widget-browse-action (widget &optional event)
+(defun widget-browse-action (widget &optional _event)
   ;; Create widget browser for WIDGET's :value.
   (widget-browse (widget-get widget :value)))
 
@@ -206,12 +204,12 @@ The :value of the widget shuld be the widget to be browsed."
 
 ;;; Keyword Printer Functions.
 
-(defun widget-browse-widget (widget key value)
+(defun widget-browse-widget (_widget _key value)
   "Insert description of WIDGET's KEY VALUE.
 VALUE is assumed to be a widget."
   (widget-create 'widget-browse value))
 
-(defun widget-browse-widgets (widget key value)
+(defun widget-browse-widgets (_widget _key value)
   "Insert description of WIDGET's KEY VALUE.
 VALUE is assumed to be a list of widgets."
   (while value
@@ -221,7 +219,7 @@ VALUE is assumed to be a list of widgets."
     (when value
       (widget-insert " "))))
 
-(defun widget-browse-sexp (widget key value)
+(defun widget-browse-sexp (_widget _key value)
   "Insert description of WIDGET's KEY VALUE.
 Nothing is assumed about value."
   (let ((pp (condition-case signal
@@ -237,7 +235,7 @@ Nothing is assumed about value."
        (widget-insert pp)
       (widget-create 'push-button
                     :tag "show"
-                    :action (lambda (widget &optional event)
+                    :action (lambda (widget &optional _event)
                               (with-output-to-temp-buffer
                                   "*Pp Eval Output*"
                                 (princ (widget-get widget :value))))
@@ -271,13 +269,14 @@ VALUE is assumed to be a list of widgets."
 
 ;;;###autoload
 (define-minor-mode widget-minor-mode
-  "Togle minor mode for traversing widgets.
-With arg, turn widget mode on if and only if arg is positive."
+  "Minor mode for traversing widgets.
+With a prefix argument ARG, enable the mode if ARG is positive,
+and disable it otherwise.  If called from Lisp, enable the mode
+if ARG is omitted or nil."
   :lighter " Widget")
 
 ;;; The End:
 
 (provide 'wid-browse)
 
-;; arch-tag: d5ffb18f-8984-4735-8502-edf70456db21
 ;;; wid-browse.el ends here