diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-09 16:03:02 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-08-09 16:03:02 +0200 |
commit | 799a66c454f4dbb06aeab744f92321d95e5043d0 (patch) | |
tree | 1fba7ee9bfdb01b213a924fc08ddf082ea0be663 /lisp/ffap.el | |
parent | b7d3c1e57743df464cd7c3ee43493fbbd2ae8705 (diff) | |
download | emacs-799a66c454f4dbb06aeab744f92321d95e5043d0.tar.gz |
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.
Diffstat (limited to 'lisp/ffap.el')
-rw-r--r-- | lisp/ffap.el | 7 |
1 files 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://<remove>") - "" - (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://<remove>" nil nil guess) + (read-file-name prompt guess) (unless guess (setq guess default-directory)) (unless (ffap-file-remote-p guess) |