annotate lisp/icomplete.el @ 9988:23ad7670da34

(timezone-parse-date): Handle two new formats (6 and 7).
author Richard M. Stallman <rms@gnu.org>
date Wed, 16 Nov 1994 22:21:39 +0000
parents 299cfe0a6069
children 97da4cb32d03
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
1 ;;;_. icomplete.el - minibuffer completion incremental feedback
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
2
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
3 ;;; Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;;; Author: Ken Manheimer <klm@nist.gov>
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;;; Maintainer: Ken Manheimer <klm@nist.gov>
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
7 ;;; Version: Id: icomplete.el,v 4.3 1994/08/31 18:48:29 klm Exp
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;;; Created: Mar 1993 klm@nist.gov - first release to usenet
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;;; Keywords: help, abbrev
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
11 ;; This file is part of GNU Emacs.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
12
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
13 ;; GNU Emacs is free software; you can redistribute it and/or modify
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
14 ;; it under the terms of the GNU General Public License as published by
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
15 ;; the Free Software Foundation; either version 2, or (at your option)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
16 ;; any later version.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
17
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
18 ;; GNU Emacs is distributed in the hope that it will be useful,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
21 ;; GNU General Public License for more details.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
22
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
23 ;; You should have received a copy of the GNU General Public License
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
24 ;; along with GNU Emacs; see the file COPYING. If not, write to
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
25 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
26
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;;; Commentary:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
29 ;;; Loading this package implements a more fine-grained minibuffer
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
30 ;;; completion feedback scheme. Prospective completions are concisely
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
31 ;;; indicated within the minibuffer itself, with each successive
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
32 ;;; keystroke.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
33
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
34 ;;; See 'icomplete-completions' docstring for a description of the
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
35 ;;; icomplete display format.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
36
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
37 ;;; See the `icomplete-minibuffer-setup-hook' docstring for a means to
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
38 ;;; customize icomplete setup for interoperation with other
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
39 ;;; minibuffer-oriented packages.
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
40
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
41 ;;; To activate icomplete mode, simply load the package. You can
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
42 ;;; subsequently deactivate it by invoking the function icomplete-mode
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
43 ;;; with a negative prefix-arg (C-U -1 ESC-x icomplete-mode). Also,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
44 ;;; you can prevent activation of the mode during package load by
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
45 ;;; first setting the variable `icomplete-mode' to nil. Icompletion
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
46 ;;; can be enabled any time after the package is loaded by invoking
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
47 ;;; icomplete-mode without a prefix arg.
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
48
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
49 ;;; This version of icomplete runs on Emacs 19.18 and later. (It
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
50 ;;; depends on the incorporation of minibuffer-setup-hook.) The elisp
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
51 ;;; archives, ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
52 ;;; probably still has a version that works in GNU Emacs v18.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
53
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
54 ;;; Thanks to everyone for their suggestions for refinements of this
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
55 ;;; package. I particularly have to credit Michael Cook, who
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
56 ;;; implemented an incremental completion style in his 'iswitch'
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
57 ;;; functions that served as a model for icomplete. Some other
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
58 ;;; contributors: Noah Freidman (restructuring as minor mode), Colin
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
59 ;;; Rafferty (lemacs reconciliation), Lars Lindberg, RMS, and
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
60 ;;; others.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
61
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
62 ;;; klm.
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
63
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
64 ;;; Code:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
65
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
66 ;;;_* Provide
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
67 (provide 'icomplete)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
68
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
69 ;;;_* User Customization variables
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
70
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
71 ;;;_* Initialization
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
72 ;;;_ = icomplete-minibuffer-setup-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
73 (defvar icomplete-minibuffer-setup-hook nil
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
74 "*Icomplete-specific customization of minibuffer setup.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
75
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
76 This hook is run during minibuffer setup iff icomplete will be active.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
77 It is intended for use in customizing icomplete for interoperation
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
78 with other packages. For instance:
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
79
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
80 \(add-hook 'icomplete-minibuffer-setup-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
81 \(function
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
82 \(lambda ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
83 \(make-local-variable 'resize-minibuffer-window-max-height)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
84 \(setq resize-minibuffer-window-max-height 3))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
85
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
86 will constrain rsz-mini to a maximum minibuffer height of 3 lines when
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
87 icompletion is occurring.")
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
88
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
89 ;;;_ + Internal Variables
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
90 ;;;_ = icomplete-mode
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
91 (defvar icomplete-mode t
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
92 "Non-nil enables incremental minibuffer completion, once
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
93 `\\[icomplete-mode]' function has set things up.")
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
94 ;;;_ = icomplete-eoinput 1
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
95 (defvar icomplete-eoinput 1
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
96 "Point where minibuffer input ends and completion info begins.")
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
97 (make-variable-buffer-local 'icomplete-eoinput)
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
98 ;;;_ = icomplete-pre-command-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
99 (defvar icomplete-pre-command-hook nil
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
100 "Incremental-minibuffer-completion pre-command-hook.
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
101
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
102 Is run in minibuffer before user input when `icomplete-mode' is non-nil.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
103 Use `icomplete-mode' function to set it up properly for incremental
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
104 minibuffer completion.")
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
105 (add-hook 'icomplete-pre-command-hook 'icomplete-tidy)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
106 ;;;_ = icomplete-post-command-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
107 (defvar icomplete-post-command-hook nil
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
108 "Incremental-minibuffer-completion post-command-hook.
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
110 Is run in minibuffer after user input when `icomplete-mode' is non-nil.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
111 Use `icomplete-mode' function to set it up properly for incremental
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
112 minibuffer completion.")
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
113 (add-hook 'icomplete-post-command-hook 'icomplete-exhibit)
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
114
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
115 ;;;_ > icomplete-mode (&optional prefix)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
116 ;;;###autoload
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
117 (defun icomplete-mode (&optional prefix)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
118 "Activate incremental minibuffer completion for this emacs session,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
119 or deactivate with negative prefix arg."
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
120 (interactive "p")
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
121 (or prefix (setq prefix 0))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
122 (cond ((>= prefix 0)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
123 (setq icomplete-mode t)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
124 ;; The following is not really necessary after first time -
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
125 ;; no great loss.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
126 (add-hook 'minibuffer-setup-hook 'icomplete-minibuffer-setup))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
127 (t (setq icomplete-mode nil))))
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
128
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
129 ;;;_ > icomplete-simple-completing-p ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
130 (defun icomplete-simple-completing-p ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
131
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
132 "Non-nil if current window is minibuffer that's doing simple completion.
8434
36da3d480ccd (icomplete-prime-minibuffer): Copy the hook lists after making them local.
Richard M. Stallman <rms@gnu.org>
parents: 5375
diff changeset
133
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
134 Conditions are:
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
135 the selected window is a minibuffer,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
136 and not in the middle of macro execution,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
137 and minibuffer-completion-table is not a symbol (which would
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
138 indicate some non-standard, non-simple completion mechansm,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
139 like file-name and other custom-func completions)."
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
140
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
141 (and (window-minibuffer-p (selected-window))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
142 (not executing-macro)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
143 (not (symbolp minibuffer-completion-table))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
144 ;;;_ > icomplete-minibuffer-setup ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
145 ;;;###autoload
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
146 (defun icomplete-minibuffer-setup ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
147
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
148 "Run in minibuffer on activation to establish incremental completion.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
149
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
150 Usually run by inclusion in minibuffer-setup-hook."
8434
36da3d480ccd (icomplete-prime-minibuffer): Copy the hook lists after making them local.
Richard M. Stallman <rms@gnu.org>
parents: 5375
diff changeset
151
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
152 (cond ((and icomplete-mode (icomplete-simple-completing-p))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
153 (make-local-variable 'pre-command-hook)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
154 (setq pre-command-hook (copy-sequence pre-command-hook))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
155 (add-hook 'pre-command-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
156 (function (lambda ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
157 (run-hooks 'icomplete-pre-command-hook))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
158 (make-local-variable 'post-command-hook)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
159 (setq post-command-hook (copy-sequence post-command-hook))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
160 (add-hook 'post-command-hook
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
161 (function (lambda ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
162 (run-hooks 'icomplete-post-command-hook))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
163 (run-hooks 'icomplete-minibuffer-setup-hook))))
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
165 ;;;_* Completion
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
166
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
167 ;;;_ > icomplete-tidy ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
168 (defun icomplete-tidy ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
169 "Remove completions display \(if any) prior to new user input.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
170
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
171 Should be run in on the minibuffer pre-command-hook. See `icomplete-mode'
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
172 and `minibuffer-setup-hook'."
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
173 (if (icomplete-simple-completing-p)
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 (if (and (boundp 'icomplete-eoinput)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 icomplete-eoinput)
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
176
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177 (if (> icomplete-eoinput (point-max))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 ;; Oops, got rug pulled out from under us - reinit:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 (setq icomplete-eoinput (point-max))
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
180 (let ((buffer-undo-list buffer-undo-list )) ; prevent entry
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
181 (delete-region icomplete-eoinput (point-max))))
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
182
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
183 ;; Reestablish the local variable 'cause minibuffer-setup is weird:
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
184 (make-local-variable 'icomplete-eoinput)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
185 (setq icomplete-eoinput 1))))
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
186 ;;;_ > icomplete-exhibit ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
187 (defun icomplete-exhibit ()
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
188 "Insert icomplete completions display.
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
189
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
190 Should be run via minibuffer post-command-hook. See `icomplete-mode'
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
191 and `minibuffer-setup-hook'."
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
192 (if (icomplete-simple-completing-p)
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193 (let ((contents (buffer-substring (point-min)(point-max)))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 (buffer-undo-list t))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 (save-excursion
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196 (goto-char (point-max))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
197 ; Register the end of input, so we
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
198 ; know where the extra stuff
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
199 ; (match-status info) begins:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
200 (if (not (boundp 'icomplete-eoinput))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
201 ;; In case it got wiped out by major mode business:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
202 (make-local-variable 'icomplete-eoinput))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
203 (setq icomplete-eoinput (point))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
204 ; Insert the match-status information:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
205 (if (> (point-max) 1)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
206 (insert-string
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
207 (icomplete-completions contents
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
208 minibuffer-completion-table
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
209 minibuffer-completion-predicate
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
210 (not
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
211 minibuffer-completion-confirm))))))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
212 ;;;_ > icomplete-completions (name candidates predicate require-match)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
213 (defun icomplete-completions (name candidates predicate require-match)
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
214 "Identify prospective candidates for minibuffer completion.
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
215
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
216 The display is updated with each minibuffer keystroke during
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
217 minibuffer completion.
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
218
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
219 Prospective completion suffixes (if any) are displayed, bracketed by
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
220 one of \(), \[], or \{} pairs. The choice of brackets is as follows:
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
221
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
222 \(...) - a single prospect is identified and matching is enforced,
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
223 \[...] - a single prospect is identified but matching is optional, or
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
224 \{...} - multiple prospects, separated by commas, are indicated, and
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
225 further input is required to distingish a single one.
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
226
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
227 The displays for disambiguous matches have \" [Matched]\" appended
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
228 \(whether complete or not), or \" \[No matches]\", if no eligible
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
229 matches exist."
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
230
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
231 (let ((comps (all-completions name candidates predicate))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
232 ; "-determined" - only one candidate
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
233 (open-bracket-determined (if require-match "(" "["))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
234 (close-bracket-determined (if require-match ")" "]"))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
235 ;"-prospects" - more than one candidate
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
236 (open-bracket-prospects "{")
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
237 (close-bracket-prospects "}")
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
238 )
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
239 (cond ((null comps) (format " %sNo matches%s"
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
240 open-bracket-determined
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
241 close-bracket-determined))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
242 ((null (cdr comps)) ;one match
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
243 (concat (if (and (> (length (car comps))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
244 (length name)))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
245 (concat open-bracket-determined
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
246 (substring (car comps) (length name))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
247 close-bracket-determined)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
248 "")
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
249 " [Matched]"))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
250 (t ;multiple matches
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
251 (let* ((most (try-completion name candidates predicate))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
252 (most-len (length most))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
253 most-is-exact
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
254 (alternatives
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
255 (apply
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
256 (function concat)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
257 (cdr (apply
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
258 (function nconc)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
259 (mapcar '(lambda (com)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
260 (if (= (length com) most-len)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
261 ;; Most is one exact match,
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
262 ;; note that and leave out
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
263 ;; for later indication:
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
264 (progn
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
265 (setq most-is-exact t)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
266 ())
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
267 (list ","
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
268 (substring com
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
269 most-len))))
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
270 comps))))))
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
271 (concat (and (> most-len (length name))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
272 (concat open-bracket-determined
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
273 (substring most (length name))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
274 close-bracket-determined))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
275 open-bracket-prospects
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
276 (if most-is-exact
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
277 (concat "," alternatives)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
278 alternatives)
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
279 close-bracket-prospects))))))
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
280
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
281 ;;;_ + Initialization
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
282 ;;; If user hasn't setq-default icomplete-mode to nil, then setup for
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
283 ;;; activation:
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
284 (if icomplete-mode
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
285 (icomplete-mode))
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
286
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
287
8871
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
288 ;;;_* Local emacs vars.
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
289 ;;;Local variables:
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
290 ;;;outline-layout: (-2 :)
299cfe0a6069 Major rewrite to behave more like a minor mode.
Richard M. Stallman <rms@gnu.org>
parents: 8434
diff changeset
291 ;;;End:
5147
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
292
54b3438dfc7f Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
293 ;;; icomplete.el ends here
5375
0e30cf7aa525 (icomplete-pre-command-hook): Reconciled with keyboard macro operation.
Richard M. Stallman <rms@gnu.org>
parents: 5147
diff changeset
294