[gnus git] branch master updated: =1= message.el (message-tool-bar-gnome): Tweak tool-bar items. Add :vert-only tags. (message-mail): New arg RETURN-ACTION. (message-return-action): New var. (message-bury): Use it. (message-mode): Make it buffer-local. (message-send-and-exit): Always call message-bury.

Katsumi Yamaoka <[email protected]>
Newsgroups gmane.emacs.gnus.cvs
Message-ID <[email protected]>
       via  30eb6d24d30bc028fce91a0c62044c5dc1fdd90e (commit)
      from  9a6f050343be1e99fdacb2328edf6f89e788abbf (commit)


- Log -----------------------------------------------------------------
commit 30eb6d24d30bc028fce91a0c62044c5dc1fdd90e
Author: Chong Yidong <[email protected]>
Date:   Fri Jan 14 00:30:16 2011 +0000

    message.el (message-tool-bar-gnome): Tweak tool-bar items.  Add :vert-only tags.
     (message-mail): New arg RETURN-ACTION.
     (message-return-action): New var.
     (message-bury): Use it.
     (message-mode): Make it buffer-local.
     (message-send-and-exit): Always call message-bury.
    
    gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION.  Pass it to message-mail.

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index af97fb7..8286cdb 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-13  Chong Yidong  <[email protected]>
+
+	* message.el (message-tool-bar-gnome): Tweak tool-bar items.  Add
+	:vert-only tags.
+	(message-mail): New arg RETURN-ACTION.
+	(message-return-action): New var.
+	(message-bury): Use it.
+	(message-mode): Make it buffer-local.
+	(message-send-and-exit): Always call message-bury.
+
+	* gnus-msg.el (gnus-msg-mail): New arg RETURN-ACTION.  Pass it to
+	message-mail.
+
 2011-01-11  Lars Magne Ingebrigtsen  <[email protected]>
 
 	* nnimap.el (nnimap-convert-partial-article): Protect against
diff --git a/lisp/gnus-msg.el b/lisp/gnus-msg.el
index d66e169..e352ffa 100644
--- a/lisp/gnus-msg.el
+++ b/lisp/gnus-msg.el
@@ -477,7 +477,7 @@ Thank you for your help in stamping out bugs.
 
 ;;;###autoload
 (defun gnus-msg-mail (&optional to subject other-headers continue
-				switch-action yank-action send-actions)
+		      switch-action yank-action send-actions return-action)
   "Start editing a mail message to be sent.
 Like `message-mail', but with Gnus paraphernalia, particularly the
 Gcc: header for archiving purposes."
@@ -486,7 +486,7 @@ Gcc: header for archiving purposes."
 	mail-buf)
     (gnus-setup-message 'message
       (message-mail to subject other-headers continue
-		    nil yank-action send-actions))
+		    nil yank-action send-actions return-action))
     (when switch-action
       (setq mail-buf (current-buffer))
       (switch-to-buffer buf)
diff --git a/lisp/message.el b/lisp/message.el
index e7fe660..1ba4abd 100644
--- a/lisp/message.el
+++ b/lisp/message.el
@@ -1164,6 +1164,8 @@ It is a vector of the following headers:
 (defvar message-checksum nil)
 (defvar message-send-actions nil
   "A list of actions to be performed upon successful sending of a message.")
+(defvar message-return-action nil
+  "Action to return to the caller after sending or postphoning a message.")
 (defvar message-exit-actions nil
   "A list of actions to be performed upon exiting after sending a message.")
 (defvar message-kill-actions nil
@@ -2907,6 +2909,7 @@ M-RET    `message-newline-and-reformat' (break the line and reformat)."
   (set (make-local-variable 'message-reply-buffer) nil)
   (set (make-local-variable 'message-inserted-headers) nil)
   (set (make-local-variable 'message-send-actions) nil)
+  (set (make-local-variable 'message-return-action) nil)
   (set (make-local-variable 'message-exit-actions) nil)
   (set (make-local-variable 'message-kill-actions) nil)
   (set (make-local-variable 'message-postpone-actions) nil)
@@ -3999,11 +4002,9 @@ The text will also be indented the normal way."
 	(actions message-exit-actions))
     (when (and (message-send arg)
 	       (buffer-name buf))
+      (message-bury buf)
       (if message-kill-buffer-on-exit
-	  (kill-buffer buf)
-	(bury-buffer buf)
-	(when (eq buf (current-buffer))
-	  (message-bury buf)))
+	  (kill-buffer buf))
       (message-do-actions actions)
       t)))
 
@@ -4053,9 +4054,8 @@ Instead, just auto-save the buffer and then bury it."
   "Bury this mail BUFFER."
   (let ((newbuf (other-buffer buffer)))
     (bury-buffer buffer)
-    (if (and (window-dedicated-p (selected-window))
-	     (not (null (delq (selected-frame) (visible-frame-list)))))
-	(delete-frame (selected-frame))
+    (if message-return-action
+	(apply (car message-return-action) (cdr message-return-action))
       (switch-to-buffer newbuf))))
 
 (defun message-send (&optional arg)
@@ -6348,11 +6348,11 @@ between beginning of field and beginning of line."
 ;; YANK-ACTION, if non-nil, can be a buffer or a yank action of the
 ;; form (FUNCTION . ARGS).
 (defun message-setup (headers &optional yank-action actions
-			      continue switch-function)
+			      continue switch-function return-action)
   (let ((mua (message-mail-user-agent))
 	subject to field)
     (if (not (and message-this-is-mail mua))
-	(message-setup-1 headers yank-action actions)
+	(message-setup-1 headers yank-action actions return-action)
       (setq headers (copy-sequence headers))
       (setq field (assq 'Subject headers))
       (when field
@@ -6400,11 +6400,12 @@ are not included."
 	(push header result)))
     (nreverse result)))
 
-(defun message-setup-1 (headers &optional yank-action actions)
+(defun message-setup-1 (headers &optional yank-action actions return-action)
   (dolist (action actions)
     (condition-case nil
 	(add-to-list 'message-send-actions
 		     `(apply ',(car action) ',(cdr action)))))
+  (setq message-return-action return-action)
   (setq message-reply-buffer
 	(if (and (consp yank-action)
 		 (eq (car yank-action) 'insert-buffer))
@@ -6533,9 +6534,9 @@ are not included."
 ;;;
 
 ;;;###autoload
-(defun message-mail (&optional to subject
-			       other-headers continue switch-function
-			       yank-action send-actions)
+(defun message-mail (&optional to subject other-headers continue
+			       switch-function yank-action send-actions
+			       return-action &rest ignored)
   "Start editing a mail message to be sent.
 OTHER-HEADERS is an alist of header/value pairs.  CONTINUE says whether
 to continue editing a message already being composed.  SWITCH-FUNCTION
@@ -6556,7 +6557,8 @@ is a function used to switch to and display the mail buffer."
      (nconc
       `((To . ,(or to "")) (Subject . ,(or subject "")))
       (when other-headers other-headers))
-     yank-action send-actions continue switch-function)
+     yank-action send-actions continue switch-function
+     return-action)
     ;; FIXME: Should return nil if failure.
     t))
 
@@ -7686,24 +7688,22 @@ Pre-defined symbols include `message-tool-bar-gnome' and
 
 (defcustom message-tool-bar-gnome
   '((ispell-message "spell" nil
+		    :vert-only t
 		    :visible (or (not (boundp 'flyspell-mode))
 				 (not flyspell-mode)))
     (flyspell-buffer "spell" t
+		     :vert-only t
 		     :visible (and (boundp 'flyspell-mode)
 				   flyspell-mode)
 		     :help "Flyspell whole buffer")
-    (gmm-ignore "separator")
-    (message-send-and-exit "mail/send")
+    (message-send-and-exit "mail/send" t :label "Send")
     (message-dont-send "mail/save-draft")
-    (message-kill-buffer "close") ;; stock_cancel
-    (mml-attach-file "attach" mml-mode-map)
+    (mml-attach-file "attach" mml-mode-map :vert-only t)
     (mml-preview "mail/preview" mml-mode-map)
     (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
     (message-insert-importance-high "important" nil :visible nil)
     (message-insert-importance-low "unimportant" nil :visible nil)
-    (message-insert-disposition-notification-to "receipt" nil :visible nil)
-    (gmm-customize-mode "preferences" t :help "Edit mode preferences")
-    (message-info "help" t :help "Message manual"))
+    (message-insert-disposition-notification-to "receipt" nil :visible nil))
   "List of items for the message tool bar (GNOME style).
 
 See `gmm-tool-bar-from-list' for details on the format of the list."

-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.

Summary of changes:
 lisp/ChangeLog   |   13 +++++++++++++
 lisp/gnus-msg.el |    4 ++--
 lisp/message.el  |   42 +++++++++++++++++++++---------------------
 3 files changed, 36 insertions(+), 23 deletions(-)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".

The branch, master has been updated


hooks/post-receive
-- 
Gnus Project
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.