From: Lars Ingebrigtsen Date: Mon, 9 Aug 2021 14:03:02 +0000 (+0200) Subject: Make ffap-read-file-or-url put point at the correct place for URLs X-Git-Tag: emacs-28.0.90~1574 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=799a66c454f4dbb06aeab744f92321d95e5043d0;p=emacs.git 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. --- 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)