This commit was generated by cvs2svn to compensate for changes in r7438,
[elisp/gnus.git-] / lisp / gnus-start.el
index bcb7fa3..1237936 100644 (file)
@@ -254,8 +254,6 @@ for your decision; `gnus-subscribe-killed' kills all new groups;
                (function-item gnus-subscribe-zombies)
                function))
 
-;; Suggested by a bug report by Hallvard B Furuseth.
-;; <h.b.furuseth@usit.uio.no>.
 (defcustom gnus-subscribe-options-newsgroup-method
   'gnus-subscribe-alphabetically
   "*This function is called to subscribe newsgroups mentioned on \"options -n\" lines.
@@ -388,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
@@ -429,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)))))))))
 
@@ -715,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 ()
@@ -1054,13 +1052,13 @@ for new groups, and subscribe the new groups as zombies."
     ;; Go through both primary and secondary select methods and
     ;; request new newsgroups.
     (while (setq method (gnus-server-get-method nil (pop methods)))
-      (setq new-newsgroups nil)
-      (setq gnus-override-subscribe-method method)
+      (setq new-newsgroups nil
+           gnus-override-subscribe-method method)
       (when (and (gnus-check-server method)
                 (gnus-request-newgroups date method))
        (save-excursion
-         (setq got-new t)
-         (setq hashtb (gnus-make-hashtable 100))
+         (setq got-new t
+               hashtb (gnus-make-hashtable 100))
          (set-buffer nntp-server-buffer)
          ;; Enter all the new groups into a hashtable.
          (gnus-active-to-gnus-format method hashtb 'ignore))
@@ -1139,7 +1137,9 @@ for new groups, and subscribe the new groups as zombies."
            (gnus-group-change-level
             (car groups) gnus-level-default-subscribed gnus-level-killed))
          (setq groups (cdr groups)))
-       (gnus-group-make-help-group)
+       (save-excursion
+         (set-buffer gnus-group-buffer)
+         (gnus-group-make-help-group))
        (when gnus-novice-user
          (gnus-message 7 "`A k' to list killed groups"))))))
 
@@ -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,7 +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)
-         (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))
@@ -2389,6 +2395,13 @@ If FORCE is non-nil, the .newsrc file is read."
 ;;; Slave functions.
 ;;;
 
+(defvar gnus-slave-mode nil)
+
+(defun gnus-slave-mode ()
+  "Minor mode for slave Gnusae."
+  (gnus-add-minor-mode 'gnus-slave-mode " Slave" (make-sparse-keymap))
+  (gnus-run-hooks 'gnus-slave-mode-hook))
+
 (defun gnus-slave-save-newsrc ()
   (save-excursion
     (set-buffer gnus-dribble-buffer)