:type '(choice integer
(const :tag "none" nil)))
+(defcustom gnus-read-newsrc-file t
+ "*Non-nil means that Gnus will read the `.newsrc' file.
+Gnus always reads its own startup file, which is called
+\".newsrc.eld\". The file called \".newsrc\" is in a format that can
+be readily understood by other newsreaders. If you don't plan on
+using other newsreaders, set this variable to nil to save some time on
+entry."
+ :group 'gnus-newsrc
+ :type 'boolean)
+
(defcustom gnus-save-newsrc-file t
"*Non-nil means that Gnus will save the `.newsrc' file.
Gnus always saves its own startup file, which is called
:type 'boolean)
(defcustom gnus-ignored-newsgroups
- (purecopy (mapconcat 'identity
- '("^to\\." ; not "real" groups
- "^[0-9. \t]+ " ; all digits in name
- "[][\"#'()]" ; bogus characters
- )
- "\\|"))
+ (mapconcat 'identity
+ '("^to\\." ; not "real" groups
+ "^[0-9. \t]+ " ; all digits in name
+ "^[\"][]\"[#'()]" ; bogus characters
+ )
+ "\\|")
"*A regexp to match uninteresting newsgroups in the active file.
Any lines in the active file matching this regular expression are
removed from the newsgroup list before anything else is done to it,
alphabetic order; `gnus-subscribe-hierarchically' inserts new groups
in hierarchical newsgroup order; `gnus-subscribe-interactively' asks
for your decision; `gnus-subscribe-killed' kills all new groups;
-`gnus-subscribe-zombies' will make all new groups into zombies."
+`gnus-subscribe-zombies' will make all new groups into zombies;
+`gnus-subscribe-topics' will enter groups into the topics that
+claim them."
:group 'gnus-group-new
:type '(radio (function-item gnus-subscribe-randomly)
(function-item gnus-subscribe-alphabetically)
(function-item gnus-subscribe-interactively)
(function-item gnus-subscribe-killed)
(function-item gnus-subscribe-zombies)
+ (function-item gnus-subscribe-topics)
function))
(defcustom gnus-subscribe-options-newsgroup-method
(defcustom gnus-after-getting-new-news-hook
(when (gnus-boundp 'display-time-timer)
'(display-time-event-handler))
- "*A hook run after Gnus checks for new news."
+ "*A hook run after Gnus checks for new news when Gnus is already running."
:group 'gnus-group-new
:type 'hook)
:type 'hook)
(defcustom gnus-always-read-dribble-file nil
- "Uncoditionally read the dribble file."
+ "Unconditionally read the dribble file."
:group 'gnus-newsrc
:type 'boolean)
"Setup news information.
If RAWFILE is non-nil, the .newsrc file will also be read.
If LEVEL is non-nil, the news will be set up at level LEVEL."
+ (require 'nnmail)
(let ((init (not (and gnus-newsrc-alist gnus-active-hashtb (not rawfile))))
;; Binding this variable will inhibit multiple fetchings
;; of the same mail source.
(defun gnus-find-new-newsgroups (&optional arg)
"Search for new newsgroups and add them.
-Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method.'
+Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method'.
The `-n' option line from .newsrc is respected.
With 1 C-u, use the `ask-server' method to query the server for new
(when gnus-novice-user
(gnus-message 7 "`A k' to list killed groups"))))))
-(defun gnus-subscribe-group (group previous &optional method)
+
+(defun gnus-subscribe-group (group &optional previous method)
+ "Subcribe GROUP and put it after PREVIOUS."
(gnus-group-change-level
(if method
(list t group gnus-level-default-subscribed nil nil method)
group)
- gnus-level-default-subscribed gnus-level-killed previous t))
+ gnus-level-default-subscribed gnus-level-killed previous t)
+ t)
;; `gnus-group-change-level' is the fundamental function for changing
;; subscription levels of newsgroups. This might mean just changing
(insert ?\\))
;; Let the Gnus agent save the active file.
- (when (and gnus-agent real-active)
+ (when (and gnus-agent real-active gnus-plugged)
(gnus-agent-save-active method))
;; If these are groups from a foreign select method, we insert the
(let ((prefix (gnus-group-prefixed-name "" method)))
(goto-char (point-min))
(while (and (not (eobp))
- (progn (insert prefix)
- (zerop (forward-line 1)))))))
+ (progn
+ (when (= (following-char) ?\")
+ (forward-char 1))
+ (insert prefix)
+ (zerop (forward-line 1)))))))
;; Store the active file in a hash table.
(goto-char (point-min))
(let (group max min)
(while (not (eobp))
- (condition-case ()
+ (condition-case err
(progn
(narrow-to-region (point) (gnus-point-at-eol))
;; group gets set to a symbol interned in the hash table
;; (what a hack!!) - jwz
(setq group (let ((obarray hashtb)) (read cur)))
+ ;; ### The extended group name scheme makes
+ ;; the previous optimization strategy sort of pointless...
+ (when (stringp group)
+ (setq group (intern group hashtb)))
(if (and (numberp (setq max (read cur)))
(numberp (setq min (read cur)))
(progn
(gnus-sethash (symbol-name group) t
gnus-moderated-hashtb)))
(set group nil)))
- (error
+ (quit
(and group
(symbolp group)
(set group nil))
(gnus-group-prefixed-name "" method))))
;; Let the Gnus agent save the active file.
- (when (and gnus-agent real-active)
- (gnus-agent-save-groups method))
+ (if (and gnus-agent real-active gnus-plugged (gnus-agent-method-p method))
+ (progn
+ (gnus-agent-save-groups method)
+ (gnus-active-to-gnus-format method hashtb nil real-active))
- (goto-char (point-min))
- ;; We split this into to separate loops, one with the prefix
- ;; and one without to speed the reading up somewhat.
- (if prefix
- (let (min max opoint group)
+ (goto-char (point-min))
+ ;; We split this into to separate loops, one with the prefix
+ ;; and one without to speed the reading up somewhat.
+ (if prefix
+ (let (min max opoint group)
+ (while (not (eobp))
+ (condition-case ()
+ (progn
+ (read cur) (read cur)
+ (setq min (read cur)
+ max (read cur)
+ opoint (point))
+ (skip-chars-forward " \t")
+ (insert prefix)
+ (goto-char opoint)
+ (set (let ((obarray hashtb)) (read cur))
+ (cons min max)))
+ (error (and group (symbolp group) (set group nil))))
+ (forward-line 1)))
+ (let (min max group)
(while (not (eobp))
(condition-case ()
- (progn
+ (when (eq (char-after) ?2)
(read cur) (read cur)
(setq min (read cur)
- max (read cur)
- opoint (point))
- (skip-chars-forward " \t")
- (insert prefix)
- (goto-char opoint)
- (set (let ((obarray hashtb)) (read cur))
+ max (read cur))
+ (set (setq group (let ((obarray hashtb)) (read cur)))
(cons min max)))
(error (and group (symbolp group) (set group nil))))
- (forward-line 1)))
- (let (min max group)
- (while (not (eobp))
- (condition-case ()
- (when (eq (char-after) ?2)
- (read cur) (read cur)
- (setq min (read cur)
- max (read cur))
- (set (setq group (let ((obarray hashtb)) (read cur)))
- (cons min max)))
- (error (and group (symbolp group) (set group nil))))
- (forward-line 1))))))
+ (forward-line 1)))))))
(defun gnus-read-newsrc-file (&optional force)
"Read startup file.
;; file (ticked articles, killed groups, foreign methods, etc.)
(gnus-read-newsrc-el-file quick-file)
- (when (and (file-exists-p gnus-current-startup-file)
+ (when (and gnus-read-newsrc-file
+ (file-exists-p gnus-current-startup-file)
(or force
(and (file-newer-than-file-p newsrc-file quick-file)
(file-newer-than-file-p newsrc-file
(gnus-message 5 "Reading descriptions file via %s..." (car method))
(cond
+ ((null (gnus-get-function method 'request-list-newsgroups t))
+ t)
((not (gnus-check-server method))
(gnus-message 1 "Couldn't open server")
nil)
(let ((str (buffer-substring
(point) (progn (end-of-line) (point))))
(coding
- (and (boundp 'enable-multibyte-characters)
- enable-multibyte-characters
+ (and (or gnus-xemacs
+ (and (boundp 'enable-multibyte-characters)
+ enable-multibyte-characters))
(fboundp 'gnus-mule-get-coding-system)
(gnus-mule-get-coding-system (symbol-name group)))))
(when coding