]> code.delx.au - gnu-emacs/commitdiff
(mh-send-letter): Use split-string to break up mh-send-args (closes SF
authorBill Wohler <wohler@newt.com>
Thu, 16 Mar 2006 17:38:14 +0000 (17:38 +0000)
committerBill Wohler <wohler@newt.com>
Thu, 16 Mar 2006 17:38:14 +0000 (17:38 +0000)
#1448604).
(mh-compose-and-send-mail): Use run-hook-with-args for
mh-compose-letter-function.

lisp/mh-e/ChangeLog
lisp/mh-e/mh-comp.el

index 6bec45ec1434777c80e502b35d0814070b677db7..012bdfe0a591f93f2d87d5f7a61c76f769036348 100644 (file)
@@ -1,5 +1,10 @@
 2006-03-16  Bill Wohler  <wohler@newt.com>
 
+       * mh-comp.el (mh-send-letter): Use split-string to break up
+       mh-send-args (closes SF #1448604).
+       (mh-compose-and-send-mail): Use run-hook-with-args for
+       mh-compose-letter-function.
+
        * mh-e.el (mh-list-to-string-1): Use dolist.
 
        * mh-compat.el (mh-image-load-path-for-library): Prefer user's
index 0cedc83719cfa20a9df6db14caa941a2d45998c4..8a7e791d6cd3c1bcebd59064e7bc53565e0702e0 100644 (file)
@@ -287,7 +287,7 @@ use `mh-send-prog' to tell MH-E the name."
            (set-buffer draft-buffer))   ; for annotation below
           (t
            (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose"
-                               mh-send-args file-name)))
+                               (split-string mh-send-args) file-name)))
     (if mh-annotate-char
         (mh-annotate-msg mh-sent-from-msg
                          mh-sent-from-folder
@@ -895,15 +895,7 @@ letter."
   (mh-logo-display)
   (mh-make-local-hook 'kill-buffer-hook)
   (add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t)
-  (if (and (boundp 'mh-compose-letter-function)
-           mh-compose-letter-function)
-      ;; run-hooks will not pass arguments.
-      (let ((value mh-compose-letter-function))
-        (if (and (listp value) (not (eq (car value) 'lambda)))
-            (while value
-              (funcall (car value) to subject cc)
-              (setq value (cdr value)))
-          (funcall mh-compose-letter-function to subject cc)))))
+  (run-hook-with-args 'mh-compose-letter-function to subject cc))
 
 (defun mh-insert-x-mailer ()
   "Append an X-Mailer field to the header.