From de96e774c0f7d20003005fa8a953ae40e74ebb96 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 17 Dec 1998 05:06:57 +0000 Subject: [PATCH] * (gnus-read-newsrc-el-file): Don't load newsrc file if it does not exist. --- lisp/gnus-start.el | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 9687132..eaa9ff1 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1920,19 +1920,20 @@ If FORCE is non-nil, the .newsrc file is read." (let ((ding-file (concat file "d"))) ;; We always, always read the .eld file. (gnus-message 5 "Reading %s..." ding-file) - (let (gnus-newsrc-assoc) - (condition-case nil - (with-temp-buffer - (insert-file-contents-as-coding-system - gnus-startup-file-coding-system ding-file) - (eval-region (point-min) (point-max))) - (error - (ding) - (unless (gnus-yes-or-no-p - (format "Error in %s; continue? " ding-file)) - (error "Error in %s" ding-file)))) - (when gnus-newsrc-assoc - (setq gnus-newsrc-alist gnus-newsrc-assoc))) + (when (file-exists-p ding-file) + (let (gnus-newsrc-assoc) + (condition-case nil + (with-temp-buffer + (insert-file-contents-as-coding-system + gnus-startup-file-coding-system ding-file) + (eval-region (point-min) (point-max))) + (error + (ding) + (unless (gnus-yes-or-no-p + (format "Error in %s; continue? " ding-file)) + (error "Error in %s" ding-file)))) + (when gnus-newsrc-assoc + (setq gnus-newsrc-alist gnus-newsrc-assoc)))) (gnus-make-hashtable-from-newsrc-alist) (when (file-newer-than-file-p file ding-file) ;; Old format quick file -- 1.7.10.4