(elmo-passwd-alist-load): Move point to min
authorhmurata <hmurata>
Tue, 30 May 2006 13:18:19 +0000 (13:18 +0000)
committerhmurata <hmurata>
Tue, 30 May 2006 13:18:19 +0000 (13:18 +0000)
position before read.

elmo/ChangeLog
elmo/elmo-util.el

index fa29191..8bd50d9 100644 (file)
@@ -1,3 +1,8 @@
+2006-05-30  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-util.el (elmo-passwd-alist-load): Move point to min
+       position before read.
+
 2006-05-15  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * elmo-flag.el (elmo-folder-expand-msgdb-path): Translate path.
index feecd12..2202faf 100644 (file)
@@ -530,18 +530,17 @@ Return value is a cons cell of (STRUCTURE . REST)"
 (defvar elmo-passwd-alist nil)
 
 (defun elmo-passwd-alist-load ()
-  (with-temp-buffer
-    (let ((filename (expand-file-name elmo-passwd-alist-file-name
-                                     elmo-msgdb-directory))
-         insert-file-contents-pre-hook ; To avoid autoconv-xmas...
-         insert-file-contents-post-hook
-         ret-val)
-      (if (not (file-readable-p filename))
-         ()
-       (insert-file-contents filename)
-       (condition-case nil
-           (read (current-buffer))
-         (error nil nil))))))
+  (let ((filename (expand-file-name elmo-passwd-alist-file-name
+                                   elmo-msgdb-directory)))
+    (if (not (file-readable-p filename))
+       ()
+      (with-temp-buffer
+       (let (insert-file-contents-pre-hook ; To avoid autoconv-xmas...
+             insert-file-contents-post-hook)
+         (insert-file-contents filename)
+         (goto-char (point-min))
+         (ignore-errors
+          (read (current-buffer))))))))
 
 (defun elmo-passwd-alist-clear ()
   "Clear password cache."