(defvar mime-edit-news-reply-mode-server-running nil)
-;;; @@ about PGP
-;;;
-
-(defvar mime-edit-signing-type 'pgp-mime
- "*PGP signing type (pgp-mime, pgp-kazu or nil).")
-
-(defvar mime-edit-encrypting-type 'pgp-mime
- "*PGP encrypting type (pgp-mime, pgp-kazu or nil).")
-
-
;;; @@ about tag
;;;
(define-key mime-edit-mode-enclosure-map
"\C-d" 'mime-edit-enclose-digest-region)
(define-key mime-edit-mode-enclosure-map
- "\C-s" 'mime-edit-enclose-signed-region)
+ "\C-s" 'mime-edit-enclose-pgp-signed-region)
(define-key mime-edit-mode-enclosure-map
- "\C-e" 'mime-edit-enclose-encrypted-region)
+ "\C-e" 'mime-edit-enclose-pgp-encrypted-region)
(define-key mime-edit-mode-enclosure-map
"\C-q" 'mime-edit-enclose-quote-region)
(parallel "Enclose as parallel" mime-edit-enclose-parallel-region)
(mixed "Enclose as serial" mime-edit-enclose-mixed-region)
(digest "Enclose as digest" mime-edit-enclose-digest-region)
- (signed "Enclose as signed" mime-edit-enclose-signed-region)
- (encrypted "Enclose as encrypted" mime-edit-enclose-encrypted-region)
+ (signed "Enclose as signed" mime-edit-enclose-pgp-signed-region)
+ (encrypted "Enclose as encrypted" mime-edit-enclose-pgp-encrypted-region)
(quote "Verbatim region" mime-edit-enclose-quote-region)
(key "Insert Public Key" mime-edit-insert-key)
(split "About split" mime-edit-set-split)
\\[mime-edit-insert-tag] insert a new MIME tag.
\[make enclosure (maybe multipart)\]
-\\[mime-edit-enclose-alternative-region] enclose as multipart/alternative.
-\\[mime-edit-enclose-parallel-region] enclose as multipart/parallel.
-\\[mime-edit-enclose-mixed-region] enclose as multipart/mixed.
-\\[mime-edit-enclose-digest-region] enclose as multipart/digest.
-\\[mime-edit-enclose-signed-region] enclose as PGP signed.
-\\[mime-edit-enclose-encrypted-region] enclose as PGP encrypted.
-\\[mime-edit-enclose-quote-region] enclose as verbose mode (to avoid to expand tags)
+\\[mime-edit-enclose-alternative-region] enclose as multipart/alternative.
+\\[mime-edit-enclose-parallel-region] enclose as multipart/parallel.
+\\[mime-edit-enclose-mixed-region] enclose as multipart/mixed.
+\\[mime-edit-enclose-digest-region] enclose as multipart/digest.
+\\[mime-edit-enclose-pgp-signed-region] enclose as PGP signed.
+\\[mime-edit-enclose-pgp-encrypted-region] enclose as PGP encrypted.
+\\[mime-edit-enclose-quote-region] enclose as verbose mode
+ (to avoid to expand tags)
\[other commands\]
\\[mime-edit-set-transfer-level-7bit] set transfer-level as 7.
\\[mime-edit-set-transfer-level-8bit] set transfer-level as 8.
-\\[mime-edit-set-split] set message splitting mode.
-\\[mime-edit-set-sign] set PGP-sign mode.
-\\[mime-edit-set-encrypt] set PGP-encryption mode.
-\\[mime-edit-preview-message] preview editing MIME message.
-\\[mime-edit-exit] exit and translate into a MIME compliant message.
-\\[mime-edit-help] show this help.
-\\[mime-edit-maybe-translate] exit and translate if in MIME mode, then split.
+\\[mime-edit-set-split] set message splitting mode.
+\\[mime-edit-set-sign] set PGP-sign mode.
+\\[mime-edit-set-encrypt] set PGP-encryption mode.
+\\[mime-edit-preview-message] preview editing MIME message.
+\\[mime-edit-exit] exit and translate into a MIME
+ compliant message.
+\\[mime-edit-help] show this help.
+\\[mime-edit-maybe-translate] exit and translate if in MIME mode,
+ then split.
Additional commands are available in some major modes:
C-c C-c exit, translate and run the original command.
(cond ((string-equal type "quote")
(mime-edit-enquote-region bb eb)
)
- ((string-equal type "signed")
- (cond ((eq mime-edit-signing-type 'pgp-mime)
- (mime-edit-sign-pgp-mime bb eb boundary)
- )
- ((eq mime-edit-signing-type 'pgp-kazu)
- (mime-edit-sign-pgp-kazu bb eb boundary)
- ))
+ ((string-equal type "pgp-signed")
+ (mime-edit-sign-pgp-mime bb eb boundary)
+ )
+ ((string-equal type "pgp-encrypted")
+ (mime-edit-encrypt-pgp-mime bb eb boundary)
+ )
+ ((string-equal type "kazu-signed")
+ (mime-edit-sign-pgp-kazu bb eb boundary)
+ )
+ ((string-equal type "kazu-encrypted")
+ (mime-edit-encrypt-pgp-kazu bb eb boundary)
)
- ((string-equal type "encrypted")
- (cond ((eq mime-edit-encrypting-type 'pgp-mime)
- (mime-edit-encrypt-pgp-mime bb eb boundary)
- )
- ((eq mime-edit-encrypting-type 'pgp-kazu)
- (mime-edit-encrypt-pgp-kazu bb eb boundary)
- )))
(t
(setq boundary
(nth 2 (mime-edit-translate-region bb eb
(mime-edit-enclose-region-internal 'alternative beg end)
)
-(defun mime-edit-enclose-signed-region (beg end)
+(defun mime-edit-enclose-pgp-signed-region (beg end)
(interactive "*r")
- (if mime-edit-signing-type
- (mime-edit-enclose-region-internal 'signed beg end)
- (message "Please specify signing type.")
- ))
+ (mime-edit-enclose-region-internal 'pgp-signed beg end)
+ )
-(defun mime-edit-enclose-encrypted-region (beg end)
+(defun mime-edit-enclose-pgp-encrypted-region (beg end)
(interactive "*r")
- (if mime-edit-signing-type
- (mime-edit-enclose-region-internal 'encrypted beg end)
- (message "Please specify encrypting type.")
- ))
+ (mime-edit-enclose-region-internal 'pgp-encrypted beg end)
+ )
+
+(defun mime-edit-enclose-kazu-signed-region (beg end)
+ (interactive "*r")
+ (mime-edit-enclose-region-internal 'kazu-signed beg end)
+ )
+
+(defun mime-edit-enclose-kazu-encrypted-region (beg end)
+ (interactive "*r")
+ (mime-edit-enclose-region-internal 'kazu-encrypted beg end)
+ )
(defun mime-edit-insert-key (&optional arg)
"Insert a pgp public key."
(y-or-n-p "Do you want to sign? ")
))
(if arg
- (if mime-edit-signing-type
- (progn
- (setq mime-edit-pgp-processing 'sign)
- (message "This message will be signed.")
- )
- (message "Please specify signing type.")
+ (progn
+ (setq mime-edit-pgp-processing 'sign)
+ (message "This message will be signed.")
)
(if (eq mime-edit-pgp-processing 'sign)
(setq mime-edit-pgp-processing nil)
(y-or-n-p "Do you want to encrypt? ")
))
(if arg
- (if mime-edit-encrypting-type
- (progn
- (setq mime-edit-pgp-processing 'encrypt)
- (message "This message will be encrypt.")
- )
- (message "Please specify encrypting type.")
+ (progn
+ (setq mime-edit-pgp-processing 'encrypt)
+ (message "This message will be encrypt.")
)
(if (eq mime-edit-pgp-processing 'encrypt)
(setq mime-edit-pgp-processing nil)
)
(if beg
(cond ((eq mime-edit-pgp-processing 'sign)
- (mime-edit-enclose-signed-region beg end)
+ (mime-edit-enclose-pgp-signed-region beg end)
)
((eq mime-edit-pgp-processing 'encrypt)
- (mime-edit-enclose-encrypted-region beg end)
+ (mime-edit-enclose-pgp-encrypted-region beg end)
))
)))