From Jari Aalto.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 2 Feb 2005 01:36:28 +0000 (01:36 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 2 Feb 2005 01:36:28 +0000 (01:36 +0000)
* gnus-sum.el (gnus-list-of-unread-articles): Improve active groups error
 checking and notify user.

* 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'.

lisp/ChangeLog
lisp/gnus-sum.el
lisp/message.el

index 2755ae8..31aaeab 100644 (file)
@@ -1,3 +1,15 @@
+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.
index 012b6eb..553cc90 100644 (file)
@@ -6429,7 +6429,8 @@ displayed, no centering will be performed."
 (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)
index 9b1da37..7190715 100644 (file)
@@ -594,7 +594,20 @@ Done before generating the new subject of a forward."
 
 ;; 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'.