]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/eglot.el (eglot--connect): Use project-name
authorStephen Leake <stephen_leake@stephe-leake.org>
Tue, 22 Nov 2022 19:43:22 +0000 (11:43 -0800)
committerStephen Leake <stephen_leake@stephe-leake.org>
Tue, 22 Nov 2022 19:43:22 +0000 (11:43 -0800)
As discussed in bug#48747.

lisp/progmodes/eglot.el

index bbd902c1c7da2d1ff61d1e3395916408cea5747b..e057b12e0ee36705381e559483dff52ad107c4c1 100644 (file)
@@ -1181,7 +1181,9 @@ Each function is passed the server as an argument")
   "Connect to MANAGED-MODES, LANGUAGE-ID, PROJECT, CLASS and CONTACT.
 This docstring appeases checkdoc, that's all."
   (let* ((default-directory (project-root project))
-         (nickname (file-name-base (directory-file-name default-directory)))
+         (nickname (if (fboundp 'project-name)
+                       (project-name project)
+                     (file-name-base (directory-file-name default-directory))))
          (readable-name (format "EGLOT (%s/%s)" nickname managed-modes))
          autostart-inferior-process
          server-info