]> git.eshelyaron.com Git - emacs.git/commitdiff
Use `path-separator', not ":", in eclipse/jdt custom code
authorAugusto Stoffel <arstoffel@gmail.com>
Wed, 13 Jan 2021 18:43:08 +0000 (19:43 +0100)
committerGitHub <noreply@github.com>
Wed, 13 Jan 2021 18:43:08 +0000 (18:43 +0000)
This is needed on Windows.

* eglot.el (eglot--eclipse-jdt-contact): Replace literal ":" by `path-separator'.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/513

lisp/progmodes/eglot.el

index 6d51fc74fc29d3e8b3e429644f9706ab1bd05370..b8db7f9057fe4dd9150c88cd672f8f8bc3fab3dc 100644 (file)
@@ -2693,8 +2693,8 @@ If INTERACTIVE, prompt user for details."
               "org\\.eclipse\\.equinox\\.launcher_.*\\.jar$"
               (file-name-nondirectory path))
              (file-exists-p path))))
-    (let* ((classpath (or (getenv "CLASSPATH") ":"))
-           (cp-jar (cl-find-if #'is-the-jar (split-string classpath ":")))
+    (let* ((classpath (or (getenv "CLASSPATH") path-separator))
+           (cp-jar (cl-find-if #'is-the-jar (split-string classpath path-separator)))
            (jar cp-jar)
            (dir
             (cond
@@ -2732,7 +2732,7 @@ If INTERACTIVE, prompt user for details."
       (when (and interactive (not cp-jar)
                  (y-or-n-p (concat "Add path to the server program "
                                    "to CLASSPATH environment variable?")))
-        (setenv "CLASSPATH" (concat (getenv "CLASSPATH") ":" jar)))
+        (setenv "CLASSPATH" (concat (getenv "CLASSPATH") path-separator jar)))
       (unless (file-directory-p workspace)
         (make-directory workspace t))
       (cons 'eglot-eclipse-jdt