* gnus-group.el (gnus-group-delete-group): Nix the entry in
authorShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 31 Jan 2002 00:23:27 +0000 (00:23 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 31 Jan 2002 00:23:27 +0000 (00:23 +0000)
gnus-cache-active-hashtb.

* gnus-agent.el (gnus-agent-mark-unread-afer-downloaded): New variable.
(gnus-agent-summary-fetch-group): Use it.

* gnus-msg.el (gnus-debug-files): New variable.
(gnus-debug-exclude-variables): New variable.
(gnus-debug): Use them.

* gnus-range.el (gnus-range-length): Don't use gnus-uncompress-range.

lisp/ChangeLog
lisp/gnus-agent.el
lisp/gnus-group.el
lisp/gnus-msg.el
lisp/gnus-range.el

index 324a680..b63e08f 100644 (file)
@@ -1,3 +1,17 @@
+2002-01-30  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * gnus-group.el (gnus-group-delete-group): Nix the entry in
+       gnus-cache-active-hashtb.
+
+       * gnus-agent.el (gnus-agent-mark-unread-afer-downloaded): New variable.
+       (gnus-agent-summary-fetch-group): Use it.
+
+       * gnus-msg.el (gnus-debug-files): New variable.
+       (gnus-debug-exclude-variables): New variable.
+       (gnus-debug): Use them.
+
+       * gnus-range.el (gnus-range-length): Don't use gnus-uncompress-range.
+
 2002-01-30  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * message.el (message-cite-prefix-regexp): Use text-mode-syntax-table.
index 822e41b..11c9495 100644 (file)
@@ -128,6 +128,18 @@ If this is `ask' the hook will query the user."
                 (const :tag "Ask" ask))
   :group 'gnus-agent)
 
+(defcustom gnus-agent-mark-unread-after-downloaded t
+  "Indicate whether to mark articles unread after downloaded."
+  :version "21.1"
+  :type 'boolean
+  :group 'gnus-agent)
+
+(defcustom gnus-agent-download-marks '(download)
+  "Marks for downloading."
+  :version "21.1"
+  :type '(repeat (symbol :tag "Mark"))
+  :group 'gnus-agent)
+
 ;;; Internal variables
 
 (defvar gnus-agent-history-buffers nil)
@@ -732,7 +744,8 @@ the actual number of articles toggled is returned."
            (dolist (article articles)
              (setq gnus-newsgroup-downloadable
                    (delq article gnus-newsgroup-downloadable))
-             (gnus-summary-mark-article article gnus-unread-mark))))
+             (if gnus-agent-mark-unread-after-downloaded
+                 (gnus-summary-mark-article article gnus-unread-mark)))))
       (when (and (not state)
                 gnus-plugged)
        (gnus-agent-toggle-plugged nil)))))
@@ -1271,18 +1284,20 @@ the actual number of articles toggled is returned."
       (when arts
        (gnus-agent-fetch-articles group arts)))
     ;; Perhaps we have some additional articles to fetch.
-    (setq arts (assq 'download (gnus-info-marks
-                               (setq info (gnus-get-info group)))))
-    (when (cdr arts)
-      (gnus-message 8 "Agent is downloading marked articles...")
-      (gnus-agent-fetch-articles
-       group (gnus-uncompress-range (cdr arts)))
-      (setq marks (delq arts (gnus-info-marks info)))
-      (gnus-info-set-marks info marks)
-      (gnus-dribble-enter
-       (concat "(gnus-group-set-info '"
-              (gnus-prin1-to-string info)
-              ")")))))
+    (dolist (mark gnus-agent-download-marks)
+      (setq arts (assq mark (gnus-info-marks
+                            (setq info (gnus-get-info group)))))
+      (when (cdr arts)
+       (gnus-message 8 "Agent is downloading marked articles...")
+       (gnus-agent-fetch-articles
+        group (gnus-uncompress-range (cdr arts)))
+       (when (eq mark 'download)
+         (setq marks (delq arts (gnus-info-marks info)))
+         (gnus-info-set-marks info marks)
+         (gnus-dribble-enter
+          (concat "(gnus-group-set-info '"
+                  (gnus-prin1-to-string info)
+                  ")")))))))
 
 ;;;
 ;;; Agent Category Mode
index 6d0d313..07c7497 100644 (file)
@@ -2186,6 +2186,9 @@ doing the deletion."
          (gnus-group-goto-group group)
          (gnus-group-kill-group 1 t)
          (gnus-sethash group nil gnus-active-hashtb)
+         (when gnus-cache-active-hashtb
+           (gnus-sethash group nil gnus-cache-active-hashtb)
+           (setq gnus-cache-active-altered t))
          t))
     (gnus-group-position-point)))
 
index 5e863eb..8b6b7ff 100644 (file)
@@ -185,6 +185,25 @@ use this option with care."
                                  (symbol :tag "Charset")))))
   :group 'gnus-charset)
 
+(defcustom gnus-debug-files
+  '("gnus.el" "gnus-sum.el" "gnus-group.el"
+    "gnus-art.el" "gnus-start.el" "gnus-async.el"
+    "gnus-msg.el" "gnus-score.el" "gnus-win.el" "gnus-topic.el"
+    "gnus-agent.el" "gnus-cache.el" "gnus-srvr.el"
+    "mm-util.el" "mm-decode.el" "nnmail.el" "message.el")
+  "Files whose variables will be reported in `gnus-bug'."
+  :version "21.1"
+  :group 'gnus-message
+  :type '(repeat (string :tag "File")))
+
+(defcustom gnus-debug-exclude-variables 
+  '(mm-mime-mule-charset-alist 
+    nnmail-split-fancy message-minibuffer-local-map)
+  "Variables that should not be reported in `gnus-bug'."
+  :version "21.1"
+  :group 'gnus-message
+  :type '(repeat (symbol :tab "Variable")))
+
 ;;; Internal variables.
 
 (defvar gnus-inhibit-posting-styles nil
@@ -1274,10 +1293,7 @@ If YANK is non-nil, include the original article."
   "Attempts to go through the Gnus source file and report what variables have been changed.
 The source file has to be in the Emacs load path."
   (interactive)
-  (let ((files '("gnus.el" "gnus-sum.el" "gnus-group.el"
-                "gnus-art.el" "gnus-start.el" "gnus-async.el"
-                "gnus-msg.el" "gnus-score.el" "gnus-win.el" "gnus-topic.el"
-                "nnmail.el" "message.el"))
+  (let ((files gnus-debug-files)
        (point (point))
        file expr olist sym)
     (gnus-message 4 "Please wait while we snoop your variables...")
@@ -1300,6 +1316,7 @@ The source file has to be in the Emacs load path."
                (and (or (eq (car expr) 'defvar)
                         (eq (car expr) 'defcustom))
                     (stringp (nth 3 expr))
+                    (not (memq (nth 1 expr) gnus-debug-exclude-variables))
                     (or (not (boundp (nth 1 expr)))
                         (not (equal (eval (nth 2 expr))
                                     (symbol-value (nth 1 expr)))))
index 14cc416..5dc271a 100644 (file)
@@ -460,7 +460,16 @@ LIST is a sorted list."
 
 (defun gnus-range-length (range)
   "Return the length RANGE would have if uncompressed."
-  (length (gnus-uncompress-range range)))
+  (cond
+   ((null range)
+    0)
+   ((not (listp (cdr range)))
+    (- (cdr range) (car range) -1))
+   (t
+    (let ((sum 0))
+      (dolist (x range sum)
+       (setq sum
+             (+ sum (if (consp x) (- (cdr x) (car x) -1) 1))))))))
 
 (defun gnus-sublist-p (list sublist)
   "Test whether all elements in SUBLIST are members of LIST."