From a92cd5b75b365f68f8da71d5c3e26ca09b1778ff Mon Sep 17 00:00:00 2001 From: hmurata Date: Tue, 30 May 2006 13:18:19 +0000 Subject: [PATCH] (elmo-passwd-alist-load): Move point to min position before read. --- elmo/ChangeLog | 5 +++++ elmo/elmo-util.el | 23 +++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index fa29191..8bd50d9 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-05-30 Hiroya Murata + + * elmo-util.el (elmo-passwd-alist-load): Move point to min + position before read. + 2006-05-15 Yoichi NAKAYAMA * elmo-flag.el (elmo-folder-expand-msgdb-path): Translate path. diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index feecd12..2202faf 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -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." -- 1.7.10.4