(message-check-news-header-syntax): Check long
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 5 Jan 2003 08:48:11 +0000 (08:48 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 5 Jan 2003 08:48:11 +0000 (08:48 +0000)
header lines.

lisp/ChangeLog
lisp/message.el

index a44cbed..79bd483 100644 (file)
@@ -1,5 +1,8 @@
 2003-01-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * message.el (message-check-news-header-syntax): Check long
+       header lines.
+
        * gnus-group.el (gnus-group-expire-articles): Doc fix.
        (gnus-group-line-format): %U.
        (gnus-group-line-format-alist): ?U.
index 7a62ec5..48a6ec6 100644 (file)
@@ -189,7 +189,7 @@ Checks include `subject-cmsg', `multiple-headers', `sendsys',
 `approved', `sender', `empty', `empty-headers', `message-id', `from',
 `subject', `shorten-followup-to', `existing-newsgroups',
 `buffer-file-name', `unchanged', `newsgroups', `reply-to',
-'continuation-headers'."
+'continuation-headers', and `long-header-lines'."
   :group 'message-news
   :type '(repeat sexp))                        ; Fixme: improve this
 
@@ -3771,6 +3771,18 @@ Otherwise, generate and save a value for `canlock-password' first."
         (y-or-n-p
          "The control code \"cmsg\" is in the subject.  Really post? ")
        t))
+   ;; Check long header lines.
+   (message-check 'long-header-lines
+     (let ((start (point))
+          found)
+       (while (and (not found)
+                  (re-search-forward "^[^ \t:]+: " nil t))
+        (when (> (- (point) start) 998)
+          (setq found t))
+        (forward-line 1))
+       (if found
+          (y-or-n-p "You have a header that's too long.  Really post? ")
+        t)))
    ;; Check for multiple identical headers.
    (message-check 'multiple-headers
      (let (found)