[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mail mode vs message mode

From: Reiner Steib
Subject: Re: Mail mode vs message mode
Date: Tue, 17 Nov 2009 22:10:08 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux)

[ You probably meant address@hidden not address@hidden;  Quote not trimmed. ]

On Tue, Nov 17 2009, Chong Yidong wrote:

> Chong Yidong <address@hidden> writes:
>> 1. Variables that are straightfowardly duplicated by message-mode.
>>    These variables should be either made into variable aliases (assuming
>>    no one would ever want to have different behaviors between
>>    message-mode and mail-mode):
>>    mail-from-style      message-from-style
>>    mail-envelope-from   message-envelope-from
>>    mail-interactive     message-interactive
>>    mail-yank-prefix     message-yank-prefix
>>    mail-signature       message-signature
>>    mail-signature-file  message-signature-file
>>    mail-default-headers message-default-headers
>>    mail-indentation-spaces         message-indentation-spaces

No difference here for me (Emacs 23.1).

>>    mail-mailer-swallows-blank-line message-mailer-swallows-blank-line

The latter is a defcustom.  Any other difference?

> After thinking about this some more, I think using defvaralias is a bad
> idea.
> Would anyone object to setting the default values for the message-mode
> variables to the corresponding mail-mode variables? e.g.,
> (defcustom message-from-style
>     (if (featurep 'xemacs) 'angles mail-from-style)
>     ....)

I don't like this.  The current default value of message-from-style
tries to avoid quoting if possible and therefore is preferable to
`angles'.  BTW, message-mode doesn't handle the value

I'd certainly object to change the default `message-yank-prefix' to

If I understand the correctly, the goal is not to provide full
compatibility with mail-mode but to have a default mail composition
mode that handles MIME correctly.  So how about simply providing a
function, say `message-initalize-from-mail-mode' that initializes
message variables and hooks from the corresponding mail-mode ones?

Draft (we need to check if all possible values of mail-foo make sense
for message-foo):

(defun message-initalize-from-mail-mode ()
   message-from-style                 mail-from-style
   message-envelope-from              mail-envelope-from
   message-interactive                mail-interactive
   message-yank-prefix                mail-yank-prefix
   message-signature                  mail-signature
   message-signature-file             mail-signature-file
   message-default-headers            mail-default-headers
   message-indentation-spaces         mail-indentation-spaces
   message-mailer-swallows-blank-line mail-mailer-swallows-blank-line)
   ;; hooks
   message-mode-hook     mail-mode-hook
   message-citation-hook mail-citation-hook
   message-setup-hook    mail-setup-hook
   message-send-hook     mail-send-hook))

>> 2. Hook variables.  I am not sure what to do about this, but the switch
>>    has bitten at least one use (Bug#3942).  Maybe we should make these
>>    variable aliases too:
>>    mail-mode-hook     message-mode-hook
>>    mail-citation-hook message-citation-hook
>>    mail-setup-hook    message-setup-hook
>>    mail-send-hook     message-send-hook
> Any objections to adding a new user option message-run-mail-hooks,
> which, if non-nil, causes message mode to run the corresponding mail
> hooks as well?

Bye, Reiner.
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]