;;; Maintainer: MORIOKA Tomohiko <morioka@jaist.ac.jp>
;;; 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)
;;;
(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))
(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
;;;
(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))
(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
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
;; 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)))