(easy-menu-create-keymaps): Add menu-alias property.
[bpt/emacs.git] / lisp / gnus-msg.el
index 746e993..099b5e1 100644 (file)
@@ -1136,17 +1136,19 @@ Headers in `gnus-required-headers' will be generated."
     ;; Insert new Sender if the From is strange. 
     (let ((from (mail-fetch-field "from"))
          (sender (mail-fetch-field "sender")))
-      (if (and from 
+      (if (and from
               (not (string=
-                    (downcase (car (gnus-extract-address-components from)))
+                    (downcase
+                     (car (cdr (gnus-extract-address-components from))))
                     (downcase (gnus-inews-real-user-address))))
               (or (null sender)
-                  (not 
+                  (not
                    (string=
-                    (downcase (car (gnus-extract-address-components sender)))
+                    (downcase
+                     (car (cdr (gnus-extract-address-components sender))))
                     (downcase (gnus-inews-real-user-address))))))
          (progn
-           (goto-char (point-min))    
+           (goto-char (point-min))
            (and (re-search-forward "^Sender:" nil t)
                 (progn
                   (beginning-of-line)
@@ -1381,8 +1383,12 @@ domain is undefined, the domain name is got from it."
 
 (defun gnus-inews-date ()
   "Current time string."
-  (timezone-make-date-arpa-standard 
-   (current-time-string) (current-time-zone)))
+  ;; We call (current-time) once, rather than letting current-time-string and
+  ;; current-time-zone default to it, because that avoids a rare race
+  ;; condition when the time zone changes between those two calls.
+  (let ((now (current-time)))
+    (timezone-make-date-arpa-standard 
+     (current-time-string now) (current-time-zone now))))
 
 (defun gnus-inews-organization ()
   "Return user's organization.
@@ -1560,7 +1566,7 @@ mailer."
                    subject message-of nil gnus-article-copy nil)
 
        (auto-save-mode auto-save-default)
-       (use-local-map (copy-keymap mail-mode-map))
+       (use-local-map (copy-keymap (current-local-map)))
        (local-set-key "\C-c\C-c" 'gnus-mail-send-and-exit)
 
        (if (and follow-to (listp follow-to))