aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-08-03 04:36:52 +0000
committerRichard M. Stallman1993-08-03 04:36:52 +0000
commit1add72b5dffd1eb76ffbf1c34d4a5dd76c91f1bd (patch)
tree490e434d9ac477b80789c58813c2eba104c8295f
parent2f1895276fad9b6d979c6cba955b7eaa80020413 (diff)
downloademacs-1add72b5dffd1eb76ffbf1c34d4a5dd76c91f1bd.tar.gz
emacs-1add72b5dffd1eb76ffbf1c34d4a5dd76c91f1bd.zip
(completion-version): New variable.
(save-completions-to-file): Use completion-version.
-rw-r--r--lisp/completion.el84
1 files changed, 26 insertions, 58 deletions
diff --git a/lisp/completion.el b/lisp/completion.el
index ae4c0a36257..682052a4b46 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -1,70 +1,33 @@
1;;; completion.el --- dynamic word-completion code 1;;; completion.el --- dynamic word-completion code
2;; Copyright (C) 1990, 1993 Free Software Foundation, Inc.
2 3
3;; Maintainer: FSF 4;; Maintainer: FSF
4;; Keywords: abbrev 5;; Keywords: abbrev
6;; Author: Jim Salem <salem@think.com> and Brewster Kahle <brewster@think.com>
7;; of Thinking Machines Inc.
5 8
6;;; Commentary: 9;; This file is part of GNU Emacs.
7 10
8;;; This is a Completion system for GNU Emacs 11;; GNU Emacs is free software; you can redistribute it and/or modify
9;;; 12;; it under the terms of the GNU General Public License as published by
10;;; E-Mail: 13;; the Free Software Foundation; either version 2, or (at your option)
11;;; Internet: completion@think.com, bug-completion@think.com 14;; any later version.
12;;; UUCP: {rutgers,harvard,mit-eddie}!think!completion 15
13;;; 16;; GNU Emacs is distributed in the hope that it will be useful,
14;;; If you are a new user, we'd appreciate knowing your site name and 17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; any comments you have. 18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; 19;; GNU General Public License for more details.
17;;; 20
18;;; NO WARRANTY 21;; You should have received a copy of the GNU General Public License
19;;; 22;; along with GNU Emacs; see the file COPYING. If not, write to
20;;; This software is distributed free of charge and is in the public domain. 23;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
21;;; Anyone may use, duplicate or modify this program. Thinking Machines 24
22;;; Corporation does not restrict in any way the use of this software by 25;;; Commentary:
23;;; anyone.
24;;;
25;;; Thinking Machines Corporation provides absolutely no warranty of any kind.
26;;; The entire risk as to the quality and performance of this program is with
27;;; you. In no event will Thinking Machines Corporation be liable to you for
28;;; damages, including any lost profits, lost monies, or other special,
29;;; incidental or consequential damages arising out of the use of this program.
30;;;
31;;; You must not restrict the distribution of this software.
32;;;
33;;; Please keep this notice and author information in any copies you make.
34;;;
35;;; 4/90
36;;;
37;;;
38;;; Advertisement
39;;;---------------
40;;; Try using this. If you are like most you will be happy you did.
41;;; 26;;;
42;;; What to put in .emacs 27;;; What to put in .emacs
43;;;----------------------- 28;;;-----------------------
44;;; (load "completion") ;; If it's not part of the standard band. 29;;; (load "completion")
45;;; (initialize-completions) 30;;; (initialize-completions)
46;;;
47;;; For best results, be sure to byte-compile the file first.
48;;;
49
50;;; Authors
51;;;---------
52;;; Jim Salem {salem@think.com}
53;;; Brewster Kahle {brewster@think.com}
54;;; Thinking Machines Corporation
55;;; 245 First St., Cambridge MA 02142 (617) 876-1111
56;;;
57;;; Mailing Lists
58;;;---------------
59;;;
60;;; Bugs to bug-completion@think.com
61;;; Comments to completion@think.com
62;;; Requests to be added completion-request@think.com
63;;;
64;;; Availability
65;;;--------------
66;;; Anonymous FTP from think.com
67;;;
68 31
69;;;--------------------------------------------------------------------------- 32;;;---------------------------------------------------------------------------
70;;; Documentation [Slightly out of date] 33;;; Documentation [Slightly out of date]
@@ -2220,6 +2183,11 @@ Prefix args ::
2220 )) 2183 ))
2221 )) 2184 ))
2222 2185
2186;; There is no point bothering to change this again
2187;; unless the package changes so much that it matters
2188;; for people that have saved completions.
2189(defconst completion-version "11")
2190
2223(defconst saved-cmpl-file-header 2191(defconst saved-cmpl-file-header
2224 ";;; Completion Initialization file. 2192 ";;; Completion Initialization file.
2225;;; Version = %s 2193;;; Version = %s
@@ -2270,7 +2238,7 @@ If file name is not specified, use `save-completions-file-name'."
2270 (clear-visited-file-modtime) 2238 (clear-visited-file-modtime)
2271 (erase-buffer) 2239 (erase-buffer)
2272 ;; (/ 1 0) 2240 ;; (/ 1 0)
2273 (insert (format saved-cmpl-file-header *completion-version*)) 2241 (insert (format saved-cmpl-file-header completion-version))
2274 (dolist (completion (list-all-completions)) 2242 (dolist (completion (list-all-completions))
2275 (setq total-in-db (1+ total-in-db)) 2243 (setq total-in-db (1+ total-in-db))
2276 (setq last-use-time (completion-last-use-time completion)) 2244 (setq last-use-time (completion-last-use-time completion))