annotate lisp/packages/icomplete.el @ 211:78478c60bfcd r20-4b4

Import from CVS: tag r20-4b4
author cvs
date Mon, 13 Aug 2007 10:05:51 +0200
parents 489f57a838ef
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
1 ;;;_. icomplete.el - minibuffer completion incremental feedback
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
3 ;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
5 ;; Author: Ken Manheimer <klm@python.org>
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
6 ;; Maintainer: Ken Manheimer <klm@python.org>
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
7 ;; Version: $Id: icomplete.el,v 1.5 1997/09/17 05:19:35 steve Exp $
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
8 ;; Created: Mar 1993 klm@nist.gov - first release to usenet
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
9 ;; Keywords: help, abbrev
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
11 ;; This file is part of GNU Emacs.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
13 ;; GNU Emacs is free software; you can redistribute it and/or modify
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
14 ;; it under the terms of the GNU General Public License as published by
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
18 ;; GNU Emacs is distributed in the hope that it will be useful,
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
21 ;; GNU General Public License for more details.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; You should have received a copy of the GNU General Public License
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to the
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
25 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
26 ;; Boston, MA 02111-1307, USA.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
28 ;; This file is also part of GNU XEmacs.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
29 ;; Hacked for GNU XEmacs: David Hughes 7th September 1995.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
30 ;; Icomplete keybindings display originally by Steve Bauer, with
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
31 ;; some integration and refinement by Ken Manheimer.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
35 ;; Loading this package implements a more fine-grained minibuffer
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
36 ;; completion feedback scheme. Prospective completions are concisely
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
37 ;; indicated within the minibuffer itself, with each successive
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
38 ;; keystroke.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
40 ;; See 'icomplete-completions' docstring for a description of the
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
41 ;; icomplete display format.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
43 ;; See the `icomplete-minibuffer-setup-hook' docstring for a means to
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
44 ;; customize icomplete setup for interoperation with other
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
45 ;; minibuffer-oriented packages.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
47 ;; To activate icomplete mode, load the package and use the
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
48 ;; `icomplete-mode' function. You can subsequently deactivate it by
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
49 ;; invoking the function icomplete-mode with a negative prefix-arg
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
50 ;; (C-U -1 ESC-x icomplete-mode). Also, you can prevent activation of
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
51 ;; the mode during package load by first setting the variable
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
52 ;; `icomplete-mode' to nil. Icompletion can be enabled any time after
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
53 ;; the package is loaded by invoking icomplete-mode without a prefix
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
54 ;; arg.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
56 ;; Thanks to everyone for their suggestions for refinements of this
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
57 ;; package. I particularly have to credit Michael Cook, who
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
58 ;; implemented an incremental completion style in his 'iswitch'
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
59 ;; functions that served as a model for icomplete. Some other
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
60 ;; contributors: Noah Freidman (restructuring as minor mode), Colin
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
61 ;; Rafferty (lemacs reconciliation), Lars Lindberg, RMS, and others.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
63 ;; klm.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 ;;;_* Provide
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (provide 'icomplete)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
70 (defgroup icomplete nil
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
71 "Minibuffer completion incremental feedback."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
72 :group 'minibuffer)
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
73
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
74
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
75 (defcustom icomplete-mode nil
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
76 "*Non-nil activates incremental minibuffer completion."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
77 :type 'boolean
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
78 :set (lambda (symbol value)
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
79 (icomplete-mode (if value 1 -1)))
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
80 :initialize 'custom-initialize-default
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
81 :require 'icomplete
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
82 :group 'icomplete)
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
83
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 ;;;_* User Customization variables
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
85 (defcustom icomplete-compute-delay .3
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
86 "*Completions-computation stall, used only with large-number
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
87 completions - see `icomplete-delay-completions-threshold'."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
88 :type 'number
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
89 :group 'icomplete)
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
90 (defcustom icomplete-delay-completions-threshold 400
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
91 "*Pending-completions number over which to apply icomplete-compute-delay."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
92 :type 'integer
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
93 :group 'icomplete)
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
94 (defcustom icomplete-max-delay-chars 3
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
95 "*Maximum number of initial chars to apply icomplete compute delay."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
96 :type 'integer
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
97 :group 'icomplete)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
98
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
99 ;;;_* Initialization
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
100 ;;;_ = icomplete-minibuffer-setup-hook
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
101 (defcustom icomplete-minibuffer-setup-hook nil
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
102 "*Icomplete-specific customization of minibuffer setup.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
103
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 This hook is run during minibuffer setup iff icomplete will be active.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 It is intended for use in customizing icomplete for interoperation
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 with other packages. For instance:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
107
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
108 \(add-hook 'icomplete-minibuffer-setup-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
109 \(function
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
110 \(lambda ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
111 \(make-local-variable 'resize-minibuffer-window-max-height)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
112 \(setq resize-minibuffer-window-max-height 3))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
113
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
114 will constrain rsz-mini to a maximum minibuffer height of 3 lines when
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
115 icompletion is occurring."
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
116 :type 'hook
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
117 :group 'icomplete)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119 ;;;_ + Internal Variables
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 ;;;_ = icomplete-mode
189
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
121 ;(defvar icomplete-mode t
489f57a838ef Import from CVS: tag r20-3b21
cvs
parents: 155
diff changeset
122 ; "*Nil inhibits activated incremental minibuffer completion.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
123 ;;;_ = icomplete-eoinput 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
124 (defvar icomplete-eoinput 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125 "Point where minibuffer input ends and completion info begins.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
126 (make-variable-buffer-local 'icomplete-eoinput)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
127 ;;;_ = icomplete-pre-command-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
128 (defvar icomplete-pre-command-hook nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
129 "Incremental-minibuffer-completion pre-command-hook.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 Is run in minibuffer before user input when `icomplete-mode' is non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132 Use `icomplete-mode' function to set it up properly for incremental
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 minibuffer completion.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 (add-hook 'icomplete-pre-command-hook 'icomplete-tidy)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
135 ;;;_ = icomplete-post-command-hook
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
136 (defvar icomplete-post-command-hook nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137 "Incremental-minibuffer-completion post-command-hook.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
138
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
139 Is run in minibuffer after user input when `icomplete-mode' is non-nil.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
140 Use `icomplete-mode' function to set it up properly for incremental
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
141 minibuffer completion.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
142 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
143
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
144 (defvar icomplete-show-key-bindings t
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
145 "When non-nil, show key bindings as well as completion for sole matches.")
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
147 (defun icomplete-get-keys (func-name)
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
148 "Return strings naming keys bound to `func-name', or nil if none.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
149 Examines the prior, not current, buffer, presuming that current buffer
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
150 is minibuffer."
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
151 (if (commandp func-name)
110
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
152 (save-excursion
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
153 (let* ((sym (intern func-name))
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
154 (buf (other-buffer))
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
155 (map (save-excursion (set-buffer buf) (current-local-map)))
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
156 (keys (where-is-internal sym map)))
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
157 (if keys
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
158 (concat "<"
110
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
159 (mapconcat 'key-description
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
160 (sort keys
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
161 #'(lambda (x y)
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
162 (< (length x) (length y))))
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 74
diff changeset
163 ", ")
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
164 ">"))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
165
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
166 ;;;_ > icomplete-mode (&optional prefix)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
167 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
168 (defun icomplete-mode (&optional prefix)
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
169 "Activate incremental minibuffer completion for this emacs session.
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
170 Deactivates with negative universal argument."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
171 (interactive "p")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
172 (or prefix (setq prefix 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
173 (cond ((>= prefix 0)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
174 (setq icomplete-mode t)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
175 ;; The following is not really necessary after first time -
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
176 ;; no great loss.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
177 (add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
178 (t (setq icomplete-mode nil))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
180 ;;;_ > icomplete-simple-completing-p ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
181 (defun icomplete-simple-completing-p ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182 "Non-nil if current window is minibuffer that's doing simple completion.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
183
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
184 Conditions are:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
185 the selected window is a minibuffer,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
186 and not in the middle of macro execution,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
187 and minibuffer-completion-table is not a symbol (which would
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
188 indicate some non-standard, non-simple completion mechanism,
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189 like file-name and other custom-func completions)."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
190
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191 (and (window-minibuffer-p (selected-window))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
192 (not executing-kbd-macro)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 (not (symbolp minibuffer-completion-table))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
194
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 ;;;_ > icomplete-minibuffer-setup ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 ;;;###autoload
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197 (defun icomplete-minibuffer-setup ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 "Run in minibuffer on activation to establish incremental completion.
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
199 Usually run by inclusion in `minibuffer-setup-hook'."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 (cond ((and icomplete-mode (icomplete-simple-completing-p))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 (make-local-hook 'pre-command-hook)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
202 (add-hook 'pre-command-hook
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
203 (function (lambda ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
204 (run-hooks 'icomplete-pre-command-hook)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
205 nil t)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (make-local-hook 'post-command-hook)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
207 (add-hook 'post-command-hook
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
208 (function (lambda ()
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
209 (run-hooks 'icomplete-post-command-hook)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
210 nil t)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
211 (run-hooks 'icomplete-minibuffer-setup-hook))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
212
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
213 ;;;_* Completion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
214
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
215 ;;;_ > icomplete-tidy ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
216 (defun icomplete-tidy ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
217 "Remove completions display \(if any) prior to new user input.
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
218 Should be run in on the minibuffer `pre-command-hook'. See `icomplete-mode'
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
219 and `minibuffer-setup-hook'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
220 (if (icomplete-simple-completing-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
221 (if (and (boundp 'icomplete-eoinput)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
222 icomplete-eoinput)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
223
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
224 (if (> icomplete-eoinput (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
225 ;; Oops, got rug pulled out from under us - reinit:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
226 (setq icomplete-eoinput (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
227 (let ((buffer-undo-list buffer-undo-list )) ; prevent entry
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
228 (delete-region icomplete-eoinput (point-max))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
229
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
230 ;; Reestablish the local variable 'cause minibuffer-setup is weird:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
231 (make-local-variable 'icomplete-eoinput)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
232 (setq icomplete-eoinput 1))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
233
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
234 ;;;_ > icomplete-exhibit ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
235 (defun icomplete-exhibit ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
236 "Insert icomplete completions display.
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
237 Should be run via minibuffer `post-command-hook'. See `icomplete-mode'
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
238 and `minibuffer-setup-hook'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
239 (if (icomplete-simple-completing-p)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
240 (let ((contents (buffer-substring (point-min)(point-max)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
241 (buffer-undo-list t))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
242 (save-excursion
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
243 (goto-char (point-max))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
244 ; Register the end of input, so we
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
245 ; know where the extra stuff
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
246 ; (match-status info) begins:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
247 (if (not (boundp 'icomplete-eoinput))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
248 ;; In case it got wiped out by major mode business:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
249 (make-local-variable 'icomplete-eoinput))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
250 (setq icomplete-eoinput (point))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
251 ; Insert the match-status information:
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
252 (if (and (> (point-max) 1)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
253 (or
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
254 ;; Don't bother with delay after certain number of chars:
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
255 (> (point-max) icomplete-max-delay-chars)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
256 ;; Don't delay if alternatives number is small enough:
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
257 (if minibuffer-completion-table
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
258 (cond ((numberp minibuffer-completion-table)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
259 (< minibuffer-completion-table
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
260 icomplete-delay-completions-threshold))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
261 ((sequencep minibuffer-completion-table)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
262 (< (length minibuffer-completion-table)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
263 icomplete-delay-completions-threshold))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
264 ))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
265 ;; Delay - give some grace time for next keystroke, before
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
266 ;; embarking on computing completions:
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
267 (sit-for icomplete-compute-delay)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
268 (insert-string
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
269 (icomplete-completions contents
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
270 minibuffer-completion-table
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
271 minibuffer-completion-predicate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
272 (not
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
273 minibuffer-completion-confirm))))))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
274
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
275 ;;;_ > icomplete-completions (name candidates predicate require-match)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
276 (defun icomplete-completions (name candidates predicate require-match)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
277 "Identify prospective candidates for minibuffer completion.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
278
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
279 The display is updated with each minibuffer keystroke during
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
280 minibuffer completion.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
281
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
282 Prospective completion suffixes (if any) are displayed, bracketed by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
283 one of \(), \[], or \{} pairs. The choice of brackets is as follows:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
284
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
285 \(...) - a single prospect is identified and matching is enforced,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
286 \[...] - a single prospect is identified but matching is optional, or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
287 \{...} - multiple prospects, separated by commas, are indicated, and
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
288 further input is required to distinguish a single one.
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
289
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
290 The displays for unambiguous matches have ` [Matched]' appended
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
291 \(whether complete or not), or ` \[No matches]', if no eligible
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
292 matches exist. \(Keybindings for uniquely matched commands are
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
293 exhibited within the square braces.)"
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
294
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
295 ;; 'all-completions' doesn't like empty
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
296 ;; minibuffer-completion-table's (ie: (nil))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
297 (if (and (listp candidates) (null (car candidates)))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
298 (setq candidates nil))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
299
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
300 (let ((comps (all-completions name candidates predicate))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
301 ; "-determined" - only one candidate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
302 (open-bracket-determined (if require-match "(" "["))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
303 (close-bracket-determined (if require-match ")" "]"))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
304 ;"-prospects" - more than one candidate
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
305 (open-bracket-prospects "{")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
306 (close-bracket-prospects "}")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
307 )
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
308 (catch 'input
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
309 (cond ((null comps) (format " %sNo matches%s"
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
310 open-bracket-determined
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
311 close-bracket-determined))
153
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
312 ((null (cdr comps)) ;one match
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
313 (concat (if (and (> (length (car comps))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
314 (length name)))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
315 (concat open-bracket-determined
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
316 (substring (car comps) (length name))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
317 close-bracket-determined)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
318 "")
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
319 " [Matched"
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
320 (let ((keys (and icomplete-show-key-bindings
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
321 (commandp (intern-soft (car comps)))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
322 (icomplete-get-keys (car comps)))))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
323 (if keys
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
324 (concat "; " keys)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
325 ""))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
326 "]"))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
327 (t ;multiple matches
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
328 (let* ((most
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
329 (try-completion name candidates
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
330 (and predicate
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
331 ;; Wrap predicate in impatience - ie,
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
332 ;; `throw' up when pending input is
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
333 ;; noticed. Adds some overhead to
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
334 ;; predicate, but should be worth it.
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
335 (function
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
336 (lambda (item)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
337 (if (input-pending-p)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
338 (throw 'input "")
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
339 (apply predicate
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
340 item nil)))))))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
341 (most-len (length most))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
342 most-is-exact
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
343 (alternatives
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
344 (substring
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
345 (apply (function concat)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
346 (mapcar (function
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
347 (lambda (com)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
348 (if (input-pending-p)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
349 (throw 'input ""))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
350 (if (= (length com) most-len)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
351 ;; Most is one exact match,
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
352 ;; note that and leave out
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
353 ;; for later indication:
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
354 (progn
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
355 (setq most-is-exact t)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
356 ())
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
357 (concat ","
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
358 (substring com
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
359 most-len)))))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
360 comps))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
361 1)))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
362 (concat (and (> most-len (length name))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
363 (concat open-bracket-determined
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
364 (substring most (length name))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
365 close-bracket-determined))
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
366 open-bracket-prospects
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
367 (if most-is-exact
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
368 ;; Add a ',' at the front to indicate "complete but
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
369 ;; not unique":
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
370 (concat "," alternatives)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
371 alternatives)
25f70ba0133c Import from CVS: tag r20-3b3
cvs
parents: 110
diff changeset
372 close-bracket-prospects)))))))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
373
155
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
374 (if (string-match "XEmacs\\|Lucid" emacs-version)
43dd3413c7c7 Import from CVS: tag r20-3b4
cvs
parents: 153
diff changeset
375 (add-hook 'icomplete-minibuffer-setup-hook 'icomplete-exhibit))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
376
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
377 ;;;_* Local emacs vars.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
378 ;;;Local variables:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
379 ;;;outline-layout: (-2 :)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
380 ;;;End:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
381
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
382 ;;; icomplete.el ends here