From 6d41b43dff768096e896d21c199b7bdbdd6a4390 Mon Sep 17 00:00:00 2001 From: morioka Date: Wed, 3 Jul 1996 05:24:44 +0000 Subject: [PATCH] Applied Alastair Burt 's patch. --- mime-edit.el | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/mime-edit.el b/mime-edit.el index 5b3c939..9c0f76e 100644 --- a/mime-edit.el +++ b/mime-edit.el @@ -9,7 +9,7 @@ ;;; Maintainer: MORIOKA Tomohiko ;;; Created: 1994/08/21 renamed from mime.el by UMEDA Masanobu; ;;; 1996/05/24 renamed from tm-edit.el -;;; Version: $Revision: 0.28 $ +;;; Version: $Revision: 0.29 $ ;;; Keywords: mail, news, MIME, multimedia, multilingual ;;; ;;; This file is part of SEMI (September, Emacs MIME Interface) @@ -123,7 +123,7 @@ ;;; (defconst mime-editor/RCS-ID - "$Id: mime-edit.el,v 0.28 1996-06-27 14:08:17 morioka Exp $") + "$Id: mime-edit.el,v 0.29 1996-07-03 05:24:44 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -503,6 +503,8 @@ Tspecials means any character that matches with it in header must be quoted.") (defconst mime-editor/mime-map (make-sparse-keymap) "Keymap for MIME commands.") +(defconst mime-editor/minor-mime-map nil + "Keymap for MIME commands.") ;;; @ keymap and menu ;;; @@ -510,10 +512,6 @@ Tspecials means any character that matches with it in header must be quoted.") (defvar mime/editor-mode-flag nil) (make-variable-buffer-local 'mime/editor-mode-flag) -(set-alist 'minor-mode-alist - 'mime/editor-mode-flag - '((" MIME-Edit " mime-editor/transfer-level-string))) - (defun mime-editor/define-keymap (keymap) "Add mime-editor commands to KEYMAP." (if (not (keymapp keymap)) @@ -542,6 +540,22 @@ Tspecials means any character that matches with it in header must be quoted.") (mime-editor/define-keymap mime-editor/mime-map) +(if mime-editor/minor-mime-map + () + (setq mime-editor/minor-mime-map + (make-sparse-keymap 'mime-editor/minor-mime-map)) + (define-key mime-editor/minor-mime-map mime-prefix mime-editor/mime-map)) + +(if running-xemacs + (add-minor-mode 'mime/editor-mode-flag + '((" MIME-Edit " mime-editor/transfer-level-string)) + mime-editor/minor-mime-map + nil + 'mime/editor-mode) + (set-alist 'minor-mode-alist + 'mime/editor-mode-flag + '((" MIME-Edit " mime-editor/transfer-level-string)))) + (defconst mime-editor/menu-title "MIME-Edit") (defconst mime-editor/menu-list @@ -730,7 +744,7 @@ User customizable variables (not documented all of them): non-nil." (interactive) (if mime/editor-mode-flag - (error "You are already editing a MIME message.") + (mime-editor/exit 'nomime) (setq mime/editor-mode-flag t) ;; Remember old key bindings. (if running-xemacs @@ -795,10 +809,6 @@ just return to previous mode." ;; Restore previous state. (setq mime/editor-mode-flag nil) (cond (running-xemacs - ;; mime-prefix only defined if binding was nil - (if (eq (lookup-key (current-local-map) mime-prefix) - mime-editor/mime-map) - (define-key (current-local-map) mime-prefix nil)) (delete-menu-item (list mime-editor/menu-title))) (t (use-local-map mime/editor-mode-old-local-map))) -- 1.7.10.4