changeset 80525:1e3a4955a638

Merge from gnus--rel--5.10 Revision: emacs@sv.gnu.org/emacs--rel--22--patch-257
author Miles Bader <miles@gnu.org>
date Thu, 24 Apr 2008 04:51:03 +0000
parents 5b7bb12a8a8f
children 49a6ead80df8 df6f9d73861f
files etc/GNUS-NEWS lisp/gnus/ChangeLog lisp/gnus/gnus-diary.el lisp/gnus/gnus-sum.el lisp/gnus/message.el man/ChangeLog man/gnus-faq.texi man/gnus.texi man/message.texi
diffstat 9 files changed, 180 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/etc/GNUS-NEWS	Wed Apr 23 08:57:18 2008 +0000
+++ b/etc/GNUS-NEWS	Thu Apr 24 04:51:03 2008 +0000
@@ -26,6 +26,8 @@
 the latest one are detected.  You can then remove those shadows manually
 or remove them using `make remove-installed-shadows'.
 
+** The installation directory name is allowed to have spaces and/or tabs.
+
 ** New `make.bat' for compiling and installing Gnus under MS Windows
 
 Use `make.bat' if you want to install Gnus under MS Windows, the first
@@ -436,6 +438,10 @@
 `mml-dnd-protocol-alist' and `mml-dnd-attach-options'.  *Note MIME:
 (message)MIME.
 
+** `auto-fill-mode' is enabled by default in Message mode.  See
+`message-fill-column'.  *Note Message Headers: (message)Various Message
+Variables.  (New in Gnus 5.10.12 / Emacs 22.3)
+
 
 
 * Changes in back ends
@@ -473,8 +479,8 @@
 stuff, like signing and encryption (*note Security: (message)Security.).
 
 ** The tool bars have been updated to use GNOME icons in Group, Summary and
-Message mode.  You can also customize the tool bars.  This is a new
-feature in Gnus 5.10.9.  (Only for Emacs, not in XEmacs.)
+Message mode.  You can also customize the tool bars: `M-x customize-apropos
+RET -tool-bar$' should get you started.  (Only for Emacs, not in XEmacs.)
 
 ** The tool bar icons are now (de)activated correctly in the group buffer,
 see the variable `gnus-group-update-tool-bar'.  Its default value
--- a/lisp/gnus/ChangeLog	Wed Apr 23 08:57:18 2008 +0000
+++ b/lisp/gnus/ChangeLog	Thu Apr 24 04:51:03 2008 +0000
@@ -1,3 +1,38 @@
+2008-04-13  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	[Backport GNKSA related changes from the Gnus trunk.]
+
+	* message.el (message-fill-column): New variable.
+	(message-mode): Use it.
+
+	* message.el (message-signature-separator): Change default.  Improve
+	custom type.
+	(message-cite-function): Change default to
+	message-cite-original-without-signature.
+
+	* gnus-sum.el (gnus-summary-make-menu-bar): Add message-cite-function
+	toggle.
+
+	* message.el (message-check-news-body-syntax): Fix signature check.
+	(message-setup-1): Mark buffer as unmodified _after_ running
+	message-setup-hook and handling message-alternative-emails.
+	(message-shorten-references): Be more strict when building list of
+	valid references to comply with GNKSA.
+
+2008-04-12  Adrian Aichner  <adrian@xemacs.org>
+
+	* gnus-sum.el (gnus-summary-goto-subject): Typo fix.
+
+2008-04-12  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-diary.el (gnus-article-edit-mode-map, message-mode-map): Remove
+	binding for `gnus-diary-version'.  Bind `gnus-diary-check-message' to
+	`C-c C-f d'.
+
+2008-03-29  Sven Joachim  <svenjoac@gmx.de>
+
+	* gnus-sum.el (gnus-summary-make-menu-bar): Add missing dots.
+
 2008-03-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* message.el (message-cite-original-without-signature): Mention
--- a/lisp/gnus/gnus-diary.el	Wed Apr 23 08:57:18 2008 +0000
+++ b/lisp/gnus/gnus-diary.el	Thu Apr 24 04:51:03 2008 +0000
@@ -390,8 +390,8 @@
 (add-hook 'nndiary-request-accept-article-hooks
 	  (lambda () (gnus-diary-check-message nil)))
 
-(define-key message-mode-map "\C-cDc" 'gnus-diary-check-message)
-(define-key gnus-article-edit-mode-map "\C-cDc" 'gnus-diary-check-message)
+(define-key message-mode-map "\C-c\C-fd" 'gnus-diary-check-message)
+(define-key gnus-article-edit-mode-map "\C-c\C-fd" 'gnus-diary-check-message)
 
 
 ;; The end ==================================================================
@@ -401,10 +401,6 @@
   (interactive)
   (message "NNDiary version %s" nndiary-version))
 
-(define-key message-mode-map "\C-cDv" 'gnus-diary-version)
-(define-key gnus-article-edit-mode-map "\C-cDv" 'gnus-diary-version)
-
-
 (provide 'gnus-diary)
 
 ;;; arch-tag: 98467e70-337e-4ddc-b92d-45d403ff1b4b
--- a/lisp/gnus/gnus-sum.el	Wed Apr 23 08:57:18 2008 +0000
+++ b/lisp/gnus/gnus-sum.el	Thu Apr 24 04:51:03 2008 +0000
@@ -2134,7 +2134,7 @@
 	  ["Set mark below..." gnus-score-set-mark-below t]
 	  ["Set expunge below..." gnus-score-set-expunge-below t]
 	  ["Edit current score file" gnus-score-edit-current-scores t]
-	  ["Edit score file" gnus-score-edit-file t]
+	  ["Edit score file..." gnus-score-edit-file t]
 	  ["Trace score" gnus-score-find-trace t]
 	  ["Find words" gnus-score-find-favourite-words t]
 	  ["Rescore buffer" gnus-summary-rescore t]
@@ -2408,6 +2408,29 @@
 	["Followup via news" gnus-summary-followup-to-mail t]
 	["Followup via news and yank"
 	 gnus-summary-followup-to-mail-with-original t]
+	["Strip signature on reply"
+	 (lambda ()
+	   (interactive)
+	   (if (not (memq message-cite-function
+			  '(message-cite-original-without-signature
+			    message-cite-original)))
+	       ;; Stupid workaround for XEmacs not honoring :visible.
+	       (message "Can't toggle this value of `message-cite-function'")
+	     (setq message-cite-function
+		   (if (eq message-cite-function
+			   'message-cite-original-without-signature)
+		       'message-cite-original
+		     'message-cite-original-without-signature))))
+	 ;; XEmacs barfs on :visible.
+	 ,@(if (featurep 'xemacs) nil
+	     '(:visible (memq message-cite-function
+			      '(message-cite-original-without-signature
+				message-cite-original))))
+	 :style toggle
+	 :selected (eq message-cite-function
+		       'message-cite-original-without-signature)
+	 ,@(if (featurep 'xemacs) nil
+	     '(:help "Strip signature from cited article when replying."))]
 	;;("Draft"
 	;;["Send" gnus-summary-send-draft t]
 	;;["Send bounced" gnus-resend-bounced-mail t])
@@ -7249,7 +7272,7 @@
   (gnus-summary-position-point))
 
 (defun gnus-summary-goto-subject (article &optional force silent)
-  "Go the subject line of ARTICLE.
+  "Go to the subject line of ARTICLE.
 If FORCE, also allow jumping to articles not currently shown."
   (interactive "nArticle number: ")
   (unless (numberp article)
--- a/lisp/gnus/message.el	Wed Apr 23 08:57:18 2008 +0000
+++ b/lisp/gnus/message.el	Thu Apr 24 04:51:03 2008 +0000
@@ -411,10 +411,17 @@
 
 ;;; End of variables adopted from `message-utils.el'.
 
-;;;###autoload
-(defcustom message-signature-separator "^-- *$"
-  "Regexp matching the signature separator."
-  :type 'regexp
+(defcustom message-signature-separator "^-- $"
+  "Regexp matching the signature separator.
+This variable is used to strip off the signature from quoted text
+when `message-cite-function' is
+`message-cite-original-without-signature'.  Most useful values
+are \"^-- $\" (strict) and \"^-- *$\" (loose; allow missing
+whitespace)."
+  :type '(choice (const :tag "strict" "^-- $")
+		 (const :tag "loose" "^-- *$")
+		 regexp)
+  :version "22.3" ;; Gnus 5.10.12 (changed default)
   :link '(custom-manual "(message)Various Message Variables")
   :group 'message-various)
 
@@ -821,6 +828,15 @@
                  (const :tag "All" t)
                  (repeat (sexp :tag "Header"))))
 
+(defcustom message-fill-column 72
+  "Column beyond which automatic line-wrapping should happen.
+Local value for message buffers.  If non-nil, also turn on
+auto-fill in message buffers."
+  :group 'message-various
+  ;; :link '(custom-manual "(message)Message Headers")
+  :type '(choice (const :tag "Don't turn on auto fill" nil)
+                 (integer)))
+
 (defcustom message-setup-hook nil
   "Normal hook, run each time a new outgoing message is initialized.
 The function `message-setup' runs this hook."
@@ -904,7 +920,7 @@
   :type 'integer)
 
 ;;;###autoload
-(defcustom message-cite-function 'message-cite-original
+(defcustom message-cite-function 'message-cite-original-without-signature
   "*Function for citing an original message.
 Predefined functions include `message-cite-original' and
 `message-cite-original-without-signature'.
@@ -914,6 +930,7 @@
 		(function-item sc-cite-original)
 		(function :tag "Other"))
   :link '(custom-manual "(message)Insertion Variables")
+  :version "22.3" ;; Gnus 5.10.12 (changed default)
   :group 'message-insertion)
 
 ;;;###autoload
@@ -2632,6 +2649,9 @@
   (set (make-local-variable 'message-checksum) nil)
   (set (make-local-variable 'message-mime-part) 0)
   (message-setup-fill-variables)
+  (when message-fill-column
+    (setq fill-column message-fill-column)
+    (turn-on-auto-fill))
   ;; Allow using comment commands to add/remove quoting.
   ;; (set (make-local-variable 'comment-start) message-yank-prefix)
   (when message-yank-prefix
@@ -4625,12 +4645,16 @@
    ;; 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))
@@ -5424,8 +5448,10 @@
     (with-temp-buffer
       (insert references)
       (goto-char (point-min))
-      ;; Cons a list of valid references.
-      (while (re-search-forward "<[^>]+>" nil t)
+      ;; Cons a list of valid references.  GNKSA says we must not include MIDs
+      ;; with whitespace or missing brackets (7.a "Does not propagate broken
+      ;; Message-IDs in original References").
+      (while (re-search-forward "<[^ <]+@[^ <]+>" nil t)
 	(push (match-string 0) refs))
       (setq refs (nreverse refs)
 	    count (length refs)))
@@ -5761,8 +5787,9 @@
   (save-restriction
     (message-narrow-to-headers)
     (run-hooks 'message-header-setup-hook))
-  (set-buffer-modified-p nil)
   (setq buffer-undo-list nil)
+  ;; Gnus posting styles are applied via buffer-local `message-setup-hook'
+  ;; values.
   (run-hooks 'message-setup-hook)
   ;; Do this last to give it precedence over posting styles, etc.
   (when (message-mail-p)
@@ -5771,6 +5798,8 @@
       (if message-alternative-emails
 	  (message-use-alternative-email-as-from))))
   (message-position-point)
+  ;; Allow correct handling of `message-checksum' in `message-yank-original':
+  (set-buffer-modified-p nil)
   (undo-boundary))
 
 (defun message-set-auto-save-file-name ()
--- a/man/ChangeLog	Wed Apr 23 08:57:18 2008 +0000
+++ b/man/ChangeLog	Thu Apr 24 04:51:03 2008 +0000
@@ -1,8 +1,41 @@
+2008-04-13  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus-faq.texi ([5.2]): Adjust for message-fill-column.
+
+	* gnus.texi (Oort Gnus): Add message-fill-column.
+
+	* message.texi (Various Message Variables): Add message-fill-column.
+
+2008-04-12  Adrian Aichner  <adrian@xemacs.org>
+
+	* gnus.texi (Mail Source Specifiers): Typo fix.
+
+2008-04-12  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Diary Headers Generation): Update key binding for
+	`gnus-diary-check-message'.
+
+2008-04-11  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi, gnus-faq.texi, message.texi: Bump version to 5.10.11.
+
 2008-04-11  Mirko Vukovic  <mirko.vukovic@gmail.com>  (tiny change)
 
 	* maintaining.texi (Maintaining):
 	* emacs.texi (Top): Typo.
 
+2008-04-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi, gnus-faq.texi, message.texi: Gnus v5.10.10 is released.
+
+2008-04-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Emacsen): Give recommendations for Emacs 22 and Emacs 23.
+
+2008-04-09  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Oort Gnus): Mention customizing of tool bars.
+
 2008-04-09  Michael Albinus  <michael.albinus@gmx.de>
 
 	* trampver.texi: Update release number.
--- a/man/gnus-faq.texi	Wed Apr 23 08:57:18 2008 +0000
+++ b/man/gnus-faq.texi	Thu Apr 24 04:51:03 2008 +0000
@@ -129,7 +129,7 @@
 Jingle please: Gnus 5.10 is released, get it while it's
 hot! As well as the step in version number is rather
 small, Gnus 5.10 has tons of new features which you
-shouldn't miss. The current release (5.10.9) should be at
+shouldn't miss. The current release (5.10.11) should be at
 least as stable as the latest release of the 5.8 series.
 
 @node [1.2]
@@ -1287,18 +1287,23 @@
 
 @subsubheading Answer
 
-Say
+Starting from Gnus 5.10.12, automatic word-wrap is already enabled by
+default, see the variable message-fill-column.
+
+For other versions of Gnus, say
 
 @example
-(add-hook 'message-mode-hook
-	  (lambda ()
-	    (setq fill-column 72)
-	    (turn-on-auto-fill)))
+(unless (boundp 'message-fill-column)
+  (add-hook 'message-mode-hook
+            (lambda ()
+              (setq fill-column 72)
+              (turn-on-auto-fill))))
 @end example
 @noindent
 
-in ~/.gnus.el. You can reformat a paragraph by hitting
-@samp{M-q} (as usual)
+in ~/.gnus.el.
+
+You can reformat a paragraph by hitting @samp{M-q} (as usual).
 
 @node [5.3]
 @subsubheading Question 5.3
--- a/man/gnus.texi	Wed Apr 23 08:57:18 2008 +0000
+++ b/man/gnus.texi	Thu Apr 24 04:51:03 2008 +0000
@@ -13959,7 +13959,7 @@
 
 @item :mailbox
 The name of the mailbox to get mail from.  The default is @samp{INBOX}
-which normally is the mailbox which receive incoming mail.
+which normally is the mailbox which receives incoming mail.
 
 @item :predicate
 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
@@ -18299,9 +18299,9 @@
 
   This function is hooked into the @code{nndiary} back end, so that
 moving or copying an article to a diary group will trigger it
-automatically.  It is also bound to @kbd{C-c D c} in @code{message-mode}
-and @code{article-edit-mode} in order to ease the process of converting
-a usual mail to a diary one.
+automatically.  It is also bound to @kbd{C-c C-f d} in
+@code{message-mode} and @code{article-edit-mode} in order to ease the
+process of converting a usual mail to a diary one.
 
   This function takes a prefix argument which will force prompting of
 all diary headers, regardless of their presence or validity.  That way,
@@ -25570,7 +25570,7 @@
 @cindex Mule
 @cindex Emacs
 
-Gnus should work on:
+This Gnus version should work on:
 
 @itemize @bullet
 
@@ -27240,7 +27240,12 @@
 @item You can now drag and drop attachments to the Message buffer.
 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
 @xref{MIME, ,MIME, message, Message Manual}.
-@c New in 5.10.9 / 5.11
+@c New in 5.10.9 / 5.11 (Emacs 21.1)
+
+@item @code{auto-fill-mode} is enabled by default in Message mode.
+See @code{message-fill-column}.  @xref{Various Message Variables, ,
+Message Headers, message, Message Manual}.
+@c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
 
 @end itemize
 
@@ -27293,8 +27298,9 @@
 
 @item
 The tool bars have been updated to use GNOME icons in Group, Summary and
-Message mode.  You can also customize the tool bars.  This is a new
-feature in Gnus 5.10.9.  (Only for Emacs, not in XEmacs.)
+Message mode.  You can also customize the tool bars: @kbd{M-x
+customize-apropos RET -tool-bar$} should get you started.  This is a new
+feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
 
 @item The tool bar icons are now (de)activated correctly
 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
--- a/man/message.texi	Wed Apr 23 08:57:18 2008 +0000
+++ b/man/message.texi	Thu Apr 24 04:51:03 2008 +0000
@@ -1968,6 +1968,13 @@
 Emacs MIME Manual}, for details on the @sc{mule}-to-@acronym{MIME}
 translation process.
 
+@item message-fill-column
+@vindex message-fill-column
+@cindex auto-fill
+Local value for the column beyond which automatic line-wrapping should
+happen for message buffers.  If non-nil (the default), also turn on
+auto-fill in message buffers.
+
 @item message-signature-separator
 @vindex message-signature-separator
 Regexp matching the signature separator.  It is @samp{^-- *$} by