diff options
author | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-08-01 17:02:31 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-08-01 17:02:31 +0300 |
commit | d73683c07a2af8cb990f81aa4f74eec5a9dc1d83 (patch) | |
tree | 26fe9c717e63103277f4331c0ae9b1233941adc9 | |
parent | 5e19be0acb520db913ada42e9f2e901cec2e62ad (diff) |
Use a dynamic mode-line for cider-mode
By default it displays the namespace of the current Clojure buffer.
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | cider-mode.el | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 097d22b2..f9bc2edd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,9 @@ integration. search function/var names (bound to <kbd>C-c C-d a</kbd>) or documentation (bound to <kbd>C-c C-d A</kbd>). * You can open Grimoire's entry for a particular Clojure (built-in) symbol with - `cider-grimoire` (<kbd>C-c C-d g</kbd>). +`cider-grimoire` (<kbd>C-c C-d g</kbd>). +* `cider-mode` now displays the namespace of the current buffer in the mode-line + (as SLIME does). ### Changes diff --git a/cider-mode.el b/cider-mode.el index 2c8a6b4e..34f754f7 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -32,6 +32,24 @@ (require 'cider-interaction) +;;;###autoload +(defcustom cider-mode-line + '(" cider" (:eval (format "[%s]" (cider-current-ns)))) + "Mode line ligher for `cider-mode'. + +The value of this variable is a mode line template as in +`mode-line-format'. See Info Node `(elisp)Mode Line Format' for +details about mode line templates. + +Customize this variable to change how `cider-mode' displays its +status in the mode line. The default value displays the current ns. +Set this variable to nil to disable the mode line +entirely." + :group 'cider + :type 'sexp + :risky t + :package-version '(cider "0.7.0")) + (defvar cider-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "M-.") 'cider-jump) @@ -133,7 +151,7 @@ \\{cider-mode-map}" nil - " cider" + cider-mode-line cider-mode-map (make-local-variable 'completion-at-point-functions) (add-to-list 'completion-at-point-functions |