Function: cider--setup-menu-for-clojure-major-mode

cider--setup-menu-for-clojure-major-mode is an autoloaded and byte-compiled function defined in cider-mode.el.

Signature

(cider--setup-menu-for-clojure-major-mode MODE-MAP)

Documentation

Setup a Cider menu for a Clojure major mode's MODE-MAP.

This menu works as an easy entry-point into CIDER. Even if cider.el isn't loaded yet, this will be shown in Clojure buffers next to the Clojure menu.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-mode.el
;;;###autoload
(defun cider--setup-menu-for-clojure-major-mode (mode-map)
  "Setup a Cider menu for a Clojure major mode's MODE-MAP.

This menu works as an easy entry-point into CIDER.  Even if cider.el isn't
loaded yet, this will be shown in Clojure buffers next to the Clojure menu."
  ;; NOTE: This entry-point menu deliberately uses a menu-bar key of its own
  ;; (`cider-jack-in') rather than the `cider' key used by `cider-mode's own
  ;; menu (see `cider-mode-menu').  Both menus are labelled "CIDER", and Emacs
  ;; *merges* same-key menu-bar entries coming from different active keymaps -
  ;; which would drop the `:visible' guard below and show two "CIDER" menus at
  ;; once when `cider-mode' is active (see #4078).  A distinct key keeps them
  ;; separate, so `:visible' alone decides which one is shown.
  (define-key mode-map [menu-bar cider-jack-in]
    `(menu-item "CIDER"
                ,(easy-menu-create-menu
                  "CIDER"
                  '(["Start a Clojure REPL" cider-jack-in-clj
                     :help "Starts an nREPL server and connects a Clojure REPL to it."]
                    ["Connect to a Clojure REPL" cider-connect-clj
                     :help "Connects to a REPL that's already running."]
                    ["Start a ClojureScript REPL" cider-jack-in-cljs
                     :help "Starts an nREPL server and connects a ClojureScript REPL to it."]
                    ["Connect to a ClojureScript REPL" cider-connect-cljs
                     :help "Connects to a ClojureScript REPL that's already running."]
                    ["Start a Clojure REPL, and a ClojureScript REPL" cider-jack-in-clj&cljs
                     :help "Starts an nREPL server, connects a Clojure REPL to it, and then a ClojureScript REPL."]
                    "--"
                    ["View user manual" cider-view-manual]
                    ["Diagnose your setup" cider-doctor]))
                :visible (not cider-mode))))