Commits

lho...@lhonda-yahoo  committed 600e592

added tabbar using emhacks package from sf.net

  • Participants
  • Parent commits 3434814

Comments (0)

Files changed (31)

 
 (global-set-key (kbd "C--") 'text-scale-decrease)
 (global-set-key (kbd "C-+") 'text-scale-increase)
+
+(unless (zenburn-format-spec-works-p)
+  (zenburn-define-format-spec))
+
+(defun color-theme-face-attr-construct (face frame)
+       (if (atom face)
+           (custom-face-attributes-get face frame)
+         (if (and (consp face) (eq (car face) 'quote))
+             (custom-face-attributes-get (cadr face) frame)
+           (custom-face-attributes-get (car face) frame))))
+
+(require 'tabbar)
+(tabbar-mode)
+;;; dir-tree.el --- Sophisticated example of `tree-widget' usage
+
+;; Copyright (C) 2001, 2003 by David Ponce
+
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 16 Feb 2001
+;; Keywords: extensions
+;; Revision: $Id: dir-tree.el,v 1.4 2003/09/30 12:01:33 ponced Exp $
+
+(defconst dir-tree-version "1.1")
+
+;; This file is not part of Emacs
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; This library is a sophisticated example of usage of the
+;; `tree-widget' library.
+;;
+;; It defines the command `dir-tree' which displays a directory tree.
+;; A directory content is read when unfolding the corresponding node
+;; and reused later.  To refresh a directory content just click on the
+;; corresponding node name.  Also, you can change the select/unselect
+;; state of a file entry by clicking on it.
+;;
+;; To install and use, put this file on your Emacs-Lisp load path and
+;; add the following into your ~/.emacs startup file:
+;;
+;; (require 'dir-tree)
+;;
+
+;;; History:
+;;
+
+;;; Code:
+(require 'tree-widget)
+
+;;; Compatibility
+;;
+(if (fboundp 'overlay-lists)
+    (defalias 'dir-tree-overlay-lists
+      'overlay-lists)
+  (defalias 'dir-tree-overlay-lists
+    '(lambda () (list (extent-list)))))
+
+(if (fboundp 'delete-overlay)
+    (defalias 'dir-tree-delete-overlay
+      'delete-overlay)
+  (defalias 'dir-tree-delete-overlay
+    'delete-extent))
+
+;;; Widgets
+;;
+(define-widget 'dir-tree-dir-widget 'tree-widget
+  "Directory Tree widget."
+  :dynargs        'dir-tree-expand-dir
+  :has-children   t)
+
+(define-widget 'dir-tree-file-widget 'push-button
+  "File widget."
+  :doc            "*"
+  ;; When unfolding the parent directory tree keep :doc value which
+  ;; could be changed by `dir-tree-toggle-selection'
+  :keep           '(:doc)
+  :format         "%[%t%]%d"
+  :button-face    'default
+  :notify         'dir-tree-toggle-selection)
+
+;;; Callbacks
+;;
+(defun dir-tree-toggle-selection (widget &rest ignore)
+  "Change the selected state of WIDGET.
+IGNORE other arguments."
+  (let ((f (widget-get widget :tag ))
+        (p (widget-get widget :path))
+        (s (string= (widget-get widget :doc) "*")))
+    (if s
+        (widget-put widget :doc "-")
+      (widget-put widget :doc "*"))
+    ;; Redraw the tree node.
+    (widget-value-set widget (widget-value widget))
+    (message "File %s %s" p (if s "unselected" "selected"))))
+
+(defun dir-tree-refresh-dir (widget &rest ignore)
+  "Refresh WIDGET parent tree children.
+IGNORE other arguments."
+  (let ((tree (widget-get widget :parent)))
+    ;; Clear the tree children cache.
+    (widget-put tree :args nil)
+    ;; Redraw the tree node.
+    (widget-value-set tree (widget-value tree))))
+
+(defun dir-tree-widget (e)
+  "Return a widget to display file or directory E."
+  (if (file-directory-p e)
+      `(dir-tree-dir-widget
+        :node (push-button
+               :tag ,(file-name-as-directory (file-name-nondirectory e))
+               :format "%[%t%]\n"
+               :notify dir-tree-refresh-dir)
+        :path ,e)
+    `(dir-tree-file-widget
+      :path ,e
+      :tag  ,(file-name-nondirectory e))
+    ))
+
+(defun dir-tree-list (dir)
+  "Return the list of entries in DIR.
+Place directories first."
+  (let ((entries (directory-files dir 'full))
+        files dirs entry)
+    (while entries
+      (setq entry   (car entries))
+      (setq entries (cdr entries))
+      (if (not (string= (substring entry -1) "."))
+          (if (file-directory-p entry)
+              (setq dirs (cons entry dirs))
+            (setq files (cons entry files)))))
+    (nreverse (nconc files dirs))))
+
+(defun dir-tree-expand-dir (tree)
+  "Return TREE widget children.
+Reuse :args cache if exists."
+  (or (widget-get tree :args)
+      (let ((dir (widget-get tree :path)))
+        (message "Reading directory '%s'..." dir)
+        (condition-case err
+            (prog1
+                (mapcar 'dir-tree-widget (dir-tree-list dir))
+              (message "Reading directory '%s'...done" dir))
+          (error
+           (message "%s" (error-message-string err))
+           nil)))))
+
+;;; Command
+;;
+(defun dir-tree (root)
+  "Display a tree of entries in ROOT directory."
+  (interactive "DRoot: ")
+  (switch-to-buffer (format "* %s directory tree*" root))
+  (kill-all-local-variables)
+  (let ((inhibit-read-only t))
+    (erase-buffer))
+  (let ((all (dir-tree-overlay-lists)))
+    (mapcar 'dir-tree-delete-overlay (car all))
+    (mapcar 'dir-tree-delete-overlay (cdr all)))
+  (tree-widget-set-theme "folder")
+  (widget-insert (format "%s directory tree. \n\n" root))
+  (let ((default-directory root))
+    (widget-create (dir-tree-widget root)))
+  (use-local-map widget-keymap)
+  (widget-setup)
+  (goto-char (point-min)))
+
+(provide 'dir-tree)
+
+;;; dir-tree.el ends here
+;;; icicles.el --- Minibuffer input completion and cycling.
+;;
+;; Filename: icicles.el
+;; Description: Minibuffer completion and cycling.
+;; Author: Drew Adams
+;; Maintainer: Drew Adams
+;; Copyright (C) 1996-2009, Drew Adams, all rights reserved.
+;; Created: Tue Aug  1 14:21:16 1995
+;; Version: 22.0
+;; Last-Updated: Sat Aug  1 15:32:51 2009 (-0700)
+;;           By: dradams
+;;     Update #: 22535
+;; URL: http://www.emacswiki.org/cgi-bin/wiki/icicles.el
+;; Keywords: internal, extensions, help, abbrev, local, minibuffer,
+;;           keys, apropos, completion, matching, regexp, command
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;;
+;; Features that might be required by this library:
+;;
+;;   `apropos', `apropos+', `apropos-fn+var', `avoid', `cl',
+;;   `color-theme', `cus-edit', `cus-face', `cus-load', `cus-start',
+;;   `custom', `dired', `dired+', `dired-aux', `dired-x', `doremi',
+;;   `easymenu', `ediff-diff', `ediff-help', `ediff-init',
+;;   `ediff-merg', `ediff-mult', `ediff-util', `ediff-wind', `ffap',
+;;   `ffap-', `fit-frame', `frame-cmds', `frame-fns', `help+20',
+;;   `hexrgb', `icicles-cmd1', `icicles-cmd2', `icicles-face',
+;;   `icicles-fn', `icicles-mac', `icicles-mcmd', `icicles-mode',
+;;   `icicles-opt', `icicles-var', `info', `info+', `kmacro',
+;;   `levenshtein', `menu-bar', `menu-bar+', `misc-cmds', `misc-fns',
+;;   `mkhtml', `mkhtml-htmlize', `mwheel', `pp', `pp+', `ring',
+;;   `ring+', `second-sel', `strings', `thingatpt', `thingatpt+',
+;;   `unaccent', `w32-browser', `w32browser-dlgopen', `wid-edit',
+;;   `wid-edit+', `widget'.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;;  Minibuffer input completion and cycling of completion candidates.
+;;
+;;  Input completion takes as input a string and returns a name that
+;;  contains the input string.  This library enables minibuffer
+;;  cycling of completion candidates, and provides additional support
+;;  for input completion.
+;;
+;;  Two kinds of completion are offered here, which are distinguished
+;;  by how the input string is matched against the completed name:
+;;
+;;   - Prefix completion - The input string is a prefix of the
+;;                         completed name.  This is the usual Emacs
+;;                         completion.
+;;
+;;   - Apropos completion - The input string is a regular expression
+;;                          that matches somewhere (anywhere) within
+;;                          the completed name.  You can think of the
+;;                          name as having been returned by `apropos'
+;;                          (except it also works for file and buffer
+;;                          names).
+;;
+;;  Files `icicles-doc1.el' and `icicles-doc2.el' contain the doc for
+;;  Icicles, including how to install and use Icicles.  You can also
+;;  read the Icicles doc, in formatted form, on the Emacs-Wiki Web
+;;  site: http://www.emacswiki.org/cgi-bin/wiki/Icicles.  Emacs Wiki
+;;  also has a few addtional pages about Icicles.  In particular, if
+;;  you are new to Emacs, as well as Icicles, see this page:
+;;  http://www.emacswiki.org/cgi-bin/wiki/EmacsNewbieWithIcicles.
+;;
+;;  See also: Library `lacarte.el', which lets you execute menu
+;;  commands, cycling and completing them.  It is not part of Icicles,
+;;  but it is greatly enhanced by Icicles.
+ 
+;;(@> "Index")
+;;
+;;  Index
+;;  -----
+;;
+;;  If you have library `linkd.el' and Emacs 22 or later, load
+;;  `linkd.el' and turn on `linkd-mode' now.  It lets you easily
+;;  navigate around the sections of this doc.  Linkd mode will
+;;  highlight this Index, as well as the cross-references and section
+;;  headings throughout this file.  You can get `linkd.el' here:
+;;  http://dto.freeshell.org/notebook/Linkd.html.
+;;
+;;  (@> "Things Defined in Icicles")
+ 
+;;(@* "Things Defined in Icicles")
+;;
+;;  Things Defined in Icicles
+;;  -------------------------
+;;
+;;  Key bindings defined in Icicles: see (@> "Key Bindings"), below.
+;;
+;;  Macros defined in Icicles:
+;;
+;;    `icicle-define-add-to-alist-command', `icicle-define-command',
+;;    `icicle-define-file-command', `icicle-define-sort-command',
+;;    `icicle-with-selected-window'.
+;;
+;;  Commands defined in Icicles -
+;;
+;;   Commands to be used mainly at top level:
+;;
+;;    `a', `any', `buffer', `clear-option', `file',
+;;    `icicle-add-buffer-candidate', `icicle-add-buffer-config',
+;;    `icicle-add-entry-to-saved-completion-set',
+;;    `icicle-add-file-to-fileset', `icicle-add-region',
+;;    `icicle-add/update-saved-completion-set', `icicle-anything',
+;;    `icicle-apply' `icicle-apropos', `icicle-apropos-command',
+;;    `icicle-apropos-function', `icicle-apropos-option',
+;;    `icicle-apropos-variable', `icicle-apropos-zippy',
+;;    `icicle-bbdb-complete-name', `icicle-bookmark',
+;;    `icicle-bookmark-cmd', `icicle-bookmark-jump',
+;;    `icicle-bookmark-jump-other-window',
+;;    `icicle-bookmark-other-window', `icicle-buffer',
+;;    `icicle-buffer-config', `icicle-buffer-list',
+;;    `icicle-buffer-other-window',
+;;    `icicle-change-alternative-sort-order',
+;;    `icicle-change-history-variable', `icicle-clear-history',
+;;    `icicle-clear-current-history', `icicle-color-theme',
+;;    `icicle-comint-command', `icicle-comint-dynamic-complete',
+;;    `icicle-comint-dynamic-complete-filename',
+;;    `icicle-comint-replace-by-expanded-filename',
+;;    `icicle-comint-search', `icicle-command-abbrev',
+;;    `icicle-compilation-search', `icicle-complete-keys',
+;;    `icicle-complete-thesaurus-entry', `icicle-completing-yank',
+;;    `icicle-customize-apropos', `icicle-customize-apropos-faces',
+;;    `icicle-customize-apropos-groups',
+;;    `icicle-customize-apropos-options',
+;;    `icicle-customize-apropos-options-of-type',
+;;    `icicle-customize-face', `icicle-customize-icicles-group',
+;;    `icicle-dabbrev-completion', `icicle-delete-file',
+;;    `icicle-delete-window', `icicle-delete-windows',
+;;    `icicle-delete-windows-on', `icicle-describe-file',
+;;    `icicle-describe-option-of-type', `icicle-directory-list',
+;;    `icicle-dired-chosen-files',
+;;    `icicle-dired-chosen-files-other-window',
+;;    `icicle-dired-project', `icicle-dired-project-other-window',
+;;    `icicle-dired-saved-file-candidates',
+;;    `icicle-dired-saved-file-candidates-other-window',
+;;    `icicle-dired-save-marked',
+;;    `icicle-dired-save-marked-as-project',
+;;    `icicle-dired-save-marked-more',
+;;    `icicle-dired-save-marked-persistently',
+;;    `icicle-dired-save-marked-to-variable', `icicle-doc',
+;;    `icicle-ess-complete-filename',
+;;    `icicle-ess-complete-object-name',
+;;    `icicle-ess-internal-complete-object-name',
+;;    `icicle-ess-R-complete-object-name',
+;;    `icicle-exchange-point-and-mark',
+;;    `icicle-execute-extended-command',
+;;    `icicle-execute-named-keyboard-macro', `icicle-face-list',
+;;    `icicle-file', `icicle-file-list', `icicle-file-other-window',
+;;    `icicle-find-file', `icicle-find-file-absolute',
+;;    `icicle-find-file-absolute-other-window',
+;;    `icicle-find-file-in-tags-table',
+;;    `icicle-find-file-in-tags-table-other-window',
+;;    `icicle-find-file-other-window', `icicle-find-tag',
+;;    `icicle-font', `icicle-frame-bg', `icicle-frame-fg',
+;;    `icicle-fundoc', `icicle-goto-global-marker',
+;;    `icicle-goto-global-marker-or-pop-global-mark',
+;;    `icicle-goto-marker', `icicle-goto-marker-or-set-mark-command',
+;;    `icicle-grep-saved-file-candidates',
+;;    `icicle-gud-gdb-complete-command', `icicle-handle-switch-frame',
+;;    `icicle-imenu', `icicle-imenu-command',
+;;    `icicle-imenu-non-interactive-function',
+;;    `icicle-Info-goto-node', `icicle-Info-goto-node-cmd',
+;;    `icicle-Info-index', `icicle-Info-index-20',
+;;    `icicle-Info-index-cmd', `icicle-Info-menu',
+;;    `icicle-Info-menu-cmd', `icicle-Info-virtual-book',
+;;    `icicle-insert-char', `icicle-insert-thesaurus-entry',
+;;    `icicle-keyword-list', `icicle-kill-buffer', `icicle-kmacro',
+;;    `icicle-lisp-complete-symbol', `icicle-locate-file',
+;;    `icicle-locate-file-other-window', `icicle-mode', `icy-mode',
+;;    `icicle-object-action', `icicle-occur',
+;;    `icicle-other-window-or-frame', `icicle-plist',
+;;    `icicle-pop-tag-mark', `icicle-pp-eval-expression',
+;;    `icicle-purge-bad-file-regions', `icicle-read-color',
+;;    `icicle-read-kbd-macro', `icicle-recent-file',
+;;    `icicle-recent-file-other-window',
+;;    `icicle-recompute-shell-command-candidates',
+;;    `icicle-regexp-list', `icicle-region-open-all-files',
+;;    `icicle-remove-all-regions-in-buffer',
+;;    `icicle-remove-buffer-candidate', `icicle-remove-buffer-config',
+;;    `icicle-remove-entry-from-saved-completion-set',
+;;    `icicle-remove-file-from-recentf-list', `icicle-remove-region',
+;;    `icicle-remove-saved-completion-set',
+;;    `icicle-repeat-complex-command', `icicle-reset-option-to-nil',
+;;    `icicle-save-string-to-variable', `icicle-search',
+;;    `icicle-search-all-regions', `icicle-search-buffer',
+;;    `icicle-search-buff-menu-marked', `icicle-search-char-property',
+;;    `icicle-search-defs', `icicle-search-dired-marked',
+;;    `icicle-search-file', `icicle-search-generic',
+;;    `icicle-search-highlight-cleanup',
+;;    `icicle-search-ibuffer-marked', `icicle-search-keywords',
+;;    `icicle-search-lines', `icicle-search-overlay-property',
+;;    `icicle-search-pages', `icicle-search-paragraphs',
+;;    `icicle-search-region', `icicle-search-sentences',
+;;    `icicle-search-text-property', `icicle-search-word',
+;;    `icicle-select-frame', `icicle-select-frame-by-name',
+;;    `icicle-select-region', `icicle-select-window',
+;;    `icicle-select-window-by-name', `icicle-send-bug-report',
+;;    `icicle-set-option-to-t', `icicle-shell-command-on-file',
+;;    `icicle-shell-dynamic-complete-command',
+;;    `icicle-shell-dynamic-complete-environment-variable',
+;;    `icicle-shell-dynamic-complete-filename',
+;;    `icicle-skip-this-command', `icicle-sort-alphabetical',
+;;    `icicle-sort-by-abbrev-frequency',
+;;    `icicle-sort-by-directories-last',
+;;    `icicle-sort-by-last-file-modification-time',
+;;    `icicle-sort-by-last-use-as-input',
+;;    `icicle-sort-by-previous-use-alphabetically',
+;;    `icicle-sort-by-2nd-parts-alphabetically',
+;;    `icicle-sort-case-insensitive',
+;;    `icicle-sort-extra-candidates-first',
+;;    `icicle-sort-proxy-candidates-first',
+;;    `icicle-sort-special-candidates-first',
+;;    `icicle-sort-special-candidates-first',
+;;    `icicle-sort-turned-OFF', `icicle-tags-search',
+;;    `icicle-toggle-~-for-home-dir',
+;;    `icicle-toggle-alternative-sorting',
+;;    `icicle-toggle-angle-brackets',
+;;    `icicle-toggle-apropos-match-function',
+;;    `icicle-toggle-case-sensitivity', `icicle-toggle-C-for-actions',
+;;    `icicle-toggle-fuzzy-completion',
+;;    `icicle-toggle-hiding-common-match',
+;;    `icicle-toggle-highlight-all-current',
+;;    `icicle-toggle-highlight-historical-candidates',
+;;    `icicle-toggle-ignored-extensions',
+;;    `icicle-toggle-ignored-space-prefix',
+;;    `icicle-toggle-incremental-completion',
+;;    `icicle-toggle-literal-replacement', `icicle-toggle-option',
+;;    `icicle-toggle-proxy-candidates', `icicle-toggle-regexp-quote',
+;;    `icicle-toggle-remote-file-testing',
+;;    `icicle-toggle-search-cleanup',
+;;    `icicle-toggle-search-replace-whole',
+;;    `icicle-toggle-search-whole-word', `icicle-toggle-sorting',
+;;    `icicle-toggle-transforming',
+;;    `icicle-toggle-WYSIWYG-Completions', `icicle-vardoc',
+;;    `icicle-where-is', `icicle-yank-maybe-completing',
+;;    `old-bbdb-complete-name', `old-comint-dynamic-complete',
+;;    `old-comint-replace-by-expanded-filename',
+;;    `old-dired-read-shell-command', `old-ess-complete-object-name',
+;;    `old-gud-gdb-complete-command', `old-read-shell-command',
+;;    `orig-read-file-name', `toggle', `toggle-icicle-~-for-home-dir',
+;;    `toggle-icicle-alternative-sorting',
+;;    `toggle-icicle-angle-brackets',
+;;    `toggle-icicle-apropos-match-function',
+;;    `toggle-icicle-case-sensitivity', `toggle-icicle-C-for-actions',
+;;    `toggle-icicle-fuzzy-completion',
+;;    `toggle-icicle-highlight-all-current',
+;;    `toggle-icicle-highlight-historical-candidates',
+;;    `toggle-icicle-ignored-extensions',
+;;    `toggle-icicle-ignored-space-prefix',
+;;    `toggle-icicle-incremental-completion',
+;;    `toggle-icicle-literal-replacement',
+;;    `toggle-icicle-proxy-candidates', `toggle-icicle-regexp-quote',
+;;    `toggle-icicle-remote-file-testing',
+;;    `toggle-icicle-search-cleanup',
+;;    `toggle-icicle-search-replace-whole',
+;;    `toggle-icicle-search-whole-word', `toggle-icicle-sorting',
+;;    `toggle-icicle-transforming',
+;;    `toggle-icicle-WYSIWYG-Completions', `what-which-how'.
+;;
+;;   Commands to be used mainly in the minibuffer or `*Completions*':
+;;
+;;    `icicle-abort-recursive-edit', `icicle-all-candidates-action',
+;;    `icicle-all-candidates-alt-action',
+;;    `icicle-all-candidates-list-action',
+;;    `icicle-all-candidates-list-alt-action',
+;;    `icicle-apropos-complete', `icicle-apropos-complete-and-exit',
+;;    `icicle-apropos-complete-and-narrow',
+;;    `icicle-apropos-complete-and-widen',
+;;    `icicle-apropos-complete-no-display',
+;;    `icicle-backward-char-dots',
+;;    `icicle-backward-delete-char-untabify',
+;;    `icicle-backward-kill-paragraph',
+;;    `icicle-backward-kill-sentence', `icicle-backward-kill-sexp',
+;;    `icicle-backward-kill-word', `icicle-beginning-of-line+',
+;;    `icicle-candidate-action', `icicle-candidate-alt-action',
+;;    `icicle-candidate-read-fn-invoke',
+;;    `icicle-candidate-set-complement',
+;;    `icicle-candidate-set-define',
+;;    `icicle-candidate-set-difference',
+;;    `icicle-candidate-set-intersection',
+;;    `icicle-candidate-set-retrieve',
+;;    `icicle-candidate-set-retrieve-from-variable',
+;;    `icicle-candidate-set-retrieve-more',
+;;    `icicle-candidate-set-retrieve-persistent',
+;;    `icicle-candidate-set-save', `icicle-candidate-set-save-more',
+;;    `icicle-candidate-set-save-more-selected',
+;;    `icicle-candidate-set-save-persistently',
+;;    `icicle-candidate-set-save-selected',
+;;    `icicle-candidate-set-save-to-variable',
+;;    `icicle-candidate-set-swap', `icicle-candidate-set-truncate',
+;;    `icicle-candidate-set-union',
+;;    `icicle-change-alternative-sort-order',
+;;    `icicle-change-sort-order', `icicle-change-sort-order',
+;;    `icicle-choose-completion', `icicle-clear-current-history',
+;;    `icicle-completing-read+insert',
+;;    `icicle-Completions-mouse-3-menu',
+;;    `icicle-search-define-replacement',
+;;    `icicle-delete-backward-char', `icicle-delete-candidate-object',
+;;    `icicle-delete-char', `icicle-digit-argument',
+;;    `icicle-dispatch-C-^', `icicle-dispatch-C-.',
+;;    `icicle-dispatch-C-comma', `icicle-dispatch-M-comma',
+;;    `icicle-dispatch-M-q', `icicle-doremi-candidate-width-factor',
+;;    `icicle-doremi-inter-candidates-min-spaces',
+;;    `icicle-doremi-zoom-Completions', `icicle-end-of-line+',
+;;    `icicle-erase-minibuffer',
+;;    `icicle-erase-minibuffer-or-history-element',
+;;    `icicle-exit-minibuffer', `icicle-forward-char-dots',
+;;    `icicle-goto/kill-failed-input', `icicle-help-on-candidate',
+;;    `icicle-help-on-next-apropos-candidate',
+;;    `icicle-help-on-next-prefix-candidate',
+;;    `icicle-help-on-previous-apropos-candidate',
+;;    `icicle-help-on-previous-prefix-candidate',
+;;    `icicle-help-string-non-completion', `icicle-history',
+;;    `icicle-insert-completion', `icicle-insert-dot-command',
+;;    `icicle-insert-history-element',
+;;    `icicle-insert-key-description',
+;;    `icicle-insert-list-join-string',
+;;    `icicle-insert-newline-in-minibuffer',
+;;    `icicle-insert-string-at-point',
+;;    `icicle-insert-string-from-variable', `icicle-isearch-complete',
+;;    `icicle-keep-only-past-inputs', `icicle-kill-line',
+;;    `icicle-kill-paragraph', `icicle-kill-region',
+;;    `icicle-kill-region-wimpy', `icicle-kill-sentence',
+;;    `icicle-kill-sexp', `icicle-kill-word',
+;;    `icicle-minibuffer-complete-and-exit', `icicle-minibuffer-help',
+;;    `icicle-mouse-candidate-action',
+;;    `icicle-mouse-candidate-alt-action',
+;;    `icicle-mouse-candidate-read-fn-invoke',
+;;    `icicle-mouse-candidate-set-save',
+;;    `icicle-mouse-candidate-set-save-more',
+;;    `icicle-mouse-choose-completion',
+;;    `icicle-mouse-help-on-candidate',
+;;    `icicle-mouse-remove-candidate',
+;;    `icicle-mouse-save/unsave-candidate',
+;;    `icicle-mouse-save-then-kill', `icicle-mouse-yank-secondary',
+;;    `icicle-move-to-next-completion',
+;;    `icicle-move-to-previous-completion',
+;;    `icicle-narrow-candidates',
+;;    `icicle-narrow-candidates-with-predicate',
+;;    `icicle-negative-argument', `icicle-next-apropos-candidate',
+;;    `icicle-next-apropos-candidate-action',
+;;    `icicle-next-apropos-candidate-alt-action',
+;;    `icicle-next-apropos-match-function',
+;;    `icicle-next-candidate-per-mode',
+;;    `icicle-next-candidate-per-mode-action',
+;;    `icicle-next-candidate-per-mode-alt-action',
+;;    `icicle-next-candidate-per-mode-help', `icicle-next-line',
+;;    `icicle-next-prefix-candidate',
+;;    `icicle-next-prefix-candidate-action',
+;;    `icicle-next-prefix-candidate-alt-action',
+;;    `icicle-other-history',
+;;    `icicle-pp-eval-expression-in-minibuffer',
+;;    `icicle-prefix-complete', `icicle-prefix-complete-no-display',
+;;    `icicle-prefix-word-complete',
+;;    `icicle-previous-apropos-candidate',
+;;    `icicle-previous-apropos-candidate-action',
+;;    `icicle-previous-apropos-candidate-alt-action',
+;;    `icicle-previous-candidate-per-mode',
+;;    `icicle-previous-candidate-per-mode-action',
+;;    `icicle-previous-candidate-per-mode-alt-action',
+;;    `icicle-previous-candidate-per-mode-help',
+;;    `icicle-previous-line', `icicle-previous-prefix-candidate',
+;;    `icicle-previous-prefix-candidate-action',
+;;    `icicle-previous-prefix-candidate-alt-action',
+;;    `icicle-read+insert-file-name', `icicle-regexp-quote-input',
+;;    `icicle-remove-candidate', `icicle-remove-Completions-window',
+;;    `icicle-retrieve-last-input', `icicle-retrieve-next-input',
+;;    `icicle-retrieve-previous-input', `icicle-reverse-sort-order',
+;;    `icicle-save-predicate-to-variable',
+;;    `icicle-save/unsave-candidate', `icicle-scroll-Completions',
+;;    `icicle-scroll-Completions-up',
+;;    `icicle-search-define-replacement', `icicle-self-insert',
+;;    `icicle-sort-alphabetical', `icicle-sort-by-abbrev-frequency',
+;;    `icicle-sort-by-directories-last',
+;;    `icicle-sort-by-last-file-modification-time',
+;;    `icicle-sort-by-last-use-as-input',
+;;    `icicle-sort-by-previous-use-alphabetically',
+;;    `icicle-sort-case-insensitive',
+;;    `icicle-sort-proxy-candidates-first', `icicle-sort-turned-OFF',
+;;    `icicle-switch-to-Completions-buf',
+;;    `icicle-switch-to-completions',
+;;    `icicle-switch-to/from-minibuffer', `icicle-toggle-.',
+;;    `icicle-toggle-~-for-home-dir', `icicle-toggle-C-for-actions',
+;;    `icicle-toggle-alternative-sorting',
+;;    `icicle-toggle-angle-brackets',
+;;    `icicle-toggle-case-sensitivity', `icicle-toggle-dot',
+;;    `icicle-toggle-expand-to-common-match',
+;;    `icicle-toggle-fuzzy-completion',
+;;    `icicle-toggle-highlight-all-current',
+;;    `icicle-toggle-highlight-historical-candidates',
+;;    `icicle-toggle-ignored-extensions',
+;;    `icicle-toggle-ignored-space-prefix',
+;;    `icicle-toggle-incremental-completion',
+;;    `icicle-toggle-literal-replacement',
+;;    `icicle-toggle-proxy-candidates', `icicle-toggle-regexp-quote',
+;;    `icicle-toggle-search-cleanup',
+;;    `icicle-toggle-search-replace-common-match',
+;;    `icicle-toggle-search-replace-whole',
+;;    `icicle-toggle-search-whole-word', `icicle-toggle-sorting',
+;;    `icicle-toggle-transforming', `icicle-transpose-chars',
+;;    `icicle-transpose-sexps', `icicle-transpose-words',
+;;    `icicle-universal-argument', `icicle-universal-argument-minus',
+;;    `icicle-universal-argument-more',
+;;    `icicle-universal-argument-other-key', `icicle-up-directory',
+;;    `icicle-use-interactive-command-history',
+;;    `icicle-widen-candidates', `icicle-yank', `icicle-yank-pop',
+;;    `icicle-yank-secondary', `old-choose-completion',
+;;    `old-exit-minibuffer', `old-minibuffer-complete-and-exit',
+;;    `old-switch-to-completions', `toggle-icicle-.',
+;;    `toggle-icicle-~-for-home-dir', `toggle-icicle-C-for-actions',
+;;    `toggle-icicle-alternative-sorting',
+;;    `toggle-icicle-angle-brackets',
+;;    `toggle-icicle-case-sensitivity', `toggle-icicle-dot',
+;;    `toggle-icicle-expand-to-common-match',
+;;    `toggle-icicle-fuzzy-completion',
+;;    `toggle-icicle-highlight-all-current',
+;;    `toggle-icicle-highlight-historical-candidates',
+;;    `toggle-icicle-ignored-extensions',
+;;    `toggle-icicle-ignored-space-prefix',
+;;    `toggle-icicle-incremental-completion',
+;;    `toggle-icicle-literal-replacement',
+;;    `toggle-icicle-proxy-candidates', `toggle-icicle-regexp-quote',
+;;    `toggle-icicle-search-cleanup',
+;;    `toggle-icicle-search-replace-common-match',
+;;    `toggle-icicle-search-replace-whole',
+;;    `toggle-icicle-search-whole-word', `toggle-icicle-sorting',
+;;    `toggle-icicle-transforming'.
+;;
+;;  Faces defined in Icicles (in Custom group `icicles'):
+;;
+;;    `icicle-candidate-part',
+;;    `icicle-common-match-highlight-Completions',
+;;    `icicle-complete-input', `icicle-completion',
+;;    `icicle-Completions-instruction-1',
+;;    `icicle-Completions-instruction-2',
+;;    `icicle-current-candidate-highlight', `icicle-extra-candidate',
+;;    `icicle-historical-candidate', `icicle-input-completion-fail',
+;;    `icicle-input-completion-fail-lax',
+;;    `icicle-match-highlight-Completions',
+;;    `icicle-match-highlight-minibuffer', `icicle-mode-line-help',
+;;    `icicle-mustmatch-completion', `icicle-proxy-candidate',
+;;    `icicle-saved-candidate', `icicle-search-context-level-1',
+;;    `icicle-search-context-level-2',
+;;    `icicle-search-context-level-3',
+;;    `icicle-search-context-level-4',
+;;    `icicle-search-context-level-5',
+;;    `icicle-search-context-level-6',
+;;    `icicle-search-context-level-7',
+;;    `icicle-search-context-level-8', `icicle-search-current-input',
+;;    `icicle-search-main-regexp-current',
+;;    `icicle-search-main-regexp-others', `icicle-special-candidate',
+;;    `icicle-whitespace-highlight', `minibuffer-prompt'.
+;;
+;;  User options defined in Icicles:
+;;
+;;    `icicle-act-before-cycle-flag', `icicle-add-buffer-name-flag',
+;;    `icicle-add-proxy-candidates-flag',
+;;    `icicle-alternative-actions-alist',
+;;    `icicle-alternative-sort-function',
+;;    `icicle-anything-transform-candidates-flag',
+;;    `icicle-apropos-complete-keys',
+;;    `icicle-apropos-complete-no-display-keys',
+;;    `icicle-apropos-cycle-next-keys',
+;;    `icicle-apropos-cycle-next-action-keys',
+;;    `icicle-apropos-cycle-next-alt-action-keys',
+;;    `icicle-apropos-cycle-next-help-keys',
+;;    `icicle-apropos-cycle-previous-keys',
+;;    `icicle-apropos-cycle-previous-action-keys',
+;;    `icicle-apropos-cycle-previous-alt-action-keys',
+;;    `icicle-apropos-cycle-previous-help-keys',
+;;    `icicle-apropos-match-fns-alist',
+;;    `icicle-bookmark-name-length-max', `icicle-buffer-configs',
+;;    `icicle-buffer-extras',
+;;    `icicle-buffer-ignore-space-prefix-flag',
+;;    `icicle-buffer-match-regexp', `icicle-buffer-no-match-regexp',
+;;    `icicle-buffer-predicate', `icicle-buffer-require-match-flag'
+;;    `icicle-buffer-sort', `icicle-candidate-width-factor',
+;;    `icicle-change-region-background-flag',
+;;    `icicle-change-sort-order-completion-flag',
+;;    `icicle-C-l-uses-completion-flag', `icicle-color-themes',
+;;    `icicle-comint-dynamic-complete-replacements',
+;;    `icicle-command-abbrev-alist',
+;;    `icicle-command-abbrev-match-all-parts-flag',
+;;    `icicle-command-abbrev-priority-flag',
+;;    `icicle-complete-key-anyway-flag',
+;;    `icicle-complete-keys-self-insert-flag',
+;;    `icicle-completing-read+insert-keys',
+;;    `icicle-completion-history-max-length',
+;;    `icicle-Completions-display-min-input-chars',
+;;    `icicle-Completions-frame-at-right-flag',
+;;    `icicle-Completions-text-scale-decrease',
+;;    `icicle-Completions-window-max-height',
+;;    `icicle-customize-save-flag',
+;;    `icicle-customize-save-variable-function',
+;;    `icicle-cycle-into-subdirs-flag',
+;;    `icicle-cycling-respects-completion-mode',
+;;    `icicle-default-thing-insertion', `icicle-default-value',
+;;    `icicle-define-alias-commands-flag',
+;;    `icicle-deletion-action-flag', `icicle-dot-show-regexp-flag',
+;;    `icicle-dot-string', `icicle-expand-input-to-common-match-flag',
+;;    `icicle-file-extras', `icicle-file-match-regexp',
+;;    `icicle-file-no-match-regexp', `icicle-file-predicate',
+;;    `icicle-file-require-match-flag', `icicle-file-sort',
+;;    `icicle-filesets-as-saved-completion-sets-flag',
+;;    `icicle-fuzzy-completion-flag', `icicle-guess-commands-in-path',
+;;    `icicle-help-in-mode-line-flag',
+;;    `icicle-hide-common-match-in-Completions-flag',
+;;    `icicle-highlight-historical-candidates-flag',
+;;    `icicle-highlight-input-completion-failure',
+;;    `icicle-highlight-input-completion-failure-delay',
+;;    `icicle-highlight-input-completion-failure-threshold',
+;;    `icicle-highlight-input-initial-whitespace-flag',
+;;    `icicle-highlight-lighter-flag',
+;;    `icicle-ignore-space-prefix-flag',
+;;    `icicle-incremental-completion-delay',
+;;    `icicle-incremental-completion-flag',
+;;    `icicle-incremental-completion-threshold',
+;;    `icicle-inhibit-ding-flag', `icicle-input-string',
+;;    `icicle-inter-candidates-min-spaces',
+;;    `icicle-isearch-complete-keys', `icicle-key-complete-keys',
+;;    `icicle-key-descriptions-use-<>-flag',
+;;    `icicle-key-descriptions-use-angle-brackets-flag',
+;;    `icicle-keymaps-for-key-completion', `icicle-kmacro-ring-max',
+;;    `icicle-levenshtein-distance', `icicle-list-end-string',
+;;    `icicle-list-join-string', `icicle-list-nth-parts-join-string',
+;;    `icicle-mark-position-in-candidate',
+;;    `icicle-menu-items-to-history-flag',
+;;    `icicle-minibuffer-setup-hook', `icicle-modal-cycle-down-keys',
+;;    `icicle-modal-cycle-down-action-keys',
+;;    `icicle-modal-cycle-down-alt-action-keys',
+;;    `icicle-modal-cycle-down-help-keys',
+;;    `icicle-modal-cycle-up-keys',
+;;    `icicle-modal-cycle-up-action-keys',
+;;    `icicle-modal-cycle-up-alt-action-keys',
+;;    `icicle-modal-cycle-up-help-keys', `icicle-mode',
+;;    `icicle-mode-hook', `icicle-option-type-prefix-arg-list',
+;;    `icicle-point-position-in-candidate',
+;;    `icicle-populate-interactive-history-flag',
+;;    `icicle-pp-eval-expression-print-length',
+;;    `icicle-pp-eval-expression-print-level',
+;;    `icicle-prefix-complete-keys',
+;;    `icicle-prefix-complete-no-display-keys',
+;;    `icicle-prefix-cycle-next-keys',
+;;    `icicle-prefix-cycle-next-action-keys',
+;;    `icicle-prefix-cycle-next-alt-action-keys',
+;;    `icicle-prefix-cycle-next-help-keys',
+;;    `icicle-prefix-cycle-previous-keys',
+;;    `icicle-prefix-cycle-previous-action-keys',
+;;    `icicle-prefix-cycle-previous-alt-action-keys',
+;;    `icicle-prefix-cycle-previous-help-keys',
+;;    `icicle-previous-candidate-keys',
+;;    `icicle-quote-shell-file-name-flag',
+;;    `icicle-read+insert-file-name-keys',
+;;    `icicle-redefine-standard-commands-flag',
+;;    `icicle-regexp-quote-flag', `icicle-regexp-search-ring-max',
+;;    `icicle-region-alist', `icicle-region-auto-open-files-flag',
+;;    `icicle-region-background', `icicle-regions-name-length-max',
+;;    `icicle-require-match-flag', `icicle-saved-completion-sets',
+;;    `icicle-search-cleanup-flag',
+;;    `icicle-search-context-match-predicate',
+;;    `icicle-search-from-isearch-keys',
+;;    `icicle-search-highlight-all-current-flag',
+;;    `icicle-search-highlight-context-levels-flag',
+;;    `icicle-search-highlight-threshold', `icicle-search-hook',
+;;    `icicle-search-replace-common-match-flag',
+;;    `icicle-search-replace-literally-flag',
+;;    `icicle-search-replace-whole-candidate-flag',
+;;    `icicle-search-ring-max', `icicle-search-whole-word-flag',
+;;    `icicle-shell-command-candidates-cache',
+;;    `icicle-show-Completions-help-flag',
+;;    `icicle-show-Completions-initially-flag',
+;;    `icicle-sort-function', `icicle-sort-functions-alist',
+;;    `icicle-special-candidate-regexp',
+;;    `icicle-TAB-shows-candidates-flag',
+;;    `icicle-test-for-remote-files-flag',
+;;    `icicle-thing-at-point-functions',
+;;    `icicle-top-level-key-bindings',
+;;    `icicle-top-level-when-sole-completion-flag',
+;;    `icicle-touche-pas-aux-menus-flag', `icicle-transform-function',
+;;    `icicle-type-actions-alist',
+;;    `icicle-unpropertize-completion-result-flag',
+;;    `icicle-update-input-hook', `icicle-use-~-for-home-dir-flag',
+;;    `icicle-use-C-for-actions-flag',
+;;    `icicle-use-anything-candidates-flag',
+;;    `icicle-use-candidates-only-once-flag',
+;;    `icicle-word-completion-keys',
+;;    `icicle-WYSIWYG-Completions-flag', `icicle-yank-function'.
+;;
+;;  Non-interactive functions in Icicles:
+;;
+;;    `custom-variable-p', `icicle-2nd-part-string-less-p',
+;;    `icicle-abbreviate-or-expand-file-name', `icicle-activate-mark',
+;;    `icicle-add-key+cmd', `icicle-add-menu-item-to-cmd-history',
+;;    `icicle-all-candidates-action-1', `icicle-alt-act-fn-for-type',
+;;    `icicle-any-candidates-p', `icicle-anychar-regexp',
+;;    `icicle-anything-candidate-value', `icicle-apply-action',
+;;    `icicle-apply-list-action', `icicle-apply-to-saved-candidate',
+;;    `icicle-apropos-any-candidates-p',
+;;    `icicle-apropos-any-file-name-candidates-p',
+;;    `icicle-apropos-candidates', `icicle-apropos-complete-1',
+;;    `icicle-backward-delete-char-untabify-dots',
+;;    `icicle-barf-if-outside-Completions',
+;;    `icicle-barf-if-outside-Completions-and-minibuffer',
+;;    `icicle-barf-if-outside-minibuffer', `icicle-binary-option-p',
+;;    `icicle-bind-completion-keys', `icicle-bind-isearch-keys',
+;;    `icicle-bind-key-completion-keys-for-map-var',
+;;    `icicle-bind-key-completion-keys-in-keymaps-from',
+;;    `icicle-bind-other-keymap-keys',
+;;    `icicle-bind-top-level-commands', `icicle-bookmark-cleanup',
+;;    `icicle-bookmark-jump-1',
+;;    `icicle-buffer-file/process-name-less-p',
+;;    `icicle-buffer-smaller-p', `icicle-buffer-sort-*...*-last',
+;;    `icicle-call-then-update-Completions',
+;;    `icicle-cancel-Help-redirection', `icicle-candidate-action-1',
+;;    `icicle-candidate-set-1', `icicle-candidate-set-retrieve-1',
+;;    `icicle-candidate-set-save-1',
+;;    `icicle-candidate-set-save-selected-1',
+;;    `icicle-candidate-short-help',
+;;    `icicle-case-insensitive-string-less-p',
+;;    `icicle-case-string-less-p', `icicle-cdr-lessp',
+;;    `icicle-char-properties-in-buffer',
+;;    `icicle-char-properties-in-buffers',
+;;    `icicle-choose-anything-candidate',
+;;    `icicle-choose-candidate-of-type',
+;;    `icicle-choose-completion-string', `icicle-clear-history-1',
+;;    `icicle-clear-history-entry', `icicle-clear-minibuffer',
+;;    `icicle-color-blue-lessp', `icicle-color-completion-setup',
+;;    `icicle-color-green-lessp', `icicle-color-help',
+;;    `icicle-color-hue-lessp', `icicle-color-red-lessp',
+;;    `icicle-color-saturation-lessp', `icicle-color-value-lessp',
+;;    `icicle-comint-dynamic-complete-as-filename',
+;;    `icicle-comint-dynamic-simple-complete',
+;;    `icicle-comint-hook-fn',
+;;    `icicle-comint-replace-orig-completion-fns',
+;;    `icicle-comint-search-get-final-choice',
+;;    `icicle-comint-search-get-minibuffer-input',
+;;    `icicle-comint-search-send-input',
+;;    `icicle-command-abbrev-action', `icicle-command-abbrev-command',
+;;    `icicle-command-abbrev-matching-commands',
+;;    `icicle-command-abbrev-record', `icicle-command-abbrev-regexp',
+;;    `icicle-command-abbrev-save',
+;;    `icicle-command-abbrev-used-more-p',
+;;    `icicle-command-names-alphabetic-p',
+;;    `icicle-compilation-hook-fn',
+;;    `icicle-compilation-search-in-context-fn',
+;;    `icicle-complete-again-update', `icicle-complete-keys-1',
+;;    `icicle-complete-keys-action', `icicle-completing-p',
+;;    `icicle-completing-read', , `icicle-completing-read-multiple',
+;;    `icicle-completing-read-history',
+;;    `icicle-completion-all-completions',
+;;    `icicle-completion-setup-function',
+;;    `icicle-completion-try-completion',
+;;    `icicle-compute-shell-command-candidates',
+;;    `icicle-convert-dots',
+;;    `icicle-current-completion-in-Completions',
+;;    `icicle-current-sort-functions', `icicle-current-sort-order',
+;;    `icicle-customize-faces', `icicle-custom-type',
+;;    `icicle-dabbrev--abbrev-at-point',
+;;    `icicle-default-buffer-names',
+;;    `icicle-define-crm-completion-map', ,
+;;    `icicle-define-cycling-keys', `icicle-define-icicle-maps',
+;;    `icicle-define-minibuffer-maps',
+;;    `icicle-delete-backward-char-dots',
+;;    `icicle-delete-candidate-object-1', `icicle-delete-char-dots',
+;;    `icicle-delete-count', `icicle-delete-current-candidate-object',
+;;    `icicle-delete-file-or-directory',
+;;    `icicle-delete-region-from-alist',
+;;    `icicle-delete-whitespace-from-string',
+;;    `icicle-describe-opt-action',
+;;    `icicle-describe-opt-of-type-complete', `icicle-ding',
+;;    `icicle-dired-read-shell-command',
+;;    `icicle-dired-smart-shell-command', `icicle-dirs-last-p',
+;;    `icicle-displayable-cand-from-saved-set',
+;;    `icicle-display-cand-from-full-cand',
+;;    `icicle-display-completion-list', `icicle-display-Completions',
+;;    `icicle-display-candidates-in-Completions', `icicle-doc-action',
+;;    `icicle-edmacro-parse-keys',
+;;    `icicle-ensure-overriding-map-is-bound',
+;;    `icicle-execute-extended-command-1',
+;;    `icicle-expanded-common-match',
+;;    `icicle-expanded-common-match-1', `icicle-expand-file-name',
+;;    `icicle-explicit-saved-completion-candidates', `icicle-explore',
+;;    `icicle-extra-candidates-first-p',
+;;    `icicle-face-valid-attribute-values', `icicle-file-directory-p',
+;;    `icicle-file-name-apropos-candidates',
+;;    `icicle-file-name-directory-w-default',
+;;    `icicle-file-name-input-p', `icicle-file-name-nondirectory',
+;;    `icicle-file-name-prefix-candidates', `icicle-file-readable-p',
+;;    `icicle-file-remote-p', `icicle-file-writable-p',
+;;    `icicle-filesets-files-under', `icicle-files-within',
+;;    `icicle-filter-alist', `icicle-filter-wo-input',
+;;    `icicle-find-first-tag-action',
+;;    `icicle-find-first-tag-other-window-action',
+;;    `icicle-find-tag-action', `icicle-find-tag-define-candidates',
+;;    `icicle-find-tag-define-candidates-1',
+;;    `icicle-find-tag-final-act', `icicle-find-tag-help',
+;;    `icicle-find-tag-quit-or-error',
+;;    `icicle-first-matching-candidate', `icicle-first-N',
+;;    `icicle-fit-completions-window', `icicle-fix-default-directory',
+;;    `icicle-flat-list', `icicle-fn-doc-minus-sig',
+;;    `icicle-font-w-orig-size', `icicle-frame-name-history',
+;;    `icicle-frames-on', `icicle-function-name-history',
+;;    `icicle-funvardoc-action', `icicle-fuzzy-candidates',
+;;    `icicle-get-alist-candidate',
+;;    `icicle-get-anything-actions-for-type',
+;;    `icicle-get-anything-cached-candidates',
+;;    `icicle-get-anything-candidates',
+;;    `icicle-get-anything-candidates-of-type',
+;;    `icicle-get-anything-default-actions-for-type',
+;;    `icicle-get-anything-input-delay',
+;;    `icicle-get-anything-req-pat-chars',
+;;    `icicle-get-anything-types',
+;;    `icicle-get-candidates-from-saved-set', `icicle-goto-marker-1',
+;;    `icicle-goto-marker-1-action', `icicle-group-regexp',
+;;    `icicle-dired-guess-shell-command',
+;;    `icicle-help-on-candidate-symbol', `icicle-help-line-buffer',
+;;    `icicle-help-line-file', `icicle-help-string-completion',
+;;    `icicle-highlight-candidate-in-Completions',
+;;    `icicle-highlight-complete-input',
+;;    `icicle-highlight-initial-whitespace',
+;;    `icicle-highlight-input-noncompletion',
+;;    `icicle-highlight-input-noncompletion-rest',
+;;    `icicle-highlight-lighter', `icicle-historical-alphabetic-p',
+;;    `icicle-imenu-command-p', `icicle-imenu-in-buffer-p',
+;;    `icicle-imenu-non-interactive-function-p',
+;;    `icicle-increment-cand-nb+signal-end',
+;;    `icicle-increment-color-hue', `icicle-increment-color-value',
+;;    `icicle-Info-book-order-p',
+;;    `icicle-Info-build-node-completions',
+;;    `icicle-Info-build-node-completions-1',
+;;    `icicle-Info-goto-node-1', `icicle-Info-goto-node-action',
+;;    `icicle-Info-index-action', `icicle-Info-read-node-name',
+;;    `icicle-input-from-minibuffer', `icicle-insert-candidates',
+;;    `icicle-insert-Completions-help-string', `icicle-insert-dot',
+;;    `icicle-insert-for-yank', `icicle-insert-input',
+;;    `icicle-insert-thesaurus-entry-cand-fn', `icicle-insert-thing',
+;;    `icicle-isearch-complete-past-string', `icicle-join-nth-parts',
+;;    `icicle-key-description', `icicle-keys+cmds-w-prefix',
+;;    `icicle-kill-a-buffer',
+;;    `icicle-kill-a-buffer-and-update-completions',
+;;    `icicle-kmacro-action', `icicle-last-modified-first-p',
+;;    `icicle-levenshtein-match', `icicle-levenshtein-one-match',
+;;    `icicle-levenshtein-one-regexp',
+;;    `icicle-levenshtein-strict-match',
+;;    `icicle-lisp-vanilla-completing-read',
+;;    `icicle-local-keys-first-p',
+;;    `icicle-looking-at-anychar-regexp-p',
+;;    `icicle-looking-back-at-anychar-regexp-p',
+;;    `icicle-major-mode-name-less-p', `icicle-make-color-candidate',
+;;    `icicle-make-face-candidate', `icicle-make-frame-alist',
+;;    `icicle-make-window-alist', `icicle-markers',
+;;    `icicle-markers-to-readable', `icicle-marker+text',
+;;    `icicle-maybe-multi-completion-completing-p',
+;;    `icicle-maybe-sort-and-strip-candidates',`icicle-mctize-all',
+;;    `icicle-mctized-display-candidate',
+;;    `icicle-mctized-full-candidate',
+;;    `icicle-minibuffer-default-add-completions',
+;;    `icicle-minibuf-input', `icicle-minibuf-input-sans-dir',
+;;    `icicle-minibuffer-prompt-end', `icicle-minibuffer-setup',
+;;    `icicle-mode-line-name-less-p', `icicle-most-recent-first-p',
+;;    `icicle-mouse-candidate-action-1',
+;;    `icicle-msg-maybe-in-minibuffer', `icicle-ms-windows-NET-USE',
+;;    `icicle-nb-of-candidate-in-Completions',
+;;    `icicle-next-candidate',
+;;    `icicle-next-single-char-property-change',
+;;    `icicle-non-whitespace-string-p', `icicle-part-1-cdr-lessp',
+;;    `icicle-part-1-lessp', `icicle-part-2-lessp',
+;;    `icicle-part-3-lessp', `icicle-part-4-lessp',
+;;    `icicle-part-N-lessp', `icicle-place-cursor',
+;;    `icicle-place-overlay', `icicle-prefix-any-candidates-p',
+;;    `icicle-prefix-any-file-name-candidates-p',
+;;    `icicle-prefix-candidates', `icicle-prefix-complete-1',
+;;    `icicle-prefix-keys-first-p', `icicle-proxy-candidate-first-p',
+;;    `icicle-put-at-head', `icicle-put-whole-cand-prop',
+;;    `icicle-quote-file-name-part-of-cmd',
+;;    `icicle-raise-Completions-frame', `icicle-readable-to-markers',
+;;    `icicle-read-char-exclusive', `icicle-read-face-name',
+;;    `icicle-read-file-name', `icicle-read-from-minibuffer',
+;;    `icicle-read-from-minibuf-nil-default',
+;;    `icicle-read-single-key-description', `icicle-read-number',
+;;    `icicle-read-shell-command',
+;;    `icicle-read-shell-command-completing', `icicle-read-string',
+;;    `icicle-read-string-completing',
+;;    `icicle-read-var-value-satisfying', `icicle-rebind-global',
+;;    `icicle-recentf-make-menu-items', `icicle-recompute-candidates',
+;;    `icicle-redefine-standard-commands',
+;;    `icicle-redefine-standard-options',
+;;    `icicle-redefine-std-completion-fns',
+;;    `icicle-region-add-buffers', `icicle-region-add-short-help',
+;;    `icicle-region-help', `icicle-region-or-buffer-limits',
+;;    `icicle-region-sorted', `icicle-remap',
+;;    `icicle-remove-buffer-candidate-action',
+;;    `icicle-remove-buffer-config-action',
+;;    `icicle-remove-cand-from-lists',
+;;    `icicle-remove-candidate-display-others',
+;;    `icicle-remove-color-duplicates', `icicle-remove-dots',
+;;    `icicle-remove-duplicates', `icicle-remove-dups-if-extras',
+;;    `icicle-remove-from-recentf-candidate-action',
+;;    `icicle-remove-if', `icicle-remove-if-not',
+;;    `icicle-remove-property', `icicle-remove-saved-set-action',
+;;    `icicle-replace-input-w-parent-dir', `icicle-require-match-p',
+;;    `icicle-restore-completion-keys',
+;;    `icicle-restore-other-keymap-keys',
+;;    `icicle-restore-region-face',
+;;    `icicle-restore-standard-commands',
+;;    `icicle-restore-standard-options',
+;;    `icicle-restore-std-completion-fns',
+;;    `icicle-retrieve-candidates-from-set', `icicle-reversible-sort',
+;;    `icicle-run-icicle-post-command-hook',
+;;    `icicle-run-icicle-pre-command-hook', `icicle-saved-fileset-p',
+;;    `icicle-save-or-restore-input', `icicle-save-raw-input',
+;;    `icicle-scatter', `icicle-scatter-match',
+;;    `icicle-scroll-or-update-Completions', `icicle-search-action',
+;;    `icicle-search-char-property-scan',
+;;    `icicle-search-choose-buffers', `icicle-search-cleanup',
+;;    `icicle-search-define-candidates',
+;;    `icicle-search-define-candidates-1', `icicle-search-final-act',
+;;    `icicle-search-help',
+;;    `icicle-search-highlight-all-input-matches',
+;;    `icicle-search-highlight-and-maybe-replace',
+;;    `icicle-search-highlight-input-matches-here',
+;;    `icicle-search-in-context-default-fn',
+;;    `icicle-search-property-args', `icicle-search-quit-or-error',
+;;    `icicle-search-read-context-regexp', `icicle-search-read-word',
+;;    `icicle-search-regexp-scan', `icicle-search-region-action',
+;;    `icicle-search-replace-candidate',
+;;    `icicle-search-replace-fixed-case-p',
+;;    `icicle-search-replace-match', `icicle-search-where-arg',
+;;    `icicle-select-minibuffer-contents'
+;;    `icicle-select-region-action', `icicle-set-calling-cmd',
+;;    `icicle-set-difference', `icicle-set-intersection',
+;;    `icicle-set-union', `icicle-shell-command',
+;;    `icicle-shell-command-on-region',
+;;    `icicle-shell-dynamic-complete-as-command',
+;;    `icicle-shell-dynamic-complete-as-environment-variable',
+;;    `icicle-show-help-in-mode-line', `icicle-show-in-mode-line',
+;;    `icicle-signum', `icicle-S-iso-lefttab-to-S-TAB',
+;;    `icicle-special-candidates-first-p',
+;;    `icicle-start-of-candidates-in-Completions',
+;;    `icicle-strip-ignored-files-and-sort',
+;;    `icicle-subst-envvar-in-file-name',
+;;    `icicle-substring-no-properties', `icicle-substrings-of-length',
+;;    `icicle-successive-action', `icicle-this-command-keys-prefix',
+;;    `icicle-toggle-icicle-mode-twice', `icicle-top-level-prep',
+;;    `icicle-transform-candidates',
+;;    `icicle-transform-multi-completion',
+;;    `icicle-transform-sole-candidate',
+;;    `icicle-transpose-chars-dots', `icicle-try-switch-buffer',
+;;    `icicle-unbind-isearch-keys',
+;;    `icicle-unbind-key-completion-keys-for-map-var',
+;;    `icicle-unbind-key-completion-keys-in-keymaps-from',
+;;    `icicle-undo-std-completion-faces',
+;;    `icicle-unhighlight-lighter', `icicle-unmap',
+;;    `icicle-unpropertize', `icicle-unsorted-apropos-candidates',
+;;    `icicle-unsorted-file-name-apropos-candidates',
+;;    `icicle-unsorted-file-name-prefix-candidates',
+;;    `icicle-unsorted-prefix-candidates', `icicle-upcase',
+;;    `icicle-upcase-if-ignore-case', `icicle-update-and-next',
+;;    `icicle-update-ignored-extensions-regexp',
+;;    `icicle-value-satisfies-type-p', `icicle-var-inherits-type-p',
+;;    `icicle-var-is-of-type-p', `icicle-var-matches-type-p',
+;;    `icicle-var-val-satisfies-type-p',
+;;    `old-choose-completion-string', `old-completing-read',
+;;    `old-completing-read-multiple', `old-completion-setup-function',
+;;    `old-dired-smart-shell-command', `old-display-completion-list',
+;;    `old-face-valid-attribute-values',
+;;    `old-minibuffer-default-add-completions', `old-read-face-name',
+;;    `old-read-file-name', `old-read-from-minibuffer',
+;;    `old-read-number', `old-read-string', `old-shell-command',
+;;    `old-shell-command-on-region'.
+;;
+;;  Internal variables and constants defined in Icicles:
+;;
+;;    `icicle-abs-file-candidates', `icicle-all-candidates-action-p',
+;;    `icicle-all-candidates-list-action-fn',
+;;    `icicle-all-candidates-list-alt-action-fn',
+;;    `icicle-anychar-regexp', `icicle-apply-nomsg',
+;;    `icicle-apropos-complete-match-fn', `icicle-bookmark-history',
+;;    `icicle-bookmark-menu-map', `icicle-buffer-config-history',
+;;    `icicle-candidate-action-fn', `icicle-candidate-alt-action-fn',
+;;    `icicle-candidate-entry-fn', `icicle-candidate-help-fn',
+;;    `icicle-candidate-nb', `icicle-candidate-properties-alist',
+;;    `icicle-candidates-alist', `icicle-char-property-value-history',
+;;    `icicle-cmd-calling-for-completion', `icicle-cmd-reading-input',
+;;    `icicle-color-history', `icicle-color-theme-history',
+;;    `icicle-command-abbrev-history', `icicle-commands-for-abbrev',
+;;    `icicle-common-match-string',
+;;    `icicle-comp-base-is-default-dir-p',
+;;    `icicle-complete-input-overlay', `icicle-complete-keys-alist',
+;;    `icicle-completing-p',
+;;    `icicle-completing-read+insert-candidates',
+;;    `icicle-completion-candidates',
+;;    `icicle-completion-prompt-overlay',
+;;    `icicle-completion-set-history', `icicle-confirm-exit-commands',
+;;    `icicle-crm-local-completion-map',
+;;    `icicle-crm-local-must-match-map',
+;;    `icicle-current-completion-candidate-overlay',
+;;    `icicle-current-completion-mode', `icicle-current-input',
+;;    `icicle-current-raw-input', `icicle-custom-menu-map',
+;;    `icicle-cycling-p', `icicle-default-directory',
+;;    `icicle-default-thing-insertion-flipped-p',
+;;    `icicle-delete-candidate-object', `icicle-describe-menu-map',
+;;    `icicle-dictionary-history', `icicle-dir-candidate-can-exit-p',
+;;    `icicle-doc-last-initial-cand-set',
+;;    `icicle-dot-string-internal', `icicle-edit-menu-map',
+;;    `icicle-edit-update-p', `icicle-explore-final-choice',
+;;    `icicle-explore-final-choice-full', `icicle-extra-candidates',
+;;    `icicle-extra-candidates-dir-insert-p',
+;;    `icicle-face-name-history', `icicle-fancy-candidates-p',
+;;    `icicle-fancy-cands-internal-p', `icicle-file-menu-map',
+;;    `icicle-filtered-default-value', `icicle-font-name-history',
+;;    `icicle-frame-alist', `icicle-frame-name-history',
+;;    `icicle-frames-menu-map', `icicle-function-name-history',
+;;    `icicle-fundoc-last-initial-cand-set',
+;;    `icicle-general-help-string',
+;;    `icicle-get-alist-candidate-function',
+;;    `icicle-hist-cands-no-highlight', `icicle-ignored-extensions',
+;;    `icicle-ignored-extensions-regexp',
+;;    `icicle-incremental-completion-p', `icicle-info-menu-map',
+;;    `icicle-Info-only-rest-of-book-p', `icicle-inhibit-sort-p',
+;;    `icicle-inhibit-try-switch-buffer', `icicle-initial-value',
+;;    `icicle-input-completion-fail-overlay', `icicle-input-fail-pos',
+;;    `icicle-insert-string-at-pt-end',
+;;    `icicle-insert-string-at-pt-start',
+;;    `icicle-interactive-history', `icicle-kill-history',
+;;    `icicle-kmacro-alist', `icicle-kmacro-history',
+;;    `icicle-last-apropos-complete-match-fn',
+;;    `icicle-last-completion-candidate',
+;;    `icicle-last-completion-command', `icicle-last-input',
+;;    `icicle-last-sort-function', `icicle-last-top-level-command',
+;;    `icicle-last-transform-function', `icicle-list-use-nth-parts',
+;;    `icicle-menu-map', `icicle-minor-mode-map-entry',
+;;    `icicle-mode-map', `icicle-ms-windows-drive-hash',
+;;    `icicle-must-match-regexp', `icicle-must-not-match-regexp',
+;;    `icicle-must-pass-predicate',
+;;    `icicle-nb-of-other-cycle-candidates',
+;;    `icicle-next-apropos-complete-cycles-p',
+;;    `icicle-next-prefix-complete-cycles-p',
+;;    `icicle-old-read-file-name-fn', `icicle-options-menu-map',
+;;    `icicle-plist-last-initial-cand-set',
+;;    `icicle-pre-minibuffer-buffer', `icicle-post-command-hook',
+;;    `icicle-pre-command-hook', `icicle-predicate-types-alist',
+;;    `icicle-previous-raw-file-name-inputs',
+;;    `icicle-previous-raw-non-file-name-inputs',
+;;    `icicle-proxy-candidate-regexp', `icicle-proxy-candidates',
+;;    `icicle-read-expression-map', `icicle-re-no-dot',
+;;    `icicle-require-match-p', `icicle-respect-completion-styles-p',
+;;    `icicle-reverse-sort-p', `icicle-saved-candidate-overlays',
+;;    `icicle-saved-candidates-variables-obarray',
+;;    `icicle-saved-completion-candidate',
+;;    `icicle-saved-completion-candidates',
+;;    `icicle-saved-completion-candidates-internal',
+;;    `icicle-saved-ignored-extensions',
+;;    `icicle-saved-kmacro-ring-max', `icicle-saved-proxy-candidates',
+;;    `icicle-saved-regexp-search-ring-max',
+;;    `icicle-saved-region-background',
+;;    `icicle-saved-search-ring-max',
+;;    `icicle-scroll-Completions-backward-p', `icicle-search-command',
+;;    `icicle-search-context-level', `icicle-search-context-regexp',
+;;    `icicle-search-current-overlay', `icicle-search-final-choice',
+;;    `icicle-search-history', `icicle-search-in-context-fn',
+;;    `icicle-searching-p', `icicle-search-level-overlays',
+;;    `icicle-search-menu-map', `icicle-search-tags-menu-map',
+;;    `icicle-search-overlays', `icicle-search-refined-overlays',
+;;    `icicle-search-replacement',
+;;    `icicle-search-replacement-history',
+;;    `icicle-successive-grab-count',
+;;    `icicle-text-property-value-history',
+;;    `icicle-thing-at-pt-fns-pointer',
+;;    `icicle-universal-argument-map',
+;;    `icicle-vardoc-last-initial-cand-set',
+;;    `icicle-vardoc-last-initial-option-cand-set',
+;;    `icicle-variable-name-history',
+;;    `icicle-whole-candidate-as-text-prop-p',
+;;    `lacarte-menu-items-alist', `old-crm-local-completion-map',
+;;    `old-crm-local-must-match-map'.
+;;
+;;  Emacs functions defined in Icicles for older Emacs versions:
+;;
+;;    `select-frame-set-input-focus'.
+;;
+;;  Widgets (customization types) defined in Icicles:
+;;
+;;    `icicle-key-definition'.
+;;
+;;
+;;  ***** NOTE: These EMACS PRIMITIVES have been REDEFINED in Icicles:
+;;
+;;  `completing-read'              - (See below and doc string.)
+;;  `display-completion-list'      - (See below and doc string.)
+;;  `exit-minibuffer'              - Remove *Completion* window.
+;;  `minibuffer-complete-and-exit' - Remove *Completion* window.
+;;  `read-file-name'               - (See below and doc string.)
+;;  `read-from-minibuffer'         - (See below and doc string.)
+;;  `read-string'                  - (See below and doc string.)
+;;
+;;
+;;  ***** NOTE: The following functions defined in `dabbrev.el' have
+;;              been REDEFINED in Icicles:
+;;
+;;  `dabbrev-completion' - Use Icicles completion when you repeat
+;;                         (`C-M-/').
+;;
+;;
+;;  ***** NOTE: The following functions defined in `lisp.el' have
+;;              been REDEFINED in Icicles:
+;;
+;;  `lisp-complete-symbol' - Selects *Completions* window even if on
+;;                           another frame.
+;;
+;;
+;;  ***** NOTE: The following functions defined in `mouse.el' have
+;;              been REDEFINED in Icicles:
+;;
+;;  `mouse-choose-completion' - Return the number of the completion.
+;;
+;;
+;;  ***** NOTE: The following functions defined in `simple.el' have
+;;              been REDEFINED in Icicles:
+;;
+;;  `choose-completion-string' -
+;;     Don't exit minibuffer after `lisp-complete-symbol' completion.
+;;  `completion-setup-function' - 1. Put faces on inserted string(s).
+;;                                2. Help on help.
+;;  `switch-to-completions' - Always selects *Completions* window.
+;;
+;;  `next-history-element' (advised only) -
+;;     Depending on `icicle-default-value', select minibuffer
+;;     contents.
+;;
+;;  `repeat-complex-command' - Use `completing-read' to read command.
+;;
+;;  For descriptions of changes to this file, see `icicles-chg.el'.
+ 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(eval-when-compile
+ (when (< emacs-major-version 20) (require 'cl))) ;; when, unless
+
+;;;;;;;;;;;;;
+
+
+;;; Load other Icicles files (except documentation) ------------------
+
+(require 'icicles-opt)
+(require 'icicles-var)
+(require 'icicles-face) ;; Requires opt
+
+(require 'icicles-fn) ;; Requires opt, var
+(require 'icicles-mac) ;; Requires var
+(require 'icicles-mcmd) ;; Requires opt, var, fn, mac
+(require 'icicles-cmd1) ;; Requires mac, opt, var, fn, mcmd
+(require 'icicles-cmd2) ;; Requires mac, opt, var, fn, mcmd, cmd1
+(require 'icicles-mode) ;; Requires opt, cmd
+
+;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'icicles)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; icicles.el ends here

File tree-widget-examples.el

+;;; tree-widget-examples.el --- basic examples using the tree-widget
+
+;; Copyright (C) 2001, 2003 by David Ponce
+
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 27 Nov 2001
+;; Keywords: extensions
+;; Revision: $Id: tree-widget-examples.el,v 1.4 2003/09/29 13:41:21 ponced Exp $
+
+(defconst tree-widget-examples-version "1.2")
+
+;; This file is not part of Emacs
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; This library gives simple examples of use of the `tree-widget'.
+;;
+
+;;; History:
+;;
+
+;;; Code:
+(require 'tree-widget)
+
+;;; Compatibility
+;;
+(cond
+ ((featurep 'xemacs)
+  (defalias 'tree-widget-example-overlay-lists
+    (lambda () (list (extent-list))))
+  (defalias 'tree-widget-example-delete-overlay
+    'delete-extent))
+ (t
+  (defalias 'tree-widget-example-overlay-lists
+    'overlay-lists)
+  (defalias 'tree-widget-example-delete-overlay
+    'delete-overlay))
+ )
+
+;;; The examples
+;;
+(defun tree-widget-example-close (&rest ignore)
+  "Close the current dialog.
+IGNORE arguments."
+  (interactive)
+  (kill-buffer (current-buffer)))
+
+(defun tree-widget-example-1 (&optional theme)
+  "A simple usage of the `tree-widget'.
+Optional argument THEME is an image theme to use to draw the tree.  It
+default to the global theme defined in option `tree-widget-theme'.
+To be prompted for a theme, use
+ \\[universal-argument] \\[tree-widget-example-1]."
+  (interactive
+   (list (if current-prefix-arg
+             (completing-read "Theme name: "
+                              '(("default" . "default")
+                                ("folder"  . "folder")))
+           nil)))
+  (switch-to-buffer "*`tree-widget' example 1*")
+  (kill-all-local-variables)
+  (let ((inhibit-read-only t))
+    (erase-buffer))
+  (let ((all (tree-widget-example-overlay-lists)))
+    (mapcar #'tree-widget-example-delete-overlay (car all))
+    (mapcar #'tree-widget-example-delete-overlay (cdr all)))
+  (tree-widget-set-theme theme)
+  (widget-insert (format "%s. \n\n" (buffer-name)))
+  (widget-create
+   ;; Open this level.
+   'tree-widget :open t
+   ;; Use a push button for this node.
+   :node '(push-button
+           :tag "Root"
+           :format "%[%t%]\n"
+           :notify
+           (lambda (&rest ignore)
+             (message "This is the Root node")))
+   ;; Add subtrees (their nodes defaut to items).
+   '(tree-widget :tag "Node-1")
+   '(tree-widget :tag "Node-2"
+                 (tree-widget :tag "Empty-2.1")
+                 (tree-widget :tag "Node-2.2"
+                              (item :tag "Leaf-2.2.1")
+                              (item :tag "Leaf-2.2.2")))
+   '(tree-widget :tag "Node-3"
+                 (tree-widget :tag "Empty-3.1")
+                 (item        :tag "Leaf-3.2")))
+  (widget-insert "\n")
+  ;; Insert the Close button
+  (widget-create 'push-button
+                 :button-keymap tree-widget-button-keymap ; XEmacs
+                 :keymap        tree-widget-button-keymap ; Emacs
+                 :notify 'tree-widget-example-close
+                 "Close")
+  (use-local-map widget-keymap)
+  (widget-setup))
+
+(defvar tree-widget-example-11-open-nodes nil
+  "List of name of tree nodes opened.
+Initially all tree nodes are closed.")
+
+(defun tree-widget-example-11-open-p (node-name)
+  "Return non-nil if NODE-NAME is the name of an open tree node."
+  (member node-name tree-widget-example-11-open-nodes))
+
+(defun tree-widget-example-11-after-toggle-fcn (tree)
+  "Update the list of open nodes `tree-widget-example-11-open-nodes'.
+Called after each folding/unfolding of the `tree-widget' TREE.
+See also the hook `tree-widget-after-toggle-functions'."
+  (let ((node-name (widget-get tree :node-name))
+        (open      (widget-get tree :open)))
+    (if open
+        (add-to-list 'tree-widget-example-11-open-nodes node-name)
+      (setq tree-widget-example-11-open-nodes
+            (delete node-name tree-widget-example-11-open-nodes)))))
+
+(defun tree-widget-example-11 ()
+  "A simple usage of the `tree-widget'.
+Each node open/close state is persistent accross invocations of the
+command."
+  (interactive)
+  (switch-to-buffer "*`tree-widget' example 11*")
+  (kill-all-local-variables)
+  (let ((inhibit-read-only t))
+    (erase-buffer))
+  (let ((all (tree-widget-example-overlay-lists)))
+    (mapcar #'tree-widget-example-delete-overlay (car all))
+    (mapcar #'tree-widget-example-delete-overlay (cdr all)))
+  (make-local-hook 'tree-widget-after-toggle-functions)
+  (add-hook 'tree-widget-after-toggle-functions
+            'tree-widget-example-11-after-toggle-fcn nil t)
+
+  (widget-insert (format "%s. \n\n" (buffer-name)))
+  (widget-create
+   ;; Open this level.
+   'tree-widget
+   :node-name "0" ;; Node unique ID
+   :open (tree-widget-example-11-open-p "0")
+   ;; Use a push button for this node.
+   :node '(push-button
+           :tag "Root"
+           :format "%[%t%]\n"
+           :notify
+           (lambda (&rest ignore)
+             (message "This is the Root node")))
+   ;; Add subtrees (their nodes defaut to items).
+   `(tree-widget :tag "Child-1"
+                 :node-name "1"
+                 :open ,(tree-widget-example-11-open-p "1")
+                 )
+   `(tree-widget :tag "Child-2"
+                 :node-name "2"
+                 :open ,(tree-widget-example-11-open-p "2")
+                 (tree-widget :tag "Child-2.1"
+                              :node-name "2.1"
+                              :open ,(tree-widget-example-11-open-p "2.1")
+                              )
+                 (tree-widget :tag "Child-2.2"
+                              :node-name "2.2"
+                              :open ,(tree-widget-example-11-open-p "2.2")
+                              (tree-widget :tag "Child-2.2.1"
+                                           :node-name "2.2.1"
+                                           :open ,(tree-widget-example-11-open-p "2.2.1")
+                                           )
+                              (tree-widget :tag "Child-2.2.2"
+                                           :node-name "2.2.2"
+                                           :open ,(tree-widget-example-11-open-p "2.2.2")
+                                           )))
+   `(tree-widget :tag "Child-3"
+                 :node-name "3"
+                 :open ,(tree-widget-example-11-open-p "3")
+                 (tree-widget :tag "Child-3.1"
+                              :node-name "3.1"
+                              :open ,(tree-widget-example-11-open-p "3.1")
+                              )
+                 (tree-widget :tag "Child-3.2"
+                              :node-name "3.2"
+                              :open ,(tree-widget-example-11-open-p "3.2")
+                              )))
+  (widget-insert "\n")
+  ;; Insert the Close button
+  (widget-create 'push-button
+                 :button-keymap tree-widget-button-keymap ; XEmacs
+                 :keymap        tree-widget-button-keymap ; Emacs
+                 :notify 'tree-widget-example-close
+                 "Close")
+  (use-local-map widget-keymap)
+  (widget-setup))
+
+(defun tree-widget-example-2-dynargs (widget)
+  "Return the children definitions of WIDGET.
+Reuse the cached :args property value if exists."
+  (or (widget-get widget :args)
+      '((tree-widget :tag "Empty-2.1")
+        (tree-widget :tag "Node-2.2"
+                     (item :tag "Leaf-2.2.1")
+                     (item :tag "Leaf-2.2.2")))))
+
+(defun tree-widget-example-2 ()
+  "A simple usage of the `tree-widget' with dynamic expansion."
+  (interactive)
+  (switch-to-buffer "*`tree-widget' example 2*")
+  (kill-all-local-variables)
+  (let ((inhibit-read-only t))
+    (erase-buffer))
+  (let ((all (tree-widget-example-overlay-lists)))
+    (mapcar #'tree-widget-example-delete-overlay (car all))
+    (mapcar #'tree-widget-example-delete-overlay (cdr all)))
+
+  (widget-insert (format "%s. \n\n" (buffer-name)))
+
+  (widget-create
+   ;; Open this level.
+   'tree-widget :open t
+   ;; Use a push button for this node.
+   :node '(push-button
+           :tag "Root"
+           :format "%[%t%]\n"
+           :notify
+           (lambda (&rest ignore)
+             (message "This is the Root node")))
+   ;; Add subtrees (their nodes defaut to items).
+   '(tree-widget :tag "Node-1")
+   ;; Dynamically retrieve children of this node.
+   '(tree-widget :tag "Node-2"
+                 :dynargs tree-widget-example-2-dynargs
+                 :has-children t)
+   '(tree-widget :tag "Node-3"
+                 (tree-widget :tag "Empty-3.1")
+                 (item        :tag "Leaf-3.2")))
+  (widget-insert "\n")
+  ;; Insert the Close button
+  (widget-create 'push-button
+                 :button-keymap tree-widget-button-keymap ; XEmacs
+                 :keymap        tree-widget-button-keymap ; Emacs
+                 :notify 'tree-widget-example-close
+                 "Close")
+  (use-local-map widget-keymap)
+  (widget-setup))
+
+(provide 'tree-widget-example)
+
+;;; tree-widget-examples.el ends here

File tree-widget-themes/default/close.png

Added
New image

File tree-widget-themes/default/close.xpm

Added
New image

File tree-widget-themes/default/empty.png

Added
New image

File tree-widget-themes/default/empty.xpm

Added
New image

File tree-widget-themes/default/end-guide.png

Added
New image

File tree-widget-themes/default/end-guide.xpm

Added
New image

File tree-widget-themes/default/guide.png

Added
New image

File tree-widget-themes/default/guide.xpm

Added
New image

File tree-widget-themes/default/handle.png

Added
New image

File tree-widget-themes/default/handle.xpm

Added
New image

File tree-widget-themes/default/leaf.png

Added
New image

File tree-widget-themes/default/leaf.xpm

Added
New image

File tree-widget-themes/default/no-guide.png

Added
New image

File tree-widget-themes/default/no-guide.xpm

Added
New image

File tree-widget-themes/default/no-handle.png

Added
New image

File tree-widget-themes/default/no-handle.xpm

Added
New image

File tree-widget-themes/default/open.png

Added
New image

File tree-widget-themes/default/open.xpm

Added
New image

File tree-widget-themes/folder/close.png

Added
New image

File tree-widget-themes/folder/close.xpm

Added
New image

File tree-widget-themes/folder/empty.png

Added
New image

File tree-widget-themes/folder/empty.xpm

Added
New image

File tree-widget-themes/folder/leaf.png

Added
New image

File tree-widget-themes/folder/leaf.xpm

Added
New image

File tree-widget-themes/folder/open.png

Added
New image

File tree-widget-themes/folder/open.xpm

Added
New image

File tree-widget.el

+;;; tree-widget.el --- Tree widget
+
+;; Copyright (C) 2001, 2003 by David Ponce
+
+;; Author: David Ponce <david@dponce.com>
+;; Maintainer: David Ponce <david@dponce.com>
+;; Created: 16 Feb 2001
+;; Keywords: extensions
+;; Revision: $Id: tree-widget.el,v 1.14 2003/10/03 15:30:27 ponced Exp $
+
+(defconst tree-widget-version "2.0")
+
+;; This file is not part of Emacs
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; This library provide a tree widget useful to display data
+;; structures organized in a hierarchical order.
+;;
+;; The following properties are specific to the tree widget:
+;;
+;;   :open
+;;      Set to non-nil to unfold the tree.  By default the tree is
+;;      folded.
+;;
+;;   :node
+;;      Specify the widget used to represent a tree node.  By default
+;;      this is an `item' widget which displays the tree-widget :tag
+;;      property value if defined or a string representation of the
+;;      tree-widget value.
+;;
+;;   :keep
+;;      Specify a list of properties to keep when the tree is
+;;      folded so they can be recovered when the tree is unfolded.
+;;      This property can be used in child widgets too.
+;;
+;;   :dynargs
+;;      Specify a function to be called when the tree is unfolded, to
+;;      dynamically provide the tree children in response to an unfold
+;;      request.  This function will be passed the tree widget and
+;;      must return a list of child widgets.  That list will be stored
+;;      as the :args property of the parent tree.
+
+;;      To speed up successive unfold requests, the :dynargs function
+;;      can directly return the :args value if non-nil.  Refreshing
+;;      child values can be achieved by giving the :args property the
+;;      value nil, then redrawing the tree.
+;;
+;;   :has-children
+;;      Specify if this tree has children.  This property has meaning
+;;      only when used with the above :dynargs one.  It indicates that
+;;      child widgets exist but will be dynamically provided when
+;;      unfolding the node.
+;;
+;;   :open-control  (default `tree-widget-open-control')
+;;   :close-control (default `tree-widget-close-control')
+;;   :empty-control (default `tree-widget-empty-control')
+;;   :leaf-control  (default `tree-widget-leaf-control')
+;;   :guide         (default `tree-widget-guide')
+;;   :end-guide     (default `tree-widget-end-guide')
+;;   :no-guide      (default `tree-widget-no-guide')
+;;   :handle        (default `tree-widget-handle')
+;;   :no-handle     (default `tree-widget-no-handle')
+;;
+;; The above nine properties define the widgets used to draw the tree.
+;; For example, using widgets that display this values:
+;;
+;;   open-control     "[-] "
+;;   close-control    "[+] "
+;;   empty-control    "[X] "
+;;   leaf-control     "[>] "
+;;   guide            " |"
+;;   noguide          "  "
+;;   end-guide        " `"
+;;   handle           "-"
+;;   no-handle        " "
+;;
+;; A tree will look like this:
+;;
+;;   [-] 1            open-control
+;;    |-[+] 1.0       guide+handle+close-control
+;;    |-[X] 1.1       guide+handle+empty-control
+;;    `-[-] 1.2       end-guide+handle+open-control
+;;       |-[>] 1.2.1  no-guide+no-handle+guide+handle+leaf-control
+;;       `-[>] 1.2.2  no-guide+no-handle+end-guide+handle+leaf-control
+;;
+;; On versions of [X]Emacs that support this feature, the tree widget
+;; try to use images instead of strings to draw a nice-looking tree.
+;; See the `tree-widget-themes-directory' and `tree-widget-theme'
+;; options for more details.
+;;
+;; Basic examples of tree-widget usage are provided in the file
+;; tree-widget-examples.el.  A more sophisticated example is in the
+;; dir-tree.el file.
+;;
+;; To install and use the tree widget first download the latest
+;; distribution tarball (tree-widget-VERSION.tar.gz) from
+;; <http://sourceforge.net/projects/emhacks/> and unpack it in a
+;; directory on your `load-path'.  Then add the following into your
+;; ~/.emacs startup file or in libraries that depend on tree-widget:
+;;
+;; (require 'tree-widget)
+;;
+
+;;; History:
+;;
+
+;;; Code:
+(eval-when-compile (require 'cl))
+(require 'wid-edit)
+
+;;; Customization
+;;
+(defgroup tree-widget nil
+  "Customization support for the Tree Widget Library."
+  :group 'widgets)
+
+(defcustom tree-widget-image-enable
+  (not (or (featurep 'xemacs) (< emacs-major-version 21)))
+  "*non-nil means that tree-widget will try to use images."
+  :type  'boolean
+  :group 'tree-widget)
+
+(defcustom tree-widget-themes-directory nil
+  "*Directory where to lookup for image themes.
+If nil, use the \"tree-widget-themes\" subdirectory of the directory
+where the tree-widget library is located."
+  :type '(choice (const :tag "Default" nil)
+                 (directory :format "%{%t%}:\n%v")
+                 )
+  :group 'tree-widget)
+
+(defcustom tree-widget-theme nil
+  "*Name of the theme to use to lookup for images.
+The theme name must be a subdirectory in `tree-widget-themes-directory'.
+If nil use the \"default\" theme.
+When a image is not found in the current theme, the \"default\" theme
+is searched too.
+A complete theme should contain images with these file names:
+
+Name         Represents
+-----------  ------------------------------------------------
+open         opened node (for example an open folder)
+close        closed node (for example a close folder)
+empty        empty node (a node without children)
+leaf         leaf node (for example a document)
+guide        a vertical guide line
+no-guide     an invisible guide line
+end-guide    the end of a vertical guide line
+handle       an horizontal line drawn before a node control
+no-handle    an invisible handle
+-----------  ------------------------------------------------"
+  :type '(choice (const  :tag "Default" nil)
+                 (string :tag "Name"))
+  :group 'tree-widget)
+
+(defcustom tree-widget-image-properties-emacs
+  '(:ascent center :mask (heuristic t))
+  "*Properties of GNU Emacs images."
+  :type 'plist
+  :group 'tree-widget)
+
+(defcustom tree-widget-image-properties-xemacs
+  nil
+  "*Properties of XEmacs images."
+  :type 'plist
+  :group 'tree-widget)
+
+;;; Image support
+;;
+(eval-when-compile ;; GNU Emacs/XEmacs compatibility stuff
+  (cond
+   ;; XEmacs
+   ((featurep 'xemacs)
+    (defsubst tree-widget-use-image-p ()
+      "Return non-nil if image support is currently enabled."
+      (and tree-widget-image-enable
+           widget-glyph-enable
+           (console-on-window-system-p)))
+    (defsubst tree-widget-image-type-available-p (type)
+      "Return non-nil if image type TYPE is available.
+Image types are symbols like `xbm' or `jpeg'."
+      (valid-image-instantiator-format-p type))
+    (defsubst tree-widget-create-image (type file)
+      "Create an image of type TYPE from FILE.
+Give the image the specified `tree-widget-image-properties-xemacs'
+properties.  Return the new image."
+      (apply 'make-glyph
+             `([,type :file ,file
+                      ,@tree-widget-image-properties-xemacs])))
+    (defsubst tree-widget-image-formats ()
+      "Return the list of image formats, file name suffixes associations.
+See also the option `widget-image-file-name-suffixes'."
+      widget-image-file-name-suffixes)
+    )
+   ;; GNU Emacs
+   (t
+    (defsubst tree-widget-use-image-p ()
+      "Return non-nil if image support is currently enabled."
+      (and tree-widget-image-enable
+           widget-image-enable
+           (display-images-p)))
+    (defsubst tree-widget-image-type-available-p (type)
+      "Return non-nil if image type TYPE is available.
+Image types are symbols like `xbm' or `jpeg'."
+      (image-type-available-p type))
+    (defsubst tree-widget-create-image (type file)
+      "Create an image of type TYPE from FILE.
+Give the image the specified `tree-widget-image-properties-emacs'
+properties.  Return the new image."
+      (apply 'create-image
+             `(,file ,type nil
+                     ,@tree-widget-image-properties-emacs)))
+    (defsubst tree-widget-image-formats ()
+      "Return the list of image formats, file name suffixes associations.
+See also the option `widget-image-conversion'."
+      widget-image-conversion)
+    ))
+  )
+
+(defvar tree-widget--image-cache nil)
+(make-variable-buffer-local 'tree-widget--image-cache)
+(defvar tree-widget--theme nil)
+(make-variable-buffer-local 'tree-widget--theme)
+
+(defsubst tree-widget-set-theme (&optional name)
+  "Define the current image theme to use.
+The theme is defined locally to the current buffer, where the tree
+widget is drawn.  Also clear the image cache.
+If optional argument NAME is non-nil, it is the name of the theme to
+use.  By default it is the global theme defined by the option
+`tree-widget-theme'."
+  (setq tree-widget--image-cache nil
+        tree-widget--theme (or name tree-widget-theme "default")))
+
+(defsubst tree-widget-themes-directory ()
+  "Return the directory where to search for image themes.
+Return nil if not found."
+  (let ((dir (if tree-widget-themes-directory
+                 (expand-file-name tree-widget-themes-directory)
+               (expand-file-name "../tree-widget-themes"
+                                 (locate-library "tree-widget")))))
+    (and (file-directory-p dir) dir)))
+
+(defun tree-widget-find-image (image-name)
+  "Create the image with IMAGE-NAME found in current theme.
+IMAGE-NAME must be a file name sans extension located in the current
+theme directory (see the options `tree-widget-themes-directory' and
+`tree-widget-theme').  Use the first image found having a supported
+format in those returned by the function `tree-widget-image-formats'.
+Return the image found or nil if not found."
+  (cond
+   ;; No image support
+   ((not (tree-widget-use-image-p))
+    nil)
+   ;; Image with IMAGE-NAME found in cache
+   ((cdr (assoc image-name tree-widget--image-cache))
+    )
+   ;; Search for an image with IMAGE-NAME
+   (t
+    (let ((dir (tree-widget-themes-directory)))
+      (when dir
+        ;; Don't use `tree-widget-set-theme' here, because it clears
+        ;; the image cache.
+        (setq tree-widget--theme
+              (or tree-widget--theme tree-widget-theme "default"))
+        (let* ((default-directory dir)
+               (path (mapcar 'expand-file-name
+                             (list tree-widget--theme "default")))
+               (fmts (tree-widget-image-formats))
+               fmt file image)
+          (while (and fmts (not file))
+            (setq fmt  (car fmts)
+                  fmts (cdr fmts))
+            (when (tree-widget-image-type-available-p (car fmt))
+              (setq file (locate-library
+                          (concat image-name (nth 1 fmt)) t path))))
+          (when file
+            (setq image (tree-widget-create-image (car fmt) file))
+            ;; Add the image into the cache.
+            (push (cons image-name image) tree-widget--image-cache)
+            image))))
+    )))
+
+;;; Widgets
+;;
+(defvar tree-widget-button-keymap
+  (let (parent-keymap mouse-button1 keymap)
+    (if (featurep 'xemacs)
+        (setq parent-keymap widget-button-keymap
+              mouse-button1 [button1])
+      (setq parent-keymap widget-keymap
+            mouse-button1 [down-mouse-1]))
+    (setq keymap (copy-keymap parent-keymap))
+    (define-key keymap mouse-button1 'widget-button-click)
+    keymap)
+  "Keymap used inside node handle buttons.")
+
+(define-widget 'tree-widget-control 'push-button
+  "Base `tree-widget' control."
+  :format        "%[%t%]"
+  :button-keymap tree-widget-button-keymap ; XEmacs
+  :keymap        tree-widget-button-keymap ; Emacs
+  )
+
+(define-widget 'tree-widget-open-control 'tree-widget-control
+  "Control widget that represents a opened `tree-widget' node."
+  :tag       "[-] "
+  ;;:tag-glyph (tree-widget-find-image "open")
+  :notify    'tree-widget-close-node
+  :help-echo "Hide node"
+  )
+
+(define-widget 'tree-widget-empty-control 'tree-widget-open-control
+  "Control widget that represents an empty opened `tree-widget' node."
+  :tag       "[X] "
+  ;;:tag-glyph (tree-widget-find-image "empty")
+  )
+
+(define-widget 'tree-widget-close-control 'tree-widget-control
+  "Control widget that represents a closed `tree-widget' node."
+  :tag       "[+] "
+  ;;:tag-glyph (tree-widget-find-image "close")
+  :notify    'tree-widget-open-node
+  :help-echo "Show node"
+  )
+
+(define-widget 'tree-widget-leaf-control 'item
+  "Control widget that represents a leaf node."
+  :tag       " " ;; Need at least a char to display the image :-(
+  ;;:tag-glyph (tree-widget-find-image "leaf")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget-guide 'item
+  "Widget that represents a guide line."
+  :tag       " |"
+  ;;:tag-glyph (tree-widget-find-image "guide")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget-end-guide 'item
+  "Widget that represents the end of a guide line."
+  :tag       " `"
+  ;;:tag-glyph (tree-widget-find-image "end-guide")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget-no-guide 'item
+  "Widget that represents an invisible guide line."
+  :tag       "  "
+  ;;:tag-glyph (tree-widget-find-image "no-guide")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget-handle 'item
+  "Widget that represent a node handle."
+  :tag       " "
+  ;;:tag-glyph (tree-widget-find-image "handle")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget-no-handle 'item
+  "Widget that represent an invisible node handle."
+  :tag       " "
+  ;;:tag-glyph (tree-widget-find-image "no-handle")
+  :format    "%t"
+  )
+
+(define-widget 'tree-widget 'default
+  "Tree widget."
+  :format         "%v"
+  :convert-widget 'widget-types-convert-widget
+  :value-get      'widget-value-value-get
+  :value-create   'tree-widget-value-create
+  :value-delete   'tree-widget-value-delete
+  )
+
+;;; Widget support functions
+;;
+(defun tree-widget-p (widget)
+  "Return non-nil if WIDGET is a `tree-widget' widget."
+  (let ((type (widget-type widget)))
+    (while (and type (not (eq type 'tree-widget)))
+      (setq type (widget-type (get type 'widget-type))))
+    (eq type 'tree-widget)))
+
+(defsubst tree-widget-get-super (widget property)
+  "Return WIDGET's inherited PROPERTY value."
+  (widget-get (get (widget-type (get (widget-type widget)
+                                     'widget-type))
+                   'widget-type)
+              property))
+
+(defsubst tree-widget-super-format-handler (widget escape)
+  "Call WIDGET's inherited format handler to process ESCAPE character."
+  (let ((handler (tree-widget-get-super widget :format-handler)))
+    (and handler (funcall handler widget escape))))
+
+(defun tree-widget-format-handler (widget escape)
+  "For WIDGET, signal that the %p format template is obsolete.
+Call WIDGET's inherited format handler to process other ESCAPE
+characters."
+  (if (eq escape ?p)
+      (message "The %p format template is obsolete and ignored")
+    (tree-widget-super-format-handler widget escape)))
+(make-obsolete 'tree-widget-format-handler
+               'tree-widget-super-format-handler)
+
+(defsubst tree-widget-node (widget)
+  "Return the tree WIDGET :node value.
+If not found setup a default 'item' widget."
+  (let ((node (widget-get widget :node)))
+    (unless node
+      (setq node `(item :tag ,(or (widget-get widget :tag)
+                                  (widget-princ-to-string
+                                   (widget-value widget)))))
+      (widget-put widget :node node))
+    node))
+
+(defsubst tree-widget-open-control (widget)
+  "Return the opened node control specified in WIDGET."
+  (or (widget-get widget :open-control)
+      'tree-widget-open-control))
+
+(defsubst tree-widget-close-control (widget)
+  "Return the closed node control specified in WIDGET."
+  (or (widget-get widget :close-control)
+      'tree-widget-close-control))
+
+(defsubst tree-widget-empty-control (widget)
+  "Return the empty node control specified in WIDGET."
+  (or (widget-get widget :empty-control)
+      'tree-widget-empty-control))
+
+(defsubst tree-widget-leaf-control (widget)
+  "Return the leaf node control specified in WIDGET."
+  (or (widget-get widget :leaf-control)
+      'tree-widget-leaf-control))
+
+(defsubst tree-widget-guide (widget)
+  "Return the guide line widget specified in WIDGET."
+  (or (widget-get widget :guide)
+      'tree-widget-guide))
+
+(defsubst tree-widget-end-guide (widget)
+  "Return the end of guide line widget specified in WIDGET."
+  (or (widget-get widget :end-guide)