2002-01-05 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sat, 5 Jan 2002 20:53:10 +0000 (20:53 +0000)
committerSimon Josefsson <jas@extundo.com>
Sat, 5 Jan 2002 20:53:10 +0000 (20:53 +0000)
* message.el (message-mode-map): Bind message-goto-from to C-c C-f
C-o.
(message-mode-map): Bind message-insert-or-toggle-importance to
C-c C-u.
(message-mode-map): Bind message-disposition-notification-to to
C-c M-n.
(message-mode-menu): Add m-d-n-t.
(message-mode-field-menu): Add m-goto-from.
(message-mode): Doc fix.
(message-goto-from): New function.
(message-insert-disposition-notification-to): New function.
(message-tool-bar-map): Add receipt button.

lisp/ChangeLog
lisp/message.el

index fbba9f0..04e1bd2 100644 (file)
@@ -1,3 +1,18 @@
+2002-01-05  Simon Josefsson  <jas@extundo.com>
+
+       * message.el (message-mode-map): Bind message-goto-from to C-c C-f
+       C-o.
+       (message-mode-map): Bind message-insert-or-toggle-importance to
+       C-c C-u.
+       (message-mode-map): Bind message-disposition-notification-to to
+       C-c M-n.
+       (message-mode-menu): Add m-d-n-t.
+       (message-mode-field-menu): Add m-goto-from.
+       (message-mode): Doc fix.
+       (message-goto-from): New function.
+       (message-insert-disposition-notification-to): New function.
+       (message-tool-bar-map): Add receipt button.
+
 2002-01-05  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-art.el (gnus-mime-display-alternative): Use
index d92a5b6..86df77c 100644 (file)
@@ -1516,6 +1516,7 @@ Point is left at the beginning of the narrowed-to region."
   (define-key message-mode-map "\C-c?" 'describe-mode)
 
   (define-key message-mode-map "\C-c\C-f\C-t" 'message-goto-to)
+  (define-key message-mode-map "\C-c\C-f\C-o" 'message-goto-from)
   (define-key message-mode-map "\C-c\C-f\C-b" 'message-goto-bcc)
   (define-key message-mode-map "\C-c\C-f\C-w" 'message-goto-fcc)
   (define-key message-mode-map "\C-c\C-f\C-c" 'message-goto-cc)
@@ -1534,6 +1535,9 @@ Point is left at the beginning of the narrowed-to region."
   (define-key message-mode-map "\C-c\C-t" 'message-insert-to)
   (define-key message-mode-map "\C-c\C-n" 'message-insert-newsgroups)
 
+  (define-key message-mode-map "\C-c\C-u" 'message-insert-or-toggle-importance)
+  (define-key message-mode-map "\C-c\M-n" 'message-insert-disposition-notification-to)
+
   (define-key message-mode-map "\C-c\C-y" 'message-yank-original)
   (define-key message-mode-map "\C-c\M-\C-y" 'message-yank-buffer)
   (define-key message-mode-map "\C-c\C-q" 'message-fill-yanked-message)
@@ -1581,6 +1585,10 @@ Point is left at the beginning of the narrowed-to region."
     ["Flag As Unimportant" message-insert-importance-low
      ,@(if (featurep 'xemacs) '(t)
         '(:help "Mark this message as unimportant"))]
+    ["Request Receipt" 
+     message-insert-disposition-notification-to
+     ,@(if (featurep 'xemacs) '(t)
+        '(:help "Request a Disposition Notification of this article"))]
     ["Spellcheck" ispell-message
      ,@(if (featurep 'xemacs) '(t)
         '(:help "Spellcheck this message"))]
@@ -1605,6 +1613,7 @@ Point is left at the beginning of the narrowed-to region."
     ["Fetch Newsgroups" message-insert-newsgroups t]
     "----"
     ["To" message-goto-to t]
+    ["From" message-goto-from t]
     ["Subject" message-goto-subject t]
     ["Cc" message-goto-cc t]
     ["Reply-To" message-goto-reply-to t]
@@ -1706,6 +1715,7 @@ C-c C-z  `message-kill-to-signature' (kill the text up to the signature).
 C-c C-r  `message-caesar-buffer-body' (rot13 the message body).
 C-c C-a  `mml-attach-file' (attach a file as MIME).
 C-c C-u  `message-insert-or-toggle-importance'  (insert or cycle importance).
+C-c M-n  `message-insert-disposition-notification-to'  (request receipt).
 M-RET    `message-newline-and-reformat' (break the line and reformat)."
   (set (make-local-variable 'message-reply-buffer) nil)
   (make-local-variable 'message-send-actions)
@@ -1811,6 +1821,11 @@ M-RET    `message-newline-and-reformat' (break the line and reformat)."
   (interactive)
   (message-position-on-field "To"))
 
+(defun message-goto-from ()
+  "Move point to the From header."
+  (interactive)
+  (message-position-on-field "From"))
+
 (defun message-goto-subject ()
   "Move point to the Subject header."
   (interactive)
@@ -2161,6 +2176,16 @@ and `low'."
       (message-goto-eoh)
       (insert (format "Importance: %s\n" new)))))
 
+(defun message-insert-disposition-notification-to ()
+  "Request a disposition notification (return receipt) to this message.
+Note that this should not be used in newsgroups."
+  (interactive)
+  (save-excursion
+    (message-remove-header "Disposition-Notification-To")
+    (message-goto-eoh)
+    (insert (format "Disposition-Notification-To: %s\n"
+                   (or (message-fetch-field "From") (message-make-from))))))
+
 (defun message-elide-region (b e)
   "Elide the text in the region.
 An ellipsis (from `message-elide-ellipsis') will be inserted where the
@@ -5217,6 +5242,9 @@ which specify the range to operate on."
                   (tool-bar-add-item-from-menu
                    'message-insert-importance-low "unimportant"
                    message-mode-map)
+                  (tool-bar-add-item-from-menu
+                   'message-insert-disposition-notification-to "receipt"
+                   message-mode-map)
                   tool-bar-map)))))
 
 ;;; Group name completion.