     (setq lusty--highlighted-index 0))
   (lusty-refresh-matches-buffer))
 
+;;;###autoload
 (defun lusty-select-entry ()
   "Select the highlighted entry in *Lusty-Matches*."
   (interactive)

(defvar lusty-truncated-string
  (propertize "-- TRUNCATED --" 'face 'font-lock-comment-face))

(defvar lusty-mode-map
  ;; STEVE also func ala iswitchb-define-mode-map ?
  (let ((map (make-sparse-keymap)))
    (set-keymap-parent map minibuffer-local-map)
    (define-key map "\C-n" 'lusty-highlight-next)
    (define-key map "\C-p" 'lusty-highlight-previous)
    (define-key map "\t" 'lusty-select-entry)
    (define-key map (kbd "RET") 'lusty-select-entry)
    ;; STEVE: perhaps RET should be:
    ;; - if buffer explorer, same as \t
    ;; - if file explorer, opens current name (or recurses if existing dir)
    map)
  "Minibuffer keymap for `lusty-file-explorer' and `lusty-buffer-explorer'.")

;;;###autoload
(defun lusty-file-explorer ()
  "Launch the file/directory mode of LustyExplorer."
  (interactive)
  (let* ((lusty--active-mode :file-explorer)
         (lusty--ignored-extensions
          (mapcar (lambda (ext) (concat (regexp-quote ext) "$"))

(defun lusty-buffer-explorer ()
  "Launch the buffer mode of LustyExplorer."
  (interactive)
  (lusty--define-mode-map)
  (let* ((lusty--active-mode :buffer-explorer)
         (minibuffer-local-completion-map lusty-mode-map)
         (buffer (lusty--run 'read-buffer)))
    (when buffer
      (switch-to-buffer buffer))))

;;;###autoload
(defun lusty-highlight-next ()
  "Highlight the next entry in *Lusty-Matches*."
  (interactive)
  (incf lusty--highlighted-index)
  (lusty-refresh-matches-buffer))

;;;###autoload
(defun lusty-highlight-previous ()
  "Highlight the previous entry in *Lusty-Matches*."
  (interactive)
