Merge branch 'master' of git.ganneff.de:emacs
authorJoerg Jaspert <joerg@debian.org>
Mon, 8 Apr 2013 18:43:32 +0000 (20:43 +0200)
committerJoerg Jaspert <joerg@debian.org>
Mon, 8 Apr 2013 18:43:32 +0000 (20:43 +0200)
* 'master' of git.ganneff.de:emacs:
  add sunrise-mode. add hilight-current-line mode. allow meta-shift-up/down to move liens

156 files changed:
.emacs.d/config/emacs.org
elisp/emacs-color-theme-solarized/color-theme-solarized-autoloads.el [new file with mode: 0644]
elisp/emacs-color-theme-solarized/color-theme-solarized-pkg.el
elisp/emacs-color-theme-solarized/solarized-definitions.el
elisp/icicle/hexrgb.el
elisp/icicle/icicles-chg.el
elisp/icicle/icicles-cmd1.el
elisp/icicle/icicles-cmd2.el
elisp/icicle/icicles-doc1.el
elisp/icicle/icicles-doc2.el
elisp/icicle/icicles-face.el
elisp/icicle/icicles-fn.el
elisp/icicle/icicles-mac.el
elisp/icicle/icicles-mcmd.el
elisp/icicle/icicles-mode.el
elisp/icicle/icicles-opt.el
elisp/icicle/icicles-var.el
elisp/icicle/icicles.el
elisp/local/loaddefs.el
elisp/org/ob-C.el
elisp/org/ob-R.el
elisp/org/ob-awk.el
elisp/org/ob-calc.el
elisp/org/ob-clojure.el
elisp/org/ob-comint.el
elisp/org/ob-ditaa.el
elisp/org/ob-dot.el
elisp/org/ob-emacs-lisp.el
elisp/org/ob-exp.el
elisp/org/ob-fortran.el
elisp/org/ob-gnuplot.el
elisp/org/ob-haskell.el
elisp/org/ob-io.el
elisp/org/ob-java.el
elisp/org/ob-js.el
elisp/org/ob-keys.el
elisp/org/ob-latex.el
elisp/org/ob-lilypond.el
elisp/org/ob-lisp.el
elisp/org/ob-lob.el
elisp/org/ob-maxima.el
elisp/org/ob-mscgen.el
elisp/org/ob-ocaml.el
elisp/org/ob-octave.el
elisp/org/ob-org.el
elisp/org/ob-perl.el
elisp/org/ob-picolisp.el
elisp/org/ob-plantuml.el
elisp/org/ob-python.el
elisp/org/ob-ref.el
elisp/org/ob-ruby.el
elisp/org/ob-sass.el
elisp/org/ob-scala.el
elisp/org/ob-scheme.el
elisp/org/ob-screen.el
elisp/org/ob-sh.el
elisp/org/ob-shen.el
elisp/org/ob-sql.el
elisp/org/ob-sqlite.el
elisp/org/ob-table.el
elisp/org/ob-tangle.el
elisp/org/ob.el
elisp/org/org-agenda.el
elisp/org/org-annotate-file.el
elisp/org/org-archive.el
elisp/org/org-ascii.el
elisp/org/org-attach.el
elisp/org/org-beamer.el
elisp/org/org-bibtex-extras.el
elisp/org/org-bibtex.el
elisp/org/org-bookmark.el
elisp/org/org-capture.el
elisp/org/org-checklist.el
elisp/org/org-choose.el
elisp/org/org-clock.el
elisp/org/org-collector.el
elisp/org/org-colview-xemacs.el
elisp/org/org-colview.el
elisp/org/org-compat.el
elisp/org/org-contacts.el
elisp/org/org-contribdir.el
elisp/org/org-datetree.el
elisp/org/org-depend.el
elisp/org/org-docbook.el
elisp/org/org-docview.el
elisp/org/org-e-ascii.el
elisp/org/org-e-beamer.el
elisp/org/org-e-groff.el
elisp/org/org-e-html.el
elisp/org/org-e-latex.el
elisp/org/org-e-man.el
elisp/org/org-e-odt.el
elisp/org/org-e-publish.el
elisp/org/org-e-texinfo.el
elisp/org/org-element.el
elisp/org/org-elisp-symbol.el
elisp/org/org-entities.el
elisp/org/org-eval-light.el
elisp/org/org-eval.el
elisp/org/org-exp-bibtex.el
elisp/org/org-exp-blocks.el
elisp/org/org-exp.el
elisp/org/org-expiry.el
elisp/org/org-export-generic.el
elisp/org/org-export.el
elisp/org/org-faces.el
elisp/org/org-footnote.el
elisp/org/org-freemind.el
elisp/org/org-git-link.el
elisp/org/org-gnus.el
elisp/org/org-html.el
elisp/org/org-icalendar.el
elisp/org/org-id.el
elisp/org/org-indent.el
elisp/org/org-inlinetask.el
elisp/org/org-interactive-query.el
elisp/org/org-invoice.el
elisp/org/org-jira.el
elisp/org/org-jsinfo.el
elisp/org/org-latex.el
elisp/org/org-learn.el
elisp/org/org-list.el
elisp/org/org-loaddefs.el
elisp/org/org-lparse.el
elisp/org/org-mac-iCal.el
elisp/org/org-mac-link-grabber.el
elisp/org/org-macs.el
elisp/org/org-mairix.el
elisp/org/org-md.el
elisp/org/org-mime.el
elisp/org/org-mobile.el
elisp/org/org-mtags.el
elisp/org/org-notify.el
elisp/org/org-notmuch.el
elisp/org/org-odt.el
elisp/org/org-pcomplete.el
elisp/org/org-plot.el
elisp/org/org-protocol.el
elisp/org/org-publish.el
elisp/org/org-registry.el
elisp/org/org-remember.el
elisp/org/org-screen.el
elisp/org/org-secretary.el
elisp/org/org-special-blocks.el
elisp/org/org-src.el
elisp/org/org-sudoku.el
elisp/org/org-table.el
elisp/org/org-taskjuggler.el
elisp/org/org-toc.el
elisp/org/org-track.el
elisp/org/org-velocity.el
elisp/org/org-version.el
elisp/org/org-w3m.el
elisp/org/org-wikinodes.el
elisp/org/org-xoxo.el
elisp/org/org.el

index 6d7c446..2ce3938 100644 (file)
@@ -338,9 +338,9 @@ naquadah-theme.git]]
 
 Try out solarized.
 #+BEGIN_SRC emacs-lisp
-(add-to-list 'custom-theme-load-path "~/elisp/emacs-color-theme-solarized")
-(setq solarized-termcolors 16)
-(load-theme 'solarized-dark t)
+  (add-to-list 'custom-theme-load-path "~/elisp/emacs-color-theme-solarized")
+  (setq solarized-termcolors 16)
+  (load-theme 'solarized-dark t)
 #+END_SRC
 
 *** Hilight current line in buffer
@@ -748,11 +748,11 @@ We want some extra key bindings loaded. In case we haven't loaded dired
 yet, there won't be a keymap to add to, so add our setup function to the
 load hook only. Otherwise just bind the keys.
 #+BEGIN_SRC emacs-lisp
-(if (boundp 'dired-mode-map)
-    ;; we're good to go; just add our bindings
-    (my-dired-init)
-  ;; it's not loaded yet, so add our bindings to the load-hook
-  (add-hook 'dired-load-hook 'my-dired-init))
+  (if (boundp 'dired-mode-map)
+      ;; we're good to go; just add our bindings
+      (my-dired-init)
+    ;; it's not loaded yet, so add our bindings to the load-hook
+    (add-hook 'dired-load-hook 'my-dired-init))
 #+END_SRC
 
 A few settings
@@ -1640,8 +1640,8 @@ much more like reading and editing of code using its major mode.
                     ("" "soul" t)
                     ("xetex" "hyperref" nil)
                     )))
-
-        (if (string-match "LATEX_CMD: xelatex" (buffer-string))
+  
+        (if (string-match "#+LATEX_CMD: xelatex" (buffer-string))
             (setq org-export-latex-classes
                   (cons '("scrartcl"
                           "\\documentclass[11pt,DIV=13,oneside]{scrartcl}"
@@ -1790,6 +1790,16 @@ what I want every emacs to know.
   (global-set-key (kbd "M-/") 'hippie-expand)
 #+END_SRC
 
+** elpa
+The Emacs Lisp Package Archive (may) contain(s) some things I want
+#+BEGIN_SRC emacs-lisp
+  (when (> emacs-major-version 23)
+    (require 'package)
+    (package-initialize)
+    (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
+    (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/"))
+    )
+#+END_SRC
 * Customized variables
 :PROPERTIES:
 :ID: 0102208d-fdf6-4928-9e40-7e341bd3aa3a
diff --git a/elisp/emacs-color-theme-solarized/color-theme-solarized-autoloads.el b/elisp/emacs-color-theme-solarized/color-theme-solarized-autoloads.el
new file mode 100644 (file)
index 0000000..b54ea1e
--- /dev/null
@@ -0,0 +1,49 @@
+;;; color-theme-solarized-autoloads.el --- automatically extracted autoloads
+;;
+;;; Code:
+
+\f
+;;;### (autoloads (color-theme-solarized-light color-theme-solarized-dark
+;;;;;;  color-theme-solarized) "color-theme-solarized" "color-theme-solarized.el"
+;;;;;;  (20818 6659 297107 925000))
+;;; Generated autoloads from color-theme-solarized.el
+
+(autoload 'color-theme-solarized "color-theme-solarized" "\
+Color theme by Ethan Schoonover, created 2011-03-24.
+Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized.
+
+\(fn MODE)" t nil)
+
+(autoload 'color-theme-solarized-dark "color-theme-solarized" "\
+
+
+\(fn)" t nil)
+
+(autoload 'color-theme-solarized-light "color-theme-solarized" "\
+
+
+\(fn)" t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "solarized-definitions" "solarized-definitions.el"
+;;;;;;  (20818 6659 381108 341000))
+;;; Generated autoloads from solarized-definitions.el
+
+(when (boundp 'custom-theme-load-path) (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name))))
+
+;;;***
+\f
+;;;### (autoloads nil nil ("color-theme-solarized-pkg.el" "solarized-dark-theme.el"
+;;;;;;  "solarized-light-theme.el") (20818 6659 467471 558000))
+
+;;;***
+\f
+(provide 'color-theme-solarized-autoloads)
+;; Local Variables:
+;; version-control: never
+;; no-byte-compile: t
+;; no-update-autoloads: t
+;; coding: utf-8
+;; End:
+;;; color-theme-solarized-autoloads.el ends here
index 850550e..f9d0934 100644 (file)
@@ -1 +1,3 @@
-(define-package "color-theme-solarized" "%%version%%" "Solarized themes for Emacs" '((color-theme "6.5.5")))
+(define-package "color-theme-solarized" "20130307.1350" "Solarized themes for Emacs [source: github]"
+  '((color-theme "6.5.5")))
+
index d6b1a5c..2f588ed 100644 (file)
@@ -353,6 +353,9 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
              (widget-single-line-field ((t (:inherit widget-field))))
              ;; extra modules
              ;; -------------
+            ;; bm visual bookmarks
+            (bm-fringe-face ((t (,@bg-orange ,@fg-base03))))
+            (bm-fringe-persistent-face ((t (,@bg-blue ,@fg-base03))))
              ;; Flymake
              (flymake-errline ((t (,@fmt-revr ,@fg-red ,@bg-back)))) ; ErrorMsg
              (flymake-warnline ; WarningMsg
@@ -378,6 +381,10 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
              (jabber-roster-user-offline ((t (,@fg-base01))))
              (jabber-roster-user-online ((t (,@fmt-bold ,@fg-blue))))
              (jabber-roster-user-xa ((t (,@fmt-ital ,@fg-magenta))))
+            ;; git-gutter
+            (git-gutter:modified ((t (,@fg-violet))))
+            (git-gutter:added ((t (,@fg-green))))
+            (git-gutter:deleted ((t (,@fg-red))))
              ;; gnus - these are taken from mutt, not VIM
              (gnus-cite-1 ((t (,@fmt-none ,@fg-blue)))) ; quoted
              (gnus-cite-2 ((t (,@fmt-none ,@fg-cyan)))) ; quoted1
@@ -514,13 +521,23 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further."
              (font-latex-sectioning-5-face ((t (,@fg-violet))))
              ;;flyspell
              (flyspell-incorrect ((t (,@fg-red))))
-             (flyspell-duplicate ((t (,@fg-yellow)))))
+             (flyspell-duplicate ((t (,@fg-yellow))))
+            ;;ansi-term
+            (term-color-black ((t ( ,@fg-base02))))
+            (term-color-red ((t ( ,@fg-red))))
+            (term-color-green ((t ( ,@fg-green))))
+            (term-color-yellow ((t ( ,@fg-yellow))))
+            (term-color-blue ((t ( ,@fg-blue))))
+            (term-color-magenta ((t ( ,@fg-magenta))))
+            (term-color-cyan ((t ( ,@fg-cyan))))
+            (term-color-white ((t ( ,@fg-base00)))))
 
             ((foreground-color . ,(when (<= 16 (display-color-cells)) base0))
              (background-color . ,back)
              (background-mode . ,mode)
              (cursor-color . ,(when (<= 16 (display-color-cells))
-                                base0)))))))))
+                                base0))
+            (ansi-color-names-vector . [,base02 ,red ,green ,yellow ,blue ,magenta ,cyan ,base00]))))))))
 
 (defmacro create-solarized-theme (mode)
   (let* ((theme-name (intern (concat "solarized-" (symbol-name mode))))
index e0c1983..3d40c64 100644 (file)
@@ -4,15 +4,17 @@
 ;; Description: Functions to manipulate colors, including RGB hex strings.
 ;; Author: Drew Adams
 ;; Maintainer: Drew Adams
-;; Copyright (C) 2004-2012, Drew Adams, all rights reserved.
+;; Copyright (C) 2004-2013, Drew Adams, all rights reserved.
 ;; Created: Mon Sep 20 22:58:45 2004
 ;; Version: 21.0
-;; Last-Updated: Sat Mar 17 19:00:37 2012 (-0700)
+;; Last-Updated: Fri Jan 18 09:01:51 2013 (-0800)
 ;;           By: dradams
-;;     Update #: 897
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el
+;;     Update #: 953
+;; URL: http://www.emacswiki.org/hexrgb.el
+;; Doc URL: http://www.emacswiki.org/SetColor
+;; Doc URL: http://emacswiki.org/ColorPalette
 ;; Keywords: number, hex, rgb, color, background, frames, display
-;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x
 ;;
 ;; Features that might be required by this library:
 ;;
 ;;    `hexrgb-hex-to-int', `hexrgb-hsv-to-rgb',
 ;;    `hexrgb-increment-blue', `hexrgb-increment-equal-rgb',
 ;;    `hexrgb-increment-green', `hexrgb-increment-hex',
-;;    `hexrgb-increment-red', `hexrgb-int-to-hex', `hexrgb-blue-hex',
-;;    `hexrgb-green-hex', `hexrgb-red-hex', `hexrgb-rgb-hex-string-p',
+;;    `hexrgb-increment-hue', `hexrgb-increment-red',
+;;    `hexrgb-increment-saturation', `hexrgb-increment-value',
+;;    `hexrgb-int-to-hex', `hexrgb-blue-hex', `hexrgb-green-hex',
+;;    `hexrgb-red-hex', `hexrgb-rgb-hex-string-p',
 ;;    `hexrgb-rgb-hex-to-rgb-hex', `hexrgb-rgb-to-hex',
 ;;    `hexrgb-rgb-to-hsv'.
 ;;
 ;;
 ;;; Change Log:
 ;;
+;;
+;; 2013/01/18 dadams
+;;     Added: hexrgb-increment-(hue|saturation|value): Moved them here and renamed from
+;;       icicle-increment-color-*.  Changed range to 0-1 and added optional arg NB-DIGITS.
+;; 2012/12/16 dadams
+;;     hexrgb-(hsv|rgb|color-name|color-values)-to-hex: Added optional arg NB-DIGITS.
 ;; 2012/03/17 dadams
 ;;     Added: hexrgb-(red|green|blue-hex, hexrgb-rgb-hex-to-rgb-hex, hexrgb-hex-to-hex.
 ;; 2012/01/05 dadams
@@ -527,19 +537,31 @@ Returns a list of RGB components of value 0.0 to 1.0, inclusive."
                          blue   qq))))
     (list red green blue)))
 
-(defun hexrgb-hsv-to-hex (hue saturation value)
+(defun hexrgb-hsv-to-hex (hue saturation value &optional nb-digits)
   "Return the hex RBG color string for inputs HUE, SATURATION, VALUE.
-The inputs are each in the range 0 to 1.
-The output string is of the form \"#RRRRGGGGBBBB\"."
+These inputs are each in the range 0 to 1.
+Optional arg NB-DIGITS is the number of hex digits per component,
+default: 4.
+The output string is `#' followed by `nb-digits' hex digits for each
+color component.  So for the default `nb-digits' value of 4, the form
+is \"#RRRRGGGGBBBB\"."
+  (setq nb-digits  (or nb-digits  4))
   (hexrgb-color-values-to-hex
-   (mapcar (lambda (x) (floor (* x 65535.0))) (hexrgb-hsv-to-rgb hue saturation value))))
+   (mapcar (lambda (x) (floor (* x 65535.0))) (hexrgb-hsv-to-rgb hue saturation value))
+   nb-digits))
 
-(defun hexrgb-rgb-to-hex (red green blue)
+(defun hexrgb-rgb-to-hex (red green blue &optional nb-digits)
   "Return the hex RBG color string for inputs RED, GREEN, BLUE.
-The inputs are each in the range 0 to 1.
-The output string is of the form \"#RRRRGGGGBBBB\"."
+These inputs are each in the range 0 to 1.
+Optional arg NB-DIGITS is the number of hex digits per component,
+default: 4.
+The output string is `#' followed by `nb-digits' hex digits for each
+color component.  So for the default `nb-digits' value of 4, the form
+is \"#RRRRGGGGBBBB\"."
+  (setq nb-digits  (or nb-digits  4))
   (hexrgb-color-values-to-hex
-   (mapcar (lambda (x) (floor (* x 65535.0))) (list red green blue))))
+   (mapcar (lambda (x) (floor (* x 65535.0))) (list red green blue))
+   nb-digits))
 
 (defun hexrgb-hex-to-hsv (color)
   "Return a list of HSV (hue, saturation, value) color components.
@@ -562,27 +584,42 @@ components."
           (/ (hexrgb-hex-to-int (substring color (1+ len) (+ 1 len len))) 65535.0)
           (/ (hexrgb-hex-to-int (substring color (+ 1 len len))) 65535.0))))
 
-(defun hexrgb-color-name-to-hex (color)
-  "Return the RGB hex string for the COLOR name, starting with \"#\".
-If COLOR is already a string starting with \"#\", then just return it."
+(defun hexrgb-color-name-to-hex (color &optional nb-digits)
+  "Return the RGB hex string, starting with \"#\", for the COLOR name.
+If COLOR is already a string starting with \"#\", then just return it.
+Optional arg NB-DIGITS is the number of hex digits per component,
+default: 4.
+\(This function relies on `x-color-values', which generally returns
+integers corresponding to 4 hex digits, so you probably do not want to
+pass an NB-DIGITS value greater than 4.)
+The output string is `#' followed by `nb-digits' hex digits for each
+color component.  So for the default `nb-digits' value of 4, the form
+is \"#RRRRGGGGBBBB\"."
+  (setq nb-digits  (or nb-digits  4))
   (let ((components  (x-color-values color)))
     (unless components (error "No such color: %S" color))
     (unless (hexrgb-rgb-hex-string-p color)
-      (setq color  (hexrgb-color-values-to-hex components))))
+      (setq color  (hexrgb-color-values-to-hex components nb-digits))))
   color)
 
 ;; Color "components" would be better in the name than color "value"
 ;; but this name follows the Emacs tradition (e.g. `x-color-values',
 ;; 'ps-color-values', `ps-e-x-color-values').
-(defun hexrgb-color-values-to-hex (components)
-  "Convert list of rgb color COMPONENTS to a hex string, #XXXXXXXXXXXX.
+(defun hexrgb-color-values-to-hex (components &optional nb-digits)
+  "Convert list of rgb color COMPONENTS to a hex RBG color string.
 Each X in the string is a hexadecimal digit.
-Input COMPONENTS is as for the output of `x-color-values'."
-;; Just hard-code 4 as the number of hex digits, since `x-color-values'
-;; seems to produce appropriate integer values for `4'.
-  (concat "#" (hexrgb-int-to-hex (nth 0 components) 4) ; red
-          (hexrgb-int-to-hex (nth 1 components) 4) ; green
-          (hexrgb-int-to-hex (nth 2 components) 4))) ; blue
+Input COMPONENTS is as for the output of `x-color-values'.
+Optional arg NB-DIGITS is the number of hex digits per component,
+default: 4.
+The output string is `#' followed by `nb-digits' hex digits for each
+color component.  So for the default `nb-digits' value of 4, the form
+is \"#RRRRGGGGBBBB\"."
+  ;; 4 is the default because `x-color-values' produces appropriate integer values for 4.
+  (setq nb-digits  (or nb-digits  4))
+  (concat "#"
+          (hexrgb-int-to-hex (nth 0 components) nb-digits) ; red
+          (hexrgb-int-to-hex (nth 1 components) nb-digits) ; green
+          (hexrgb-int-to-hex (nth 2 components) nb-digits))) ; blue
 
 (defun hexrgb-hex-to-color-values (color)
   "Convert hex COLOR to a list of RGB color components.
@@ -604,6 +641,67 @@ The output list is as for `x-color-values'."
           blue   (hexrgb-hex-to-int (substring color (* 2 ndigits) (* 3 ndigits))))
     (list red green blue)))
     
+;; Like `doremi-increment-color-component', but for hue only, and with 0-1 range and NB-DIGITS.
+(defun hexrgb-increment-hue (color increment &optional nb-digits)
+  "Increase hue component of COLOR by INCREMENT.
+INCREMENT ranges from -100 to 100."
+  (unless (string-match "#" color)      ; Convert color name to #hhh...
+    (setq color  (hexrgb-color-values-to-hex (x-color-values color))))
+  ;; Convert RGB to HSV
+  (let* ((rgb         (x-color-values color))
+         (red         (/ (float (nth 0 rgb)) 65535.0)) ; Convert from 0-65535 to 0.0-1.0
+         (green       (/ (float (nth 1 rgb)) 65535.0))
+         (blue        (/ (float (nth 2 rgb)) 65535.0))
+         (hsv         (hexrgb-rgb-to-hsv red green blue))
+         (hue         (nth 0 hsv))
+         (saturation  (nth 1 hsv))
+         (value       (nth 2 hsv)))
+    (setq hue  (+ hue increment))
+    (when (> hue 1.0) (setq hue  (1- hue)))
+    (hexrgb-color-values-to-hex (mapcar (lambda (x) (floor (* x 65535.0)))
+                                        (hexrgb-hsv-to-rgb hue saturation value))
+                                nb-digits)))
+
+;; Like `doremi-increment-color-component', but for saturation only, 0-1 range, and NB-DIGITS.
+(defun hexrgb-increment-saturation (color increment &optional nb-digits)
+  "Increase saturation component of COLOR by INCREMENT."
+  (unless (string-match "#" color)      ; Convert color name to #hhh...
+    (setq color  (hexrgb-color-values-to-hex (x-color-values color))))
+  ;; Convert RGB to HSV
+  (let* ((rgb         (x-color-values color))
+         (red         (/ (float (nth 0 rgb)) 65535.0)) ; Convert from 0-65535 to 0.0-1.0
+         (green       (/ (float (nth 1 rgb)) 65535.0))
+         (blue        (/ (float (nth 2 rgb)) 65535.0))
+         (hsv         (hexrgb-rgb-to-hsv red green blue))
+         (hue         (nth 0 hsv))
+         (saturation  (nth 1 hsv))
+         (value       (nth 2 hsv)))
+    (setq saturation  (+ saturation increment))
+    (when (> saturation 1.0) (setq saturation  (1- saturation)))
+    (hexrgb-color-values-to-hex (mapcar (lambda (x) (floor (* x 65535.0)))
+                                        (hexrgb-hsv-to-rgb hue saturation value))
+                                nb-digits)))
+
+;; Like `doremi-increment-color-component', but for value only, 0-1 range, and NB-DIGITS.
+(defun hexrgb-increment-value (color increment &optional nb-digits)
+  "Increase value component (brightness) of COLOR by INCREMENT."
+  (unless (string-match "#" color)      ; Convert color name to #hhh...
+    (setq color  (hexrgb-color-values-to-hex (x-color-values color))))
+  ;; Convert RGB to HSV
+  (let* ((rgb         (x-color-values color))
+         (red         (/ (float (nth 0 rgb)) 65535.0)) ; Convert from 0-65535 to 0.0-1.0
+         (green       (/ (float (nth 1 rgb)) 65535.0))
+         (blue        (/ (float (nth 2 rgb)) 65535.0))
+         (hsv         (hexrgb-rgb-to-hsv red green blue))
+         (hue         (nth 0 hsv))
+         (saturation  (nth 1 hsv))
+         (value       (nth 2 hsv)))
+    (setq value  (+ value increment))
+    (when (> value 1.0) (setq value  (1- value)))
+    (hexrgb-color-values-to-hex (mapcar (lambda (x) (floor (* x 65535.0)))
+                                        (hexrgb-hsv-to-rgb hue saturation value))
+                                nb-digits)))
+
 (defun hexrgb-increment-red (hex nb-digits increment &optional wrap-p)
   "Increment red component of rgb string HEX by INCREMENT.
 String HEX starts with \"#\".  Each color is NB-DIGITS hex digits long.
@@ -698,12 +796,11 @@ The characters of HEX must be hex characters."
 ;; This version is thanks to Juri Linkov <juri@jurta.org>.
 ;;
 (defun hexrgb-int-to-hex (int &optional nb-digits)
-  "Convert integer argument INT to a #XXXXXXXXXXXX format hex string.
-Each X in the output string is a hexadecimal digit.
-NB-DIGITS is the number of hex digits.  If INT is too large to be
-represented with NB-DIGITS, then the result is truncated from the
-left.  So, for example, INT=256 and NB-DIGITS=2 returns \"00\", since
-the hex equivalent of 256 decimal is 100, which is more than 2 digits."
+  "Convert integer arg INT to a string of NB-DIGITS hexadecimal digits.
+If INT is too large to be represented with NB-DIGITS, then the result
+is truncated from the left.  So, for example, INT=256 and NB-DIGITS=2
+returns \"00\", since the hex equivalent of 256 decimal is 100, which
+is more than 2 digits."
   (setq nb-digits  (or nb-digits 4))
   (substring (format (concat "%0" (int-to-string nb-digits) "X") int) (- nb-digits)))
 
index 672213c..b0eb717 100644 (file)
@@ -4,16 +4,17 @@
 ;; Description: Change logs for Icicles libraries.
 ;; Author: Drew Adams
 ;; Maintainer: Drew Adams
-;; Copyright (C) 2007-2012, Drew Adams, all rights reserved.
+;; Copyright (C) 2007-2013, Drew Adams, all rights reserved.
 ;; Created: Tue Nov 27 07:47:53 2007
 ;; Version: 22.0
-;; Last-Updated: Mon May 28 07:06:58 2012 (-0700)
+;; Last-Updated: Sat Mar 23 20:08:55 2013 (-0700)
 ;;           By: dradams
-;;     Update #: 8460
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/icicles-chg.el
+;;     Update #: 9870
+;; URL: http://www.emacswiki.org/icicles-chg.el
+;; Doc URL: http://www.emacswiki.org/Icicles
 ;; Keywords: extensions, help, abbrev, local, minibuffer,
 ;;           keys, apropos, completion, matching, regexp, command
-;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x
 ;;
 ;; Features that might be required by this library:
 ;;
  
 ;;;(@* "CHANGE LOG FOR `icicles-cmd1.el'")
 ;;
+;; 2013/03/16 dadams
+;;     custom-variable-p: Return nil if arg is not a symbol.
+;;     icicle-buffer-multi-complete, icicle-(buffer|file-of-content)-apropos-complete-match:
+;;       Test this-command, not last-command, and test it also for icicle-cycling-command.
+;;     icicle-binary-option-p, icicle-buffer-multi-complete: Use icicle-get-safe, not get.
+;; 2013/03/12 dadams
+;;     Added: icicle-buffer-cand-help (factored out).
+;;     icicle-buffer(other-window), icicle-visit-marked-file-of-content(-other-window):
+;;       Use icicle-buffer-cand-help.
+;;     icicle-visit-marked-file-of-content:
+;;       Bind icicle-last-apropos-complete-match-fn to icicle-buffer-apropos-complete-match.
+;;       Bind icicle-apropos-complete-match-fn in second part of icicle-buffer-bindings, not first.
+;;     icicle-send-bug-report: Ask for Update # from icicles-chg.el.
+;; 2013/03/11 dadams
+;;     icicle(-customize)-apropos-options-of-type:
+;;       Bound *-last-apropos-complete-match-fn to *-multi-comp-apropos-complete-match for progressive.
+;; 2013/03/08 dadams
+;;     (icicle-(visit-marked-file-of-content|buffer(-no-search)))-other-window:
+;;       Forgot OTHER-WIN arg to icicle-buffer-name-prompt.
+;; 2013/03/07 dadams
+;;     Updated to use icicle-user-error where appropriate.
+;; 2013/03/05 dadams
+;;     icicle-search-read-context-regexp: Provide default(s) using icicle-defaults-at-point (new).
+;; 2013/02/25 dadams
+;;     icicle-buffer-multi-complete, icicle-buffer-apropos-complete-match, icicle-find-file-of-content:
+;;       isearch-update-ring if find content-pat match.
+;; 2013/02/24 dadams
+;;    icicle-find-file-of-content(-other-window):
+;;      Use normal-mode, not revert-buffer.  No need to restore r-o status.  Thx to Michael Heerdegen.
+;; 2013/02/16 dadams
+;;     Renamed: icicle-find-file(-other-window) to icicle-find-file-no-search(-other-window).
+;;     Added defaliases for (new) icicle-find-file(-other-window), depending on Emacs version.
+;;     icicle-file(-other-window): Corrected current-prefix-arg binding.
+;;     icicle-find-file-absolute(-other-window): Prefix arg on candidate means open it read-only.
+;;     *-find-file-(absolute|no-search)(-other-window): Include *-mouse-candidate-action in memq test.
+;;     icicle-find-file-read-only*: Use icicle-find-file-no-search*, not icicle-find-file*.
+;;     icicle-find-file-of-content(-other-window): Restore correct read-only status after reverting.
+;;     *-dired-(saved-file-candidates|project)-other-window, *-find-file-no-search(-other-window)
+;;      *-find-file-read-only-other-window, *-((recent|locate)-file(-no-symlinks)|locate)-other-window:
+;;         Put property icicle-Completions-window-max-height (forgot).
+;; 2013/02/15 dadams
+;;     icicle-pp-eval-expression: Bind deactivate-mark to nil, like fix for Emacs bug #13724.
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/01/06 dadams
+;;     icicle-execute-extended-command-1:
+;;       Extra safeguards: Ensure CMD is fboundp before calling symbol-function.
+;;                         Ensure it is commandp before calling it interactively.  Error if not.
+;; 2013/01/05 dadams
+;;     icicle-bookmark-*-narrow: No-op unless (featurep 'bookmark+).
+;;     icicle-(delete-file|dired|find-file(-absolute|-of-content|-in-tags-table)|recent-file|
+;;             locate(-file)|(file|directory)-list):
+;;         Updated doc string for new C-x C-t bindings.
+;; 2013/01/04 dadams
+;;     icicle-bookmark-(autofile|autonamed)-narrow:
+;;       Use icicle-transform-multi-completion, not icicle-mctized-display-candidate, like others.
+;; 2013/01/02 dadams
+;;     icicle-other-window-or-frame: Use 1on1-other-frame.
+;; 2012/12/21 dadams
+;;     icicle-buffer-multi-complete, icicle-file-of-content-apropos-complete-match:
+;;       Added filtering by icicle-(buffer|find-file-of-content)-skip-hook.  Thx to C. Schmidt.
+;; 2012/12/20 dadams
+;;     Removed:  icicle-find-file-of-content-multi-complete.  Use only *-apropos-complete-match.
+;;     icicle-file-of-content-apropos-complete-match:
+;;       Do not use find-file-noselect, except for a dir.
+;;       Use find-buffer-visiting or create-file-buffer, and with-current-buffer, insert-file-contents.
+;;       Add buffer to new-bufs--to-kill.
+;;     icicle-find-file-of-content(-other-window):
+;;       Do not bind icicle-read-file-name-internal-fn to icicle-find-file-of-content-multi-complete.
+;;       revert-buffer, so use correct mode.
+;; 2012/12/15 dadams
+;;     icicle-find-file-of-content*:
+;;       Bind icicle-apropos-complete-match-fn to icicle-file-of-content-apropos-complete-match, to fix
+;;         apropos completion
+;;       Bind icicle-compute-narrowing-regexp-p to t, for narrowing optimization.
+;;       Set buffer-modified-p to nil before calling kill-buffer.
+;;     icicle-file-of-content-apropos-complete-match:
+;;       Require that each file name is matched by icicle-narrow-regexp (optimization for narrowing).
+;; 2012/12/14 dadams
+;;     icicle-describe-option-of-type:
+;;       Bind icicle-last-apropos-complete-match-fn to icicle-multi-comp-apropos-complete-match,
+;;       for progressive completion.  Bind icicle-dot-string to icicle-anychar-regexp.
+;;       Updated doc to reflect improved behavior.
+;; 2012/12/12 dadams
+;;     Added: icicle-buffer-apropos-complete-match, icicle-file-of-content-apropos-complete-match.
+;;     icicle-buffer(-other-window):
+;;       Bind icicle-last-apropos-complete-match-fn  to icicle-buffer-apropos-complete-match.
+;;       Move binding of icicle-apropos-complete-match-fn to post-bindings.
+;;     icicle-find-file-of-content(-other-window):
+;;       Bind icicle-last-apropos-complete-match-fn to icicle-file-of-content-apropos-complete-match.
+;;       Reverted the 12/07 change.  Binding *-apropos-complete-match-fn to nil broke apropos compl.
+;;     icicle-find-file-of-content-multi-complete:
+;;       Rewrote.  Do not use all-completions.  Use completion-table-in-turn for everything, passing
+;;       content-matching predicate.
+;;     icicle-execute-extended-command-1, icicle-command-abbrev-action:
+;;       Bind completion-annotate-function to nil, to cancel top-level binding.
+;; 2012/12/07 dadams
+;;     icicle-find-file-of-content(-other-window):
+;;       Restored binding of icicle-apropos-complete-match-fn to nil.
+;; 2012/12/02 dadams
+;;     Removed: icicle-find-file-of-content-read-file-name (use icicle-read-file-name-default instead).
+;;     icicle-find-file-of-content(-other-window):
+;;       Bind icicle-read-file-name-internal-fn, not read-file-name-function.
+;;       No longer bind icicle-apropos-complete-match-fn to nil.
+;; 2012/12/01 dadams
+;;     icicle-find-file-of-content-multi-complete:
+;;       Use icicle-completion--embedded-envvar-table & completion-file-name-table, not internal Emacs.
+;; 2012/11/29 dadams
+;;     icicle-find-file-of-content: Typo: removed -other-window.
+;; 2012/11/28 dadams
+;;     icicle-apropos-value: Minor corrections.  And treat C-u case like C-0 for C-$.
+;;     icicle-completing-yank:
+;;       Do not icicle-delete-dups when constructing cands.  Let icicle-transform-function do it.
+;; 2012/11/26 dadams
+;;     Added: icicle-apropos-value.  Thx to Michael Heerdegen.
+;;     icicle-execute-extended-command(-1): Save and restore icicle-toggle-transforming-message.
+;; 2012/11/19 dadams
+;;     icicle-execute-extended-command-1: Show key-reminder after invoking CMD.  Thx to M. Heerdegen.
+;;     icicle-customize-apropos: lexical-let -> let.  Put PATTERN in progress msg.  Add comma for TYPE.
+;;     icicle-find-tag-define-candidates-1: Put regexp in progress msg.
+;; 2012/11/17 dadams
+;;     icicle-execute-extended-command-1: Show key-reminder msg before sit-for.  Thx to M. Heerdegen.
+;; 2012/11/10 dadams
+;;     custom-variable-p, icicle-binary-option-p: icicle-get-safe -> get.
+;;     icicle-increment-(option|variable): intern -> intern-soft.  Thx to Michael Heerdegen.
+;; 2012/11/08 dadams
+;;     custom-variable-p, icicle-execute-extended-command-1, icicle-binary-option-p:
+;;       Use icicle-get-safe.
+;;     Doc strings: Use \\[...] more.
+;; 2012/11/07 dadams
+;;     icicle-zap-to-char: char-to-string -> string.
+;; 2012/11/03 dadams
+;;     Typo in eval-when-compile around icicle-bbdb-complete-name.
+;; 2012/11/02 dadams
+;;     icicle-buffer-multi-complete: Use prog1 around content search in *-remove-if-not.
+;;     Wrap icicle-bbdb-complete-name in eval-when-compile to avoid byte-compile error for BBDB 3.02.
+;;     icicle-(buffer|file-of-content)-multi-complete: Put back prepending ^ for prefix mode.
+;; 2012/11/01 dadams
+;;     icicle-(buffer|file-of-content)-multi-complete: Handle metadata COMPLETION-MODE arg.
+;;                                                     Comment out prepending ^ for prefix mode.
+;; 2012/10/28 dadams
+;;     icicle-execute-extended-command, icicle-command-abbrev: With icicle-pre-minibuffer-buffer.
+;; 2012/10/27 dadams
+;;     Added: icicle-bbdb-complete-mail (version for BBDB 3.02).
+;;     icicle-execute-extended-command, icicle-command-abbrev:
+;;       Bind icicle-last-transform-function: show only bound cmds.  Thx to Michael Heerdegen.
+;;       Bind completion-annotate-function: annotate with key bindings.
+;; 2012/10/21 dadams
+;;     Added: icicle-cached-files-without-buffers, icicle-recent-files-without-buffers.
+;;     icicle-buffer-multi-complete, icicle-buffer(-other-window):
+;;       Add file names from recentf-list and file-cache-alist as candidates.
+;; 2012/10/20 dadams
+;;     icicle-cd-for-(abs|loc)-files:
+;;       Same change as 2012/08/27 fix to *-make-directory: Use dir in minibuffer as default.
+;; 2012/10/18 dadams
+;;     icicle-directory-list: New feature: proxy candidates = vars with dir-list (i.e., path) values.
+;;     icicle-locate-file-1:
+;;       New feature: Treat plain C-u and C-u C-u, prompting for dir list.
+;;       Ensure correct prefix arg treatment for icicle-locate (vs *-locate-file*).
+;;     icicle-string-list: Last code: reset icicle-proxy-candidates to ().
+;; 2012/10/09 dadams
+;;     icicle-customize-face*, icicle(-customize)-apropos-options-of-type,
+;;       icicle-describe-option-of-type, icicle-dired-saved-file-candidates*, icicle-bookmark*,
+;;       icicle-buffer*, icicle-visit-marked-file-of-content*, icicle-send-signal-to-process,
+;;       icicle-find-file-absolute*, icicle-find-file-of-content*, icicle-recent-file*,
+;;       icicle-locate-file-1, icicle-find-file-in-tags-table*, icicle-face-list, icicle-bookmark-list:
+;;         Bind icicle-multi-completing-p.
+;;       icicle-cd-for-(abs|loc)-files: Test icicle-multi-completing-p, not icicle-list-use-nth-parts.
+;; 2012/10/05 dadams
+;;     Added: icicle-find-file-of-content(-other-window|-multi-complete|-read-file-name).
+;;     icicle-buffer-multi-complete: Add new bufs to NEW-BUFS--TO-KILL, so can kill them when done.
+;;     icicle-visit-marked-file-of-content(-other-window):
+;;       Action arg: Transform multi-completion before passing to switch-to-buffer*.
+;;                   Save visited buffer to NEW-BUFS--TO-KEEP.
+;;       When done, kill any unused buffers that were created, per new option
+;;         icicle-kill-visited-buffers-flag.  But prefix arg flips that.
+;; 2012/10/04 dadams
+;;     icicle-find-file(-other-window): If precede C-! with prefix arg, then open all read-only.
+;; 2012/10/02 dadams
+;;     icicle-describe-opt-of-type-complete, icicle-buffer-multi-complete:
+;;       In try-completion: change PRED to a predicate that works on a singleton list, not a string.
+;; 2012/09/24 dadams
+;;     icicle-recent-file(-other-window): Bind icicle-transform-before-sort-p to t,
+;;                                             icicle-sort-comparer to icicle-last-accessed-first-p.
+;; 2012/09/22 dadams
+;;     icicle-bookmark-jump-1:
+;;       Use full bookmark, not name, after jump and before crosshairs, in case renamed autonamed bmk.
+;; 2012/09/15 dadams
+;;     icicle-visit-marked-file-of-content*: *-remove-if -> use filter as dired-get-marked-files arg.
+;; 2012/09/11 dadams
+;;     Renamed:
+;;       *-buffer(-other-window) to *-buffer-no-search(-other-window)
+;;       *-buffer-of-content(-other-window|complete) to *-buffer(-other-window|multi-complete)
+;;     icicle-buffer(-other-window): Simplified prompt (no multi-completion hint).
+;;     Updated doc strings for this icicle-buffer switch.
+;;     icicle-default-buffer-names: Respect icicle-buffer-ignore-space-prefix-flag.  Optimize a bit.
+;; 2012/09/09 dadams
+;;     Added: icicle-visit-marked-file-of-content(-other-window).
+;;     icicle-default-buffer-names: If BNAME is not in icicle-bufflist then do not use it.
+;; 2012/09/08 dadams
+;;     Added: icicle-buffer-of-content(-other-window), icicle-buffer-of-content-complete.
+;;     icicle-buffer-list: Remove binding of icicle-ignore-space-prefix-flag.
+;; 2012/09/07 dadams
+;;     icicle-buffer(-other-window): Exclude icicle-orig-buff from candidates.
+;; 2012/08/13 dadams
+;;     icicle-customize-face: Doc string improvement.
+;; 2012/08/10 dadams
+;;     icicle-bookmark-set: If bookmark-make-record provides a name, use that as default.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-file, icicle-ORIG-customize-face, icicle-ORIG-customize-face-other-window,
+;;       icicle-ORIG-dabbrev-completion, icicle-ORIG-lisp-complete-symbol,
+;;       icicle-ORIG-lisp-completion-at-point, icicle-ORIG-repeat-complex-command.
+;; 2012/07/31 dadams
+;;     Added widgets icicle-file, old-file.  Added command icicle-widget-file-complete.
+;;     icicle-comint-dynamic-complete(-as)-filename, icicle-comint-replace-by-expanded-filename:
+;;       Added optional (prefix) arg REPLACE-TO-EOL-P.
+;; 2012/07/22 dadams
+;;     icicle-pp-display-expression: Do not try to select old-window if it is no longer live.
+;; 2012/07/21 dadams
+;;     Replace defun of *-comint-completion-at-point by defalias to *-comint-dynamic-complete.
+;;     icicle-comint-replace-orig-completion-fns: Redefined for new format of
+;;       icicle-comint-dynamic-complete-replacements.  Thx to Christopher Schmidt.
+;;     icicle-execute-extended-command-1: Pass non-nil NOINDIRECT arg to where-is-internal.
+;; 2012/07/19 dadams
+;;     icicle-default-buffer-names: Added optional ARG.  Use in all calls to it.
+;;     icicle-buffer-list: Allow also Dired buffers for positive prefix arg.
+;;     icicle-(kill|insert)-buffer, icicle-add-buffer-candidate:
+;;       Removed doc string content - just refer to icicle-buffer doc.
+;; 2012/07/10 dadams
+;;     icicle-comint-dynamic-complete-as-filename:
+;;       (file-name-nondir* (directory-file-name...)) -> (directory-file-name (file-relative-name...))
+;;       Thx to Christopher Schmidt.
+;; 2012/07/08 dadams
+;;     Added icicle-comint-completion-at-point.  Thx to Christopher Schmidt and Michael Heerdegen.
+;; 2012/06/29 dadams
+;;     icicle-command-abbrev:
+;;       Bind icicle-sort-comparer to icicle-proxy-candidate-first-p, not
+;;         icicle-command-abbrev-used-more-p.  icicle-command-abbrev-used-more-p is second sort order.
+;;       Bind icicle-allowed-sort-predicate (new), to allow icicle-command-abbrev-used-more-p.
+;;       Improved doc string, mentioning icicle-command-abbrev-alist.
+;;     icicle-command-abbrev-action:
+;;       Add abbrev-or-cmd to icicle-commands-for-abbrev if it is in icicle-command-abbrev-alist.
+;;       Do not bind icicle-sort-comparer here - not needed (?).
+;;       During completion, bind icicle-current-input to abbrev-or-cmd.
+;;     Removed #' from lambdas.
+;; 2012/06/24 dadams
+;;     icicle-shell-dynamic-complete-as-command:
+;;       Use shell-command-to-string in *Help* explicitly, not just shell-command.
+;;       Thx to Christopher Schmidt & Michael Heerdegen.
+;; 2012/06/09 dadams
+;;     icicle-pp-display-expression: Use backquote+comma, not lexical-let (bug fix).
+;; 2012/06/04 dadams
+;;     Comment or otherwise handle free vars in lambdas: some lexical-let, some backquoting.
+;; 2012/06/03 dadams
+;;     icicle-execute-extended-command-1:
+;;       Do not show "You can invoke..." message for multi-command use.  Do it only for top-level M-x.
+;;       Use backquote+comma to eliminate free var CMD.
 ;; 2012/05/30 dadams
 ;;     icicle-dired-insert-as-subdir: Include default-directory as candidate for ANCESTOR-DIR.
 ;; 2012/05/25 dadams
 ;;       icicle-grep-saved-file-candidates:
 ;;         Test with icicle-file-remote-p before file-exists-p, to avoid Tramp.
 ;; 2012/05/13 dadams
-;;     Added: icicle-dired-save-marked(-more|to-cache-file|to-fileset|to-variable)-recursive, 
+;;     Added: icicle-dired-save-marked(-more|to-cache-file|to-fileset|to-variable)-recursive,
 ;; 2012/04/22 dadams
 ;;     Added: icicle-buffer-name-prompt.
 ;;     Removed: icicle-filter-buffer-cands-for-mode (replaced by *-(remove|keep-only)* in *-mcmd.el).
  
 ;;;(@* "CHANGE LOG FOR `icicles-cmd2.el'")
 ;;
+;; 2013/03/23 dadams
+;;     Renamed icicle-Info-goto-node to icicle-Info-goto-node-no-search.
+;;     Added: icicle-Info-goto-node (new version) - use *-of-content or *-no-search.
+;;     icicle-Info-menu-cmd: Use icicle-Info-goto-node-no-search, not new icicle-Info-goto-node.
+;;     icicle-Info-content-match: Set Info-tag-table-marker to saved position.
+;;     icicle-Info-read-node-of-content: Save position of Info-tag-table-marker for *-content-match. 
+;; 2013/03/17 dadams
+;;     Added: icicle-Info-goto-node-of-content, icicle-Info-apropos-complete-match,
+;;            icicle-Info-content-match, icicle-Info-read-node-of-content,
+;;            icicle-Info-multi-read-node-name,
+;; 2013/03/16 dadams
+;;     icicle-Info-goto-node-action: Give focus back to minibuffer frame at end.
+;;     icicle-Info-read-node-name: Retain INCLUDE-FILE-P arg in recursive call.
+;; 2013/03/15 dadams
+;;     Removed: icicle-Info-book-order-p (just ensure book order as default order).
+;;     icicle-Info-goto-node:
+;;       Bind icicle-pref-arg, so it is available in icicle-Info-goto-node-action.
+;;       Use nil, not icicle-Info-book-order-p, in icicle-sort-orders-alist and icicle-sort-comparer.
+;;     icicle-Info-goto-node-1: Use natnump as ARG test.
+;;     icicle-Info-build-node-completions-1: Ensure result is in book order, whatever Emacs version.
+;;     icicle-Info-build-node-completions: Do not do any reversing, since *-1 now uses book order.
+;;     icicle-Info-goto-node-action: Pass icicle-pref-arg to icicle-Info-goto-node-1 (bug fix).
+;;                                   Do not reverse list.
+;; 2013/03/07 dadams
+;;     Updated to use icicle-user-error where appropriate.
+;; 2013/02/28 dadams
+;;     icicle-cmd2-after-load-hexrgb, icicle-cmd2-after-load-wid-edit+:
+;;       Use fset, not defalias, for redefinitions of read-color, widget-color-complete.
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/01/06 dadams
+;;     icicle-(bookmark|(un)tag)-a-file: Updated calls to bmkp-*, to add nil NO-UPDATE-P argument.
+;; 2013/01/05 dadams
+;;     icicle-find-file-(all|some)-tags*: protect free vars in lambdas using backquote quote comma.
+;;     icicle-(bookmark-a-file|find-file-tagged|): Updated doc string for new C-x C-t bindings.
+;; 2012/12/31 dadams
+;;     icicle-search-in-context-default-fn:
+;;       Set icicle-mode-line-help instead of using icicle-show-help-in-mode-line.
+;; 2012/12/22 dadams
+;;     Added: icicle-search-file-found-p.
+;;     icicle-search-define-candidates:
+;;       Search only files that have at least one regexp match: use icicle-search-file-found-p to test.
+;; 2012/11/28 dadams
+;;     icicle-(fundoc|vardoc|plist): Use C-$ to toggle command/fn, option/var, faces/all.
+;;     icicle-vardoc: Do not use non-neg prefix arg for options.
+;;     icicle-doc: Be able to use C-$ to limit to commands, options, and faces.
+;;                 Correction: separate setq in and, in case icicle-fn-doc-minus-sig returns nil.
+;; 2012/11/20 dadams
+;;     icicle-search-define-candidates:
+;;       Added progress message for context gathering.  Thx to Michael Heerdegen.
+;; 2012/11/10 dadams
+;;     icicle-defined-thing-p: icicle-get-safe -> get.
+;;     icicle-read-color-wysiwyg:
+;;       Fix case where user inputs name or RGB without completing (transformed to "").
+;;       Mention sorting in doc string.
+;; 2012/11/08 dadams
+;;     icicle-defined-thing-p: Use icicle-get-safe.
+;;     Doc strings: Use \\[...] more.
+;; 2012/11/05 dadams
+;;     Use \\[...] in doc strings instead of hard-coding, for some more keys.
+;; 2012/11/03 dadams
+;;     Added: icicle-cmd2-after-load-wid-edit+.  eval-after-load it for wid-edit+.el.
+;;       Use it for all of the widget stuff (take that out of icicle-cmd2-after-load-highlight).
+;; 2012/10/26 dadams
+;;     icicle-search: Use \\[...] in doc string instead of hard-coding some of the keys.
+;; 2012/10/22 dadams
+;;     icicle-Info-index: Bind *-transform-function to *-remove-duplicates.  Emacs bug #12705.
+;; 2012/10/20 dadams
+;;     icicle-read-color: Fix case where user inputs without completing (WYSIWYG transforms to "").
+;; 2012/10/09 dadams
+;;     icicle-find-file-tagged*, icicle-read-color(-wysiwyg), icicle-frame-(bg|fg),
+;;       icicle-choose(-(in)visible)-faces, icicle-(var|fun)doc, icicle-plist,
+;;       icicle-goto-global-marker, icicle-occur, icicle-imenu-1,
+;;       icicle-search(-bookmark(s-together|list-marked)|-buffer|-file|-sentences|-paragraphs|-pages):
+;;         Bind icicle-multi-completing-p.
+;; 2012/10/06 dadams
+;;     icicle-hide/show-comments: Call comment-normalize-vars first.  Thx to Stefan Monnier.
+;; 2012/09/08 dadams
+;;     icicle-apply: Override icicle-buffer-ignore-space-prefix-flag, not icicle-ignore-space-prefix*.
+;;     icicle-search: Remove mention of overriding icicle-ignore-space-prefix-flag.
+;;     icicle-choose-candidate-of-type: Remove binding of icicle-ignore-space-prefix-flag.
+;; 2012/09/06 dadams
+;;     Use icicle-string-match-p.
+;; 2012/09/05 dadams
+;;     Added: icicle-select-text-at-point.
+;; 2012/08/21 dadams
+;;     tap-symbol-nearest-point -> symbol-nearest-point. (icicles-opt.el DTRT.)
+;; 2012/08/18 dadams
+;;     symbol-nearest-point -> tap-symbol-nearest-point.
+;;     bounds-of-thing-at-point -> icicle-bounds-of-thing-at-point.
+;;     next-visible-thing-(1|2) -> thgcmd-next-visible-thing-(1|2).
+;;     next-visible-thing-1: Note: < seems better than <= for comparison.  I changed it to < for
+;;       Icicles version on 2011-05-14.  But just changed the thing-cmd.el version to < today.
+;; 2012/08/14 dadams
+;;     icicle-cmd2-after-load-highlight:
+;;       For Emacs < 24, require wid-edit.el before defalias to widget-color-complete.
+;; 2012/08/12 dadams
+;;     icicle-read-color-WYSIWYG: Convert raw prefix arg `-' to -1.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-color, icicle-ORIG-read-color, icicle-ORIG-widget-color-complete.
+;;     icicle-Info-index(-20|-action), icicle-Info-menu, icicle-Info-goto-node-1:
+;;       Applied renaming to new: icicle-ORIG-*.
+;; 2012/08/05 dadams
+;;     Added: widgets icicle-color, old-color.  Added function icicle-widget-color-complete.
+;;     icicle-read-color-wysiwyg:
+;;       Added optional arg INITIAL-INPUT.
+;;       Return only variable's value if user-option candidate is chosen.
+;; 2012/07/17 dadams
+;;     Removed: icicle-maybe-byte-compile-after-load (macro).  Removed all calls to it.
+;; 2012/07/07 dadams
+;;     icicle-Info-index:
+;;       Bind icicle-Info-(index-nodes|manual|hist-list), for highlighting visited nodes.
+;;       Raise error if not in Info-mode.
+;; 2012/07/02 dadams
+;;     Moved defcustom of icicle-byte-compile-eval-after-load-flag to icicles-mcmd.el (loaded first).
+;;     icicle-search-bookmark(-action): Use *-search-context-regexp, not regexp, so no free warning.
+;;     Changed #'(lambda...) to (lambda...).
 ;; 2012/05/22 dadams
 ;;     icicle-search-define-candidates, icicle-char-properties-in-buffers:
 ;;       Test with icicle-file-remote-p before file-exists-p, to avoid Tramp.
 ;; 2012/04/23 dadams
 ;;     icicle-search-dired-marked: Use diredp-get-files.  Raise error if Dired+ not present.
 ;;     Moved other icicle-search-dired-* functions to Dired+ as diredp-*.
-;;
 ;;     icicle-search-dired-get-files:
 ;;       If user answers no, then pick up only the marked files here 9and all files underneath).
 ;;     icicle-search-dired-get-files-for-dir: A no answer does not change what happens for top dir.
  
 ;;;(@* "CHANGE LOG FOR `icicles-face.el'")
 ;;
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/01/18 dadams
+;;     Removed: icicle-increment-color-(hue|saturation|value) - moved to hexrgb.el and modified.
+;;     icicle-search-context-level-*: Use hexrgb-increment-*, with past increment divided by 100.
+;; 2012/11/04 dadams
+;;     icicle-annotation: Fix default value for older Emacs versions.
+;; 2012/10/27 dadams
+;;     Added icicle-annotation.
+;; 2012/07/07 dadams
+;;     Added: icicle-historical-candidate-other (used only for icicle-Info-index so far).
 ;; 2012/03/29 dadams
 ;;     Removed autoload cookies: hexrgb require, defs of *-increment-*, and *-search-context-level-*.
 ;; 2012/03/28 dadams
  
 ;;;(@* "CHANGE LOG FOR `icicles-fn.el'")
 ;;
+;; 2013/03/11 dadams
+;;     icicle-try-switch-buffer: If BUFFER is already current, do nothing, to prevent hooks kicking in.
+;; 2013/03/07 dadams
+;;     Updated to use icicle-user-error where appropriate.
+;; 2013/03/05 dadams
+;;     Added: icicle-defaults-at-point.
+;; 2013/02/28 dadams
+;;     eval-after-load crm: Use fset, not defalias.  Thx to Michael Heerdegen.
+;; 2013/02/26 dadams
+;;     icicle-(prefix|apropos)-any(-file-name)-candidates-p:
+;;       Fix for use with Icomplete - take icicle-must-pass-after-match-predicate into account.
+;; 2013/02/12 dadams
+;;     Typo fix: minibuffer-default--* -> minibuffer-default-*.  Thx to Christopher Schmidt.
+;; 2013/02/10 dadams
+;;     icicle-bounds-of-thing-at-point: Use SYNTAX-TABLE arg only if it is a syntax table.
+;; 2013/02/06 dadams
+;;     icicle-unpropertize-completion: Added rear-nonsticky.  Thx to Christopher Schmidt.
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/02/03 dadams
+;;     Moved to icicles-mcmd.el: icicle-isearch-complete-past-string.
+;; 2012/12/31 dadams
+;;     icicle-next-candidate: Set icicle-mode-line-help.  Do not call icicle-show-help-in-mode-line.
+;;     icicle-insert-cand-in-minibuffer:
+;;       Ignore errors in put-text-property.  If retrieve singleton cand set, it is read-only (why?).
+;;     icicle-insert-candidates: Corrected '(face 'icicle-annotation) to '(face icicle-annotation).
+;; 2012/12/28 dadams
+;;     icicle-add-default-to-prompt: Handle nil DEFAULT.  Thx to Michael Heerdegen.
+;; 2012/12/22 dadams
+;;     Added: icicle-add-default-to-prompt.
+;;     icicle-completing-read, icicle-read-string: Use icicle-add-default-to-prompt.
+;; 2012/12/21 dadams
+;;     icicle-unsorted(-file-name)-(prefix|apropos)-candidates:
+;;       Compute common match in all cases except i-e-i-t-c-m = 0, and set *-common-match-string to it.
+;;     icicle-save-or-restore-input:
+;;       Removed test for icicle-expand-input-to-common-match level: expand for all levels.
+;; 2012/12/14 dadams
+;;     Added: icicle-multi-comp-apropos-complete-match.
+;; 2012/12/12 dadams
+;;     icicle-expanded-common-match-1:
+;;       Use string-match, not icicle-apropos-complete-match-fn, except for first condition (and).
+;;     icicle-insert-candidates: Wrap funcall of annotation fn with condition-case, just in case.
+;; 2012/12/10 dadams
+;;     icicle-read-file-name-default: Protect minibuffer-local-filename-syntax with boundp.
+;; 2012/12/06 dadams
+;;     Moved minibuffer-with-setup-hook here from icicles-mac.el (and removed eval-when-compile).
+;;     icicle-read-shell-command, icicle-dired-read-shell-command:
+;;       Use minibuffer-with-setup-hook unconditionally, since provided here unconditionally.
+;; 2012/12/05 dadams
+;;     icicle-completing-read: Remove HINT before adding it our way.  Thx to Christopher Schmidt.
+;; 2012/12/02 dadams
+;;     Added: icicle-read-file-name-default, icicle-ORIG-read-file-name-default.
+;; 2012/11/27 dadams
+;;     icicle-completing-read:
+;;       For icicle-default-value = t: Append ": " to icicle-default-in-prompt-format-function result.
+;; 2012/11/26 dadams
+;;     icicle-completing-read: Use new option icicle-default-in-prompt-format-function.
+;; 2012/11/21 dadams
+;;     icicle-completing-read: Commented out removing dir part of icicle-default-value in prompt.
+;; 2012/11/17 dadams
+;;     icicle-completing-read:
+;;       When (eq icicle-default-value t) add DEF to PROMPT.  Thx to Michael Heerdegen.
+;; 2012/11/10 dadams
+;;     icicle-custom-type: icicle-get-safe -> get.
+;;     icicle-fuzzy-candidates: Show all (not no) candidates for empty input, sorted alphabetically.
+;; 2012/11/08 dadams
+;;     Added: icicle-get-safe.
+;;     icicle-completion-setup-function, icicle-var-(is-of|matches|inherits)-type-p,
+;;       icicle-var-val-satisfies-type-p, icicle-custom-type, icicle-fit-completions-window,
+;;       icicle-next-candidate, icicle-recompute-candidates, icicle-save-or-restore-input,
+;;       icicle-highlight-input-noncompletion:
+;;         Use icicle-get-safe.
+;; 2012/11/07 dadams
+;;     icicle-read-char-by-name, icicle-read-from-minibuffer: char-to-string -> string.
+;;     icicle-scatter: Non-backtracking version.
+;; 2012/10/27 dadams
+;;     Added: icicle-member-ignore-case.
+;;     icicle-insert-candidates:
+;;       Insert annotation only if icicle-show-annotations-flag.  Highlight w/ face icicle-annotation.
+;; 2012/10/24 dadams
+;;     icicle-completion--embedded-envvar-table: Return 0 as the first boundary.  Thx to M. Heerdegen.
+;; 2012/10/22 dadams
+;;     icicle-display-candidates-in-Completions: Check Info topic first in icicle-Info-index-cache.
+;;     icicle-Info-node-is-indexed-by-topic:
+;;       Return triplet: (TOPIC NODE FILE).  Cache triplet in icicle-Info-index-cache (new).
+;; 2012/10/21 dadams
+;;     icicle-take: Use a simpler definition.
+;; 2012/10/20 dadams
+;;     icicle-completion--embedded-envvar-table: Added more of vanilla code.  Thx to Michael Heerdegen.
+;; 2012/10/18 dadams
+;;     icicle-read-file-name, icicle-read-number, icicle-read-char-exclusive,
+;;       icicle-read-string-completing, icicle-read-face-name:
+;;         Do not augment icicle-proxy-candidates if icicle-exclude-default-proxies is non-nil.
+;;         For all of them except icicle-read-face-name (already done): Augment, do not just replace.
+;; 2012/10/17 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       For *Completions* mode line: treat nil icicle-apropos-complete-match-fn like apropos.
+;; 2012/10/15 dadams
+;;     icicle-(highlight|clear)-lighter: Use || to indicate multi-completion.
+;; 2012/10/10 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Add lighter and completion mode to *Completions* mode line.
+;;     icicle-(prefix|apropos)-candidates:
+;;       Call *-maybe-sort-maybe-truncate even if *-sort-comparer is nil.  Needed for truncation.
+;;     icicle-maybe-sort-maybe-truncate:
+;;       Handle new icicle-max-candidates value of RESET, from icicle-doremi-increment-max-candidates+
+;; 2012/10/09 dadams
+;;     icicle-read-face-name: Bind icicle-multi-completing-p to t.
+;; 2012/10/05 dadams
+;;     icicle-next-candidate: Removed setting of icicle-default-directory (unused).
+;; 2012/10/02 dadams
+;;     icicle-file-name-(non)directory, icicle-input-from-minibuffer:
+;;       string-to-list -> append the string to (),
+;;         Because Emacs 24 now breaks older byte-compiled code, since it removed string-to-sequence.
+;; 2012/10/01 dadams
+;;     icicle-file-name-(non)directory, icicle-input-from-minibuffer:
+;;       Rewrote to be more robust: do not hard-code ^G as the REPL-CHAR.  Use a char not in string.
+;; 2012/09/25 dadams
+;;     icicle-input-from-minibuffer, icicle-minibuf-input-sans-dir,
+;;       icicle-highlight-input-noncompletion:
+;;         Handle the icicle-abs-file-candidates case also - same as the icicle-file-name-input-p case.
+;; 2012/09/24 dadams
+;;     Added: icicle-last-accessed-first-p.
+;;     icicle-read-shell-command-completing: Pass non-nil NO-ERROR-P arg to icicle-describe-file.
+;;     icicle-file-type-less-p, icicle-dirs-(first|last)-p, icicle-last-modified-first-p:
+;;       Use file comparison also if icicle-abs-file-candidates.
+;; 2012/09/17 dadams
+;;     icicle-insert-candidates:
+;;       Add an extra newline after multi-line candidates only, not after all cands if ANY-MULTILINE-P.
+;; 2012/09/08 dadams
+;;     Added: icicle-read-buffer, icicle-ORIG-read-buffer.
+;;     icicle-unsorted-(prefix|apropos)-candidates:
+;;       Use buffer-name alist, if not ignoring space prefix and not internal-complete-buffer.
+;;       Ensure icicle-buffer-name-input-p to pass icicle-buffer-ignore-space-prefix-flag arg.
+;;     icicle-unsorted-file-name-(prefix|apropos)-candidates,
+;;       icicle-apropos-any-file-name-candidates-p:
+;;         Do not pass icicle-ignore-space-prefix-flag arg to icicle-all-completions.
+;;     icicle-display-Completions, icicle-apropos-any-candidates-p:
+;;       Ensure icicle-buffer-name-input-p to pass icicle-buffer-ignore-space-prefix-flag arg.
+;; 2012/09/06 dadams
+;;     Added icicle-string-match-p.  Use it.
+;; 2012/08/31 dadams
+;;     icicle-read-from-minibuffer: Improved doc string.
+;; 2012/08/28 dadams
+;;     icicle-read-number: Allow for DEFAULT to be a cons with nil elements.  Thx to C. Schmidt.
+;; 2012/08/18 dadams
+;;     Added: icicle-bounds-of-thing-at-point.
+;;     thing-at-point -> icicle-thing-at-point, everywhere.
+;; 2012/08/13 dadams
+;;     icicle-completing-read-multiple: Doc string improvement.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-choose-completion-string, icicle-ORIG-completing-read,
+;;       icicle-ORIG-completing-read-multiple, icicle-ORIG-completion-setup-function,
+;;       icicle-ORIG-dired-smart-shell-command, icicle-ORIG-display-completion-list,
+;;       icicle-ORIG-face-valid-attribute-values, icicle-ORIG-minibuffer-default-add-completions,
+;;       icicle-ORIG-read-char-by-name, icicle-ORIG-read-face-name,
+;;       icicle-ORIG-read-from-minibuffer, icicle-ORIG-read-number,
+;;       icicle-ORIG-read-string, icicle-ORIG-shell-command, icicle-ORIG-shell-command-on-region,
+;;       icicle-ORIG-crm-local-completion-map, icicle-ORIG-crm-local-must-match-map.
+;;     icicle-read-file-name-1: Applied renaming: new name icicle-orig-read-file-name-fn.
+;; 2012/07/21 dadams
+;;     icicle-show-help-in-mode-line:
+;;       Allow value of property icicle-mode-line-help to be a function.
+;;       For a file-name candidate, call icicle-help-line-buffer with NO-FILE-P.
+;;     icicle-help-line-buffer: Added optional arg NO-FILE-P.  Include file name, if any.
+;; 2012/07/19 dadams
+;;     icicle-insert-candidates: Fix change from 7/18: ensure icicle-last-completion is non-nil.
+;; 2012/07/18 dadams
+;;     icicle-insert-candidates: Handle annotations.
+;; 2012/07/17 dadams
+;;     icicle-read-char-by-name: Show char and its code point in mode line when cycle.
+;; 2012/07/07 dadams
+;;     Added: icicle-Info-node-is-indexed-by-topic.
+;;     icicle-display-candidates-in-Completions:
+;;       Added highlighting of topics pointing to visited Info nodes, for icicle-Info-index.
+;;       Call icicle-transform-multi-completion on file-name cand for historical-cand highlighting.
+;;     File-name completion fixes (thx to Michael Heerdegen):
+;;       Added: icicle-completion--embedded-envvar-table.
+;;       icicle-unsorted-file-name-prefix-candidates:
+;;         Use substitute-in-file-name on arg INPUT.
+;;         For Emacs 24+, bind minibuffer-completion-table to icicle-file-name-completion-table.
+;;       icicle-insert-cand-in-minibuffer: Removed insert-default-directory from AND as condition.
+;;       icicle-save-or-restore-input:
+;;         Removed insert-default-directory from COMMON condition for file-name completion.
+;;         Pass (NOT INSERT-DEFAULT-DIRECTORY) as 3rd arg to icicle-abbreviate-or-expand-file-name.
+;;       icicle-abbreviate-or-expand-file-name: Added optional arg DONT-ADD-DEFAULT-DIR-P.
+;;     Removed #' from lambdas.
+;; 2012/06/25 dadams
+;;     Corrected change of 5/13: Removed call to file-name-as-directory.
+;;     icicle-alt-act-fn-for-type: Removed backquoting from lambda, since it uses a macro in *-mac.el.
+;; 2012/06/24 dadams
+;;     icicle-read-shell-command-completing:
+;;       Use shell-command-to-string in *Help* explicitly, not just shell-command.
+;;       Thx to Christopher Schmidt & Michael Heerdegen.
+;;     icicle-help-line-(buffer|file): Handle fixnum overflow if buffer or file is too big.
+;;     icicle-insert-candidates: Remove extra newline at eob when vertical format.
+;; 2012/06/21 dadams
+;;     icicle-prefix-any-file-name-candidates-p: updated for Emacs 23+ (file-name PRED).
+;; 2012/06/18 dadams
+;;     icicle-help-line-buffer: Use format-mode-line if available.
+;; 2012/06/09 dadams
+;;     icicle-display-candidates-in-Completions, icicle-highlight-initial-whitespace:
+;;       Use point-max if 1+ point is greater.
+;;     icicle-display-completion-list:
+;;       Insert help string only if there are completions.
+;;       Show text "There are no possible..." anyway, even if the show flag is nil.
+;;     icicle-expand-file-name-20: Move forward-line only if the show flag is non-nil - else no-op.
 ;; 2012/05/22 dadams
 ;;     icicle-file-remote-p: Aligned with bmkp-file-remote-p - removed ffap; added final string-match.
 ;;     icicle-show-help-in-mode-line, icicle-quote-file-name-part-of-cmd:
 ;;       macros needs to be byte-compiled anew after loading the updated macros.
 ;; ****************************************************************************************************
 ;;
+;; 2013/03/07 dadams
+;;     Added: icicle-user-error.
+;;     icicle-define(-search)-bookmark-command(-1): Use icicle-user-error.
+;; 2013/01/26 dadams
+;;     icicle-define-file-command: Ensure non-nil icicle-last-input before apply directory-file-name.
+;; 2012/12/06 dadams
+;;     Removed minibuffer-with-setup-hook - moved to icicles-fn.el (and removed eval-when-compile).
+;; 2012/12/01 dadams
+;;     Moved to icicles-opt.el: icicle-kbd, icicle-edmacro-parse-keys, icicle-read-kbd-macro.
+;; 2012/10/08 dadams
+;;     icicle-define-sort-command: alphabetically -> alphabetical in doc string.
+;; 2012/10/06 dadams
+;;     Added: minibuffer-with-setup-hook for code byte-compiled using Emacs < 22.
+;; 2012/10/04 dadams
+;;     icicle-define-file-command:
+;;       When call expand-file-name, wrap i-last-input with directory-file-name, to use parent dir.
+;; 2012/09/28 dadams
+;;     naked-edmacro-parse-keys:
+;;       Better fix for M-TAB.  Do not assume that function keys are lowercase.
+;;       Handle angle brackets even if ANGLES is nil.  But keep vanilla bug #12535 if non-nil.
+;; 2012/09/27 dadams
+;;     icicle-edmacro-parse-keys: Fix handling of M-TAB.  Function keys are lowercase.
+;;                                So M-TAB returns [134217737], but M-tab returns [M-tab].
+;; 2012/09/24 dadams
+;;     icicle-file-bindings: Pass non-nil NO-ERROR-P arg to icicle-describe-file.
+;; 2012/09/11 dadams
+;;     icicle-buffer-bindings: Remove minibuffers from icicle-bufflist.
+;; 2012/09/08 dadams
+;;     icicle-buffer-bindings:
+;;       Bind icicle-buffer-complete-fn to internal-complete-buffer for Emacs 22+.
+;;       Bind icicle-buffer-name-input-p to t.
+;;       Remove bindings of icicle-ignore-space-prefix-flag and bufflist.
+;;       (bufflist used icicle-ignore-space-prefix-flag to remove SPC buffers.)
+;;     icicle-define-command:
+;;       If icicle-buffer-name-input-p then use icicle-read-buffer (it is new), not completing-read.
+;; 2012/07/24 dadams
+;;     icicle-buffer-bindings: If icicle-ignore-space-prefix-flag & VANILLA then remove internal bufs.
+;; 2012/07/19 dadams
+;;     icicle-buffer-bindings: Positive prefix arg now includes Dired buffers, along with file bufs.
+;; 2012/07/05 dadams
+;;     Removed #' from lambdas.
 ;; 2012/04/22 dadams
 ;;     icicle-buffer-bindings: C-u keeps only derived-mode buffers.
 ;;                             Use backquote for lambda to handle free var THIS-MODE.
  
 ;;;(@* "CHANGE LOG FOR `icicles-mcmd.el'")
 ;;
+;; 2013/03/16 dadams
+;;     icicle(-complete-and)-(widen|narrow)-candidates, icicle-regexp-quote-input:
+;;       Put properties icicle(-apropos)-completing-command.
+;; 2013/03/07 dadams
+;;     Updated to use icicle-user-error where appropriate.
+;;     icicle(mouse)-choose-completion: Added live-buffer test, per Emacs 24.
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/02/03 dadams
+;;     Added: icicle-isearch-history-complete, icicle-isearch-history-insert.
+;;     Moved here from icicles-fn.el: icicle-isearch-complete-past-string.
+;; 2013/01/30 dadams
+;;     icicle-insert-history-element: Do not clear minibuffer.
+;;     icicle-multi-inputs-act: Raise error if no action function defined.
+;; 2013/01/26 dadams
+;;     Added: icicle-multi-inputs-save (to be bound to M-S), icicle-roundup (to be bound to M-r),
+;;            icicle-multi-inputs-act (to be bound to M-R), icicle-insert-candidate-action,
+;;            icicle-split-input.
+;;     icicle-insert-history-element: Define as a multi-command.
+;;     icicle-insert-candidate-action: Do nothing if CAND is nil or "".
+;;     icicle-help-string-(non-)completion: Updated for new commands/keys.
+;; 2013/01/11 dadams
+;;     icicle-help-string(-non)-completion: Removed M-s, M-r.
+;; 2013/01/06 dadams
+;;     icicle-autofile-action: Updated calls to bmkp-*, to add nil NO-UPDATE-P argument.
+;; 2013/01/05 dadams
+;;     Added: icicle-file-all-tags-narrow, icicle-file-all-tags-regexp-narrow,
+;;            icicle-file-some-tags-narrow, icicle-file-some-tags-regexp-narrow,
+;;     icicle-(un)bind-(buffer|file)-candidate-keys: Factored.
+;;     icicle-(un)bind-file-candidate-keys: Added: *-file-(all|some)-tags(-regexp)-narrow.
+;;     icicle-remove-cand-from-lists, icicle-narrow-candidates-with-predicate:
+;;       Handle Emacs > 23.1 correctly: it no longer uses read-file-name-predicate.
+;; 2013/01/01 dadams
+;;     icicle-change-sort-order: completion--flush-all-sorted-completions, so Icomplete+ updates order.
+;; 2012/12/31 dadams
+;;     icicle-successive-action, icicle-insert-completion, icicle-candidate-set-retrieve-1,
+;;       icicle-keep-only-past-inputs:
+;;         Set icicle-mode-line-help instead of using icicle-show-help-in-mode-line.
+;;     icicle-insert-completion: Use icicle-current-completion-in-Completions and
+;;                               icicle-nb-of-cand-at-Completions-pos only if in *Completions*.
+;;     icicle-(prefix|apropos)-complete-1:
+;;       Replace local var mode-line-help with icicle-mode-line-help.
+;;       Do not call icicle-show-help-in-mode-line (using icicle-post-command-hook now).
+;; 2012/12/20 dadams
+;;     icicle-(prefix|apropos)-complete-1: Handle new option icicle-TAB/S-TAB-only-completes-flag.
+;; 2012/12/15 dadams
+;;     icicle-narrow-candidates:
+;;       Rename current-candidates to icicle-cands-to-narrow (now a global var, but bound only here).
+;;       Bind icicle-narrow-regexp if icicle-compute-narrowing-regexp-p.
+;; 2012/12/12 dadams
+;;     icicle-narrow-candidates:
+;;       Use icicle-must-pass-predicate, not icicle-must-pass-after-match-predicate.
+;;       Added a cond clause for function-valued minibuffer-completion-table other than file input.
+;;     icicle-apropos-complete-and-widen: Updated when condition wrt *-apropos-complete-and-narrow.
+;; 2012/11/28 dadams
+;;     icicle-toggle-transforming: Rewrote to be more useful when both are useful functions.
+;; 2012/11/08 dadams
+;;     icicle-digit-argument, icicle-successive-action, icicle-(prefix|apropos)-complete-1,
+;;       icicle-switch-to-Completions-buf, icicle-keep-only-past-inputs,
+;;       icicle-remove-buffer-cands-for-mode:
+;;         Use icicle-get-safe.
+;; 2012/11/07 dadams
+;;     icicle-successive-action, icicle-(prefix|apropos)-complete-1, icicle-switch-to-Completions-buf:
+;;       Protect calls to get with symbolp.
+;; 2012/10/27 dadams
+;;     Added: icicle-toggle-annotation.
+;;     icicle-help-string-completion: Added icicle-toggle-annotation.
+;;     icicle-toggle-transforming: Use new variable icicle-toggle-transforming-message.
+;; 2012/10/22 dadams
+;;     icicle-(un)bind-buffer-candidate-keys: Remove soft-require conditions for C-x F and C-x R.
+;; 2012/10/21 dadams
+;;     Added: icicle-toggle-include-cached-files, icicle-toggle-include-recent-files.
+;;     icicle-(un)bind-buffer-candidate-keys:
+;;       Bind icicle-toggle-include-(cached|recent)-files to C-x F and C-x R.
+;; 2012/10/10 dadams
+;;     icicle-doremi-increment-max-candidates+:
+;;       C-u sets to RESET, not nil, so icicle-maybe-sort-maybe-truncate can reset lighter.
+;; 2012/10/09 dadams
+;;     icicle-prefix-complete-1: When icicle-multi-completing-p and match join string, show warning.
+;; 2012/10/05 dadams
+;;     icicle-(prefix|apropos)-complete-(1|2), icicle(-mouse)-candidate-action-1:
+;;       Removed setting of icicle-default-directory (unused).
+;; 2012/10/02 dadams
+;;     Added: icicle-looking-at-p, icicle-looking-back-at-p.
+;;     Removed: icicle-looking(-back)-at-anychar-regexp-p.
+;;     icicle(-delete)-(forward|backward)(-delete)-char(-untabify)-dots, icicle-transpose-chars-dots:
+;;       Rewrote and renamed *-dots to *-magic, to handle join string too.
+;; 2012/09/24 dadams
+;;     Added: icicle-sort-by-last-file-access-time.
+;;     icicle-describe-file: Added optional arg NO-ERROR-P.
+;;     icicle-current-sort-functions: Use file comparison also if icicle-abs-file-candidates.
+;;     icicle-help-on-candidate(-symbol): Pass non-nil NO-ERROR-P arg to icicle-describe-file.
+;; 2012/09/17 dadams
+;;     icicle(-help-on)-(next|previous)-(prefix-|apropos-)candidate(-per-mode)((-alt)-action|-help):
+;;       NTH is prefix arg.  Plain C-u means use first candidate.
+;;     icicle-(next|previous)-line:
+;;       Move to (next|previous) line when CURR-COL is 1 (fixes bug for multi-line candidates).
+;; 2012/09/08 dadams
+;;     icicle-dispatch-M-_: Call icicle-toggle-ignored-space-prefix normally, not interactively.
+;;     icicle-help-string-completion: *-buffer-ignore-space-prefix-flag, not *-ignore-space-prefix*.
+;;     icicle-candidate-set-complement:
+;;       Ensure icicle-buffer-name-input-p to pass icicle-buffer-ignore-space-prefix-flag arg.
+;;     icicle-toggle-ignored-space-prefix: Removed optional arg BUFFER-INSTEAD-P.
+;;       It now toggles icicle-buffer-ignore-space-prefix-flag, not icicle-ignore-space-prefix-flag.
+;; 2012/09/06 dadams
+;;     Use icicle-string-match-p.
+;; 2012/09/03 dadams
+;;     icicle-history: Let first TAB or S-TAB cycle, depending on icicle-default-cycling-mode.
+;;       Put properties icicle(-prefix|-apropos)-completing-command on it.
+;;       Set icicle-last-completion-command per icicle-default-cycling-mode.  Use instead of apropos.
+;;       Do not set last-command to icicle-history.
+;; 2012/09/02 dadams
+;;     icicle-(prefix|apropos)-complete-1:
+;;       Non-nil icicle-show-Completions-initially-flag means consider this is the second (S-)TAB.
+;; 2012/08/27 dadams
+;;     icicle-make-directory:
+;;       Use (icicle-file-name-directory-w-default (icicle-input-from-minibuffer)) as default dir-name.
+;; 2012/08/21 dadams
+;;     icicle-resolve-file-name: Call tap-put-thing-at-point-props after load thingatpt+.el.
+;; 2012/08/18 dadams
+;;     icicle-resolve-file-name: Call tap-define-aliases-wo-prefix.
+;;     bounds-of-thing-at-point -> icicle-bounds-of-thing-at-point.
+;; 2012/08/14 dadams
+;;     icicle-abort-recursive-edit: Call 1on1-fit-minibuffer-frame.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-choose-completion, icicle-ORIG-exit-minibuffer,
+;;       icicle-ORIG-minibuffer-complete-and-exit, icicle-ORIG-mouse-choose-completion,
+;;       icicle-ORIG-next-history-element, icicle-ORIG-sit-for, icicle-ORIG-switch-to-completions.
+;; 2012/08/05 dadams
+;;     icicle-exit-minibuffer: If no faces to keep then remove all faces (they are Icicles faces).
+;; 2012/07/24 dadams
+;;     icicle-toggle-ignored-space-prefix: Added prefix arg, so you can toggle buffer option.
+;; 2012/07/21 dadams
+;;     icicle-help-on-candidate(-symbol): If available, use describe-buffer for buffers.
+;; 2012/07/17 dadams
+;;     Removed: icicle-maybe-byte-compile-after-load (macro),
+;;              icicle-byte-compile-eval-after-load-flag (option).
+;;     Removed all calls to icicle-maybe-byte-compile-after-load.
+;; 2012/07/14 dadams
+;;     icicle-mouse-candidate-action-1: Fix for Emacs 24.  Use code similar to i*-candidate-action-1:
+;;       Set icicle-last-input, not icicle-last-completion-candidate, to choice.
+;;       Update default-directory.  Remove candidate only if choice = icicle-last-completion-candidate.
+;;     icicle-(prefix|apropos)-complete-1: Do not use icicle-transform-sole-candidate.
+;; 2012/07/13 dadams
+;;     Added: icicle-toggle-network-drives-as-remote.
+;;     icicle-help-string-completion: Added icicle-toggle-network-drives-as-remote.
+;; 2012/07/12 dadams
+;;     icicle-help-string-completion: Better representation of option values.
+;; 2012/07/10 dadams
+;;     icicle-other-history: Updated doc - now available for any minibuffer input, not just completion.
+;; 2012/07/02 dadams
+;;     Moved here (since loaded first) from icicles-cmd2.el: icicle-byte-compile-eval-after-load-flag.
+;; 2012/06/29 dadams
+;;     icicle-current-sort-functions: Do not exclude if PRED is icicle-allowed-sort-predicate.
+;;     icicle-help-on-candidate-symbol: select-frame-set-input-focus after apropos-command regexp.
+;;     Removed #' from lambdas.
+;; 2012/06/27 dadams
+;;     icicle-retrieve-previous-input:
+;;       icicle-highlight-initial-whitespace and icicle-place-cursor.
+;;       Update icicle-current-raw-input unconditionally, so can continue to cycle.
+;; 2012/06/25 dadams
+;;     icicle-describe-file: Removed extra space in format line File Type.  Thx to Christopher Schmidt.
+;; 2012/06/24 dadams
+;;     icicle-previous-line: Hitting up key on 1st cand looped in vertical mode bc of extra \n at eob.
+;; 2012/06/17 dadams
+;;     icicle-narrow-candidates:
+;;       Use read-file-name with icicle-must-pass-after-match-predicate for all Emacs Versions.
+;;       Thx to Michael Heerdegen.  Use backquote+comma to eliminate free var in lambda.
+;; 2012/06/09 dadams
+;;     icicle-choose-completion, icicle-nb-of-cand-in-Completions-horiz, icicle-insert-dot,
+;;       icicle-switch-to-Completions-buf, icicle-current-completion-in-Completions,
+;;       icicle-move-to-next-completion:
+;;         Use point-min if 1- point is less.
+;;     icicle-move-to-next-completion:
+;;       Adjust use of icicle-show-Completions-help-flag.  Wrap when bobp.  When wrap to end, back up
+;;       over final space, which has no mouse-face, else previous-single-property-change DTWT.
+;;     icicle-previous-line: Handle new behavior of nil icicle-show-Completions-help-flag.
+;; 2012/06/08 dadams
+;;     Added macro icicle-maybe-byte-compile-after-load here too (for next).
+;;     icicle-yank-secondary: Use eval-after-load of second-sel.el instead of fboundp yank-secondary
+;;       (for arbitrary load order).  Added icicle-maybe-byte-compile-after-load.
+;; 2012/06/03 dadams
+;;     icicle-(next|previous)-(prefix|apropos)-candidate-action:
+;;       Put non-nil value on icicle-action-command, so M-x avoids key reminder for multi-command use.
 ;; 2012/05/22 dadams
 ;;     icicle-help-on-candidate(-symbol):
 ;;       Test with icicle-file-remote-p before file-exists-p, to avoid Tramp.
 ;;     icicle-help-string-completion: Updated to add icicle-toggle-completions-format.
 ;; 2012/01/20 dadams
 ;;     Renamed icicle-toggle-incremental-completion to icicle-cycle-incremental-completion.
-;;     icicle-apropos-complete-and-exit: 
+;;     icicle-apropos-complete-and-exit:
 ;;       Bind icicle-expand-input-to-common-match-flag and icicle-prefix-complete-and-exit-p also.
 ;;       Complete based on icicle-current-completion-mode, not just apropos.
 ;;       Use icicle-candidates-alist if appropriate.
  
 ;;;(@* "CHANGE LOG FOR `icicles-mode.el'")
 ;;
+;; 2013/02/28 dadams
+;;     icicle-(redefine|restore)-(standard-functions|std-completion-fns),
+;;       eval-after-load (comint|ess-site|gud|info|bbdb-com|dired-aux|dired-x|recentf|icicles-mode):
+;;         Use fset, not defalias.  Thx to Michael Heerdegen.
+;; 2013/02/16 dadams
+;;     icicle-mode: Removed list of commands from doc string - just refer to file headers.
+;; 2013/02/09 dadams
+;;     Moved autoload cookies for icicle-mode, icy-mode to icicles.el (with full doc string).
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies, except for icicle-mode, icy-mode.
+;; 2013/02/03 dadams
+;;     Renamed: *-(bind|restore)-custom-completion-keys to *-(bind|restore)-custom-minibuffer-keys.
+;;     icicle-(un)bind-isearch-keys: (Un)Bind keys of new option icicle-isearch-history-insert-keys.
+;;     icicle-define-minibuffer-maps:
+;;       Use icicle-(bind|restore)-custom-minibuffer-keys instead of individual define-keys.
+;;     icicle-(bind|restore)-custom-minibuffer-keys:
+;;       Added parameter OPTION, instead of just hard-coding icicle-completion-key-bindings.
+;; 2013/01/26 dadams
+;;     icicle-define-minibuffer-maps:
+;;       Bind icicle-multi-inputs-act (M-R), icicle-multi-inputs-save (M-S).
+;;       Add to menus: icicle-multi-inputs-act, icicle-multi-inputs-save, icicle-roundup.
+;;     icicle-bind-completion-keys:
+;;       Add to menus: icicle-multi-inputs-act, icicle-multi-inputs-save, icicle-roundup.
+;; 2013/01/04 dadams
+;;     icicle-define-minibuffer-maps: Undefine/restore M-s, M-r for minibuffer-local(-ns|-isearch)-map.
+;; 2012/12/31 dadams
+;;     Added: icicle-show-current-help-in-mode-line.
+;;     icicle-mode: Add/remove icicle-show-current-help-in-mode-line to/from icicle-post-command-hook.
+;;     icicle-minibuffer-setup: Initialize icicle-mode-line-help to nil.
+;; 2012/12/02 dadams
+;;     icicle-(redefine|restore)-std-completion-fns: Added icicle(-ORIG)-read-file-name-default.
+;; 2012/12/01 dadams
+;;     Added: icicle-bind-custom-completion-keys, icicle-restore-custom-completion-keys (factored out).
+;;     Removed load of icicles-mac.el (icicle-kbd is now a function in icicles-opt.el).
+;;     icicle-(bind|restore)-completion-keys: Use icicle-(bind|restore)-custom-completion-keys.
+;;     Escape semicolon (;) in icicle-kbd string args (just for Emacs 20 M-; in Lisp code).
+;; 2012/11/27 dadams
+;;     icicle-define-icicle-maps: Added icicle-apropos-value to icicle-apropos-menu-map.
+;; 2012/11/20 dadams
+;;     icicle-bind-completion-keys: Fixed typos for M-; and C-M-; introduced by M-; or C-M-q, Emacs 20.
+;; 2012/10/27 dadams
+;;     Handle new BBDB version also.
+;;     icicle-define-icicle-maps: Added icicle-toggle-annotation.
+;;     icicle-(bind|restore)-completion-keys: Bind icicle-toggle-annotation to C-x C-a.
+;;     icicle-mode: Added icicle-toggle-annotation to doc string.
+;; 2012/10/05 dadams
+;;     icicle-minibuffer-setup: Removed binding of icicle-default-directory (unused).
+;; 2012/10/01 dadams
+;;     icicle-define-icicle-maps: Protect dired-get-marked-files with condition-case.
+;; 2012/09/15 dadams
+;;     icicle-define-icicle-maps, icicle-(bind|restore)-other-keymap-keys:
+;;       Added icicle-visit-marked-file-of-content(-other-window).
+;; 2012/09/08 dadams
+;;     icicle-define-icicle-maps: *-buffer-ignore-space-prefix-flag, not *-ignore-space-prefix-flag.
+;;     icicle-(redefine|restore)-std-completion-fns: Added icicle(-ORIG)-read-buffer.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-bbdb-complete-name, icicle-ORIG-comint-dynamic-complete,
+;;       icicle-ORIG-comint-dynamic-complete-filename,
+;;       icicle-ORIG-comint-replace-by-expanded-filename,
+;;       icicle-ORIG-dired-read-shell-command, icicle-ORIG-ess-complete-object-name,
+;;       icicle-ORIG-gud-gdb-complete-command, icicle-ORIG-read-file-name,
+;;       icicle-ORIG-read-shell-command, icicle-ORIG-crm-local-completion-map,
+;;       icicle-ORIG-crm-local-must-match-map.
+;;     icicle-(redefine|restore)-standard-(functions|widgets|completion-fns):
+;;       Use new prefix, icicle-ORIG-, not old-.
+;;     icicle-(redefine|restore)-std-completion-fns:
+;;       Applied renaming to new: icicle-orig-read-file-name-fn.
+;;     Top level aliasing to save originals: Use new prefix, icicle-ORIG-, not old-.
+;; 2012/08/03 dadams
+;;     icicle-(un)bind-key-completion-keys-(for-map-var|in-keymaps-from): Added optional arg KEYS.
+;;     icicle-(bind|restore)-other-keymap-keys:
+;;       (Un-)bind icicle-key-complete-keys-for-minibuffer in minibuffer-local-map, for key completion.
+;; 2012/07/31 dadams
+;;     Added: icicle-(redefine|restore)-standard-widgets.
+;;     icicle-mode: Added call to icicle-(redefine|restore)-standard-widgets.
+;; 2012/07/13 dadams
+;;     icicle-(bind|restore)-completion-keys: Bind icicle-toggle-network-drives-as-remote to C-x :.
+;; 2012/07/10 dadams
+;;     icicle-define-minibuffer-maps, icicle-(bind|restore)-completion-keys:
+;;       Bind C-M-pause in all minibuffer maps, not just completion maps.
+;; 2012/07/08 dadams
+;;     Defalias old-comint-completion-at-point for Emacs 24+. Thx to Christopher Schmidt, M. Heerdegen.
+;; 2012/06/08 dadams
+;;     icicle-define-minibuffer-maps: fboundp of icicle-yank-secondary, not yank-secondary.
 ;; 2012/05/25 dadams
 ;;     Added icicle-dired-insert-as-subdir to menu icicle-dired-dir-menu-map.
 ;; 2012/05/15 dadams
  
 ;;;(@* "CHANGE LOG FOR `icicles-opt.el'")
 ;;
+;; 2013/03/18 dadams
+;;     icicle-top-level-key-bindings: Temporarily removed icicle-dabbrev-completion for Emacs 24+.
+;; 2013/02/26 dadams
+;;     Added (put 'icicle-kbd 'pure t).
+;; 2013/02/04 dadams
+;;     Removed all autoload cookies.
+;; 2013/02/04 dadams
+;;     Removed autoload cookies for icicle-(minibuffer|completion(-list))-key-bindings
+;; 2013/02/03 dadams
+;;     Added: icicle-completion-list-key-bindings, icicle-isearch-history-insert-keys,
+;;            icicle-minibuffer-key-bindings.
+;;     Removed: icicle-previous-candidate-keys.
+;;     icicle-apropos-complete-keys, icicle-search-from-isearch-keys: use backtab for Emacs 24+.
+;;     icicle-comint-dynamic-complete-replacements: Fixed :type - the first need not be a symbol.
+;;     Moved icicle-key-definition before first use, which is now icicle-completion-key-bindings.
+;;     icicle-(top-level|completion)-key-bindings: Fixed :type to be > Emacs 21, not > Emacs 20.
+;;     icicle-isearch-complete-keys: Removed M-o from the default value and adapted doc string.
+;; 2013/01/26 dadams
+;;     icicle-completion-key-bindings: Added M-r binding for icicle-roundup.
+;; 2013/01/18 dadams
+;;     No longer require icicles-face.el, since now need only hexrgb.el (see next).
+;;     icicle-region-background: Use hexrgb-increment*, not icicle-increment-*.
+;; 2012/12/21 dadams
+;;     Added: icicle-buffer-skip-hook, icicle-find-file-of-content-skip-hook.  Thx to C. Schmidt.
+;; 2012/12/20 dadams
+;;     Added: icicle-TAB/S-TAB-only-completes-flag.
+;; 2012/12/02 dadams
+;;     Removed autoload cookie from icicle-completion-key-bindings.
+;; 2012/12/01 dadams
+;;     Added: icicle-completion-key-bindings.
+;;     Moved here from icicles-mac.el: icicle-kbd, icicle-edmacro-parse-keys, icicle-read-kbd-macro.
+;;     icicle-kbd: Now a function, not a macro.
+;; 2012/11/28 dadams
+;;     Removed: icicle-transform-function - moved to icicles-var.el.
+;; 2012/11/27 dadams
+;;     icicle-default-in-prompt-format-function:
+;;       Removed ": " from default value.  Prepend instead of replace, now.
+;;     icicle-top-level-key-bindings: Added icicle-apropos-value.
+;; 2012/11/26 dadams
+;;     Added: icicle-default-in-prompt-format-function.
+;; 2012/11/21 dadams
+;;     icicle-image-files-in-Completions:
+;;       Do not test, here, whether display is graphic (for Emacs daemon).  Thx to Christopher Schmidt.
+;; 2012/11/18 dadams
+;;     icicle-default-value: Updated doc string to reflect adding def to prompt for value t.
+;; 2012/11/08 dadams
+;;     icicle-widgets-to-redefine: Predicate makes sure it is also a symbol.
+;; 2012/11/03 dadams
+;;     icicle-widgets-to-redefine: Fix to not include nil.
+;; 2012/11/02 dadams
+;;     icicle-widgets-to-redefine: Include color widget only if can load wid-edit+.el.
+;;     icicle-functions-to-redefine: Added bbdb-complete-mail.
+;; 2012/10/27 dadams
+;;     Added: icicle-show-annotations-flag.
+;; 2012/10/26 dadams
+;;     icicle-search-replace-whole-candidate-flag: Correct key in doc string: M-_, not C-,.
+;; 2012/10/21 dadams
+;;     Added: icicle-buffer-include-cached-files-nflag, icicle-buffer-include-recent-files-nflag.
+;; 2012/10/10 dadams
+;;     icicle-shell-command-candidates-cache:
+;;       Removed autoload cookie due to default value dependency.  Thx to Michael Heerdegen.
+;; 2012/10/05 dadams
+;;     Added: icicle-kill-visited-buffers-flag.
+;; 2012/10/02 dadams
+;;     icicle-list-join-string:
+;;       Make display prop cover whole string and display \n rather than just hide ^G part.
+;;       Important for cursor movement: join string acts like one char.
+;; 2012/09/08 dadams
+;;     Removed: icicle-ignore-space-prefix-flag.
+;;     icicle-buffer-ignore-space-prefix-flag: Updated doc to be self-contained.
+;; 2012/08/26 dadams
+;;     icicle-thing-at-point:
+;;       If SYNTAX-TABLE is nil, then do not use with-syntax-table.  Removed SYNTAX-TABLE args.
+;; 2012/08/21 dadams
+;;     Call tap-put-thing-at-point-props after load thingatpt+.el.
+;; 2012/08/18 dadams
+;;     Added: icicle-thing-at-point.
+;;     Invoke tap-define-aliases-wo-prefix if thingatpt+.el is loaded.
+;;     thing-at-point -> icicle-thing-at-point.
+;; 2012/08/06 dadams
+;;     icicle-functions-to-redefine: Updated doc string for new name prefix icicle-ORIG-.
+;; 2012/08/05 dadams
+;;     icicle-widgets-to-redefine: Added color to the default value.
+;; 2012/08/03 dadams
+;;     Added: icicle-key-complete-keys-for-minibuffer.
+;;     icicle-key-complete-keys: Updated default value, since Emacs bug #1281 was fixed.
+;; 2012/07/31 dadams
+;;     Added: icicle-widgets-to-redefine, icicle-widgetp.
+;; 2012/07/24 dadams
+;;     icicle-TAB-completion-methods-per-command: Fix bug when delete entries: set them to nil first.
+;;     icicle-buffer-ignore-space-prefix-flag: Updated doc string - C-u M-_ now toggles this.
+;; 2012/07/21 dadams
+;;     icicle-comint-dynamic-complete-replacements:
+;;       Added entry for pcomplete and comint/shell file-name completion.  Thx to C. Schmidt.
+;; 2012/07/16 dadams
+;;     icicle-comint-dynamic-complete-replacements:
+;;       Added (shell-command-completion 'icicle-shell-dynamic-complete-command).
+;; 2012/07/13 dadams
+;;     icicle-network-drive-means-remote-flag: Update doc string for toggle, C-x :.
+;; 2012/07/08 dadams
+;;     icicle-functions-to-redefine: Updated comint stuff for Emacs 24: comint-completion-at-point.
+;;       Thx to Christopher Schmidt and Michael Heerdegen.
+;; 2012/07/07 dadams
+;;     Added: icicle-Info-visited-max-candidates.
+;;     Added reminder about icicle-(increment|toggle)-option to doc strings for boolean|integer|number.
+;; 2012/07/05 dadams
+;;     Removed #' from lambdas.
+;; 2012/06/29 dadams
+;;     icicle-inhibit-advice-functions: Exclude commands that are not redefined in certain releases.
+;;     icicle-command-abbrev-alist: Added :tag strings.
+;; 2012/06/09 dadams
+;;     icicle-show-Completions-help-flag: Do not defvaralias it to completion-show-help.  Updated doc.
 ;; 2012/05/07 dadams
 ;;     Applied renaming of icicle-search-dired-marked to icicle-search-dired-marked-recursive.
 ;; 2012/04/03 dadams
 ;;     icicle-default-value: Updated doc wrt new behavior for icicle-read-from-minibuffer.
 ;; 2011/11/01 dadams
 ;;     icicle-top-level-key-bindings: Added: icicle-bookmark-(autonamed(-this-buffer)|autofile|
-;;                                                            bookmark-file|temporary)(-other-window). 
+;;                                                            bookmark-file|temporary)(-other-window).
 ;; 2011/10/10 dadams
 ;;     Removed use of icicle-kbd in option values, because byte-compile of defcustom does not eval.
 ;;     Removed eval-when-compile to load icicles-mac.
 ;;              icicle-region-bookmarks-flag, icicle-regions-name-length-max.
 ;; 2010/03/14 dadams
 ;;     Added: icicle-bookmark-refresh-cache-flag.
-;; 2010/03/13 sadams
+;; 2010/03/13 dadams
 ;;     Renamed icicle-add-buffer-name-flag to icicle-show-multi-completion-flag.  Doc string.
 ;; 2010/03/09 dadams
 ;;     icicle-color-themes: Initialize to ().  Do real init in cmd icicle-color-theme.
  
 ;;;(@* "CHANGE LOG FOR `icicles-var.el'")
 ;;
+;; 2013/03/23 dadams
+;;     Added: icicle-Info-tag-table-posn.
+;; 2013/03/07 dadams
+;;     Updated to use icicle-user-error where appropriate.
+;; 2013/02/16 dadams
+;;     icicle-general-help-string: Removed list of commands - just refer to file headers.
+;; 2013/02/03 dadams
+;;     icicle-general-help-string:
+;;       Updated for *-(minibuffer|completion(-list))-key-* (add), *-previous-candidate-keys (remove).
+;; 2013/01/26 dadams
+;;     Added: icicle-multi-inputs-action-fn.
+;; 2012/12/31 dadams
+;;     Added: icicle-mode-line-help.
+;; 2012/12/15 dadams
+;;     Added: icicle-cands-to-narrow, icicle-compute-narrowing-regexp-p, icicle-narrow-regexp.
+;; 2012/12/02 dadams
+;;     Added: icicle-read-file-name-internal-fn.
+;; 2012/12/01 dadams
+;;     Removed load of icicles-mac.el (icicle-kbd is now a function in icicles-opt.el).
+;; 2012/11/28 dadams
+;;     Added: icicle-transform-function - moved here from icicles-opt.el.
+;;     Removed: icicle-vardoc-last-initial-option-cand-set.
+;; 2012/11/26 dadams
+;;     Added: icicle-apropos-value-last-initial-cand-set.
+;; 2012/10/27 dadams
+;;     Added: icicle-toggle-transforming-message.  Updated icicle-general-help-string.
+;; 2012/10/22 dadams
+;;     Added: icicle-Info-index-cache.
+;; 2012/10/18 dadams
+;;     Added: icicle-path-variables.
+;;     Added: icicle-exclude-default-proxies.  (Used by *-directory-list to exclude non-file proxies.)
+;; 2012/10/09 dadams
+;;     Added: icicle-multi-completing-p.
+;; 2012/10/05 dadams
+;;     Removed: icicle-default-directory (unused).
+;; 2012/09/08 dadams
+;;     Added: icicle-buffer-name-input-p, icicle-buffer-complete-fn.
+;;     icicle-general-help-string: Removed reference to icicle-ignore-space-prefix-flag.
+;; 2012/08/06 dadams
+;;     Renamed: icicle-old-read-file-name-fn to icicle-orig-read-file-name-fn.
+;; 2012/07/07 dadams
+;;     Added: icicle-file-name-completion-table.  Thx to Michael Heerdegen.
+;; 2012/06/29 dadams
+;;     Added: icicle-allowed-sort-predicate.
+;; 2012/06/28 dadams
+;;     icicle-search-map: Bound icicle-grep-saved-file-candidates (M-s M-s g).
 ;; 2012/05/14 dadams
 ;;     icicle-candidate-help-fn: Updated doc string to mention transforming multi-completion cands.
 ;; 2012/05/07 dadams
  
 ;;;(@* "CHANGE LOG FOR `icicles.el'")
 ;;
+;; 2012/03/11 dadams
+;;     Font-lock keywords for emacs-lisp-mode, for all Emacs versions, 20-24.
+;; 2013/03/10 dadams
+;;     Font-lock keywords for emacs-lisp-mode:
+;;       Changed \\>[ \t'\(]*\\(\\sw+\\)? to \\>[ \t'\(]*\\(\\(\\sw\\|\\s_\\)+\\)?
+;;         (see Emacs bug #13755).
+;;     Added for font-lock and common-lisp-indent-function:
+;;       icicle-define(-search)-bookmark(-other-window)-command.
+;; 2013/03/07 dadams
+;;     Define font-lock-keywords for icicle-user-error.
+;; 2013/02/16 dadams
+;;     icicle-mode: Removed list of commands from autoload doc string - just refer to file headers.
+;; 2013/02/09 dadams
+;;     Added autoload cookies for icy-mode, icicle-mode, to provide full doc string for info.
+;; 2012/08/06 dadams
+;;     Renamed old-* to icicle-ORIG-*:
+;;       icicle-ORIG-bbdb-complete-name, icicle-ORIG-choose-completion,
+;;       icicle-ORIG-choose-completion-string, icicle-ORIG-color, icicle-ORIG-comint-dynamic-complete,
+;;       icicle-ORIG-comint-dynamic-complete-filename, icicle-ORIG-comint-replace-by-expanded-filename,
+;;       icicle-ORIG-completing-read, icicle-ORIG-completing-read-multiple,
+;;       icicle-ORIG-completion-setup-function, icicle-ORIG-crm-local-completion-map,
+;;       icicle-ORIG-crm-local-must-match-map, icicle-ORIG-dired-read-shell-command,
+;;       icicle-ORIG-dired-smart-shell-command, icicle-ORIG-display-completion-list,
+;;       icicle-ORIG-ess-complete-object-name, icicle-ORIG-exit-minibuffer,
+;;       icicle-ORIG-face-valid-attribute-values, icicle-ORIG-file,
+;;       icicle-ORIG-gud-gdb-complete-command, icicle-ORIG-minibuffer-complete-and-exit,
+;;       icicle-ORIG-minibuffer-default-add-completions, icicle-ORIG-mouse-choose-completion,
+;;       icicle-ORIG-next-history-element, icicle-ORIG-read-char-by-name, icicle-ORIG-read-color,
+;;       icicle-ORIG-read-face-name, icicle-ORIG-read-file-name, icicle-orig-read-file-name-fn,
+;;       icicle-ORIG-read-from-minibuffer, icicle-ORIG-read-number, icicle-ORIG-shell-command,
+;;       icicle-ORIG-read-shell-command, icicle-ORIG-read-string, icicle-ORIG-shell-command-on-region,
+;;       icicle-ORIG-sit-for, icicle-ORIG-switch-to-completions, icicle-ORIG-widget-color-complete.
+;; 2012/07/17 dadams
+;;     Removed: icicle-byte-compile-eval-after-load-flag.
 ;; 2012/02/28 dadams
 ;;     Removed eval-when-compile for Emacs < 20.
 ;; 2011/12/11 dadams
index 58033c9..afc421f 100644 (file)
@@ -4,26 +4,27 @@
 ;; Description: Top-level commands for Icicles
 ;; Author: Drew Adams
 ;; Maintainer: Drew Adams
-;; Copyright (C) 1996-2012, Drew Adams, all rights reserved.
+;; Copyright (C) 1996-2013, Drew Adams, all rights reserved.
 ;; Created: Mon Feb 27 09:25:04 2006
 ;; Version: 22.0
-;; Last-Updated: Mon May 28 06:55:31 2012 (-0700)
+;; Last-Updated: Sat Mar 23 19:27:56 2013 (-0700)
 ;;           By: dradams
-;;     Update #: 23800
-;; URL: http://www.emacswiki.org/cgi-bin/wiki/icicles-cmd1.el
+;;     Update #: 25658
+;; URL: http://www.emacswiki.org/icicles-cmd1.el
+;; Doc URL: http://www.emacswiki.org/Icicles
 ;; Keywords: extensions, help, abbrev, local, minibuffer,
 ;;           keys, apropos, completion, matching, regexp, command
-;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x
 ;;
 ;; Features that might be required by this library:
 ;;
 ;;   `apropos', `apropos-fn+var', `avoid', `cl', `cus-edit',
 ;;   `cus-face', `cus-load', `cus-start', `doremi', `easymenu',
 ;;   `el-swank-fuzzy', `ffap', `ffap-', `frame-cmds', `frame-fns',
-;;   `fuzzy', `fuzzy-match', `hexrgb', `icicles-face', `icicles-fn',
-;;   `icicles-mcmd', `icicles-opt', `icicles-var', `image-dired',
-;;   `kmacro', `levenshtein', `misc-fns', `mouse3', `mwheel',
-;;   `naked', `regexp-opt', `ring', `ring+', `second-sel', `strings',
+;;   `fuzzy', `fuzzy-match', `hexrgb', `icicles-fn', `icicles-mcmd',
+;;   `icicles-opt', `icicles-var', `image-dired', `kmacro',
+;;   `levenshtein', `misc-fns', `mouse3', `mwheel', `naked',
+;;   `regexp-opt', `ring', `ring+', `second-sel', `strings',
 ;;   `thingatpt', `thingatpt+', `wid-edit', `wid-edit+', `widget'.
 ;;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;  using Emacs 23.  Otherwise, Icicles key completion (and perhaps
 ;;  other things?) will not work correctly.
 ;;
+;;  Widgets defined here:
+;;
+;;    `icicle-file', `icicle-ORIG-file'.
+;;
 ;;  Commands defined here - (+) means a multi-command:
 ;;
 ;;    (+)`clear-option', (+)`icicle-add-buffer-candidate',
 ;;    `icicle-add-entry-to-saved-completion-set', `icicle-apropos',
 ;;    `icicle-apropos-command', `icicle-apropos-function',
 ;;    `icicle-apropos-option', (+)`icicle-apropos-options-of-type',
-;;    `icicle-apropos-variable',
+;;    (+)`icicle-apropos-value', `icicle-apropos-variable',
 ;;    (+)`icicle-apropos-vars-w-val-satisfying',
-;;    `icicle-apropos-zippy', `icicle-bbdb-complete-name',
-;;    (+)`icicle-bookmark', (+)`icicle-bookmark-all-tags',
+;;    `icicle-apropos-zippy', `icicle-bbdb-complete-mail',
+;;    `icicle-bbdb-complete-name', (+)`icicle-bookmark',
+;;    (+)`icicle-bookmark-all-tags',
 ;;    (+)`icicle-bookmark-all-tags-other-window',
 ;;    (+)`icicle-bookmark-all-tags-regexp',
 ;;    (+)`icicle-bookmark-all-tags-regexp-other-window',
 ;;    `icicle-bookmark-w3m-narrow',
 ;;    (+)`icicle-bookmark-w3m-other-window', (+)`icicle-buffer',
 ;;    (+)`icicle-buffer-config', (+)`icicle-buffer-list',
+;;    (+)`icicle-buffer-no-search',
+;;    (+)`icicle-buffer-no-search-other-window',
 ;;    (+)`icicle-buffer-other-window', `icicle-cd-for-abs-files',
 ;;    `icicle-cd-for-loc-files', (+)`icicle-clear-history',
 ;;    (+)`icicle-clear-current-history', (+)`icicle-color-theme',
 ;;    (+)`icicle-find-file-absolute-other-window',
 ;;    (+)`icicle-find-file-in-tags-table',
 ;;    (+)`icicle-find-file-in-tags-table-other-window',
+;;    (+)`icicle-find-file-of-content',
+;;    (+)`icicle-find-file-of-content-other-window',
 ;;    (+)`icicle-find-file-other-window',
+;;    (+)`icicle-find-file-no-search',
+;;    (+)`icicle-find-file-no-search-other-window',
 ;;    (+)`icicle-find-file-read-only',
 ;;    (+)`icicle-find-file-read-only-other-window',
 ;;    (+)`icicle-find-first-tag',
 ;;    (+)`icicle-locate-file-no-symlinks',
 ;;    (+)`icicle-locate-file-no-symlinks-other-window',
 ;;    (+)`icicle-locate-file-other-window',
-;;    (+)`icicle-locate-other-window',
+;;    (+)`icicle-locate-other-window', `icicle-ORIG-customize-face',
+;;    `icicle-ORIG-customize-face-other-window',
+;;    `icicle-ORIG-dabbrev-completion',
+;;    `icicle-ORIG-lisp-complete-symbol',
+;;    `icicle-ORIG-lisp-completion-at-point',
+;;    `icicle-ORIG-repeat-complex-command',
 ;;    (+)`icicle-other-window-or-frame', `icicle-pop-tag-mark',
 ;;    `icicle-pp-eval-expression', (+)`icicle-recent-file',
 ;;    (+)`icicle-recent-file-other-window',
 ;;    `icicle-shell-dynamic-complete-environment-variable',
 ;;    `icicle-shell-dynamic-complete-filename',
 ;;    (+)`icicle-string-list', (+)`icicle-toggle-option',
+;;    (+)`icicle-visit-marked-file-of-content',
+;;    (+)`icicle-visit-marked-file-of-content-other-window',
+;;    `icicle-widget-file-complete',
 ;;    (+)`icicle-yank-maybe-completing',
 ;;    (+)`icicle-yank-pop-commands', `icicle-zap-to-char',
 ;;    (+)`toggle'.
 ;;    `icicle-bookmark-bind-narrow-commands',
 ;;    `icicle-bookmark-cleanup', `icicle-bookmark-cleanup-on-quit',
 ;;    `icicle-bookmark-delete-action', `icicle-bookmark-help-string',
-;;    `icicle-bookmark-jump-1', `icicle-buffer-name-prompt',
-;;    `icicle-clear-history-1', `icicle-clear-history-entry',
+;;    `icicle-bookmark-jump-1',
+;;    `icicle-buffer-apropos-complete-match',
+;;    `icicle-buffer-cand-help', `icicle-buffer-multi-complete',
+;;    `icicle-buffer-name-prompt',
+;;    `icicle-cached-files-without-buffers', `icicle-clear-history-1',
+;;    `icicle-clear-history-entry',
+;;    `icicle-comint-completion-at-point',
 ;;    `icicle-comint-dynamic-complete-as-filename',
 ;;    `icicle-comint-dynamic-simple-complete',
 ;;    `icicle-comint-replace-orig-completion-fns',
 ;;    `icicle-delete-file-or-directory', `icicle-describe-opt-action',
 ;;    `icicle-describe-opt-of-type-complete',
 ;;    `icicle-execute-extended-command-1', `icicle-explore',
+;;    `icicle-file-of-content-apropos-complete-match',
 ;;    `icicle-find-first-tag-action',
 ;;    `icicle-find-first-tag-other-window-action',
 ;;    `icicle-find-tag-action', `icicle-find-tag-define-candidates',
 ;;    `icicle-bookmark-propertize-candidate',
 ;;    `icicle-pp-display-expression',
 ;;    `icicle-read-args-w-val-satisfying',
+;;    `icicle-recent-files-without-buffers.',
 ;;    `icicle-remove-buffer-candidate-action',
 ;;    `icicle-remove-buffer-config-action',
 ;;    `icicle-remove-from-recentf-candidate-action',
 ;;
 ;;; Code:
 
-(eval-when-compile (require 'cl)) ;; pushnew
+(eval-when-compile (require 'cl)) ;; lexical-let[*], pushnew
                                   ;; plus, for Emacs < 21: dolist, push
 (eval-when-compile (when (>= emacs-major-version 21) (require 'recentf))) ;; recentf-mode
 (require 'apropos-fn+var nil t) ;; (no error if not found):
          (load-library "icicles-mac")   ; Use load-library to ensure latest .elc.
        (error nil))
      (require 'icicles-mac)))           ; Require, so can load separately if not on `load-path'.
-  ;; icicle-assoc-delete-all, icicle-bind-file-candidate-keys, icicle-(buffer|file)-bindings,
-  ;; icicle-condition-case-no-debug, icicle-define-bookmark(-other-window)-command, icicle-kbd, 
-  ;; icicle-define(-file)-command, icicle-define-add-to-alist-command, icicle-unbind-file-candidate-keys
+  ;; icicle-assoc-delete-all, icicle-(buffer|file)-bindings, icicle-condition-case-no-debug,
+  ;; icicle-define-bookmark(-other-window)-command, icicle-define(-file)-command,
+  ;; icicle-define-add-to-alist-command
 (require 'icicles-mcmd)
   ;; icicle-bind-buffer-candidate-keys, icicle-bind-file-candidate-keys, icicle-unbind-buffer-candidate-keys,
   ;; icicle-unbind-file-candidate-keys, icicle-yank
   ;; icicle-add-proxy-candidates-flag, 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-color-themes, icicle-saved-completion-sets,
+  ;; icicle-buffer-sort, icicle-color-themes, icicle-kbd, icicle-saved-completion-sets,
   ;; icicle-sort-comparer, icicle-transform-function
 (require 'icicles-var)                  ; (This is required anyway by `icicles-fn.el'.)
   ;; icicle-abs-file-candidates, icicle-all-candidates-list-action-fn,
   ;; icicle-face-name-history, icicle-frame-alist, icicle-frame-name-history, icicle-full-cand-fn,
   ;; icicle-function-name-history, icicle-get-alist-candidate-function, icicle-hist-var,
   ;; icicle-incremental-completion-p, icicle-inhibit-sort-p, icicle-inhibit-try-switch-buffer,
-  ;; icicle-kill-history, icicle-kmacro-alist, icicle-kmacro-history,icicle-list-use-nth-parts, 
+  ;; icicle-kill-history, icicle-kmacro-alist, icicle-kmacro-history,icicle-list-use-nth-parts,
   ;; icicle-must-match-regexp, icicle-must-not-match-regexp, icicle-must-pass-after-match-predicate,
   ;; icicle-new-last-cmd, icicle-orig-buff, icicle-orig-must-pass-after-match-pred,
   ;; icicle-orig-pt-explore, icicle-orig-window, icicle-orig-win-explore, icicle-pref-arg,
   ;; icicle-transform-before-sort-p, icicle-use-candidates-only-once-alt-p,
   ;; icicle-whole-candidate-as-text-prop-p, icicle-variable-name-history
 (require 'icicles-fn)                   ; (This is required anyway by `icicles-mcmd.el'.)
-  ;; icicle-delete-dups, icicle-highlight-lighter, icicle-read-from-minibuf-nil-default
-
+  ;; icicle-delete-dups, icicle-highlight-lighter, icicle-multi-comp-apropos-complete-match,
+  ;; icicle-read-from-minibuf-nil-default, icicle-string-match-p
 
 
 ;; Byte-compiling this file, you will likely get some byte-compiler warning messages.
   (defvar eval-expression-debug-on-error))
 
 (when (< emacs-major-version 22)
+  (defvar history-delete-duplicates)
   (defvar icicle-kmacro-alist)          ; In `icicles-var.el'
   (defvar kmacro-ring)                  ; In `kmacro.el'
   (defvar read-file-name-completion-ignore-case) ;  In `minibuffer.el'
 (when (< emacs-major-version 23)
   (defvar read-buffer-completion-ignore-case))
 
+(when (< emacs-major-version 24)
+  (defvar minibuffer-local-filename-syntax))
+
 (defvar apropos-do-all)                 ; In `apropos.el'
+(defvar bbdb-complete-mail-allow-cycling) ; In `bbdb-com.el'
 (defvar bbdb-complete-name-allow-cycling) ; In `bbdb-com.el'
+(defvar bbdb-completion-list)           ; In `bbdb-come.el'
 (defvar bbdb-extract-address-components-func) ; In `bbdb-com.el'
 (defvar bbdb-expand-mail-aliases)       ; In `bbdb-com.el'
 (defvar bbdb-complete-name-hooks)       ; In `bbdb-com.el'
 (defvar bbdb-completion-display-record) ; In `bbdb.el'
 (defvar bbdb-completion-type)           ; In `bbdb.el'
 (defvar bbdb-hashtable)                 ; In `bbdb.el'
-(defvar bmkp-bookmark-name-length-max)  ; In `bookmark+-1.el'
+(defvar bbdb-version)                   ; In `bbdb.el'
 (defvar bmkp-non-file-filename)         ; In `bookmark+-1.el'
 (defvar bmkp-prompt-for-tags-flag)      ; In `bookmark+-1.el'
 (defvar bmkp-sorted-alist)              ; In `bookmark+-1.el'
-(defvar bookmark-current-point)         ; In `bookmark.el' for Emacs < 
+(defvar bookmark-current-point)         ; In `bookmark.el' for Emacs <
 (defvar color-theme)                    ; In `color-theme.el'
 (defvar color-themes)                   ; In `color-theme.el'
 (defvar color-theme-initialized)        ; In `color-theme.el'
 (defvar cookie-cache)
+(defvar dabbrev--last-obarray)          ; In `dabbrev.el' for Emacs < 24
+(defvar dabbrev--last-completion-buffer) ; In `dabbrev.el' for Emacs < 24
 (defvar ess-current-process-name)       ; In `ess-inf.el'
 (defvar ess-mode-syntax-table)          ; In `ess-cust.el'
 (defvar ess-use-R-completion)           ; In `ess-cust.el'
+(defvar existing-bufs)                  ; `icicle-visit-marked-file-of-content', `icicle-find-file-of-content'
+(defvar file-cache-alist)               ; In `filecache.el'
 (defvar filesets-data)                  ; In `filesets.el'
 (defvar find-tag-default-function)      ; In `etags.el'
 (defvar find-tag-marker-ring)           ; In `etags.el'
 (defvar goto-tag-location-function)     ; In `etags.el'
+(defvar icicle-buffer-easy-files)       ; Here
 (defvar icicle-clear-history-hist)      ; In `icicle-clear-history-1',`icicle-clear-current-history'
+(defvar icicle--last-toggle-transforming-msg) ; Here
 (defvar icicle-window-alist)            ; In `icicle-select-window'
 (defvar locate-make-command-line)       ; In `locate.el'
 (defvar proced-signal-list)             ; In `proced.el' (Emacs 23+)
 (defvar shell-completion-execonly)      ; In `shell.el'
 (defvar snarf-tag-function)             ; In `etags.el'
-(defvar translation-table-for-input)    ; Built-in, Emacs 21+.
-(defvar w3m-current-title)              ; In `w3m.el'.
+(defvar translation-table-for-input)    ; Built-in, Emacs 21+
+(defvar w3m-current-title)              ; In `w3m.el'
 (defvar yow-after-load-message)
 (defvar yow-file)
 (defvar yow-load-message)
 ;;    and `eval-expression-debug-on-error'.
 ;; 5. Adjusted to work in different Emacs releases.
 ;;
-;;;###autoload (autoload 'icicle-pp-eval-expression "icicles")
 (defun icicle-pp-eval-expression (expression ; Bound to `M-:' in Icicle mode.
                                   &optional insert-value)
   "Evaluate Emacs-Lisp sexp EXPRESSION, and pretty-print its value.
@@ -581,21 +619,25 @@ customize option `icicle-top-level-key-bindings'."
       ;; propagate that change to the global binding.
       (unless (eq old-value new-value)
         (setq debug-on-error  new-value))))
-  (let ((print-length  icicle-pp-eval-expression-print-length)
-        (print-level   icicle-pp-eval-expression-print-level))
+  (let ((print-length     icicle-pp-eval-expression-print-length)
+        (print-level      icicle-pp-eval-expression-print-level)
+        (deactivate-mark  nil))
     (cond (insert-value
            (message "Evaluating...done.  Value inserted.")
            (setq insert-value  (prefix-numeric-value insert-value))
-           (if (or (not (stringp (car values))) (wholenump insert-value))
+           (if (or (not (stringp (car values)))  (wholenump insert-value))
                (pp (car values) (current-buffer))
              (princ (car values) (current-buffer))))
           (t (icicle-pp-display-expression (car values) "*Pp Eval Output*")))))
 
 
 ;; REPLACE ORIGINAL in `pp.el':
+;;
 ;; 1. Use no `emacs-lisp-mode-hook' or `change-major-mode-hook'.
 ;; 2. Call `font-lock-fontify-buffer'.
 ;;
+;; Same as `pp-display-expression' definition in `pp+.el'.
+;;
 (defun icicle-pp-display-expression (expression out-buffer-name)
   "Prettify and show EXPRESSION in a way appropriate to its length.
 If a temporary buffer is needed for representation, it is named
@@ -605,24 +647,24 @@ OUT-BUFFER-NAME."
          ;; This function either decides not to display it at all
          ;; or displays it in the usual way.
          (temp-buffer-show-function
-          #'(lambda (buf)
-              (with-current-buffer buf
-                (goto-char (point-min))
-                (end-of-line 1)
-                (if (or (< (1+ (point)) (point-max))
-                        (>= (- (point) (point-min)) (frame-width)))
-                    (let ((temp-buffer-show-function  old-show-function)
-                          (old-selected               (selected-window))
-                          (window                     (display-buffer buf)))
-                      (goto-char (point-min)) ; expected by some hooks ...
-                      (make-frame-visible (window-frame window))
-                      (unwind-protect
-                           (progn (select-window window)
-                                  (run-hooks 'temp-buffer-show-hook))
-                        (select-window old-selected)
-                        (message "Evaluating...done.  See buffer `%s'."
-                                 out-buffer-name)))
-                  (message "%s" (buffer-substring (point-min) (point))))))))
+          `(lambda (buf)
+            (with-current-buffer buf
+              (goto-char (point-min))
+              (end-of-line 1)
+              (if (or (< (1+ (point)) (point-max))
+                      (>= (- (point) (point-min)) (frame-width)))
+                  (let ((temp-buffer-show-function  ',old-show-function)
+                        (old-selected               (selected-window))
+                        (window                     (display-buffer buf)))
+                    (goto-char (point-min)) ; expected by some hooks ...
+                    (make-frame-visible (window-frame window))
+                    (unwind-protect
+                         (progn (select-window window)
+                                (run-hooks 'temp-buffer-show-hook))
+                      (when (window-live-p old-selected) (select-window old-selected))
+                      (message "Evaluating...done.  See buffer `%s'."
+                               out-buffer-name)))
+                (message "%s" (buffer-substring (point-min) (point))))))))
     (with-output-to-temp-buffer out-buffer-name
       (pp expression)
       (with-current-buffer standard-output
@@ -644,7 +686,6 @@ OUT-BUFFER-NAME."
   (dired-run-shell-command
    (dired-shell-stuff-it (icicle-read-shell-command (format "! on `%s': " file)) (list file) nil)))
 
-;;;###autoload (autoload 'icicle-recompute-shell-command-candidates "icicles")
 (defun icicle-recompute-shell-command-candidates (&optional savep)
   "Update option `icicle-shell-command-candidates-cache'.
 Recompute the available shell commands using your search path.
@@ -663,82 +704,102 @@ the cache is updated when you next use it, but it is not saved."
   icicle-shell-command-candidates-cache)
 
 
+;; REPLACE ORIGINAL `comint-completion-at-point' defined in `comint.el',
+;; saving it for restoration when you toggle `icicle-mode'.
+;;
+(when (> emacs-major-version 23)
+  (defalias 'icicle-comint-completion-at-point 'icicle-comint-dynamic-complete))
+
+
 ;; REPLACE ORIGINAL `comint-dynamic-complete' defined in `comint.el',
 ;; saving it for restoration when you toggle `icicle-mode'.
 ;;
-;; Uses Icicles completion when there are multiple candidates.
+;; Use Icicles completion when there are multiple candidates.
 ;;
-;;;###autoload (autoload 'icicle-comint-dynamic-complete "icicles")
 (defun icicle-comint-dynamic-complete () ; Bound to `TAB' in Comint (and Shell) mode.
   "Dynamically perform completion at point.
 Calls the functions in `comint-dynamic-complete-functions', but with
 Icicles functions substituted, to perform completion until a function
-returns non-nil, at which point completion is assumed to have
-occurred.
-
-Uses Icicles completion."
+returns non-nil.  Return that value."
   (interactive)
   ;; Need a symbol for `run-hook-with-args-until-success', so bind one.
   (let ((hook  (icicle-comint-replace-orig-completion-fns)))
     (run-hook-with-args-until-success 'hook)))
 
 (defun icicle-comint-replace-orig-completion-fns ()
-  "Return `comint-dynamic-complete-functions', but with Icicles functions."
-  (let ((old  comint-dynamic-complete-functions)
-        (new  ())
-        pair)
-    (dolist (fn  old)
-      (if (setq pair  (assoc fn icicle-comint-dynamic-complete-replacements))
-          (push (eval (cadr pair)) new)
-        (push fn new)))
-    (nreverse new)))
-
-;;;###autoload (autoload 'icicle-comint-dynamic-complete-filename "icicles")
-(defun icicle-comint-dynamic-complete-filename ()
-  "Dynamically complete the filename at point.
-Completes if after a filename.  See `comint-match-partial-filename' and
-`icicle-comint-dynamic-complete-as-filename'.
-This function is similar to `comint-replace-by-expanded-filename', except that
-it won't change parts of the filename already entered in the buffer; it just
-adds completion characters to the end of the filename.  A completions listing
-may be shown in a help buffer if completion is ambiguous.
+  "Return `comint-dynamic-complete-functions', but with Icicles functions.
+Get the Icicles functions from option
+`icicle-comint-dynamic-complete-replacements'.
+
+Only one (the first matching) replacement is made for any function."
+  (let ((result        ())
+       (replacements  (copy-sequence icicle-comint-dynamic-complete-replacements)))
+    (dolist (fn  comint-dynamic-complete-functions)
+      (catch 'c-d-c-f-replacements-loop
+       (dolist (rep  replacements)
+         (when (or (eq (car rep) fn)
+                   (and (listp (car rep))  (memq fn (car rep))))
+           (push (eval (cadr rep)) result)
+           (unless (eq (car rep) fn)  (push fn result))
+           (setq replacements  (delete rep replacements)) ; For ((a b c) 'NEW), put NEW in front of only one.
+           (throw 'c-d-c-f-replacements-loop nil))) ; Allow only one replacement.
+       (push fn result)))
+    (nreverse result)))
+
+(defun icicle-comint-dynamic-complete-filename (&optional replace-to-eol-p)
+  "Dynamically complete the file name before point, using Icicles completion.
+Similar to `comint-replace-by-expanded-filename', except that this
+does not change parts of the file name already in the buffer before
+point.  It just appends completion characters at point.
+
+Return t if successful, nil otherwise.
+
+With a prefix arg, replace the rest of the line after point with the
+completion choice.  Otherwise, replace only the filename-matching text
+before point.
 
 Completion is dependent on the value of `comint-completion-addsuffix',
-`comint-completion-recexact' and `comint-completion-fignore', and the timing of
-completions listing is dependent on the value of `comint-completion-autolist'.
-
-Returns t if successful.
-
-Uses Icicles completion."
-  (interactive)
+`comint-completion-recexact' and `comint-completion-fignore', and the
+timing of completions listing is dependent on the value of
+`comint-completion-autolist'.  See also
+`comint-match-partial-filename' and
+`icicle-comint-dynamic-complete-as-filename'."
+  (interactive "P")
+  (require 'comint)
   (when (comint-match-partial-filename)
     (unless (window-minibuffer-p (selected-window)) (message "Completing file name..."))
-    (icicle-comint-dynamic-complete-as-filename)))
+    (icicle-comint-dynamic-complete-as-filename replace-to-eol-p)))
 
-(defun icicle-comint-dynamic-complete-as-filename ()
+(defun icicle-comint-dynamic-complete-as-filename (&optional replace-to-eol-p)
   "Dynamically complete at point as a filename.
-See `icicle-comint-dynamic-complete-filename'.
-Returns t if successful."
-  (let* ((completion-ignore-case         (if (boundp 'read-file-name-completion-ignore-case)
-                                             read-file-name-completion-ignore-case
-                                           (memq system-type '(ms-dos windows-nt cygwin))))
-         (completion-ignored-extensions  comint-completion-fignore)
-         (minibuffer-p                   (window-minibuffer-p (selected-window)))
-         (success                        t)
-         (dirsuffix                      (cond ((not comint-completion-addsuffix)         "")
-                                               ((not (consp comint-completion-addsuffix)) "/")
-                                               (t  (car comint-completion-addsuffix))))
-         (filesuffix                     (cond ((not comint-completion-addsuffix)         "")
-                                               ((not (consp comint-completion-addsuffix)) " ")
-                                               (t  (cdr comint-completion-addsuffix))))
-         (filename                       (comint-match-partial-filename))
-         (filename-beg                   (if filename (match-beginning 0) (point)))
-         (filename-end                   (if filename (match-end 0) (point)))
-         (filename                       (or filename ""))
-         (filedir                        (file-name-directory filename))
-         (filenondir                     (file-name-nondirectory filename))
-         (directory                      (if filedir (comint-directory filedir) default-directory))
-         (completion                     (file-name-completion filenondir directory)))
+Optional arg REPLACE-TO-EOL-P non-nil means replace the rest of the
+line after point with the completion choice.
+Return t if successful.
+See `icicle-comint-dynamic-complete-filename'."
+  (lexical-let* ((completion-ignore-case         (if (boundp 'read-file-name-completion-ignore-case)
+                                                     read-file-name-completion-ignore-case
+                                                   (memq system-type '(ms-dos windows-nt cygwin))))
+                 (completion-ignored-extensions  comint-completion-fignore)
+                 (minibuffer-p                   (window-minibuffer-p (selected-window)))
+                 (success                        t)
+                 (dirsuffix                      (cond ((not comint-completion-addsuffix)         "")
+                                                       ((not (consp comint-completion-addsuffix)) "/")
+                                                       (t  (car comint-completion-addsuffix))))
+                 (filesuffix                     (cond ((not comint-completion-addsuffix)         "")
+                                                       ((not (consp comint-completion-addsuffix)) " ")
+                                                       (t  (cdr comint-completion-addsuffix))))
+                 (filename                       (comint-match-partial-filename))
+                 (filename-beg                   (if filename (match-beginning 0) (point)))
+                 (filename-end                   (if filename
+                                                     (if replace-to-eol-p
+                                                         (line-end-position)
+                                                       (match-end 0))
+                                                   (point)))
+                 (filename                       (or filename  ""))
+                 (filedir                        (file-name-directory filename))
+                 (filenondir                     (file-name-nondirectory filename))
+                 (directory                      (if filedir (comint-directory filedir) default-directory))
+                 (completion                     (file-name-completion filenondir directory)))
     (cond ((null completion)
            (if minibuffer-p
                (minibuffer-message (format " [No completions of `%s']" filename))
@@ -755,10 +816,11 @@ Returns t if successful."
                       (choice
                        (save-excursion
                          (save-window-excursion (read-file-name "Complete: " directory nil t)))))
-                 (when (and choice (not (string= choice directory)))
+                 (when (and choice  (not (string= choice directory)))
                    (insert (comint-quote-filename
-                            (file-name-nondirectory (directory-file-name choice))))
-                   (insert (if (file-directory-p choice) dirsuffix filesuffix))))
+                            (directory-file-name (file-relative-name choice directory))))
+                   (insert (if (file-directory-p choice) dirsuffix filesuffix))
+                   (when replace-to-eol-p (delete-region (point) (line-end-position)))))
              (error nil)))
           (t                            ; COMPLETION is the common prefix string.
            (let ((file            (concat (file-name-as-directory directory) completion))
@@ -772,7 +834,7 @@ Returns t if successful."
                     ;; We inserted a unique completion.  Add suffix.
                     (insert (if (file-directory-p file) dirsuffix filesuffix))
                     (unless minibuffer-p (message "Completed")))
-                   ((and comint-completion-recexact comint-completion-addsuffix
+                   ((and comint-completion-recexact  comint-completion-addsuffix
                          (string-equal filenondir completion)
                          (or (icicle-file-remote-p file) ; Don't let Tramp try to access it.
                              (file-exists-p file)))
@@ -780,7 +842,7 @@ Returns t if successful."
                     (insert (if (file-directory-p file) dirsuffix filesuffix))
                     (unless minibuffer-p (message "Completed shortest")))
                    ;; It's not unique.  Let user choose a completion.
-                   ((or comint-completion-autolist (string-equal filenondir completion))
+                   ((or comint-completion-autolist  (string-equal filenondir completion))
                     (icicle-condition-case-no-debug nil
                         (let* ((icicle-show-Completions-initially-flag      t)
                                (icicle-incremental-completion-p             'display)
@@ -791,17 +853,16 @@ Returns t if successful."
                                     (read-file-name
                                      "Complete: " directory completion nil completion
                                      (and (> emacs-major-version 21)
-                                          #'(lambda (f) (string-match completion f))))))))
+                                          (lambda (f) (string-match completion f)))))))) ; FREE: COMPLETION.
                           (when choice
                             (delete-backward-char (length completion))
                             (insert (comint-quote-filename
-                                     (file-name-nondirectory (directory-file-name choice))))
+                                     (directory-file-name (file-relative-name choice directory))))
                             (insert (if (file-directory-p choice) dirsuffix filesuffix))))
                       (error nil)))
                    (t (unless minibuffer-p (message "Partially completed")))))))
     success))
 
-;;;###autoload (autoload 'icicle-shell-dynamic-complete-command "icicles")
 (defun icicle-shell-dynamic-complete-command ()
   "Dynamically complete the command at point.
 Similar to `icicle-comint-dynamic-complete-filename', but this
@@ -829,53 +890,56 @@ Uses Icicles completion."
   "Dynamically complete text at point as a command.
 See `icicle-shell-dynamic-complete-filename'.
 Return t if successful."
-  (let* ((filename       (or (comint-match-partial-filename) ""))
+  (let* ((filename       (or (comint-match-partial-filename)  ""))
          (filenondir     (file-name-nondirectory filename))
          (path-dirs      (cdr (reverse exec-path)))
          (cwd            (file-name-as-directory (expand-file-name default-directory)))
          (ignored-extensions
           (and comint-completion-fignore
-               (mapconcat #'(lambda (x) (concat (regexp-quote x) "$"))
-                          comint-completion-fignore "\\|")))
+               (mapconcat (lambda (x) (concat (regexp-quote x) "$"))  comint-completion-fignore "\\|")))
          (dir            "")
          (comps-in-dir   ())
          (file           "")
          (abs-file-name  "")
          (completions    ()))
     (while path-dirs                    ; Go thru each dir in the search path, finding completions.
-      (setq dir           (file-name-as-directory (comint-directory (or (car path-dirs) ".")))
+      (setq dir           (file-name-as-directory (comint-directory (or (car path-dirs)  ".")))
             comps-in-dir  (and (file-accessible-directory-p dir)
                                (file-name-all-completions filenondir dir)))
       (while comps-in-dir               ; Go thru each completion, to see whether it should be used.
         (setq file           (car comps-in-dir)
               abs-file-name  (concat dir file))
         (when (and (not (member file completions))
-                   (not (and ignored-extensions (string-match ignored-extensions file)))
-                   (or (string-equal dir cwd) (not (file-directory-p abs-file-name)))
-                   (or (null shell-completion-execonly) (file-executable-p abs-file-name)))
+                   (not (and ignored-extensions  (string-match ignored-extensions file)))
+                   (or (string-equal dir cwd)  (not (file-directory-p abs-file-name)))
+                   (or (null shell-completion-execonly)  (file-executable-p abs-file-name)))
           (setq completions  (cons file completions)))
         (setq comps-in-dir  (cdr comps-in-dir)))
       (setq path-dirs  (cdr path-dirs)))
     (let ((success  (let ((comint-completion-addsuffix  nil)
                           (icicle-candidate-help-fn
-                           #'(lambda (cand)
-                               (shell-command (concat "apropos " (shell-quote-argument cand))
-                                              "*Help*"))))
+                           (lambda (cand)
+                             (with-output-to-temp-buffer "*Help*"
+                               (princ (shell-command-to-string (concat "apropos "
+                                                                       (shell-quote-argument cand))))))))
                       (icicle-comint-dynamic-simple-complete filenondir completions))))
-      (when (and (memq success '(sole shortest)) comint-completion-addsuffix
+      (when (and (memq success '(sole shortest))  comint-completion-addsuffix
                  (not (file-directory-p (comint-match-partial-filename))))
         (insert " "))
       success)))
 
-;;;###autoload (autoload 'icicle-comint-replace-by-expanded-filename "icicles")
-(defun icicle-comint-replace-by-expanded-filename ()
-  "`comint-replace-by-expanded-filename', but uses Icicles completion.
-Dynamically complete, expand, and canonicalize the filename at point."
-  (interactive)
+(defun icicle-comint-replace-by-expanded-filename (&optional replace-to-eol-p)
+  "Dynamically complete, expand, and canonicalize the filename at point.
+With a prefix arg, replace everthing past point on the current line.
+Otherwise, replace only the filename-matching text before point.
+
+Like vanilla `comint-replace-by-expanded-filename', but uses Icicles
+completion."
+  (interactive "P")
   (let ((filename  (comint-match-partial-filename)))
     (when filename
       (replace-match (expand-file-name filename) t t)
-      (icicle-comint-dynamic-complete-filename))))
+      (icicle-comint-dynamic-complete-filename replace-to-eol-p))))
 
 (defun icicle-comint-dynamic-simple-complete (stub candidates)
   "Dynamically complete STUB from CANDIDATES list.
@@ -914,13 +978,13 @@ See also `icicle-comint-dynamic-complete-filename'."
            (let ((completion  (try-completion stub candidates)))
              ;; Insert the longest substring.
              (insert (substring completion (length stub)))
-             (cond ((and comint-completion-recexact comint-completion-addsuffix
+             (cond ((and comint-completion-recexact  comint-completion-addsuffix
                          (string-equal stub completion)
                          (member completion completions))
                     (insert suffix)     ; User wants shortest match.
                     (unless minibuffer-p (message "Completed shortest"))
                     'shortest)
-                   ((or comint-completion-autolist (string-equal stub completion))
+                   ((or comint-completion-autolist  (string-equal stub completion))
                     (icicle-condition-case-no-debug nil ;  Let user choose a completion.
                         (let* ((icicle-show-Completions-initially-flag      t)
                                (icicle-incremental-completion-p             'display)
@@ -937,7 +1001,6 @@ See also `icicle-comint-dynamic-complete-filename'."
                     (unless minibuffer-p (message "Partially completed"))
                     'partial)))))))
 
-;;;###autoload (autoload 'icicle-shell-dynamic-complete-filename "icicles")
 (defun icicle-shell-dynamic-complete-filename ()
   "Dynamically complete the filename at point.
 Completes only if point is at a suitable position for a filename
@@ -950,13 +1013,12 @@ argument."
             (re-search-forward "[^ \t][ \t]" opoint t))
       (icicle-comint-dynamic-complete-as-filename))))
 
-;;;###autoload (autoload 'icicle-shell-dynamic-complete-environment-variable "icicles")
 (defun icicle-shell-dynamic-complete-environment-variable ()
   "`shell-dynamic-complete-environment-variable' but uses Icicles completion."
   (interactive)
   (require 'shell)
   (let ((variable  (shell-match-partial-variable)))
-    (if (and variable (string-match "^\\$" variable))
+    (if (and variable  (string-match "^\\$" variable))
         (prog2 (unless (window-minibuffer-p (selected-window))
                  (message "Completing variable name..."))
             (icicle-shell-dynamic-complete-as-environment-variable)))))
@@ -964,9 +1026,9 @@ argument."
 (defun icicle-shell-dynamic-complete-as-environment-variable ()
   "`shell-dynamic-complete-as-environment-variable' but uses Icicles completion."
   (require 'shell)
-  (let* ((var                          (or (shell-match-partial-variable) ""))
-         (variable                     (substring var (or (string-match "[^$({]\\|$" var) 0)))
-         (variables                    (mapcar #'(lambda (x) (substring x 0 (string-match "=" x)))
+  (let* ((var                          (or (shell-match-partial-variable)  ""))
+         (variable                     (substring var (or (string-match "[^$({]\\|$" var)  0)))
+         (variables                    (mapcar (lambda (x) (substring x 0 (string-match "=" x)))
                                                process-environment))
          (addsuffix                    comint-completion-addsuffix)
          (comint-completion-addsuffix  nil)
@@ -983,7 +1045,50 @@ argument."
           (insert protection  suffix)))
     success))
 
-;;;###autoload (autoload 'icicle-ess-complete-object-name "icicles")
+
+;; Save vanilla `file' widget as `icicle-ORIG-file' widget, for restoring when you quit Icicle mode.
+(unless (get 'icicle-ORIG-file 'widget-type)
+  (put 'icicle-ORIG-file 'widget-type (get 'file 'widget-type))
+  (put 'icicle-ORIG-file 'widget-documentation (get 'file 'widget-documentation)))
+
+(define-widget 'icicle-file 'string
+  "Icicles version of the `file' widget.
+Reads a file name from an editable text field, with Icicles completion."
+  ;; `icicle-widget-file-complete' handles both nil and non-nil `icicle-mode'.
+  ;; Use the following instead of:
+  ;;   :completions #'completion-file-name-table
+  :complete-function #'icicle-widget-file-complete
+  :prompt-value 'widget-file-prompt-value
+  :format "%{%t%}: %v"
+  ;; Vanilla Emacs comment: This does not work well with terminating newline.
+  ;;                        :value-face 'widget-single-line-field
+  :tag "File")
+
+(defun icicle-widget-file-complete (&optional replace-to-eol-p)
+  "Perform Icicles completion on the file name at point.
+Like `widget-file-complete' (`widget-complete', for Emacs 24+), but
+allows Icicles completion.
+
+With a prefix arg, replace everthing past point on the current line.
+Otherwise, replace only the filename-matching text before point."
+  (interactive "P")
+  (if (and (boundp 'icicle-mode)  icicle-mode)
+      (let ((comint-completion-addsuffix  nil)) ; Do not append a space.
+        (icicle-comint-dynamic-complete-filename replace-to-eol-p))
+    (cond ((> emacs-major-version 23)
+           ;; Vanilla Emacs 24+ `file' widget just has this:
+           ;;   :completions #'completion-file-name-table
+           ;; But we need the equivalent using `:complete-function', not `:completions'.
+           ;; This is it - this is in fact the Emacs 23 `widget-file-complete'.
+           ;; See `widget-default-completions' for the relations between keywords
+           ;; `:completions' and `:complete-function'.
+           (let* ((field  (widget-field-find (point)))
+                  (start  (widget-field-start field))
+                  (end    (max (point) (widget-field-text-end field))))
+             (completion-in-region start end #'completion-file-name-table)))
+          (t
+           (widget-file-complete)))))
+
 (defun icicle-ess-complete-object-name (&optional listcomp)
   "`ess-complete-object-name', but uses Icicles completion.
 Complete `ess-language' object preceding point.
@@ -994,7 +1099,6 @@ and `icicle-ess-internal-complete-object-name' otherwise."
       (icicle-ess-R-complete-object-name)
     (icicle-ess-internal-complete-object-name listcomp)))
 
-;;;###autoload (autoload 'icicle-ess-internal-complete-object-name "icicles")
 (defun icicle-ess-internal-complete-object-name (&optional listcomp)
   "`ess-internal-complete-object-name', but uses Icicles completion.
 Complete `ess-language' object preceding point."
@@ -1034,7 +1138,7 @@ Complete `ess-language' object preceding point."
                   ;; Default case: It hangs here when options (error=recoves):
                   (ess-get-object-list ess-current-process-name)))))
         ;; Return non-nil to prevent history expansions
-        (or (icicle-comint-dynamic-simple-complete  pattern components) 'none))))
+        (or (icicle-comint-dynamic-simple-complete  pattern components)  'none))))
 
 (defun icicle-ess-complete-filename ()
   "`ess-complete-filename', but uses Icicles completion.
@@ -1046,7 +1150,6 @@ Do file completion only within strings, or when `!' call is used."
                (icicle-comint-replace-by-expanded-filename)) ; a working XEmacs return t in a string
              t)))
 
-;;;###autoload (autoload 'icicle-ess-R-complete-object-name "icicles")
 (defun icicle-ess-R-complete-object-name ()
   "`ess-R-complete-object-name', but uses Icicles completion.
 Completion in R."
@@ -1068,9 +1171,8 @@ Completion in R."
           (progn
             (ess-command (concat NS ".completeToken()\n"))
             (ess-get-words-from-vector (concat NS ".retrieveCompletions()\n")))))
-    (or (icicle-comint-dynamic-simple-complete token-string possible-completions) 'none)))
+    (or (icicle-comint-dynamic-simple-complete token-string possible-completions)  'none)))
 
-;;;###autoload (autoload 'icicle-gud-gdb-complete-command "icicles")
 (defun icicle-gud-gdb-complete-command (&optional command a b)
   "`gud-gdb-complete-command', but uses Icicles completion.
 Perform completion on the GDB command preceding point."
@@ -1091,7 +1193,7 @@ Perform completion on the GDB command preceding point."
     ;; Protect against old versions of GDB.
     (and complete-list
          (string-match "^Undefined command: \"complete\"" (car complete-list))
-         (error "This version of GDB doesn't support the `complete' command"))
+         (icicle-user-error "This version of GDB does not support command `complete'"))
     ;; Sort the list like readline.
     (setq complete-list  (sort complete-list (function string-lessp)))
     ;; Remove duplicates.
@@ -1123,10 +1225,9 @@ Perform completion on the GDB command preceding point."
 ;; You can complete from an empty abbrev also.
 ;; Uses Icicles completion when there are multiple candidates.
 ;;
-(when (and (fboundp 'dabbrev-completion) (not (fboundp 'old-dabbrev-completion)))
-  (defalias 'old-dabbrev-completion (symbol-function 'dabbrev-completion)))
+(when (and (fboundp 'dabbrev-completion)  (not (fboundp 'icicle-ORIG-dabbrev-completion)))
+  (defalias 'icicle-ORIG-dabbrev-completion (symbol-function 'dabbrev-completion)))
 
-;;;###autoload (autoload 'icicle-dabbrev-completion "icicles")
 (defun icicle-dabbrev-completion (&optional arg) ; Bound to `C-M-/' globally.
   "Completion on current word.
 Like \\[dabbrev-expand], but finds all expansions in the current buffer
@@ -1145,8 +1246,8 @@ if there is a suitable one already."
     (unless (require 'dabbrev nil t) (error "Library `dabbrev' not found"))
     (icicle-mode 1))                    ; Redefine `dabbrev-completion' to Icicles version.
   (dabbrev--reset-global-variables)
-  (let* ((dabbrev-check-other-buffers  (and arg t)) ; Must be t
-         (dabbrev-check-all-buffers    (and arg (= (prefix-numeric-value arg) 16)))
+  (let* ((dabbrev-check-other-buffers  (and arg  t)) ; Must be t
+         (dabbrev-check-all-buffers    (and arg  (= (prefix-numeric-value arg) 16)))
          (abbrev                       (icicle-dabbrev--abbrev-at-point))
          (ignore-case-p                (and (if (eq dabbrev-case-fold-search 'case-fold-search)
                                                 case-fold-search
@@ -1173,10 +1274,10 @@ if there is a suitable one already."
           ;; Make an obarray with all expansions
           (setq my-obarray  (make-vector (length completion-list) 0))
           (unless (> (length my-obarray) 0)
-            (error "No dynamic expansion for \"%s\" found%s" abbrev
-                   (if dabbrev--check-other-buffers "" " in this-buffer")))
+            (icicle-user-error "No dynamic expansion for \"%s\" found%s" abbrev
+                               (if dabbrev--check-other-buffers "" " in this-buffer")))
           (dolist (string  completion-list)
-            (cond ((or (not ignore-case-p) (not dabbrev-case-replace))
+            (cond ((or (not ignore-case-p)  (not dabbrev-case-replace))
                    (intern string my-obarray))
                   ((string= abbrev (icicle-upcase abbrev))
                    (intern (icicle-upcase string) my-obarray))
@@ -1236,25 +1337,217 @@ Vanilla `dabbrev--abbrev-at-point' raises an error if no match."
           (when (and (save-excursion
                        (forward-char -1)
                        (not (looking-at
-                             (concat "\\(" (or dabbrev-abbrev-char-regexp "\\sw\\|\\s_") "\\)+"))))
-                     (re-search-backward (or dabbrev-abbrev-char-regexp "\\sw\\|\\s_") nil t))
+                             (concat "\\(" (or dabbrev-abbrev-char-regexp  "\\sw\\|\\s_") "\\)+"))))
+                     (re-search-backward (or dabbrev-abbrev-char-regexp  "\\sw\\|\\s_") nil t))
             (forward-char 1)))
         (dabbrev--goto-start-of-abbrev) ; Now find the beginning of that one.
         (setq abv  (buffer-substring-no-properties dabbrev--last-abbrev-location (point)))))
     abv))
 
 
-;; REPLACE ORIGINAL `bbdb-complete-name' defined in `bbdb-com.el',
+;; REPLACE ORIGINAL `bbdb-complete-mail' defined in `bbdb-com.el', version 3.02
+;; saving it for restoration when you toggle `icicle-mode'.
+;;
+;; BBDB Version 3.02, the Insidious Big Brother Database, is available here: http://melpa.milkbox.net/.
+;;
+;; Uses Icicles completion when there are multiple candidates.
+;;
+;; Free vars here: `bbdb-*' are bound in `bbdb-com.el'.
+(defun icicle-bbdb-complete-mail (&optional start-pos cycle-completion-buffer)
+  "In a mail buffer, complete the user name or mail address before point.
+Completes up to the preceding newline, colon or comma, or the value of
+START-POS.
+Returns non-nil if there is a valid completion, else return nil.
+You can control completion behaviour using `bbdb-completion-list'
+\(`bbdb-completion-type' in older BBDB versions).
+
+If what has been typed is unique, insert an entry \"User Name
+<mail-address>\" - but see `bbdb-mail-allow-redundancy'
+\(`bbdb-dwim-net-address-allow-redundancy' in older BBDB versions).
+If it is a valid completion but not unique, you can choose from the
+list of completions using Icicles completion.
+
+If your input is completed and `bbdb-complete-mail-allow-cycling' is
+true (`bbdb-complete-name-allow-cycling' for older BBDB versions),
+you can repeat to cycle through the nets for the matching record.
+
+When called with a prefix arg, display a list of all mail messages
+available for cycling.
+
+See your version of BBDB for more information."
+  (interactive (list nil current-prefix-arg))
+  (unless (and (require 'bbdb nil t)  (require 'bbdb-com nil t)
+               (fboundp 'bbdb-complete-mail))
+    (icicle-user-error "`icicle-bbdb-complete-mail' requires a BBDB version such as 3.02"))
+  (bbdb-buffer)                         ; Make sure database is initialized.
+  (lexical-let* ((end                     (point))
+                 (beg                     (or start-pos  (save-excursion
+                                                           (re-search-backward "\\(\\`\\|[\n:,]\\)[ \t]*")
+                                                           (goto-char (match-end 0)) (point))))
+                 (orig                    (buffer-substring beg end))
+                 (typed                   (downcase orig))
+                 (pattern                 (bbdb-string-trim typed))
+                 (completion-ignore-case  t)
+                 (completion              (try-completion pattern bbdb-hashtable #'bbdb-completion-predicate))
+                 (all-the-completions     ())
+                 dwim-completions  one-record  done)
+    ;; [:,] match would be interpreted as START-POS (e.g., a comma in LF-NAME).  Compensate.
+    (when (and (stringp completion)  (string-match "[:,]" completion))
+      (setq completion  (substring completion 0 (match-beginning 0))))
+    ;; Cannot use `all-completions' to set `all-the-completions' because it converts symbols to strings.
+    (all-completions pattern bbdb-hashtable (lambda (sym)
+                                              (when (bbdb-completion-predicate sym)
+                                                (push sym all-the-completions))))
+    ;; Resolve records matching pattern.  Multiple completions could match the same record.
+    (let ((records  (icicle-delete-dups (apply #'append (mapcar #'symbol-value all-the-completions)))))
+      (setq one-record  (and (not (cdr records))  (car records)))) ; Only one matching record.
+    (icicle-remove-Completions-window)
+    (cond (one-record
+           ;; Only one matching record.
+           ;; Determine mail address of ONE-RECORD to use for ADDRESS.
+           ;; Do we have a preferential order for the following tests?
+           (let ((completion-list  (if (eq t bbdb-completion-list)
+                                       '(fl-name lf-name mail aka organization)
+                                     bbdb-completion-list))
+                 (mails            (bbdb-record-mail one-record))
+                 mail elt)
+             (unless mails (error "Matching record has no `mail' field"))
+             ;; (1) If PATTERN matches name, AKA, or organization of ONE-RECORD,
+             ;;     then ADDRESS is the first mail address of ONE-RECORD.
+             (if (try-completion pattern (append (and (memq 'fl-name completion-list)
+                                                      (list (or (bbdb-record-name one-record)  "")))
+                                                 (and (memq 'lf-name completion-list)
+                                                      (list (or (bbdb-record-name-lf one-record)  "")))
+                                                 (and (memq 'aka completion-list)
+                                                      (bbdb-record-field one-record 'aka-all))
+                                                 (and (memq 'organization completion-list)
+                                                      (bbdb-record-organization one-record))))
+                 (setq mail  (car mails)))
+             ;; (2) If PATTERN matches one or multiple mail addresses of ONE-RECORD,
+             ;;     then we take the first one matching PATTERN.
+             (unless mail (while (setq elt  (pop mails))
+                            (if (try-completion pattern (list elt))
+                                (setq mail   elt
+                                      mails  ()))))
+             (unless mail (error "`icicle-bbdb-complete-mail': No match for `%s'" pattern)) ; Indicates a bug!
+             (let ((address  (bbdb-dwim-mail one-record mail)))
+               (if (string= address (buffer-substring-no-properties beg end))
+                   (unless (and bbdb-complete-mail-allow-cycling  (< 1 (length (bbdb-record-mail one-record))))
+                     (setq done  'UNCHANGED))
+                 (delete-region beg end) ; Replace text with expansion.
+                 (insert address)
+                 (bbdb-complete-mail-cleanup address)
+                 (setq done  'UNIQUE)))))
+          ;; Completed partially.
+          ;; Cannot use trimmed version of pattern here, else recurse infinitely on, e.g., common first names.
+          ((and (stringp completion)  (not (string= typed completion)))
+           (delete-region beg end)
+           (insert completion)
+           (setq done  'PARTIAL))
+          ;; Partial match not allowing further partial completion.
+          (completion
+           (let ((completion-list  (if (eq t bbdb-completion-list)
+                                       '(fl-name lf-name mail aka organization)
+                                     bbdb-completion-list))
+                 sname  records)
+             ;; Collect dwim-addresses for each completion, but only once for each record!
+             ;; Add if mail is part of the completions.
+             (dolist (sym  all-the-completions)
+               (setq sname  (symbol-name sym))
+               (dolist (record  (symbol-value sym))
+                 (unless (memq record records)
+                   (push record records)
+                   (let ((mails  (bbdb-record-mail record))
+                         accept)
+                     (when mails
+                       (dolist (field  completion-list)
+                         (if (case field
+                               (fl-name (bbdb-string= sname (bbdb-record-name record)))
+                               (lf-name (bbdb-string= sname (bbdb-cache-lf-name (bbdb-record-cache record))))
+                               (aka (member-ignore-case sname (bbdb-record-field record 'aka-all)))
+                               (organization (member-ignore-case sname (bbdb-record-organization record)))
+                               (primary (bbdb-string= sname (car mails)))
+                               (otherwise nil))
+                             (push (car mails) accept)
+                           (when (eq field 'mail)
+                             (dolist (mail  mails)
+                               (when (bbdb-string= sname mail) (push mail accept))))))
+                       (when accept
+                         ;; If DWIM-COMPLETIONS contains only one element, set DONE to `UNIQUE' (see below)
+                         ;;  and we want to know ONE-RECORD.
+                         (setq one-record  record)
+                         (dolist (mail  (delete-dups accept))
+                           (push (bbdb-dwim-mail record mail) dwim-completions))))))))
+             (cond ((not dwim-completions) (error "No mail address for \"%s\"" orig))
+                   ;; DWIM-COMPLETIONS might contain only one element, if multiple completions match the
+                   ;; same record.  In that case proceed with DONE set to `UNIQUE'.
+                   ((eq 1 (length dwim-completions))
+                    (delete-region beg end)
+                    (insert (car dwim-completions))
+                    (bbdb-complete-mail-cleanup (car dwim-completions))
+                    (setq done  'UNIQUE))
+                   (t
+                    (setq done  'CHOOSE))))))
+    ;; If no completion so far, consider cycling.
+    ;; Completion is controlled by option `bbdb-completion-list'.  Cycling assumes that ORIG already holds
+    ;; a valid RFC 822 mail address.  So cycling can consider different records than completion.
+    (when (and (not done)  bbdb-complete-mail-allow-cycling)
+      ;; Find the record we are working on.
+      (let* ((address  (mail-extract-address-components orig))
+             (record   (and (listp address)  (car (bbdb-message-search (nth 0 address) (nth 1 address)))))
+             (mails    (and record  (bbdb-record-mail record))))
+        (when mails
+          ;; Cycle, even if MAILS has only one address. `bbdb-dwim-mail' can give something different.
+          ;; E.g., header "JOHN SMITH <FOO@BAR.COM>" can be replaced by "John Smith <foo@bar.com>".
+          (cond ((and (= 1 (length mails))  (string= (bbdb-dwim-mail record (car mails))
+                                                     (buffer-substring-no-properties beg end)))
+                 (setq done  'UNCHANGED))
+                (cycle-completion-buffer ; Use completion buffer.
+                 (setq dwim-completions  (mapcar (lambda (n) (bbdb-dwim-mail record n)) mails)
+                       done              'CHOOSE))
+                (t                      ; Use next mail
+                 (let ((mail  (or (nth 1 (or (icicle-member-ignore-case (nth 1 address) mails)
+                                             (icicle-member-ignore-case orig mails)))
+                                  (nth 0 mails))))
+                   (delete-region beg end) ; Replace with new mail address
+                   (insert (bbdb-dwim-mail record mail))
+                   (setq done  'CYCLE)))))))
+    (when (eq done 'CHOOSE)
+      ;; Icicles completion.  `completion-in-region' does not work here, as `dwim-completions' is not a
+      ;; collection for completion in the usual sense.  It is really a list of replacements.
+      (unless (eq (selected-window) (minibuffer-window)) (message "Making completion list..."))
+      (icicle-condition-case-no-debug nil
+          (let* ((icicle-show-Completions-initially-flag      t)
+                 (icicle-incremental-completion-p             'display)
+                 (icicle-top-level-when-sole-completion-flag  t)
+                 (completion-ignore-case                      t)
+                 (choice
+                  (save-excursion (completing-read "Complete: " (mapcar #'list dwim-completions)
+                                                   nil t pattern nil pattern))))
+            (when choice
+              (delete-region beg end)
+              (insert choice)))
+        (error nil))
+      (unless (eq (selected-window) (minibuffer-window)) (message "Making completion list...done")))
+    done))
+
+
+;; REPLACE ORIGINAL `bbdb-complete-name' defined in `bbdb-com.el' version 2.35,
 ;; saving it for restoration when you toggle `icicle-mode'.
-;; Note: BBDB, the Insidious Big Brother Database, is available here:
+;;
+;; Version 2.35 is an older version of BBDB, the Insidious Big Brother Database, available here:
 ;;       http://bbdb.sourceforge.net/.
 ;;
 ;; Uses Icicles completion when there are multiple candidates.
 ;;
 ;; Free vars here: `bbdb-*' are bound in `bbdb-com.el'.
-;;;###autoload (autoload 'icicle-bbdb-complete-name "icicles")
-(defun icicle-bbdb-complete-name (&optional start-pos)
-  "Complete the user full-name or net-address before point.
+;;
+;;
+;; Avoid a byte-compile error if user has already loaded BBDB version 3+.
+;; The error has to do with `bbdb-records' being a defsubst that takes no args.
+(unless (eval-when-compile (and (featurep 'bbdb)  (not (string-lessp bbdb-version "3"))))
+  (defun icicle-bbdb-complete-name (&optional start-pos)
+    "Complete the user full-name or net-address before point.
 Completes only up to the preceding newline, colon, or comma, or the
 value of START-POS.
 
@@ -1269,236 +1562,235 @@ record.
 
 When called with a prefix arg, display a list of all nets.  You can
 control completion behaviour using `bbdb-completion-type'."
-  (interactive)
-  (unless (and (require 'bbdb nil t) (require 'bbdb-com nil t))
-    (error "`icicle-bbdb-complete-name' requires BBDB"))
-  (let* ((end                  (point))
-         (beg                  (or start-pos (save-excursion (re-search-backward
-                                                              "\\(\\`\\|[\n:,]\\)[ \t]*")
-                                                             (goto-char (match-end 0)) (point))))
-         (orig                 (buffer-substring beg end))
-         (typed                (downcase orig))
-         (pattern              (bbdb-string-trim typed))
-         ;; DADAMS -
-         ;; Replaced `(bbdb-hashtable)' by its expansion (bbdb-with-db-buffer ... bbdb-hashtable),
-         ;; to avoid the silly macro altogether and simplify user byte-compiling a little.
-         (ht                   (bbdb-with-db-buffer (bbdb-records nil t) bbdb-hashtable))
-         ;; Make a list of possible completion strings (all-the-completions), and a flag to
-         ;; indicate if there's a single matching record or not (only-one-p).
-         (only-one-p           t)
-         (all-the-completions  ())
-         (pred
-          #'(lambda (sym)
-              (and (bbdb-completion-predicate sym)
-                   (progn
-                     (when (and only-one-p all-the-completions
-                                (or
-                                 ;; Not sure about this. More than one record attached to the symbol?
-                                 ;; Does that happen?
-                                 (> (length (symbol-value sym)) 1)
-                                 ;; This is the doozy. Multiple syms which all match the same record.
-                                 (delete t (mapcar #'(lambda (x)
-                                                       (equal (symbol-value x) (symbol-value sym)))
-                                                   all-the-completions))))
-                       (setq only-one-p  nil))
-                     (if (memq sym all-the-completions)
-                         nil
-                       (setq all-the-completions  (cons sym all-the-completions)))))))
-         (completion           (progn (all-completions pattern ht pred)
-                                      (try-completion pattern ht)))
-         (exact-match          (eq completion t)))
-    (cond
-      ;; No matches found OR you're trying completion on an already-completed record.
-      ;; In the latter case, we might have to cycle through the nets for that record.
-      ((or (null completion)
-           (and bbdb-complete-name-allow-cycling
-                exact-match             ; Which is a net of the record
-                (member orig (bbdb-record-net (car (symbol-value (intern-soft pattern ht)))))))
-       (bbdb-complete-name-cleanup)     ; Clean up the completion buffer, if it exists
-       (unless (catch 'bbdb-cycling-exit ; Check for cycling
-                 ;; Jump straight out if we're not cycling
-                 (unless bbdb-complete-name-allow-cycling (throw 'bbdb-cycling-exit nil))
-                 ;; Find the record we're working on.
-                 (let* ((addr  (funcall bbdb-extract-address-components-func orig))
-                        (rec  (and (listp addr)
-                                   ;; For now, we ignore the case where this returns more than
-                                   ;; one record.  Ideally, the last expansion would be stored
-                                   ;; in a buffer-local variable, perhaps.
-                                   (car (bbdb-search-intertwingle (caar addr)
-                                                                  (car (cdar addr)))))))
-                   (unless rec (throw 'bbdb-cycling-exit nil))
-                   (if current-prefix-arg
-                       ;; Use completion buffer
-                       (let ((standard-output  (get-buffer-create "*Completions*")))
-                         ;; A previously existing buffer has to be cleaned first
-                         (with-current-buffer standard-output
-                           (setq buffer-read-only  nil)
-                           (erase-buffer))
-                         (display-completion-list
-                          (mapcar #'(lambda (n) (bbdb-dwim-net-address rec n))
-                                  (bbdb-record-net rec)))
-                         (delete-region beg end)
-                         (switch-to-buffer standard-output))
-                     ;; Use next address
-                     (let* ((addrs      (bbdb-record-net rec))
-                            (this-addr  (or (cadr (member (car (cdar addr)) addrs))
-                                            (nth 0 addrs))))
-                       (if (= (length addrs) 1)
-                           (throw 'bbdb-cycling-exit t) ; No alternatives. don't signal an error.
-                         ;; Replace with new mail address
-                         (delete-region beg end)
-                         (insert (bbdb-dwim-net-address rec this-addr))
-                         (run-hooks 'bbdb-complete-name-hooks)
-                         (throw 'bbdb-cycling-exit t))))))
-         ;; FALL THROUGH.  Check mail aliases
-         (when (and (or (not bbdb-expand-mail-aliases) (not (expand-abbrev)))
-                    bbdb-complete-name-hooks)
-           (message "No completion for `%s'" pattern) (icicle-ding)))) ; no matches
-
-      ;; Match for a single record. If cycling is enabled then we don't
-      ;; care too much about the exact-match part.
-      ((and only-one-p (or exact-match bbdb-complete-name-allow-cycling))
-       (let* ((sym   (if exact-match (intern-soft pattern ht) (car all-the-completions)))
-              (recs  (symbol-value sym))
-              the-net match-recs lst primary matched)
-         (while recs
-           (when (bbdb-record-net (car recs))
-             ;; Did we match on name?
-             (let ((b-r-name  (or (bbdb-record-name (car recs)) "")))
-               (if (string= pattern (substring (downcase b-r-name) 0
-                                               (min (length b-r-name) (length pattern))))
-                   (setq match-recs  (cons (car recs) match-recs)
-                         matched     t)))
-             ;; Did we match on aka?
-             (unless matched
-               (setq lst  (bbdb-record-aka (car recs)))
-               (while lst
-                 (if (string= pattern (substring (downcase (car lst)) 0
-                                                 (min (length (downcase (car lst)))
-                                                      (length pattern))))
-                     (setq match-recs  (append match-recs (list (car recs)))
-                           matched     t
-                           lst         ())
-                   (setq lst  (cdr lst)))))
-             ;; Name didn't match name so check net matching
-             (unless matched
-               (setq lst      (bbdb-record-net (car recs))
-                     primary  t)        ; primary wins over secondary...
-               (while lst
-                 (if (string= pattern (substring (downcase (car lst)) 0
-                                                 (min (length (downcase (car lst)))
-                                                      (length pattern))))
-                     (setq the-net     (car lst)
-                           lst         ()
-                           match-recs  (if primary
-                                           (cons (car recs) match-recs)
-                                         (append match-recs (list (car recs))))))
-                 (setq lst      (cdr lst)
-                       primary  nil))))
-           (setq recs     (cdr recs)    ; Next rec for loop.
-                 matched  nil))
-         (unless match-recs (error "Only exact matching record has net field"))
-         ;; Replace the text with the expansion
+    (interactive)
+    (unless (and (require 'bbdb nil t)  (require 'bbdb-com nil t)
+                 (fboundp 'bbdb-complete-name))
+      (icicle-user-error "`icicle-bbdb-complete-name' requires a BBDB version such as 2.35"))
+    (lexical-let* ((end                  (point))
+                   (beg                  (or start-pos  (save-excursion (re-search-backward
+                                                                         "\\(\\`\\|[\n:,]\\)[ \t]*")
+                                                                        (goto-char (match-end 0)) (point))))
+                   (orig                 (buffer-substring beg end))
+                   (typed                (downcase orig))
+                   (pattern              (bbdb-string-trim typed))
+                   ;; DADAMS -
+                   ;; Replaced `(bbdb-hashtable)' by its expansion (bbdb-with-db-buffer ... bbdb-hashtable),
+                   ;; to avoid the silly macro altogether and simplify user byte-compiling a little.
+                   (ht                   (bbdb-with-db-buffer (bbdb-records nil t) bbdb-hashtable))
+                   ;; Make a list of possible completion strings (all-the-completions), and a flag to
+                   ;; indicate if there's a single matching record or not (only-one-p).
+                   (only-one-p           t)
+                   (all-the-completions  ())
+                   (pred
+                    (lambda (sym)       ; FREE here: ALL-THE-COMPLETIONS, ONLY-ONE-P.
+                      (and (bbdb-completion-predicate sym)
+                           (progn
+                             (when (and only-one-p
+                                        all-the-completions
+                                        (or
+                                         ;; Not sure about this. More than one record attached to the symbol?
+                                         ;; Does that happen?
+                                         (> (length (symbol-value sym)) 1)
+                                         ;; This is the doozy. Multiple syms which all match the same record.
+                                         (delete t (mapcar (lambda (x) ; FREE here: SYM.
+                                                             (equal (symbol-value x) (symbol-value sym)))
+                                                           all-the-completions))))
+                               (setq only-one-p  nil))
+                             (if (memq sym all-the-completions)
+                                 nil
+                               (setq all-the-completions  (cons sym all-the-completions)))))))
+                   (completion           (progn (all-completions pattern ht pred)
+                                                (try-completion pattern ht)))
+                   (exact-match          (eq completion t)))
+      (cond
+        ;; No matches found OR you're trying completion on an already-completed record.
+        ;; In the latter case, we might have to cycle through the nets for that record.
+        ((or (null completion)
+             (and bbdb-complete-name-allow-cycling
+                  exact-match           ; Which is a net of the record
+                  (member orig (bbdb-record-net (car (symbol-value (intern-soft pattern ht)))))))
+         (bbdb-complete-name-cleanup)   ; Clean up the completion buffer, if it exists
+         (unless (catch 'bbdb-cycling-exit ; Check for cycling
+                   ;; Jump straight out if we're not cycling
+                   (unless bbdb-complete-name-allow-cycling (throw 'bbdb-cycling-exit nil))
+                   ;; Find the record we're working on.
+                   (lexical-let* ((addr  (funcall bbdb-extract-address-components-func orig))
+                                  (rec  (and (listp addr)
+                                             ;; For now, we ignore the case where this returns more than
+                                             ;; one record.  Ideally, the last expansion would be stored
+                                             ;; in a buffer-local variable, perhaps.
+                                             (car (bbdb-search-intertwingle (caar addr)
+                                                                            (car (cdar addr)))))))
+                     (unless rec (throw 'bbdb-cycling-exit nil))
+                     (if current-prefix-arg
+                         ;; Use completion buffer
+                         (let ((standard-output  (get-buffer-create "*Completions*")))
+                           ;; A previously existing buffer has to be cleaned first
+                           (with-current-buffer standard-output
+                             (setq buffer-read-only  nil)
+                             (erase-buffer))
+                           (display-completion-list
+                            (mapcar (lambda (n) (bbdb-dwim-net-address rec n)) ; FREE here: REC.
+                                    (bbdb-record-net rec)))
+                           (delete-region beg end)
+                           (switch-to-buffer standard-output))
+                       ;; Use next address
+                       (let* ((addrs      (bbdb-record-net rec))
+                              (this-addr  (or (cadr (member (car (cdar addr)) addrs))  (nth 0 addrs))))
+                         (if (= (length addrs) 1)
+                             (throw 'bbdb-cycling-exit t) ; No alternatives. don't signal an error.
+                           ;; Replace with new mail address
+                           (delete-region beg end)
+                           (insert (bbdb-dwim-net-address rec this-addr))
+                           (run-hooks 'bbdb-complete-name-hooks)
+                           (throw 'bbdb-cycling-exit t))))))
+           ;; FALL THROUGH.  Check mail aliases
+           (when (and (or (not bbdb-expand-mail-aliases)  (not (expand-abbrev)))  bbdb-complete-name-hooks)
+             (message "No completion for `%s'" pattern) (icicle-ding)))) ; no matches
+
+        ;; Match for a single record. If cycling is enabled then we don't
+        ;; care too much about the exact-match part.
+        ((and only-one-p  (or exact-match  bbdb-complete-name-allow-cycling))
+         (let* ((sym   (if exact-match (intern-soft pattern ht) (car all-the-completions)))
+                (recs  (symbol-value sym))
+                the-net match-recs lst primary matched)
+           (while recs
+             (when (bbdb-record-net (car recs))
+               ;; Did we match on name?
+               (let ((b-r-name  (or (bbdb-record-name (car recs))  "")))
+                 (if (string= pattern (substring (downcase b-r-name) 0
+                                                 (min (length b-r-name) (length pattern))))
+                     (setq match-recs  (cons (car recs) match-recs)
+                           matched     t)))
+               ;; Did we match on aka?
+               (unless matched
+                 (setq lst  (bbdb-record-aka (car recs)))
+                 (while lst
+                   (if (string= pattern (substring (downcase (car lst)) 0
+                                                   (min (length (downcase (car lst)))
+                                                        (length pattern))))
+                       (setq match-recs  (append match-recs (list (car recs)))
+                             matched     t
+                             lst         ())
+                     (setq lst  (cdr lst)))))
+               ;; Name didn't match name so check net matching
+               (unless matched
+                 (setq lst      (bbdb-record-net (car recs))
+                       primary  t)      ; primary wins over secondary...
+                 (while lst
+                   (if (string= pattern (substring (downcase (car lst)) 0
+                                                   (min (length (downcase (car lst)))
+                                                        (length pattern))))
+                       (setq the-net     (car lst)
+                             lst         ()
+                             match-recs  (if primary
+                                             (cons (car recs) match-recs)
+                                           (append match-recs (list (car recs))))))
+                   (setq lst      (cdr lst)
+                         primary  nil))))
+             (setq recs     (cdr recs)  ; Next rec for loop.
+                   matched  nil))
+           (unless match-recs (error "Only exact matching record has net field"))
+           ;; Replace the text with the expansion
+           (delete-region beg end)
+           (insert (bbdb-dwim-net-address (car match-recs) the-net))
+           ;; If we're past fill-column, wrap at the previous comma.
+           (when (and (bbdb-auto-fill-function)  (>= (current-column) fill-column))
+             (let ((p  (point))
+                   bol)
+               (save-excursion
+                 (setq bol  (line-beginning-position))
+                 (goto-char p)
+                 (when (search-backward "," bol t) (forward-char 1) (insert "\n   ")))))
+           ;; Update the *BBDB* buffer if desired.
+           (when bbdb-completion-display-record
+             (let ((bbdb-gag-messages  t))
+               (bbdb-pop-up-bbdb-buffer)
+               (bbdb-display-records-1 match-recs t)))
+           (bbdb-complete-name-cleanup)
+           ;; Call the exact-completion hook
+           (run-hooks 'bbdb-complete-name-hooks)))
+
+        ;; Partial match.  Note: we can't use the trimmed version of the pattern here or
+        ;; we'll recurse infinitely on e.g. common first names.
+        ((and (stringp completion)  (not (string= typed completion)))
          (delete-region beg end)
-         (insert (bbdb-dwim-net-address (car match-recs) the-net))
-         ;; If we're past fill-column, wrap at the previous comma.
-         (when (and (bbdb-auto-fill-function) (>= (current-column) fill-column))
-           (let ((p  (point))
-                 bol)
-             (save-excursion
-               (setq bol  (line-beginning-position))
-               (goto-char p)
-               (when (search-backward "," bol t) (forward-char 1) (insert "\n   ")))))
-         ;; Update the *BBDB* buffer if desired.
-         (when bbdb-completion-display-record
-           (let ((bbdb-gag-messages  t))
-             (bbdb-pop-up-bbdb-buffer)
-             (bbdb-display-records-1 match-recs t)))
-         (bbdb-complete-name-cleanup)
-         ;; Call the exact-completion hook
-         (run-hooks 'bbdb-complete-name-hooks)))
-
-      ;; Partial match.  Note: we can't use the trimmed version of the pattern here or
-      ;; we'll recurse infinitely on e.g. common first names.
-      ((and (stringp completion) (not (string= typed completion)))
-       (delete-region beg end)
-       (insert completion)
-       (setq end  (point))
-       (let ((last                              "")
-             (bbdb-complete-name-allow-cycling  nil))
-         (while (and (stringp completion) (not (string= completion last))
-                     (setq last        completion
-                           pattern     (downcase orig)
-                           completion  (progn (all-completions pattern ht pred)
-                                              (try-completion pattern ht))))
-           (when (stringp completion) (delete-region beg end) (insert completion)))
-         (bbdb-complete-name beg)))     ; RECURSE <================
-
-      ;; Exact match, but more than one record
-      (t
-       (unless (eq (selected-window) (minibuffer-window)) (message "Making completion list..."))
-       (let (dwim-completions uniq nets net name akas)
-         ;; Collect all the dwim-addresses for each completion, but only once for each record.
-         ;; Add if the net is part of the completions.
-         (bbdb-mapc #'(lambda (sym)
+         (insert completion)
+         (setq end  (point))
+         (let ((last                              "")
+               (bbdb-complete-name-allow-cycling  nil))
+           (while (and (stringp completion)  (not (string= completion last))
+                       (setq last        completion
+                             pattern     (downcase orig)
+                             completion  (progn (all-completions pattern ht pred)
+                                                (try-completion pattern ht))))
+             (when (stringp completion) (delete-region beg end) (insert completion)))
+           (bbdb-complete-name beg)))   ; RECURSE <================
+
+        ;; Exact match, but more than one record
+        (t
+         (unless (eq (selected-window) (minibuffer-window)) (message "Making completion list..."))
+         (lexical-let (dwim-completions uniq nets net name akas)
+           ;; Collect all the dwim-addresses for each completion, but only once for each record.
+           ;; Add if the net is part of the completions.
+           (bbdb-mapc (lambda (sym)
                         (bbdb-mapc
-                         #'(lambda (rec)
-                             (unless (member rec uniq)
-                               (setq uniq  (cons rec uniq)
-                                     nets  (bbdb-record-net rec)
-                                     name  (downcase (or (bbdb-record-name rec) ""))
-                                     akas  (mapcar 'downcase (bbdb-record-aka rec)))
-                               (while nets
-                                 (setq net  (car nets))
-                                 (when (cond
-                                         ((and (member bbdb-completion-type ; Primary
-                                                       '(primary primary-or-name))
-                                               (member (intern-soft (downcase net) ht)
-                                                       all-the-completions))
-                                          (setq nets  ())
-                                          t)
-                                         ((and name (member bbdb-completion-type ; Name
-                                                            '(nil name primary-or-name))
-                                               (let ((cname  (symbol-name sym)))
-                                                 (or (string= cname name)
-                                                     (member cname akas))))
-                                          (setq name  nil)
-                                          t)
-                                         ((and (member bbdb-completion-type '(nil net)) ; Net
-                                               (member (intern-soft (downcase net) ht)
-                                                       all-the-completions)))
-                                         ;; (name-or-)primary
-                                         ((and (member bbdb-completion-type '(name-or-primary))
-                                               (let ((cname  (symbol-name sym)))
-                                                 (or (string= cname name)
-                                                     (member cname akas))))
-                                          (setq nets  ())
-                                          t))
-                                   (setq dwim-completions
-                                         (cons (bbdb-dwim-net-address rec net)
-                                               dwim-completions))
-                                   (when exact-match (setq nets  ())))
-                                 (setq nets  (cdr nets)))))
+                         ;; FREE here: AKAS, ALL-THE-COMPLETIONS, DWIM-COMPLETIONS, HT,
+                         ;;            NAME, NET, NETS, SYM, UNIQ.
+                         (lambda (rec)
+                           (unless (member rec uniq)
+                             (setq uniq  (cons rec uniq)
+                                   nets  (bbdb-record-net rec)
+                                   name  (downcase (or (bbdb-record-name rec)  ""))
+                                   akas  (mapcar 'downcase (bbdb-record-aka rec)))
+                             (while nets
+                               (setq net  (car nets))
+                               (when (cond
+                                       ((and (member bbdb-completion-type ; Primary
+                                                     '(primary primary-or-name))
+                                             (member (intern-soft (downcase net) ht)
+                                                     all-the-completions))
+                                        (setq nets  ())
+                                        t)
+                                       ((and name (member bbdb-completion-type ; Name
+                                                          '(nil name primary-or-name))
+                                             (let ((cname  (symbol-name sym)))
+                                               (or (string= cname name)  (member cname akas))))
+                                        (setq name  nil)
+                                        t)
+                                       ((and (member bbdb-completion-type '(nil net)) ; Net
+                                             (member (intern-soft (downcase net) ht) all-the-completions)))
+                                       ;; (name-or-)primary
+                                       ((and (member bbdb-completion-type '(name-or-primary))
+                                             (let ((cname  (symbol-name sym)))
+                                               (or (string= cname name)  (member cname akas))))
+                                        (setq nets  ())
+                                        t))
+                                 (setq dwim-completions
+                                       (cons (bbdb-dwim-net-address rec net)
+                                             dwim-completions))
+                                 (when exact-match (setq nets  ())))
+                               (setq nets  (cdr nets)))))
                          (symbol-value sym)))
-                    all-the-completions)
-         (cond ((and dwim-completions (null (cdr dwim-completions))) ; Insert the unique match.
-                (delete-region beg end) (insert (car dwim-completions)) (message ""))
-               (t                       ; More than one match.  Use Icicles minibuffer completion.
-                (icicle-condition-case-no-debug nil
-                    (let* ((icicle-show-Completions-initially-flag      t)
-                           (icicle-incremental-completion-p             'display)
-                           (icicle-top-level-when-sole-completion-flag  t)
-                           (completion-ignore-case                      t)
-                           (choice
-                            (save-excursion
-                              (completing-read "Complete: " (mapcar #'list dwim-completions)
-                                               nil t pattern nil pattern))))
-                      (when choice
-                        (delete-region beg end)
-                        (insert choice)))
-                  (error nil))
-                (unless (eq (selected-window) (minibuffer-window))
-                  (message "Making completion list...done")))))))))
+                      all-the-completions)
+           (cond ((and dwim-completions  (null (cdr dwim-completions))) ; Insert the unique match.
+                  (delete-region beg end) (insert (car dwim-completions)) (message ""))
+                 (t                     ; More than one match.  Use Icicles minibuffer completion.
+                  (icicle-condition-case-no-debug nil
+                      (let* ((icicle-show-Completions-initially-flag      t)
+                             (icicle-incremental-completion-p             'display)
+                             (icicle-top-level-when-sole-completion-flag  t)
+                             (completion-ignore-case                      t)
+                             (choice
+                              (save-excursion
+                                (completing-read "Complete: " (mapcar #'list dwim-completions)
+                                                 nil t pattern nil pattern))))
+                        (when choice
+                          (delete-region beg end)
+                          (insert choice)))
+                    (error nil))
+                  (unless (eq (selected-window) (minibuffer-window))
+                    (message "Making completion list...done"))))))))))
 
 
 ;; REPLACE ORIGINAL `lisp-complete-symbol' (< Emacs 23.2),
@@ -1506,10 +1798,9 @@ control completion behaviour using `bbdb-completion-type'."
 ;;
 ;; Select `*Completions*' window even if on another frame.
 ;;
-(unless (fboundp 'old-lisp-complete-symbol)
-  (defalias 'old-lisp-complete-symbol (symbol-function 'lisp-complete-symbol)))
+(unless (fboundp 'icicle-ORIG-lisp-complete-symbol)
+  (defalias 'icicle-ORIG-lisp-complete-symbol (symbol-function 'lisp-complete-symbol)))
 
-;;;###autoload (autoload 'icicle-lisp-complete-symbol "icicles")
 (defun icicle-lisp-complete-symbol (&optional predicate) ; `M-TAB' (`C-M-i', `ESC-TAB'), globally.
   "Complete the Lisp symbol preceding point against known Lisp symbols.
 If there is more than one completion, use the minibuffer to complete.
@@ -1538,7 +1829,7 @@ considered."
     (delete-region beg end)
     (insert new)
     (setq end  (+ beg (length new)))
-    (if (and (not (string= new "")) (not (string= (downcase new) (downcase pattern)))
+    (if (and (not (string= new ""))  (not (string= (downcase new) (downcase pattern)))
              (< (length (all-completions new obarray)) 2))
         (message "Completed (no other completions)")
       ;; Use minibuffer to choose a completion.
@@ -1548,8 +1839,7 @@ considered."
              (alt-fn                                      nil)
              (icicle-show-Completions-initially-flag      t)
              (icicle-candidate-alt-action-fn
-              (or icicle-candidate-alt-action-fn
-                  (setq alt-fn  (icicle-alt-act-fn-for-type "symbol"))))
+              (or icicle-candidate-alt-action-fn  (setq alt-fn  (icicle-alt-act-fn-for-type "symbol"))))
              (icicle-all-candidates-list-alt-action-fn ; M-|'
               (or icicle-all-candidates-list-alt-action-fn alt-fn
                   (icicle-alt-act-fn-for-type "symbol")))
@@ -1558,8 +1848,8 @@ considered."
                   (save-excursion
                     (goto-char beg)
                     (if (not (eq (char-before) ?\( ))
-                        #'(lambda (sym) ;why not just nil ?   -sm
-                            (or (boundp sym) (fboundp sym) (symbol-plist sym)))
+                        (lambda (sym) ;why not just nil ?   -sm
+                          (or (boundp sym)  (fboundp sym)  (symbol-plist sym)))
                       ;; If first element of parent list is not an open paren, assume that this is a
                       ;; funcall position: use `fboundp'.  If not, then maybe this is a variable in
                       ;; a `let' binding, so no predicate: use nil.
@@ -1581,25 +1871,24 @@ considered."
 ;; Select `*Completions*' window even if on another frame.
 ;;
 (when (fboundp 'completion-at-point)    ; Emacs 23.2+.
-  (unless (fboundp 'old-lisp-completion-at-point)
-    (defalias 'old-lisp-completion-at-point (symbol-function 'lisp-completion-at-point))
+  (unless (fboundp 'icicle-ORIG-lisp-completion-at-point)
+    (defalias 'icicle-ORIG-lisp-completion-at-point (symbol-function 'lisp-completion-at-point))
     ;; Return a function that does all of the completion.
     (defun icicle-lisp-completion-at-point () #'icicle-lisp-complete-symbol)))
 
-;;;###autoload (autoload 'icicle-customize-icicles-group "icicles")
 (defun icicle-customize-icicles-group ()
   "Customize Icicles options and faces.  View their documentation."
   (interactive)
   (customize-group-other-window 'Icicles))
 
-;;;###autoload (autoload 'icicle-send-bug-report "icicles")
 (defun icicle-send-bug-report ()
   "Send a bug report about an Icicles problem."
   (interactive)
   (browse-url (format (concat "mailto:" "drew.adams" "@" "oracle" ".com?subject=\
 Icicles bug: \
 &body=Describe bug below, using a precise recipe that starts with `emacs -Q' or `emacs -q'.  \
-Each Icicles file has a header `Update #' that you can use to identify it.\
+Each Icicles file has a header `Update #' that you can use to identify it.  \
+Include at least the `Update #' from file `icicles-chg.el', if you have that file.\
 %%0A%%0AEmacs version: %s.")
                       (emacs-version))))
 
@@ -1609,20 +1898,20 @@ Each Icicles file has a header `Update #' that you can use to identify it.\
 ;;
 ;; Multi-command version.
 ;;
-(unless (fboundp 'old-customize-face-other-window)
-  (defalias 'old-customize-face-other-window (symbol-function 'customize-face-other-window)))
+(unless (fboundp 'icicle-ORIG-customize-face-other-window)
+  (defalias 'icicle-ORIG-customize-face-other-window (symbol-function 'customize-face-other-window)))
 
-;;;###autoload (autoload 'icicle-customize-face-other-window "icicles")
 (defun icicle-customize-face-other-window (face)
   "Customize face FACE in another window.
 Same as `icicle-customize-face' except it uses a different window."
   (interactive
-   (list (let* ((icicle-list-use-nth-parts             '(1))
+   (list (let* ((icicle-multi-completing-p             t)
+                (icicle-list-use-nth-parts             '(1))
                 (icicle-candidate-action-fn
-                 #'(lambda (x)
-                     (old-customize-face-other-window (intern (icicle-transform-multi-completion x)))
-                     (select-window (minibuffer-window))
-                     (select-frame-set-input-focus (selected-frame))))
+                 (lambda (x)
+                   (icicle-ORIG-customize-face-other-window (intern (icicle-transform-multi-completion x)))
+                   (select-window (minibuffer-window))
+                   (select-frame-set-input-focus (selected-frame))))
                 (icicle-all-candidates-list-action-fn  'icicle-customize-faces)
                 (icicle-orig-window                    (selected-window)) ; For alt actions.
                 (alt-fn                                nil)
@@ -1631,11 +1920,12 @@ Same as `icicle-customize-face' except it uses a different window."
                      (setq alt-fn  (icicle-alt-act-fn-for-type "face"))))
                 (icicle-all-candidates-list-alt-action-fn ; M-|'
                  (or icicle-all-candidates-list-alt-action-fn
-                     alt-fn (icicle-alt-act-fn-for-type "face"))))
-           (if (and (> emacs-major-version 21) current-prefix-arg)
+                     alt-fn
+                     (icicle-alt-act-fn-for-type "face"))))
+           (if (and (> emacs-major-version 21)  current-prefix-arg)
                (read-face-name "Customize face: " "all faces" t)
              (read-face-name "Customize face: ")))))
-  (old-customize-face-other-window face))
+  (icicle-ORIG-customize-face-other-window face))
 
 
 ;; REPLACE ORIGINAL `customize-face' defined in `cus-edit.el',
@@ -1643,14 +1933,13 @@ Same as `icicle-customize-face' except it uses a different window."
 ;;
 ;; Multi-command version.
 ;;
-(unless (fboundp 'old-customize-face)
-  (defalias 'old-customize-face (symbol-function 'customize-face)))
+(unless (fboundp 'icicle-ORIG-customize-face)
+  (defalias 'icicle-ORIG-customize-face (symbol-function 'customize-face)))
 
-;;;###autoload (autoload 'icicle-customize-face "icicles")
 (defun icicle-customize-face (face &optional other-window)
   "Customize face FACE.  If OTHER-WINDOW is non-nil, use another window.
 Input-candidate completion and cycling are available.  While cycling,
-these keys with prefix `C-' are active:
+these keys with prefix `C-' are active\\<minibuffer-local-completion-map>:
 
 `C-mouse-2', `C-RET' - Act on current completion candidate only
 `C-down'  - Move to next completion candidate and act
@@ -1659,63 +1948,67 @@ these keys with prefix `C-' are active:
 `C-prior' - Move to previous apropos-completion candidate and act
 `C-end'   - Move to next prefix-completion candidate and act
 `C-home'  - Move to previous prefix-completion candidate and act
-`M-!'     - Act on *all* candidates (or all that are saved):
+`\\[icicle-all-candidates-list-action]'     - Act on *all* candidates (or all that are saved):
             Customize all in the same buffer.
-`C-!'     - Act on *all* candidates (or all that are saved):
+`\\[icicle-all-candidates-action]'     - Act on *all* candidates (or all that are saved):
             Customize each in a separate buffer.
 
 When candidate action and cycling are combined (e.g. `C-next'), option
 `icicle-act-before-cycle-flag' determines which occurs first.
 
 With prefix `C-M-' instead of `C-', the same keys (`C-M-mouse-2',
-`C-M-RET', `C-M-down', and so on) provide help about candidates.
+`C-M-return', `C-M-down', and so on) provide help about candidates.
 
 Use `mouse-2', `RET', or `S-RET' to finally choose a candidate,
 or `C-g' to quit.
 
 With a prefix argument, you can enter multiple faces at the same time
-with `RET' (in Emacs 22 or later).  This gives you the completion
-behavior of `customize-face' in vanilla Emacs.  The advantage is that
-the default value is the list of all faces under the cursor.  The
-disadvantage is that face candidates are not WYSIWYG in buffer
-`*Completions*'.
+with a single `RET' (in Emacs 22 or later).  This gives you more or
+less the `crm' completion behavior of `customize-face' in vanilla
+Emacs.  Most Icicles completion features are still available, but
+`TAB' performs `crm' completion, so it does not also cycle among
+completion candidates.  You can, as always, use `down' to do that.
+
+A advantage of using a prefix argument is that the default value is
+the list of all faces under the cursor.  A disadvantage is that face
+candidates are not WYSIWYG in buffer `*Completions*'.
 
 This is an Icicles command - see command `icicle-mode'."
   (interactive
-   (list (let* ((icicle-list-use-nth-parts             '(1))
+   (list (let* ((icicle-multi-completing-p             t)
+                (icicle-list-use-nth-parts             '(1))
                 (icicle-candidate-action-fn
-                 #'(lambda (x)
-                     (old-customize-face (intern (icicle-transform-multi-completion x)))
-                     (select-window (minibuffer-window))
-                     (select-frame-set-input-focus (selected-frame))))
+                 (lambda (x)
+                   (icicle-ORIG-customize-face (intern (icicle-transform-multi-completion x)))
+                   (select-window (minibuffer-window))
+                   (select-frame-set-input-focus (selected-frame))))
                 (icicle-all-candidates-list-action-fn  'icicle-customize-faces)
                 (icicle-orig-window                    (selected-window)) ; For alt actions.
                 (alt-fn                                nil)
                 (icicle-candidate-alt-action-fn
-                 (or icicle-candidate-alt-action-fn
-                     (setq alt-fn  (icicle-alt-act-fn-for-type "face"))))
+                 (or icicle-candidate-alt-action-fn  (setq alt-fn  (icicle-alt-act-fn-for-type "face"))))
                 (icicle-all-candidates-list-alt-action-fn ; M-|'
                  (or icicle-all-candidates-list-alt-action-fn
-                     alt-fn (icicle-alt-act-fn-for-type "face"))))
-           (if (and (> emacs-major-version 21) current-prefix-arg)
+                     alt-fn
+                     (icicle-alt-act-fn-for-type "face"))))
+           (if (and (> emacs-major-version 21)  current-prefix-arg)
                (read-face-name "Customize face: " "all faces" t)
              (read-face-name "Customize face: ")))))
   (if other-window
       (if (> emacs-major-version 23)
-          (old-customize-face face t)
-        (old-customize-face-other-window face))
-    (old-customize-face face)))
+          (icicle-ORIG-customize-face face t)
+        (icicle-ORIG-customize-face-other-window face))
+    (icicle-ORIG-customize-face face)))
 
 (defun icicle-customize-faces (faces)
   "Open Customize buffer on all faces in list FACES."
   (let ((icicle-list-nth-parts-join-string  ": ")
         (icicle-list-join-string            ": ")
-        ;; $$$$$$ (icicle-list-end-string             "")
+        ;; $$$$$$ (icicle-list-end-string   "")
         (icicle-list-use-nth-parts          '(1)))
     (custom-buffer-create
      (custom-sort-items
-      (mapcar #'(lambda (f) (list (intern (icicle-transform-multi-completion f)) 'custom-face))
-              faces)
+      (mapcar (lambda (f) (list (intern (icicle-transform-multi-completion f)) 'custom-face))  faces)
       t custom-buffer-order-groups)
      "*Customize Apropos*")))
 
@@ -1723,7 +2016,6 @@ This is an Icicles command - see command `icicle-mode'."
 ;; 1. Uses `completing-read' to read the regexp.
 ;; 2. Fixes Emacs bugs #11132, #11126.
 ;;
-;;;###autoload (autoload 'icicle-customize-apropos "icicles")
 (defun icicle-customize-apropos (pattern &optional type msgp)
   "Customize all loaded user preferences matching PATTERN.
 When prompted for the PATTERN, you can use completion against
@@ -1761,20 +2053,20 @@ expect.  For better matching use Icicles progressive completion, i.e.,
 separate the words (any strings, in fact, including regexps) using
 `S-SPC', not just `SPC'."
   (interactive
-   (let* ((pref-arg  current-prefix-arg)
-          (pred                                    (lambda (s)
+   (let* ((pref-arg                                current-prefix-arg)
+          (pred                                    `(lambda (s)
                                                      (unless (symbolp s)  (setq s  (intern s)))
                                                      (or (get s 'custom-group)
-                                                         (custom-facep s)
-                                                         (and (boundp s)
-                                                              (or (get s 'saved-value)
-                                                                  (custom-variable-p s)
-                                                                  (if (null pref-arg)
-                                                                      (user-variable-p s)
-                                                                    (get s 'variable-documentation)))))))
+                                                      (custom-facep s)
+                                                      (and (boundp s)
+                                                       (or (get s 'saved-value)
+                                                        (custom-variable-p s)
+                                                        (if (null ',pref-arg)
+                                                            (user-variable-p s)
+                                                          (get s 'variable-documentation)))))))
           (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
           (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred)))
-     (list (completing-read "Customize (pattern): " obarray (and icompletep pred) nil nil 'regexp-history)
+     (list (completing-read "Customize (pattern): " obarray (and icompletep  pred) nil nil 'regexp-history)
            pref-arg
            t)))
   (let ((found  ()))
@@ -1783,21 +2075,21 @@ separate the words (any strings, in fact, including regexps) using
                (not (string= "" pattern)))
       (setq pattern  (split-string pattern "[ \t]+" 'OMIT-NULLS)))
     (when (fboundp 'apropos-parse-pattern) (apropos-parse-pattern pattern)) ; Emacs 22+
-    (when msgp (message "Gathering apropos data for customize..."))
-    (mapatoms `(lambda (symbol)
+    (when msgp (message "Gathering apropos data for customize `%s'..." pattern))
+    (mapatoms `(lambda (symbol)         ; FREE here: APROPOS-REGEXP.
                 (when (string-match ,(if (> emacs-major-version 21) apropos-regexp pattern)
                                     (symbol-name symbol))
-                  (when (and (not (memq type '(faces options))) ; groups or t
+                  (when (and (not (memq ,type '(faces options))) ; groups or t
                              (get symbol 'custom-group))
                     (push (list symbol 'custom-group) found))
-                  (when (and (not (memq type '(options groups))) ; faces or t
+                  (when (and (not (memq ,type '(options groups))) ; faces or t
                              (custom-facep symbol))
                     (push (list symbol 'custom-face) found))
-                  (when (and (not (memq type '(groups faces))) ; options or t
+                  (when (and (not (memq ,type '(groups faces))) ; options or t
                              (boundp symbol)
                              (or (get symbol 'saved-value)
                                  (custom-variable-p symbol)
-                                 (if (memq type '(nil options))
+                                 (if (memq ,type '(nil options))
                                      (user-variable-p symbol)
                                    (get symbol 'variable-documentation))))
                     (push (list symbol 'custom-variable) found)))))
@@ -1814,23 +2106,23 @@ separate the words (any strings, in fact, including regexps) using
 (unless (fboundp 'custom-variable-p)
   (defun custom-variable-p (variable)
     "Return non-nil if VARIABLE is a custom variable."
-    (or (get variable 'standard-value) (get variable 'custom-autoload))))
+    (and (symbolp variable)
+         (or (get variable 'standard-value)  (get variable 'custom-autoload)))))
 
 ;; Icicles replacement for `customize-apropos-faces', defined in `cus-edit.el'.
 ;; 1. Uses `completing-read' to read the regexp.
 ;; 2. Fixes Emacs bug #11124.
 ;;
-;;;###autoload (autoload 'icicle-customize-apropos-faces "icicles")
 (defun icicle-customize-apropos-faces (pattern &optional msgp)
   "Customize all loaded faces matching PATTERN.
 See `icicle-customize-apropos'."
   (interactive
-   (let* ((pred                                    #'(lambda (s)
-                                                       (unless (symbolp s) (setq s  (intern s)))
-                                                       (custom-facep s)))
+   (let* ((pred                                    (lambda (s)
+                                                     (unless (symbolp s) (setq s  (intern s)))
+                                                     (custom-facep s)))
           (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
           (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred)))
-     (list (completing-read "Customize faces (pattern): " obarray (and icompletep pred)
+     (list (completing-read "Customize faces (pattern): " obarray (and icompletep  pred)
                             nil nil 'regexp-history)
            t)))
   (when msgp (message "Gathering apropos data for customizing faces..."))
@@ -1840,17 +2132,16 @@ See `icicle-customize-apropos'."
 ;; 1. Uses `completing-read' to read the regexp.
 ;; 2. Fixes Emacs bug #11124.
 ;;
-;;;###autoload (autoload 'icicle-customize-apropos-groups "icicles")
 (defun icicle-customize-apropos-groups (pattern &optional msgp)
   "Customize all loaded customize groups matching PATTERN.
 See `icicle-customize-apropos'."
   (interactive
-   (let* ((pred                                    #'(lambda (s)
-                                                       (unless (symbolp s) (setq s  (intern s)))
-                                                       (get s 'custom-group)))
+   (let* ((pred                                    (lambda (s)
+                                                     (unless (symbolp s) (setq s  (intern s)))
+                                                     (get s 'custom-group)))
           (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
           (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred)))
-     (list (completing-read "Customize groups (pattern): " obarray (and icompletep pred)
+     (list (completing-read "Customize groups (pattern): " obarray (and icompletep  pred)
                             nil nil 'regexp-history)
            t)))
   (when msgp (message "Gathering apropos data for customizing groups..."))
@@ -1860,7 +2151,6 @@ See `icicle-customize-apropos'."
 ;; 1. Uses `completing-read' to read the regexp.
 ;; 2. Fixes Emacs bugs #11124, #11128.
 ;;
-;;;###autoload (autoload 'icicle-customize-apropos-options "icicles")
 (defun icicle-customize-apropos-options (pattern &optional arg msgp)
   "Customize all loaded user options matching PATTERN.
 See `icicle-customize-apropos'.
@@ -1880,14 +2170,13 @@ the customize buffer."
                                                         (get s 'variable-documentation))))))
           (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
           (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred)))
-     (list (completing-read "Customize options (pattern): " obarray (and icompletep pred)
+     (list (completing-read "Customize options (pattern): " obarray (and icompletep  pred)
                             nil nil 'regexp-history)
            pref-arg
            t)))
   (when msgp (message "Gathering apropos data for customizing options..."))
-  (customize-apropos pattern (or arg 'options)))
+  (customize-apropos pattern (or arg  'options)))
 
-;;;###autoload (autoload 'icicle-customize-apropos-options-of-type "icicles")
 (icicle-define-command icicle-customize-apropos-options-of-type
   "Customize all loaded user options of a given type.
 Enter patterns for the OPTION name and TYPE definition in the
@@ -1904,13 +2193,15 @@ the use of a prefix argument."          ; Doc string
   prompt                                ; `completing-read' args
   'icicle-describe-opt-of-type-complete nil nil nil nil nil nil
   ((prompt                             "OPTION `C-M-j' TYPE: ") ; Bindings
+   (icicle-multi-completing-p          t)
    (icicle-candidate-properties-alist  '((1 (face icicle-candidate-part))))
    ;; Bind `icicle-apropos-complete-match-fn' to nil to prevent automatic input matching
    ;; in `icicle-unsorted-apropos-candidates' etc., because `icicle-describe-opt-of-type-complete'
    ;; does everything.
-   (icicle-apropos-complete-match-fn   nil)
-   (icicle-candidate-help-fn           'icicle-describe-opt-action)
-   (icicle-pref-arg                    current-prefix-arg))
+   (icicle-apropos-complete-match-fn       nil)
+   (icicle-last-apropos-complete-match-fn  'icicle-multi-comp-apropos-complete-match)
+   (icicle-candidate-help-fn               'icicle-describe-opt-action)
+   (icicle-pref-arg                        current-prefix-arg))
   (progn (put-text-property 0 1 'icicle-fancy-candidates t prompt) ; First code
          (icicle-highlight-lighter)
          (message "Gathering user options and their types...")))
@@ -1918,11 +2209,10 @@ the use of a prefix argument."          ; Doc string
 (defun icicle-customize-apropos-opt-action (opt+type)
   "Action function for `icicle-customize-apropos-options-of-type'."
   (let ((icicle-list-use-nth-parts  '(1)))
-    (custom-buffer-create (custom-sort-items (mapcar #'(lambda (s) (list (intern s) 'custom-variable))
+    (custom-buffer-create (custom-sort-items (mapcar (lambda (s) (list (intern s) 'custom-variable))
                                                      icicle-completion-candidates)
                                              t "*Customize Apropos*"))))
 
-;;;###autoload (autoload 'icicle-apropos "icicles")
 (defun icicle-apropos (pattern &optional do-all msgp)
   "Describe Lisp symbols whose names match PATTERN.
 By default, show symbols only if they are defined as functions,
@@ -1960,7 +2250,7 @@ separate the words (any strings, in fact, including regexps) using
    (list
     (unwind-protect
          (progn
-           (mapatoms #'(lambda (symb) (when (fboundp symb) (put symb 'icicle-special-candidate t))))
+           (mapatoms (lambda (symb) (when (fboundp symb) (put symb 'icicle-special-candidate t))))
            (let ((icicle-fancy-candidates-p  t)
                  (icicle-candidate-alt-action-fn
                   (or icicle-candidate-alt-action-fn
@@ -1970,7 +2260,7 @@ separate the words (any strings, in fact, including regexps) using
                       (icicle-alt-act-fn-for-type "symbol"))))
              (completing-read "Apropos symbol (regexp or words): " obarray
                               nil nil nil 'regexp-history)))
-      (mapatoms #'(lambda (symb) (put symb 'icicle-special-candidate nil))))
+      (mapatoms (lambda (symb) (put symb 'icicle-special-candidate nil))))
     current-prefix-arg
     t))
   (when (and (> emacs-major-version 21)  (require 'apropos nil t)
@@ -1996,13 +2286,12 @@ See `icicle-apropos' for a description of PATTERN."
       (list
        (unwind-protect
             (progn
-              (mapatoms #'(lambda (symb)
-                            (when (user-variable-p symb) (put symb 'icicle-special-candidate t))))
+              (mapatoms (lambda (symb) (when (user-variable-p symb) (put symb 'icicle-special-candidate t))))
               (let* ((icicle-fancy-candidates-p  t)
-                     (pred                                      #'(lambda (s)
-                                                                    (unless (symbolp s) (setq s  (intern s)))
-                                                                    (and (boundp s)
-                                                                         (get s 'variable-documentation))))
+                     (pred                                      (lambda (s)
+                                                                  (unless (symbolp s) (setq s  (intern s)))
+                                                                  (and (boundp s)
+                                                                       (get s 'variable-documentation))))
                      (icompletep                                (and (boundp 'icomplete-mode)
                                                                      icomplete-mode))
                      (icicle-must-pass-after-match-predicate    (and (not icompletep)  pred))
@@ -2011,10 +2300,10 @@ See `icicle-apropos' for a description of PATTERN."
                      (icicle-all-candidates-list-alt-action-fn  (or icicle-all-candidates-list-alt-action-fn
                                                                     (icicle-alt-act-fn-for-type "variable"))))
                 (completing-read
-                 (concat "Apropos variable (regexp" (and (>= emacs-major-version 22) " or words")
+                 (concat "Apropos variable (regexp" (and (>= emacs-major-version 22)  " or words")
                          "): ")
-                 obarray (and icompletep pred) nil nil 'regexp-history)))
-         (mapatoms #'(lambda (symb) (put symb 'icicle-special-candidate nil))))
+                 obarray (and icompletep  pred) nil nil 'regexp-history)))
+         (mapatoms (lambda (symb) (put symb 'icicle-special-candidate nil))))
        t))
      (when (and (> emacs-major-version 21)  (require 'apropos nil t)
                 (string= (regexp-quote pattern) pattern)
@@ -2029,20 +2318,20 @@ See `icicle-apropos' for a description of PATTERN."
 You can see the list of matches with `S-TAB'.
 See `icicle-apropos' for a description of PATTERN."
      (interactive
-      (let* ((pred                                    #'(lambda (s)
-                                                          (unless (symbolp s) (setq s  (intern s)))
-                                                          (user-variable-p s)))
-             (icompletep                              (and (boundp 'icomplete-mode) icomplete-mode))
+      (let* ((pred                                    (lambda (s)
+                                                        (unless (symbolp s) (setq s  (intern s)))
+                                                        (user-variable-p s)))
+             (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
              (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred)))
         (list (completing-read
-               (concat "Apropos user option (regexp" (and (>= emacs-major-version 22) " or words")
-                       "): ") obarray (and icompletep pred) nil nil 'regexp-history)
+               (concat "Apropos user option (regexp" (and (>= emacs-major-version 22)  " or words")
+                       "): ") obarray (and icompletep  pred) nil nil 'regexp-history)
               t)))
      (let ((apropos-do-all  nil)
            (icicle-candidate-alt-action-fn
-            (or icicle-candidate-alt-action-fn (icicle-alt-act-fn-for-type "option")))
+            (or icicle-candidate-alt-action-fn  (icicle-alt-act-fn-for-type "option")))
            (icicle-all-candidates-list-alt-action-fn
-            (or icicle-all-candidates-list-alt-action-fn (icicle-alt-act-fn-for-type "option"))))
+            (or icicle-all-candidates-list-alt-action-fn  (icicle-alt-act-fn-for-type "option"))))
        (when (and (> emacs-major-version 21)  (require 'apropos nil t)
                   (string= (regexp-quote pattern) pattern)
                   (not (string= "" pattern)))
@@ -2061,23 +2350,22 @@ See `icicle-apropos' for a description of PATTERN."
       (list
        (unwind-protect
             (progn
-              (mapatoms #'(lambda (symb)
-                            (when (commandp symb) (put symb 'icicle-special-candidate t))))
+              (mapatoms (lambda (symb) (when (commandp symb) (put symb 'icicle-special-candidate t))))
               (let* ((icicle-fancy-candidates-p               t)
-                     (pred                                     #'(lambda (s)
-                                                                   (unless (symbolp s) (setq s  (intern s)))
-                                                                   (fboundp s)))
-                     (icompletep                              (and (boundp 'icomplete-mode) icomplete-mode))
+                     (pred                                     (lambda (s)
+                                                                 (unless (symbolp s) (setq s  (intern s)))
+                                                                 (fboundp s)))
+                     (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
                      (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred))
                      (icicle-candidate-alt-action-fn          (or icicle-candidate-alt-action-fn
                                                                   (icicle-alt-act-fn-for-type "function")))
-                     (icicle-all-candidates-list-alt-action-fn  
+                     (icicle-all-candidates-list-alt-action-fn
                       (or icicle-all-candidates-list-alt-action-fn
                           (icicle-alt-act-fn-for-type "function"))))
                 (completing-read
-                 (concat "Apropos function (regexp" (and (>= emacs-major-version 22) " or words")
-                         "): ") obarray (and icompletep pred) nil nil 'regexp-history)))
-         (mapatoms #'(lambda (symb) (put symb 'icicle-special-candidate nil))))
+                 (concat "Apropos function (regexp" (and (>= emacs-major-version 22)  " or words")
+                         "): ") obarray (and icompletep  pred) nil nil 'regexp-history)))
+         (mapatoms (lambda (symb) (put symb 'icicle-special-candidate nil))))
        t))
      (when (and (> emacs-major-version 21)  (require 'apropos nil t)
                 (string= (regexp-quote pattern) pattern)
@@ -2092,18 +2380,18 @@ See `icicle-apropos' for a description of PATTERN."
 You can see the list of matches with `S-TAB'.
 See `icicle-apropos' for a description of PATTERN."
      (interactive
-      (let* ((pred                                      #'(lambda (s)
-                                                            (unless (symbolp s) (setq s  (intern s)))
-                                                            (commandp s)))
-             (icompletep                                (and (boundp 'icomplete-mode) icomplete-mode))
+      (let* ((pred                                      (lambda (s)
+                                                          (unless (symbolp s) (setq s  (intern s)))
+                                                          (commandp s)))
+             (icompletep                                (and (boundp 'icomplete-mode)  icomplete-mode))
              (icicle-must-pass-after-match-predicate    (and (not icompletep)  pred))
              (icicle-candidate-alt-action-fn            (or icicle-candidate-alt-action-fn
                                                             (icicle-alt-act-fn-for-type "command")))
              (icicle-all-candidates-list-alt-action-fn  (or icicle-all-candidates-list-alt-action-fn
                                                             (icicle-alt-act-fn-for-type "command"))))
         (list (completing-read
-               (concat "Apropos command (regexp" (and (>= emacs-major-version 22) " or words")
-                       "): ") obarray (and icompletep pred) nil nil 'regexp-history)
+               (concat "Apropos command (regexp" (and (>= emacs-major-version 22)  " or words")
+                       "): ") obarray (and icompletep  pred) nil nil 'regexp-history)
               t)))
      (when (and (> emacs-major-version 21)  (require 'apropos nil t)
                 (string= (regexp-quote pattern) pattern)
@@ -2128,22 +2416,22 @@ using face `icicle-special-candidate'."
       (list
        (unwind-protect
             (progn
-              (unless (or (boundp 'apropos-do-all) (require 'apropos nil t))
+              (unless (or (boundp 'apropos-do-all)  (require 'apropos nil t))
                 (error "Library `apropos' not found"))
-              (when (or current-prefix-arg apropos-do-all)
-                (mapatoms #'(lambda (symb)
-                              (when (user-variable-p symb) (put symb 'icicle-special-candidate t)))))
-              (let* ((icicle-fancy-candidates-p               (or current-prefix-arg apropos-do-all))
-                     (pred                                    (if (or current-prefix-arg apropos-do-all)
-                                                                  #'(lambda (s)
-                                                                      (unless (symbolp s)
-                                                                        (setq s  (intern s)))
-                                                                      (and (boundp s)
-                                                                           (get s 'variable-documentation)))
-                                                                #'(lambda (s)
-                                                                    (unless (symbolp s) (setq s  (intern s)))
-                                                                    (user-variable-p s))))
-                     (icompletep                                (and (boundp 'icomplete-mode) icomplete-mode))
+              (when (or current-prefix-arg  apropos-do-all)
+                (mapatoms (lambda (symb)
+                            (when (user-variable-p symb) (put symb 'icicle-special-candidate t)))))
+              (let* ((icicle-fancy-candidates-p               (or current-prefix-arg  apropos-do-all))
+                     (pred                                    (if (or current-prefix-arg  apropos-do-all)
+                                                                  (lambda (s)
+                                                                    (unless (symbolp s)
+                                                                      (setq s  (intern s)))
+                                                                    (and (boundp s)
+                                                                         (get s 'variable-documentation)))
+                                                                (lambda (s)
+                                                                  (unless (symbolp s) (setq s  (intern s)))
+                                                                  (user-variable-p s))))
+                     (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
                      (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred))
                      (icicle-candidate-alt-action-fn          (or icicle-candidate-alt-action-fn
                                                                   (icicle-alt-act-fn-for-type
@@ -2156,12 +2444,12 @@ using face `icicle-special-candidate'."
                                                           "variable"
                                                         "option")))))
                 (completing-read
-                 (concat "Apropos " (if (or current-prefix-arg apropos-do-all)
+                 (concat "Apropos " (if (or current-prefix-arg  apropos-do-all)
                                         "variable" "user option")
-                         " (regexp" (and (>= emacs-major-version 22) " or words") "): ")
-                 obarray (and icompletep pred) nil nil 'regexp-history)))
-         (when (or current-prefix-arg apropos-do-all)
-           (mapatoms #'(lambda (symb) (put symb 'icicle-special-candidate nil)))))
+                         " (regexp" (and (>= emacs-major-version 22)  " or words") "): ")
+                 obarray (and icompletep  pred) nil nil 'regexp-history)))
+         (when (or current-prefix-arg  apropos-do-all)
+           (mapatoms (lambda (symb) (put symb 'icicle-special-candidate nil)))))
        current-prefix-arg
        t))
      (when (and (> emacs-major-version 21)  (require 'apropos nil t)
@@ -2193,19 +2481,18 @@ of strings is used as a word list."
             (progn
               (unless (boundp 'apropos-do-all)
                 (unless (require 'apropos nil t) (error "Library `apropos' not found")))
-              (when (or current-prefix-arg apropos-do-all)
-                (mapatoms #'(lambda (symb)
-                              (when (commandp symb) (put symb 'icicle-special-candidate t)))))
-              (let* ((icicle-fancy-candidates-p               (or current-prefix-arg apropos-do-all))
+              (when (or current-prefix-arg  apropos-do-all)
+                (mapatoms (lambda (symb) (when (commandp symb) (put symb 'icicle-special-candidate t)))))
+              (let* ((icicle-fancy-candidates-p               (or current-prefix-arg  apropos-do-all))
                      (pred                                    (if current-prefix-arg
-                                                                  #'(lambda (s)
-                                                                      (unless (symbolp s)
-                                                                        (setq s  (intern s)))
-                                                                      (fboundp s))
-                                                                #'(lambda (s)
-                                                                    (unless (symbolp s) (setq s  (intern s)))
-                                                                    (commandp s))))
-                     (icompletep                              (and (boundp 'icomplete-mode) icomplete-mode))
+                                                                  (lambda (s)
+                                                                    (unless (symbolp s)
+                                                                      (setq s  (intern s)))
+                                                                    (fboundp s))
+                                                                (lambda (s)
+                                                                  (unless (symbolp s) (setq s  (intern s)))
+                                                                  (commandp s))))
+                     (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
                      (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred))
                      (icicle-candidate-alt-action-fn           (or icicle-candidate-alt-action-fn
                                                                    (icicle-alt-act-fn-for-type
@@ -2218,12 +2505,12 @@ of strings is used as a word list."
                                                           "function"
                                                         "command")))))
                 (completing-read
-                 (concat "Apropos " (if (or current-prefix-arg apropos-do-all)
+                 (concat "Apropos " (if (or current-prefix-arg  apropos-do-all)
                                         "command or function" "command")
-                         " (regexp" (and (>= emacs-major-version 22) " or words") "): ")
-                 obarray (and icompletep pred) nil nil 'regexp-history)))
-         (when (or current-prefix-arg apropos-do-all)
-           (mapatoms #'(lambda (symb) (put symb 'icicle-special-candidate nil)))))
+                         " (regexp" (and (>= emacs-major-version 22)  " or words") "): ")
+                 obarray (and icompletep  pred) nil nil 'regexp-history)))
+         (when (or current-prefix-arg  apropos-do-all)
+           (mapatoms (lambda (symb) (put symb 'icicle-special-candidate nil)))))
        current-prefix-arg
        nil
        t))
@@ -2235,7 +2522,6 @@ of strings is used as a word list."
      (when msgp (message (format "Gathering data apropos %s..." (if do-all "functions" "commands"))))
      (apropos-command pattern do-all var-predicate))))
 
-;;;###autoload (autoload 'icicle-apropos-options-of-type "icicles")
 (icicle-define-command icicle-apropos-options-of-type
   "Show user options of a given type.
 Enter patterns for the OPTION name and TYPE definition in the
@@ -2245,20 +2531,24 @@ by default.  (`^G' here means the Control-g character, input using
 
 OPTION is a regexp that is matched against option names.
 
-See `icicle-describe-option-of-type', which handles input and
-completion similarly, for a full description of TYPE, matching, and
-the use of a prefix argument."          ; Doc string
+See also:
+* `icicle-describe-option-of-type', which handles input and completion
+  similarly, for a full description of TYPE, matching, and the use of
+  a prefix argument
+* `icicle-apropos-value', using `C-$' to filter to options only" ; Doc string
   icicle-apropos-opt-action             ; Action function
-  prompt                                ; `completing-read' args
+  prompt                       ; `completing-read' args
   'icicle-describe-opt-of-type-complete nil nil nil nil nil nil
-  ((prompt                             "OPTION `C-M-j' TYPE: ") ; Bindings
-   (icicle-candidate-properties-alist  '((1 (face icicle-candidate-part))))
+  ((prompt                                 "OPTION `C-M-j' TYPE: ") ; Bindings
+   (icicle-multi-completing-p              t)
+   (icicle-candidate-properties-alist      '((1 (face icicle-candidate-part))))
    ;; Bind `icicle-apropos-complete-match-fn' to nil to prevent automatic input matching
    ;; in `icicle-unsorted-apropos-candidates' etc., because `icicle-describe-opt-of-type-complete'
    ;; does everything.
    (icicle-apropos-complete-match-fn   nil)
-   (icicle-candidate-help-fn           'icicle-describe-opt-action)
-   (icicle-pref-arg                    current-prefix-arg))
+   (icicle-last-apropos-complete-match-fn  'icicle-multi-comp-apropos-complete-match)
+   (icicle-candidate-help-fn               'icicle-describe-opt-action)
+   (icicle-pref-arg                        current-prefix-arg))
   (progn (put-text-property 0 1 'icicle-fancy-candidates t prompt) ; First code
          (icicle-highlight-lighter)
          (message "Gathering user options and their types...")))
@@ -2268,7 +2558,6 @@ the use of a prefix argument."          ; Doc string
   (let ((icicle-list-use-nth-parts  '(1)))
     (apropos-option (icicle-transform-multi-completion opt+type))))
 
-;;;###autoload (autoload 'icicle-apropos-zippy "icicles")
 (defun icicle-apropos-zippy (regexp)
   "Show all Zippy quotes matching the regular-expression REGEXP.
 Return the list of matches."
@@ -2287,10 +2576,142 @@ Return the list of matches."
         (while matches
           (princ (car matches))
           (setq matches  (cdr matches))
-          (and matches (princ "\n\n")))))
+          (and matches  (princ "\n\n")))))
     matches))                           ; Return matching Zippyisms.
 
-;;;###autoload (autoload 'icicle-describe-option-of-type "icicles")
+(icicle-define-command icicle-apropos-value
+  "Choose a variable, function, or other symbol description.
+This is similar to vanilla command `apropos-value', but you can match
+against the variable name and its printed value at the same time.
+
+By default, each completion candidate is multi-completion composed of
+a variable name plus its value.  They are separated by
+`icicle-list-join-string' \(\"^G^J\", by default).
+
+With a prefix arg, candidates are different kinds of symbols:
+
+ < 0: functions and their defs (but byte-compiled defs are skipped)
+ > 0: symbols and their plists
+ = 0: variables and their values, functions and their definitions, and
+     other symbols and their plists
+
+plain (`C-u'): use the last-computed (cached) set of candidates
+
+You can use `C-$' during completion to toggle filtering the domain of
+initial candidates according to the prefix argument, as follows:
+
+none: only user options (+ values)
+ < 0: only commands (+ definitions)
+ > 0: only faces (+ plists)
+ = 0: only options (+ values), commands (+ defs), faces (+ plists)
+
+Remember that you can use \\<minibuffer-local-completion-map>\
+`\\[icicle-cycle-incremental-completion]' to toggle incremental completion.
+
+See also:
+* `icicle-apropos-vars-w-val-satisfying',
+  `icicle-describe-vars-w-val-satisfying' - values satisfy a predicate
+* `icicle-plist' - similar to this command with positive prefix arg
+* `icicle-vardoc', `icicle-fundoc', `icicle-doc' - match name & doc
+* `icicle-apropos-options-of-type', `icicle-describe-option-of-type' -
+  match name & defcustom type"
+  icicle-doc-action                     ; Action function
+  prompt                                ; `completing-read' args
+  (let ((cands  (and (consp pref-arg)  icicle-apropos-value-last-initial-cand-set))
+        cand)
+    (unless cands                       ; COLLECTION arg is an alist whose items are ((SYMB INFO)).
+      (mapatoms (lambda (symb)
+                  ;; Exclude the local vars bound by this command.  They are not what the user wants to see.
+                  (setq cand  (and (not (memq symb '(cands  pref-arg  num-arg  prompt
+                                                     icicle-toggle-transforming-message
+                                                     icicle-candidate-properties-alist
+                                                     icicle-multi-completing-p  icicle-list-use-nth-parts
+                                                     icicle-transform-before-sort-p  icicle-transform-function
+                                                     icicle-last-transform-function  print-fn  make-cand)))
+                                   (funcall make-cand symb)))
+                  (when cand (push cand cands))))
+      (setq icicle-apropos-value-last-initial-cand-set  cands))
+    cands)
+  nil nil nil nil nil nil
+  ((pref-arg                            current-prefix-arg)
+   (num-arg                             (prefix-numeric-value pref-arg))
+   (prompt                              (format "SYMBOL `C-M-j' %s: " (if pref-arg "INFO" "VALUE"))) ; Bindings
+   (icicle-toggle-transforming-message  (cond ((or (consp pref-arg)  (= num-arg 0))
+                                               "Filtering to OPTIONS, COMMANDS, & FACES is now %s")
+                                              ((and pref-arg  (> num-arg 0))
+                                               "Filtering to FACES (+ plists) is now %s")
+                                              ((< num-arg 0)
+                                               "Filtering to COMMANDS (+ defs) is now %s")
+                                              (t "Filtering to user OPTIONS (+ values) is now %s")))
+   (icicle-candidate-properties-alist   '((1 (face icicle-candidate-part))))
+   (icicle-multi-completing-p           t)
+   (icicle-list-use-nth-parts           '(1))
+   (icicle-transform-before-sort-p      t)
+   (icicle-transform-function           nil) ; No transformation: all symbols.
+   (icicle-last-transform-function      (lambda (cands) ; `C-$': only user options, commands, or faces.
+                                          (loop for cc in cands
+                                                with symb
+                                                do (setq symb  (intern (icicle-transform-multi-completion cc)))
+                                                if (cond ((or (consp `,pref-arg)  (= `,num-arg 0))
+                                                          (or (user-variable-p symb)
+                                                              (commandp symb)
+                                                              (facep symb)))
+                                                         ((and `,pref-arg  (> `,num-arg 0))
+                                                          (facep symb))
+                                                         ((< `,num-arg 0)
+                                                          (commandp symb))
+                                                         (t
+                                                          (user-variable-p symb)))
+                                                collect cc)))
+   (print-fn                            (lambda (obj)
+                                          (let ((print-circle  t))
+;;; $$$$$$                                  (condition-case nil
+;;;                                             (prin1-to-string obj)
+;;;                                           (error "`icicle-apropos-value' printing error")))))
+                                            (prin1-to-string obj))))
+   (make-cand                           (cond ((< num-arg 0) ; Function
+                                               (lambda (symb)
+                                                 (and (fboundp symb)
+                                                      `((,(symbol-name symb)
+                                                         ,(if (byte-code-function-p (symbol-function symb))
+                                                              ""
+                                                              (funcall print-fn (symbol-function symb))))))))
+                                              ((= num-arg 0) ; Do ALL
+                                               (lambda (symb) ; Favor the var, then the fn, then the plist.
+                                                 (cond ((boundp symb)
+                                                        `((,(symbol-name symb)
+                                                           ,(funcall print-fn (symbol-value symb)))))
+                                                       ((fboundp symb)
+                                                        `((,(symbol-name symb)
+                                                           ,(if (byte-code-function-p (symbol-function symb))
+                                                                ""
+                                                                (funcall print-fn (symbol-function symb))))))
+                                                       ((symbol-plist symb)
+                                                        `((,(symbol-name symb)
+                                                           ,(funcall print-fn (symbol-plist symb))))))))
+                                              ((and pref-arg  (> num-arg 0)) ; Plist
+                                               (lambda (symb)
+                                                 (and (symbol-plist symb)
+                                                      `((,(symbol-name symb)
+                                                         ,(funcall print-fn (symbol-plist symb)))))))
+                                              (t ; Variable
+                                               (lambda (symb)
+                                                 (and (boundp symb)
+                                                      `((,(symbol-name symb)
+                                                         ,(funcall print-fn (symbol-value symb))))))))))
+  (progn (put-text-property 0 1 'icicle-fancy-candidates t prompt) ; First code.
+         (icicle-highlight-lighter)
+         (message "Gathering %s%s..." (cond ((consp pref-arg)              'SYMBOLS)
+                                            ((and pref-arg  (< num-arg 0)) 'FUNCTIONS)
+                                            ((and pref-arg  (= num-arg 0)) "all SYMBOLS")
+                                            ((and pref-arg  (> num-arg 0)) 'SYMBOLS)
+                                            (t                             'VARIABLES))
+                  (cond ((consp pref-arg) " from last invocation (cached)")
+                        ((and pref-arg  (< num-arg 0)) " and their definitions")
+                        ((and pref-arg  (= num-arg 0)) " and their info")
+                        ((and pref-arg  (> num-arg 0)) " and their plists")
+                        (t " and their values")))))
+
 (icicle-define-command icicle-describe-option-of-type ; Bound to `C-h C-o'.  Command name
   "Describe a user option that was defined with a given `defcustom' type.
 Enter patterns for the OPTION name and TYPE definition in the
@@ -2298,6 +2719,31 @@ minibuffer, separated by `icicle-list-join-string', which is \"^G^J\",
 by default.  (`^G' here means the Control-g character, input using
 `C-h C-g'.  Likewise, for `^J'.)
 
+Remember that you can insert `icicle-list-join-string' using `C-M-j'.
+
+This command binds option `icicle-dot-string' to the value of
+`icicle-anychar-regexp' for the duration, which means that `.' in your
+input to this command matches any character, including a newline char.
+
+This is for convenience because `defcustom' type sexps are often
+multiline.  This is particularly important for progressive completion,
+where your input definitely matches as a regexp (apropos completion).
+If you do not want `.' to match newlines, use `C-M-.' during the
+command.
+
+Example use of progressive completion:
+
+1. C-h C-o ici C-M-j choic S-TAB
+
+   That shows all options whose names are apropos-matched by `ici' and
+   whose types are matched by `choic'.
+
+2. S-SPC om C-M-j sexp
+
+   That limits the matches to options whose names also match `om' and
+   whose types also match `sexp'.'
+
+
 OPTION is a regexp that is matched against option names.
 
 Depending on the prefix arg, TYPE is interpreted as either of these:
@@ -2357,36 +2803,34 @@ input the default separator.
 For example, to match all Icicles options whose type matches `string'
 \(according to the prefix arg), use `S-TAB' with this input:
 
-icicle.*^G
-string$
+ icicle C-M-j string$
 
 If you instead want all Icicles options whose type definition contains
 `string', as in (repeat string), then use this:
 
-icicle.*^G
-\[^^G]*string
-
-Here, `[^^G]' matches any character except ^G, which includes newline.
-If you use `.'  here instead of `[^^G]', then only the first lines of
-type definitions are searched for `string', because `.' matches any
-character except a newline.  (The first `^' in `[^^G]' is a circumflex
-character.  The second `^' is part of `^G', the printed representation
-of a Control-g character.)
+ icicle C-M-j string
 
 Remember that you can use `\\<minibuffer-local-completion-map>\
-\\[icicle-cycle-incremental-completion] to toggle incremental completion." ; Doc string
+\\[icicle-cycle-incremental-completion] to toggle incremental completion.
+
+See also:
+* `icicle-apropos-options-of-type', to show options of a given type
+* `icicle-apropos-value', using `C-$' to filter to options only" ; Doc string
   icicle-describe-opt-action            ; Action function
   prompt                                ; `completing-read' args
   'icicle-describe-opt-of-type-complete nil nil nil nil nil nil
-  ((prompt                             "OPTION `C-M-j' TYPE: ") ; Bindings
-   (icicle-candidate-properties-alist  '((1 (face icicle-candidate-part))))
+  ((prompt                                 "OPTION `C-M-j' TYPE: ") ; Bindings
+   (icicle-multi-completing-p              t)
+   (icicle-candidate-properties-alist      '((1 (face icicle-candidate-part))))
+   (icicle-dot-string                      icicle-anychar-regexp)
    ;; Bind `icicle-apropos-complete-match-fn' to nil to prevent automatic input matching
    ;; in `icicle-unsorted-apropos-candidates' etc., because `icicle-describe-opt-of-type-complete'
    ;; does everything.
-   (icicle-apropos-complete-match-fn   nil)
-   (icicle-candidate-help-fn           'icicle-describe-opt-action)
+   (icicle-apropos-complete-match-fn       nil)
+   (icicle-last-apropos-complete-match-fn  'icicle-multi-comp-apropos-complete-match)
+   (icicle-candidate-help-fn               'icicle-describe-opt-action)
    ;; $$$ (icicle-highlight-input-completion-failure nil)
-   (icicle-pref-arg                    current-prefix-arg))
+   (icicle-pref-arg                        current-prefix-arg))
   (progn (put-text-property 0 1 'icicle-fancy-candidates t prompt) ; First code
          (icicle-highlight-lighter)
          (message "Gathering user options and their types...")))
@@ -2403,87 +2847,70 @@ This is used as the value of `minibuffer-completion-table'."
   (setq strg  icicle-current-input)
   ;; Parse strg into its option part and its type part: OPS  and TPS.
   ;; Make raw alist of all options and their types: ((a . ta) (b . tb)...).
-  (let* ((num-prefix  (prefix-numeric-value icicle-pref-arg))
-         (mode        (cond ((not icicle-pref-arg) ; No prefix arg
-                             (nth 4 icicle-option-type-prefix-arg-list))
-                            ((and (consp icicle-pref-arg) (= 16 num-prefix)) ; C-u C-u
-                             (nth 0 icicle-option-type-prefix-arg-list))
-                            ((consp icicle-pref-arg) (nth 2 icicle-option-type-prefix-arg-list)) ; C-u
-                            ((zerop num-prefix) (nth 1 icicle-option-type-prefix-arg-list)) ; C-0
-                            ((wholenump num-prefix) ; C-9
-                             (nth 3 icicle-option-type-prefix-arg-list))
-                            (t (nth 5 icicle-option-type-prefix-arg-list)))) ; C--
-         (ops         (let ((icicle-list-use-nth-parts  '(1)))
-                        (icicle-transform-multi-completion strg)))
-         (tps         (let ((icicle-list-use-nth-parts  '(2)))
-                        (icicle-transform-multi-completion strg)))
-         (tp          (and (not (string= "" tps))
-                           ;; Use regexp if no prefix arg or negative; else use sexp.
-                           (if (memq mode '(inherit-or-regexp direct-or-regexp)) tps (read tps))))
-         (result      nil))
+  (lexical-let* ((num-prefix  (prefix-numeric-value icicle-pref-arg))
+                 (mode        (cond ((not icicle-pref-arg) ; No prefix arg
+                                     (nth 4 icicle-option-type-prefix-arg-list))
+                                    ((and (consp icicle-pref-arg)  (= 16 num-prefix)) ; C-u C-u
+                                     (nth 0 icicle-option-type-prefix-arg-list))
+                                    ((consp icicle-pref-arg) (nth 2 icicle-option-type-prefix-arg-list)) ; C-u
+                                    ((zerop num-prefix) (nth 1 icicle-option-type-prefix-arg-list)) ; C-0
+                                    ((wholenump num-prefix) ; C-9
+                                     (nth 3 icicle-option-type-prefix-arg-list))
+                                    (t (nth 5 icicle-option-type-prefix-arg-list)))) ; C--
+                 (ops         (let ((icicle-list-use-nth-parts  '(1)))
+                                (icicle-transform-multi-completion strg)))
+                 (tps         (let ((icicle-list-use-nth-parts  '(2)))
+                                (icicle-transform-multi-completion strg)))
+                 (tp          (and (not (string= "" tps))
+                                   ;; Use regexp if no prefix arg or negative; else use sexp.
+                                   (if (memq mode '(inherit-or-regexp direct-or-regexp)) tps (read tps))))
+                 (result      ()))
     (mapatoms
-     #'(lambda (symb)
-         (when (if (fboundp 'custom-variable-p) (custom-variable-p symb) (user-variable-p symb))
-           (condition-case nil
-               (push (list symb (get symb 'custom-type)) result)
-             (error nil)))))
+     (lambda (symb)                     ; FREE here: RESULT.
+       (when (if (fboundp 'custom-variable-p) (custom-variable-p symb) (user-variable-p symb))
+         (condition-case nil
+             (push (list symb (get symb 'custom-type)) result)
+           (error nil)))))
     ;; Keep only candidates that correspond to input.
     (setq result
-          (let ((ops-re  (if (memq icicle-current-completion-mode '(nil apropos))
-                             ops
-                           (concat "^" ops))))
+          (lexical-let ((ops-re  (if (memq icicle-current-completion-mode '(nil apropos))
+                                     ops
+                                   (concat "^" ops))))
             (icicle-remove-if-not
-             #'(lambda (opt+typ)
-                 (and (string-match ops-re (symbol-name (car opt+typ)))
-                      (or (null tp)
-                          (condition-case nil
-                              (icicle-var-is-of-type-p (car opt+typ) (list tp)
-                                                       (case mode
-                                                         ((inherit inherit-or-regexp) 'inherit)
-                                                         ((direct  direct-or-regexp)  'direct)
-                                                         (inherit-or-value     'inherit-or-value)
-                                                         (direct-or-value      'direct-or-value)))
-                            (error nil)))))
+             (lambda (opt+typ)          ; FREE here: OPS-RE, MODE, TP.
+               (and (string-match ops-re (symbol-name (car opt+typ)))
+                    (or (null tp)
+                        (condition-case nil
+                            (icicle-var-is-of-type-p (car opt+typ) (list tp)
+                                                     (case mode
+                                                       ((inherit inherit-or-regexp) 'inherit)
+                                                       ((direct  direct-or-regexp)  'direct)
+                                                       (inherit-or-value     'inherit-or-value)
+                                                       (direct-or-value      'direct-or-value)))
+                          (error nil)))))
              result)))
     ;; Change alist entries to multi-completions: "op^G^Jtp".  Add short help for mode-line, tooltip.
     (setq result
-          (mapcar #'(lambda (entry)
-                      (let* ((opt+typ-string
-                              ;; $$$$$$ (concat (mapconcat #'(lambda (e) (pp-to-string e))
-                              ;;                           entry icicle-list-join-string)
-                              ;;                icicle-list-end-string)) ; $$$$$$
-                              (mapconcat #'(lambda (e) (pp-to-string e)) entry
-                                         icicle-list-join-string))
-                             (doc       ; Don't bother to look up doc, if user won't see it.
-                              (and (or (> icicle-help-in-mode-line-delay 0)
-                                       (and (boundp 'tooltip-mode) tooltip-mode))
-                                   (documentation-property (car entry) 'variable-documentation t)))
-                             (doc1  (and (stringp doc)
-                                         (string-match ".+$" doc) (match-string 0 doc))))
-                        (when doc1 (icicle-candidate-short-help doc1 opt+typ-string))
-                        opt+typ-string))
+          ;; FREE here: ICICLE-HELP-IN-MODE-LINE-DELAY, ICICLE-LIST-JOIN-STRING, TOOLTIP-MODE.
+          (mapcar (lambda (entry)
+                    (let* ((opt+typ-string
+                            ;; $$$$$$ (concat (mapconcat (lambda (e) (pp-to-string e))
+                            ;;                           entry icicle-list-join-string)
+                            ;;                icicle-list-end-string)) ; $$$$$$
+                            (mapconcat (lambda (e) (pp-to-string e))  entry  icicle-list-join-string))
+                           (doc         ; Don't bother to look up doc, if user won't see it.
+                            (and (or (> icicle-help-in-mode-line-delay 0)
+                                     (and (boundp 'tooltip-mode)  tooltip-mode))
+                                 (documentation-property (car entry) 'variable-documentation t)))
+                           (doc1  (and (stringp doc)  (string-match ".+$" doc)  (match-string 0 doc))))
+                      (when doc1 (icicle-candidate-short-help doc1 opt+typ-string))
+                      opt+typ-string))
                   result))
     (if completion-mode
         result                          ; `all-completions', `test-completion'
-      (try-completion strg (mapcar #'list result) pred)))) ; `try-completion'
+      (try-completion                   ; `try-completion'
+       strg (mapcar #'list result) (and pred  (lambda (ss) (funcall pred ss)))))))
 
-;;;###autoload (autoload 'icicle-describe-var-w-val-satisfying "icicles")
-(defun icicle-describe-var-w-val-satisfying (predicate variable &optional optionp)
-  "Describe a variable that satisfies a given predicate.
-Read a predicate sexp, then read the name of a variable whose value
-satisfies it.  Describe the variable using `describe-variable'.
-Completion is available for both reads.
-
-The predicate read must be a function symbol or lambda form that accepts
-the value of the variable as its (first) argument.
-
-Typically the predicate is a type predicate, such as `integerp', but
-it could be anything.  Instead of just `integerp', for example, it
-could be `(lambda (val) (and (integerp val) (> val 5) (< val 15)))'."
-  (interactive (icicle-read-args-w-val-satisfying "Describe variable" current-prefix-arg nil))
-  (describe-variable variable optionp))
-
-;;;###autoload (autoload 'icicle-apropos-vars-w-val-satisfying "icicles")
 (defun icicle-apropos-vars-w-val-satisfying (predicate pattern &optional optionp)
   "Show variables whose values satisfy PREDICATE and names match PATTERN.
 You are prompted for a predicate sexp and a pattern matching the
@@ -2497,9 +2924,11 @@ accepts the value of the variable as its (first) argument.
 
 Typically the predicate is a type predicate, such as `integerp', but
 it could be anything.  Instead of just `integerp', for example, it
-could be `(lambda (val) (and (integerp val) (> val 5) (< val 15)))'.
+could be `(lambda (val) (and (integerp val)  (> val 5) (< val 15)))'.
+
+With a prefix argument, candidates are limited to user options.
 
-With a prefix argument, candidates are limited to user options."
+See also: `icicle-apropos-value', which matches names and values."
   (interactive (icicle-read-args-w-val-satisfying "Apropos var (hit `S-TAB' or `TAB'): "
                                                   current-prefix-arg t))
   (if optionp
@@ -2508,7 +2937,6 @@ With a prefix argument, candidates are limited to user options."
         (icicle-apropos-variable pattern t))
     (icicle-apropos-variable pattern)))
 
-;;;###autoload (autoload 'icicle-customize-apropos-opts-w-val-satisfying "icicles")
 (defun icicle-customize-apropos-opts-w-val-satisfying (predicate pattern)
   "Customize options whose values satisfy PREDICATE and names match PATTERN.
 You are prompted for a predicate sexp and a pattern matching the
@@ -2521,7 +2949,7 @@ accepts the value of the variable as its (first) argument.
 
 Typically the predicate is a type predicate, such as `integerp', but
 it could be anything.  Instead of just `integerp', for example, it
-could be `(lambda (val) (and (integerp val) (> val 5) (< val 15)))'."
+could be `(lambda (val) (and (integerp val)  (> val 5) (< val 15)))'."
   (interactive (let ((xxx  (icicle-read-args-w-val-satisfying "Customize vars (hit `S-TAB' or `TAB'): "
                                                               t t)))
                  (list (car xxx) (cadr xxx))))
@@ -2529,7 +2957,7 @@ could be `(lambda (val) (and (integerp val) (> val 5) (< val 15)))'."
 
 (defun icicle-read-args-w-val-satisfying (prompt optionp patternp)
   "Read args for `icicle-*-w-val-satisfying' commands.
-Prompt for the variable names using PROMPT. 
+Prompt for the variable names using PROMPT.
 Non-nil OPTIONP means allow only variables that are user options.  It
 is used here during completion of the variable name, and it is
 returned as the third arg for `icicle-describe-var-w-val-satisfying'.
@@ -2562,10 +2990,10 @@ return the symbol with that name."
                                                      (funcall #',symbpred sy)
                                                      (funcall #',valpred (symbol-value sy)))))
          (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
-         (icicle-must-pass-after-match-predicate  (and (not icompletep) varpred))
+         (icicle-must-pass-after-match-predicate  (and (not icompletep)  varpred))
          (varpat                                  (completing-read
-                                                   prompt obarray (and icompletep varpred) nil nil nil
-                                                   (and vardflt (symbol-name vardflt)) t)))
+                                                   prompt obarray (and icompletep  varpred) nil nil nil
+                                                   (and vardflt  (symbol-name vardflt)) t)))
     (list valpred
           (if patternp
               (if icicle-completion-candidates
@@ -2584,10 +3012,9 @@ return the symbol with that name."
 ;; Uses `completing-read' to read the command to repeat, letting you use `S-TAB' and
 ;; `TAB' to see the history list and `C-,' to toggle sorting that display.
 ;;
-(unless (fboundp 'old-repeat-complex-command)
-  (defalias 'old-repeat-complex-command (symbol-function 'repeat-complex-command)))
+(unless (fboundp 'icicle-ORIG-repeat-complex-command)
+  (defalias 'icicle-ORIG-repeat-complex-command (symbol-function 'repeat-complex-command)))
 
-;;;###autoload (autoload 'icicle-repeat-complex-command "icicles")
 (defun icicle-repeat-complex-command (arg) ; Bound to `C-x ESC ESC', `C-x M-:' in Icicle mode.
   "Edit and re-evaluate the last complex command, or ARGth from last.
 A complex command is one that used the minibuffer.
@@ -2616,7 +3043,7 @@ and `\\[repeat-matching-complex-command]' to match regexp input, but Icicles inp
                   (unwind-protect
                        (let ((icicle-transform-function  'icicle-remove-duplicates))
                          (read (completing-read
-                                "Redo: " (mapcar #'(lambda (entry) (list (prin1-to-string entry)))
+                                "Redo: " (mapcar (lambda (entry) (list (prin1-to-string entry)))
                                                  command-history)
                                 nil nil (prin1-to-string elt) (cons 'command-history arg)
                                 (prin1-to-string elt))))
@@ -2629,10 +3056,9 @@ and `\\[repeat-matching-complex-command]' to match regexp input, but Icicles inp
               (setq command-history  (cons newcmd command-history)))
           (eval newcmd))
       (if command-history
-          (error "Argument %d is beyond length of command history" arg)
-        (error "There are no previous complex commands to repeat")))))
+          (icicle-user-error "Argument %d is beyond length of command history" arg)
+        (icicle-user-error "There are no previous complex commands to repeat")))))
 
-;;;###autoload (autoload 'icicle-add-entry-to-saved-completion-set "icicles")
 (defun icicle-add-entry-to-saved-completion-set (set-name entry type)
   "Add ENTRY to saved completion-candidates set SET-NAME.
 ENTRY is normally a single candidate (a string).
@@ -2641,7 +3067,7 @@ ENTRY is normally a single candidate (a string).
  ENTRY is the name of an Emacs fileset (Emacs 22 or later).
 TYPE is the type of entry to add: `Fileset' or `Candidate'."
   (interactive
-   (let ((typ (if (and current-prefix-arg icicle-filesets-as-saved-completion-sets-flag
+   (let ((typ (if (and current-prefix-arg  icicle-filesets-as-saved-completion-sets-flag
                        (prog1 (or (require 'filesets nil t)
                                   (error "Feature `filesets' not provided"))
                          (filesets-init))
@@ -2660,7 +3086,7 @@ TYPE is the type of entry to add: `Fileset' or `Candidate'."
       typ)))
   (let ((file-name  (cdr (assoc set-name icicle-saved-completion-sets))))
     (unless (icicle-file-readable-p file-name) (error "Cannot read cache file `%s'" file-name))
-    (let ((list-buf  (find-file-noselect file-name 'nowarn 'raw))
+    (let ((list-buf  (find-file-noselect file-name 'NOWARN 'RAW))
           candidates newcands entry-type)
       (unwind-protect
            (condition-case icicle-add-entry-to-saved-completion-set
@@ -2681,7 +3107,6 @@ TYPE is the type of entry to add: `Fileset' or `Candidate'."
                  (icicle-propertize set-name  'face 'icicle-msg-emphasis)
                  (icicle-propertize file-name 'face 'icicle-msg-emphasis))))))
 
-;;;###autoload (autoload 'icicle-remove-entry-from-saved-completion-set "icicles")
 (defun icicle-remove-entry-from-saved-completion-set (set-name)
   "Remove an entry from saved completion-candidates set SET-NAME.
 SET-NAME can be an Icicles saved completions set (cache file) or the
@@ -2699,7 +3124,7 @@ use `(filesets-init)', and ensure that option
   (interactive
    (list (completing-read "Saved completion set: "
                           (if (and icicle-filesets-as-saved-completion-sets-flag
-                                   (featurep 'filesets) filesets-data)
+                                   (featurep 'filesets)  filesets-data)
                               (append filesets-data icicle-saved-completion-sets)
                             icicle-saved-completion-sets)
                           nil t nil 'icicle-completion-set-history)))
@@ -2712,16 +3137,16 @@ use `(filesets-init)', and ensure that option
           (funcall icicle-get-alist-candidate-function
                    (completing-read
                     "Candidate to remove: "
-                    (mapcar #'(lambda (e)
-                                (cond ((icicle-saved-fileset-p e) ; Swap `:fileset' with fileset name
-                                       `(,(cadr e) ,(car e) ,@(cddr e)))
-                                      ((consp e) e)
-                                      (t (list e)))) ; Listify naked string.
+                    (mapcar (lambda (e)
+                              (cond ((icicle-saved-fileset-p e) ; Swap `:fileset' with fileset name
+                                     `(,(cadr e) ,(car e) ,@(cddr e)))
+                                    ((consp e) e)
+                                    (t (list e)))) ; Listify naked string.
                             candidates)
                     nil t))))
-    (when (and (consp entry) (eq (cadr entry) ':fileset)) ; Swap back again: `:fileset' and name.
+    (when (and (consp entry)  (eq (cadr entry) ':fileset)) ; Swap back again: `:fileset' and name.
       (setq entry  `(,(cadr entry) ,(car entry) ,@(cddr entry))))
-    (when (and (consp entry) (null (cdr entry))) (setq entry  (car entry))) ; Use just the string.
+    (when (and (consp entry)  (null (cdr entry))) (setq entry  (car entry))) ; Use just the string.
     ;; Delete any such candidate, then remove text properties used for completion.
     (setq candidates  (mapcar #'icicle-unpropertize-completion (delete entry candidates)))
     (cond (file-name
@@ -2731,7 +3156,7 @@ use `(filesets-init)', and ensure that option
           ((icicle-saved-fileset-p (list ':fileset set-name)) ; Remove from fileset.
            (unless (require 'filesets nil t) (error "Feature `filesets' not provided"))
            (filesets-init)
-           (let ((fst  (and filesets-data (assoc set-name filesets-data)))) ; The fileset itself.
+           (let ((fst  (and filesets-data  (assoc set-name filesets-data)))) ; The fileset itself.
              (unless fst (error "No such fileset: `%s'" set-name))
              (let ((fst-files  (filesets-entry-get-files fst)))
                (if (car (filesets-member entry fst-files :test 'filesets-files-equalp))
@@ -2756,7 +3181,6 @@ use `(filesets-init)', and ensure that option
            (format ", file `%s'" (icicle-propertize file-name'face 'icicle-msg-emphasis))
          "")))))
 
-;;;###autoload (autoload 'icicle-remove-saved-completion-set "icicles")
 (icicle-define-command icicle-remove-saved-completion-set ; Command name
   "Remove an entry from `icicle-saved-completion-sets'.
 Save the updated option.
@@ -2796,7 +3220,6 @@ You can add entries to `icicle-saved-completion-sets' using command
            icicle-saved-completion-sets)
   (message "Candidate set `%s' removed" (icicle-propertize set-name 'face 'icicle-msg-emphasis)))
 
-;;;###autoload (autoload 'icicle-bookmark-save-marked-files "icicles")
 (defun icicle-bookmark-save-marked-files (&optional arg) ; Bound to `C-M->' in *Bookmark List*.
   "Save file names of marked bookmarks as a set of completion candidates.
 Saves file names in variable `icicle-saved-completion-candidates', by
@@ -2821,11 +3244,10 @@ You can use this command only from a bookmark-list display buffer
 \(`*Bookmark List*')."
   (interactive "P")
   (unless (fboundp 'bmkp-bmenu-get-marked-files)
-    (error "Command `icicle-bookmark-save-marked-files' requires library `Bookmark+'"))
+    (icicle-user-error "You need library `Bookmark+' for this command"))
   (bmkp-bmenu-barf-if-not-in-menu-list)
   (icicle-candidate-set-save-1 (bmkp-bmenu-get-marked-files) arg))
 
-;;;###autoload (autoload 'icicle-bookmark-save-marked-files-more "icicles")
 (defun icicle-bookmark-save-marked-files-more (&optional arg) ; Bound to `C->' in *Bookmark List*.
   "Add the file names of the marked bookmarks to the saved candidates set.
 Marked bookmarks that have no associated file are ignored.
@@ -2846,11 +3268,10 @@ You can use this command only from a bookmark-list display buffer
 \(`*Bookmark List*')."
   (interactive "P")
   (unless (fboundp 'bmkp-bmenu-get-marked-files)
-    (error "Command `icicle-bookmark-save-marked-files-more' requires library `Bookmark+'"))
+    (icicle-user-error "You need library `Bookmark+' for this command"))
   (bmkp-bmenu-barf-if-not-in-menu-list)
   (icicle-candidate-set-save-1 (bmkp-bmenu-get-marked-files) arg t))
 
-;;;###autoload (autoload 'icicle-bookmark-save-marked-files-to-variable "icicles")
 (defun icicle-bookmark-save-marked-files-to-variable () ; Bound to `C-M-}' in *Bookmark List*.
   "Save the file names of the marked bookmarks to a variable.
 Marked bookmarks that have no associated file are ignored.
@@ -2867,14 +3288,12 @@ You can use this command only from a bookmark-list display buffer
 \(`*Bookmark List*')."
   (interactive)
   (unless (fboundp 'bmkp-bmenu-get-marked-files)
-    (error "Command `icicle-bookmark-save-marked-files-to-variable' requires library `Bookmark+'"))
+    (icicle-user-error "You need library `Bookmark+' for this command"))
   (bmkp-bmenu-barf-if-not-in-menu-list)
   (icicle-candidate-set-save-1 (bmkp-bmenu-get-marked-files) 99))
 
-;;;###autoload (autoload 'icicle-bookmark-save-marked-files-as-project "icicles")
 (defalias 'icicle-bookmark-save-marked-files-as-project ; Bound to `C-}' in *Bookmark List*.
     'icicle-bookmark-save-marked-files-persistently)
-;;;###autoload (autoload 'icicle-bookmark-save-marked-files-persistently "icicles")
 (defun icicle-bookmark-save-marked-files-persistently (filesetp)
   "Save the file names of the marked bookmarks as a persistent set.
 Marked bookmarks that have no associated file are ignored.
@@ -2893,16 +3312,11 @@ You can use this command only from a bookmark-list display buffer
 \(`*Bookmark List*')."
   (interactive "P")
   (unless (fboundp 'bmkp-bmenu-get-marked-files)
-    (error "This command requires library `Bookmark+'"))
+    (icicle-user-error "You need library `Bookmark+' for this command"))
   (bmkp-bmenu-barf-if-not-in-menu-list)
   (icicle-candidate-set-save-1 (bmkp-bmenu-get-marked-files) (if filesetp 0 '(1))))
 
 
-;;;###autoload (autoload 'icicle-dired-save-marked                        "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-more                   "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-to-variable            "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-as-project             "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-persistently           "icicles")
 (defun icicle-dired-save-marked (&optional arg) ; Bound to `C-M->' in Dired.
   "Save the marked file names in Dired as a set of completion candidates.
 Saves file names in variable `icicle-saved-completion-candidates', by
@@ -2926,7 +3340,7 @@ You can use the saved set of candidates for operations such as
 You can use this command only from a Dired buffer."
   (interactive "P")
   (unless (eq major-mode 'dired-mode)
-    (error "You must be in a Dired buffer to use this command"))
+    (icicle-user-error "You must be in a Dired buffer to use this command"))
   (icicle-candidate-set-save-1 (dired-get-marked-files) arg))
 
 (defun icicle-dired-save-marked-more (&optional arg) ; Bound to `C->' in Dired.
@@ -2936,7 +3350,7 @@ saved, if any.  A prefix argument has the same effect as for
 `icicle-dired-save-marked'."
   (interactive "P")
   (unless (eq major-mode 'dired-mode)
-    (error "You must be in a Dired buffer to use this command"))
+    (icicle-user-error "You must be in a Dired buffer to use this command"))
   (icicle-candidate-set-save-1 (dired-get-marked-files) arg t))
 
 (defun icicle-dired-save-marked-to-variable () ; Bound to `C-M-}' in Dired.
@@ -2944,7 +3358,7 @@ saved, if any.  A prefix argument has the same effect as for
 Same as using `icicle-dired-save-marked' with no prefix argument."
   (interactive)
   (unless (eq major-mode 'dired-mode)
-    (error "You must be in a Dired buffer to use this command"))
+    (icicle-user-error "You must be in a Dired buffer to use this command"))
   (icicle-candidate-set-save-1 (dired-get-marked-files) 99))
 
 (defalias 'icicle-dired-save-marked-as-project ; Bound to `C-}' in Dired.
@@ -2965,18 +3379,12 @@ You can use the saved set of candidates for operations such as
 You can use this command only from a Dired buffer."
   (interactive "P")
   (unless (eq major-mode 'dired-mode)
-    (error "You must be in a Dired buffer to use this command"))
+    (icicle-user-error "You must be in a Dired buffer to use this command"))
   (icicle-candidate-set-save-1 (dired-get-marked-files) (if filesetp 0 '(1))))
 
 
 ;;; These commands require library `Dired+'.
 ;;;
-;;;###autoload (autoload 'icicle-dired-save-marked-recursive               "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-more-recursive          "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-to-variable-recursive   "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-to-cache-file-recursive "icicles")
-;;;###autoload (autoload 'icicle-dired-save-marked-to-fileset-recursive    "icicles")
-;;;###autoload (autoload 'icicle-dired-insert-as-subdir                    "icicles")
 (when (fboundp 'diredp-get-files)       ; In Dired+.
   (defun icicle-dired-save-marked-recursive (&optional ignore-marks-p arg) ; Bound to `M-+ C-M->' in Dired.
     "Save the marked file names in Dired, including those in marked subdirs.
@@ -2992,7 +3400,7 @@ Dired buffer and all subdirs, recursively.
 You need library `Dired+' for this command."
     (interactive (progn
                    (unless (fboundp 'diredp-get-confirmation-recursive)
-                     (error "You need library `dired+.el' for this command"))
+                     (icicle-user-error "You need library `dired+.el' for this command"))
                    (diredp-get-confirmation-recursive)
                    (list current-prefix-arg 1)))
     (icicle-candidate-set-save-1 (diredp-get-files ignore-marks-p) arg))
@@ -3011,7 +3419,7 @@ Dired buffer and all subdirs, recursively.
 You need library `Dired+' for this command."
     (interactive (progn
                    (unless (fboundp 'diredp-get-confirmation-recursive)
-                     (error "You need library `dired+.el' for this command"))
+                     (icicle-user-error "You need library `dired+.el' for this command"))
                    (diredp-get-confirmation-recursive)
                    (list current-prefix-arg 1)))
     (icicle-candidate-set-save-1 (diredp-get-files ignore-marks-p) arg t))
@@ -3030,7 +3438,7 @@ Dired buffer and all subdirs, recursively.
 You need library `Dired+' for this command."
     (interactive (progn
                    (unless (fboundp 'diredp-get-confirmation-recursive)
-                     (error "You need library `dired+.el' for this command"))
+                     (icicle-user-error "You need library `dired+.el' for this command"))
                    (diredp-get-confirmation-recursive)
                    (list current-prefix-arg)))
     (icicle-candidate-set-save-1 (diredp-get-files ignore-marks-p) 99))
@@ -3050,7 +3458,7 @@ Dired buffer and all subdirs, recursively.
 You need library `Dired+' for this command."
     (interactive (progn
                    (unless (fboundp 'diredp-get-confirmation-recursive)
-                     (error "You need library `dired+.el' for this command"))
+                     (icicle-user-error "You need library `dired+.el' for this command"))
                    (diredp-get-confirmation-recursive)
                    (list current-prefix-arg)))
     (icicle-candidate-set-save-1 (diredp-get-files ignore-marks-p) '(1)))
@@ -3070,7 +3478,7 @@ Dired buffer and all subdirs, recursively.
 You need library `Dired+' for this command."
     (interactive (progn
                    (unless (fboundp 'diredp-get-confirmation-recursive)
-                     (error "You need library `dired+.el' for this command"))
+                     (icicle-user-error "You need library `dired+.el' for this command"))
                    (unless (require 'filesets nil t)
                      (error "Cannot save to a fileset - feature `filesets' not provided"))
                    (diredp-get-confirmation-recursive)
@@ -3086,12 +3494,11 @@ switches are preserved for the subdir listing in the ancestor Dired
 buffer.
 
 You need library `Dired+' for this command."
-    (lambda (dir) (diredp-insert-as-subdir dir ancestor-dir))
+    (lambda (dir) (diredp-insert-as-subdir dir ancestor-dir)) ; FREE here: ANCESTOR-DIR.
     "Insert directory into ancestor Dired: " ; `read-file-name' args
-    default-directory nil t nil (lambda (ff)
-                                  (and (file-directory-p (expand-file-name ff))
-                                       (dired-in-this-tree (expand-file-name ff)
-                                                           ancestor-dir)))
+    default-directory nil t nil `(lambda (ff)
+                                  (and (file-directory-p  (expand-file-name ff))
+                                   (dired-in-this-tree (expand-file-name ff) ',ancestor-dir)))
     ((ancestor-dir                      ; Bindings
       (completing-read "Ancestor Dired dir to insert into: "
                        (cons (list default-directory)
@@ -3099,14 +3506,12 @@ You need library `Dired+' for this command."
 
 
 (put 'icicle-dired-saved-file-candidates 'icicle-Completions-window-max-height 200)
-;;;###autoload (autoload 'icicle-dired-chosen-files "icicles")
 (defalias 'icicle-dired-chosen-files 'icicle-dired-saved-file-candidates)
-;;;###autoload (autoload 'icicle-dired-saved-file-candidates "icicles")
 (defun icicle-dired-saved-file-candidates (prompt-for-dir-p)
   "Open Dired on a set of files and directories of your choice.
 If you have saved a set of file names using \\<minibuffer-local-completion-map>\
 `\\[icicle-candidate-set-save]', then it is used.
-If not, you are prompted to choose the files.
+If not, you are reminded to do so.
 With a prefix argument, you are prompted for the default directory to use.
 Otherwise, the current value of `default-directory' is used.
 Names that do not correspond to existing files are ignored.
@@ -3115,31 +3520,31 @@ directory (default directory)."
   (interactive "P")
   ;; $$$$$$$ Maybe filter sets to get only file-name candidate sets?
   (unless icicle-saved-completion-candidates
-    (error "%s" (substitute-command-keys "No saved completion candidates.  \
+    (icicle-user-error "%s" (substitute-command-keys "No saved completion candidates.  \
 Use \\<minibuffer-local-completion-map>`\\[icicle-candidate-set-save]' to save candidates")))
   (let* ((default-directory           (if prompt-for-dir-p
                                           (read-file-name "Directory: " nil default-directory nil)
                                         default-directory))
+         (icicle-multi-completing-p   t)
          (icicle-list-use-nth-parts   '(1))
          (file-names                  (icicle-remove-if
-                                       #'(lambda (fil)
-                                           (or (null fil)
-                                               (not (or (icicle-file-remote-p fil) ; Avoid Tramp accessing.
-                                                        (file-exists-p fil)))))
+                                       (lambda (fil)
+                                         (or (null fil)
+                                             (not (or (icicle-file-remote-p fil) ; Avoid Tramp accessing.
+                                                      (file-exists-p fil)))))
                                        (or (and icicle-saved-completion-candidates
                                                 (mapcar #'icicle-transform-multi-completion
                                                         icicle-saved-completion-candidates))
                                            (icicle-file-list)))))
     (dired (cons (generate-new-buffer-name "Icy File Set") (nreverse file-names)))))
 
-;;;###autoload (autoload 'icicle-dired-chosen-files-other-window "icicles")
+(put 'icicle-dired-saved-file-candidates-other-window 'icicle-Completions-window-max-height 200)
 (defalias 'icicle-dired-chosen-files-other-window 'icicle-dired-saved-file-candidates-other-window)
-;;;###autoload (autoload 'icicle-dired-saved-file-candidates-other-window "icicles")
 (defun icicle-dired-saved-file-candidates-other-window (prompt-for-dir-p) ; Bound `C-M-<' in Dired.
   "Open Dired in other window on set of files & directories of your choice.
 If you have saved a set of file names using \\<minibuffer-local-completion-map>\
 `\\[icicle-candidate-set-save]', then it is used.
-If not, you are prompted to choose the files.
+If not, you are reminded to do so.
 With a prefix arg, you are prompted for the default directory to use.
 Otherwise, the current value of `default-directory' is used.
 Names that do not correspond to existing files are ignored.
@@ -3150,12 +3555,13 @@ directory (default directory)."
   (let* ((default-directory           (if prompt-for-dir-p
                                           (read-file-name "Directory: " nil default-directory nil)
                                         default-directory))
+         (icicle-multi-completing-p   t)
          (icicle-list-use-nth-parts   '(1))
          (file-names                  (icicle-remove-if
-                                       #'(lambda (fil)
-                                           (or (null fil)
-                                               (not (or (icicle-file-remote-p fil) ; Avoid Tramp accessing.
-                                                        (file-exists-p fil)))))
+                                       (lambda (fil)
+                                         (or (null fil)
+                                             (not (or (icicle-file-remote-p fil) ; Avoid Tramp accessing.
+                                                      (file-exists-p fil)))))
                                        (or (and icicle-saved-completion-candidates
                                                 (mapcar #'icicle-transform-multi-completion
                                                         icicle-saved-completion-candidates))
@@ -3163,7 +3569,6 @@ directory (default directory)."
     (dired-other-window (cons (generate-new-buffer-name "Icy File Set") (nreverse file-names)))))
 
 (put 'icicle-dired-project 'icicle-Completions-window-max-height 200)
-;;;###autoload (autoload 'icicle-dired-project "icicles")
 (defun icicle-dired-project (prompt-for-dir-p)
   "Open Dired on a saved project.
 A project is either a persistent completion set or an Emacs fileset.
@@ -3190,8 +3595,7 @@ you use library `Bookmark+'."
                                          nil nil nil 'icicle-completion-set-history)))
          (icicle-retrieve-candidates-from-set set-name)
          (let* ((default-directory  (if prompt-for-dir-p
-                                        (read-file-name "Dired directory: " nil
-                                                        default-directory nil)
+                                        (read-file-name "Dired directory: " nil default-directory nil)
                                       default-directory))
                 (file-names         ()))
            (dolist (ff  icicle-saved-completion-candidates)
@@ -3200,14 +3604,14 @@ you use library `Bookmark+'."
                (push ff file-names)))
            (unless file-names (error "No files in project `%s' actually exist" set-name))
            (dired (cons (generate-new-buffer-name set-name)
-                        (nreverse (mapcar #'(lambda (file)
-                                              (if (file-name-absolute-p file)
-                                                  (expand-file-name file)
-                                                file))
+                        (nreverse (mapcar (lambda (file)
+                                            (if (file-name-absolute-p file)
+                                                (expand-file-name file)
+                                              file))
                                           file-names))))))
     (define-key minibuffer-local-completion-map (icicle-kbd "C-x m") nil)))
 
-;;;###autoload (autoload 'icicle-dired-project-other-window "icicles")
+(put 'icicle-dired-project-other-window 'icicle-Completions-window-max-height 200)
 (defun icicle-dired-project-other-window (prompt-for-dir-p) ; Bound to `C-{' in Dired.
   "Open Dired on a saved project in another window.
 A project is either a persistent completion set or an Emacs fileset.
@@ -3234,8 +3638,7 @@ you use library `Bookmark+'."
                                          nil nil nil 'icicle-completion-set-history)))
          (icicle-retrieve-candidates-from-set set-name)
          (let* ((default-directory  (if prompt-for-dir-p
-                                        (read-file-name "Dired directory: " nil
-                                                        default-directory nil)
+                                        (read-file-name "Dired directory: " nil default-directory nil)
                                       default-directory))
                 (file-names         ()))
            (dolist (ff  icicle-saved-completion-candidates)
@@ -3244,15 +3647,14 @@ you use library `Bookmark+'."
                (push ff file-names)))
            (unless file-names (error "No files in project `%s' actually exist" set-name))
            (dired-other-window (cons (generate-new-buffer-name set-name)
-                                     (nreverse (mapcar #'(lambda (file)
-                                                           (if (file-name-absolute-p file)
-                                                               (expand-file-name file)
-                                                             file))
+                                     (nreverse (mapcar (lambda (file)
+                                                         (if (file-name-absolute-p file)
+                                                             (expand-file-name file)
+                                                           file))
                                                        file-names))))))
     (define-key minibuffer-local-completion-map (icicle-kbd "C-x m") nil)))
 
-;;;###autoload (autoload 'icicle-grep-saved-file-candidates "icicles")
-(defun icicle-grep-saved-file-candidates (command-args)
+(defun icicle-grep-saved-file-candidates (command-args) ; Bound to `M-s M-s g' in Icicle mode.
   "Run `grep' on the set of completion candidates saved with \\<minibuffer-local-completion-map>\
 `\\[icicle-candidate-set-save]'.
 Saved names that do not correspond to existing files are ignored.
@@ -3262,14 +3664,14 @@ directory."
    (list
     (let ((file-names  ()))
       (unless icicle-saved-completion-candidates
-        (error "%s" (substitute-command-keys "No saved completion candidates.  \
+        (icicle-user-error "%s" (substitute-command-keys "No saved completion candidates.  \
 Use \\<minibuffer-local-completion-map>`\\[icicle-candidate-set-save]' to save candidates")))
       (unless grep-command (grep-compute-defaults))
       (dolist (ff  icicle-saved-completion-candidates)
         (when (or (icicle-file-remote-p ff) ; Don't let Tramp try to access it.
                   (file-exists-p ff))
           (push ff file-names)))
-      (let ((default  (and (fboundp 'grep-default-command) (grep-default-command))))
+      (let ((default  (and (fboundp  'grep-default-command) (grep-default-command))))
         (read-from-minibuffer
          "grep <pattern> <files> :  "
          (let ((up-to-files  (concat grep-command "   ")))
@@ -3303,7 +3705,7 @@ Arguments:
 
 If there is only one candidate, then FINAL-ACTION-FN is called
 immediately.  The candidate is not available to act on (e.g. using
-``C-S-RET').
+\\<minibuffer-local-completion-map>`\\[icicle-candidate-alt-action]').
 
 Returns:
  The result of executing FINAL-ACTION-FN, if that arg is non-nil.
@@ -3324,7 +3726,7 @@ commands, it need not be.  It can be useful anytime you need to use
         (icicle-orig-win-explore                (selected-window))
         result)
     (setq icicle-act-before-cycle-flag      nil
-          icicle-candidates-alist           nil
+          icicle-candidates-alist           ()
           icicle-explore-final-choice       nil
           icicle-explore-final-choice-full  nil)
     (icicle-highlight-lighter)
@@ -3332,8 +3734,7 @@ commands, it need not be.  It can be useful anytime you need to use
     (when define-candidates-fn (funcall define-candidates-fn))
     (unless icicle-candidates-alist (error "No candidates defined"))
     (when (= (length icicle-candidates-alist) 1)
-      (setq icicle-explore-final-choice  (icicle-display-cand-from-full-cand
-                                          (car icicle-candidates-alist))))
+      (setq icicle-explore-final-choice  (icicle-display-cand-from-full-cand (car icicle-candidates-alist))))
     (unwind-protect
          (icicle-condition-case-no-debug failure
              (progn
@@ -3342,8 +3743,7 @@ commands, it need not be.  It can be useful anytime you need to use
                        (let ((icicle-remove-icicles-props-p  nil)) ; Keep Icicles text properties.
                          (apply #'completing-read prompt icicle-candidates-alist compl-read-args))))
                (setq icicle-explore-final-choice-full
-                     (funcall icicle-get-alist-candidate-function
-                              icicle-explore-final-choice 'no-error-p))
+                     (funcall icicle-get-alist-candidate-function icicle-explore-final-choice 'no-error-p))
                (unless icicle-explore-final-choice-full (error "No such occurrence"))
                (setq result  (if final-action-fn
                                  (funcall final-action-fn)
@@ -3355,11 +3755,17 @@ commands, it need not be.  It can be useful anytime you need to use
       (when cleanup-fn (funcall cleanup-fn)))
     result))
 
-;;;###autoload (autoload 'icicle-execute-extended-command "icicles")
 (icicle-define-command icicle-execute-extended-command ; Bound to `M-x' in Icicle mode.
   "Read command name, then read its arguments and call it.
 This is `execute-extended-command', turned into a multi-command.
 
+You can use `\\<minibuffer-local-completion-map>\\[icicle-toggle-transforming]' \
+to toggle filtering of candidates to those that are
+bound to keys.
+
+You can use `\\[icicle-toggle-annotation]' to toggle showing key bindings as annotations.
+\(Menu bindings are not shown.)
+
 By default, Icicle mode remaps all key sequences that are normally
 bound to `execute-extended-command' to
 `icicle-execute-extended-command'.  If you do not want this remapping,
@@ -3369,21 +3775,37 @@ then customize option `icicle-top-level-key-bindings'." ; Doc string
           (if current-prefix-arg
               (format " (prefix %d)" (prefix-numeric-value current-prefix-arg))
             ""))
-  obarray (and icompletep pred) t nil 'extended-command-history nil nil
+  obarray (and icompletep  pred) t nil 'extended-command-history nil nil
   (;; Bindings
    (last-command                            last-command) ; Save and restore the last command.
    (use-file-dialog                         nil) ; `mouse-2' in `*Completions*' won't use dialog box.
    (alt-fn                                  nil)
    (icicle-orig-must-pass-after-match-pred  icicle-must-pass-after-match-predicate)
-   (pred                                    #'(lambda (c)
-                                                (unless (symbolp c) (setq c  (intern c)))
-                                                (commandp c)))
+   (pred                                    (lambda (c)
+                                              (unless (symbolp c) (setq c  (intern-soft c)))
+                                              (commandp c)))
    (icompletep                              (and (boundp 'icomplete-mode)  icomplete-mode))
    (icicle-must-pass-after-match-predicate  (and (not icompletep)  pred))
    (icicle-candidate-alt-action-fn          (or icicle-candidate-alt-action-fn
                                                 (setq alt-fn  (icicle-alt-act-fn-for-type "command"))))
    (icicle-all-candidates-list-alt-action-fn ; M-|'
-    (or icicle-all-candidates-list-alt-action-fn alt-fn (icicle-alt-act-fn-for-type "command")))
+    (or icicle-all-candidates-list-alt-action-fn  alt-fn  (icicle-alt-act-fn-for-type "command")))
+   (icicle--last-toggle-transforming-msg    icicle-toggle-transforming-message)
+   (icicle-toggle-transforming-message      "Filtering to commands bound to keys is now %s")
+   (icicle-last-transform-function          (lambda (cands) ; Because we bind `icicle-transform-function'.
+                                              (with-current-buffer icicle-pre-minibuffer-buffer
+                                                (loop for cand in cands
+                                                      for symb = (intern-soft cand)
+                                                      if (and (symbolp symb)
+                                                              (where-is-internal symb nil 'non-ascii))
+                                                      collect cand))))
+   (icicle-transform-function               nil)
+   (completion-annotate-function            (lambda (cand)
+                                              (with-current-buffer icicle-pre-minibuffer-buffer
+                                                (and (setq cand  (intern-soft cand))  (symbolp cand)
+                                                     (let ((key  (where-is-internal cand nil t)))
+                                                       (and key
+                                                            (format "  %s" (icicle-key-description key))))))))
    icicle-new-last-cmd)                 ; Set in `icicle-execute-extended-command-1'.
   nil  nil                              ; First code, undo code
   (setq this-command  icicle-new-last-cmd)) ; Last code: this will update `last-command'
@@ -3398,49 +3820,34 @@ then customize option `icicle-top-level-key-bindings'." ; Doc string
   (when (string= "" cmd-name) (error "No command name"))
 
   (let* ((cmd                                       (intern cmd-name))
-         (fn                                        (symbol-function cmd))
+         (fn                                        (and (fboundp cmd)  (symbol-function cmd)))
          (count                                     (prefix-numeric-value current-prefix-arg))
+         (completion-annotate-function              nil) ; Cancel value from `icicle-execute-extended-command'.
+         (icicle-toggle-transforming-message        icicle--last-toggle-transforming-msg) ; Restore - FREE HERE
          ;; Rebind alternative action functions to nil, so we don't override the command we call.
          (icicle-candidate-alt-action-fn            nil)
          (icicle-all-candidates-list-alt-action-fn  nil)
-         ;; Rebind `icicle-candidate-action-fn' to a function that calls the
-         ;; candidate CMD-NAME on a single argument that it reads.  This is
-         ;; used only if CMD-NAME is a command that, itself, reads an input
-         ;; argument with completion.  When that is the case, you can use
-         ;; completion on that input, and if you do that, you can use `C-RET'
-         ;; to use command CMD-NAME as a multi-command.  In other words, this
+         ;; Rebind `icicle-candidate-action-fn' to a function that calls the candidate command on a single
+         ;; argument that it reads.  This is used only if the command itself reads an input argument with
+         ;; completion.  When that is the case, you can use completion on that input, and if you do that,
+         ;; you can use `C-RET' to use the candidate command as a multi-command.  In other words, this
          ;; binding allows for two levels of multi-commands.
          (icicle-candidate-action-fn
           (and icicle-candidate-action-fn ; This is nil after the command name is read.
-               #'(lambda (arg)
-                   (setq arg  (icicle-transform-multi-completion arg))
-                   (condition-case nil
-                       (funcall cmd arg) ; Try to use string candidate `arg'.
-                     ;; If that didn't work, use a symbol or number candidate.
-                     (wrong-type-argument (funcall cmd (car (read-from-string arg))))
-                     (wrong-number-of-arguments ; Punt - show help.
-                      (funcall #'icicle-help-on-candidate)))
-                   (select-window (minibuffer-window))
-                   (select-frame-set-input-focus (selected-frame))))))
-    ;; Message showing what `cmd' is bound to.  This is pretty much a transcription of C code in
-    ;; `keyboard.c'.  Not sure it DTRT when there is already a msg in the echo area.
-    (when (and suggest-key-bindings (not executing-kbd-macro))
-      (let* ((bindings   (where-is-internal cmd overriding-local-map t))
-             (curr-msg   (current-message))
-             ;; $$$$$$ (wait-time  (if curr-msg
-             ;; $$$$$$                 (or (and (numberp suggest-key-bindings) suggest-key-bindings) 2)
-             ;; $$$$$$              0))
-             (wait-time  (or (and (numberp suggest-key-bindings) suggest-key-bindings) 2)))
-        (when (and bindings (not (and (vectorp bindings) (eq (aref bindings 0) 'mouse-movement))))
-          (when (and (sit-for wait-time) (atom unread-command-events))
-            (let ((message-log-max  nil)) ; Don't log this message.
-              (message "You can invoke command `%s' using `%s'" (symbol-name cmd)
-                       (icicle-propertize (key-description bindings) 'face 'icicle-msg-emphasis)))
-            (when (and (sit-for wait-time) curr-msg) (message "%s" curr-msg))))))
+               `(lambda (arg)
+                 (setq arg  (icicle-transform-multi-completion arg))
+                 (condition-case nil
+                     (funcall ',cmd arg) ; Try to use string candidate `arg'.
+                   ;; If that didn't work, use a symbol or number candidate.
+                   (wrong-type-argument (funcall ',cmd (car (read-from-string arg))))
+                   (wrong-number-of-arguments (funcall #'icicle-help-on-candidate))) ; Punt - show help.
+                 (select-window (minibuffer-window))
+                 (select-frame-set-input-focus (selected-frame))))))
+
     (cond ((arrayp fn)
            (let ((this-command  cmd)) (execute-kbd-macro fn count))
            (when (> count 1) (message "(%d times)" count)))
-          (t
+          ((commandp cmd)
            (run-hooks 'post-command-hook)
            (run-hooks 'pre-command-hook)
            (let ((enable-recursive-minibuffers            t)
@@ -3450,7 +3857,33 @@ then customize option `icicle-top-level-key-bindings'." ; Doc string
                  ;; to be `cmd' during the `C-RET' part, but `last-command' must not be `cmd'
                  ;; during the `next' part.
                  (this-command                            cmd))
-             (call-interactively cmd 'record-it))))
+             (call-interactively cmd 'record-it)))
+          ;; Should not happen, since `icicle-e*-e*-command' calls `completing-read' with non-nil REQUIRE arg.
+          (t (error "Not a command: `%s'" cmd-name)))
+
+    ;; Message showing what CMD is bound to.  This is pretty much the same as in `execute-extended-command',
+    ;; but do not show the message if we are not at the `M-x' top level, i.e., if we are acting on a
+    ;; candidate command using `C-RET' instead of `RET'.
+    (when (and suggest-key-bindings  (not executing-kbd-macro)
+               (not (or (icicle-get-safe this-command 'icicle-action-command)
+                        ;; This one is used for `*-per-mode-action', which sets `this-command' to the cycler.
+                        (icicle-get-safe this-command 'icicle-cycling-command))))
+      (let* ((binding   (if (> emacs-major-version 21)
+                            (where-is-internal cmd overriding-local-map t 'NOINDIRECT)
+                          (where-is-internal cmd overriding-local-map t)))
+             (curr-msg   (current-message))
+             (wait-time  (or (and (numberp suggest-key-bindings)  suggest-key-bindings)  2)))
+        (when (and binding  (not (and (vectorp binding)  (eq (aref binding 0) 'mouse-movement))))
+          (let ((message-log-max  nil)  ; Do not log this message.
+                ;; If CMD showed a msg in echo area, wait a bit, before showing the key-reminder msg.
+                (waited           (sit-for (if (current-message)  wait-time  0))))
+            (when (and waited  (atom unread-command-events))
+              (unwind-protect
+                   (progn (message "You can invoke command `%s' using `%s'"
+                                   (icicle-propertize (symbol-name cmd) 'face 'icicle-msg-emphasis)
+                                   (icicle-propertize (key-description binding) 'face 'icicle-msg-emphasis))
+                          (sit-for wait-time))
+                (message "%s" curr-msg)))))))
     ;; After `M-x' `last-command' must be the command finally entered with `RET' or, if you end
     ;; with `C-g', the last command entered with `C-RET'.
     (setq icicle-new-last-cmd  cmd)))
@@ -3458,8 +3891,7 @@ then customize option `icicle-top-level-key-bindings'." ; Doc string
 ;; Inspired by Emacs partial completion and by library `exec-abbrev-cmd.el' (Tassilo Horn
 ;; <tassilo@member.fsf.org>).  The idea of command abbreviation is combined here with normal
 ;; command invocation, in an Icicles multi-command.
-
-;;;###autoload (autoload 'icicle-command-abbrev "icicles")
+;;
 (icicle-define-command icicle-command-abbrev ; Bound to `C-x SPC' in Icicle mode.
   "Read command name or its abbreviation, read command args, call command.
 Read input, then call `icicle-command-abbrev-action' to act on it.
@@ -3467,16 +3899,21 @@ Read input, then call `icicle-command-abbrev-action' to act on it.
 If `icicle-add-proxy-candidates-flag' is non-nil, then command
 abbreviations, as well as commands, are available as completion
 candidates.  Otherwise, only commands are available.  You can toggle
-this user option using `\\<minibuffer-local-completion-map>\\[icicle-toggle-proxy-candidates]'\
-in the minibuffer.
+`icicle-add-proxy-candidates-flag' using `\\<minibuffer-local-completion-map>\
+\\[icicle-toggle-proxy-candidates]'in the minibuffer.
 
 When an abbreviation is available, you can treat it just like a
 command.  The rest of this description covers the behavior of choosing
 an abbreviation.
 
-If an abbreviation matches a single command name, then that command is
-invoked.  If it matches more than one, then you can use completion to
-choose one.
+Completion for an abbreviation is lax.  If you enter a new
+abbreviation then it is added to option `icicle-command-abbrev-alist',
+which is the list of your known abbreviations.  You can also customize
+this list.
+
+If an abbreviation that you enter matches a single command name then
+that command is invoked.  If it matches more than one, then you can
+use (strict) completion to choose one.
 
 Hyphens (`-') in command names divide them into parts.  For example,
 `find-file' has two parts: `find' and `file'.  Each character of a
@@ -3485,36 +3922,67 @@ that match the abbreviation.  For example, abbreviation `ff' matches
 commands `find-file' and `focus-frame', and abbreviation `fg' matches
 `find-grep'.
 
-User option `icicle-command-abbrev-match-all-parts-flag' = nil means
-that an abbreviation need not match all parts of a command name; it
-need match only a prefix.  For example, nil means that abbreviation
-`ff' also matches `find-file-other-window' and `fg' also matches
-`find-grep-dired'."                     ; Doc string
+If user option `icicle-command-abbrev-match-all-parts-flag' is nil
+then an abbreviation need not match all parts of a command name; it
+need match only a prefix.  For example, if nil then abbreviation `ff'
+also matches `find-file-other-window' and `fg' also matches
+`find-grep-dired'.
+
+You can use `\\<minibuffer-local-completion-map>\\[icicle-toggle-transforming]' \
+to toggle filtering of candidates to those that are
+bound to keys.
+
+You can use `\\[icicle-toggle-annotation]' to toggle showing key bindings as annotations.
+\(Menu bindings are not shown.)"        ; Doc string
   icicle-command-abbrev-action          ; Function to perform the action
-  prompt obarray (and icompletep pred) nil nil ; `completing-read' args
+  prompt obarray (and icompletep  pred) nil nil ; `completing-read' args
   'icicle-command-abbrev-history nil nil
   ((prompt                                  "Command or abbrev: ")
    (last-command                            last-command) ; Save and restore the last command.
-   (icicle-sort-comparer                    'icicle-command-abbrev-used-more-p) ; Bindings.
+   (icicle-sort-comparer                    'icicle-proxy-candidate-first-p)
+   (first-sort-entries                      '(("proxy candidates first" . icicle-proxy-candidate-first-p)
+                                              ("by abbrev frequency" . icicle-command-abbrev-used-more-p)))
+   (icicle-sort-orders-alist                (append
+                                             first-sort-entries
+                                             (delete (car first-sort-entries)
+                                                     (delete (cadr first-sort-entries)
+                                                             (copy-sequence icicle-sort-orders-alist)))))
+   (icicle-allowed-sort-predicate           'icicle-command-abbrev-used-more-p)
    (icicle-proxy-candidates                 (let ((ipc  ())
                                                   abv)
                                               (dolist (entry  icicle-command-abbrev-alist  ipc)
                                                 (setq abv  (symbol-name (cadr entry)))
-                                                (unless (member abv ipc) (push abv ipc)))))
+                                                (unless (member abv ipc) (push abv ipc)))
+                                              ipc))
    (use-file-dialog                         nil) ; `mouse-2' in `*Completions*' won't use dialog box.
    (alt-fn                                  nil)
    (icicle-orig-must-pass-after-match-pred  icicle-must-pass-after-match-predicate)
-   (pred                                    #'(lambda (c)
-                                                (unless (symbolp c) (setq c  (intern c)))
-                                                (commandp c)))
+ &n