+2003-11-07 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * 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 <tzz@lifelogs.com>
* gnus.el (gnus-group-guess-full-name-from-command-method): new function
(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."
(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