* (mime-pgp-detect-version): Bug fix -- save restriction before narrowing.
authoryamaoka <yamaoka>
Fri, 16 Apr 1999 00:10:10 +0000 (00:10 +0000)
committeryamaoka <yamaoka>
Fri, 16 Apr 1999 00:10:10 +0000 (00:10 +0000)
ChangeLog
mime-pgp.el

index de89efe..da114dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1999-04-16  Katsumi Yamaoka   <yamaoka@jpl.org>
+
+       * mime-pgp.el (mime-pgp-detect-version): Bug fix -- save
+       restriction before narrowing.
+
 1999-04-15  Katsumi Yamaoka   <yamaoka@jpl.org>
 
        * mime-pgp.el (mime-add-application/pgp-keys): Use
index 8525370..573d7b5 100644 (file)
@@ -301,8 +301,11 @@ or \"v\" for choosing a command of PGP 5.0i."
 (defun mime-pgp-detect-version ()
   "Detect PGP version in the buffer. The buffer is expected to be narrowed
 to just an ascii armor."
-  (std11-narrow-to-header)
-  (let ((version (std11-fetch-field "Version")))
+  (let (version)
+    (save-restriction
+      (std11-narrow-to-header)
+      (setq version (std11-fetch-field "Version"))
+      )
     (cond ((not version)
           pgp-version)
          ((string-match "GnuPG" version)