[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 131ec049db0 2/3: Eglot: unbreak eglot-extend-to-xref on w32
From: |
João Távora |
Subject: |
emacs-29 131ec049db0 2/3: Eglot: unbreak eglot-extend-to-xref on w32 |
Date: |
Thu, 30 Mar 2023 19:08:12 -0400 (EDT) |
branch: emacs-29
commit 131ec049db03a3a90c887edf67a8de86ab47008a
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Eglot: unbreak eglot-extend-to-xref on w32
Because of a drive-letter casing mismatch between 'buffer-file-name'
and the return value of 'url-generic-parse-url', the hash-table test
'equal' in 'eglot-current-server' failed.
This failed to recognize that the file xref landed us on really is
managed by the language server that facilitated that jump.
The function w32-long-file-name seems to convert "C:/Users/" to
"c:/Users" consistently and so is a good addition to
eglot--uri-to-path.
* lisp/progmodes/eglot.el (eglot--uri-to-path): Use
w32-long-file-name.
---
lisp/progmodes/eglot.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 3f5245397a0..8f64f849d72 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -1620,10 +1620,9 @@ If optional MARKER, return a marker instead"
(normalized (if (and (not remote-prefix)
(eq system-type 'windows-nt)
(cl-plusp (length retval)))
- (substring retval 1)
+ (w32-long-file-name (substring retval 1))
retval)))
(concat remote-prefix normalized))
-
uri)))
(defun eglot--snippet-expansion-fn ()