* nnultimate.el (nnultimate-retrieve-headers): Work for other
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 21 Mar 2001 19:18:57 +0000 (19:18 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Wed, 21 Mar 2001 19:18:57 +0000 (19:18 +0000)
boards.

lisp/ChangeLog
lisp/gnus-art.el
lisp/nnultimate.el

index 8358056..3e45345 100644 (file)
@@ -1,3 +1,8 @@
+2001-03-21 20:00:43  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * nnultimate.el (nnultimate-retrieve-headers): Work for other
+       boards. 
+
 2001-03-21  Didier Verna  <didier@lrde.epita.fr>
 
        * gnus-start.el:
index 495518d..da967cf 100644 (file)
@@ -1985,6 +1985,36 @@ always hide."
                    (looking-at "[ \t]*$"))
          (gnus-delete-line))))))
 
+(defun article-replace-with-quoted-text ()
+  "Replace the entire article with the quoted text in the article."
+  (interactive)
+  (unless gnus-cite-prefix-alist
+    (error "No quoted text in the article"))
+  (gnus-summary-show-article t)
+  (save-excursion
+    (set-buffer gnus-article-buffer)
+    (gnus-cite-parse-maybe t)
+    (let ((prefix (concat "^" (caar gnus-cite-prefix-alist)))
+         (buffer-read-only nil)
+         (body nil))
+      (dolist (line (sort (copy-sequence (cdar gnus-cite-prefix-alist)) '<))
+       (save-excursion
+         (set-buffer gnus-original-article-buffer)
+         (goto-char (point-min))
+         (forward-line (1- line))
+         (push (buffer-substring (point) (progn (forward-line 1) (point)))
+               body)))
+      (article-goto-body)
+      (forward-line -1)
+      (delete-region (point) (point-max))
+      (mapcar #'insert (mapcar #'string-as-unibyte (nreverse body)))
+      (goto-char (point-min))
+      (while (re-search-forward prefix nil t)
+       (replace-match "" t t))
+      (gnus-article-prepare-display))))
+    
+    
+
 (defun article-narrow-to-head ()
   "Narrow the buffer to the head of the message.
 Point is left at the beginning of the narrowed-to region."
@@ -2889,6 +2919,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is
      article-strip-trailing-space
      article-strip-blank-lines
      article-strip-all-blank-lines
+     article-replace-with-quoted-text
      article-date-local
      article-date-english
      article-date-iso8601
index 7b27acf..0567ecc 100644 (file)
@@ -80,7 +80,7 @@
            "postings.*editpost\\|forumdisplay\\|getbio")
           headers article subject score from date lines parent point
           contents tinfo fetchers map elem a href garticles topic old-max
-          inc datel table string current-page total-contents pages
+          inc datel table current-page total-contents pages
           farticles forum-contents parse furl-fetched mmap farticle)
       (setq map mapping)
       (while (and (setq article (car articles))
              (setq contents
                    (ignore-errors (w3-parse-buffer (current-buffer))))
              (setq table (nnultimate-find-forum-table contents))
-             (setq string (mapconcat 'identity (nnweb-text table) ""))
-             (when (string-match "topic is \\([0-9]\\) pages" string)
-               (setq pages (string-to-number (match-string 1 string)))
-               (setcdr table nil)
-               (setq table (nnultimate-find-forum-table contents)))
+             (goto-char (point-min))
+             (when (re-search-forward "topic is \\([0-9]+\\) pages" nil t)
+               (setq pages (string-to-number (match-string 1))))
              (setq contents (cdr (nth 2 (car (nth 2 table)))))
              (setq total-contents (nconc total-contents contents))
              (incf current-page))