]> git.eshelyaron.com Git - emacs.git/commitdiff
Urify better
authorJoão Távora <joaotavora@gmail.com>
Fri, 26 Feb 2021 20:11:08 +0000 (20:11 +0000)
committerJoão Távora <joaotavora@gmail.com>
Fri, 26 Feb 2021 20:11:17 +0000 (20:11 +0000)
See also
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#uri.

* eglot.el (eglot--path-to-uri): use directory-file-name.

GitHub-reference: per https://github.com/joaotavora/eglot/issues/627

lisp/progmodes/eglot.el

index 86e0d01118f47c9850a9b0a0adf8f203ab735d1f..017b8200bfadd89cb0348c2ecf078d8fcb1cb3aa 100644 (file)
@@ -1168,7 +1168,8 @@ If optional MARKER, return a marker instead"
 (defun eglot--path-to-uri (path)
   "URIfy PATH."
   (url-hexify-string
-   (concat "file://" (if (eq system-type 'windows-nt) "/") (file-truename path))
+   (concat "file://" (if (eq system-type 'windows-nt) "/")
+           (directory-file-name (file-truename path)))
    url-path-allowed-chars))
 
 (defun eglot--uri-to-path (uri)