;; Description: Internal variables for Icicles
;; Author: Drew Adams
;; Maintainer: Drew Adams (concat "drew.adams" "@" "oracle" ".com")
-;; Copyright (C) 1996-2014, Drew Adams, all rights reserved.
+;; Copyright (C) 1996-2015, Drew Adams, all rights reserved.
;; Created: Mon Feb 27 09:23:26 2006
-;; Last-Updated: Sun Apr 20 15:05:17 2014 (-0700)
+;; Last-Updated: Thu Jan 1 10:56:31 2015 (-0800)
;; By: dradams
-;; Update #: 1803
+;; Update #: 1822
;; URL: http://www.emacswiki.org/icicles-var.el
;; Doc URL: http://www.emacswiki.org/Icicles
;; Keywords: internal, extensions, help, abbrev, local, minibuffer,
;; keys, apropos, completion, matching, regexp, command
-;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x
+;; Compatibility: GNU Emacs: 20.x, 21.x, 22.x, 23.x, 24.x, 25.x
;;
;; Features that might be required by this library:
;;
-;; `apropos', `apropos-fn+var', `cl', `cus-theme',
-;; `el-swank-fuzzy', `ffap', `ffap-', `fuzzy', `fuzzy-match',
-;; `hexrgb', `icicles-opt', `kmacro', `levenshtein', `naked',
-;; `regexp-opt', `thingatpt', `thingatpt+', `wid-edit',
+;; `apropos', `apropos+', `apropos-fn+var', `avoid', `bookmark',
+;; `bookmark+', `bookmark+-1', `bookmark+-bmu', `bookmark+-key',
+;; `bookmark+-lit', `cl', `cmds-menu', `cus-theme',
+;; `el-swank-fuzzy', `ffap', `ffap-', `fit-frame', `frame-fns',
+;; `fuzzy', `fuzzy-match', `help+20', `hexrgb', `icicles-opt',
+;; `info', `info+20', `kmacro', `levenshtein', `menu-bar',
+;; `menu-bar+', `misc-cmds', `misc-fns', `naked', `package', `pp',
+;; `pp+', `regexp-opt', `second-sel', `strings', `thingatpt',
+;; `thingatpt+', `unaccent', `w32browser-dlgopen', `wid-edit',
;; `wid-edit+', `widget'.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; `icicle-complete-input-overlay', `icicle-complete-keys-alist',
;; `icicle-completing-keys-p', `icicle-completing-p',
;; `icicle-completing-read+insert-candidates',
-;; `icicle-completion-candidates',
+;; `icicle-completion-candidates', `icicle-completion-map-vars',
;; `icicle-completion-prompt-overlay',
;; `icicle-completion-set-history',
;; `icicle-compute-narrowing-regexp-p',
;; `icicle-nb-candidates-before-truncation',
;; `icicle-nb-of-other-cycle-candidates', `icicle-new-last-cmd',
;; `icicle-next-apropos-complete-cycles-p',
-;; `icicle-next-prefix-complete-cycles-p', `icicle-orig-buff',
+;; `icicle-next-prefix-complete-cycles-p',
+;; `icicle-next-window-for-display-buffer', `icicle-orig-buff',
;; `icicle-orig-font-lock-keywords',
;; `icicle-orig-minibuffer-completion-pred',
;; `icicle-orig-minibuffer-completion-table',
;;; Defvars to quiet byte-compiler:
(defvar kmacro-ring-max) ; Defined in `kmacro.el' in Emacs 22+.
(defvar minibuffer-confirm-exit-commands) ; Defined in `minibuffer.el' in Emacs 23+.
+(defvar minibuffer-local-filename-completion-map)
+(defvar minibuffer-local-filename-must-match-map)
+(defvar minibuffer-local-must-match-filename-map)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar icicle-completion-candidates nil "Current list of completion candidates.")
+(defvar icicle-completion-map-vars
+ (delq nil (list 'minibuffer-local-completion-map
+ 'minibuffer-local-must-match-map
+ (and (< emacs-major-version 24)
+ (boundp 'minibuffer-local-filename-completion-map)
+ (not (eq minibuffer-local-completion-map
+ (keymap-parent minibuffer-local-filename-completion-map)))
+ 'minibuffer-local-filename-completion-map)
+ (and (< emacs-major-version 24)
+ (boundp 'minibuffer-local-filename-must-match-map)
+ (not (eq minibuffer-local-must-match-map
+ (keymap-parent minibuffer-local-filename-must-match-map)))
+ 'minibuffer-local-filename-must-match-map)
+ (and (< emacs-major-version 24)
+ (boundp 'minibuffer-local-must-match-filename-map)
+ (not (eq minibuffer-local-must-match-map
+ (keymap-parent minibuffer-local-must-match-filename-map)))
+ 'minibuffer-local-must-match-filename-map)))
+ "Minibuffer completion keymap variables.")
+
+;; Might as well do this here.
+(dolist (map icicle-completion-map-vars)
+ ;; Non-nil value, to indicate completion.
+ (define-key (symbol-value map) [icicle-is-completion-map] 'ignore))
+
(defvar icicle-completion-prompt-overlay nil
"Overlay used to highlight saved completion candidates.")
(defvar icicle-next-prefix-complete-cycles-p nil
"Whether the next prefix-completion command should cycle.")
+(defvar icicle-next-window-for-display-buffer nil
+ "The window to use for the next buffer-displaying call.
+Affects `display-buffer', `switch-to-buffer',
+`switch-to-buffer-other-window', and functions that call these.
+\(Not used for Emacs versions prior to Emacs 24.)")
+
(defvar icicle-orig-buff nil
"Current buffer when you invoked an Icicles multi-command.")
(defvar icicle-read-expression-map nil
"Icicle mode version of `read-expression-map'.
-Several Emacs-Lisp mode key bindings are used.")
+Several standard Emacs-Lisp mode key bindings are available.
+In addition, `TAB' completes a symbol and `C-M-i' (or `ESC TAB')
+indents the current line.")
(unless icicle-read-expression-map
(let ((map (make-sparse-keymap)))
- (define-key map (icicle-kbd "C-M-i") 'indent-lisp-line) ; `ESC TAB', `C-M-i'
+ (define-key map (icicle-kbd "C-M-i") 'lisp-indent-line) ; `ESC TAB', `C-M-i'
(define-key map (icicle-kbd "C-i") 'lisp-complete-symbol) ; `C-i', `TAB'
- (define-key map (icicle-kbd "ESC tab") 'indent-lisp-line) ; `ESC tab'
+ (define-key map (icicle-kbd "ESC tab") 'lisp-indent-line) ; `ESC tab'
(define-key map (icicle-kbd "C-M-x") 'eval-defun) ; `ESC C-x', `C-M-x'
- (define-key map (icicle-kbd "C-M-q") 'indent-pp-sexp) ; `ESC C-q', `C-M-q'
+ (define-key map (icicle-kbd "C-M-q") (if (fboundp 'indent-pp-sexp) ; `ESC C-q', `C-M-q'
+ 'indent-pp-sexp ; Emacs 22+
+ 'indent-sexp))
;;(define-key map (icicle-kbd "DEL") 'backward-delete-char-untabify)
(set-keymap-parent map minibuffer-local-map)
(setq icicle-read-expression-map map)))