* pgg.el (pgg-fetch-key): Protect `buffer-file-name'.
authorueno <ueno>
Wed, 3 Nov 1999 13:02:22 +0000 (13:02 +0000)
committerueno <ueno>
Wed, 3 Nov 1999 13:02:22 +0000 (13:02 +0000)
pgg.el

diff --git a/pgg.el b/pgg.el
index 4d0570d..87dedca 100644 (file)
--- a/pgg.el
+++ b/pgg.el
@@ -201,7 +201,8 @@ and END to the keyring.")
   (with-current-buffer (get-buffer-create pgg-output-buffer)
     (buffer-disable-undo)
     (erase-buffer)
-    (let ((proto (url-type (url-generic-parse-url url))))
+    (let ((proto (url-type (url-generic-parse-url url)))
+         buffer-file-name)
       (unless (memq (intern proto) '(http finger))
        (insert (format "Protocol %s is not supported.\n" proto)))
       (url-insert-file-contents url)
@@ -209,9 +210,9 @@ and END to the keyring.")
          (progn
            (delete-region (point-min) (match-beginning 0))
            (when (re-search-forward "^-+END" nil t)
-             (delete-region (progn (beginning-of-line 2)
-                                   (point))
+             (delete-region (progn (end-of-line) (point))
                             (point-max)))
+           (insert "\n")
            (with-temp-buffer
              (insert-buffer-substring pgg-output-buffer)
              (pgg-snarf-keys-region (point-min)(point-max))))