+2003-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * message.el (message-check-news-header-syntax): Compute the
+ header length correctly.
+
2002-01-10 Kevin Greiner <kgreiner@xpediantsolutions.com>
* gnus-agent.el (gnus-agent-expire): Do not remove article from
(when (file-exists-p file)
(let ((done nil)
(attempt "")
+ (step 72)
(quant 16))
(while (and (not done)
(> quant 1))
(insert attempt)
(base64-encode-region (point-min) (point-max))
(goto-char (point-min))
- (forward-line 1)
- (while (not (eobp))
- (insert " ")
- (forward-line 1))
+ (while (search-forward "\n" nil t)
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (> (- (point-max) (point))
+ step)
+ (forward-char step)
+ (insert "\n ")
+ (setq step 76))
(buffer-string))
nil))))
;; Check long header lines.
(message-check 'long-header-lines
(let ((start (point))
+ (header nil)
+ (length 0)
found)
(while (and (not found)
(re-search-forward "^\\([^ \t:]+\\): " nil t))
- (when (> (- (point) start) 998)
- (setq found t))
+ (if (> (- (point) (match-beginning 0)) 998)
+ (setq found t
+ length (- (point) (match-beginning 0)))
+ (setq header (match-string-no-properties 1)))
(setq start (match-beginning 0))
(forward-line 1))
(if found
- (y-or-n-p (format "Your %s header is too long. Really post? "
- (match-string 1)))
+ (y-or-n-p (format "Your %s header is too long (%d). Really post? "
+ header length))
t)))
;; Check for multiple identical headers.
(message-check 'multiple-headers