projects
/
elisp
/
gnus.git-
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Sync up with Gnus 5.6.30.
[elisp/gnus.git-]
/
lisp
/
nndoc.el
diff --git
a/lisp/nndoc.el
b/lisp/nndoc.el
index
396de86
..
e4c79c1
100644
(file)
--- a/
lisp/nndoc.el
+++ b/
lisp/nndoc.el
@@
-1,7
+1,7
@@
;;; nndoc.el --- single file access for Gnus
;;; nndoc.el --- single file access for Gnus
-;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
+;; Copyright (C) 1995,96,97,98 Free Software Foundation, Inc.
-;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no>
+;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
;; Keywords: news
@@
-30,6
+30,7
@@
(require 'message)
(require 'nnmail)
(require 'nnoo)
(require 'message)
(require 'nnmail)
(require 'nnoo)
+(require 'gnus-util)
(eval-when-compile (require 'cl))
(nnoo-declare nndoc)
(eval-when-compile (require 'cl))
(nnoo-declare nndoc)
@@
-43,6
+44,11
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(defvoo nndoc-post-type 'mail
"*Whether the nndoc group is `mail' or `post'.")
(defvoo nndoc-post-type 'mail
"*Whether the nndoc group is `mail' or `post'.")
+(defvoo nndoc-open-document-hook 'nnheader-ms-strip-cr
+ "Hook run after opening a document.
+The default function removes all trailing carriage returns
+from the document.")
+
(defvar nndoc-type-alist
`((mmdf
(article-begin . "^\^A\^A\^A\^A\n")
(defvar nndoc-type-alist
`((mmdf
(article-begin . "^\^A\^A\^A\^A\n")
@@
-82,12
+88,12
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(file-end . "")
(subtype digest guess))
(standard-digest
(file-end . "")
(subtype digest guess))
(standard-digest
- (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
- (article-begin . ,(concat "^\n" (make-string 30 ?-) "\n\n+"))
+ (first-article . ,(concat "^" (make-string 70 ?-) "\n *\n+"))
+ (article-begin . ,(concat "^\n" (make-string 30 ?-) "\n *\n+"))
(prepare-body-function . nndoc-unquote-dashes)
(body-end-function . nndoc-digest-body-end)
(prepare-body-function . nndoc-unquote-dashes)
(body-end-function . nndoc-digest-body-end)
- (head-end . "^ ?$")
- (body-begin . "^ ?\n")
+ (head-end . "^ *$")
+ (body-begin . "^ *\n")
(file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
(subtype digest guess))
(slack-digest
(file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
(subtype digest guess))
(slack-digest
@@
-125,7
+131,6
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(defvoo nndoc-file-begin nil)
(defvoo nndoc-first-article nil)
(defvoo nndoc-file-begin nil)
(defvoo nndoc-first-article nil)
-(defvoo nndoc-article-end nil)
(defvoo nndoc-article-begin nil)
(defvoo nndoc-head-begin nil)
(defvoo nndoc-head-end nil)
(defvoo nndoc-article-begin nil)
(defvoo nndoc-head-begin nil)
(defvoo nndoc-head-end nil)
@@
-279,7
+284,8
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(erase-buffer)
(if (stringp nndoc-address)
(nnheader-insert-file-contents nndoc-address)
(erase-buffer)
(if (stringp nndoc-address)
(nnheader-insert-file-contents nndoc-address)
- (insert-buffer-substring nndoc-address)))))
+ (insert-buffer-substring nndoc-address))
+ (run-hooks 'nndoc-open-document-hook))))
;; Initialize the nndoc structures according to this new document.
(when (and nndoc-current-buffer
(not nndoc-dissection-alist))
;; Initialize the nndoc structures according to this new document.
(when (and nndoc-current-buffer
(not nndoc-dissection-alist))
@@
-300,7
+306,8
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
"Set the nndoc delimiter variables according to the type of the document."
(let ((vars '(nndoc-file-begin
nndoc-first-article
"Set the nndoc delimiter variables according to the type of the document."
(let ((vars '(nndoc-file-begin
nndoc-first-article
- nndoc-article-end nndoc-head-begin nndoc-head-end
+ nndoc-article-begin-function
+ nndoc-head-begin nndoc-head-end
nndoc-file-end nndoc-article-begin
nndoc-body-begin nndoc-body-end-function nndoc-body-end
nndoc-prepare-body-function nndoc-article-transform-function
nndoc-file-end nndoc-article-begin
nndoc-body-begin nndoc-body-end-function nndoc-body-end
nndoc-prepare-body-function nndoc-article-transform-function
@@
-390,7
+397,7
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(defun nndoc-babyl-body-begin ()
(re-search-forward "^\n" nil t)
(defun nndoc-babyl-body-begin ()
(re-search-forward "^\n" nil t)
- (when (looking-at "\*\*\* EOOH \*\*\*")
+ (when (looking-at "\\*\\*\\* EOOH \\*\\*\\*")
(let ((next (or (save-excursion
(re-search-forward nndoc-article-begin nil t))
(point-max))))
(let ((next (or (save-excursion
(re-search-forward nndoc-article-begin nil t))
(point-max))))
@@
-402,7
+409,7
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(defun nndoc-babyl-head-begin ()
(when (re-search-forward "^[0-9].*\n" nil t)
(defun nndoc-babyl-head-begin ()
(when (re-search-forward "^[0-9].*\n" nil t)
- (when (looking-at "\*\*\* EOOH \*\*\*")
+ (when (looking-at "\\*\\*\\* EOOH \\*\\*\\*")
(forward-line 1))
t))
(forward-line 1))
t))
@@
-530,6
+537,9
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(insert "From: " (or from "unknown")
"\nSubject: " (or subject "(no subject)") "\n")))
(insert "From: " (or from "unknown")
"\nSubject: " (or subject "(no subject)") "\n")))
+(deffoo nndoc-request-accept-article (group &optional server last)
+ nil)
+
;;;
;;;
@@
-562,7
+572,7
@@
One of `mbox', `babyl', `digest', `news', `rnews', `mmdf', `forward',
(funcall nndoc-head-begin-function))
(nndoc-head-begin
(nndoc-search nndoc-head-begin)))
(funcall nndoc-head-begin-function))
(nndoc-head-begin
(nndoc-search nndoc-head-begin)))
- (if (or (>= (point) (point-max))
+ (if (or (eobp)
(and nndoc-file-end
(looking-at nndoc-file-end)))
(goto-char (point-max))
(and nndoc-file-end
(looking-at nndoc-file-end)))
(goto-char (point-max))
@@
-607,9
+617,7
@@
as the last checked definition, if t or `first', add as the
first definition, and if any other symbol, add after that
symbol in the alist."
;; First remove any old instances.
first definition, and if any other symbol, add after that
symbol in the alist."
;; First remove any old instances.
- (setq nndoc-type-alist
- (delq (assq (car definition) nndoc-type-alist)
- nndoc-type-alist))
+ (gnus-pull (car definition) nndoc-type-alist)
;; Then enter the new definition in the proper place.
(cond
((or (null position) (eq position 'last))
;; Then enter the new definition in the proper place.
(cond
((or (null position) (eq position 'last))