From: morioka Date: Tue, 9 Jul 1996 13:24:21 +0000 (+0000) Subject: (mime/editor-mode): Don't toggle. X-Git-Tag: Hokutetsu-Ishikawa-new~373 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5dc02818372bf6f18a1ae0d1bc31ae85bf096701;p=elisp%2Fsemi.git (mime/editor-mode): Don't toggle. (mime-editor/toggle-mode): New function. --- diff --git a/mime-edit.el b/mime-edit.el index 9c0f76e..430bda7 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.29 $ +;;; Version: $Revision: 0.30 $ ;;; 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.29 1996-07-03 05:24:44 morioka Exp $") + "$Id: mime-edit.el,v 0.30 1996-07-09 13:24:21 morioka Exp $") (defconst mime-editor/version (get-version-string mime-editor/RCS-ID)) @@ -546,12 +546,19 @@ Tspecials means any character that matches with it in header must be quoted.") (make-sparse-keymap 'mime-editor/minor-mime-map)) (define-key mime-editor/minor-mime-map mime-prefix mime-editor/mime-map)) +(defun mime-editor/toggle-mode () + (interactive) + (if mime/editor-mode-flag + (mime-editor/exit 'nomime) + (mime/editor-mode) + )) + (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) + 'mime-editor/toggle-mode) (set-alist 'minor-mode-alist 'mime/editor-mode-flag '((" MIME-Edit " mime-editor/transfer-level-string)))) @@ -744,7 +751,7 @@ User customizable variables (not documented all of them): non-nil." (interactive) (if mime/editor-mode-flag - (mime-editor/exit 'nomime) + (error "You are already editing a MIME message.") (setq mime/editor-mode-flag t) ;; Remember old key bindings. (if running-xemacs