Commits

Mike Steder  committed 5cb93e7

Added pdb script, ibuffers, and icicles(disables at the moment)

  • Participants
  • Parent commits 14b0372

Comments (0)

Files changed (21)

 (load "custom.el")
 (load "special_files.el")
 (load "look_and_feel.el")
+;; icicles is immense and confusing, perhaps I'll figure it out
+;; another time:
+;(load "msicicles.el")
+;; Ibuffer seems like it might be worthwhile:
+(load "buffers.el")
 (load "mouse.el")
 (load "keybindings.el")
 (load "mspython.el")

File emacs.d/buffers.el

+;;; Ibuffer is an alternative to the normal buffer list
+;;  which supports:
+;;
+;; Search all marked buffers
+;;‘M-s a C-s’ - Do incremental search in the marked buffers.
+;;‘M-s a C-M-s’ - Isearch for regexp in the marked buffers.
+;;‘U’ - Replace by regexp in each of the marked buffers.
+;;‘Q’ - Query replace in each of the marked buffers.
+;;‘I’ - As above, with a regular expression.
+(global-set-key (kbd "C-x C-b") 'ibuffer)
+(autoload 'ibuffer "ibuffer" "List buffers." t)

File emacs.d/icicles/hexrgb.el

+;;; hexrgb.el --- Functions to manipulate colors, including RGB hex strings.
+;;
+;; Filename: hexrgb.el
+;; Description: Functions to manipulate colors, including RGB hex strings.
+;; Author: Drew Adams
+;; Maintainer: Drew Adams
+;; Copyright (C) 2004-2010, Drew Adams, all rights reserved.
+;; Created: Mon Sep 20 22:58:45 2004
+;; Version: 21.0
+;; Last-Updated: Fri Jan 15 13:18:01 2010 (-0800)
+;;           By: dradams
+;;     Update #: 733
+;; URL: http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el
+;; Keywords: number, hex, rgb, color, background, frames, display
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;;
+;; Features that might be required by this library:
+;;
+;;   None
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;;  Functions to manipulate colors, including RGB hex strings.
+;;
+;;  This library provides functions for converting between RGB (red,
+;;  green, blue) color components and HSV (hue, saturation, value)
+;;  color components.  It helps you convert among Emacs color values
+;;  (whole numbers from 0 through 65535), RGB and HSV floating-point
+;;  components (0.0 through 1.0), Emacs color-name strings (such as
+;;  "blue"), and hex RGB color strings (such as "#FC43A7912").
+;;
+;;  An RGB hex string, such as used as a frame `background-color'
+;;  property, is a string of 1 + (3 * n) characters, the first of
+;;  which is "#".  The other characters are hexadecimal digits, in
+;;  three groups representing (from the left): red, green, and blue
+;;  hex codes.
+;;
+;;  Constants defined here:
+;;
+;;    `hexrgb-defined-colors', `hexrgb-defined-colors-alist',
+;;    `hexrgb-defined-colors-no-dups',
+;;    `hexrgb-defined-colors-no-dups-alist'.
+;;
+;;  Options defined here:
+;;
+;;    `hexrgb-canonicalize-defined-colors-flag'.
+;;
+;;  Commands defined here:
+;;
+;;    `hexrgb-blue', `hexrgb-complement', `hexrgb-green',
+;;    `hexrgb-hue', `hexrgb-read-color', `hexrgb-red',
+;;    `hexrgb-saturation', `hexrgb-value'.
+;;
+;;  Non-interactive functions defined here:
+;;
+;;    `hexrgb-approx-equal', `hexrgb-canonicalize-defined-colors',
+;;    `hexrgb-color-name-to-hex', `hexrgb-color-values-to-hex',
+;;    `hexrgb-color-value-to-float', `hexrgb-defined-colors',
+;;    `hexrgb-defined-colors-alist',
+;;    `hexrgb-delete-whitespace-from-string',
+;;    `hexrgb-float-to-color-value', `hexrgb-hex-char-to-integer',
+;;    `hexrgb-hex-to-color-values', `hexrgb-hex-to-hsv',
+;;    `hexrgb-hex-to-rgb', `hexrgb-hsv-to-hex', `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-rgb-hex-string-p',
+;;    `hexrgb-rgb-to-hex', `hexrgb-rgb-to-hsv'.
+;;
+;;
+;;  Add this to your initialization file (~/.emacs or ~/_emacs):
+;;
+;;    (require 'hexrgb)
+;;
+;;  Do not try to use this library without a window manager.
+;;  That is, do not use this with `emacs -nw'.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Change log:
+;;
+;; 2009/11/14 dadams
+;;    hexrgb-rgb-to-hsv: Corrected hue when > 1.0.  Use strict inequality for hue limit tests.
+;;    hexrgb-approx-equal: Convert RFUZZ and AFUZZ to their absolute values.
+;; 2009/11/03 dadams
+;;    Added: hexrgb-delete-whitespace-from-string, hexrgb-canonicalize-defined-colors,
+;;           hexrgb-defined-colors(-no-dups)(-alist), hexrgb-canonicalize-defined-colors-flag.
+;;    hexrgb-read-color: Use function hexrgb-defined-colors-alist, not the constant.
+;; 2008/12/25 dadams
+;;    hexrgb-rgb-to-hsv:
+;;      Replace (not (equal 0.0e+NaN saturation)) by standard test (= saturation saturation).
+;;      Thx to  Michael Heerdegen for the bug report.
+;; 2008-10-17 dadams
+;;    hexrgb-defined-colors(-alist): Prevent load-time error if user tries to use emacs -nw.
+;; 2007/12/30 dadams
+;;    Added: hexrgb-hex-to-color-values.
+;; 2007/10/20 dadams
+;;    hexrgb-read-color: Treat pseudo colors too (e.g. *point foreground*).
+;; 2007/01/21 dadams
+;;    hexrgb-read-color: Error if empty string (and not allow-empty-name-p).
+;; 2006/06/06 dadams
+;;    Added: hexrgb-defined-colors(-alist).  Use instead of (x-defined-colors).
+;;    hexrgb-(red|green|blue): Added interactive specs.
+;; 2006/06/04 dadams
+;;    hexrgb-read-color: Added optional arg allow-empty-name-p.
+;; 2006/06/02 dadams
+;;    Added: hexrgb-rgb-hex-string-p.  Used it.
+;; 2006/05/30 dadams
+;;    Added: hexrgb-hex-to-(hsv|rgb), hexrgb-hsv-to-hex, hexrgb-color-name-to-hex,
+;;           hexrgb-complement, hexrgb-read-color, hexrgb-hue, hexrgb-saturation,
+;;           hexrgb-value, hexrgb-red, hexrgb-blue, hexrgb-green.
+;;    approx-equal: Add optional fuzz factor arguments.  Changed the algorithm.
+;;    Renamed: approx-equal to hexrgb-approx-equal.
+;;    hexrgb-rgb-to-hsv: Changed test from < to <=: (when (<= hue 0.0)...).
+;;    hexrgb-hsv-to-rgb: Treat hue = 0.0 (int 0) the same as hue = 1.0 (int 6).
+;;    hexrgb-rgb-to-hex, hexrgb-increment-hex: Corrected doc strings.
+;; 2006/05/22 dadams
+;;    Added: hexrgb-hsv-to-hex, hexrgb-rgb-to-hex.  Require cl.el when byte-compile.
+;; 2005/08/09 dadams
+;;    hexrgb-rgb-to-hsv: Side-stepped Emacs-20 bug in comparing NaN.
+;;    hexrgb-increment-*: Added optional arg wrap-p.
+;;    hexrgb-increment-hex: Prevent wrap if not wrap-p.
+;; 2005/08/02 dadams
+;;    hexrgb-rgb-to-hes: Bug fix: If delta is zero, then so are hue and saturation.
+;; 2005/06/24 dadams
+;;    hexrgb-rgb-to-hsv: Bug fix: test for NaN (e.g. on divide by zero).
+;; 2005/02/08 dadams
+;;    hexrgb-hsv-to-rgb: Bug fix (typo: p, q -> pp, qq; added ww).
+;; 2005/01/09 dadams
+;;    hexrgb-int-to-hex: Fixed bug in hexrgb-int-to-hex: nb-digits not respected.
+;;    Added: hexrgb-hsv-to-rgb, hexrgb-rgb-to-hsv, approx-equal.
+;;    Renamed old hexrgb-increment-value to hexrgb-increment-equal-rgb.
+;; 2005/01/05 dadams
+;;    hexrgb-int-to-hex: Used a suggestion from Juri Linkov.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(eval-when-compile (require 'cl)) ;; case; plus, for Emacs < 20: when, unless
+
+;; Unless you first load `hexrgb.el', then either `palette.el' or `eyedropper.el', you will get
+;; warnings about variables and functions with prefix `eyedrop-' when you byte-compile
+;; `hexrgb.el'.  You can ignore these warnings.
+
+(defvar eyedrop-picked-foreground)
+(defvar eyedrop-picked-background)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(eval-and-compile
+ (defun hexrgb-canonicalize-defined-colors (list)
+   "Copy of LIST with color names canonicalized.
+LIST is a list of color names (strings).
+Canonical names are lowercase, with no whitespace.
+There are no duplicate names."
+   (let ((tail  list)
+         this new)
+     (while tail
+       (setq this  (car tail)
+             this  (hexrgb-delete-whitespace-from-string (downcase this) 0 (length this)))
+       (unless (member this new) (push this new))
+       (pop tail))
+     (nreverse new)))
+
+ (defun hexrgb-delete-whitespace-from-string (string &optional from to)
+   "Remove whitespace from substring of STRING from FROM to TO.
+If FROM is nil, then start at the beginning of STRING (FROM = 0).
+If TO is nil, then end at the end of STRING (TO = length of STRING).
+FROM and TO are zero-based indexes into STRING.
+Character FROM is affected (possibly deleted).  Character TO is not."
+   (setq from  (or from 0)
+         to    (or to (length string)))
+   (with-temp-buffer
+     (insert string)
+     (goto-char (+ from (point-min)))
+     (let ((count  from)
+           char)
+       (while (and (not (eobp))  (< count to))
+         (setq char  (char-after))
+         (if (memq char '(?\  ?\t ?\n))  (delete-char 1)  (forward-char 1))
+         (setq count  (1+ count)))
+       (buffer-string)))))
+
+;;;###autoload
+(defconst hexrgb-defined-colors (eval-when-compile (and window-system (x-defined-colors)))
+  "List of all supported colors.")
+
+;;;###autoload
+(defconst hexrgb-defined-colors-no-dups
+    (eval-when-compile
+     (and window-system (hexrgb-canonicalize-defined-colors (x-defined-colors))))
+  "List of all supported color names, with no duplicates.
+Names are all lowercase, without any spaces.")
+
+;;;###autoload
+(defconst hexrgb-defined-colors-alist
+    (eval-when-compile (and window-system (mapcar #'list (x-defined-colors))))
+  "Alist of all supported color names, for use in completion.
+See also `hexrgb-defined-colors-no-dups-alist', which is the same
+thing, but without any duplicates, such as \"light blue\" and
+\"LightBlue\".")
+
+;;;###autoload
+(defconst hexrgb-defined-colors-no-dups-alist
+    (eval-when-compile
+     (and window-system
+          (mapcar #'list (hexrgb-canonicalize-defined-colors (x-defined-colors)))))
+  "Alist of all supported color names, with no duplicates, for completion.
+Names are all lowercase, without any spaces.")
+
+;;;###autoload
+(defcustom hexrgb-canonicalize-defined-colors-flag t
+  "*Non-nil means remove duplicate color names.
+Names are considered duplicates if they are the same when abstracting
+from whitespace and letter case."
+  :type 'boolean
+  :group 'Icicles :group 'doremi-frame-commands :group 'faces :group 'convenience)
+
+;; You should use these two functions, not the constants, so users can change
+;; the behavior by customizing `hexrgb-canonicalize-defined-colors-flag'.
+
+(defun hexrgb-defined-colors ()
+  "List of supported color names.
+If `hexrgb-canonicalize-defined-colors-flag' is non-nil, then names
+are lowercased, whitespace is removed, and there are no duplicates."
+  (if hexrgb-canonicalize-defined-colors-flag
+      hexrgb-defined-colors-no-dups
+    hexrgb-defined-colors))
+
+(defun hexrgb-defined-colors-alist ()
+  "Alist of supported color names.  Usable for completion.
+If `hexrgb-canonicalize-defined-colors-flag' is non-nil, then names
+are lowercased, whitespace is removed, and there are no duplicates."
+  (if hexrgb-canonicalize-defined-colors-flag
+      hexrgb-defined-colors-no-dups-alist
+    hexrgb-defined-colors-alist))
+
+;; RMS added this function to Emacs (23) as `read-color', with some feature loss.
+;;;###autoload
+(defun hexrgb-read-color (&optional convert-to-RGB-p allow-empty-name-p prompt)
+  "Read a color name or RGB hex value: #RRRRGGGGBBBB.
+Completion is available for color names, but not for RGB hex strings.
+If you input an RGB hex string, it must have the form #XXXXXXXXXXXX or
+XXXXXXXXXXXX, where each X is a hex digit.  The number of Xs must be a
+multiple of 3, with the same number of Xs for each of red, green, and
+blue.  The order is red, green, blue.
+
+Color names that are normally considered equivalent are canonicalized:
+They are lowercased, whitespace is removed, and duplicates are
+eliminated.  E.g. \"LightBlue\" and \"light blue\" are both replaced
+by \"lightblue\".  If you do not want this behavior, but want to
+choose names that might contain whitespace or uppercase letters, then
+customize option `hexrgb-canonicalize-defined-colors-flag' to nil.
+
+In addition to standard color names and RGB hex values, the following
+are available as color candidates.  In each case, the corresponding
+color is used.
+
+* `*copied foreground*'  - last copied foreground, if available
+* `*copied background*'  - last copied background, if available
+* `*mouse-2 foreground*' - foreground where you click `mouse-2'
+* `*mouse-2 background*' - background where you click `mouse-2'
+* `*point foreground*'   - foreground under the cursor
+* `*point background*'   - background under the cursor
+
+\(You can copy a color using eyedropper commands such as
+`eyedrop-pick-foreground-at-mouse'.)
+
+Checks input to be sure it represents a valid color.  If not, raises
+an error (but see exception for empty input with non-nil
+ALLOW-EMPTY-NAME-P).
+
+Interactively, or with optional arg CONVERT-TO-RGB-P non-nil, converts
+an input color name to an RGB hex string.  Returns the RGB hex string.
+
+Optional arg ALLOW-EMPTY-NAME-P controls what happens if you enter an
+empty color name (that is, you just hit `RET').  If non-nil, then
+`hexrgb-read-color' returns an empty color name, \"\".  If nil, then
+it raises an error.  Programs must test for \"\" if ALLOW-EMPTY-NAME-P
+is non-nil.  They can then perform an appropriate action in case of
+empty input.
+
+Optional arg PROMPT is the prompt.  Nil means use a default prompt."
+  (interactive "p")                     ; Always convert to RGB interactively.
+  (let* ((completion-ignore-case  t)
+         ;; Free variables here: `eyedrop-picked-foreground', `eyedrop-picked-background'.
+         ;; They are defined in library `palette.el' or library `eyedropper.el'.
+         (colors                  (if (fboundp 'eyedrop-foreground-at-point)
+                                      (append (and eyedrop-picked-foreground
+                                                   '(("*copied foreground*")))
+                                              (and eyedrop-picked-background
+                                                   '(("*copied background*")))
+                                              '(("*mouse-2 foreground*")
+                                                ("*mouse-2 background*")
+                                                ("*point foreground*") ("*point background*"))
+                                              (hexrgb-defined-colors-alist))
+                                    (hexrgb-defined-colors-alist)))
+         (color                   (completing-read (or prompt "Color (name or #R+G+B+): ")
+                                                   colors))
+         hex-string)
+    (when (fboundp 'eyedrop-foreground-at-point)
+      (cond ((string= "*copied foreground*" color) (setq color  eyedrop-picked-foreground))
+            ((string= "*copied background*" color) (setq color  eyedrop-picked-background))
+            ((string= "*point foreground*" color)  (setq color  (eyedrop-foreground-at-point)))
+            ((string= "*point background*" color)  (setq color  (eyedrop-background-at-point)))
+            ((string= "*mouse-2 foreground*" color)
+             (setq color  (prog1 (eyedrop-foreground-at-mouse
+                                  (read-event "Click `mouse-2' to choose foreground color - "))
+                            (read-event)))) ; Discard mouse up event.
+            ((string= "*mouse-2 background*" color)
+             (setq color  (prog1 (eyedrop-background-at-mouse
+                                  (read-event "Click `mouse-2' to choose background color - "))
+                            (read-event)))))) ; Discard mouse up event.
+    (setq hex-string  (or (string-match "^#\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$" color)
+                          (and (string-match "^\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$" color)
+                               t)))
+    (if (and allow-empty-name-p (string= "" color))
+        ""
+      (when (and hex-string (not (eq 0 hex-string)))
+        (setq color  (concat "#" color))) ; No #; add it.
+      (unless hex-string
+        (when (or (string= "" color)
+                  (not (if (fboundp 'test-completion) ; Not defined in Emacs 20.
+                           (test-completion color colors)
+                         (try-completion color colors))))
+          (error "No such color: %S" color))
+        (when convert-to-RGB-p (setq color  (hexrgb-color-name-to-hex color))))
+      (when (interactive-p) (message "Color: `%s'" color))
+      color)))
+
+;;;###autoload
+(defun hexrgb-rgb-hex-string-p (color &optional laxp)
+  "Non-nil if COLOR is an RGB string #XXXXXXXXXXXX.
+Each X is a hex digit.  The number of Xs must be a multiple of 3, with
+the same number of Xs for each of red, green, and blue.
+
+Non-nil optional arg LAXP means that the initial `#' is optional.  In
+that case, for a valid string of hex digits: when # is present 0 is
+returned; otherwise, t is returned."
+  (or (string-match "^#\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$" color)
+      (and laxp (string-match "^\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+$" color) t)))
+
+;;;###autoload
+(defun hexrgb-complement (color)
+  "Return the color that is the complement of COLOR."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (let ((red    (hexrgb-red color))
+        (green  (hexrgb-green color))
+        (blue   (hexrgb-blue color)))
+    (setq color  (hexrgb-rgb-to-hex (- 1.0 red) (- 1.0 green) (- 1.0 blue))))
+  (when (interactive-p) (message "Complement: `%s'" color))
+  color)
+
+;;;###autoload
+(defun hexrgb-hue (color)
+  "Return the hue component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (car (hexrgb-rgb-to-hsv (hexrgb-red color) (hexrgb-green color) (hexrgb-blue color))))
+
+;;;###autoload
+(defun hexrgb-saturation (color)
+  "Return the saturation component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (cadr (hexrgb-rgb-to-hsv (hexrgb-red color) (hexrgb-green color) (hexrgb-blue color))))
+
+;;;###autoload
+(defun hexrgb-value (color)
+  "Return the value component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (caddr (hexrgb-rgb-to-hsv (hexrgb-red color) (hexrgb-green color) (hexrgb-blue color))))
+
+;;;###autoload
+(defun hexrgb-red (color)
+  "Return the red component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (/ (hexrgb-hex-to-int (substring color 1 (1+ (/ (1- (length color)) 3))))
+     (expt 16.0 (/ (1- (length color)) 3.0))))
+
+;;;###autoload
+(defun hexrgb-green (color)
+  "Return the green component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (let* ((len    (/ (1- (length color)) 3))
+         (start  (1+ len)))
+    (/ (hexrgb-hex-to-int (substring color start (+ start len)))
+       (expt 16.0 (/ (1- (length color)) 3.0)))))
+
+;;;###autoload
+(defun hexrgb-blue (color)
+  "Return the blue component of COLOR, in range 0 to 1 inclusive.
+COLOR is a color name or hex RGB string that starts with \"#\"."
+  (interactive (list (hexrgb-read-color)))
+  (setq color  (hexrgb-color-name-to-hex color))
+  (let* ((len    (/ (1- (length color)) 3))
+         (start  (+ 1 len len)))
+    (/ (hexrgb-hex-to-int (substring color start (+ start len)))
+       (expt 16.0 (/ (1- (length color)) 3.0)))))
+
+;;;###autoload
+(defun hexrgb-rgb-to-hsv (red green blue)
+  "Convert RED, GREEN, BLUE components to HSV (hue, saturation, value).
+Each input component is 0.0 to 1.0, inclusive.
+Returns a list of HSV components of value 0.0 to 1.0, inclusive."
+  (let* ((min    (min red green blue))
+         (max    (max red green blue))
+         (value  max)
+         (delta  (- max min))
+         hue saturation)
+    (if (hexrgb-approx-equal 0.0 delta)
+        (setq hue         0.0
+              saturation  0.0)          ; Gray scale - no color; only value.
+      (if (and (condition-case nil
+                   (setq saturation  (/ delta max))
+                 (arith-error nil))
+               ;; Must be a number, not a NaN.  The standard test for a NaN is (not (= N N)),
+               ;; but an Emacs 20 bug makes (= N N) return t for a NaN also.
+               (or (< emacs-major-version 21) (= saturation saturation)))                
+          (if (hexrgb-approx-equal 0.0 saturation)
+              (setq hue         0.0
+                    saturation  0.0)    ; Again, no color; only value.
+            ;; Color
+            (setq hue  (if (hexrgb-approx-equal red max)
+                           (/ (- green blue) delta) ; Between yellow & magenta.
+                         (if (hexrgb-approx-equal green max)
+                             (+ 2.0 (/ (- blue red) delta)) ; Between cyan & yellow.
+                           (+ 4.0 (/ (- red green) delta)))) ; Between magenta & cyan.
+                  hue  (/ hue 6.0))
+            ;; (when (<= hue 0.0) (setq hue  (+ hue 1.0)))  ; $$$$$$
+            ;; (when (>= hue 1.0) (setq hue  (- hue 1.0)))) ; $$$$$$
+            (when (< hue 0.0) (setq hue  (+ hue 1.0)))
+            (when (> hue 1.0) (setq hue  (- hue 1.0))))
+        (setq hue         0.0           ; Div by zero (max=0): H:=0, S:=0. (Hue undefined.)
+              saturation  0.0)))
+    (list hue saturation value)))
+
+;;;###autoload
+(defun hexrgb-hsv-to-rgb (hue saturation value)
+  "Convert HUE, SATURATION, VALUE components to RGB (red, green, blue).
+Each input component is 0.0 to 1.0, inclusive.
+Returns a list of RGB components of value 0.0 to 1.0, inclusive."
+  (let (red green blue int-hue fract pp qq tt ww)
+    (if (hexrgb-approx-equal 0.0 saturation)
+        (setq red    value
+              green  value
+              blue   value)             ; Gray
+      (setq hue      (* hue 6.0)        ; Sectors: 0 to 5
+            int-hue  (floor hue)
+            fract    (- hue int-hue)
+            pp       (* value (- 1 saturation))
+            qq       (* value (- 1 (* saturation fract)))
+            ww       (* value (- 1 (* saturation (- 1 (- hue int-hue))))))
+      (case int-hue
+        ((0 6) (setq red    value
+                     green  ww
+                     blue   pp))
+        (1 (setq red    qq
+                 green  value
+                 blue   pp))
+        (2 (setq red    pp
+                 green  value
+                 blue   ww))
+        (3 (setq red    pp
+                 green  qq
+                 blue   value))
+        (4 (setq red    ww
+                 green  pp
+                 blue   value))
+        (otherwise (setq red    value
+                         green  pp
+                         blue   qq))))
+    (list red green blue)))
+
+;;;###autoload
+(defun hexrgb-hsv-to-hex (hue saturation value)
+  "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\"."
+  (hexrgb-color-values-to-hex
+   (mapcar (lambda (x) (floor (* x 65535.0))) (hexrgb-hsv-to-rgb hue saturation value))))
+
+;;;###autoload
+(defun hexrgb-rgb-to-hex (red green blue)
+  "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\"."
+  (hexrgb-color-values-to-hex
+   (mapcar (lambda (x) (floor (* x 65535.0))) (list red green blue))))
+
+;;;###autoload
+(defun hexrgb-hex-to-hsv (color)
+  "Return a list of HSV (hue, saturation, value) color components.
+Each component is a value from 0.0 to 1.0, inclusive.
+COLOR is a color name or a hex RGB string that starts with \"#\" and
+is followed by an equal number of hex digits for red, green, and blue
+components."
+  (let ((rgb-components  (hexrgb-hex-to-rgb color)))
+    (apply #'hexrgb-rgb-to-hsv rgb-components)))
+
+;;;###autoload
+(defun hexrgb-hex-to-rgb (color)
+  "Return a list of RGB (red, green, blue) color components.
+Each component is a value from 0.0 to 1.0, inclusive.
+COLOR is a color name or a hex RGB string that starts with \"#\" and
+is followed by an equal number of hex digits for red, green, and blue
+components."
+  (unless (hexrgb-rgb-hex-string-p color) (setq color  (hexrgb-color-name-to-hex color)))
+  (let ((len  (/ (1- (length color)) 3)))
+    (list (/ (hexrgb-hex-to-int (substring color 1 (1+ len))) 65535.0)
+          (/ (hexrgb-hex-to-int (substring color (1+ len) (+ 1 len len))) 65535.0)
+          (/ (hexrgb-hex-to-int (substring color (+ 1 len len))) 65535.0))))
+
+;;;###autoload
+(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."
+  (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))))
+  color)
+
+;; Just hard-code 4 as the number of hex digits, since `x-color-values'
+;; seems to produce appropriate integer values for this value.
+;;
+;; 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').
+;;;###autoload
+(defun hexrgb-color-values-to-hex (values)
+  "Convert list of rgb color VALUES to a hex string, #XXXXXXXXXXXX.
+Each X in the string is a hexadecimal digit.
+Input VALUES is as for the output of `x-color-values'."
+  (concat "#" (hexrgb-int-to-hex (nth 0 values) 4) ; red
+          (hexrgb-int-to-hex (nth 1 values) 4) ; green
+          (hexrgb-int-to-hex (nth 2 values) 4))) ; blue
+
+;;;###autoload
+(defun hexrgb-hex-to-color-values (color)
+  "Convert hex COLOR to a list of rgb color values.
+COLOR is a hex rgb color string, #XXXXXXXXXXXX
+Each X in the string is a hexadecimal digit.  There are 3N X's, N > 0.
+The output list is as for `x-color-values'."
+  (let* ((hex-strgp  (string-match
+                      "^\\(#\\)?\\(\\([a-fA-F0-9][a-fA-F0-9][a-fA-F0-9]\\)+\\)$"
+                      color))
+         (ndigits    (/ (if (eq (match-beginning 1) (match-end 1))
+                            (length color)
+                          (1- (length color)))
+                        3))
+         red green blue)
+    (unless hex-strgp (error "Invalid RGB color string: %s" color))
+    (setq color  (substring color (match-beginning 2) (match-end 2))
+          red    (hexrgb-hex-to-int (substring color 0 ndigits))
+          green  (hexrgb-hex-to-int (substring color ndigits (* 2 ndigits)))
+          blue   (hexrgb-hex-to-int (substring color ndigits (* 3 ndigits))))
+    (list red green blue)))
+    
+;;;###autoload
+(defun hexrgb-increment-red (hex nb-digits increment &optional wrap-p)
+  "Increment red value of rgb string HEX by INCREMENT.
+String HEX starts with \"#\".  Each color is NB-DIGITS hex digits long.
+If optional arg WRAP-P is non-nil, then the result wraps around zero.
+For example, incrementing \"#FFFFFFFFF\" by 1 will cause it to wrap
+around to \"#000000000\"."
+  (concat "#"
+          (hexrgb-increment-hex (substring hex 1 (1+ nb-digits)) increment nb-digits wrap-p)
+          (substring hex (1+ nb-digits) (1+ (* nb-digits 2)))
+          (substring hex (1+ (* nb-digits 2)))))
+
+;;;###autoload
+(defun hexrgb-increment-green (hex nb-digits increment &optional wrap-p)
+  "Increment green value of rgb string HEX by INCREMENT.
+String HEX starts with \"#\".  Each color is NB-DIGITS hex digits long.
+For example, incrementing \"#FFFFFFFFF\" by 1 will cause it to wrap
+around to \"#000000000\"."
+  (concat
+   "#" (substring hex 1 (1+ nb-digits))
+   (hexrgb-increment-hex (substring hex (1+ nb-digits) (1+ (* nb-digits 2)))
+                         increment
+                         nb-digits
+                         wrap-p)
+   (substring hex (1+ (* nb-digits 2)))))
+
+;;;###autoload
+(defun hexrgb-increment-blue (hex nb-digits increment &optional wrap-p)
+  "Increment blue value of rgb string HEX by INCREMENT.
+String HEX starts with \"#\".  Each color is NB-DIGITS hex digits long.
+For example, incrementing \"#FFFFFFFFF\" by 1 will cause it to wrap
+around to \"#000000000\"."
+  (concat "#" (substring hex 1 (1+ (* nb-digits 2)))
+          (hexrgb-increment-hex (substring hex (1+ (* nb-digits 2)))
+                                increment
+                                nb-digits
+                                wrap-p)))
+
+;;;###autoload
+(defun hexrgb-increment-equal-rgb (hex nb-digits increment &optional wrap-p)
+  "Increment each color value (r,g,b) of rgb string HEX by INCREMENT.
+String HEX starts with \"#\".  Each color is NB-DIGITS hex digits long.
+For example, incrementing \"#FFFFFFFFF\" by 1 will cause it to wrap
+around to \"#000000000\"."
+  (concat
+   "#" (hexrgb-increment-hex (substring hex 1 (1+ nb-digits)) increment nb-digits wrap-p)
+   (hexrgb-increment-hex (substring hex (1+ nb-digits) (1+ (* nb-digits 2)))
+                         increment
+                         nb-digits
+                         wrap-p)
+   (hexrgb-increment-hex (substring hex (1+ (* nb-digits 2))) increment nb-digits wrap-p)))
+
+;;;###autoload
+(defun hexrgb-increment-hex (hex increment nb-digits &optional wrap-p)
+  "Increment HEX number (a string NB-DIGITS long) by INCREMENT.
+For example, incrementing \"FFFFFFFFF\" by 1 will cause it to wrap
+around to \"000000000\"."
+  (let* ((int      (hexrgb-hex-to-int hex))
+         (new-int  (+ increment int)))
+    (if (or wrap-p
+            (and (>= int 0)             ; Not too large for the machine.
+                 (>= new-int 0)         ; For the case where increment < 0.
+                 (<= (length (format (concat "%X") new-int)) nb-digits))) ; Not too long.
+        (hexrgb-int-to-hex new-int nb-digits) ; Use incremented number.
+      hex)))                            ; Don't increment.
+
+;;;###autoload
+(defun hexrgb-hex-to-int (hex)
+  "Convert HEX string argument to an integer.
+The characters of HEX must be hex characters."
+  (let* ((factor  1)
+         (len     (length hex))
+         (indx    (1- len))
+         (int     0))
+    (while (>= indx 0)
+      (setq int     (+ int (* factor (hexrgb-hex-char-to-integer (aref hex indx))))
+            indx    (1- indx)
+            factor  (* 16 factor)))
+    int))
+
+;; From `hexl.el'.  This is the same as `hexl-hex-char-to-integer' defined there.
+;;;###autoload
+(defun hexrgb-hex-char-to-integer (character)
+  "Take a CHARACTER and return its value as if it were a hex digit."
+  (if (and (>= character ?0) (<= character ?9))
+      (- character ?0)
+    (let ((ch  (logior character 32)))
+      (if (and (>= ch ?a) (<= ch ?f))
+          (- ch (- ?a 10))
+        (error "Invalid hex digit `%c'" ch)))))
+
+;; Originally, I used the code from `int-to-hex-string' in `float.el'.
+;; This version is thanks to Juri Linkov <juri@jurta.org>.
+;;
+;;;###autoload
+(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."
+  (setq nb-digits  (or nb-digits 4))
+  (substring (format (concat "%0" (int-to-string nb-digits) "X") int) (- nb-digits)))
+
+;; Inspired by Elisp Info manual, node "Comparison of Numbers".
+;;;###autoload
+(defun hexrgb-approx-equal (x y &optional rfuzz afuzz)
+  "Return non-nil if numbers X and Y are approximately equal.
+RFUZZ is a relative fuzz factor.  AFUZZ is an absolute fuzz factor.
+RFUZZ defaults to 1.0e-8.  AFUZZ defaults to (/ RFUZZ 10).
+RFUZZ and AFUZZ are converted to their absolute values.
+The algorithm is:
+ (< (abs (- X Y)) (+ AFUZZ (* RFUZZ (+ (abs X) (abs Y)))))."
+  (setq rfuzz  (or rfuzz 1.0e-8)
+        rfuzz  (abs rfuzz)
+        afuzz  (or afuzz (/ rfuzz 10))
+        afuzz  (abs afuzz))
+  (< (abs (- x y)) (+ afuzz (* rfuzz (+ (abs x) (abs y))))))
+
+;;;###autoload
+(defun hexrgb-color-value-to-float (n)
+  "Return the floating-point equivalent of color value N.
+N must be an integer between 0 and 65535, or else an error is raised."
+  (unless (and (wholenump n) (<= n 65535))
+    (error "Not a whole number less than 65536"))
+  (/ (float n) 65535.0))
+
+;;;###autoload
+(defun hexrgb-float-to-color-value (x)
+  "Return the color value equivalent of floating-point number X.
+X must be between 0.0 and 1.0, or else an error is raised."
+  (unless (and (numberp x) (<= 0.0 x) (<= x 1.0))
+    (error "Not a floating-point number between 0.0 and 1.0"))
+  (floor (* x 65535.0)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(provide 'hexrgb)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; hexrgb.el ends here

File emacs.d/icicles/icicles-chg.el

+;;; icicles-chg.el --- Change logs for Icicles libraries.
+;;
+;; Filename: icicles-chg.el
+;; Description: Change logs for Icicles libraries.
+;; Author: Drew Adams
+;; Maintainer: Drew Adams
+;; Copyright (C) 2007-2009, Drew Adams, all rights reserved.
+;; Created: Tue Nov 27 07:47:53 2007
+;; Version: 22.0
+;; Last-Updated: Fri Mar 19 15:31:39 2010 (-0700)
+;;           By: dradams
+;;     Update #: 4971
+;; URL: http://www.emacswiki.org/cgi-bin/wiki/icicles-chg.el
+;; Keywords: extensions, help, abbrev, local, minibuffer,
+;;           keys, apropos, completion, matching, regexp, command
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x
+;;
+;; Features that might be required by this library:
+;;
+;;   None
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;;  Change logs for Icicles libraries.
+;;
+;;  This file consolidates the change logs for all Icicles libraries.
+;;  It contains no code.
+;;
+;;  Libraries `icicles-doc1.el' and `icicles-doc2.el' contain only
+;;  documentation, and they do not have change logs.  Initially,
+;;  everything was in one library, `icicles.el', so its change log is
+;;  the oldest.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; see the file COPYING.  If not, write to
+;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+;; Floor, Boston, MA 02110-1301, USA.
+;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ 
+;;(@> "Index")
+;;
+;;  If you have library `linkd.el' and Emacs 22 or later, load
+;;  `linkd.el' and turn on `linkd-mode' now.  It lets you easily
+;;  navigate around the sections of this doc.  Linkd mode will
+;;  highlight this Index, as well as the cross-references and section
+;;  headings throughout this file.  You can get `linkd.el' here:
+;;  http://dto.freeshell.org/notebook/Linkd.html.
+;;
+;;  (@> "CHANGE LOG FOR `icicles-cmd1.el'")
+;;  (@> "CHANGE LOG FOR `icicles-cmd2.el'")
+;;  (@> "CHANGE LOG FOR `icicles-face.el'")
+;;  (@> "CHANGE LOG FOR `icicles-fn.el'")
+;;  (@> "CHANGE LOG FOR `icicles-mac.el'")
+;;  (@> "CHANGE LOG FOR `icicles-mcmd.el'")
+;;  (@> "CHANGE LOG FOR `icicles-mode.el'")
+;;  (@> "CHANGE LOG FOR `icicles-opt.el'")
+;;  (@> "CHANGE LOG FOR `icicles-var.el'")
+;;  (@> "CHANGE LOG FOR `icicles.el'")
+;;  (@> "CHANGE LOG FOR `icicles-cmd.el'" - Deprecated file)
+ 
+;;;(@* "CHANGE LOG FOR `icicles-cmd1.el'")
+;;
+;; 2010/03/19 dadams
+;;     icicle-define-bookmark-other-window-command: Rich multi-completions per icicle-bookmark.
+;; 2010/03/16 dadams
+;;     icicle-bookmark(-other-window):
+;;       Use tags, not just file names, in the multi-completions.
+;;       Use the default join string, ^G^J, and end string, ^J^J.
+;;       Use just icicle-candidate-properties-alist to highlight the file name.
+;;       Remove extra quote marks from face names.
+;; 2010/03/14 dadams
+;;     icicle-bookmark(-other-window):
+;;       Copy file/buffer name string for candidate-part face, so we don't touch bookmark-alist.
+;;       Handle icicle-bookmark-refresh-cache-flag and C-u.
+;;       Bind the narrow keys in minibuffer-local-completion also (lax for multi-completion).
+;;       Use face file-name-shadow, not icicle-candidate-part (too distracting).
+;;     icicle-bookmark-*-narrow: Use icicle-get-alist-candidate-function.
+;;     icicle-define-bookmark-other-window-command: Rewrote to handle multi-completion.
+;;     icicle-bookmark-non-file-narrow: Use bookmarkp-non-file-bookmark-p.
+;;     icicle-bookmark-propertize-candidate: Typo in a face name.
+;; 2010/03/13 dadams
+;;     icicle-bookmark(-other-window):
+;;       If Bookmark+ available then, depending on icicle-show-multi-completion-flag, use a
+;;         multi-completion showing file or buffer.  Use icicle-candidates-alist to do that.
+;;       Don't put icicle-fancy-candidates prop on prompt.
+;;       Don't use icicle-sorted-bookmark-alist (removed).  Recompute each time.
+;; 2010/03/10 dadams
+;;     icicle-bookmark-help-string:
+;;       Mention the type in the help: sequence, function, bookmark list, desktop, etc.
+;;       Don't show position for types that don't use one.  Don't show file for buffer & Dired.
+;; 2010/03/09 dadams
+;;     icicle-color-theme: Initialize variable icicle-color-themes here, not in icicles-opt.el.
+;; 2010/03/04 dadams
+;;     icicle-bookmark(-other-window): Use bookmarkp-describe-bookmark(-internals) for C-M-RET.
+;; 2010/03/03 dadams
+;;     icicle-bookmark(-other-window), icicle-define-bookmark-other-window-command:
+;;       Use bookmarkp-sort-and-remove-dups.
+;;       Bind icicle-sort-orders-alist, using bookmarkp predicates.
+;;     icicle-bookmark(-other-window):
+;;       Set icicle-sorted-bookmark-alist and bookmarkp-sorted-alist.
+;;       Use bookmarkp-sorted-alist.
+;;       Don't append original icicle-sort-orders-alist.  Just include a couple of its entries.
+;;     Applied renamings: icicle-sort-function to icicle-sort-comparer,
+;;                        icicle-sort-functions-alist to icicle-sort-orders-alist.
+;; 2010/02/28 dadams
+;;     icicle-send-bug-report: Formatted body a bit.
+;; 2010/02/14 dadams
+;;     Added: icicle-bookmark-bookmark-list-other-window, icicle-bookmark-bookmark-list-narrow.
+;;     icicle-bookmark(-other-window):
+;;       Bound to C-M- prefix: icicle-bookmark-bookmark-list-narrow.  Updated doc string.
+;; 2010/02/13 dadams
+;;     Added: icicle-bookmark-(desktop|man)-other-window,
+;;            icicle-bookmark-(dired|desktop|man)-narrow.
+;;     icicle-define-bookmark-other-window-command: Raise error if bookmark+.el not found.
+;;     icicle-bookmark(-other-window):
+;;       Bound to C-M- prefix: icicle-bookmark-(dired|desktop|man)-narrow.
+;;     icicle-bookmark-propertize-candidate:
+;;       Handle also: sequence, function, bookmark list, desktop, man, buffer, bad bookmarks.
+;; 2010/02/02 dadams
+;;     icicle-bookmark-jump-1: Don't select minibuffer window and give it focus.
+;; 2010/01/30 dadams
+;;     icicle-dired(-other-window), icicle-(find|recent|locate)-file(-absolute)(-other-window)
+;;       icicle-find-file-in-tags-table(-other-window):
+;;         Bind icicle-all-candidates-list-alt-action-fn to open Dired on matching files.
+;; 2010/01/13 dadams
+;;     icicle-recent-file(-other-window):
+;;       Restore C-S-RET as icicle-remove-from-recentf-candidate-action (accidentally removed).
+;; 2010/01/12 dadams
+;;     Added: icicle-pp-display-expression.
+;;     icicle-pp-eval-expression: Use icicle-pp-display-expression.
+;;     icicle-bbdb-complete-name: save-excursion + set-buffer -> with-current-buffer.
+;; 2009/12/21 dadams
+;;     fset -> defalias.
+;; 2009/12/13 dadams
+;;     Added: icicle-bookmark-dired-other-window, icicle-dired(-other-window).
+;;     *-buffer*, *-dired-project*, *-find-file(-absolute)*, *-(recent|locate)-file*,
+;;       *-find-file-in-tags-table*:
+;;         Bind C-x m to icicle-bookmark-(non-file|dired|file)-other-window.
+;; 2009/11/27 dadams
+;;     Added: icicle(-doremi)-increment-(variable|option).
+;; 2009/11/25 dadams
+;;     icicle-color-theme: Raise error for empty input.  Thx to Ahei.
+;; 2009/11/24 dadams
+;;     icicle-color-theme: Take a snapshot each time invoked, unless prefix arg.
+;; 2009/11/22 dadams
+;;     icicle-color-theme: Use color-theme-initialize instead of load-library, to load themes.
+;; 2009/11/21 dadams
+;;     icicle-color-theme: Use color-theme-snapshot to let C-g undo changes.
+;;                         Try to load color-theme-library.el (available with version 6.6.0).
+;; 2009/11/17 dadams
+;;     icicle-bbdb-complete-name: Bind completion-case-ignore.
+;; 2009/11/14 dadams
+;;     icicle-bbdb-complete-name: Replace macro bbdb-hashtable by its expansion.
+;; 2009/09/21 dadams
+;;     icicle-lisp-complete-symbol:
+;;       Complete symbol in buffer as far as possible first.  Show completions initially.
+;; 2009/09/17 dadams
+;;     icicle-delete-file, icicle-(file|directory)-list,
+;;       icicle-find-file(-absolute)(-other-window),
+;;       icicle-(recent|locate)-file(-other-window),
+;;       icicle-find-file-in-tags-table(-other-window): Use icicle-file-bindings (new macro).
+;; 2009/09/16 dadams
+;;     Added: icicle-insert-buffer.
+;;     icicle-kill-buffer, icicle-buffer(-other-window), icicle-add-buffer-candidate:
+;;       Use icicle-buffer-bindings (new macro).
+;; 2009/08/29 dadams
+;;     Added: icicle-define-bookmark-other-window-command, icicle-select-bookmarked-region,
+;;            icicle-bookmark(-region|-info|-gnus|-w3m|(-non|-local|-remote)-file)-other-window.
+;;     icicle-bookmark-propertize-candidate: Updated to reflect renamed bookmark+.el face names.
+;;     icicle-bookmark-file-narrow: Use bookmarkp-file-bookmark-p.
+;;     (lambda...) -> #'(lambda...).
+;; 2009/08/25 dadams
+;;     Added: icicle-bookmark-cleanup-on-quit.
+;;     icicle-bookmark(-other-window): Use icicle-bookmark-cleanup-on-quit.
+;;     icicle-bookmark-cleanup: Removed code to return to original window a focus minibuffer.
+;; 2009/08/24 dadams
+;;     Added: icicle-bookmark-propertize-candidate.
+;;     icicle-bookmark(-other-window): Put faces on bookmark candidates according to type.
+;; 2009/08/23 dadams
+;;     Added: icicle-bookmark-(region|info|gnus|w3m|(non-|local-|remote-)file)-narrow.
+;;     icicle-bookmark(-other-window): Bind keys to bookmark candidate narrowing commands.
+;;     icicle-bookmark-cleanup: Unbind the same commands.
+;;     icicle-bookmark-cmd:
+;;       Let bookmark+.el (latest version) handle prompting for name, even for region bookmark.
+;;       Remove any newlines in bookmark name, when no prompting (thx to Thierry Volpiatto).
+;; 2009/08/21 dadams
+;;     icicle-bookmark-jump-1: Typo.
+;; 2009/08/20 dadams
+;;     icicle-bookmark-cmd: Use icicle-bookmark-other-window, not icicle-bookmark.
+;;                          Fix trimmed-name: no longer than def-name.
+;;     icicle-bookmark(-other-window): Bind enable-recursive-minibuffers, in case need to read.
+;;     icicle-bookmark-jump-1: No crosshair highlighting for region bookmarks.
+;; 2009/08/19 dadams
+;;     Added: icicle-bookmark-help-string.
+;;     icicle-bookmark-cmd: Handle creation of region bookmarks (new default values).
+;;                          icicle-bookmark-name-length-max now applies to whole bookmark name.
+;;     icicle-bookmark(-other-window):
+;;       Apply icicle-candidate-short-help to candidates.  Use also for the help function.
+;;     icicle-bookmark-jump-1: Use bookmark--jump-via if it is defined.
+;; 2009/06/21 dadams
+;;     icicle-bookmark-jump-1: Removed temporary Emacs 23 workaround for (fixed) bug #1175.
+;; 2009/06/07 dadams
+;;     icicle-get-alist-candidate -> funcall icicle-get-alist-candidate-function.
+;; 2009/05/22 dadams
+;;     Require icicles-mac.el if load-library doesn't find it.
+;;     Created - Split off from icicles-cmd.el.
+ 
+;;;(@* "CHANGE LOG FOR `icicles-cmd2.el'")
+;;
+;; 2010/03/13 dadams
+;;     Applied renaming of icicle-add-buffer-name-flag to icicle-show-multi-completion-flag.
+;; 2010/03/09 dadams
+;;     icicle-regions: Use icicle-reversible-sort (with KEY arg), not sort.
+;; 2010/03/03 dadams
+;;     Applied renamings: icicle-sort-function to icicle-sort-comparer
+;;                        icicle-sort-functions-alist to icicle-sort-orders-alist,
+;;                        icicle-alternative-sort-function to icicle-alternative-sort-comparer,
+;;                        icicle-last-sort-function to icicle-last-sort-comparer.
+;; 2010/02/06 dadams
+;;     icicle-where-is: Make sure orig-buff is current when look up the bindings.
+;; 2010/01/12 dadams
+;;     icicle-insert-thesaurus-entry-cand-fn, icicle-marker+text,
+;;       icicle-search-(bookmark|region)-action, icicle-char-properties-in-buffer,
+;;       icicle-search-char-property-scan:
+;;         save-excursion + set-buffer -> with-current-buffer (+ save-excursion).
+;;     icicle-search-regexp-scan: set-buffer -> with-current-buffer.
+;; 2009/12/13 dadams
+;;     icicle-Info-read-node-name: Bind C-x m to icicle-bookmark-info-other-window.
+;; 2009/11/24 dadams
+;;     icicle-read-color: Copy the prompt string, so *-color-completion-setup can put props.
+;; 2009/11/22 dadams
+;;     icicle-frame-(bg|fg): Don't apply *-make-color-candidate to named-colors (done already).
+;; 2009/11/03 dadams
+;;     icicle-frame-(bg|fg): Use named-colors, not x-defined-colors.
+;;     icicle-read-color: No need to bind icicle-transform-function, since we use hexrgb.el.
+;; 2009/09/05 dadams
+;;     icicle-search-replace-all-search-hits:
+;;       Bind to nil: icicle-minibuffer-message-ok-p, icicle-help-in-mode-line-flag.
+;;     icicle-search-action-1: Add condition-case to ignore disappearance of *Completions* win.
+;;     icicle-search-highlight-and-maybe-replace:
+;;       Apply renaming of icicle-acting-on-next/prev (no -p).
+;;       Use length of *-completion-candidates, not mct.
+;;       Fix assignment of new candidate nb, and for both directions.
+;;       Bind icicle-minibuffer-message-ok-p to inhibit no-candidates msg.
+;;       Wrap around to first only if not icicle-acting-on-next/prev.
+;; 2009/09/02 dadams
+;;     icicle-exchange-point-and-mark: Respect icicle-region-bookmarks-flag.
+;; 2009/08/29 dadams
+;;     Added: icicle-define-search-bookmark-command,
+;;            icicle-search(-region|-info|-gnus|-w3m|(-non|-local|-remote)-file)-bookmark,
+;;            icicle-search-bookmark-action.
+;;     Moved (and redefined) to icicles-cmd1.el: icicle-select-bookmarked-region.
+;;     (lambda...) -> #'(lambda...).
+;; 2009/08/25 dadams
+;;     Added icicle-select-bookmarked-region.
+;;     icicle-exchange-point-and-mark:
+;;       If bookmark+ is loaded, use region bookmarks.
+;;       Raise error if try to save inactive region or try to select with no saved regions.
+;; 2009/08/11 dadams
+;;     Added: icicle-search-replace-all-search-hits.
+;;     Renamed: icicle-search-replace-candidate to icicle-search-replace-cand-in-alist.
+;;     Added: icicle-search-replace-cand-in-mct (not used, for now).
+;;     icicle-search:
+;;       Bind icicle-all-candidates-list-alt-action-fn to icicle-search-replace-all-search-hits.
+;;       Bind replace-count to 0.  Bind icicle-current-input to empty string.
+;;       Updated doc string.
+;;     icicle-search-replace-search-hit:
+;;       Do not bind icicle-completion-candidates, icicle-candidate-nb, icicle-last-input.
+;;       No lack-of-current-candidate error if icicle-all-candidates-action-p.
+;;     Added: icicle-search-action-1 (factored out from icicle-search-action.
+;;     icicle-search-action, icicle-search-help:
+;;       Bind icicle-whole-candidate-as-text-prop-p to nil, to force use of alist.
+;;     icicle-search-action(-1): Do not bind icicle-candidate-nb, so don't save and restore it.
+;;     icicle-search-in-context-default-fn: If replacement tried, then update the dialog state. 
+;;     icicle-search-highlight-and-maybe-replace: REWRITE.
+;;       Msg if string to be replaced is not found in candidate.
+;;       Swap order: Don't search unless first time (or replacing all).
+;;       icicle-search-replace-candidate -> icicle-search-replace-cand-in-alist.
+;;       If replacement done, then: Update alist, minibuffer-completion-table, and
+;;         minibuffer content.  Change candidate nb if navigating next/prev.  Complete again.
+;;         Return indication of whether we tried to replace something.
+;;     icicle-search-replace-cand-in-alist: Added catch, to skip whole list traversal.
+;;     Moved byte-compile quieting defvars to top level.  Added one for tooltip-mode.
+;; 2009/07/20 dadams
+;;     icicle-font: Ensure no nil elements in COLLECTION arg to completing-read, for Emacs 22+.
+;; 2009/06/07 dadams
+;;     icicle-get-alist-candidate -> funcall icicle-get-alist-candidate-function.
+;;     Added: icicle-purge-bad-file-regions.
+;;     icicle-add-region, icicle-(select|search)-region-action:
+;;       Special-case Info buffers.  Thx to Thierry Volpiatto.
+;; 2009/05/28 dadams
+;;     Bind icicle-search-replacement to nil.  (Somehow forgot when moved to icicle-explore.)
+;;     icicle-search-replace-search-hit: Raise an error if icicle-candidate-nb is nil.
+;; 2009/05/26 dadams
+;;     icicle-compilation-search: Use value 'until-move for next-error-highlight.
+;; 2009/05/22 dadams
+;;     Added: icicle-Info-virtual-book. 
+;;     Require icicles-mac.el if load-library doesn't find it.
+;;     icicle-search: Set icicle-search-final-choice to result.
+;;     Created - Split off from icicles-cmd.el.
+ 
+;;;(@* "CHANGE LOG FOR `icicles-face.el'")
+;;
+;; 2010/03/13 dadams
+;;     Made icicle-candidate-part paler (light background): #EF84FFEAF427, not #DB17FFF4E581.
+;; 2010/02/17 dadams
+;;     Moved functions here from icicles-opt.el: icicle-increment-color-(hue|saturation). 
+;;     So no longer require icicles-opt.el.
+;; 2009/04/18 dadams
+;;     Removed load-time warning about using Icicles in a text terminal.
+;; 2009/04/12 dadams
+;;     Added: face icicle-mode-line-help.
+;; 2009/01/13 dadams
+;;     Added: icicle-extra-candidate.
+;; 2008/10/26 dadams
+;;     Added group: Icicles-Files.
+;; 2008/03/29 dadams
+;;     Redefined and renamed faces for completion status indicators.
+;;       Renamed: icicle-completing-mustmatch-prompt-prefix to icicle-mustmatch-completion,
+;;                icicle-mode-lighter-highlight(-plus) to icicle(-multi-command)-completion.
+;;       Removed: icicle-completing-prompt-prefix, icicle-prompt-suffix.
+;; 2008/03/09 dadams
+;;     Added: icicle-mode-lighter-highlight.
+;; 2007/12/10 dadams
+;;     Added: icicle-input-completion-fail-lax.
+;; 2007/11/18 dadams
+;;     Added: icicle-proxy-candidate.
+;;     icicle-special-candidate: No longer use a raised box.
+;; 2007/10/22 dadams
+;;     icicle-special-candidate: Raised box.
+;; 2007/08/19 dadams
+;;     Added: icicle-input-completion-fail.
+;; 2007/06/21 dadams
+;;     Added: icicle-candidate-part.  Changed definition of icicle-special-candidate.
+;; 2007/06/17 dadams
+;;     Added: icicle-saved-candidate.
+;; 2007/06/12 dadams
+;;     icicle-prompt-suffix: No box for dark background.
+;; 2007/06/11 dadams
+;;     Better defaults for dark background frames.
+;; 2007/06/07 dadams
+;;     Changed emacs-commentary-link to point to icicles-doc1.el and icicles-doc2.el.
+;; 2007/05/22 dadams
+;;     Protected icicle-search-context-level-1 to *-8, in case hexrgb is not loaded.
+;; 2007/04/20 dadams
+;;     Added: icicle-search-context-level-1 through *-8.
+;;     Require icicles-opt.el.
+;; 2006/12/22 dadams
+;;     Renamed group icicles to Icicles.
+;;     Added Icicles subgroups, and assigned them instead of group Icicles:
+;;      -Buffers, -Completions-Display, -Key-Bindings, -Key-Completion, -Matching,
+;;      -Minibuffer-Display, -Miscellaneous, -Searching.
+;; 2006/11/06 dadams
+;;     icicle-search-highlight-all-flag -> icicle-search-highlight-threshold (integer)
+;; 2006/10/16 dadams
+;;     icicle-special-candidate: changed background from Pink to #DB17FFF4E581.
+;; 2006/10/04 dadams
+;;     Added: icicle-special-candidate.
+;; 2006/08/13 dadams
+;;     Added: icicle-completing-prompt-prefix.
+;; 2006/07/16 dadams
+;;     Added dark-background face suggestions from Le Wang - thx.
+;; 2006/06/30 dadams
+;;     Added: minibuffer-prompt for Emacs < 22 (e.g. Emacs 21.4 has propertize).
+;; 2006/04/28 dadams
+;;     Added: icicle-whitespace-highlight.
+;; 2006/04/14 dadams
+;;     Renamed icicle-search-refined-regexp to icicle-search-current-input.
+;; 2006/04/07 dadams
+;;     Added: icicle-search-main-regexp-others.
+;;     Renamed: icicle-search-main-regexp to icicle-search-main-regexp-current.
+;; 2006/03/27 dadams
+;;     Added: icicle-search-*-regexp.
+;; 2006/03/22 dadams
+;;     Renamed: icicle-root-highlight-* to icicle-match-highlight-*.
+;; 2006/03/21 dadams
+;;     Added: icicle-common-match-highlight-Completions.
+;;     icicle-root-highlight-Completions: Changed default face.
+;; 2006/03/08 dadams
+;;     Added: icicle-current-candidate-highlight.
+ 
+;;;(@* "CHANGE LOG FOR `icicles-fn.el'")
+;;
+;; 2010/03/16 dadams
+;;     icicle-display-candidates-in-Completions, treating icicle-candidate-properties-alist:
+;;       For subsequent matches of join string, skip over the last join string (not 1 char).
+;;     icicle-candidate-short-help: Treat each property individually.
+;; 2010/03/13 dadams
+;;     icicle-reversible-sort: Respect icicle-transform-before-sort-p.
+;; 2010/03/10 dadams
+;;     icicle-show-help-in-mode-line:
+;;       Put this test first: If candidate is a string with a help property, use that.
+;;       Use get-file-buffer, not get-buffer, for a visited file.
+;; 2010/03/09 dadams
+;;     icicle-reversible-sort: Added optional KEY arg.  Set LIST to sort result and return it.
+;;     icicle-multi-sort: Set RESULT to funcall result.
+;; 2010/03/03 dadams
+;;     Added: icicle-multi-sort, icicle-make-plain-predicate, icicle-alpha-p.
+;;     icicle-reversible-sort: Use icicle-sort-comparer and icicle-multi-sort.
+;;                             Reset to unsorted if an error is raised.
+;;     Applied renamings: icicle-sort-function to icicle-sort-comparer,
+;;                        icicle-sort-functions-alist to icicle-sort-orders-alist.
+;;     icicle-read-shell-command-completing: Removed extra binding for icicle-sort-function.
+;; 2010/01/12 dadams
+;;     icicle-display-candidates-in-Completions: set-buffer -> with-current-buffer.
+;; 2009/12/25 dadams
+;;     icicle-strip-ignored-files-and-sort:
+;;       Call completion-ignored-build-apply and icicle-update-ignored-extensions-regexp.
+;; 2009/12/21 dadams
+;;     fset -> defalias.
+;; 2009/12/07 dadams
+;;     Added: icicle-minibuffer-default-add-dired-shell-commands.
+;;     icicle-dired-read-shell-command: Instead of using minibuffer-default-add-shell-commands,
+;;       use icicle-minibuffer-default-add-dired-shell-commands.
+;;     icicle-read-shell-command-completing: Bind insert-default-directory to nil.
+;;     icicle-dir-prefix-wo-wildcards: Don't ever return nil - return "" if need be.
+;;     icicle-read-string:
+;;       Handle a consp default-value when user enters "": use the car.  Thx to Sakuma Ryo.
+;; 2009/12/03 dadams
+;;     icicle-completing-read:
+;;       Make sure we don't use a nil def value for init value.  Thx to Sebastian Luque.
+;; 2009/11/27 dadams
+;;     *-display-candidates-in-Completions, *-prefix-candidates, *-fuzzy-candidates:
+;;       Handle swank completions too.
+;; 2009/11/25 dadams
+;;     icicle-insert-candidates: Handle vertical layout: icicle-completions-format.
+;; 2009/11/03 dadams
+;;     icicle-color-completion-setup: Use hexrgb-defined-colors, not x-defined-colors.
+;;                                    No icicle-transform-function, since we use hexrgb.el.
+;; 2009/10/25 dadams
+;;     Added: icicle-dir-prefix-wo-wildcards.  Use in icicle-insert-cand-in-minibuffer.
+;;     icicle-save-or-restore-input: Remove test comparing last completion with current input.
+;;     icicle-abbreviate-or-expand-file-name: If arg is absolute, do not expand.
+;;     icicle-display-candidates-in-Completions, icicle-prefix-candidates,
+;;       icicle-not-basic-prefix-completion-p:
+;;         Updated for new completion methods.  Use *-current-TAB-method, not old fuzzy flag.
+;; 2009/10/24 dadams
+;;     icicle-unsorted-file-name-*-candidates, icicle-*-any-file-name-candidates-p:
+;;       Got rid of slashed-p.
+;;     icicle-unsorted-file-name-apropos-candidates:
+;;       Set icicle-common-match-string to nil if there are no candidates.
+;;     icicle-apropos-any-file-name-candidates-p:
+;;       When input is a dir, remove final /, so we don't non-match highlight the / (empty dir).
+;;       Bind case-fold-search, for apropos matching.
+;;     icicle-abbreviate-or-expand-file-name: Set DIR to nil if it's relative.
+;; 2009/10/22 dadams
+;;     Added: icicle-file-name-directory.
+;;     icicle-completion-setup-function, icicle-display-candidates-in-Completions,
+;;       icicle-save-or-restore-input, icicle-file-name-directory-w-default,
+;;       icicle-historical-alphabetic-p:
+;;         Use icicle-file-name-directory, not file-name-directory.
+;; 2009/10/17 dadams
+;;     icicle-completion-try-completion: Return RES.
+;; 2009/10/12 dadams
+;;     icicle-unsorted-prefix-candidates, icicle-prefix-any-candidates-p:
+;;       Use length of INPUT, not length from point backward to field-beginning.
+;;     icicle-input-from-minibuffer: Added optional LEAVE-ENVVARS-P arg.
+;;     icicle-next-candidate, icicle-highlight-complete-input:
+;;       Call icicle-input-from-minibuffer with LEAVE-ENVVARS-P arg.
+;;     icicle-completion-all-completions:
+;;       If not basic completion (Emacs 23) and input ends in $, then append $ to cands also.
+;; 2009/09/25 dadams
+;;     icicle-file-name-prefix-candidates: Use whole input, not just nondirectory.
+;;     Added: icicle-not-basic-prefix-completion-p.  Use where appropriate.
+;; 2009/09/19 dadams
+;;     icicle-unpropertize: Remove the internal text properties added by Icicles.
+;;     icicle-completing-read, icicle-read-file-name: Call icicle-unpropertize unconditionally.
+;; 2009/09/12 dadams
+;;     icicle-kill-a-buffer: Bind enable-recursive-minibuffers, to confirm modified buffer.
+;; 2009/09/05 dadams
+;;     icicle-msg-maybe-in-minibuffer: Do nothing if icicle-minibuffer-message-ok-p is nil.
+;; 2009/08/19 dadams
+;;     icicle-candidate-short-help: Return (possibly propertized) STRING.
+;; 2009/08/09 dadams
+;;     Added: icicle-insert-cand-in-minibuffer - factored out code from icicle-next-candidate.
+;;     eval-after-load "crm":
+;;       Test that icy-mode is available using featurep, not fboundp.  Thx to Michael_Heerdegen.
+;; 2009/07/26 dadams
+;;     icicle-completing-read, icicle-read-file-name-1:
+;;       Bind minibuffer-history-variable to itself.
+;; 2009/07/13 dadams
+;;     icicle-read-face-name (Emacs 20 version): Use copy-sequence on prompt, before add prop.
+;; 2009/07/12 dadams
+;;     icicle-display-completion-list:
+;;       Use different protection (fboundp) for fix for latest Emacs 23 crap (base size in cdr).
+;; 2009/07/11 dadams
+;;     icicle-next-candidate:
+;;       If icicle-regexp-quote-flag, regexp-quote before string-match for highlighting root.
+;;     icicle-place-cursor: If icicle-regexp-quote-flag, regexp-quote input to search for it.
+;; 2009/07/02 dadams
+;;     icicle-displayable-cand-from-saved-set:
+;;       If icicle-readable-to-markers returns an atom, just use that.
+;; 2009/06/17 dadams
+;;     icicle-fit-completions-window: Scale text size initially.
+;; 2009/06/07 dadams
+;;     icicle-get-alist-candidate -> funcall icicle-get-alist-candidate-function.
+;;     icicle-mctize-all:  If PRED is nil, so is NEWPRED (use and instead of when).
+;; 2009/05/22 dadams
+;;     Require icicles-mac.el if load-library doesn't find it.
+;; 2009/05/18 dadams
+;;     icicle-display-candidates-in-Completions: deactivate-mark in *Completions* after display.
+;; 2009/05/17 dadams
+;;     icicle-next-candidate: Updated to reflect thumb-frm.el name changes.
+;; 2009/05/17 dadams
+;;     Added: icicle-toggle-icicle-mode-twice.
+;;     In eval-after-load crm: Use icicle-toggle-icicle-mode-twice, not icy-mode calls.
+;; 2009/05/15 dadams
+;;     icicle-unhighlight-lighter: Wrap redisplay in condition-case, like elsewhere.
+;; 2009/05/11 dadams
+;;     Added: icicle-upcase.  Use in place of upcase everywhere, to work around Emacs 20 bug.
+;;     Added: icicle-local-keys-first-p.
+;;     icicle-display-candidates-in-Completions:
+;;       Don't highlight historical candidate if in icicle-hist-cands-no-highlight.
+;; 2009/05/09 dadams
+;;     icicle-input-from-minibuffer: Keep text properties when pick up input.
+;;     icicle-highlight-input-noncompletion(-rest): Use an overlay instead of text property.
+;;     icicle-show-help-in-mode-line: Fix special case for pseudo-key/cmd ..: go up to prefix.
+;; 2009/05/07 dadams
+;;     icicle-display-candidates-in-Completions, in the code that hides common match:
+;;       Don't reset display property to nil.
+;;       Use icicle-common-match-string, not current input.
+;;     icicle-expanded-common-match-1:
+;;       If input doesn't match candidate, return nil.  Throw nil, not input, everywhere.
+;;     *-unsorted(-file-name)-apropos-candidates, *-apropos-any(-file-name)-candidates-p:
+;;       Protect calls to icicle-apropos-complete-match-fn with condition-case, for Emacs 20.
+;;     icicle-place-cursor: Added optional arg.
+;; 2009/05/05 dadams
+;;     icicle-alt-act-fn-for-type:
+;;       Bind completion-ignore-case, based on read-buffer-completion-ignore-case.
+;; 2009/05/03 dadams
+;;     Use (fboundp 'minibuffer-default-add-completions), not (> emacs-major version 22).
+;; 2009/05/01 dadams
+;;     Renamed: icicle-choose-action-for-type to icicle-alt-act-fn-for-type.
+;;     icicle-type-actions-alist: Rewrote.  Handle both list of objs and single obj.
+;;     icicle-quote-file-name-part-of-cmd: Rewrote.  Quote file name always, and only file name.
+;; 2009/04/30 dadams
+;;     icicle-show-in-mode-line: Clear any message (e.g. Computing completion candidates...).
+;; 2009/04/29 dadams
+;;     icicle-get-alist-candidate: If NO-ERROR-P is 'no-error-no-msg, just return nil (no msg).
+;;     icicle-choose-action-for-type: Use lax completion.
+;; 2009/04/28 dadams
+;;     icicle-choose-action-for-type: 
+;;       Moved here from icicles-mac.el, changed to a function, and locally bind
+;;       *-alt-action-fn  to icicle-choose-action-for-type function.
+;;       For undefined TYPE, provide all functions as candidates.
+;;     Added eval-when-compile of load-library icicles-mac.
+;; 2009/04/27 dadams
+;;     icicle-recompute-candidates:
+;;       Keep no-display completion mode, if that's current.
+;;       Set icicle-last-completion-command only if completion type, not user input, changed.
+;;     icicle-complete-again-update: Added icicle-prefix-complete-no-display to first case.
+;; 2009/04/19 dadams
+;;     Use unless instead of or for fset's. (cosmetic)
+;;     icicle-completing-read, icicle-read-from-minibuffer, icicle-read-string:
+;;       Renamed history parameter to HIST-m@%=!$+&^*z, so C-h f output looks less strange.
+;; 2009/04/18 dadams
+;;     Soft-require hexrgb.el unconditionally, not just when there is a window-system.
+;; 2009/04/12 dadams
+;;     icicle-display-candidates-in-Completions: Added number of candidates to mode-line.
+;;     icicle-show-help-in-mode-line: Use face icicle-show-help-in-mode-line.  Fix prefix keys.
+;; 2009/04/11 dadams
+;;     icicle-candidate-short-help:
+;;       Do nothing if either icicle-help-in-mode-line-flag or tooltip-mode is nil.
+;;     icicle-show-help-in-mode-line:
+;;       If no symbol help, try string.
+;;       Handle lambdas, menu-function-# from easy-menu, and prefix keys.
+;;     icicle-make-color-candidate: Construct short help only if user will see it.
+;; 2009/04/10 dadams
+;;     Added: icicle-candidate-short-help, icicle-color-completion-setup (from i*-read-color).
+;;     Moved here from icicle-cmds.el:
+;;      icicle-remove-color-duplicates, icicle-color-help, icicle-make-color-candidate.
+;;     icicle-make-color-candidate: Added short help, using icicle-candidate-short-help.
+;;     icicle-show-help-in-mode-line:
+;;       Treat :icicle-candidate-help text property on strings.
+;;       Use candidate, not cand, for stringp clause, and use icicle-transform-multi-completion.
+;;       Renamed: :icicle-candidate-help to icicle-mode-line-help.
+;; 2009/04/08 dadams
+;;     icicle-show-help-in-mode-line: Treat absolute file names too.
+;; 2009/04/07 dadams
+;;     icicle-show-help-in-mode-line: (bufferp (get-buffer...)...) -> (get-buffer...) Duh.
+;; 2009/04/06 dadams
+;;     Added: icicle-show-help-in-mode-line - from code in icicle-next-candidate:
+;;              Added arg.  Handle: faces, buffer names, file names, :icicle-candidate-help.
+;;     Added: icicle-help-line-(buffer|file).
+;;     icicle-next-candidate: Use icicle-show-help-in-mode-line.
+;; 2009/04/05 dadams
+;;     Added: icicle-show-in-mode-line.
+;;     icicle-next-candidate: Use icicle-show-in-mode-line to show help in mode-line.
+;; 2009/04/04 dadams
+;;     Added: icicle-buffer-smaller-p, icicle-major-mode-name-less-p,
+;;            icicle-mode-line-name-less-p, icicle-buffer-file/process-name-less-p.
+;; 2009/04/03 dadams
+;;     icicle-read-from-minibuffer: Save filtered default val as icicle-filtered-default-value.
+;;     icicle-lisp-vanilla-completing-read: Use icicle-filtered-default-value, not DEF, at end.
+;; 2009/03/29 dadams
+;;     icicle-read-shell-command: If non-nil initial-contents, punt to use original (old-*).
+;; 2009/03/27 dadams
+;;     Don't fset minibuffer-default-add-completions unless > Emacs 22.
+;; 2009/03/27 dadams
+;;     icicle-read-from-minibuffer: Use icicle-filter-wo-input on default-value (all values).
+;;     icicle-completing-read, icicle-read-file-name-1:
+;;       Use icicle-filter-wo-input on default value only to get init value.
+;;     Added: icicle-minibuffer-default-add-completions, icicle-first-N.
+;; 2009/03/26 dadams
+;;     icicle-completing-read, icicle-read-file-name-1:
+;;       Filter default values using icicle-filter-wo-input.
+;;     icicle-filter-wo-input: Return the candidate, if it passes filtering.
+;; 2009/03/16 dadams
+;;     Added: icicle-recentf-make-menu-items.
+;; 2009/03/10 dadams
+;;     icicle-read-shell-command-completing: Applied renamings: icicle-guess-commands-in-path,
+;;       icicle-shell-command-candidates-cache, icicle-recompute-shell-command-candidates.
+;;     Moved to icicles-opt.el and renamed: icicle-shell-command-candidates.
+;; 2009/03/08 dadams
+;;     Added: icicle-quote-file-name-part-of-cmd.
+;;     icicle-read-shell-command-completing:
+;;       Call icicle-quote-file-name-part-of-cmd to escape spaces etc. in file names.
+;;       Removed unneeded minibuffer-local-*-map let bindings.
+;;     icicle-dired-smart-shell-command:
+;;       Protected dired-default-directory with fboundp, for Emacs 20.
+;; 2009/03/01 dadams
+;;     icicle-read-from-minibuffer:
+;;       No longer use icicle-complete-on-demand-cmd and on-demand-map.
+;; 2009/02/28 dadams
+;;     Don't fset old-dired-smart-shell-command here - do after load Dired-X (icicles-mode.el).
+;;     Added for Emacs 20: definition of replace-regexp-in-string.
+;;     icicle-read-(number|string-completing):
+;;       No need for fboundp of replace-regexp-in-string, since provide it now for Emacs 20.
+;;     icicle-read-file-name: Treat directory candidates as special candidates.
+;;     icicle-read-shell-command-completing:
+;;       Candidate help depends on candidate type.
+;;       Use existing icicle-extra-candidates as its own default, not icicle-file-extras.
+;; 2009/02/27 dadams
+;;     icicle-shell-command: Fixed typo: shell-command -> old-shell-command.
+;;     icicle-read-shell-command-completing: Append icicle-file-extras to i*-extra-candidates.
+;; 2009/02/23 dadams
+;;     icicle-read-shell-command-completing:
+;;       Bind icicle-extra-candidates-dir-insert-p, not insert-default-directory, to nil.
+;;     icicle-next-candidate: Protect dir insertion with icicle-extra-candidates-dir-insert-p.
+;; 2009/02/22 dadams
+;;     icicle-dired-read-shell-command: Use minibuffer-default-add-shell-commands if available.
+;; 2009/02/20 dadams
+;;     icicle-read-from-minibuffer: Treat icicle-complete-on-demand-cmd - on-demand completion.
+;;     Added: icicle-dired-smart-shell-command, icicle-read-shell-command-completing,
+;;            icicle-dired-read-shell-command, icicle-extra-candidates-first-p,
+;;            icicle-require-match-p, icicle-shell-command(-on-region).
+;;     icicle-read-shell-command:
+;;       Call icicle-read-shell-command-completing.  Define always, not just when mailcap.
+;;     icicle-dired-guess-shell-command: Just call icicle-read-shell-command-completing.
+;;     icicle-shell-command-candidates: Cache completions in icicle-shell-command-candidates.
+;;     icicle-highlight-input-noncompletion(-rest), icicle-highlight-lighter:
+;;       Use function icicle-require-match-p, not var.
+;;     icicle-completing-p: Test also whether parent map is a completion map.  Always cache.
+;; 2009/02/17 dadams
+;;     icicle-read-shell-command: Handle nil default-value.  Thx to Kao Felix.
+;;     icicle-read-file-name: Append new proxy cands to any existing ones.
+;;                            Don't assume that a proxy cand is a variable.
+;; 2009/01/25 dadams
+;;     Added: *-dired-guess-shell-command, *-read-shell-command, *-shell-command-candidates.
+;; 2009/01/17 dadams
+;;     icicle-display-candidates-in-Completions: Highlight Levenshtein (1) match.
+;;     icicle-unsorted-apropos(-file-name)-candidates, icicle-display-Completions,
+;;       icicle-apropos-any(-file-name)-candidates-p: Removed PCM.
+;;     Added: icicle-levenshtein(-strict|-one)-match, icicle-levenshtein-one-regexp,
+;;            icicle-substrings-of-length.
+;; 2009/01/15 dadams
+;;     Lose "icicle-" for fboundp's: completion-all-completions, completion-try-completion.
+;; 2009/01/14 dadams
+;;     Added: icicle-remove-dups-if-extras.
+;; 2009/01/13 dadams
+;;     Added: icicle-completion-all-completions, icicle-completion-try-completion.
+;;     icicle-unsorted(-file-name)-(prefix|apropos)-candidates, icicle-display-Completions,
+;;       icicle-any-(prefix|apropos)(-file-name)-candidates-p:
+;;         Respect icicle-respect-completion-styles-p (Emacs 23).
+;;     icicle-unsorted-file-name-prefix-candidates: Removed matching "^"++(regexp-quote input).
+;;     icicle(-unsorted)(-file-name)-(prefix|apropos)-candidates:
+;;       Call icicle-transform-candidates for extra candidates and proxy candidates too.
+;;     icicle-display-candidates-in-Completions: Highlight extra candidates.
+;;     icicle-face-valid-attribute-values:
+;;       Use font-family-list instead of x-font-family-list, if available.
+;; 2009/01/03 dadams
+;;     icicle-call-then-update-Completions:
+;;       If icicle-last-completion-command is nil, test icicle-current-completion-mode - don't
+;;       just call icicle-prefix-complete.  E.g. icicle-search shouldn't end with a single
+;;       prefix match.
+;; 2008/12/25 dadams
+;;     Added: icicle-save-raw-input (factored out from icicle-save-or-restore-input).
+;;     icicle-save-or-restore-input:
+;;       Change test whether last-command is cycling cmd to add also not being completing cmd.
+;;       Use icicle-completing-p instead of testing this-command for being a cycling cmd.
+;;       Use icicle-save-raw-input.
+;;     icicle-next-candidate: Set icicle-cycling-p (new var) to t.
+;; 2008/12/20 dadams
+;;     icicle-save-or-restore-input: Don't restore last input if this is a completing command.
+;; 2008/12/07 dadams
+;;     icicle-completing-read, icicle-read-file-name-1:
+;;       Removed icicle-prompt.  Don't add completion prompt prefix, except for Emacs 20.
+;; 2008/12/06 dadams
+;;     icicle-call-then-update-Completions:
+;;       To update, call icicle-last-completion-command, not icicle-(apropos|prefix)-complete.
+;; 2008/12/02 dadams
+;;     icicle-unsorted(-file-name)-apropos-candidates:
+;;       Call icicle-filter-wo-input before filtering with user input (as the doc string says).
+;; 2008/11/28 dadams
+;;     icicle-recompute-candidates, icicle-save-or-restore-input:
+;;       Test property icicle-(prefix|apropos)-completing-command, not eq cmds.
+;; 2008/11/23 dadams
+;;     icicle-read-file-name:
+;;       Don't initialize icicle-proxy-candidates unless icicle-add-proxy-candidates-flag.
+;;       Don't add + to completion indicator if Emacs 23.
+;; 2008/11/22 dadams
+;;     icicle-completing-read:
+;;       Bind icicle-fancy-cands-internal-p.  Do not call icicle-mctize-all unless fancy cands.
+;;     icicle-mctized-full-candidate:
+;;       No-op unless icicle-fancy-cands-internal-p or icicle-whole-candidate-as-text-prop-p.
+;;     icicle-read-(number|char-exclusive|string-completing|face-name):
+;;       Put icicle-fancy-candidates property on prompt if proxy candidates.
+;;     icicle-display-candidates-in-Completions:
+;;       Don't transform candidates unless icicle-fancy-cands-internal-p.
+;; 2008/11/18 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Add icicle-special-candidate property as text property to candidates in
+;;         icicle-completion-candidates, instead of just to display candidate, so returned also.
+;;       Added support for icicle-display-string property.
+;;       For these properties: look up symbol first in minibuffer-completion-table if obarray.
+;; 2008/11/14 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Respect icicle-hide-common-match-in-Completions-flag.
+;; 2008/11/10 dadams
+;;     icicle(-unsorted)(-file-name)-(apropos|prefix)-candidates:
+;;       Moved special and proxy candidates outside match filtering,
+;;         reversing a change made on 2007/11/18.  Dunno why that change was made.
+;;       But filter special and proxy candidates using the input.
+;; 2008/11/09 dadams
+;;     Added: icicle-join-nth-parts, icicle-display-cand-from-full-cand.
+;;     icicle-transform-multi-completion: Use icicle-join-nth-parts.
+;;     icicle-transform-multi-completion: Don't test icicle-list-join-string (always non-nil).
+;;     icicle-first-matching-candidate:
+;;       Fix: set res properly, not to the tested value.  Thx to Hannes Janetzek.
+;; 2008/11/07 dadams
+;;     icicle-color-name-w-bg: Return input if hexrgb.el is not loaded.  Thx to Fabrice Knevez.
+;; 2008/11/04 dadams
+;;     icicle-read-face-name: Soft-require eyedropper.el or palette.el.
+;; 2008/11/03 dadams
+;;     icicle-expanded-common-match: Bug fix for Emacs 20: If error matching, just return INPUT.
+;;     icicle-highlight-input-noncompletion: Erase any message first before highlighting.
+;; 2008/11/02 dadams
+;;     icicle-display-candidates-in-Completions: For icicle-candidate-properties-alist, use
+;;       narrowed buffer content, not i-current-completion-in-Completions.
+;; 2008/10/24 dadams
+;;     icicle-first-matching-candidate:
+;;       Use regexp-quote on CAND.
+;;       Add icicle-list-end-string to each entry in CANDIDATES.
+;;       Iteration, not recursion.
+;;     icicle-get-alist-candidate: Added optional arg NO-ERROR-P.
+;; 2008/10/18 dadams
+;;     Replaced customize-save-variable by funcall icicle-customize-save-variable-function.
+;; 2008/10/14 dadams
+;;     Applied renaming of icicle-completion-help to icicle-minibuffer-help.
+;; 2008/10/06 dadams
+;;     Don't toggle icy-mode after loading crm.el unless icy-mode is defined (!).
+;;     icicle-ms-windows-NET-USE: If hash tables not available, just run the NET USE process.
+;; 2008/10/04 dadams
+;;     Substitute Icicles version of completing-read-multiple and its maps.  Thx to Per Nordlow.
+;;       Added: (icicle|old)-completing-read-multiple, icicle-define-crm-completion-map,
+;;              (icicle|old)-crm-local-(completion|must-match)-map.
+;;     icicle-display-completion-list: Protect against Emacs 23 nonsense with base-size in cdr.
+;; 2008/09/30 dadams
+;;     Added: icicle-ms-windows-NET-USE.  Thx to Thomas Lim.
+;;     icicle-file-remote-p: Use icicle-ms-windows-NET-USE.
+;;     icicle-highlight-input-noncompletion: Return file-local-p if test shows it's local.
+;;     icicle-call-then-update-Completions:
+;;       Treat also known file-local-p return from icicle-highlight-input-noncompletion.
+;;     Renamed icicle-isearch-complete-1 to icicle-isearch-complete-past-string and moved it
+;;       here from icicles-mcmd.el.
+;;     icicle-isearch-complete-past-string: Always use regexp-search-ring.  Changed prompt.
+;; 2008/09/27 dadams
+;;     icicle-highlight-input-noncompletion: Fixed typo: implicit-remote -> implicit.
+;; 2008/09/20 dadams
+;;     icicle-(apropos|prefix)-candidates, icicle-maybe-sort-and-strip-candidates:
+;;       Strip ignored files if icicle-abs-file-candidates.
+;; 2008/09/19 dadams
+;;     icicle-get-candidates-from-saved-set: Added optional arg DONT-EXPAND-FILESETS-P.
+;;                                           Use icicle-kill-a-buffer, not kill-buffer.
+;;     Moved icicle-kill-a-buffer here from icicles-cmd.el.
+;;     Added: icicle-unpropertize.
+;;     icicle-completing-read, icicle-read-file-name: Use icicle-unpropertize.
+;; 2008/09/16 dadams
+;;     filesets-get-filelist: Fixed :tree so it includes files in subdirs.
+;;     Added: icicle-filesets-files-under.
+;; 2008/09/15 dadams
+;;     Added: icicle-saved-fileset-p, icicle-displayable-cand-from-saved-set.
+;;     icicle-get-candidates-from-saved-set:
+;;       Rewrote code to convert saved candidates to displayable candidates.
+;;         Use icicle-displayable-cand-from-*, icicle-saved-fileset-p.  Require filesets.el.
+;;       Moved filesets-get-fileset-from-name into and of first cond clause.
+;;     Wrapped defun of filesets-get-filelist in eval-after-load.
+;; 2008/09/13 dadams
+;;     Added: icicle-get-candidates-from-saved-set (factored from code in
+;;            icicle-retrieve-candidates-from-set), filesets-get-filelist (redefined),
+;;            icicle-explicit-saved-completion-candidates.
+;;     Moved here from icicles-mcmd.el: icicle-readable-to-markers.
+;; 2008/09/04 dadams
+;;     icicle-read-file-name-1: Removed unused code for non icicle-mode case.
+;; 2008/09/03 dadams
+;;     Removed: icicle-(un)highlight-crosshairs, icicle-unhighlight-crosshairs+cleanup.
+;; 2008/09/01 dadams
+;;     Added: icicle-(un)highlight-crosshairs, icicle-unhighlight-crosshairs+cleanup.
+;; 2008/08/29 dadams
+;;     icicle-mctize-all:
+;;       Do it for all list collections (new icicle-mctized-full-candidate).
+;;       Adjust PRED to use cdr only for conses with string cars.
+;;     icicle-mctized-full-candidate:
+;;       Treat all kinds of list entries: strings, symbols, and conses with symbol args, etc.
+;; 2008/08/25 dadams
+;;     icicle-display-candidates-in-Completions: Do nothing if NO-DISPLAY-P is 'no-msg.
+;; 2008/08/24 dadams
+;;     icicle-filter-wo-input: Filter out empty-string candidates: "".
+;;     Added: icicle-minibuf-input-sans-dir.
+;;     Renamed: icicle-minibuffer-contents-from-minibuffer to icicle-input-from-minibuffer,
+;;              icicle-minibuffer-contents to icicle-minibuf-input.
+;;     icicle-display-candidates-in-Completions, icicle-next-candidate, icicle-place-cursor:
+;;       Use icicle-minibuf-input-sans-dir.
+;; 2008/08/23 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Wrap preliminary display of *Completions* in save-selected-window.
+;; 2008/08/22 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Display *Completions* before calling with-output-to-temp-buffer and filling it.
+;;        This is so we can know the window width, to determine the correct formatting.
+;;     icicle-insert-candidates:
+;;       Don't use lru window or *-Completions-*-default-width (removed).  Failsafe width 40.
+;; 2008/08/21 dadams
+;;     icicle-completing-read:
+;;       Bind minibuffer-completing-file-name to nil if not completing a file name.
+;;       Removed setq of minibuffer-completion-table. Already do it in *-lisp-vanilla-*.
+;; 2008/08/20 dadams
+;;     icicle-insert-candidates:
+;;       Turn off mouse-face after insert candidate.
+;;       Fixup whitespace correctly: Don't remove whitespace that is part of a candidate.
+;;     Added: icicle-ding.
+;;     icicle-read-number: Replaced ding by icicle-ding.
+;; 2008/08/18 dadams
+;;     Moved here from icicles-cmd.el (and renamed from *-less-p): icicle-cdr-lessp.
+;;     Added: icicle-delete-count, icicle-mctize-all, icicle-mctized-(display|full)-candidate,
+;;            icicle-part-1-cdr-lessp.
+;;     Renamed: icicle-delete-if(-not)     to icicle-remove-if(-not),
+;;              icicle-put-alist-candidate to icicle-put-whole-cand-prop,
+;;              icicle-update-completions  to icicle-complete-again-update.
+;;     icicle-completing-read: Factored out transformation to MCT into new fn icicle-mctize-all.
+;; 2008/08/08 dadams
+;;     icicle-completing-read: Updated doc string for Emacs 23.
+;; 2008/08/03 dadams
+;;     icicle-completing-read: Convert the predicate to apply to just the cdr (= original cons).
+;;     icicle-save-or-restore-input: Don't save empty string ("") to C-l history.
+;; 2008/07/27 dadams
+;;     Added: icicle-2nd-part-string-less-p.
+;;     Moved here from icicles-mcmd.el: icicle-transform-multi-completion.
+;; 2008/07/19 dadams
+;;     icicle-choose-completion-string: Don't move to point-max unless in minibuffer.
+;; 2008/06/24 dadams
+;;     Make *-must-match-filename-map an alias for *-filename-completion-map.  Use the latter.
+;; 2008/06/22 dadams
+;;     icicle-completing-read, icicle-read-file-name:
+;;       Remove text properties from result (only) if icicle-unpropertize-*-flag.
+;; 2008/06/21 dadams
+;;     icicle-read-file-name: Remove text properties from result file name.
+;; 2008/06/01 dadams
+;;     icicle-lisp-vanilla-completing-read: Typo: minibuffer-local-must-match-filename-map.
+;;     Put sort predicate properties on some sort predicate symbols, e.g. icicle-dirs-last-p.
+;; 2008/05/22 dadams
+;;     icicle-read-file-name: Bind minibuffer-completing-file-name to t.
+;;     icicle-read-file-name-1: Do not prepend ". " if Emacs 23+, since it uses completing-read.
+;;     icicle-(un)highlight-lighter: Reflect case-sensitivity in lighter.
+;; 2008/05/11 dadams
+;;     icicle-unsorted(-file-name)-apropos-candidates:
+;;       Pass input to all-completions only if not icicle-apropos-complete-match-fn.
+;; 2008/05/11 dadams
+;;     Renamed icicle-fit-Completions-window to icicle-fit-completions-window.
+;;     icicle-fit-completions-window: Use current window - not necessarily for *Completions*.
+;; 2008/05/06 dadams
+;;     icicle-highlight-lighter: Wrap redisplay in condition-case to ignore any errors.
+;; 2008/05/05 dadams
+;;     icicle-file-name-input-p: Redefined to just use minibuffer-completing-file-name.
+;; 2008/05/01 dadams
+;;     icicle-lisp-vanilla-completing-read, icicle-lisp-vanilla-completing-read,
+;;       icicle-read-from-minibuffer, icicle-read-number, icicle-read-string-completing:
+;;         Adapted to Emacs 23 change to allow list of strings for default value.
+;; 2008/04/25 dadams
+;;     icicle-call-then-update-Completions:
+;;       nil icicle-test-for-remote-files-flag means don't test for remote file name.
+;;     icicle-highlight-input-noncompletion:
+;;       Correction: implicit, not always, in combination with not incremental completion.
+;;       Added check for icicle-completing-command if value is explicit*.
+;;       Added check for icicle-test-for-remote-files-flag if *-strict with lax completion.
+;;       Protect call to icicle-file-remote-p with check of icicle-test-for-remote-files-flag.
+;; 2008/04/18 dadams
+;;     Renamed icicle-init-value-flag to icicle-default-value.
+;;     icicle-read-from-minibuffer:
+;;       If icicle-default-value is t, add to prompt.  Thx to Dominique Quatrevaux.
+;;     icicle-completing-read, icicle-read-file-name-1, icicle-read-from-minibuffer:
+;;       Change icicle-default-value test to rule out t also.
+;;     icicle-completion-setup-function:
+;;       Don't call file-name-directory unless minibuffer-completing-file-name.
+;; 2008/04/01 dadams
+;;     icicle-unsorted(-file-name)-apropos-candidates:
+;;       If icicle-unsorted-apropos-candidates pass input to all-completions.
+;;     icicle-expanded-common-match-1: 
+;;       Use icicle-apropos-complete-match-fn throughout, but return nil if that is nil.
+;;     icicle-display-candidates-in-Completions:
+;;       If icicle-apropos-complete-match-fn is nil, don't try to highlight input match.
+;; 2008/03/31 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Allow for no completion type, for No completions msg.
+;; 2008/03/30 dadams
+;;     icicle-read-file-name-1:
+;;       Bind read-file-name-function to nil.
+;;       Funcall icicle-old-read-file-name-fn instead of old-read-file-name.
+;;     icicle-(un)highlight-lighter: Respect icicle-highlight-lighter-flag.
+;;     Top-level: Moved fset for old-read-file-name to icicles-mode.el and renamed it.
+;; 2008/03/29 dadams
+;;     icicle-completing-read, icicle-read-file-name-1:
+;;       Combine new faces for single-character minibuffer completion status indicator.
+;;       Call icicle-highlight-lighter after establishing require-match, not at beginning.
+;;       No longer use completing-prompt-prefix(-symb).
+;;       No longer use icicle-reminder-prompt-flag (no longer add help to prompt).
+;;     Removed: icicle-control-reminder-prompt.
+;;     icicle-highlight-lighter:
+;;       Combine faces for highlighting.  Indicate multi-command and strict/lax completion.
+;;     icicle-unhighlight-lighter: Add + for multi-command.  Don't bother to propertize strg.
+;;     icicle-file-remote-p: If name matches Windows drive letter, don't try other remote tests.
+;; 2008/03/11 dadams
+;;     icicle-completing-read-history:
+;;       Convert cons list elements to strings.  Lets you use M-o with command-history.
+;; 2008/03/09 dadams
+;;     Added: icicle-(un)highlight-lighter.
+;;     icicle-completing-read, icicle-read-file-name: Call icicle-highlight-lighter.
+;; 2008/03/08 dadams
+;;     icicle-completing-p: Replaced where-is-internal test with completion keymaps test.
+;; 2008/03/05 dadams
+;;     icicle-completing-read:
+;;       Copy TABLE etc. only if candidates are strings.  Thx to Damon Permezel for bug report.
+;;     icicle-files-within: Skip inaccessible directories and unreadable files.  Thx to Damon.
+;; 2008/02/28 dadams
+;;     icicle-completing-read: Fixed test for multicompletion: List of strings, not just list.
+;; 2008/02/24 dadams
+;;     Added: icicle-scatter(-match).
+;;     icicle-display-*-in-Completions: Highlighting of input match can use icicle-scatter.
+;;                                      Use icicle-apropos-complete-match-fn in message.
+;;     icicle-expanded-common-match-1: Use icicle-apropos-complete-match-fn, not string-match.
+;; 2008/02/23 dadams
+;;     icicle-completing-read:
+;;       Change initial-input to a cons with 0 position if icicle-init-value-flag is *-start.
+;;     icicle-lisp-vanilla-completing-read: Set position to end of initial-input, by default.
+;;                                          Convert zero-based position to one-based.
+;; 2008/02/22 dadams
+;;     icicle-completing-read:
+;;       For all alist candidates (not just multi-completion):
+;;         Copy the car and replace the cdr with the whole candidate.
+;;     icicle-get-alist-candidate: Get and return just whole icicle-whole-candidate property.
+;;     icicle-completion-setup-function (for Emacs 20):
+;;       minibuffer-prompt-end -> icicle-minibuffer-prompt-end.
+;; 2008/02/16 dadams
+;;     icicle-get-alist-candidate:
+;;       Reconstitute whole candidate, by consing string onto data, which is only the cdr now.
+;;     icicle-completing-read: Use icicle-put-alist-candidate to put candidate data onto string.
+;;     Added: icicle-put-alist-candidate.  Put only the cdr (data), not whole, onto the string.
+;; 2008/02/14 dadams
+;;     Added: icicle-substring-no-properties.
+;; 2008/02/11 dadams
+;;     icicle-read-string-completing: Moved save-match-data so replace-match can use match data.
+;; 2008/02/06 dadams
+;;     icicle-highlight-input-noncompletion:
+;;       Wait icicle-highlight-input-completion-failure-delay before highlighting.
+;;       Don't highlight if past icicle-highlight-input-completion-failure-threshold.
+;;       Combined input-pending test with highlighting test, and moved it before file-name test.
+;;       Conditionalized face removal.
+;;       Return nil when input within delay preempts highlighting.
+;;     icicle-highlight-initial-whitespace: Removed only vestigial whitespace highlighting.
+;;     icicle-read-number: Moved save-match-data outside cond.
+;; 2008/02/03 dadams
+;;     icicle-choose-completion-string:
+;;       Go to point-max before insert choice.  Respect icicle-dir-candidate-can-exit-p.
+;;     icicle-completion-setup-function:
+;;       Set default dir only if this is a completion cmd or not *-comp-base-is-default-dir-p.
+;;       If icicle-comp-base-is-default-dir-p, set completion-base-size to default-dir length.
+;;     icicle-read-file-name: Bind ffap vars to prevent slowing down ffap-guesser.
+;; 2008/01/29 dadams
+;;     Added: icicle-(apropos|prefix)-any(-file-name)-candidates-p,
+;;            icicle-subst-envvar-in-file-name, icicle-highlight-input-noncompletion-rest,
+;;            icicle-any-candidates-p, icicle-file-remote-p.
+;;     icicle-minibuffer-contents-from-minibuffer: Use icicle-subst-envvar-in-file-name.
+;;     icicle-call-then-update-Completions:
+;;       Reinitialize icicle-input-fail-pos to nil.
+;;       If we know input is a remote file name from failure highlighting, skip remote test.
+;;       Use icicle-file-remote-p, not file-remote-p.
+;;     icicle-highlight-input-noncompletion: Rewrote.
+;;       Takes no args now.
+;;       Do nothing if input pending or input is empty.
+;;       Use icicle-file-remote-p, not file-remote-p.  Return value indicating remote file name.
+;;       Use new values of icicle-highlight-input-completion-failure, including always.
+;;       First check through last two chars, then icicle-highlight-input-noncompletion-rest.
+;;     icicle-highlight-input-noncompletion-rest (was in icicle-highlight-input-noncompletion):
+;;       No longer use icicle-max-chars-noncompletion-highlight.
+;;       Use icicle-any-candidates-p, so don't compute candidate lists.
+;; 2008/01/15 dadams
+;;     icicle-command-abbrev-save: Added condition-case with message in case of error.
+;;     icicle-control-reminder-prompt: Added message.
+;; 2008/01/13 dadams
+;;     icicle-read-face-name: Use icicle-transform-multi-completion.
+;;     icicle-next-candidate: Do not use icicle-transform-multi-completion.
+;;     icicle-next-candidate, icicle-save-or-restore-input: Do not treat handle-switch-frame.
+;; 2008/01/08 dadams
+;;     Renamed icicle-expanded-common-match to icicle-expanded-common-match-1.
+;;     New icicle-expanded-common-match uses longest of two tries.
+;;     icicle-expanded-common-match-1, first loop: Match ecm only up to orig-match-end.
+;;     icicle-read-file-name: Use icicle-var-is-of-type-p for proxy candidates.
+;;     icicle-choose-completion-string, icicle-strip-ignored-files-and-sort,
+;;       icicle-filter-wo-input, icicle-first-matching-candidate,
+;;       icicle-(proxy-candidate|prefix-keys)-first-p,  icicle-var-(matches|inherits)-type-p,
+;;       icicle-read-(number|face-name|file-name|string-completing),
+;;       icicle-unsorted(-file-name)-prefix-candidates, icicle-expanded-common-match-1,
+;;       icicle-next-candidate, icicle-remove-dots: Wrap string-match in save-match-data.
+;;     icicle-display-candidates-in-Completions: Moved save-match-data locations.
+;; 2008/01/05 dadams
+;;     icicle-next-candidate: Don't refresh Completions if last-command = handle-switch-frame.
+;; 2008/01/04 dadams
+;;     icicle-insert-candidates: Put property icicle-keep-newline on final \n of candidate.
+;; 2007/12/31 dadams
+;;     icicle-choose-completion-string: In minibuffer, delete all input before inserting.
+;; 2007/12/27 dadams
+;;     icicle-unsorted(-file-name)-apropos-candidates:
+;;       Use null *-apropos-*-match-fn, not function-valued TABLE to inhibit input match.
+;; 2007/12/26 dadams
+;;     icicle-next-candidate: Raise *Completions* frame at the end.
+;; 2007/12/24 dadams
+;;     icicle-unsorted(-file-name)-apropos-candidates:
+;;       Don't match input regexp if minibuffer-completion-table is a function.
+;;     icicle-var-inherits-type-p:
+;;       Recheck var-type match after set var-type to its car.
+;;       Handle string (regexp) TYPES elements.
+;;     icicle-value-satisfies-type-p: Skip type check for string type (regexp).
+;;     icicle-var-is-of-type-p: Doc string.  Use icicle-var-matches-type-p.
+;;     Added: icicle-var-matches-type-p, icicle-custom-type.
+;; 2007/12/23 dadams
+;;     icicle-var-is-of-type-p:
+;;       Added MODE arg.  Use icicle-var-inherits-type-p, icicle-var-val-satisfies-type-p.
+;;       Redefined as MODE choice, not just a simple or.  Treat more cases.
+;;     Added: icicle-var-inherits-type-p, icicle-var-val-satisfies-type-p,
+;;            icicle-value-satisfies-type-p.
+;;     icicle-read-(number|char-exclusive|string-completing|face-name):
+;;       Don't fill icicle-proxy-candidates unless icicle-add-proxy-candidates-flag.
+;;       Corrected doc string to refer to icicle-add-proxy-candidates-flag.
+;; 2007/12/22 dadams
+;;     icicle-var-is-of-type-p:
+;;       Check supertypes also.  Use both :validate and :match.
+;;       Wrap type check in condition-case. Use widget-put instead of plist-put.
+;;     Added soft require of wid-edit+.el.
+;; 2007/12/21 dadams
+;;     icicle-var-is-of-type-p: Use :validate, not :match, for the test.
+;; 2007/12/19 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Ensure icicle-last-input is non-nil in (file-name-directory icicle-last-input).
+;; 2007/12/14 dadams
+;;     icicle-fit-Completions-window:
+;;       Don't try to get a property if it's not a symbol.  Thx to Mike Mattie.
+;; 2007/12/11 dadams
+;;     Added: icicle-read-char-exclusive.
+;;     icicle-read-face-name: Include face-name vars as proxy candidates.
+;; 2007/12/10 dadams
+;;     icicle-highlight-input-noncompletion: Use face icicle-input-completion-fail-lax also.
+;; 2007/12/09 dadams
+;;     icicle-highlight-input-noncompletion: Respect icicle-max-chars-noncompletion-highlight.
+;; 2007/12/08 dadams
+;;     icicle-read-file-name:
+;;       Include file-name variables as proxy candidates.  Reset icicle-proxy-candidates at end.
+;;     icicle-read-number: float type is not defined before Emacs 22.
+;;     icicle-read-string-completing:
+;;       Set default to "" if nil, but only after completing-read.
+;;       Set car of hist to var value, replacing var name.  Treat consp hist also.
+;; 2007/12/03 dadams
+;;     Renamed icicle-longest-common-match to icicle-expanded-common-match.
+;; 2007/12/02 dadams
+;;     Added: icicle-var-is-of-type-p.
+;;     icicle-read-(number|string-completing):
+;;       Use icicle-var-is-of-type-p, to handle compatible types.
+;; 2007/11/30 dadams
+;;     icicle-read-file-name, icicle-read-(number|string-completing),
+;;       icicle-display-candidates-in-Completions, icicle-proxy-candidate-first-p:
+;;         Use only membership in icicle-proxy-candidates, not icicle-proxy-candidate property.
+;;     icicle-choose-completion-string:
+;;       Condition for exit: could be no minibuffer-completion-table if extra or proxy cands.
+;; 2007/11/29 dadams
+;;     icicle-read-(number|string-completing):
+;;       Treat icicle-add-proxy-candidates-flag and icicle-proxy-candidates.
+;;     icicle-display-candidates-in-Completions: Treat empty icicle-completion-candidates.
+;; 2007/11/27 dadams
+;;     Added: icicle-read-number, icicle-read-string-completing.
+;;     icicle-read-file-name: Remove icicle-proxy-candidate property in unwind-protect.
+;; 2007/11/25 dadams
+;;     Added: icicle-command-abbrev(save|-used-more-p).
+;; 2007/11/24 dadams
+;;     icicle-longest-common-match,  first loop: string-match -> not string-match.
+;;                                               len-first -> length of lcm.
+;;     Added: icicle-proxy-candidate-first-p.
+;; 2007/11/18 dadams
+;;     icicle(-unsorted)(-file-name)-(apropos|prefix)-candidates:
+;;       Include also icicle-proxy-candidates.
+;;       Move special and proxy candidates inside match filtering.
+;;     icicle-display-candidates-in-Completions:
+;;       Don't expand directory when highlighting special candidate.
+;; 2007/11/02 dadams
+;;     icicle-longest-common-match:
+;;       First loop: (1) match against at most len-first, (2) put the match into the and test.
+;; 2007/10/28 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Always highlight longest common match for prefix completion.
+;;     icicle-unsorted(-file-name)-prefix-candidates, icicle-fuzzy-candidates:
+;;       Set icicle-common-match-string, regardless of icicle-expand-input-*-flag.
+;;     icicle-save-or-restore-input:
+;;       Update to lcm even if no input change, if completion mode changed.
+;;       Update to lcm if prefix completing, even if icicle-expand-input-*-flag is nil.
+;;       Save input for C-l even if this command is an icicle-completing-command (?).
+;;       Don't reset raw input to "" if cycling, so keep highlight in *Completions*.
+;;     icicle-longest-common-match: Test prefix through embedded input each time.
+;; 2007/10/26 dadams
+;;     icicle-read-face-name (Emacs 22): Fix the treatment of default value.
+;; 2007/10/22 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Highlight only regexp matching part of special candidates.
+;;       Highlight special cands regardless of icicle-highlight-historical-candidates-flag.
+;; 2007/10/02 dadams
+;;     icicle-next-candidate:
+;;       Apply abbreviate-file-name to file-name input.  Thx to Joonhwan Lee.
+;; 2007/09/29 dadams
+;;     Added: icicle-fuzzy-candidates.
+;;     icicle-prefix-candidates: Treat fuzzy completion.
+;;     icicle-display-candidates-in-Completions:
+;;       For prefix completion, highlight literal input match in Completions.
+;; 2007/09/26 dadams
+;;     icicle-read-from-minibuffer: Removed keep-all arg - see also 2006/06/01.
+;; 2007/09/22 dadamms
+;;     icicle-completing-read, icicle-read-from-minibuffer:
+;;       Ensure that init arg is string when get it from default arg via icicle-init-*-flag.
+;; 2007/09/18 dadams
+;;     icicle-call-then-update-Completions:
+;;       Test icicle-current-completion-mode, not icicle-last-completion-command.
+;; 2007/09/16 dadams
+;;     icicle-call-then-update-Completions:
+;;       Don't complete if file-remote-p.
+;;       Highlight completion failure only if input > icicle-*-display-min-input-chars.
+;;     icicle-highlight-input-noncompletion:
+;;       Don't highlight unless also icicle-incremental-completion-flag.
+;;       Call icicle-file-name-*-candidates for file-name input.
+;;       Don't highlight if file-remote-p and reading file name.  Instead, remove highlighting.
+;; 2007/09/14 dadams
+;;     icicle-highlight-input-noncompletion, icicle-update-completions,
+;;       icicle-recompute-candidates:
+;;         Wrapped condition-case around candidates computation.
+;; 2007/09/02 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Restore point and window point to start of candidates in *Completions*.
+;; 2007/08/21 dadams
+;;     icicle-highlight-input-noncompletion: Remove any vestigial highlighting on matched part.
+;; 2007/08/19 dadams
+;;     Added: icicle-lisp-vanilla-completing-read, icicle-highlight-input-noncompletion.
+;;     icicle-completing-read:
+;;       Allow reading and returning string candidates with properties:
+;;         bind minibuffer-allow-text-properties.
+;;       Put whole candidate on string as text property.
+;;       Use icicle-lisp-vanilla-completing-read, not old-completing-read.
+;;     icicle-call-then-update-Completions: Call icicle-highlight-input-noncompletion.
+;;     icicle-get-alist-candidate:
+;;       If icicle-whole-candidate-as-text-prop-p, try to get full candidate from text prop.
+;; 2007/08/16 dadams
+;;     icicle-insert-candidates: Don't reset text props if endpos > point.  Thx Chris Hecker.
+;; 2007/08/14 dadams
+;;     icicle-increment-cand-nb+signal-end: Removed audible bell - use visible bell only.
+;; 2007/07/22 dadams
+;;     icicle-read-face-name (Emacs 22 version):
+;;       Revert multiple branch to not use icicle-make-face-candidate.
+;;     Moved here from icicles-mode.el: icicle-completing-p.
+;; 2007/07/06 dadams
+;;     icicle-display-candidates-in-Completions: Leave cursor at start of candidates.
+;; 2007/07/03 dadams
+;;     icicle-save-or-restore-input:
+;;       Add current-raw-input to icicle-previous(-non)-file-*-raw-inputs, respecting max len.
+;;       Don't save input if current command is C-l or C-L.
+;;       If don't save raw input, set it to empty string.
+;;     Added: icicle-put-at-head.
+;;     icicle-highlight-complete-input: Ensure no error treatment in call to search-forward.
+;;     icicle-display-candidates-in-Completions:
+;;       Ensure non-nil current(-raw)-input, for highlight.
+;; 2007/06/23 dadams
+;;     Added: icicle-completing-read-history.
+;;     Moved here from icicles-cmd.el: icicle-read-from-minibuf-nil-default.
+;; 2007/06/20 dadams
+;;     icicle-make-face-candidate, icicle-read-face-name:
+;;       Use new string value of icicle-WYSIWYG-Completions-flag.
+;; 2007/06/19 dadams
+;;     icicle-read-face-name:
+;;       Use a multi-completion, depending on icicle-WYSIWYG-Completions-flag.
+;;       For Emacs 22, isolate the multiple case and do nothing for it.
+;;     icicle-make-face-candidate: Treat also whole-number value for icicle-WYSIWYG-*-flag.
+;; 2007/06/17 dadams
+;;     icicle-make-face-candidate: Respect icicle-WYSIWYG-Completions-flag.
+;;     icicle-display-candidates-in-Completions: highlight saved candidates.
+;;     icicle-place-overlay: Added priority arg.
+;; 2007/06/13 dadams
+;;     icicle-display-candidates-in-Completions:
+;;       Upgrade ic