]> git.eshelyaron.com Git - emacs.git/commitdiff
Eglot: error if no hierarchies available at point
authorJoão Távora <joaotavora@gmail.com>
Tue, 11 Feb 2025 15:28:59 +0000 (15:28 +0000)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Feb 2025 10:48:25 +0000 (11:48 +0100)
* lisp/progmodes/eglot.el (eglot--hierarchy-1): Error if no
hierarchy at point.

(cherry picked from commit 9d2d8a4d39441ad9de3862164aa57dbdf5874baf)

lisp/progmodes/eglot.el

index db9c94289a2149377e2bf7fb93ab76590090227e..b98f0347ad0c6efef474b1253139ed8ca3fb067a 100644 (file)
@@ -4605,6 +4605,7 @@ If NOERROR, return predicate, else erroring function."
                  server
                  preparer
                  (eglot--TextDocumentPositionParams))))
+    (unless roots (eglot--error "No hierarchy information here"))
     (with-current-buffer (get-buffer-create name)
       (eglot-hierarchy-mode)
       (setq-local