diff options
| -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 @@ | |||
| 1 | 2011-05-13 Glenn Morris <rgm@gnu.org> | 1 | 2011-05-13 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * mail/sendmail.el (sendmail-program): Try executable-find first. | ||
| 4 | (sendmail-send-it): sendmail-program cannot be unbound. | ||
| 5 | |||
| 3 | * calendar/appt.el (appt-make-list): Simplify. | 6 | * calendar/appt.el (appt-make-list): Simplify. |
| 4 | (appt-time-msg-list): Doc fix. | 7 | (appt-time-msg-list): Doc fix. |
| 5 | (appt-check): Change mode-line message at the time of the appointment. | 8 | (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 @@ | |||
| 43 | :version "22.1") | 43 | :version "22.1") |
| 44 | 44 | ||
| 45 | (defcustom sendmail-program | 45 | (defcustom sendmail-program |
| 46 | (cond | 46 | (or (executable-find "sendmail") |
| 47 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") | 47 | (cond |
| 48 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") | 48 | ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail") |
| 49 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") | 49 | ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail") |
| 50 | (t "fakemail")) ;In ../etc, to interface to /bin/mail. | 50 | ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail") |
| 51 | (t "fakemail"))) ; in lib-src, to interface to /bin/mail | ||
| 51 | "Program used to send messages." | 52 | "Program used to send messages." |
| 53 | :version "24.1" ; added executable-find | ||
| 52 | :group 'mail | 54 | :group 'mail |
| 53 | :type 'file) | 55 | :type 'file) |
| 54 | 56 | ||
| @@ -1037,9 +1039,6 @@ external program defined by `sendmail-program'." | |||
| 1037 | delimline | 1039 | delimline |
| 1038 | fcc-was-found | 1040 | fcc-was-found |
| 1039 | (mailbuf (current-buffer)) | 1041 | (mailbuf (current-buffer)) |
| 1040 | (program (if (boundp 'sendmail-program) | ||
| 1041 | sendmail-program | ||
| 1042 | "/usr/lib/sendmail")) | ||
| 1043 | ;; Examine these variables now, so that | 1042 | ;; Examine these variables now, so that |
| 1044 | ;; local binding in the mail buffer will take effect. | 1043 | ;; local binding in the mail buffer will take effect. |
| 1045 | (envelope-from | 1044 | (envelope-from |
| @@ -1165,7 +1164,7 @@ external program defined by `sendmail-program'." | |||
| 1165 | (coding-system-for-write selected-coding) | 1164 | (coding-system-for-write selected-coding) |
| 1166 | (args | 1165 | (args |
| 1167 | (append (list (point-min) (point-max) | 1166 | (append (list (point-min) (point-max) |
| 1168 | program | 1167 | sendmail-program |
| 1169 | nil errbuf nil "-oi") | 1168 | nil errbuf nil "-oi") |
| 1170 | (and envelope-from | 1169 | (and envelope-from |
| 1171 | (list "-f" envelope-from)) | 1170 | (list "-f" envelope-from)) |