+2005-01-29 Jari Aalto <jari.aalto@cante.net>
+
+ * gnus-sum.el (gnus-list-of-unread-articles): Improve active
+ groups error checking and notify user.
+
+2004-09-04 Jari Aalto <jari.aalto@poboxes.com>
+
+ * message.el (message-send-mail-function): Check existence of
+ sendmail-program first before using default value
+ `message-send-mail-with-sendmail'. Otherwise use more generic
+ `smtpmail-send-it'.
+
2005-02-01 Katsumi Yamaoka <yamaoka@jpl.org>
* nntp.el (nntp-request-update-info): Always return nil.
(defun gnus-list-of-unread-articles (group)
(let* ((read (gnus-info-read (gnus-get-info group)))
(active (or (gnus-active group) (gnus-activate-group group)))
- (last (cdr active))
+ (last (or (cdr active)
+ (error "Group %s couldn't be activated " group)))
first nlast unread)
;; If none are read, then all are unread.
(if (not read)
;; Useful to set in site-init.el
;;;###autoload
-(defcustom message-send-mail-function 'message-send-mail-with-sendmail
+(defcustom message-send-mail-function
+ (let ((program (if (boundp 'sendmail-program)
+ ;; see paths.el
+ sendmail-program)))
+ (cond
+ ((and program
+ (string-match "/" program) ;; Skip path
+ (file-executable-p program))
+ 'message-send-mail-with-sendmail)
+ ((and program
+ (executable-find program))
+ 'message-send-mail-with-sendmail)
+ (t
+ 'smtpmail-send-it)))
"Function to call to send the current buffer as mail.
The headers should be delimited by a line whose contents match the
variable `mail-header-separator'.