From eb02c4d23088ed3b6806f2a8df2922301dbd515c Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 2 Oct 2022 15:49:50 +0200 Subject: [PATCH] Kill URL buffer in url-insert-file-contents-literally * lisp/url/url-handlers.el (url-insert-file-contents-literally): Kill the URL buffer after use. --- lisp/url/url-handlers.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index b66c187c547..cb115fceb23 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el @@ -371,7 +371,9 @@ if it had been inserted from a file named URL." (let ((buffer (url-retrieve-synchronously url))) (unless buffer (signal 'file-error (list url "No Data"))) - (url-insert buffer nil nil t))) + (url-insert buffer nil nil t) + (kill-buffer buffer) + nil)) (defun url-file-name-completion (url _directory &optional _predicate) ;; Even if it's not implemented, it's not an error to ask for completion, -- 2.39.2