diff options
author | Lars Magne Ingebrigtsen <[email protected]> | 2011-09-21 22:34:54 +0000 |
---|---|---|
committer | Katsumi Yamaoka <[email protected]> | 2011-09-21 22:34:54 +0000 |
commit | a5166359b9fc59e0086172d198d68126da76bf14 (patch) | |
tree | 92975b9cb0aab90779f922d48df79c80067f5e91 /lisp | |
parent | e233ce558d12fdf9e0e69ea30c4558ec7477fea4 (diff) |
Merge changes made in Gnus trunk.
gnus.texi (Archived Messages): Note the default (bug#9552).
message.el (message-indent-citation): Really make sure there's a newline at the end.
nnimap.el (nnimap-parse-flags): Make regexp less prone to overflows. Fix suggested by John Wiegley.
pop3.el (pop3-open-server): Fix +OK end-of-command regexp.
gnus-art.el (gnus-treat-hide-citation): Add doc.
message.el (message-default-send-rename-function): Break out into its own function.
ecomplete.el (ecomplete-display-matches): Revert patch since it doesn't work under XEmacs.
nnimap.el (nnimap-map-port): New function to connect to 993 instead of "imaps" to word around Windows problems.
(nnimap-open-connection-1): Use it.
message.el (message-indent-citation): Revert last change which made `F' not work.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/gnus/ChangeLog | 25 | ||||
-rw-r--r-- | lisp/gnus/ecomplete.el | 9 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 5 | ||||
-rw-r--r-- | lisp/gnus/message.el | 58 | ||||
-rw-r--r-- | lisp/gnus/nnimap.el | 10 | ||||
-rw-r--r-- | lisp/gnus/pop3.el | 2 |
6 files changed, 73 insertions, 36 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 2487f21c15..1fa5ffff0c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,28 @@ +2011-09-21 Lars Magne Ingebrigtsen <[email protected]> + + * message.el (message-indent-citation): Really make sure there's a + newline at the end. + + * nnimap.el (nnimap-parse-flags): Make regexp less prone to overflows. + Fix suggested by John Wiegley. + + * pop3.el (pop3-open-server): Fix +OK end-of-command regexp. + + * gnus-art.el (gnus-treat-hide-citation): Add doc. + + * message.el (message-default-send-rename-function): Break out into its + own function. + + * ecomplete.el (ecomplete-display-matches): Revert patch since it + doesn't work under XEmacs. + + * nnimap.el (nnimap-map-port): New function to connect to 993 instead + of "imaps" to word around Windows problems. + (nnimap-open-connection-1): Use it. + + * message.el (message-indent-citation): Revert last change which made + `F' not work. + 2011-09-13 Kan-Ru Chen <[email protected]> * ecomplete.el (ecomplete-display-matches): Intercept key sequence from diff --git a/lisp/gnus/ecomplete.el b/lisp/gnus/ecomplete.el index 737c0dba1d..6a47b119f1 100644 --- a/lisp/gnus/ecomplete.el +++ b/lisp/gnus/ecomplete.el @@ -123,15 +123,14 @@ (message "%s" matches) nil) (setq highlight (ecomplete-highlight-match-line matches line)) - (while (not (member (setq command (read-key-sequence-vector highlight)) - '([? ] [return] [?\r] [?\n] [?\C-g]))) + (while (not (memq (setq command (read-event highlight)) '(? return))) (cond - ((member command '([27 ?n] [?\M-n])) + ((eq command ?\M-n) (setq line (min (1+ line) max-lines))) - ((member command '([27 ?p] [?\M-p])) + ((eq command ?\M-p) (setq line (max (1- line) 0)))) (setq highlight (ecomplete-highlight-match-line matches line))) - (when (member command '([return] [?\r] [?\n])) + (when (eq command 'return) (nth line (split-string matches "\n"))))))) (defun ecomplete-highlight-match-line (matches line) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 8149e55527..0068fbad6e 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1231,7 +1231,10 @@ predicate. See Info node `(gnus)Customizing Articles'." (defcustom gnus-treat-hide-citation nil "Hide cited text. Valid values are nil, t, `head', `first', `last', an integer or a -predicate. See Info node `(gnus)Customizing Articles'." +predicate. See Info node `(gnus)Customizing Articles'. + +See `gnus-article-highlight-citation' for variables used to +control what it hides." :group 'gnus-article-treat :link '(custom-manual "(gnus)Customizing Articles") :type gnus-article-treat-custom) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index da91fcb7fd..7203ef69a1 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3679,9 +3679,10 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line." (message-delete-line)) ;; Delete blank lines at the end of the buffer. (goto-char (point-max)) - (beginning-of-line) - (while (and (looking-at "$") - (zerop (forward-line -1))) + (unless (eq (preceding-char) ?\n) + (insert "\n")) + (while (and (zerop (forward-line -1)) + (looking-at "$")) (message-delete-line))) ;; Do the indentation. (if (null message-yank-prefix) @@ -6357,35 +6358,38 @@ between beginning of field and beginning of line." ;; Rename the buffer. (if message-send-rename-function (funcall message-send-rename-function) - ;; Note: mail-abbrevs of XEmacs renames buffer name behind Gnus. - (when (string-match - "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*\\|\\`mail to " - (buffer-name)) - (let ((name (match-string 2 (buffer-name))) - to group) - (if (not (or (null name) - (string-equal name "mail") - (string-equal name "posting"))) - (setq name (concat "*sent " name "*")) - (message-narrow-to-headers) - (setq to (message-fetch-field "to")) - (setq group (message-fetch-field "newsgroups")) - (widen) - (setq name - (cond - (to (concat "*sent mail to " - (or (car (mail-extract-address-components to)) - to) "*")) - ((and group (not (string= group ""))) - (concat "*sent posting on " group "*")) - (t "*sent mail*")))) - (unless (string-equal name (buffer-name)) - (rename-buffer name t))))) + (message-default-send-rename-function)) ;; Push the current buffer onto the list. (when message-max-buffers (setq message-buffer-list (nconc message-buffer-list (list (current-buffer)))))) +(defun message-default-send-rename-function () + ;; Note: mail-abbrevs of XEmacs renames buffer name behind Gnus. + (when (string-match + "\\`\\*\\(sent \\|unsent \\)?\\(.+\\)\\*[^\\*]*\\|\\`mail to " + (buffer-name)) + (let ((name (match-string 2 (buffer-name))) + to group) + (if (not (or (null name) + (string-equal name "mail") + (string-equal name "posting"))) + (setq name (concat "*sent " name "*")) + (message-narrow-to-headers) + (setq to (message-fetch-field "to")) + (setq group (message-fetch-field "newsgroups")) + (widen) + (setq name + (cond + (to (concat "*sent mail to " + (or (car (mail-extract-address-components to)) + to) "*")) + ((and group (not (string= group ""))) + (concat "*sent posting on " group "*")) + (t "*sent mail*")))) + (unless (string-equal name (buffer-name)) + (rename-buffer name t))))) + (defun message-mail-user-agent () (let ((mua (cond ((not message-mail-user-agent) nil) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index d26df2395e..f0d3e9f318 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -345,6 +345,11 @@ textual parts.") nil stream))) +(defun nnimap-map-port (port) + (if (equal port "imaps") + "993" + port)) + (defun nnimap-open-connection-1 (buffer) (unless nnimap-keepalive-timer (setq nnimap-keepalive-timer (run-at-time (* 60 15) (* 60 15) @@ -373,7 +378,8 @@ textual parts.") (push nnimap-server-port ports)) (let* ((stream-list (open-protocol-stream - "*nnimap*" (current-buffer) nnimap-address (car ports) + "*nnimap*" (current-buffer) nnimap-address + (nnimap-map-port (car ports)) :type nnimap-stream :return-list t :shell-command nnimap-shell-program @@ -1551,7 +1557,7 @@ textual parts.") (goto-char start) (setq vanished (and (eq flag-sequence 'qresync) - (re-search-forward "^\\* VANISHED .* \\([0-9:,]+\\)" + (re-search-forward "^\\* VANISHED .*? \\([0-9:,]+\\)" (or end (point-min)) t) (match-string 1))) (goto-char start) diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el index 54c2170383..8fd5382a18 100644 --- a/lisp/gnus/pop3.el +++ b/lisp/gnus/pop3.el @@ -308,7 +308,7 @@ Returns the process associated with the connection." (t (or pop3-stream-type 'network))) :capability-command "CAPA\r\n" - :end-of-command "^\\(-ERR\\|+OK \\).*\n" + :end-of-command "^\\(-ERR\\|+OK\\).*\n" :end-of-capability "^\\.\r?\n\\|^-ERR" :success "^\\+OK.*\n" :return-list t |