Function: def-projectile-commander-method

def-projectile-commander-method is a macro defined in projectile.el.

Signature

(def-projectile-commander-method KEY DESCRIPTION &rest BODY)

Documentation

Define a new projectile-commander method.

KEY is the key the user will enter to choose this method.

DESCRIPTION is a one-line sentence describing the method.

BODY is a series of forms which are evaluated when the method is chosen.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260310.858/projectile.el
(defmacro def-projectile-commander-method (key description &rest body)
  "Define a new `projectile-commander' method.

KEY is the key the user will enter to choose this method.

DESCRIPTION is a one-line sentence describing the method.

BODY is a series of forms which are evaluated when the method
is chosen."
  (let ((method `(lambda ()
                   ,@body)))
    `(setq projectile-commander-methods
           (seq-sort (lambda (a b) (< (car a) (car b)))
                     (cons (list ,key ,description ,method)
                           (assq-delete-all ,key projectile-commander-methods))))))