summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Steingold <sds@goems.com>2000-07-05 18:24:07 +0000
committerSam Steingold <sds@goems.com>2000-07-05 18:24:07 +0000
commit6af6f4a43c4b59d7fc74c87f5d2d9c95a8984895 (patch)
treec160899c200e8b9fa2e9b34dfba3685db86eea14
parent49fee49d2b08025137d0d99d96b5430d2bd4d88c (diff)
(parse-bbdb-internal): bind, not setq the version.
-rw-r--r--ChangeLog12
-rw-r--r--lisp/bbdb.el71
2 files changed, 46 insertions, 37 deletions
diff --git a/ChangeLog b/ChangeLog
index 125d410..8cea43f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-07-05 Sam Steingold <sds@gnu.org>
+
+ * lisp/bbdb.el (parse-bbdb-internal): bind, not setq the version.
+
2000-07-03 Jochen Küpper <Jochen@Jochen-Kuepper.de>
* texinfo/bbdb.texinfo: Various little changes, including ml info,
@@ -5,6 +9,12 @@
Added info-directory information.
Added detailed node list.
+2000-06-30 Sam Steingold <sds@gnu.org>
+
+ * bbdb-migrate.el (bbdb-migrate):
+ re-wrote using `mapcar' instead of `append'
+ this is linear instead of quadratic and avoids much consing
+
2000-06-30 Jochen Küpper <Jochen@Jochen-Kuepper.de>
* lisp/Makefile: Add everything to build bbdb-merge.elc.
@@ -83,7 +93,7 @@
* lisp/bbdb-merge.el:
Refined so it works a little better, particularly with merging
- timestamps
+ timestamps
Added bbdb-merge-file, so you can now import another bbdb and
merge it.
diff --git a/lisp/bbdb.el b/lisp/bbdb.el
index 98a451e..bc293a7 100644
--- a/lisp/bbdb.el
+++ b/lisp/bbdb.el
@@ -1712,42 +1712,41 @@ optional arg DONT-CHECK-DISK is non-nil (which is faster, but hazardous.)"
(read (point-marker)))))))
;; look backwards for file version, and convert if necessary.
;; (at least, I'll write this code if I ever change the file format again...)
- (let (v)
- (save-excursion
- (if (re-search-backward
- "^;+[ \t]*file-version:[ \t]*\\([0-9]+\\)[ \t]*$" nil t)
- (setq v (car (read-from-string
- (buffer-substring
- (match-beginning 1) (match-end 1)))))))
- (if (null v) ; current version, but no file-version: line. Bootstrap it.
- (let ((modp (buffer-modified-p)))
- ;; This should never happen (not any more, anyway...)
- (bbdb-debug (error "bbdb corrupted: no file-version line"))
- (setq v 2)
- (save-excursion
- (if (re-search-backward "^;" nil t)
- (forward-line 1)
- (goto-char 1))
- ;; remember, this goes before the begin-marker of the first
- ;; record in the database!
- (insert-before-markers (format ";;; file-version: %d\n"
- bbdb-file-format)))
- (set-buffer-modified-p modp)))
- (cond ((< v bbdb-file-format)
- (if bbdb-file-format-migration
- ;; Sanity checking.
- (if (/= (car bbdb-file-format-migration) v)
- (error
- (format "BBDB file format has changed on disk from %d to %d!"
- (car bbdb-file-format-migration) v)))
- (setq bbdb-file-format-migration
- (cons v (bbdb-migration-query v)))))
- ((> v bbdb-file-format)
- (error "BBDB version %s doesn't understand file format version %s."
- bbdb-version v))
- (t
- (setq bbdb-file-format-migration (cons bbdb-file-format
- bbdb-file-format)))))
+ (let ((v (save-excursion
+ (if (re-search-backward
+ "^;+[ \t]*file-version:[ \t]*\\([0-9]+\\)[ \t]*$" nil t)
+ (car (read-from-string
+ (buffer-substring
+ (match-beginning 1) (match-end 1))))))))
+ (if (null v) ; current version, but no file-version: line. Bootstrap it.
+ (let ((modp (buffer-modified-p)))
+ ;; This should never happen (not any more, anyway...)
+ (bbdb-debug (error "bbdb corrupted: no file-version line"))
+ (setq v 2)
+ (save-excursion
+ (if (re-search-backward "^;" nil t)
+ (forward-line 1)
+ (goto-char 1))
+ ;; remember, this goes before the begin-marker of the first
+ ;; record in the database!
+ (insert-before-markers (format ";;; file-version: %d\n"
+ bbdb-file-format)))
+ (set-buffer-modified-p modp)))
+ (cond ((< v bbdb-file-format)
+ (if bbdb-file-format-migration
+ ;; Sanity checking.
+ (if (/= (car bbdb-file-format-migration) v)
+ (error
+ (format
+ "BBDB file format has changed on disk from %d to %d!"
+ (car bbdb-file-format-migration) v)))
+ (setq bbdb-file-format-migration
+ (cons v (bbdb-migration-query v)))))
+ ((> v bbdb-file-format)
+ (error "BBDB version %s doesn't understand file format version %s."
+ bbdb-version v))
+ (t (setq bbdb-file-format-migration (cons bbdb-file-format
+ bbdb-file-format)))))
;; A trap to catch a bug
;;(assert (not (null (car bbdb-file-format-migration))))