[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el |
Date: |
Thu, 19 Nov 2009 16:48:34 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/11/19 16:48:34
Modified files:
lisp : ChangeLog
lisp/mail : sendmail.el
Log message:
* mail/sendmail.el (mail-yank-prefix): Change default to "> ".
(mail-signature): Change default to t.
(mail-from-style): Deprecate `system-default' value.
(mail-insert-from-field): For default value of mail-from-style,
default to `angles' unless `angles' needs quoting and `parens'
does not.
(mail-citation-prefix-regexp): Use citation regexp from
message-mode.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.16668&r2=1.16669
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/sendmail.el?cvsroot=emacs&r1=1.335&r2=1.336
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.16668
retrieving revision 1.16669
diff -u -b -r1.16668 -r1.16669
--- ChangeLog 19 Nov 2009 09:25:40 -0000 1.16668
+++ ChangeLog 19 Nov 2009 16:48:30 -0000 1.16669
@@ -1,3 +1,14 @@
+2009-11-19 Chong Yidong <address@hidden>
+
+ * mail/sendmail.el (mail-yank-prefix): Change default to "> ".
+ (mail-signature): Change default to t.
+ (mail-from-style): Deprecate `system-default' value.
+ (mail-insert-from-field): For default value of mail-from-style,
+ default to `angles' unless `angles' needs quoting and `parens'
+ does not.
+ (mail-citation-prefix-regexp): Use citation regexp from
+ message-mode.
+
2009-11-19 Michael Albinus <address@hidden>
* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Set
Index: mail/sendmail.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/sendmail.el,v
retrieving revision 1.335
retrieving revision 1.336
diff -u -b -r1.335 -r1.336
--- mail/sendmail.el 6 Nov 2009 05:16:29 -0000 1.335
+++ mail/sendmail.el 19 Nov 2009 16:48:33 -0000 1.336
@@ -58,7 +58,7 @@
:type 'file)
;;;###autoload
-(defcustom mail-from-style 'angles
+(defcustom mail-from-style 'default
"Specifies how \"From:\" fields look.
If `nil', they contain just the return address like:
@@ -67,15 +67,14 @@
address@hidden (Elvis Parsley)
If `angles', they look like:
Elvis Parsley <address@hidden>
-If `system-default', allows the mailer to insert its default From field
-derived from the envelope-from address.
-In old versions of Emacs, the `system-default' setting also caused
-Emacs to pass the proper email address from `user-mail-address'
-to the mailer to specify the envelope-from address. But that is now
-controlled by a separate variable, `mail-specify-envelope-from'."
- :type '(choice (const nil) (const parens) (const angles)
- (const system-default))
+Otherwise, most addresses look like `angles', but they look like
+`parens' if `angles' would need quoting and `parens' would not."
+ ;; The value `system-default' is now deprecated.
+ :type '(choice (const :tag "simple" nil)
+ (const parens)
+ (const angles)
+ (const default))
:version "20.3"
:group 'sendmail)
@@ -241,7 +240,7 @@
"The modification time of your mail alias file when it was last examined.")
;;;###autoload
-(defcustom mail-yank-prefix nil
+(defcustom mail-yank-prefix "> "
"Prefix insert on lines of yanked message being replied to.
If this is nil, use indentation, as specified by `mail-indentation-spaces'."
:type '(choice (const nil) string)
@@ -284,7 +283,8 @@
regardless of what part of it (if any) is included in the cited text.")
;;;###autoload
-(defcustom mail-citation-prefix-regexp (purecopy "[ \t]*[-a-z0-9A-Z]*>+[
\t]*\\|[ \t]*")
+(defcustom mail-citation-prefix-regexp
+ (purecopy "\\([ \t]*\\(\\w\\|[_.]\\)+>+\\|[ \t]*[]>|}]\\)+")
"Regular expression to match a citation prefix plus whitespace.
It should match whatever sort of citation prefixes you want to handle,
with whitespace before and after; it should also match just whitespace.
@@ -393,7 +393,7 @@
nil)
;;;###autoload
-(defcustom mail-signature nil
+(defcustom mail-signature t
"Text inserted at end of mail buffer when a message is initialized.
If t, it means to insert the contents of the file `mail-signature-file'.
If a string, that string is inserted.
@@ -955,7 +955,21 @@
(if (string-match "[^\0-\177]" fullname)
(setq fullname (rfc2047-encode-string fullname)
quote-fullname t))
- (cond ((eq mail-from-style 'angles)
+ (cond ((null mail-from-style)
+ (insert "From: " login "\n"))
+ ;; This is deprecated.
+ ((eq mail-from-style 'system-default)
+ nil)
+ ((or (eq mail-from-style 'angles)
+ (and (not (eq mail-from-style 'parens))
+ ;; Use angles if no quoting is needed, or if
+ ;; parens would need quoting too.
+ (or (not (string-match "[^- !#-'*+/-9=?A-Z^-~]" fullname))
+ (let ((tmp (concat fullname nil)))
+ (while (string-match "([^()]*)" tmp)
+ (aset tmp (match-beginning 0) ?-)
+ (aset tmp (1- (match-end 0)) ?-))
+ (string-match "[\\()]" tmp)))))
(insert "From: " fullname)
(let ((fullname-start (+ (point-min) 6))
(fullname-end (point-marker)))
@@ -974,7 +988,8 @@
(replace-match "\\\\\\&" t))
(insert "\""))))
(insert " <" login ">\n"))
- ((eq mail-from-style 'parens)
+ ;; 'parens or default
+ (t
(insert "From: " login " (")
(let ((fullname-start (point)))
(if quote-fullname
@@ -997,12 +1012,7 @@
fullname-end 1)
(replace-match "\\1(\\3)" t)
(goto-char fullname-start))))
- (insert ")\n"))
- ((null mail-from-style)
- (insert "From: " login "\n"))
- ((eq mail-from-style 'system-default)
- nil)
- (t (error "Invalid value for `mail-from-style'")))))
+ (insert ")\n")))))
;; Normally you will not need to modify these options unless you are
;; using some non-genuine substitute for sendmail which does not
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp ChangeLog mail/sendmail.el,
Chong Yidong <=