Function: nndoc-transform-lanl-gov-announce

nndoc-transform-lanl-gov-announce is a byte-compiled function defined in nndoc.el.gz.

Signature

(nndoc-transform-lanl-gov-announce ARTICLE)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nndoc.el.gz
(defun nndoc-transform-lanl-gov-announce (_article)
  (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))
    (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))
      (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))))