2002-09-29 Simon Josefsson <jas@extundo.com>
authorSimon Josefsson <jas@extundo.com>
Sun, 29 Sep 2002 20:47:41 +0000 (20:47 +0000)
committerSimon Josefsson <jas@extundo.com>
Sun, 29 Sep 2002 20:47:41 +0000 (20:47 +0000)
* pgg-parse.el (pgg-char-int, pgg-string-as-unibyte): Prevent byte
compile warnings.

* pgg.el (pgg-decrypt-region): Don't parse packet.

pgg/ChangeLog
pgg/pgg-parse.el
pgg/pgg.el

index 873c46c..17674e5 100644 (file)
@@ -1,5 +1,10 @@
 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.
index 191c11c..31fec95 100644 (file)
     "^-----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))))
index 955f178..536da3b 100644 (file)
 (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))