Skip to content

Commit d73683c

Browse files
author
Bozhidar Batsov
committed
Use a dynamic mode-line for cider-mode
By default it displays the namespace of the current Clojure buffer.
1 parent 5e19be0 commit d73683c

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ integration.
2020
search function/var names (bound to <kbd>C-c C-d a</kbd>) or documentation
2121
(bound to <kbd>C-c C-d A</kbd>).
2222
* You can open Grimoire's entry for a particular Clojure (built-in) symbol with
23-
`cider-grimoire` (<kbd>C-c C-d g</kbd>).
23+
`cider-grimoire` (<kbd>C-c C-d g</kbd>).
24+
* `cider-mode` now displays the namespace of the current buffer in the mode-line
25+
(as SLIME does).
2426

2527
### Changes
2628

cider-mode.el

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@
3232

3333
(require 'cider-interaction)
3434

35+
;;;###autoload
36+
(defcustom cider-mode-line
37+
'(" cider" (:eval (format "[%s]" (cider-current-ns))))
38+
"Mode line ligher for `cider-mode'.
39+
40+
The value of this variable is a mode line template as in
41+
`mode-line-format'. See Info Node `(elisp)Mode Line Format' for
42+
details about mode line templates.
43+
44+
Customize this variable to change how `cider-mode' displays its
45+
status in the mode line. The default value displays the current ns.
46+
Set this variable to nil to disable the mode line
47+
entirely."
48+
:group 'cider
49+
:type 'sexp
50+
:risky t
51+
:package-version '(cider "0.7.0"))
52+
3553
(defvar cider-mode-map
3654
(let ((map (make-sparse-keymap)))
3755
(define-key map (kbd "M-.") 'cider-jump)
@@ -133,7 +151,7 @@
133151
134152
\\{cider-mode-map}"
135153
nil
136-
" cider"
154+
cider-mode-line
137155
cider-mode-map
138156
(make-local-variable 'completion-at-point-functions)
139157
(add-to-list 'completion-at-point-functions

0 commit comments

Comments
 (0)