Checks include subject-cmsg multiple-headers sendsys message-id from
long-lines control-chars size new-text redirected-followup signature
approved sender empty empty-headers message-id from subject
-shorten-followup-to existing-newsgroups buffer-file-name unchanged."
+shorten-followup-to existing-newsgroups buffer-file-name unchanged
+newsgroups."
:group 'message-news)
(defcustom message-required-news-headers
(cond
((not (fboundp 'find-coding-system)) nil)
((find-coding-system 'emacs-mule)
- (if (string-match "nt" system-configuration)
+ (if (memq system-type '(windows-nt ms-dos ms-windows))
'emacs-mule-dos 'emacs-mule))
((find-coding-system 'escape-quoted) 'escape-quoted)
((find-coding-system 'no-conversion) 'no-conversion)
"Move point to the end of the headers."
(interactive)
(message-goto-body)
- (forward-line -2))
+ (forward-line -1))
(defun message-goto-signature ()
"Move point to the beginning of the message signature.
(goto-char (point-min))
(search-forward (concat "\n" mail-header-separator "\n") nil t)
(let ((fill-prefix message-yank-prefix))
- (fill-individual-paragraphs (point) (point-max) justifyp t))))
+ (fill-individual-paragraphs (point) (point-max) justifyp))))
(defun message-indent-citation ()
"Modify text just inserted from a message to be cited.
(car elem))))
(setq success (funcall (caddr elem) arg)))))
(setq sent t))))
+ (unless sent
+ (error "No methods specified to send by"))
(prog1
(when (and success sent)
(message-do-fcc)
;; Remove some headers.
(save-restriction
(message-narrow-to-headers)
- ;; We (re)generate the Lines header.
- (when (memq 'Lines message-required-mail-headers)
- (message-generate-headers '(Lines)))
+;; We Semi-gnus people have no use for it.
+;; ;; We (re)generate the Lines header.
+;; (when (memq 'Lines message-required-mail-headers)
+;; (message-generate-headers '(Lines)))
;; Remove some headers.
(message-remove-header message-ignored-mail-headers t))
(goto-char (point-max))
;; Remove some headers.
(save-restriction
(message-narrow-to-headers)
- ;; We (re)generate the Lines header.
- (when (memq 'Lines message-required-mail-headers)
- (message-generate-headers '(Lines)))
+;; We Semi-gnus people have no use for it.
+;; ;; We (re)generate the Lines header.
+;; (when (memq 'Lines message-required-mail-headers)
+;; (message-generate-headers '(Lines)))
;; Remove some headers.
(message-remove-header message-ignored-news-headers t))
(goto-char (point-max))
(defun message-check-news-header-syntax ()
(and
+ ;; Check Newsgroups header.
+ (message-check 'newsgroyps
+ (let ((group (message-fetch-field "newsgroups")))
+ (or
+ (and group
+ (not (string-match "\\`[ \t]*\\'" group)))
+ (ignore
+ (message
+ "The newsgroups field is empty or missing. Posting is denied.")))))
;; Check the Subject header.
(message-check 'subject
(let* ((case-fold-search t)
(message-check 'from
(let* ((case-fold-search t)
(from (message-fetch-field "from"))
- (ad (nth 1 (std11-extract-address-components from))))
+ ad)
(cond
((not from)
(message "There is no From line. Posting is denied.")
nil)
- ((or (not (string-match "@[^\\.]*\\." ad)) ;larsi@ifi
+ ((or (not (string-match
+ "@[^\\.]*\\."
+ (setq ad (nth 1 (mail-extract-address-components
+ from))))) ;larsi@ifi
(string-match "\\.\\." ad) ;larsi@ifi..uio
(string-match "@\\." ad) ;larsi@.ifi.uio
(string-match "\\.$" ad) ;larsi@ifi.uio.
parse-time-months))))
(format-time-string "%Y %H:%M:%S " now)
;; We do all of this because XEmacs doesn't have the %z spec.
- (format "%s%02d%02d" sign (/ zone 3600) (% zone 3600)))))
+ (format "%s%02d%02d" sign (/ zone 3600) (/ (% zone 3600) 60)))))
(defun message-make-followup-subject (subject)
"Make a followup Subject."
from subject date to cc
references message-id follow-to
(inhibit-point-motion-hooks t)
+ (message-this-is-mail t)
mct never-mct mft mrt gnus-warning in-reply-to)
(save-restriction
(message-narrow-to-head)