Mercurial > emacs
diff lisp/mh-e/mh-mime.el @ 65980:4520ae2624f2
* mh-init.el (mh-image-load-path): New function that adds the path to
the MH-E images to the image-load-path or load-path depending on the
version of Emacs.
* mh-customize.el: Call mh-image-load-path just before
mh-tool-bar-define so that the toolbar images can be found.
* mh-customize.el (mh-invisible-header-fields-internal)
(mh-invisible-header-fields-internal): Add Received-SPF header and
X-Gmail- prefixes seen from Gmail. Jeffrey C Honig
<jch@honig.net>
* mh-customize.el (mh-customize): Use customization group mh-e.
* mh-e.el (desktop-buffer-mode-handlers): Only add to this list if
the variable exists. Not present pre-version 22.
(Version, mh-version): Added +cvs to version.
* mh-unit.el (mh-unit): Changed lm-verify test to Emacs 22.
* Makefile: Incorporated ideas from Clemens Fruhwirth to
generalize mh-loaddefs.el to make it work for both GNU Emacs and
XEmacs.
(EMACS_OPTIONS, XEMACS_OPTIONS): Use double-dash for all long
options.
(EMACS_LOADDEFS_COOKIE): New variable for generate-autoload-cookie
setting. Obsoletes XEMACS_LOADDEFS_COOKIE.
(EMACS_EXPORT_MH_LOADDEFS): New variable for GNU Emacs commands to
rebuild mh-loaddefs.el.
(XEMACS_EXPORT_MH_LOADDEFS): New variable for XEmacs commands to
rebuild mh-loaddefs.el. Obsoletes XEMACS_LOADDEFS_FILE and
XEMACS_LOADDEFS_PKG_NAME.
(MH-E-LOADDEFS-SRC): New variable which is set to $(MH-E-SRC) on
GNU Emacs, and adds $(MH-E-XEMACS-SRC) on XEmacs.
(all): Modify EMACS_EXPORT_MH_LOADDEFS and MH-E-LOADDEFS-SRC on
XEMacs.
(mh-loaddefs.el): Now depends on $(MH-E-LOADDEFS-SRC) and has
generic compile command that works on both GNU Emacs XEmacs.
(xemacs): Depend on autoloads instead of deleted loaddefs-xemacs.
(loaddefs-xemacs): Deleted.
* mh-comp.el (mh-font-lock-field-data): Fix a bug where the
function would return t but match-data was being set to nil
(closes SF #1241017). Satyaki Das <satyaki@theforce.stanford.edu>.
* mh-comp.el (mh-insert-auto-fields): Inset identity regardless of
whether one was already set, since if one used a default identity
it would never be overridden. Peter S Galbraith
<psg@debian.org>
* mh-init.el (mh-path): Use customization group mh-e. Thanks to
Peter Whaite for these patches (closes SF #1213716).
* mh-mime.el (mh-compose-forward): Only use mh-sent-from-msg as a
default message if it's a number (as is done elsewhere).
Otherwise, an error is thrown if this function is called from a
draft created by mh-forward since this variable is a list. Also
added a space after the "Messages [%s]:" prompt.
* mh-mime.el (mh-compose-forward): Allow insertion of multiple
forwarded messages by range (including sequences). For the sent
folder the default message presented is the sent message. For
other folders, the default message is "cur", if it exists.
Jeffrey C Honig <jch@honig.net>
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Mon, 10 Oct 2005 16:37:54 +0000 |
parents | 4312387e37c8 |
children | 88d998016498 |
line wrap: on
line diff
--- a/lisp/mh-e/mh-mime.el Mon Oct 10 16:14:00 2005 +0000 +++ b/lisp/mh-e/mh-mime.el Mon Oct 10 16:37:54 2005 +0000 @@ -69,25 +69,45 @@ (call-interactively 'mh-mhn-compose-insertion))) ;;;###mh-autoload -(defun mh-compose-forward (&optional description folder message) +(defun mh-compose-forward (&optional description folder messages) "Add a MIME directive to forward a message, using mhn or gnus. If the variable `mh-compose-insertion' is set to 'mhn, then that will be used. If it is set to 'gnus, then that will be used instead. Optional argument DESCRIPTION is a description of the attachment. Optional argument FOLDER is the folder from which the forwarded message should come. -Optional argument MESSAGE is the message to forward. +Optional argument MESSAGES is the range of messages to forward. If any of the optional arguments are absent, they are prompted for." - (interactive (list - (read-string "Forw Content-description: ") - (mh-prompt-for-folder "Message from" mh-sent-from-folder nil) - (read-string (concat "Messages" - (if (numberp mh-sent-from-msg) - (format " (default %d): " mh-sent-from-msg) - ": "))))) - (if (equal mh-compose-insertion 'gnus) - (mh-mml-forward-message description folder message) - (mh-mhn-compose-forw description folder message))) + (interactive (let* + ((description (read-string "Forw Content-description: ")) + (folder (mh-prompt-for-folder "Message from" + mh-sent-from-folder nil)) + (messages (let ((default-message + (if (and (equal + folder mh-sent-from-folder) + (numberp mh-sent-from-msg)) + mh-sent-from-msg + (nth 0 (mh-translate-range + folder "cur"))))) + (if default-message + (read-string + (format "Messages (default %d): " + default-message) + nil nil + (number-to-string default-message)) + (read-string (format "Messages: ")))))) + (list description folder messages))) + (let + ((range)) + (if (null messages) + (setq messages "")) + (setq range (mh-translate-range folder messages)) + (if (null range) + (error "No messages in specified range")) + (dolist (message range) + (if (equal mh-compose-insertion 'gnus) + (mh-mml-forward-message description folder (format "%s" message)) + (mh-mhn-compose-forw description folder message))))) ;; To do: ;; paragraph code should not fill # lines if MIME enabled.