diff lisp/vm/vm-menu.el @ 100:4be1180a9e89 r20-1b2

Import from CVS: tag r20-1b2
author cvs
date Mon, 13 Aug 2007 09:15:11 +0200
parents 0d2f883870bc
children a145efe76779
line wrap: on
line diff
--- a/lisp/vm/vm-menu.el	Mon Aug 13 09:13:58 2007 +0200
+++ b/lisp/vm/vm-menu.el	Mon Aug 13 09:15:11 2007 +0200
@@ -841,7 +841,18 @@
 	 ;;  (cons "Mail" vm-menu-fsfemacs-mail-menu))
 	 (if vm-popup-menu-on-mouse-3
 	     (define-key vm-mail-mode-map [down-mouse-3]
-	       'vm-menu-popup-mode-menu)))))
+	       'vm-menu-popup-mode-menu))
+	 ;; replace some FSF Emacs menubar menu commands so the
+	 ;; user gets the VM version.  Catch errors; we don't
+	 ;; care enough about this to make VM crash if the
+	 ;; menubar entry names change.
+	 (condition-case nil
+	     (progn
+	       (define-key vm-mail-mode-map [menubar mail send]
+		 'vm-mail-send-and-exit)
+	       (define-key vm-mail-mode-map [menubar mail send-stay]
+		 'vm-mail-send))
+	   (error nil)))))
 
 (defun vm-menu-install-menus ()
   (cond ((consp vm-use-menus)