emacs-devel
[Top][All Lists]
Advanced

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

Re: Mail mode vs message mode


From: Katsumi Yamaoka
Subject: Re: Mail mode vs message mode
Date: Fri, 20 Nov 2009 09:07:45 +0900
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux)

>>>>> Chong Yidong wrote:
> I've switched several message-mode defcustoms to the mail-* values.
> I've also made some changes to the mail-* defaults, so I don't think
> message mode users should see any change (mail mode users won't see much
> difference, either).

>>>>> In <address@hidden>:
> -(defcustom message-from-style 'default
> +(defcustom message-from-style
> +  (if (featurep 'xemacs) 'default mail-from-style)

XEmacs is not special, there is no reason not to use the mail-*
values.  In addition, there are some mail-* variables unavailable
in old Emacsen that Gnus supports.  Is it ok to commit the following
change?  The patch is attached in this message.

2009-11-20  Katsumi Yamaoka  <address@hidden>

        * message.el (message-from-style, message-interactive)
        (message-signature): Always set default values from the corresponding
        mail-* variables.
        (message-cite-prefix-regexp, message-sendmail-envelope-from)
        (message-yank-prefix, message-indentation-spaces)
        (message-signature-file, message-default-headers): Use boundp rather
        than (featurep 'xemacs) to check if the corresponding mail-* variables
        exist.

I run `EMACS -batch -q' (where EMACS is Emacs 21.1, 21.2, 21.4,
22.1, 22.2, 22.3, 23.1, 23.1.50, XEmacs 21.4.22, 21.5-b29 and
SXEmacs 22.1.11) with the following script:

(princ emacs-version)
(princ "\n")
(dolist (var '(mail-from-style
               mail-interactive
               mail-citation-prefix-regexp
               mail-envelope-from
               mail-yank-prefix
               mail-indentation-spaces
               mail-signature
               mail-signature-file
               mail-default-headers
               mail-specify-envelope-from))
  (unless (boundp var)
    (princ var)
    (princ "\n")))

And I got:

21.1.1
mail-citation-prefix-regexp
mail-envelope-from
mail-yank-prefix
mail-indentation-spaces
mail-signature-file
mail-default-headers
21.2.1
mail-citation-prefix-regexp
mail-envelope-from
mail-yank-prefix
mail-indentation-spaces
mail-signature-file
mail-default-headers
21.4.1
mail-citation-prefix-regexp
mail-envelope-from
mail-yank-prefix
mail-indentation-spaces
mail-signature-file
mail-default-headers
22.1.1
mail-envelope-from
22.2.1
mail-envelope-from
22.3.1
mail-envelope-from
23.1.1
mail-envelope-from
23.1.50.1
mail-envelope-from
21.4 (patch 22) "Instant Classic" XEmacs Lucid
mail-citation-prefix-regexp
mail-envelope-from
mail-indentation-spaces
mail-signature-file
mail-default-headers
21.5  (beta29) "garbanzo" XEmacs Lucid
mail-citation-prefix-regexp
mail-envelope-from
mail-indentation-spaces
mail-signature-file
mail-default-headers
address@hidden/sxemacs--main--22.1.11--patch-33

--- message.el~ 2009-11-19 21:42:51 +0000
+++ message.el  2009-11-19 23:39:32 +0000
@@ -159,8 +159,7 @@
   :group 'message-interface
   :type 'regexp)
 
-(defcustom message-from-style
-  (if (featurep 'xemacs) 'default mail-from-style)
+(defcustom message-from-style mail-from-style
   "*Specifies how \"From\" headers look.
 
 If nil, they contain just the return address like:
@@ -434,7 +433,7 @@
   :link '(custom-manual "(message)Various Commands")
   :group 'message-various)
 
-(defcustom message-interactive (if (featurep 'xemacs) t mail-interactive)
+(defcustom message-interactive mail-interactive
   "Non-nil means when sending a message wait for and display errors.
 nil means let mailer mail back a message to report errors."
   :group 'message-sending
@@ -611,7 +610,7 @@
   :type 'regexp)
 
 (defcustom message-cite-prefix-regexp
-  (cond ((not (featurep 'xemacs))
+  (cond ((boundp 'mail-citation-prefix-regexp)
         mail-citation-prefix-regexp)
        ((string-match "[[:digit:]]" "1")
         ;; Support POSIX?  XEmacs 21.5.27 doesn't.
@@ -820,7 +819,7 @@
   :type 'boolean)
 
 (defcustom message-sendmail-envelope-from
-  (if (featurep 'xemacs) nil mail-envelope-from)
+  (if (boundp 'mail-envelope-from) mail-envelope-from)
   "*Envelope-from when sending mail with sendmail.
 This only has an effect if `mail-specify-envelope-from' is non-nil.
 If this is nil, use `user-mail-address'.  If it is the symbol
@@ -998,7 +997,9 @@
   :version "23.1" ;; No Gnus
   :group 'message-insertion)
 
-(defcustom message-yank-prefix (if (featurep 'xemacs) "> " mail-yank-prefix)
+(defcustom message-yank-prefix (if (boundp 'mail-yank-prefix)
+                                  mail-yank-prefix
+                                "> ")
   "*Prefix inserted on the lines of yanked messages.
 Fix `message-cite-prefix-regexp' if it is set to an abnormal value.
 See also `message-yank-cited-prefix' and `message-yank-empty-prefix'."
@@ -1024,7 +1025,7 @@
   :group 'message-insertion)
 
 (defcustom message-indentation-spaces
-  (if (featurep 'xemacs) 3 mail-indentation-spaces)
+  (if (boundp 'mail-indentation-spaces) mail-indentation-spaces 3)
   "*Number of spaces to insert at the beginning of each cited line.
 Used by `message-yank-original' via `message-yank-cite'."
   :group 'message-insertion
@@ -1053,7 +1054,7 @@
   :link '(custom-manual "(message)Insertion Variables")
   :group 'message-insertion)
 
-(defcustom message-signature (if (featurep 'xemacs) t mail-signature)
+(defcustom message-signature mail-signature
   "*String to be inserted at the end of the message buffer.
 If t, the `message-signature-file' file will be inserted instead.
 If a function, the result from the function will be used instead.
@@ -1063,7 +1064,7 @@
   :group 'message-insertion)
 
 (defcustom message-signature-file
-  (if (featurep 'xemacs) "~/.signature" mail-signature-file)
+  (if (boundp 'mail-signature-file) mail-signature-file "~/.signature")
   "*Name of file containing the text inserted at end of message buffer.
 Ignored if the named file doesn't exist.
 If nil, don't insert a signature.
@@ -1139,7 +1140,7 @@
   :error "All header lines must be newline terminated")
 
 (defcustom message-default-headers
-  (if (featurep 'xemacs) "" mail-default-headers)
+  (if (boundp 'mail-default-headers) mail-default-headers "")
   "*A string containing header lines to be inserted in outgoing messages.
 It is inserted before you edit the message, so you can edit or delete
 these lines."

reply via email to

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