changeset 69362:29fe34ec2296

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-147 Merge from gnus--rel--5.10 Patches applied: * gnus--rel--5.10 (patch 56) - Update from CVS
author Miles Bader <miles@gnu.org>
date Fri, 10 Mar 2006 23:43:54 +0000
parents b15334da7435
children 7b2d244e58fe 494bf720eaf0
files lisp/gnus/ChangeLog lisp/gnus/gnus-group.el lisp/gnus/gnus-nocem.el lisp/gnus/gnus-start.el lisp/gnus/gnus.el lisp/gnus/smiley.el man/ChangeLog man/gnus.texi
diffstat 8 files changed, 130 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/ChangeLog	Fri Mar 10 23:43:54 2006 +0000
@@ -1,3 +1,27 @@
+2006-03-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* smiley.el: Add more test smileys.
+	(smiley-data-directory, smiley-regexp-alist)
+	(gnus-smiley-file-types): Fix doc strings.
+	(smiley-update-cache): Clear smiley-cached-regexp-alist before
+	adding new elements.
+	(smiley-mouse-map): Unused code.  Make it a comment.
+
+2006-03-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie;
+	scan latest NoCeM messages instead of old ones.
+	(gnus-nocem-check-article): Fix regexps so as to match to PGP
+	delimiters that are recently used.
+	(gnus-nocem-load-cache): Add autoload cookie.
+
+	* gnus.el (gnus-use-nocem): Enable it to be set to also a number.
+
+	* gnus-start.el (gnus-setup-news): Scan NoCeM messages if a group
+	level which is larger than gnus-use-nocem is specified.
+
+	* gnus-group.el (gnus-group-get-new-news): Ditto.
+
 2006-03-08  Reiner Steib  <Reiner.Steib@gmx.de>
 
 	* gnus-util.el (gnus-tool-bar-update): New function.
--- a/lisp/gnus/gnus-group.el	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/gnus-group.el	Fri Mar 10 23:43:54 2006 +0000
@@ -3622,7 +3622,10 @@
 
     ;; We might read in new NoCeM messages here.
     (when (and gnus-use-nocem
-	       (null arg))
+	       (or (and (numberp gnus-use-nocem)
+			(numberp arg)
+			(>= arg gnus-use-nocem))
+		   (not arg)))
       (gnus-nocem-scan-groups))
     ;; If ARG is not a number, then we read the active file.
     (when (and arg (not (numberp arg)))
--- a/lisp/gnus/gnus-nocem.el	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/gnus-nocem.el	Fri Mar 10 23:43:54 2006 +0000
@@ -136,6 +136,7 @@
 	    (gnus-sethash group t gnus-nocem-real-group-hashtb))
 	  gnus-newsrc-alist))
 
+;;;###autoload
 (defun gnus-nocem-scan-groups ()
   "Scan all NoCeM groups for new NoCeM messages."
   (interactive)
@@ -206,10 +207,10 @@
 				(not (member (mail-header-message-id header)
 					     gnus-nocem-seen-message-ids))))
 		       (push header check-headers)))
-		(let* ((i 0)
-		       (check-headers
-			(last check-headers gnus-nocem-check-article-limit))
-		       (len (length check-headers)))
+		(setq check-headers (last (nreverse check-headers)
+					  gnus-nocem-check-article-limit))
+		(let ((i 0)
+		      (len (length check-headers)))
 		  (dolist (h check-headers)
 		    (gnus-message
 		     7 "Checking article %d in %s for NoCeM (%d of %d)..."
@@ -235,9 +236,13 @@
 	       (days-to-time gnus-nocem-expiry-wait)))
       (gnus-request-article-this-buffer (mail-header-number header) group)
       (goto-char (point-min))
-      (when (re-search-forward "-----BEGIN PGP MESSAGE-----" nil t)
+      (when (re-search-forward
+	     "-----BEGIN PGP\\( SIGNED\\)? MESSAGE-----"
+	     nil t)
 	(delete-region (point-min) (match-beginning 0)))
-      (when (re-search-forward "-----END PGP MESSAGE-----\n?" nil t)
+      (when (re-search-forward
+	     "-----END PGP \\(MESSAGE\\|SIGNATURE\\)-----\n?"
+	     nil t)
 	(delete-region (match-end 0) (point-max)))
       (goto-char (point-min))
       ;; The article has to have proper NoCeM headers.
@@ -334,6 +339,7 @@
 	      gnus-nocem-alist))
       t)))
 
+;;;###autoload
 (defun gnus-nocem-load-cache ()
   "Load the NoCeM cache."
   (interactive)
--- a/lisp/gnus/gnus-start.el	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/gnus-start.el	Fri Mar 10 23:43:54 2006 +0000
@@ -1047,9 +1047,12 @@
       (gnus-check-bogus-newsgroups))
 
     ;; We might read in new NoCeM messages here.
-    (when (and gnus-use-nocem
-	       (not level)
-	       (not dont-connect))
+    (when (and (not dont-connect)
+	       gnus-use-nocem
+	       (or (and (numberp gnus-use-nocem)
+			(numberp level)
+			(>= level gnus-use-nocem))
+		   (not level)))
       (gnus-nocem-scan-groups))
 
     ;; Read any slave files.
--- a/lisp/gnus/gnus.el	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/gnus.el	Fri Mar 10 23:43:54 2006 +0000
@@ -1580,9 +1580,23 @@
 		       :value t)))
 
 (defcustom gnus-use-nocem nil
-  "*If non-nil, Gnus will read NoCeM cancel messages."
+  "*If non-nil, Gnus will read NoCeM cancel messages.
+You can also set this variable to a positive number as a group level.
+In that case, Gnus scans NoCeM messages when checking new news if this
+value is not exceeding a group level that you specify as the prefix
+argument to some commands, e.g. `gnus', `gnus-group-get-new-news', etc.
+Otherwise, Gnus does not scan NoCeM messages if you specify a group
+level to those commands."
   :group 'gnus-meta
-  :type 'boolean)
+  :type '(choice
+	  (const :tag "off" nil)
+	  (const :tag "on" t)
+	  (list :convert-widget
+		(lambda (widget)
+		  (list 'integer :tag "group level"
+			:value (if (boundp 'gnus-level-default-subscribed)
+				   gnus-level-default-subscribed
+				 3))))))
 
 (defcustom gnus-suppress-duplicates nil
   "*If non-nil, Gnus will mark duplicate copies of the same article as read."
--- a/lisp/gnus/smiley.el	Fri Mar 10 23:22:30 2006 +0000
+++ b/lisp/gnus/smiley.el	Fri Mar 10 23:43:54 2006 +0000
@@ -31,8 +31,21 @@
 ;; I'm not sure we need that degree of rococoness and defaults like a
 ;; yellow background.  Also, using PBM means we can display the images
 ;; more generally.  -- fx
+;; `smiley.el' was replaced by `smiley-ems.el' on 2002-01-26 (after fx'
+;; comment).
 
-;;; Test smileys:  :-) :-\ :-( :-/
+;; Test smileys:
+;; smile             ^:-) ^:)
+;; blink             ;-)  ;)
+;; forced            :-]
+;; braindamaged      8-)
+;; indifferent       :-|
+;; wry               :-/  :-\
+;; sad               :-(
+;; evil              >:-)
+;; cry               ;-(
+;; dead              X-)
+;; grin              :-D
 
 ;;; Code:
 
@@ -45,8 +58,9 @@
   :group 'gnus-visual)
 
 ;; Maybe this should go.
-(defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies")
-  "*Location of the smiley faces files."
+(defcustom smiley-data-directory
+  (nnheader-find-etc-directory "images/smilies")
+  "Location of the smiley faces files."
   :type 'directory
   :group 'smiley)
 
@@ -61,8 +75,8 @@
     ("\\(:-(\\)\\W" 1 "sad")
     ("\\(:-{\\)\\W" 1 "frown"))
   "*A list of regexps to map smilies to images.
-The elements are (REGEXP MATCH FILE), where MATCH is the submatch in
-regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
+The elements are (REGEXP MATCH IMAGE), where MATCH is the submatch in
+regexp to replace with IMAGE.  IMAGE is the name of an image file in
 `smiley-data-directory'."
   :type '(repeat (list regexp
 		       (integer :tag "Regexp match number")
@@ -78,7 +92,7 @@
     (when (gnus-image-type-available-p 'xpm)
       (push "xpm" types))
     types)
-  "*List of suffixes on picon file names to try."
+  "*List of suffixes on smiley file names to try."
   :version "22.1"
   :type '(repeat string)
   :group 'smiley)
@@ -86,6 +100,7 @@
 (defvar smiley-cached-regexp-alist nil)
 
 (defun smiley-update-cache ()
+  (setq smiley-cached-regexp-alist nil)
   (dolist (elt (if (symbolp smiley-regexp-alist)
 		   (symbol-value smiley-regexp-alist)
 		 smiley-regexp-alist))
@@ -104,12 +119,13 @@
 	    (push (list (car elt) (cadr elt) image)
 		  smiley-cached-regexp-alist)))))))
 
-(defvar smiley-mouse-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [down-mouse-2] 'ignore) ; override widget
-    (define-key map [mouse-2]
-      'smiley-mouse-toggle-buffer)
-    map))
+;; Not implemented:
+;; (defvar smiley-mouse-map
+;;   (let ((map (make-sparse-keymap)))
+;;     (define-key map [down-mouse-2] 'ignore) ; override widget
+;;     (define-key map [mouse-2]
+;;       'smiley-mouse-toggle-buffer)
+;;     map))
 
 ;;;###autoload
 (defun smiley-region (start end)
--- a/man/ChangeLog	Fri Mar 10 23:22:30 2006 +0000
+++ b/man/ChangeLog	Fri Mar 10 23:43:54 2006 +0000
@@ -1,3 +1,12 @@
+2006-03-10  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* gnus.texi (NoCeM): Mention gnus-use-nocem can also be a number.
+
+2006-03-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+	* gnus.texi (Fancy Mail Splitting): Improve sentences so as to be
+	easy to understand.
+
 2006-03-09  Katsumi Yamaoka  <yamaoka@jpl.org>
 
 	* gnus.texi: Markup fix.
--- a/man/gnus.texi	Fri Mar 10 23:22:30 2006 +0000
+++ b/man/gnus.texi	Fri Mar 10 23:43:54 2006 +0000
@@ -14007,18 +14007,21 @@
 regexp match expansion will be done.  See below for examples.
 
 @c Don't fold this line.
-@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-match-partial-words}])
-If the split is a list, the first element of which is a string, then
-store the message as specified by @var{split}, if header @var{field}
-(a regexp) contains @var{value} (also a regexp).  If @var{restrict}
-(yet another regexp) matches some string after @var{field} and before
-the end of the matched @var{value}, the @var{split} is ignored.  If
-none of the @var{restrict} clauses match, @var{split} is processed.
-
-The last element @var{invert-match-partial-words} is optional.  If it is
-not omitted and the value is non-@code{nil}, the match-partial-words
-behavior controlled by the @code{nnmail-split-fancy-match-partial-words}
-variable (see below) will be inverted.  (New in Gnus 5.10.7)
+@item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
+The split can be a list containing at least three elements.  If the
+first element @var{field} (a regexp matching a header) contains
+@var{value} (also a regexp) then store the message as specified by
+@var{split}.
+
+If @var{restrict} (yet another regexp) matches some string after
+@var{field} and before the end of the matched @var{value}, the
+@var{split} is ignored.  If none of the @var{restrict} clauses match,
+@var{split} is processed.
+
+The last element @var{invert-partial} is optional.  If it is
+non-@code{nil}, the match-partial-words behavior controlled by the
+variable @code{nnmail-split-fancy-match-partial-words} (see below) is
+be inverted.  (New in Gnus 5.10.7)
 
 @item (| @var{split} @dots{})
 If the split is a list, and the first element is @code{|} (vertical
@@ -14108,14 +14111,13 @@
 @code{".*@@example\\.com"} does.
 
 @item
-You can set the @var{invert-match-partial-words} flag in your split
-rules of the @samp{(@var{field} @var{value} @dots{})} types,
-aforementioned in this section.  If the flag is set, word boundaries on
-both sides of a word are ignored even if
-@code{nnmail-split-fancy-match-partial-words} is @code{nil}.
-Contrarily, if the flag is set, word boundaries are not ignored even if
-@code{nnmail-split-fancy-match-partial-words} is non-@code{nil}.  (New
-in Gnus 5.10.7)
+You can set the @var{invert-partial} flag in your split rules of the
+@samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
+section.  If the flag is set, word boundaries on both sides of a word
+are ignored even if @code{nnmail-split-fancy-match-partial-words} is
+@code{nil}.  Contrarily, if the flag is set, word boundaries are not
+ignored even if @code{nnmail-split-fancy-match-partial-words} is
+non-@code{nil}.  (New in Gnus 5.10.7)
 @end enumerate
 
 @vindex nnmail-split-abbrev-alist
@@ -21793,6 +21795,15 @@
 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
 by default.
 
+You can also set this variable to a positive number as a group level.
+In that case, Gnus scans NoCeM messages when checking new news if this
+value is not exceeding a group level that you specify as the prefix
+argument to some commands, e.g. @code{gnus},
+@code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
+NoCeM messages if you specify a group level to those commands.  For
+example, if you use 1 or 2 on the mail groups and the levels on the news
+groups remain the default, 3 is the best choice.
+
 @item gnus-nocem-groups
 @vindex gnus-nocem-groups
 Gnus will look for NoCeM messages in the groups in this list.  The