Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: ding@gnus.org, emacs-devel@gnu.org
Subject: Re: Mail mode vs message mode
Date: Fri, 20 Nov 2009 09:07:45 +0900	[thread overview]
Message-ID: <b4meinu12jy.fsf@jpl.org> (raw)
In-Reply-To: <87vdh6focv.fsf@stupidchicken.com>

[-- Attachment #1: Type: text/plain, Size: 2632 bytes --]

>>>>> 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 <E1NBA9i-0007bh-Va@cvs.savannah.gnu.org>:
> -(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  <yamaoka@jpl.org>

	* 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
steve@sxemacs.org--2009/sxemacs--main--22.1.11--patch-33


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 3428 bytes --]

--- 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	other threads:[~2009-11-20  0:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87639beb4n.fsf@stupidchicken.com>
     [not found] ` <876399p00j.fsf@stupidchicken.com>
2009-11-17 21:10   ` Reiner Steib
2009-11-18 16:53     ` Chong Yidong
2009-11-18 19:20       ` Reiner Steib
2009-11-19 14:56         ` Teemu Likonen
2009-11-19 16:53         ` Chong Yidong
2009-11-20  0:07           ` Katsumi Yamaoka [this message]
2009-11-22 15:55             ` Reiner Steib
2009-11-24  9:19               ` Katsumi Yamaoka
2009-11-25 21:40                 ` Reiner Steib
2009-11-25 23:02                   ` Stefan Monnier
2009-11-25 23:13                     ` Chong Yidong
2009-11-26  1:27                       ` Stefan Monnier
2009-11-26  1:43                         ` Miles Bader
2009-11-28 13:47                           ` Stefan Monnier
2009-11-27  8:41                   ` Katsumi Yamaoka
2009-11-27 14:51                     ` Chong Yidong
2009-11-29  0:32                       ` Katsumi Yamaoka
2009-11-29 18:49                         ` Chong Yidong
2009-11-30  0:00                           ` Katsumi Yamaoka
2009-11-22 15:55           ` Reiner Steib

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4meinu12jy.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=cyd@stupidchicken.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).