From 8a9082249c14f2cdac3d534502c3f66cc8804195 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 6 Jan 2010 09:16:36 +0000 Subject: [PATCH] Merge from mainline. --- lisp/gnus/ChangeLog | 7 +++++++ lisp/gnus/gnus-art.el | 9 ++++++++- lisp/gnus/message.el | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 177b0a032f8..2e90bf6e824 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,10 @@ +2010-01-06 Katsumi Yamaoka + + * gnus-art.el (gnus-article-describe-bindings): Work for prefix keys. + + * message.el (message-check-news-header-syntax): Protect against a + string that `rfc822-addresses' returns when parsing fails. + 2010-01-06 Katsumi Yamaoka * gnus-util.el (gnus-invisible-p, gnus-next-char-property-change) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 6bc84e42225..dcb63883997 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -6477,10 +6477,17 @@ then we display only bindings that start with that prefix." (let ((keymap (copy-keymap gnus-article-mode-map)) (map (copy-keymap gnus-article-send-map)) (sumkeys (where-is-internal 'gnus-article-read-summary-keys)) - agent draft) + parent agent draft) (define-key keymap "S" map) (define-key map [t] nil) (with-current-buffer gnus-article-current-summary + (set-keymap-parent + keymap + (if (setq parent (keymap-parent gnus-article-mode-map)) + (prog1 + (setq parent (copy-keymap parent)) + (set-keymap-parent parent (current-local-map))) + (current-local-map))) (set-keymap-parent map (key-binding "S")) (let (key def gnus-pick-mode) (while sumkeys diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 18feee83032..941fa92b8b3 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -5077,7 +5077,8 @@ Otherwise, generate and save a value for `canlock-password' first." "Denied posting -- the From looks strange: \"%s\"." from) nil) ((let ((addresses (rfc822-addresses from))) - (while (and addresses + ;; `rfc822-addresses' returns a string if parsing fails. + (while (and (consp addresses) (not (eq (string-to-char (car addresses)) ?\())) (setq addresses (cdr addresses))) addresses) -- 2.39.2