Function: eglot--define-hierarchy-command

eglot--define-hierarchy-command is a macro defined in eglot.el.gz.

Signature

(eglot--define-hierarchy-command NAME KIND FEATURE PREPARER SPECS)

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/eglot.el.gz
(defmacro eglot--define-hierarchy-command
    (name kind feature preparer specs)
  `(defun ,name (direction)
     ,(concat
       "Show " kind " hierarchy for symbol at point.\n"
       "DIRECTION can be:\n"
       (cl-loop for (_ _ d e) in specs
                concat (format "  - `%s' for %s;\n" d e))
       "or t, the default, to consider both.\n"
       "Interactively with a prefix argument, prompt for DIRECTION.")
     (interactive (if current-prefix-arg
                      (eglot--hierarchy-interactive ',specs)
                    (list t)))
     (let* ((specs ',specs)
            (specs (if (eq t direction) specs
                     (list
                      (cl-find direction specs :key #'cl-third)))))
       (eglot--hierarchy-1
        (format "*EGLOT %s hierarchy for %s*"
                ,kind
                (eglot-project-nickname (eglot--current-server-or-lose)))
        ,feature ,preparer specs))))