summaryrefslogtreecommitdiff
path: root/lisp/gnus/nndoc.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-28 09:18:39 +0000
committerMiles Bader <miles@gnu.org>2007-10-28 09:18:39 +0000
commit01c52d3165ffec363014bd9033ea2c317d32d6d6 (patch)
tree5d90be562d45a88f172483b9a33ab4ada197d772 /lisp/gnus/nndoc.el
parentccae01a639d69bc215e4af2835131cda3141e498 (diff)
downloademacs-01c52d3165ffec363014bd9033ea2c317d32d6d6.tar.gz
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-911
Diffstat (limited to 'lisp/gnus/nndoc.el')
-rw-r--r--lisp/gnus/nndoc.el37
1 files changed, 20 insertions, 17 deletions
diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el
index ea32a8f4183..1de9a2083b0 100644
--- a/lisp/gnus/nndoc.el
+++ b/lisp/gnus/nndoc.el
@@ -122,7 +122,7 @@ from the document.")
(subtype digest guess))
(lanl-gov-announce
(article-begin . "^\\\\\\\\\n")
- (head-begin . "^Paper.*:")
+ (head-begin . "^\\(Paper.*:\\|arXiv:\\)")
(head-end . "\\(^\\\\\\\\.*\n\\|-----------------\\)")
(body-begin . "")
(body-end . "\\(-------------------------------------------------\\|%-%-%-%-%-%-%-%-%-%-%-%-%-%-\\|%%--%%--%%--%%--%%--%%--%%--%%--\\|%%%---%%%---%%%---%%%---\\)")
@@ -624,25 +624,28 @@ from the document.")
(defun nndoc-lanl-gov-announce-type-p ()
(when (let ((case-fold-search nil))
- (re-search-forward "^\\\\\\\\\nPaper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z-\\.]+/[0-9]+" nil t))
+ (re-search-forward "^\\\\\\\\\n\\(Paper\\( (\\*cross-listing\\*)\\)?: [a-zA-Z-\\.]+/[0-9]+\\|arXiv:\\)" nil t))
t))
(defun nndoc-transform-lanl-gov-announce (article)
- (goto-char (point-max))
- (when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
- (replace-match "\n\nGet it at \\1 (\\2)" t nil))
- (goto-char (point-min))
- (while (re-search-forward "^\\\\\\\\$" nil t)
- (replace-match "" t nil))
- (goto-char (point-min))
- (when (re-search-forward "^replaced with revised version +\\(.*[^ ]\\) +" nil t)
- (replace-match "Date: \\1 (revised) " t nil))
- (goto-char (point-min))
- (unless (re-search-forward "^From" nil t)
+ (let ((case-fold-search nil))
+ (goto-char (point-max))
+ (when (re-search-backward "^\\\\\\\\ +( *\\([^ ]*\\) , *\\([^ ]*\\))" nil t)
+ (replace-match "\n\nGet it at \\1 (\\2)" t nil))
(goto-char (point-min))
- (when (re-search-forward "^Authors?: \\(.*\\)" nil t)
+ (while (re-search-forward "^\\\\\\\\$" nil t)
+ (replace-match "" t nil))
+ (goto-char (point-min))
+ (when (re-search-forward "^replaced with revised version +\\(.*[^ ]\\) +" nil t)
+ (replace-match "Date: \\1 (revised) " t nil))
+ (goto-char (point-min))
+ (unless (re-search-forward "^From" nil t)
(goto-char (point-min))
- (insert "From: " (match-string 1) "\n"))))
+ (when (re-search-forward "^Authors?: \\(.*\\)" nil t)
+ (goto-char (point-min))
+ (insert "From: " (match-string 1) "\n")))
+ (when (re-search-forward "^arXiv:" nil t)
+ (replace-match "Paper: arXiv:" t nil))))
(defun nndoc-generate-lanl-gov-head (article)
(let ((entry (cdr (assq article nndoc-dissection-alist)))
@@ -653,8 +656,8 @@ from the document.")
(save-restriction
(narrow-to-region (car entry) (nth 1 entry))
(goto-char (point-min))
- (when (looking-at "^Paper.*: \\([a-zA-Z-\\.]+/[0-9]+\\)")
- (setq subject (concat " (" (match-string 1) ")"))
+ (when (looking-at "^\\(Paper.*: \\|arXiv:\\)\\([0-9a-zA-Z-\\./]+\\)")
+ (setq subject (concat " (" (match-string 2) ")"))
(when (re-search-forward "^From: \\(.*\\)" nil t)
(setq from (concat "<"
(cadr (funcall gnus-extract-address-components