annotate lisp/packages/icomplete.el @ 54:05472e90ae02 r19-16-pre2

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