From 799a66c454f4dbb06aeab744f92321d95e5043d0 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 9 Aug 2021 16:03:02 +0200 Subject: [PATCH] Make ffap-read-file-or-url put point at the correct place for URLs * lisp/ffap.el (ffap-read-file-or-url): Put point at the end of URLs (bug#44822). (ffap--url-file-handler): Remove hack for default dirs. --- lisp/ffap.el | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lisp/ffap.el b/lisp/ffap.el index 0069af25974..635e9814f12 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1532,10 +1532,7 @@ which may actually result in an URL rather than a filename." (cl-case operation ;; We mainly just want to disable these bits: (substitute-in-file-name (car args)) - (expand-file-name - (if (equal (car args) "http://") - "" - (car args))) + (expand-file-name (car args)) (otherwise (apply operation args))))) @@ -1546,7 +1543,7 @@ which may actually result in an URL rather than a filename." (progn (push elem file-name-handler-alist) (if (ffap-url-p guess) - (read-file-name prompt "http://" nil nil guess) + (read-file-name prompt guess) (unless guess (setq guess default-directory)) (unless (ffap-file-remote-p guess) -- 2.39.5