diff options
author | Glenn Morris <rgm@gnu.org> | 2011-05-12 18:42:24 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2011-05-12 18:42:24 -0700 |
commit | 8340026caeee82b1972f40e7a1bd0d83edbaecef (patch) | |
tree | ba1df34eaeeab7f0d674d320a194d6720a682f5a /lisp | |
parent | a54640143dc093c1d3572f344b231da2d4508c8f (diff) | |
download | emacs-8340026caeee82b1972f40e7a1bd0d83edbaecef.tar.gz |
sendmail.el trivia.
* lisp/mail/sendmail.el (sendmail-program): Try executable-find first.
(sendmail-send-it): sendmail-program cannot be unbound.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/mail/sendmail.el | 17 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 004be53a3b2..ccfc6f6a405 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2011-05-13 Glenn Morris <rgm@gnu.org> + * 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. diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index 069ad9662a2..ed4270d484c 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -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 @@ external program defined by `sendmail-program'." 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 @@ external program defined by `sendmail-program'." (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)) |