* message.el (message-check-news-body-syntax): Fix signature check.
authorReiner Steib <Reiner.Steib@gmx.de>
Mon, 24 Mar 2008 18:16:27 +0000 (18:16 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Mon, 24 Mar 2008 18:16:27 +0000 (18:16 +0000)
lisp/ChangeLog
lisp/message.el

index a2fb06a..6e791e2 100644 (file)
@@ -1,5 +1,7 @@
 2008-03-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
+       * message.el (message-check-news-body-syntax): Fix signature check.
+
         * gnus-group.el (gnus-read-ephemeral-bug-group)
         (gnus-read-ephemeral-debian-bug-group)
         (gnus-read-ephemeral-emacs-bug-group): Use the correct variable.
index 16440db..21cf811 100644 (file)
@@ -5059,12 +5059,16 @@ Otherwise, generate and save a value for `canlock-password' first."
    ;; Check the length of the signature.
    (message-check 'signature
      (goto-char (point-max))
-     (if (> (count-lines (point) (point-max)) 5)
-        (y-or-n-p
-         (format
-          "Your .sig is %d lines; it should be max 4.  Really post? "
-          (1- (count-lines (point) (point-max)))))
-       t))
+     (if (not (re-search-backward message-signature-separator nil t))
+        t
+       (if (>= (count-lines (1+ (point-at-eol)) (point-max)) 5)
+          (if (message-gnksa-enable-p 'signature)
+              (y-or-n-p
+               (format "Signature is excessively long (%d lines).  Really post? "
+                       (count-lines (1+ (point-at-eol)) (point-max))))
+            (message "Denied posting -- Excessive signature.")
+            nil)
+        t)))
    ;; Ensure that text follows last quoted portion.
    (message-check 'quoting-style
      (goto-char (point-max))