(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."
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
"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))