*** empty log message ***
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 22:08:05 +0000 (22:08 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Tue, 4 Mar 1997 22:08:05 +0000 (22:08 +0000)
26 files changed:
lisp/ChangeLog
lisp/article.el
lisp/gnus-art.el
lisp/gnus-cache.el
lisp/gnus-cus.el
lisp/gnus-dup.el
lisp/gnus-group.el
lisp/gnus-load.el
lisp/gnus-nocem.el
lisp/gnus-salt.el
lisp/gnus-score.el
lisp/gnus-sum.el
lisp/gnus-undo.el
lisp/gnus-win.el
lisp/gnus-xmas.el
lisp/gnus.el
lisp/nneething.el
lisp/nnheader.el
lisp/nnmail.el
lisp/nnml.el
lisp/nnoo.el
lisp/nnsoup.el
lisp/nntp.el
lisp/nnvirtual.el
lisp/nnweb.el
texi/gnus.texi

index 290bc6f..caca174 100644 (file)
@@ -1,3 +1,39 @@
+Sun Sep  1 05:45:59 1996  Lars Magne Ingebrigtsen  <larsi@menja.ifi.uio.no>
+
+       * gnus.el: Removed unreferenced let bindings from all files. 
+
+Sun Sep  1 02:10:28 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no>
+
+       * gnus.el ((load)): Only do the initial splash on "gnus"
+       commands. 
+
+       * gnus-cus.el (gnus-face-dark-name-list): Don't use "dark blue".
+
+       * nntp.el (nntp-retrieve-headers): Would infloop sometimes.
+
+       * gnus-group.el (gnus-group-insert-group-line-info): Indent
+       properly. 
+
+       * gnus-sum.el (gnus-gather-threads-by-references): Avoid
+       infloops. 
+
+       * gnus-salt.el (gnus-mouse-pick): Changed name.
+
+       * nntp.el (nntp-retrieve-groups): Didn't do the right thing on
+       servers that don't support LIST ACTIVE.
+
+       * gnus-win.el (gnus-current-window-configuration): New variable.
+       (gnus-configure-windows): Use it.
+
+       * gnus-art.el (gnus-article-read-summary-keys): Let `C-d' work
+       properly. 
+
+       * gnus-sum.el (gnus-list-of-unread-articles): Active group.
+
+Sat Aug 31 05:05:14 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * gnus.el: Red Gnus v0.21 is released.
+
 Sat Aug 31 02:54:39 1996  Lars Magne Ingebrigtsen  <larsi@ylfing.ifi.uio.no>
 
        * gnus-topic.el (gnus-topic-goto-next-group): Go to the proper
index 680e80a..5e99033 100644 (file)
@@ -704,7 +704,6 @@ how much time has lapsed since DATE."
         (date (if (vectorp header) (mail-header-date header)
                 header))
         (date-regexp "^Date: \\|^X-Sent: ")
-        (now (current-time))
         (inhibit-point-motion-hooks t)
         bface eface)
     (when (and date (not (string= date "")))
index 8df6224..8f72f38 100644 (file)
@@ -491,7 +491,9 @@ If variable `gnus-use-long-file-name' is non-nil, it is
     "<" beginning-of-buffer
     ">" end-of-buffer
     "\C-c\C-i" gnus-info-find-node
-    "\C-c\C-b" gnus-bug)
+    "\C-c\C-b" gnus-bug
+
+    "\C-d" gnus-article-read-summary-keys)
 
   (substitute-key-definition
    'undefined 'gnus-article-read-summary-keys gnus-article-mode-map))
@@ -545,15 +547,14 @@ commands:
   (setq mode-name "Article")
   (setq major-mode 'gnus-article-mode)
   (make-local-variable 'minor-mode-alist)
-  (or (assq 'gnus-show-mime minor-mode-alist)
-      (setq minor-mode-alist
-           (cons (list 'gnus-show-mime " MIME") minor-mode-alist)))
+  (unless (assq 'gnus-show-mime minor-mode-alist)
+    (push (list 'gnus-show-mime " MIME") minor-mode-alist))
   (use-local-map gnus-article-mode-map)
   (gnus-update-format-specifications nil 'article-mode)
   (set (make-local-variable 'page-delimiter) gnus-page-delimiter)
   (gnus-set-default-directory)
   (buffer-disable-undo (current-buffer))
-  (setq buffer-read-only t)            ;Disable modification
+  (setq buffer-read-only t)
   (run-hooks 'gnus-article-mode-hook))
 
 (defun gnus-article-setup-buffer ()
@@ -572,8 +573,7 @@ commands:
        (set-buffer gnus-summary-buffer)
        (setq gnus-article-buffer name)
        (setq gnus-original-article-buffer original)
-       (gnus-set-global-variables))
-      (make-local-variable 'gnus-summary-buffer))
+       (gnus-set-global-variables)))
     ;; Init original article buffer.
     (save-excursion
       (set-buffer (get-buffer-create gnus-original-article-buffer))
@@ -587,13 +587,14 @@ commands:
          (buffer-disable-undo (current-buffer))
          (setq buffer-read-only t)
          (gnus-add-current-to-buffer-list)
-         (or (eq major-mode 'gnus-article-mode)
+         (unless (eq major-mode 'gnus-article-mode)
              (gnus-article-mode))
          (current-buffer))
       (save-excursion
        (set-buffer (get-buffer-create name))
        (gnus-add-current-to-buffer-list)
        (gnus-article-mode)
+       (make-local-variable 'gnus-summary-buffer)
        (current-buffer)))))
 
 ;; Set article window start at LINE, where LINE is the number of lines
@@ -984,6 +985,8 @@ Argument LINES specifies lines to be scrolled down."
           "=" "^" "\M-^" "|"))
        (nosave-but-article
         '("A\r"))
+       (nosave-in-article
+        '("\C-d"))
        keys)
     (save-excursion
       (set-buffer gnus-summary-buffer)
@@ -992,17 +995,20 @@ Argument LINES specifies lines to be scrolled down."
     (message "")
 
     (if (or (member keys nosaves)
-           (member keys nosave-but-article))
+           (member keys nosave-but-article)
+           (member keys nosave-in-article))
        (let (func)
          (save-window-excursion
            (pop-to-buffer gnus-summary-buffer 'norecord)
            (setq func (lookup-key (current-local-map) keys)))
          (if (not func)
              (ding)
-           (set-buffer gnus-summary-buffer)
+           (unless (member keys nosave-in-article)
+             (set-buffer gnus-summary-buffer))
            (call-interactively func))
          (when (member keys nosave-but-article)
            (pop-to-buffer gnus-article-buffer 'norecord)))
+      ;; These commands should restore window configuration.
       (let ((obuf (current-buffer))
            (owin (current-window-configuration))
            (opoint (point))
@@ -1260,14 +1266,13 @@ groups."
        (buf (current-buffer))
        (start (window-start)))
     (gnus-article-edit-exit)
-    (let ((cur (current-buffer)))
-      (save-excursion
-       (set-buffer buf)
-       (let ((buffer-read-only nil))
-         (funcall func)))
+    (save-excursion
       (set-buffer buf)
-      (set-window-start (get-buffer-window buf) start)
-      (set-window-point (get-buffer-window buf) (point)))))
+      (let ((buffer-read-only nil))
+       (funcall func)))
+    (set-buffer buf)
+    (set-window-start (get-buffer-window buf) start)
+    (set-window-point (get-buffer-window buf) (point))))
 
 (defun gnus-article-edit-exit ()
   "Exit the article editing without updating."
@@ -1575,8 +1580,7 @@ specified by `gnus-button-alist'."
          (goto-char beg)
          (while (re-search-forward (nth 1 entry) end t)
            ;; Each match within a header.
-           (let* ((from (match-beginning 0))
-                  (entry (cdr entry))
+           (let* ((entry (cdr entry))
                   (start (match-beginning (nth 1 entry)))
                   (end (match-end (nth 1 entry)))
                   (form (nth 2 entry)))
index 6ef161c..f3b9b57 100644 (file)
@@ -428,8 +428,7 @@ Returns the list of articles removed."
 
 (defun gnus-cache-articles-in-group (group)
   "Return a sorted list of cached articles in GROUP."
-  (let ((dir (file-name-directory (gnus-cache-file-name group 1)))
-       articles)
+  (let ((dir (file-name-directory (gnus-cache-file-name group 1))))
     (when (file-exists-p dir)
       (sort (mapcar (lambda (name) (string-to-int name)) 
                    (directory-files dir nil "^[0-9]+$" t))
index 6a4216f..1ecf45d 100644 (file)
@@ -43,7 +43,7 @@
     "turquoise"))
 
 (defvar gnus-face-dark-name-list
-  '("dark blue" "firebrick" "dark green" "OrangeRed" 
+  '("MidnightBlue" "firebrick" "dark green" "OrangeRed" 
     "dark khaki" "dark violet" "SteelBlue4"))
 ; CornflowerBlue SeaGreen OrangeRed SteelBlue4 DeepPink3
 ; DarkOlviveGreen4 
index da46608..f270e7b 100644 (file)
@@ -94,8 +94,7 @@ seen in the same session.")
   "Enter articles from the current group for future duplicate suppression."
   (unless gnus-dup-list
     (gnus-dup-open))
-  (let ((data gnus-newsgroup-data)
-       id)
+  (let ((data gnus-newsgroup-data))
     ;; Enter the Message-IDs of all read articles into the list
     ;; and hash table.
     (while data
index 33c0206..b31939a 100644 (file)
@@ -199,7 +199,6 @@ variable.")
 (defvar gnus-group-indentation-function nil)
 (defvar gnus-goto-missing-group-function nil)
 (defvar gnus-group-update-group-function nil)
-(defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
 (defvar gnus-group-goto-next-group-function nil
   "Function to override finding the next group after listing groups.")
 
@@ -809,6 +808,7 @@ If REGEXP, only list groups matching REGEXP."
 (defun gnus-group-insert-group-line-info (group)
   "Insert GROUP on the current line."
   (let ((entry (gnus-gethash group gnus-newsrc-hashtb))
+       (gnus-group-indentation (gnus-group-group-indentation))
        active info)
     (if entry
        (progn
@@ -1180,7 +1180,7 @@ Return nil if the group isn't displayed."
   "Perform any command on all groups accoring to the process/prefix convention."
   (interactive "P")
   (let ((groups (or groups (gnus-group-process-prefix arg)))
-       group func)
+       func)
     (if (eq (setq func (or func
                           (key-binding
                            (read-key-sequence
@@ -1189,7 +1189,7 @@ Return nil if the group isn't displayed."
            'undefined)
        (gnus-error 1 "Undefined key")
       (while groups
-       (gnus-group-remove-mark (setq group (pop groups)))
+       (gnus-group-remove-mark (pop groups))
        (command-execute func))))
   (gnus-group-position-point))
 
@@ -1320,9 +1320,12 @@ Return the name of the group is selection was successful."
                 (gnus-group-prefixed-name group method))))
     (gnus-sethash
      group
-     `(-1 nil (,group ,gnus-level-default-subscribed nil nil ,method
-                    ((quit-config . ,(if quit-config quit-config
-                                       (cons (current-buffer) 'summary))))))
+     `(-1 nil (,group 
+              ,gnus-level-default-subscribed nil nil ,method
+              ((quit-config .
+                            ,(if quit-config quit-config
+                               (cons (current-buffer) 
+                                     gnus-current-window-configuration))))))
      gnus-newsrc-hashtb)
     (set-buffer gnus-group-buffer)
     (unless (gnus-check-server method)
@@ -2923,49 +2926,6 @@ and the second element is the address."
                     (sort (nconc (gnus-uncompress-range (cdr m))
                                  (copy-sequence articles)) '<) t))))))
 
-(defun gnus-update-read-articles (group unread)
-  "Update the list of read articles in GROUP."
-  (let* ((active (or gnus-newsgroup-active (gnus-active group)))
-        (entry (gnus-gethash group gnus-newsrc-hashtb))
-        (info (nth 2 entry))
-        (prev 1)
-        (unread (sort (copy-sequence unread) '<))
-        read)
-    (if (or (not info) (not active))
-       ;; There is no info on this group if it was, in fact,
-       ;; killed.  Gnus stores no information on killed groups, so
-       ;; there's nothing to be done.
-       ;; One could store the information somewhere temporarily,
-       ;; perhaps...  Hmmm...
-       ()
-      ;; Remove any negative articles numbers.
-      (while (and unread (< (car unread) 0))
-       (setq unread (cdr unread)))
-      ;; Remove any expired article numbers
-      (while (and unread (< (car unread) (car active)))
-       (setq unread (cdr unread)))
-      ;; Compute the ranges of read articles by looking at the list of
-      ;; unread articles.
-      (while unread
-       (if (/= (car unread) prev)
-           (setq read (cons (if (= prev (1- (car unread))) prev
-                              (cons prev (1- (car unread)))) read)))
-       (setq prev (1+ (car unread)))
-       (setq unread (cdr unread)))
-      (when (<= prev (cdr active))
-       (setq read (cons (cons prev (cdr active)) read)))
-      (gnus-undo-register
-       `(progn
-          (gnus-info-set-marks ,info ,(gnus-info-marks info))
-          (gnus-info-set-read ,info ,(gnus-info-read info))
-          (gnus-get-unread-articles-in-group ,info (gnus-active ,group))))
-      ;; Enter this list into the group info.
-      (gnus-info-set-read
-       info (if (> (length read) 1) (nreverse read) read))
-      ;; Set the number of unread articles in gnus-newsrc-hashtb.
-      (gnus-get-unread-articles-in-group info (gnus-active group))
-      t)))
-
 (provide 'gnus-group)
 
 ;;; gnus-group.el ends here
index 66b5cdf..19dc593 100644 (file)
@@ -428,6 +428,7 @@ It is called with three parameters -- GROUP, LEVEL and OLDLEVEL.")
 \f
 ;;; Internal variables
 
+(defvar gnus-group-get-parameter-function 'gnus-group-get-parameter)
 (defvar gnus-original-article-buffer " *Original Article*")
 (defvar gnus-newsgroup-name nil)
 
@@ -565,7 +566,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
      ("hexl" hexl-hex-string-to-integer)
      ("pp" pp pp-to-string pp-eval-expression)
      ("mail-extr" mail-extract-address-components)
-     ("nnmail" nnmail-split-fancy nnmail-article-group)
+     ("nnmail" nnmail-split-fancy nnmail-article-group nnmail-date-to-time)
      ("nnvirtual" nnvirtual-catchup-group nnvirtual-convert-headers)
      ("timezone" timezone-make-date-arpa-standard timezone-fix-time
       timezone-make-sortable-date timezone-make-time-string)
@@ -657,7 +658,7 @@ gnus-newsrc-hashtb should be kept so that both hold the same information.")
      ("gnus-sum" gnus-summary-insert-line gnus-summary-read-group
       gnus-list-of-unread-articles gnus-list-of-read-articles
       gnus-offer-save-summaries gnus-make-thread-indent-array
-      gnus-summary-exit)
+      gnus-summary-exit gnus-update-read-articles)
      ("gnus-group" gnus-group-insert-group-line gnus-group-quit
       gnus-group-list-groups gnus-group-first-unread-group
       gnus-group-set-mode-line gnus-group-set-info gnus-group-save-newsrc
index f1c9290..3450eb8 100644 (file)
@@ -97,29 +97,28 @@ isn't bound, the message will be used unconditionally.")
          ;; headers.
          (save-excursion
            (let ((dependencies (make-vector 10 nil))
-                 (buffer (nnheader-set-temp-buffer " *Gnus NoCeM*"))
                  headers)
-             (setq headers
-                   (if (eq 'nov
-                           (gnus-retrieve-headers 
-                            (setq articles
-                                  (gnus-uncompress-range
-                                   (cons 
-                                    (if active (1+ (cdr active)) 
-                                      (car gactive))
-                                    (cdr gactive))))
-                            group))
-                       (gnus-get-newsgroup-headers-xover 
-                        articles nil dependencies)
-                     (gnus-get-newsgroup-headers dependencies)))
-             (while headers
-               ;; We take a closer look on all articles that have
-               ;; "@@NCM" in the subject.  
-               (when (string-match "@@NCM"
-                                   (mail-header-subject (car headers)))
-                 (gnus-nocem-check-article group (car headers)))
-               (setq headers (cdr headers)))
-             (kill-buffer (current-buffer)))))
+             (nnheader-temp-write nil
+               (setq headers
+                     (if (eq 'nov
+                             (gnus-retrieve-headers 
+                              (setq articles
+                                    (gnus-uncompress-range
+                                     (cons 
+                                      (if active (1+ (cdr active)) 
+                                        (car gactive))
+                                      (cdr gactive))))
+                              group))
+                         (gnus-get-newsgroup-headers-xover 
+                          articles nil dependencies)
+                       (gnus-get-newsgroup-headers dependencies)))
+               (while headers
+                 ;; We take a closer look on all articles that have
+                 ;; "@@NCM" in the subject.  
+                 (when (string-match "@@NCM"
+                                     (mail-header-subject (car headers)))
+                   (gnus-nocem-check-article group (car headers)))
+                 (setq headers (cdr headers)))))))
        (setq gnus-nocem-active
              (cons (list group gactive) 
                    (delq (assoc group gnus-nocem-active)
index 52333b8..0f0ab4e 100644 (file)
@@ -70,7 +70,7 @@ It accepts the same format specs that `gnus-summary-line-format' does.")
    "b" gnus-uu-mark-buffer
    "B" gnus-uu-unmark-buffer
    "." gnus-pick-article
-   gnus-mouse-2 gnus-mouse-pick-article
+   gnus-mouse-2 gnus-pick-mouse-pick
    "\r" gnus-pick-start-reading))
 
 (defun gnus-pick-make-menu-bar ()
@@ -154,7 +154,7 @@ If ARG, pick the article on that line instead."
        (goto-char pos))))
   (gnus-summary-mark-as-processable 1))
 
-(defun gnus-mouse-pick-article (e)
+(defun gnus-pick-mouse-pick (e)
   (interactive "e")
   (mouse-set-point e)
   (save-excursion
index ea4721d..caa5ddc 100644 (file)
@@ -1712,7 +1712,7 @@ SCORE is the score to add."
   ;; Insert the unique article headers in the buffer.
   (let ((gnus-score-index (nth 1 (assoc header gnus-header-index)))
        ;; gnus-score-index is used as a free variable.
-       alike last this art entries alist articles scores 
+       alike last this art entries alist articles 
        fuzzies arts words kill)
 
     ;; Sorting the articles costs os O(N*log N) but will allow us to
index 3f841a1..4113c8d 100644 (file)
@@ -2379,16 +2379,17 @@ If NO-DISPLAY, don't generate a summary buffer."
        (thhashtb (gnus-make-hashtable 1023))
        (prev threads)
        (result threads)
-       ids references id gthread gid entered)
+       ids references id gthread gid entered ref)
     (while threads
       (when (setq references (mail-header-references (caar threads)))
        (setq id (mail-header-id (caar threads))
              ids (gnus-split-references references)
              entered nil)
-       (while ids
-         (if (not (setq gid (gnus-gethash (car ids) idhashtb)))
+       (while (setq ref (pop ids))
+         (setq ids (delete ref ids))
+         (if (not (setq gid (gnus-gethash ref idhashtb)))
              (progn
-               (gnus-sethash (car ids) id idhashtb)
+               (gnus-sethash ref id idhashtb)
                (gnus-sethash id threads thhashtb))
            (setq gthread (gnus-gethash gid thhashtb))
            (unless entered
@@ -2406,8 +2407,7 @@ If NO-DISPLAY, don't generate a summary buffer."
            (setq entered t)
            ;; Remove it from the list of threads.
            (setcdr prev (cdr threads))
-           (setq threads prev))
-         (setq ids (cdr ids))))
+           (setq threads prev))))
       (setq prev threads)
       (setq threads (cdr threads)))
     result))
@@ -4220,7 +4220,7 @@ displayed, no centering will be performed."
 ;; the range of active articles.
 (defun gnus-list-of-unread-articles (group)
   (let* ((read (gnus-info-read (gnus-get-info group)))
-        (active (gnus-active group))
+        (active (or (gnus-active group) (gnus-activate-group group)))
         (last (cdr active))
         first nlast unread)
     ;; If none are read, then all are unread.
@@ -4413,7 +4413,7 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil."
          (bury-buffer gnus-article-buffer))
        ;; We clear the global counterparts of the buffer-local
        ;; variables as well, just to be on the safe side.
-       (gnus-configure-windows 'group 'force)
+       (set-buffer gnus-group-buffer)
        (gnus-summary-clear-local-variables)
        ;; Return to group mode buffer.
        (if (eq mode 'gnus-summary-mode)
@@ -4429,9 +4429,13 @@ gnus-exit-group-hook is called with no arguments if that value is non-nil."
        (if (not (buffer-name (car quit-config)))
            (gnus-configure-windows 'group 'force)
          (set-buffer (car quit-config))
-         (and (eq major-mode 'gnus-summary-mode)
-              (gnus-set-global-variables))
-         (gnus-configure-windows (cdr quit-config))))
+         (cond ((eq major-mode 'gnus-summary-mode)
+                (gnus-set-global-variables))
+               ((eq major-mode 'gnus-article-mode)
+                (save-excursion
+                  (set-buffer gnus-summary-buffer)
+                  (gnus-set-global-variables))))
+         (gnus-configure-windows (cdr quit-config) 'force)))
       (unless quit-config
        (setq gnus-newsgroup-name nil)))))
 
@@ -5578,11 +5582,14 @@ If FORCE, force a digest interpretation.  If not, try
 to guess what the document format is."
   (interactive "P")
   (gnus-set-global-variables)
-  (gnus-summary-select-article)
+  (save-excursion
+    (gnus-summary-select-article))
   (let* ((name (format "%s-%d"
                       (gnus-group-prefixed-name
                        gnus-newsgroup-name (list 'nndoc ""))
-                      gnus-current-article))
+                      (save-excursion
+                        (set-buffer gnus-summary-buffer)
+                        gnus-current-article)))
         (ogroup gnus-newsgroup-name)
         (params (append (gnus-info-params (gnus-get-info ogroup))
                         (list (cons 'to-group ogroup))))
@@ -5592,6 +5599,8 @@ to guess what the document format is."
     (save-excursion
       (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
       (insert-buffer-substring gnus-original-article-buffer)
+      ;; Remove lines that may lead nndoc to misinterpret the
+      ;; document type.
       (narrow-to-region
        (goto-char (point-min))
        (or (search-forward "\n\n" nil t) (point)))
@@ -5709,9 +5718,6 @@ Optional argument BACKWARD means do search for backward.
        (gnus-article-display-hook nil)
        (gnus-mark-article-hook nil)    ;Inhibit marking as read.
        (gnus-use-article-prefetch nil)
-       (re-search
-        (if backward
-            're-search-backward 're-search-forward))
        (sum (current-buffer))
        (found nil)
        point)
@@ -7257,34 +7263,6 @@ Return the article number moved to, or nil if moving was impossible."
          (gnus-summary-article-number)
        (goto-char beg)))))
 
-(defun gnus-summary-go-to-next-thread-old (&optional previous)
-  "Go to the same level (or less) next thread.
-If PREVIOUS is non-nil, go to previous thread instead.
-Return the article number moved to, or nil if moving was impossible."
-  (if (and (eq gnus-summary-make-false-root 'dummy)
-          (gnus-summary-article-intangible-p))
-      (let ((beg (point)))
-       (while (and (zerop (forward-line 1))
-                   (not (gnus-summary-article-intangible-p))
-                   (not (zerop (save-excursion 
-                                 (gnus-summary-thread-level))))))
-       (if (eobp)
-           (progn
-             (goto-char beg)
-             nil)
-         (point)))
-    (let* ((level (gnus-summary-thread-level))
-          (article (gnus-summary-article-number))
-          (data (cdr (gnus-data-find-list article (gnus-data-list previous))))
-          oart)
-      (while data
-       (if (<= (gnus-data-level (car data)) level)
-           (setq oart (gnus-data-number (car data))
-                 data nil)
-         (setq data (cdr data))))
-      (and oart
-          (gnus-summary-goto-subject oart)))))
-
 (defun gnus-summary-next-thread (n &optional silent)
   "Go to the same level next N'th thread.
 If N is negative, search backward instead.
@@ -7295,8 +7273,7 @@ If SILENT, don't output messages."
   (interactive "p")
   (gnus-set-global-variables)
   (let ((backward (< n 0))
-       (n (abs n))
-       old dum int)
+       (n (abs n)))
     (while (and (> n 0)
                (gnus-summary-go-to-next-thread backward))
       (decf n))
@@ -7877,6 +7854,49 @@ save those articles instead."
          (funcall gnus-summary-highlight-line-function article face))))
     (goto-char p)))
 
+(defun gnus-update-read-articles (group unread)
+  "Update the list of read articles in GROUP."
+  (let* ((active (or gnus-newsgroup-active (gnus-active group)))
+        (entry (gnus-gethash group gnus-newsrc-hashtb))
+        (info (nth 2 entry))
+        (prev 1)
+        (unread (sort (copy-sequence unread) '<))
+        read)
+    (if (or (not info) (not active))
+       ;; There is no info on this group if it was, in fact,
+       ;; killed.  Gnus stores no information on killed groups, so
+       ;; there's nothing to be done.
+       ;; One could store the information somewhere temporarily,
+       ;; perhaps...  Hmmm...
+       ()
+      ;; Remove any negative articles numbers.
+      (while (and unread (< (car unread) 0))
+       (setq unread (cdr unread)))
+      ;; Remove any expired article numbers
+      (while (and unread (< (car unread) (car active)))
+       (setq unread (cdr unread)))
+      ;; Compute the ranges of read articles by looking at the list of
+      ;; unread articles.
+      (while unread
+       (if (/= (car unread) prev)
+           (setq read (cons (if (= prev (1- (car unread))) prev
+                              (cons prev (1- (car unread)))) read)))
+       (setq prev (1+ (car unread)))
+       (setq unread (cdr unread)))
+      (when (<= prev (cdr active))
+       (setq read (cons (cons prev (cdr active)) read)))
+      (gnus-undo-register
+       `(progn
+          (gnus-info-set-marks ,info ,(gnus-info-marks info))
+          (gnus-info-set-read ,info ,(gnus-info-read info))
+          (gnus-get-unread-articles-in-group ,info (gnus-active ,group))))
+      ;; Enter this list into the group info.
+      (gnus-info-set-read
+       info (if (> (length read) 1) (nreverse read) read))
+      ;; Set the number of unread articles in gnus-newsrc-hashtb.
+      (gnus-get-unread-articles-in-group info (gnus-active group))
+      t)))
+
 (provide 'gnus-sum)
 
 ;;; gnus-sum.el ends here
index 12845a7..35fa60e 100644 (file)
@@ -45,6 +45,7 @@
 ;;; Code:
 
 (require 'gnus-util)
+(require 'gnus)
 
 (defvar gnus-undo-mode nil
   "Minor mode for undoing in Gnus buffers.")
index 03f76f8..101c086 100644 (file)
@@ -183,6 +183,11 @@ buffer configuration.")
     (draft . gnus-draft-buffer))
   "Mapping from short symbols to buffer names or buffer variables.")
 
+(defvar gnus-current-window-configuration nil
+  "The most recently set window configuration.")
+
+;;; Internal variables.
+
 (defvar gnus-created-frames nil)
 
 (defun gnus-kill-gnus-frames ()
@@ -381,6 +386,7 @@ buffer configuration.")
 (defvar gnus-frame-split-p nil)
 
 (defun gnus-configure-windows (setting &optional force)
+  (setq gnus-current-window-configuration setting)
   (setq setting (gnus-windows-old-to-new setting))
   (let ((split (if (symbolp setting)
                   (cadr (assq setting gnus-buffer-configuration))
index b7482ba..18bc305 100644 (file)
@@ -583,10 +583,9 @@ pounce directly on the real variables themselves.")
     (and (search-forward "Praxis" nil t)
         (put-text-property (match-beginning 0) (match-end 0) 'face 'bold))
     (goto-char (point-min))
-    (let* ((mode-string (gnus-group-set-mode-line)))
-      (setq modeline-buffer-identification 
-           (list (concat gnus-version ": *Group*")))
-      (set-buffer-modified-p t))))
+    (setq modeline-buffer-identification 
+         (list (concat gnus-version ": *Group*")))
+    (set-buffer-modified-p t)))
 
 
 ;;; The toolbar.
index f7a18db..e148e24 100644 (file)
@@ -28,7 +28,7 @@
 
 (eval '(run-hooks 'gnus-load-hook))
 
-(defconst gnus-version-number "0.21"
+(defconst gnus-version-number "0.22"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Red Gnus v%s" gnus-version-number)
   (set-buffer-modified-p t))
 
 (eval-when (load)
-  (gnus-splash))
+  (when (string-match "gnus" (format "%s" this-command))
+    (gnus-splash)))
 
 ;;; Do the rest.
 
index 60626b4..c3b1bdc 100644 (file)
@@ -33,7 +33,8 @@
 (require 'nnheader)
 (require 'nnmail)
 (require 'nnoo)
-(eval-when-compile (require 'cl))
+(require 'gnus-util)
+(require 'cl)
 
 (nnoo-declare nneething)
 
index 3040e71..8612642 100644 (file)
@@ -151,7 +151,7 @@ on your system, you could say something like:
   (let ((case-fold-search t)
        (cur (current-buffer))
        (buffer-read-only nil)
-       end ref in-reply-to lines p)
+       in-reply-to lines p)
     (goto-char (point-min))
     (when naked
       (insert "\n"))
index 8d6c342..7939346 100644 (file)
@@ -384,7 +384,7 @@ parameter.  It should return nil, `warn' or `delete'.")
   "Move INBOX to `nnmail-crash-box'."
   (let ((inbox (file-truename (expand-file-name inbox)))
        (tofile (file-truename (expand-file-name nnmail-crash-box)))
-       movemail popmail errors password)
+       movemail popmail errors)
     ;; If getting from mail spool directory,
     ;; use movemail to move rather than just renaming,
     ;; so as to interlock with the mailer.
index dad6681..da19d91 100644 (file)
@@ -161,7 +161,7 @@ all. This may very well take some time.")
 (deffoo nnml-request-article (id &optional newsgroup server buffer)
   (nnml-possibly-change-directory newsgroup server)
   (let* ((nntp-server-buffer (or buffer nntp-server-buffer))
-        file path gpath group-num)
+        path gpath group-num)
     (if (stringp id)
        (when (and (setq group-num (nnml-find-group-number id))
                   (setq file (cdr
@@ -343,7 +343,7 @@ all. This may very well take some time.")
     (nnml-possibly-create-directory group)
     (let ((chars (nnmail-insert-lines))
          (art (concat (int-to-string article) "\t"))
-         headers file)
+         headers)
       (when (condition-case ()
                (progn
                  (nnmail-write-region 
@@ -740,7 +740,7 @@ all. This may very well take some time.")
   (let* ((dir (file-name-as-directory dir))
         (nov (concat dir nnml-nov-file-name))
         (nov-buffer (get-buffer-create " *nov*"))
-        nov-line chars file headers)
+        chars file headers)
     (save-excursion
       ;; Init the nov buffer.
       (set-buffer nov-buffer)
index e99b4ad..af4236e 100644 (file)
 
 (defun nnoo-change-server (backend server defs)
   (let* ((bstate (cdr (assq backend nnoo-state-alist)))
-        (sdefs (assq backend nnoo-definition-alist))
         (current (car bstate))
         (parents (nnoo-parents backend))
         state)
index fae954d..ba1dee5 100644 (file)
@@ -596,8 +596,6 @@ The SOUP packet file name will be inserted at the %s.")
   (require 'mail-utils)
   (let ((tembuf (generate-new-buffer " message temp"))
        (case-fold-search nil)
-       (news (message-news-p))
-       (resend-to-addresses (mail-fetch-field "resent-to"))
        delimline
        (mailbuf (current-buffer)))
     (unwind-protect
index 95175a5..ba3a86f 100644 (file)
@@ -187,6 +187,7 @@ server there that you can connect to. See also `nntp-open-connection-function'")
            (count 0)
            (received 0)
            (last-point (point-min))
+           (buf (nntp-find-connection-buffer nntp-server-buffer))
            (nntp-inhibit-erase t))
        ;; Send HEAD command.
        (while articles
@@ -205,10 +206,12 @@ server there that you can connect to. See also `nntp-open-connection-function'")
                    (zerop (% count nntp-maximum-request)))
            (nntp-accept-response)
            (while (progn
-                    (goto-char last-point)
+                    (progn
+                      (set-buffer buf)
+                      (goto-char last-point))
                     ;; Count replies.
                     (while (re-search-forward "^[0-9]" nil t)
-                      (setq received (1+ received)))
+                      (incf received))
                     (setq last-point (point))
                     (< received count))
              ;; If number of headers is greater than 100, give
@@ -257,9 +260,8 @@ server there that you can connect to. See also `nntp-open-connection-function'")
          (command (if nntp-server-list-active-group "LIST ACTIVE" "GROUP")))
       (while groups
        ;; Send the command to the server.
-       (nntp-send-command nil command (car groups))
-       (setq groups (cdr groups))
-       (setq count (1+ count))
+       (nntp-send-command nil command (pop groups))
+       (incf count)
        ;; Every 400 requests we have to read the stream in
        ;; order to avoid deadlocks.
        (when (or (null groups)         ;All requests have been sent.
@@ -269,22 +271,21 @@ server there that you can connect to. See also `nntp-open-connection-function'")
                   (goto-char last-point)
                   ;; Count replies.
                   (while (re-search-forward "^[0-9]" nil t)
-                    (setq received (1+ received)))
+                    (incf received))
                   (setq last-point (point))
                   (< received count))
            (nntp-accept-response))))
 
       ;; Wait for the reply from the final command.
-      (when nntp-server-list-active-group
-       (goto-char (point-max))
-       (re-search-backward "^[0-9]" nil t)
-       (when (looking-at "^[23]")
-         (while (progn
-                  (goto-char (point-max))
-                  (if (equal command "GROUP")
-                      (not (re-search-backward "\r?\n" (- (point) 3) t))
-                    (not (re-search-backward "^\\.\r?\n" (- (point) 4) t))))
-           (nntp-accept-response))))
+      (goto-char (point-max))
+      (re-search-backward "^[0-9]" nil t)
+      (when (looking-at "^[23]")
+       (while (progn
+                (goto-char (point-max))
+                (if (not nntp-server-list-active-group)
+                    (not (re-search-backward "\r?\n" (- (point) 3) t))
+                  (not (re-search-backward "^\\.\r?\n" (- (point) 4) t))))
+         (nntp-accept-response)))
 
       ;; Now all replies are received. We remove CRs.
       (goto-char (point-min))
@@ -292,7 +293,9 @@ server there that you can connect to. See also `nntp-open-connection-function'")
        (replace-match "" t t))
 
       (if (not nntp-server-list-active-group)
-         'group
+         (progn
+           (copy-to-buffer nntp-server-buffer (point-min) (point-max))
+           'group)
        ;; We have read active entries, so we just delete the
        ;; superfluos gunk.
        (goto-char (point-min))
index 709f197..a897d80 100644 (file)
@@ -380,7 +380,7 @@ virtual group.")
 (defun nnvirtual-create-mapping ()
   "Create an article mapping for the current group."
   (let* ((div nil)
-        m marks list article unreads marks active
+        m unreads marks active 
         (map (sort
               (apply 
                'nconc
@@ -409,7 +409,7 @@ virtual group.")
     (setq nnvirtual-mapping map)
     ;; Set the virtual article numbers.
     (while (setq m (pop map))
-      (setcar m (setq article (incf i))))))
+      (setcar m (incf i)))))
 
 (provide 'nnvirtual)
 
index 35cdf21..9a15110 100644 (file)
        (let ((i 0)
              (more t)
              (case-fold-search t)
-             subject score date newsgroups from id
+             subject date from id group
              map url)
          (while more
            ;; Go through all the article hits on this page.
 
 (defun nnweb-altavista-wash-article ()
   (goto-char (point-min))
-  (let ((case-fold-search t)
-       subject)
+  (let ((case-fold-search t))
     (when (re-search-forward "<H1>\\(.*\\)</H1>" nil t)
       (setq subject (match-string 1)))
     (re-search-forward "^<strong>" nil t)
index 3a59266..79be5db 100644 (file)
@@ -1,7 +1,7 @@
 \input texinfo                  @c -*-texinfo-*-
 
 @setfilename gnus
-@settitle Red Gnus 0.21 Manual
+@settitle Red Gnus 0.22 Manual
 @synindex fn cp
 @synindex vr cp
 @synindex pg cp
@@ -230,7 +230,7 @@ into another language, under the above conditions for modified versions.
 @tex
 
 @titlepage
-@title Red Gnus 0.21 Manual
+@title Red Gnus 0.22 Manual
 
 @author by Lars Magne Ingebrigtsen
 @page