aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2025-05-13 14:45:04 +0300
committerEli Zaretskii2025-05-13 14:45:04 +0300
commitb3e280faba98d2ca7e4feef1017e3bebf53f036a (patch)
treea41cf28f9de5d48280ed48d8dc5232c003a8cc0d
parent4b4276d64f47fad6e485b6da8cf908204f167f61 (diff)
downloademacs-b3e280faba98d2ca7e4feef1017e3bebf53f036a.tar.gz
emacs-b3e280faba98d2ca7e4feef1017e3bebf53f036a.zip
Eglot: Fix parsing file:// URIs on MS-Windows
* lisp/progmodes/eglot.el (eglot-uri-to-path): Remove the leading slash in MS-Windows file names only if they begin with a slash. This adjusts the function to the recent fix for bug#76982 in 'url-generic-parse-url', which previously would produce file names that begin with an extra slash. (Bug#78392)
-rw-r--r--lisp/progmodes/eglot.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index eae8e1b9189..6f6b05a393d 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1165,7 +1165,8 @@ object."
1165 ;; Remove the leading "/" for local MS Windows-style paths. 1165 ;; Remove the leading "/" for local MS Windows-style paths.
1166 (normalized (if (and (not remote-prefix) 1166 (normalized (if (and (not remote-prefix)
1167 (eq system-type 'windows-nt) 1167 (eq system-type 'windows-nt)
1168 (cl-plusp (length retval))) 1168 (cl-plusp (length retval))
1169 (eq (aref retval 0) ?/))
1169 (w32-long-file-name (substring retval 1)) 1170 (w32-long-file-name (substring retval 1))
1170 retval))) 1171 retval)))
1171 (concat remote-prefix normalized)) 1172 (concat remote-prefix normalized))