From 2f20c969887a0fdb8f76868b9c136dd780113f67 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Thu, 17 Dec 1998 05:06:17 +0000 Subject: [PATCH] * (gnus-read-newsrc-el-file): Don't load newsrc file if it does not exist. --- lisp/gnus-start.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 377e264..8f40179 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -1915,17 +1915,18 @@ 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 (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) -- 1.7.10.4