diff options
| author | Gnus developers | 2011-03-05 13:01:56 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-03-05 13:01:56 +0000 |
| commit | 706b5974cd6e3169f6c5ec45ac6b4af2ba283695 (patch) | |
| tree | ab6f3efbfc0387cb4275247ca5be838ac45fae0e | |
| parent | d733e8178e48b2fac690ea676de1e39133f4e21e (diff) | |
| download | emacs-706b5974cd6e3169f6c5ec45ac6b4af2ba283695.tar.gz emacs-706b5974cd6e3169f6c5ec45ac6b4af2ba283695.zip | |
Merge changes made in Gnus trunk.
gnus-sum.el (gnus-update-read-articles): Fix typo.
gnus.el (gnus-valid-select-methods): Mark nnimap as a backend that really have server-side marks.
gnus-sum.el (gnus-propagate-marks): Change default back to nil again, since most backends do not usefully have server-side marks.
(gnus-update-read-articles): Propagate marks to all backends that really have server-side marks.
message.el (message-cite-reply-position, message-cite-style): New variables.
(message-yank-original): Use the new citation styles.
| -rw-r--r-- | lisp/gnus/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 7 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 3 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 165 |
4 files changed, 129 insertions, 64 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 18a798613a8..0cf198e8b04 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2011-03-05 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * gnus-sum.el (gnus-update-read-articles): Fix typo. | ||
| 4 | |||
| 5 | * gnus.el (gnus-valid-select-methods): Mark nnimap as a backend that | ||
| 6 | really have server-side marks. | ||
| 7 | |||
| 8 | * gnus-sum.el (gnus-propagate-marks): Change default back to nil again, | ||
| 9 | since most backends do not usefully have server-side marks. | ||
| 10 | (gnus-update-read-articles): Propagate marks to all backends that | ||
| 11 | really have server-side marks. | ||
| 12 | |||
| 13 | 2011-03-05 Antoine Levitt <antoine.levitt@gmail.com> | ||
| 14 | |||
| 15 | * message.el (message-cite-reply-position, message-cite-style): New | ||
| 16 | variables. | ||
| 17 | (message-yank-original): Use the new citation styles. | ||
| 18 | |||
| 1 | 2011-03-04 Daiki Ueno <ueno@unixuser.org> | 19 | 2011-03-04 Daiki Ueno <ueno@unixuser.org> |
| 2 | 20 | ||
| 3 | * message.el (message-options): Revert the change that's a workaround | 21 | * message.el (message-options): Revert the change that's a workaround |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index abe6367f0d0..a8786e39c7b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -1234,7 +1234,7 @@ For example: ((1 . cn-gb-2312) (2 . big5))." | |||
| 1234 | :type 'boolean | 1234 | :type 'boolean |
| 1235 | :group 'gnus-summary-marks) | 1235 | :group 'gnus-summary-marks) |
| 1236 | 1236 | ||
| 1237 | (defcustom gnus-propagate-marks t | 1237 | (defcustom gnus-propagate-marks nil |
| 1238 | "If non-nil, Gnus will store and retrieve marks from the backends. | 1238 | "If non-nil, Gnus will store and retrieve marks from the backends. |
| 1239 | This means that marks will be stored both in .newsrc.eld and in | 1239 | This means that marks will be stored both in .newsrc.eld and in |
| 1240 | the backend, and will slow operation down somewhat." | 1240 | the backend, and will slow operation down somewhat." |
| @@ -12435,7 +12435,10 @@ UNREAD is a sorted list." | |||
| 12435 | (save-excursion | 12435 | (save-excursion |
| 12436 | (let (setmarkundo) | 12436 | (let (setmarkundo) |
| 12437 | ;; Propagate the read marks to the backend. | 12437 | ;; Propagate the read marks to the backend. |
| 12438 | (when (and gnus-propagate-marks | 12438 | (when (and (or gnus-propagate-marks |
| 12439 | (gnus-method-option-p | ||
| 12440 | (gnus-find-method-for-group group) | ||
| 12441 | 'server-marks)) | ||
| 12439 | (gnus-check-backend-function 'request-set-mark group)) | 12442 | (gnus-check-backend-function 'request-set-mark group)) |
| 12440 | (let ((del (gnus-remove-from-range (gnus-info-read info) read)) | 12443 | (let ((del (gnus-remove-from-range (gnus-info-read info) read)) |
| 12441 | (add (gnus-remove-from-range read (gnus-info-read info)))) | 12444 | (add (gnus-remove-from-range read (gnus-info-read info)))) |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index a5c727925f6..b3a60a82b1d 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -1607,7 +1607,8 @@ slower." | |||
| 1607 | ("nnweb" none) | 1607 | ("nnweb" none) |
| 1608 | ("nnrss" none) | 1608 | ("nnrss" none) |
| 1609 | ("nnagent" post-mail) | 1609 | ("nnagent" post-mail) |
| 1610 | ("nnimap" post-mail address prompt-address physical-address respool) | 1610 | ("nnimap" post-mail address prompt-address physical-address respool |
| 1611 | server-marks) | ||
| 1611 | ("nnmaildir" mail respool address) | 1612 | ("nnmaildir" mail respool address) |
| 1612 | ("nnnil" none)) | 1613 | ("nnnil" none)) |
| 1613 | "*An alist of valid select methods. | 1614 | "*An alist of valid select methods. |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 242a6baabee..08c59b00bfc 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -129,17 +129,6 @@ | |||
| 129 | :group 'message-buffers | 129 | :group 'message-buffers |
| 130 | :type '(choice function (const nil))) | 130 | :type '(choice function (const nil))) |
| 131 | 131 | ||
| 132 | (defcustom message-cite-style nil | ||
| 133 | "The overall style to be used when yanking cited text. | ||
| 134 | Values are either `traditional' (cited text first), | ||
| 135 | `top-post' (cited text at the bottom), or nil (don't override the | ||
| 136 | individual message variables)." | ||
| 137 | :version "24.1" | ||
| 138 | :group 'message-various | ||
| 139 | :type '(choice (const :tag "None" :value nil) | ||
| 140 | (const :tag "Traditional" :value traditional) | ||
| 141 | (const :tag "Top-post" :value top-post))) | ||
| 142 | |||
| 143 | (defcustom message-fcc-handler-function 'message-output | 132 | (defcustom message-fcc-handler-function 'message-output |
| 144 | "*A function called to save outgoing articles. | 133 | "*A function called to save outgoing articles. |
| 145 | This function will be called with the name of the file to store the | 134 | This function will be called with the name of the file to store the |
| @@ -1088,6 +1077,71 @@ needed." | |||
| 1088 | :link '(custom-manual "(message)Insertion Variables") | 1077 | :link '(custom-manual "(message)Insertion Variables") |
| 1089 | :group 'message-insertion) | 1078 | :group 'message-insertion) |
| 1090 | 1079 | ||
| 1080 | (defcustom message-cite-reply-position 'traditional | ||
| 1081 | "*Where the reply should be positioned. | ||
| 1082 | If `traditional', reply inline. | ||
| 1083 | If `above', reply above quoted text. | ||
| 1084 | If `below', reply below quoted text. | ||
| 1085 | |||
| 1086 | Note: Many newsgroups frown upon nontraditional reply styles. You | ||
| 1087 | probably want to set this variable only for specific groups, | ||
| 1088 | e.g. using `gnus-posting-styles': | ||
| 1089 | |||
| 1090 | (eval (set (make-local-variable 'message-cite-reply-above) 'above))" | ||
| 1091 | :type '(choice (const :tag "Reply inline" 'traditional) | ||
| 1092 | (const :tag "Reply above" 'above) | ||
| 1093 | (const :tag "Reply below" 'below)) | ||
| 1094 | :group 'message-insertion) | ||
| 1095 | |||
| 1096 | (defcustom message-cite-style nil | ||
| 1097 | "*The overall style to be used when yanking cited text. | ||
| 1098 | Value is either `nil' (no variable overrides) or a let-style list | ||
| 1099 | of pairs (VARIABLE VALUE) that will be bound in | ||
| 1100 | `message-yank-original' to do the quoting. | ||
| 1101 | |||
| 1102 | Presets to impersonate popular mail agents are found in the | ||
| 1103 | message-cite-style-* variables. This variable is intended for | ||
| 1104 | use in `gnus-posting-styles', such as: | ||
| 1105 | |||
| 1106 | ((posting-from-work-p) (eval (set (make-local-variable 'message-cite-style) message-cite-style-outlook)))" | ||
| 1107 | :version "24.1" | ||
| 1108 | :group 'message-insertion | ||
| 1109 | :type '(choice (const :tag "Do not override variables" :value nil) | ||
| 1110 | (const :tag "MS Outlook" :value message-cite-style-outlook) | ||
| 1111 | (const :tag "Mozilla Thunderbird" :value message-cite-style-thunderbird) | ||
| 1112 | (const :tag "Gmail" :value message-cite-style-gmail) | ||
| 1113 | (variable :tag "User-specified"))) | ||
| 1114 | |||
| 1115 | (defconst message-cite-style-outlook | ||
| 1116 | '((message-cite-function 'message-cite-original) | ||
| 1117 | (message-citation-line-function 'message-insert-formatted-citation-line) | ||
| 1118 | (message-cite-reply-position 'above) | ||
| 1119 | (message-yank-prefix "") | ||
| 1120 | (message-yank-cited-prefix "") | ||
| 1121 | (message-yank-empty-prefix "") | ||
| 1122 | (message-citation-line-format "\n\n-----------------------\nOn %a, %b %d %Y, %N wrote:\n")) | ||
| 1123 | "Message citation style used by MS Outlook. Use with message-cite-style.") | ||
| 1124 | |||
| 1125 | (defconst message-cite-style-thunderbird | ||
| 1126 | '((message-cite-function 'message-cite-original) | ||
| 1127 | (message-citation-line-function 'message-insert-formatted-citation-line) | ||
| 1128 | (message-cite-reply-position 'above) | ||
| 1129 | (message-yank-prefix "> ") | ||
| 1130 | (message-yank-cited-prefix ">") | ||
| 1131 | (message-yank-empty-prefix ">") | ||
| 1132 | (message-citation-line-format "On %D %R %p, %N wrote:")) | ||
| 1133 | "Message citation style used by Mozilla Thunderbird. Use with message-cite-style.") | ||
| 1134 | |||
| 1135 | (defconst message-cite-style-gmail | ||
| 1136 | '((message-cite-function 'message-cite-original) | ||
| 1137 | (message-citation-line-function 'message-insert-formatted-citation-line) | ||
| 1138 | (message-cite-reply-position 'above) | ||
| 1139 | (message-yank-prefix " ") | ||
| 1140 | (message-yank-cited-prefix " ") | ||
| 1141 | (message-yank-empty-prefix " ") | ||
| 1142 | (message-citation-line-format "On %e %B %Y %R, %f wrote:\n")) | ||
| 1143 | "Message citation style used by Gmail. Use with message-cite-style.") | ||
| 1144 | |||
| 1091 | (defcustom message-distribution-function nil | 1145 | (defcustom message-distribution-function nil |
| 1092 | "*Function called to return a Distribution header." | 1146 | "*Function called to return a Distribution header." |
| 1093 | :group 'message-news | 1147 | :group 'message-news |
| @@ -3650,17 +3704,6 @@ To use this automatically, you may add this function to | |||
| 3650 | (while (re-search-forward citexp nil t) | 3704 | (while (re-search-forward citexp nil t) |
| 3651 | (replace-match (if remove "" "\n")))))) | 3705 | (replace-match (if remove "" "\n")))))) |
| 3652 | 3706 | ||
| 3653 | (defvar message-cite-reply-above nil | ||
| 3654 | "If non-nil, start own text above the quote. | ||
| 3655 | |||
| 3656 | Note: Top posting is bad netiquette. Don't use it unless you | ||
| 3657 | really must. You probably want to set variable only for specific | ||
| 3658 | groups, e.g. using `gnus-posting-styles': | ||
| 3659 | |||
| 3660 | (eval (set (make-local-variable 'message-cite-reply-above) t)) | ||
| 3661 | |||
| 3662 | This variable has no effect in news postings.") | ||
| 3663 | |||
| 3664 | (defun message-yank-original (&optional arg) | 3707 | (defun message-yank-original (&optional arg) |
| 3665 | "Insert the message being replied to, if any. | 3708 | "Insert the message being replied to, if any. |
| 3666 | Puts point before the text and mark after. | 3709 | Puts point before the text and mark after. |
| @@ -3674,49 +3717,49 @@ prefix, and don't delete any headers." | |||
| 3674 | (interactive "P") | 3717 | (interactive "P") |
| 3675 | (let ((modified (buffer-modified-p)) | 3718 | (let ((modified (buffer-modified-p)) |
| 3676 | body-text) | 3719 | body-text) |
| 3677 | (when (and message-reply-buffer | 3720 | ;; eval the let forms contained in message-cite-style |
| 3678 | message-cite-function) | 3721 | (eval |
| 3679 | (when message-cite-reply-above | 3722 | `(let ,message-cite-style |
| 3680 | (if (and (not (message-news-p)) | 3723 | (when (and message-reply-buffer |
| 3681 | (or (eq message-cite-reply-above 'is-evil) | 3724 | message-cite-function) |
| 3682 | (y-or-n-p "\ | 3725 | (when (equal message-cite-reply-position 'above) |
| 3683 | Top posting is bad netiquette. Please don't top post unless you really must. | ||
| 3684 | Really top post? "))) | ||
| 3685 | (save-excursion | 3726 | (save-excursion |
| 3686 | (setq body-text | 3727 | (setq body-text |
| 3687 | (buffer-substring (message-goto-body) | 3728 | (buffer-substring (message-goto-body) |
| 3688 | (point-max))) | 3729 | (point-max))) |
| 3689 | (delete-region (message-goto-body) (point-max))) | 3730 | (delete-region (message-goto-body) (point-max)))) |
| 3690 | (set (make-local-variable 'message-cite-reply-above) nil))) | 3731 | (if (bufferp message-reply-buffer) |
| 3691 | (if (bufferp message-reply-buffer) | 3732 | (delete-windows-on message-reply-buffer t)) |
| 3692 | (delete-windows-on message-reply-buffer t)) | 3733 | (push-mark (save-excursion |
| 3693 | (push-mark (save-excursion | 3734 | (cond |
| 3694 | (cond | 3735 | ((bufferp message-reply-buffer) |
| 3695 | ((bufferp message-reply-buffer) | 3736 | (insert-buffer-substring message-reply-buffer)) |
| 3696 | (insert-buffer-substring message-reply-buffer)) | 3737 | ((and (consp message-reply-buffer) |
| 3697 | ((and (consp message-reply-buffer) | 3738 | (functionp (car message-reply-buffer))) |
| 3698 | (functionp (car message-reply-buffer))) | 3739 | (apply (car message-reply-buffer) |
| 3699 | (apply (car message-reply-buffer) | 3740 | (cdr message-reply-buffer)))) |
| 3700 | (cdr message-reply-buffer)))) | 3741 | (unless (bolp) |
| 3701 | (unless (bolp) | 3742 | (insert ?\n)) |
| 3702 | (insert ?\n)) | 3743 | (point))) |
| 3703 | (point))) | 3744 | (unless arg |
| 3704 | (unless arg | 3745 | (funcall message-cite-function) |
| 3705 | (funcall message-cite-function) | 3746 | (unless (eq (char-before (mark t)) ?\n) |
| 3706 | (unless (eq (char-before (mark t)) ?\n) | 3747 | (let ((pt (point))) |
| 3707 | (let ((pt (point))) | 3748 | (goto-char (mark t)) |
| 3708 | (goto-char (mark t)) | 3749 | (insert-before-markers ?\n) |
| 3709 | (insert-before-markers ?\n) | 3750 | (goto-char pt)))) |
| 3710 | (goto-char pt)))) | 3751 | (case message-cite-reply-position |
| 3711 | (when message-cite-reply-above | 3752 | ('above |
| 3712 | (message-goto-body) | 3753 | (message-goto-body) |
| 3713 | (insert body-text) | 3754 | (insert body-text) |
| 3714 | (insert (if (bolp) "\n" "\n\n")) | 3755 | (insert (if (bolp) "\n" "\n\n")) |
| 3715 | (message-goto-body)) | 3756 | (message-goto-body)) |
| 3716 | ;; Add a `message-setup-very-last-hook' here? | 3757 | ('below |
| 3717 | ;; Add `gnus-article-highlight-citation' here? | 3758 | (message-goto-signature))) |
| 3718 | (unless modified | 3759 | ;; Add a `message-setup-very-last-hook' here? |
| 3719 | (setq message-checksum (message-checksum)))))) | 3760 | ;; Add `gnus-article-highlight-citation' here? |
| 3761 | (unless modified | ||
| 3762 | (setq message-checksum (message-checksum)))))))) | ||
| 3720 | 3763 | ||
| 3721 | (defun message-yank-buffer (buffer) | 3764 | (defun message-yank-buffer (buffer) |
| 3722 | "Insert BUFFER into the current buffer and quote it." | 3765 | "Insert BUFFER into the current buffer and quote it." |