From: ueno Date: Wed, 3 Nov 1999 13:02:22 +0000 (+0000) Subject: * pgg.el (pgg-fetch-key): Protect `buffer-file-name'. X-Git-Tag: emiko-1_13_7~89 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c1ad582de96f253e85945572d5782985120e5b23;p=elisp%2Fsemi.git * pgg.el (pgg-fetch-key): Protect `buffer-file-name'. --- 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))))