X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-start.el;h=123793676428a58132224c3f9946f71a73c9180f;hb=53c586a2cd0c1272745f6082e39eb9a03669d10b;hp=d9553532a75eb728134206ca0306f046260e3023;hpb=baa7cb7f6c13f0609cb29ebefcff7a8fbd0d15e3;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index d955353..1237936 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -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)) @@ -2530,8 +2535,8 @@ If FORCE is non-nil, the .newsrc file is read." enable-multibyte-characters (fboundp 'gnus-mule-get-coding-system) (gnus-mule-get-coding-system (symbol-name group))))) - (when coding - (setq str (mm-decode-coding-string str (car coding)))) + (if coding + (setq str (gnus-decode-coding-string str (car coding)))) (set group str))) (forward-line 1)))) (gnus-message 5 "Reading descriptions file...done")