(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")
(article-begin . ,(concat "^\n" (make-string 30 ?-) "\n\n+"))
(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
(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))