[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnus / message-send-mail-with-mailclient [patch]
From: |
David Reitter |
Subject: |
gnus / message-send-mail-with-mailclient [patch] |
Date: |
Thu, 9 Feb 2006 12:06:50 +0000 |
The send-mail-function defined specifically for the message package
doesn't work on systems where no sendmail is running.
That's why we added the `mailclient' package a while ago. The patch
below fixes the problem analogous to what has been done in the
`sendmail' package.
I noticed this when `reporter' didn't successfully send off e-mails.
Are there any other places where sendmail functionality is assumed,
but `send-mail-function' is not respected?
*** lisp/gnus/message.el 04 Feb 2006 18:25:51 +0000 1.101
--- lisp/gnus/message.el 09 Feb 2006 12:01:32 +0000
***************
*** 584,599 ****
:link '(custom-manual "(message)Canceling News")
:type 'string)
;; Useful to set in site-init.el
;;;###autoload
(defcustom message-send-mail-function 'message-send-mail-with-
sendmail
"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'.
!
Valid values include `message-send-mail-with-sendmail' (the default),
`message-send-mail-with-mh', `message-send-mail-with-qmail',
! `message-smtpmail-send-it', `smtpmail-send-it' and `feedmail-send-it'.
See also `send-mail-function'."
:type '(radio (function-item message-send-mail-with-sendmail)
--- 584,609 ----
:link '(custom-manual "(message)Canceling News")
:type 'string)
+ ;; Prevent problems with `window-system' not having the correct value
+ ;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the
+ ;; standard value.
+ ;;;###autoload
+ (put 'message-send-mail-function 'standard-value
+ '((if (and window-system (memq system-type '(darwin windows-nt)))
+ 'message-send-mail-with-mailclient
+ 'message-send-mail-with-sendmail)))
+
;; Useful to set in site-init.el
;;;###autoload
(defcustom message-send-mail-function 'message-send-mail-with-
sendmail
"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'.
!
Valid values include `message-send-mail-with-sendmail' (the default),
`message-send-mail-with-mh', `message-send-mail-with-qmail',
! `message-smtpmail-send-it', `smtpmail-send-it', `feedmail-send-it'
! and `message-send-mail-with-mailclient'.
See also `send-mail-function'."
:type '(radio (function-item message-send-mail-with-sendmail)
***************
*** 3982,3987 ****
--- 3992,4005 ----
(run-hooks 'message-send-mail-hook)
(smtpmail-send-it))
+
+ (defun message-send-mail-with-mailclient ()
+ "Send the prepared message buffer with `mailclient-send-it'.
+ This only differs from `smtpmail-send-it' that this command evaluates
+ `message-send-mail-hook' just before sending a message."
+ (run-hooks 'message-send-mail-hook)
+ (mailclient-send-it))
+
(defun message-canlock-generate ()
"Return a string that is non-trivial to guess.
Do not use this for anything important, it is cryptographically
weak."
Index: startup.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/startup.el,v
retrieving revision 1.397
diff -c -r1.397 startup.el
*** lisp/startup.el 22 Jan 2006 23:14:25 -0000 1.397
--- lisp/startup.el 9 Feb 2006 12:02:12 -0000
***************
*** 463,469 ****
(if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
term)
(setq default-frame-background-mode 'light)))
! (frame-set-background-mode (selected-frame)))))
;; Now we know the user's default font, so add it to the menu.
(if (fboundp 'font-menu-add-default)
--- 463,472 ----
(if (string-match "^\\(xterm\\|rxvt\\|dtterm\\|eterm\\)"
term)
(setq default-frame-background-mode 'light)))
! (frame-set-background-mode (selected-frame))))
!
! ;; time to make the frame visible (Aquamacs)
! (make-frame-visible))
;; Now we know the user's default font, so add it to the menu.
(if (fboundp 'font-menu-add-default)
***************
*** 741,746 ****
--- 744,752 ----
(run-hooks 'before-init-hook)
+ ;; the initial frame is hidden in Aquamacs
+ (setq initial-frame-alist (cons '(visibility . nil) initial-frame-
alist))
+
;; Under X Window, this creates the X frame and deletes the
terminal frame.
(when (fboundp 'frame-initialize)
(frame-initialize))
***************
*** 778,783 ****
--- 784,790 ----
(custom-reevaluate-setting 'mouse-wheel-up-event)
(custom-reevaluate-setting 'file-name-shadow-mode)
(custom-reevaluate-setting 'send-mail-function)
+ (custom-reevaluate-setting 'message-send-mail-function)
;; Register default TTY colors for the case the terminal hasn't a
;; terminal init file.
***************
*** 1828,1833 ****
--- 1835,1843 ----
(when (fboundp 'frame-notice-user-settings)
(frame-notice-user-settings))
+ ;; time to make the frame visible (Aquamacs)
+ (make-frame-visible)
+
;; If there are no switches to process, we might as well
;; run this hook now, and there may be some need to do it
;; before doing any output.
--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and
support the Aquamacs Project!
smime.p7s
Description: S/MIME cryptographic signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnus / message-send-mail-with-mailclient [patch],
David Reitter <=