This commit was generated by cvs2svn to compensate for changes in r2450,
[elisp/gnus.git-] / lisp / gnus-start.el
index 97ab9b8..1237936 100644 (file)
@@ -386,7 +386,7 @@ Can be used to turn version control on or off."
   :group 'gnus-newsrc
   :type 'boolean)
 
-(defvar gnus-startup-file-coding-system 'binary
+(defvar gnus-startup-file-coding-system 'ctext
   "*Coding system for startup file.")
 
 ;;; Internal variables
@@ -427,9 +427,7 @@ Can be used to turn version control on or off."
                   (file-exists-p (concat file ".el"))
                   (file-exists-p (concat file ".elc")))
               (condition-case var
-                  (let ((coding-system-for-read
-                         gnus-startup-file-coding-system))
-                    (load file nil t))
+                  (load file nil t)
                 (error
                  (error "Error in %s: %s" file var)))))))))
 
@@ -713,6 +711,8 @@ prompt the user for the name of an NNTP server to use."
          (gnus-group-first-unread-group)
          (gnus-configure-windows 'group)
          (gnus-group-set-mode-line)
+         ;; For reading Info.
+         (set-language-info "Japanese" 'gnus-info "gnus-ja")
          (gnus-run-hooks 'gnus-started-hook))))))
 
 (defun gnus-start-draft-setup ()
@@ -1916,14 +1916,17 @@ If FORCE is non-nil, the .newsrc file is read."
     ;; We always, always read the .eld file.
     (gnus-message 5 "Reading %s..." ding-file)
     (let (gnus-newsrc-assoc)
-      (condition-case nil
-         (let ((coding-system-for-read gnus-startup-file-coding-system))
-           (load ding-file t t t))
-       (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)
+       (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)
@@ -2279,8 +2282,10 @@ If FORCE is non-nil, the .newsrc file is read."
          (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file)
          (gnus-gnus-to-quick-newsrc-format)
          (gnus-run-hooks 'gnus-save-quick-newsrc-hook)
-         (let ((coding-system-for-write gnus-startup-file-coding-system))
-           (save-buffer))
+         (write-region-as-coding-system
+          gnus-startup-file-coding-system
+          (point-min) (point-max) (buffer-file-name))
+         (set-buffer-modified-p nil)
          (kill-buffer (current-buffer))
          (gnus-message
           5 "Saving %s.eld...done" gnus-current-startup-file))