changeset 106747:47e4680680fe

* 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.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 06 Jan 2010 09:22:19 +0000
parents 417baf3f58fe (current diff) e09f67191b6c (diff)
children f99663857782 d94786c1fa6c 664aa528b94c c80b29e796ea
files
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/gnus/ChangeLog	Wed Jan 06 00:07:08 2010 +0000
+++ b/lisp/gnus/ChangeLog	Wed Jan 06 09:22:19 2010 +0000
@@ -1,3 +1,10 @@
+2010-01-06  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+	* 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  <yamaoka@jpl.org>
 
 	* gnus-util.el (gnus-invisible-p, gnus-next-char-property-change)
--- a/lisp/gnus/gnus-art.el	Wed Jan 06 00:07:08 2010 +0000
+++ b/lisp/gnus/gnus-art.el	Wed Jan 06 09:22:19 2010 +0000
@@ -6477,10 +6477,17 @@
   (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
--- a/lisp/gnus/message.el	Wed Jan 06 00:07:08 2010 +0000
+++ b/lisp/gnus/message.el	Wed Jan 06 09:22:19 2010 +0000
@@ -5077,7 +5077,8 @@
 	  "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)