From: yamaoka Date: Thu, 31 Jan 2002 02:13:11 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-01-quimby~90 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f3cf1402d1aefa4a93e11346af929069124e72b;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 93967f9..3bcc869 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,19 @@ 2002-01-30 ShengHuo ZHU + * 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 + * message.el (message-cite-prefix-regexp): Use text-mode-syntax-table. (message-mode-syntax-table): Move back the previous position. diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index ff878d0..9051842 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -140,6 +140,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) @@ -746,7 +758,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))))) @@ -1286,18 +1299,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 diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index e4e7bd7..c0ac3f2 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -2198,6 +2198,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))) diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el index 21a845e..5f7c3e2 100644 --- a/lisp/gnus-msg.el +++ b/lisp/gnus-msg.el @@ -192,6 +192,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" "nntp.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 @@ -1447,10 +1466,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" "nntp.el" "message.el")) + (let ((files gnus-debug-files) (point (point)) file expr olist sym) (gnus-message 4 "Please wait while we snoop your variables...") @@ -1472,6 +1488,7 @@ The source file has to be in the Emacs load path." (ignore-errors (and (memq (car expr) '(defvar defcustom defvoo)) (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))))) diff --git a/lisp/gnus-range.el b/lisp/gnus-range.el index 14cc416..5dc271a 100644 --- a/lisp/gnus-range.el +++ b/lisp/gnus-range.el @@ -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."