*** empty log message ***
[gnus] / lisp / gnus-sum.el
index 8809396..678ad96 100644 (file)
@@ -618,7 +618,7 @@ is not run if `gnus-visual' is nil."
   :type 'hook)
 
 (defcustom gnus-parse-headers-hook
-  (list 'gnus-decode-rfc1522)
+  (list 'gnus-hack-decode-rfc1522 'gnus-decode-rfc1522)
   "*A hook called before parsing the headers."
   :group 'gnus-various
   :type 'hook)
@@ -1193,7 +1193,7 @@ increase the score of each group you read."
     "j" gnus-summary-goto-article
     "g" gnus-summary-goto-subject
     "l" gnus-summary-goto-last-article
-    "p" gnus-summary-pop-article)
+    "o" gnus-summary-pop-article)
 
   (gnus-define-keys (gnus-summary-thread-map "T" gnus-summary-mode-map)
     "k" gnus-summary-kill-thread
@@ -2014,7 +2014,7 @@ The following commands are available:
 
 (defmacro gnus-summary-article-sparse-p (article)
   "Say whether this article is a sparse article or not."
-  ` (memq ,article gnus-newsgroup-sparse))
+  `(memq ,article gnus-newsgroup-sparse))
 
 (defmacro gnus-summary-article-ancient-p (article)
   "Say whether this article is a sparse article or not."
@@ -3826,6 +3826,10 @@ If READ-ALL is non-nil, all articles in the group are selected."
            (set var (delq article (symbol-value var))))))
        ;; Adjust assocs.
        ((memq mark uncompressed)
+       (when (not (listp (cdr (symbol-value var))))
+         (set var (list (symbol-value var))))
+       (when (not (listp (cdr articles)))
+         (setq articles (list articles)))
        (while articles
          (when (or (not (consp (setq article (pop articles))))
                    (< (car article) min)
@@ -4815,6 +4819,9 @@ The prefix argument ALL means to select all articles."
                   (not non-destructive))
          (setq gnus-newsgroup-scored nil))
        ;; Set the new ranges of read articles.
+       (save-excursion
+         (set-buffer gnus-group-buffer)
+         (gnus-undo-force-boundary))
        (gnus-update-read-articles
         group (append gnus-newsgroup-unreads gnus-newsgroup-unselected))
        ;; Set the current article marks.
@@ -4994,7 +5001,7 @@ which existed when entering the ephemeral is reset."
   (suppress-keymap gnus-dead-summary-mode-map)
   (substitute-key-definition
    'undefined 'gnus-summary-wake-up-the-dead gnus-dead-summary-mode-map)
-  (let ((keys '("\C-d" "\r" "\177")))
+  (let ((keys '("\C-d" "\r" "\177" [delete])))
     (while keys
       (define-key gnus-dead-summary-mode-map
        (pop keys) 'gnus-summary-wake-up-the-dead))))
@@ -5080,7 +5087,8 @@ in."
     (when current-prefix-arg
       (completing-read
        "Faq dir: " (and (listp gnus-group-faq-directory)
-                       gnus-group-faq-directory)))))
+                       (mapcar (lambda (file) (list file))
+                               gnus-group-faq-directory))))))
   (let (gnus-faq-buffer)
     (when (setq gnus-faq-buffer
                (gnus-group-fetch-faq gnus-newsgroup-name faq-dir))
@@ -5142,7 +5150,8 @@ previous group instead."
          (if (and (or (eq t unreads)
                       (and unreads (not (zerop unreads))))
                   (gnus-summary-read-group
-                   target-group nil no-article current-buffer))
+                   target-group nil no-article
+                   (and (buffer-name current-buffer) current-buffer)))
              (setq entered t)
            (setq current-group target-group
                  target-group nil)))))))
@@ -5854,7 +5863,7 @@ If ALL, mark even excluded ticked and dormants as read."
                    '<)
                   (sort gnus-newsgroup-limit '<)))
        article)
-    (setq gnus-newsgroup-unreads nil)
+    (setq gnus-newsgroup-unreads gnus-newsgroup-limit)
     (if all
        (setq gnus-newsgroup-dormant nil
              gnus-newsgroup-marked nil
@@ -5928,7 +5937,10 @@ If ALL, mark even excluded ticked and dormants as read."
              (mail-header-number (car thread))))
            (progn
              (if (<= (length (cdr thread)) 1)
-                 (setq thread (cadr thread))
+                 (setq gnus-newsgroup-limit
+                       (delq (mail-header-number (car thread))
+                             gnus-newsgroup-limit)
+                       thread (cadr thread))
                (when (gnus-invisible-cut-children (cdr thread))
                  (let ((th (cdr thread)))
                    (while th
@@ -5936,8 +5948,7 @@ If ALL, mark even excluded ticked and dormants as read."
                                gnus-newsgroup-limit)
                          (setq thread (car th)
                                th nil)
-                       (setq th (cdr th)))))))))
-      ))
+                       (setq th (cdr th)))))))))))
   thread)
 
 (defun gnus-cut-threads (threads)
@@ -6046,7 +6057,7 @@ fetch-old-headers verbiage, and so on."
                      (mail-header-id (car thread))))
                (progn
                  (setq gnus-newsgroup-reads
-                       (delq number gnus-newsgroup-unreads))
+                       (delq number gnus-newsgroup-reads))
                  t))))
          ;; Nope, invisible article.
          0
@@ -6153,8 +6164,13 @@ or `gnus-select-method', no matter what backend the article comes from."
     (let* ((header (gnus-id-to-header message-id))
           (sparse (and header
                        (gnus-summary-article-sparse-p
-                        (mail-header-number header)))))
-      (if header
+                        (mail-header-number header))
+                       (memq (mail-header-number header)
+                             gnus-newsgroup-limit))))
+      (if (and header
+              (or (not (gnus-summary-article-sparse-p
+                        (mail-header-number header)))
+                  sparse))
          (prog1
               ;; The article is present in the buffer, so we just go to it.
              (gnus-summary-goto-article
@@ -6321,11 +6337,15 @@ If BACKWARD, search backward instead."
   "Search for an article containing REGEXP.
 Optional argument BACKWARD means do search for backward.
 `gnus-select-article-hook' is not called during the search."
+  ;; We have to require this here to make sure that the following
+  ;; dynamic binding isn't shadowed by autoloading.
+  (require 'gnus-async)
   (let ((gnus-select-article-hook nil) ;Disable hook.
        (gnus-article-display-hook nil)
        (gnus-mark-article-hook nil)    ;Inhibit marking as read.
        (gnus-use-article-prefetch nil)
        (gnus-xmas-force-redisplay nil) ;Inhibit XEmacs redisplay.
+       (gnus-use-trees nil)            ;Inhibit updating tree buffer.
        (sum (current-buffer))
        (found nil)
        point)
@@ -6649,6 +6669,8 @@ and `request-accept' functions."
        (cond
        ;; Move the article.
        ((eq action 'move)
+        ;; Remove this article from future suppression.
+        (gnus-dup-unsuppress-article article)
         (gnus-request-move-article
          article                       ; Article to move
          gnus-newsgroup-name           ; From newsgroup
@@ -6790,7 +6812,7 @@ and `request-accept' functions."
       (save-excursion
        (set-buffer gnus-group-buffer)
        (when (gnus-group-goto-group (car to-groups) t)
-         (gnus-group-get-new-news-this-group 1))
+         (gnus-group-get-new-news-this-group 1 t))
        (pop to-groups)))
 
     (gnus-kill-buffer copy-buf)
@@ -8448,7 +8470,8 @@ save those articles instead."
     (gnus-article-setup-buffer)
     (set-buffer gnus-article-buffer)
     (setq buffer-read-only nil)
-    (let ((command (if automatic command (read-string "Command: " command))))
+    (let ((command (if automatic command
+                    (read-string "Command: " (cons command 0)))))
       (erase-buffer)
       (insert "$ " command "\n\n")
       (if gnus-view-pseudo-asynchronously
@@ -8641,7 +8664,6 @@ save those articles instead."
        (push (cons prev (cdr active)) read))
       (save-excursion
        (set-buffer gnus-group-buffer)
-       (gnus-undo-force-boundary)
        (gnus-undo-register
          `(progn
             (gnus-info-set-marks ',info ',(gnus-info-marks info) t)