2002-09-29 Simon Josefsson <jas@extundo.com>
+ * pgg-parse.el (pgg-char-int, pgg-string-as-unibyte): Prevent byte
+ compile warnings.
+
+ * pgg.el (pgg-decrypt-region): Don't parse packet.
+
* luna.el: Removed.
* pgg.el, pgg-gpg.el, pgg-pgp5.el: Don't depend on luna.el.
"^-----BEGIN PGP SIGNATURE-----\r?$")
"Armor headers.")
-(defalias 'pgg-char-int (if (fboundp 'char-int)
- 'char-int
- 'identity))
+(eval-and-compile
+ (defalias 'pgg-char-int (if (fboundp 'char-int)
+ 'char-int
+ 'identity)))
(defmacro pgg-format-key-identifier (string)
`(mapconcat (lambda (c) (format "%02X" (pgg-char-int c)))
(insert string)
(pgg-decode-armor-region (point-min)(point))))
-(defalias 'pgg-string-as-unibyte (if (fboundp 'string-as-unibyte)
- 'string-as-unibyte
- 'identity))
+(eval-and-compile
+ (defalias 'pgg-string-as-unibyte (if (fboundp 'string-as-unibyte)
+ 'string-as-unibyte
+ 'identity)))
(defun pgg-parse-armor-region (start end)
(pgg-parse-armor (pgg-string-as-unibyte (buffer-substring start end))))
(defun pgg-decrypt-region (start end)
"Decrypt the current region between START and END."
(interactive "r")
- (let* ((packet (cdr (assq 1 (pgg-parse-armor-region start end))))
- (status
- (pgg-save-coding-system start end
- (pgg-invoke "decrypt-region" (or pgg-scheme pgg-default-scheme)
- (point-min) (point-max)))))
+ (let ((status
+ (pgg-save-coding-system start end
+ (pgg-invoke "decrypt-region" (or pgg-scheme pgg-default-scheme)
+ (point-min) (point-max)))))
(when (interactive-p)
(pgg-display-output-buffer start end status))
status))