From c1ad582de96f253e85945572d5782985120e5b23 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 3 Nov 1999 13:02:22 +0000 Subject: [PATCH] * pgg.el (pgg-fetch-key): Protect `buffer-file-name'. --- pgg.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pgg.el b/pgg.el index 4d0570d..87dedca 100644 --- 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)))) -- 1.7.10.4