emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104212: sendmail.el trivia.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104212: sendmail.el trivia.
Date: Thu, 12 May 2011 18:42:24 -0700
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104212
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-05-12 18:42:24 -0700
message:
  sendmail.el trivia.
  
  * lisp/mail/sendmail.el (sendmail-program): Try executable-find first.
  (sendmail-send-it): sendmail-program cannot be unbound.
modified:
  lisp/ChangeLog
  lisp/mail/sendmail.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-05-13 01:38:31 +0000
+++ b/lisp/ChangeLog    2011-05-13 01:42:24 +0000
@@ -1,5 +1,8 @@
 2011-05-13  Glenn Morris  <address@hidden>
 
+       * mail/sendmail.el (sendmail-program): Try executable-find first.
+       (sendmail-send-it): sendmail-program cannot be unbound.
+
        * calendar/appt.el (appt-make-list): Simplify.
        (appt-time-msg-list): Doc fix.
        (appt-check): Change mode-line message at the time of the appointment.

=== modified file 'lisp/mail/sendmail.el'
--- a/lisp/mail/sendmail.el     2011-05-07 17:58:40 +0000
+++ b/lisp/mail/sendmail.el     2011-05-13 01:42:24 +0000
@@ -43,12 +43,14 @@
   :version "22.1")
 
 (defcustom sendmail-program
-  (cond
-    ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
-    ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
-    ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
-    (t "fakemail"))                    ;In ../etc, to interface to /bin/mail.
+  (or (executable-find "sendmail")
+      (cond
+       ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
+       ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
+       ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
+       (t "fakemail")))               ; in lib-src, to interface to /bin/mail
   "Program used to send messages."
+  :version "24.1"                      ; added executable-find
   :group 'mail
   :type 'file)
 
@@ -1037,9 +1039,6 @@
        delimline
        fcc-was-found
        (mailbuf (current-buffer))
-       (program (if (boundp 'sendmail-program)
-                    sendmail-program
-                  "/usr/lib/sendmail"))
        ;; Examine these variables now, so that
        ;; local binding in the mail buffer will take effect.
        (envelope-from
@@ -1165,7 +1164,7 @@
                     (coding-system-for-write selected-coding)
                     (args
                      (append (list (point-min) (point-max)
-                                   program
+                                   sendmail-program
                                    nil errbuf nil "-oi")
                              (and envelope-from
                                   (list "-f" envelope-from))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]