Commit 706b5974 authored by Gnus developers's avatar Gnus developers Committed by Katsumi Yamaoka
Browse files

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.
parent d733e817
2011-03-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
* 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.
2011-03-05 Antoine Levitt <antoine.levitt@gmail.com>
* message.el (message-cite-reply-position, message-cite-style): New
variables.
(message-yank-original): Use the new citation styles.
2011-03-04 Daiki Ueno <ueno@unixuser.org> 2011-03-04 Daiki Ueno <ueno@unixuser.org>
   
* message.el (message-options): Revert the change that's a workaround * message.el (message-options): Revert the change that's a workaround
......
...@@ -1234,7 +1234,7 @@ For example: ((1 . cn-gb-2312) (2 . big5))." ...@@ -1234,7 +1234,7 @@ For example: ((1 . cn-gb-2312) (2 . big5))."
:type 'boolean :type 'boolean
:group 'gnus-summary-marks) :group 'gnus-summary-marks)
(defcustom gnus-propagate-marks t (defcustom gnus-propagate-marks nil
"If non-nil, Gnus will store and retrieve marks from the backends. "If non-nil, Gnus will store and retrieve marks from the backends.
This means that marks will be stored both in .newsrc.eld and in This means that marks will be stored both in .newsrc.eld and in
the backend, and will slow operation down somewhat." the backend, and will slow operation down somewhat."
...@@ -12435,7 +12435,10 @@ UNREAD is a sorted list." ...@@ -12435,7 +12435,10 @@ UNREAD is a sorted list."
(save-excursion (save-excursion
(let (setmarkundo) (let (setmarkundo)
;; Propagate the read marks to the backend. ;; Propagate the read marks to the backend.
(when (and gnus-propagate-marks (when (and (or gnus-propagate-marks
(gnus-method-option-p
(gnus-find-method-for-group group)
'server-marks))
(gnus-check-backend-function 'request-set-mark group)) (gnus-check-backend-function 'request-set-mark group))
(let ((del (gnus-remove-from-range (gnus-info-read info) read)) (let ((del (gnus-remove-from-range (gnus-info-read info) read))
(add (gnus-remove-from-range read (gnus-info-read info)))) (add (gnus-remove-from-range read (gnus-info-read info))))
......
...@@ -1607,7 +1607,8 @@ slower." ...@@ -1607,7 +1607,8 @@ slower."
("nnweb" none) ("nnweb" none)
("nnrss" none) ("nnrss" none)
("nnagent" post-mail) ("nnagent" post-mail)
("nnimap" post-mail address prompt-address physical-address respool) ("nnimap" post-mail address prompt-address physical-address respool
server-marks)
("nnmaildir" mail respool address) ("nnmaildir" mail respool address)
("nnnil" none)) ("nnnil" none))
"*An alist of valid select methods. "*An alist of valid select methods.
......
...@@ -129,17 +129,6 @@ ...@@ -129,17 +129,6 @@
:group 'message-buffers :group 'message-buffers
:type '(choice function (const nil))) :type '(choice function (const nil)))
(defcustom message-cite-style nil
"The overall style to be used when yanking cited text.
Values are either `traditional' (cited text first),
`top-post' (cited text at the bottom), or nil (don't override the
individual message variables)."
:version "24.1"
:group 'message-various
:type '(choice (const :tag "None" :value nil)
(const :tag "Traditional" :value traditional)
(const :tag "Top-post" :value top-post)))
(defcustom message-fcc-handler-function 'message-output (defcustom message-fcc-handler-function 'message-output
"*A function called to save outgoing articles. "*A function called to save outgoing articles.
This function will be called with the name of the file to store the This function will be called with the name of the file to store the
...@@ -1088,6 +1077,71 @@ needed." ...@@ -1088,6 +1077,71 @@ needed."
:link '(custom-manual "(message)Insertion Variables") :link '(custom-manual "(message)Insertion Variables")
:group 'message-insertion) :group 'message-insertion)
(defcustom message-cite-reply-position 'traditional
"*Where the reply should be positioned.
If `traditional', reply inline.
If `above', reply above quoted text.
If `below', reply below quoted text.
Note: Many newsgroups frown upon nontraditional reply styles. You
probably want to set this variable only for specific groups,
e.g. using `gnus-posting-styles':
(eval (set (make-local-variable 'message-cite-reply-above) 'above))"
:type '(choice (const :tag "Reply inline" 'traditional)
(const :tag "Reply above" 'above)
(const :tag "Reply below" 'below))
:group 'message-insertion)
(defcustom message-cite-style nil
"*The overall style to be used when yanking cited text.
Value is either `nil' (no variable overrides) or a let-style list
of pairs (VARIABLE VALUE) that will be bound in
`message-yank-original' to do the quoting.
Presets to impersonate popular mail agents are found in the
message-cite-style-* variables. This variable is intended for
use in `gnus-posting-styles', such as:
((posting-from-work-p) (eval (set (make-local-variable 'message-cite-style) message-cite-style-outlook)))"
:version "24.1"
:group 'message-insertion
:type '(choice (const :tag "Do not override variables" :value nil)
(const :tag "MS Outlook" :value message-cite-style-outlook)
(const :tag "Mozilla Thunderbird" :value message-cite-style-thunderbird)
(const :tag "Gmail" :value message-cite-style-gmail)
(variable :tag "User-specified")))
(defconst message-cite-style-outlook
'((message-cite-function 'message-cite-original)
(message-citation-line-function 'message-insert-formatted-citation-line)
(message-cite-reply-position 'above)
(message-yank-prefix "")
(message-yank-cited-prefix "")
(message-yank-empty-prefix "")
(message-citation-line-format "\n\n-----------------------\nOn %a, %b %d %Y, %N wrote:\n"))
"Message citation style used by MS Outlook. Use with message-cite-style.")
(defconst message-cite-style-thunderbird
'((message-cite-function 'message-cite-original)
(message-citation-line-function 'message-insert-formatted-citation-line)
(message-cite-reply-position 'above)
(message-yank-prefix "> ")
(message-yank-cited-prefix ">")
(message-yank-empty-prefix ">")
(message-citation-line-format "On %D %R %p, %N wrote:"))
"Message citation style used by Mozilla Thunderbird. Use with message-cite-style.")
(defconst message-cite-style-gmail
'((message-cite-function 'message-cite-original)
(message-citation-line-function 'message-insert-formatted-citation-line)
(message-cite-reply-position 'above)
(message-yank-prefix " ")
(message-yank-cited-prefix " ")
(message-yank-empty-prefix " ")
(message-citation-line-format "On %e %B %Y %R, %f wrote:\n"))
"Message citation style used by Gmail. Use with message-cite-style.")
(defcustom message-distribution-function nil (defcustom message-distribution-function nil
"*Function called to return a Distribution header." "*Function called to return a Distribution header."
:group 'message-news :group 'message-news
...@@ -3650,17 +3704,6 @@ To use this automatically, you may add this function to ...@@ -3650,17 +3704,6 @@ To use this automatically, you may add this function to
(while (re-search-forward citexp nil t) (while (re-search-forward citexp nil t)
(replace-match (if remove "" "\n")))))) (replace-match (if remove "" "\n"))))))
(defvar message-cite-reply-above nil
"If non-nil, start own text above the quote.
Note: Top posting is bad netiquette. Don't use it unless you
really must. You probably want to set variable only for specific
groups, e.g. using `gnus-posting-styles':
(eval (set (make-local-variable 'message-cite-reply-above) t))
This variable has no effect in news postings.")
(defun message-yank-original (&optional arg) (defun message-yank-original (&optional arg)
"Insert the message being replied to, if any. "Insert the message being replied to, if any.
Puts point before the text and mark after. Puts point before the text and mark after.
...@@ -3674,49 +3717,49 @@ prefix, and don't delete any headers." ...@@ -3674,49 +3717,49 @@ prefix, and don't delete any headers."
(interactive "P") (interactive "P")
(let ((modified (buffer-modified-p)) (let ((modified (buffer-modified-p))
body-text) body-text)
(when (and message-reply-buffer ;; eval the let forms contained in message-cite-style
message-cite-function) (eval
(when message-cite-reply-above `(let ,message-cite-style
(if (and (not (message-news-p)) (when (and message-reply-buffer
(or (eq message-cite-reply-above 'is-evil) message-cite-function)
(y-or-n-p "\ (when (equal message-cite-reply-position 'above)
Top posting is bad netiquette. Please don't top post unless you really must.
Really top post? ")))
(save-excursion (save-excursion
(setq body-text (setq body-text
(buffer-substring (message-goto-body) (buffer-substring (message-goto-body)
(point-max))) (point-max)))
(delete-region (message-goto-body) (point-max))) (delete-region (message-goto-body) (point-max))))
(set (make-local-variable 'message-cite-reply-above) nil))) (if (bufferp message-reply-buffer)
(if (bufferp message-reply-buffer) (delete-windows-on message-reply-buffer t))
(delete-windows-on message-reply-buffer t)) (push-mark (save-excursion
(push-mark (save-excursion (cond
(cond ((bufferp message-reply-buffer)
((bufferp message-reply-buffer) (insert-buffer-substring message-reply-buffer))
(insert-buffer-substring message-reply-buffer)) ((and (consp message-reply-buffer)
((and (consp message-reply-buffer) (functionp (car message-reply-buffer)))
(functionp (car message-reply-buffer))) (apply (car message-reply-buffer)
(apply (car message-reply-buffer) (cdr message-reply-buffer))))
(cdr message-reply-buffer)))) (unless (bolp)
(unless (bolp) (insert ?\n))
(insert ?\n)) (point)))
(point))) (unless arg
(unless arg (funcall message-cite-function)
(funcall message-cite-function) (unless (eq (char-before (mark t)) ?\n)
(unless (eq (char-before (mark t)) ?\n) (let ((pt (point)))
(let ((pt (point))) (goto-char (mark t))
(goto-char (mark t)) (insert-before-markers ?\n)
(insert-before-markers ?\n) (goto-char pt))))
(goto-char pt)))) (case message-cite-reply-position
(when message-cite-reply-above ('above
(message-goto-body) (message-goto-body)
(insert body-text) (insert body-text)
(insert (if (bolp) "\n" "\n\n")) (insert (if (bolp) "\n" "\n\n"))
(message-goto-body)) (message-goto-body))
;; Add a `message-setup-very-last-hook' here? ('below
;; Add `gnus-article-highlight-citation' here? (message-goto-signature)))
(unless modified ;; Add a `message-setup-very-last-hook' here?
(setq message-checksum (message-checksum)))))) ;; Add `gnus-article-highlight-citation' here?
(unless modified
(setq message-checksum (message-checksum))))))))
(defun message-yank-buffer (buffer) (defun message-yank-buffer (buffer)
"Insert BUFFER into the current buffer and quote it." "Insert BUFFER into the current buffer and quote it."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment