From: yamaoka Date: Sat, 8 Nov 2003 00:19:33 +0000 (+0000) Subject: Synch to Gnus 200311071840. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7cdff2f839d84676fb52b3588ac5f7d3c9f74bba;p=elisp%2Fgnus.git- Synch to Gnus 200311071840. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 776f89e..9d7c5de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,12 @@ +2003-11-07 Teodor Zlatanov + + * nnmail.el (nnmail-cache-insert): make sure that the + nnmail-spool-hook is called with a valid newsgroup name (though + it may be wrong) + + * gnus.el (gnus-group-real-prefix): return nil if group is not a + string, instead of triggering an error + 2003-11-06 Teodor Zlatanov * gnus.el (gnus-group-guess-full-name-from-command-method): new function diff --git a/lisp/gnus.el b/lisp/gnus.el index 8e3fd57..37ca7a4 100644 --- a/lisp/gnus.el +++ b/lisp/gnus.el @@ -3363,9 +3363,11 @@ server is native)." (defun gnus-group-real-prefix (group) "Return the prefix of the current group name." - (if (string-match "^[^:]+:" group) - (substring group 0 (match-end 0)) - "")) + (if (stringp group) + (if (string-match "^[^:]+:" group) + (substring group 0 (match-end 0)) + "") + nil)) (defun gnus-group-short-name (group) "Return the short group name." diff --git a/lisp/nnmail.el b/lisp/nnmail.el index 16a81ff..6912cf3 100644 --- a/lisp/nnmail.el +++ b/lisp/nnmail.el @@ -1498,8 +1498,10 @@ See the documentation for the variable `nnmail-split-fancy' for details." (defvar group-art) (defun nnmail-cache-insert (id grp &optional subject) (when (stringp id) - (run-hook-with-args 'nnmail-spool-hook - id grp subject) + ;; this will handle cases like `B r' where the group is nil + (let ((grp (or grp gnus-newsgroup-name "UNKNOWN"))) + (run-hook-with-args 'nnmail-spool-hook + id grp subject)) (when nnmail-treat-duplicates ;; Store some information about the group this message is written ;; to. This is passed in as the grp argument -- all locations this