summaryrefslogtreecommitdiff
path: root/cider-selector.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2013-12-05 23:24:59 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2013-12-05 23:24:59 +0200
commitc4cc30aab60966fc673cfed13053c99240321a68 (patch)
tree93692845d1fe70bd8f0763574f4ce1e450ca3adc /cider-selector.el
parent15d8b127cdecaf5488363b417119140775c84096 (diff)
Extract selector help buffer name into a defconst
Diffstat (limited to 'cider-selector.el')
-rw-r--r--cider-selector.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/cider-selector.el b/cider-selector.el
index 766e7491..0e02cdb6 100644
--- a/cider-selector.el
+++ b/cider-selector.el
@@ -34,6 +34,9 @@
(require 'cider-interaction)
(require 'cider-repl) ; for cider-find-or-create-repl-buffer
+(defconst cider-selector-help-buffer "*Selector Help*"
+ "The name of the selector's help buffer.")
+
(defvar cider-selector-methods nil
"List of buffer-selection methods for the `cider-selector' command.
Each element is a list (KEY DESCRIPTION FUNCTION).
@@ -105,9 +108,9 @@ is chosen. The returned buffer is selected with
#'< :key #'car))))
(def-cider-selector-method ?? "Selector help buffer."
- (ignore-errors (kill-buffer "*Select Help*"))
- (with-current-buffer (get-buffer-create "*Select Help*")
- (insert "Select Methods:\n\n")
+ (ignore-errors (kill-buffer cider-selector-help-buffer))
+ (with-current-buffer (get-buffer-create cider-selector-help-buffer)
+ (insert "CIDER Selector Methods:\n\n")
(loop for (key line nil) in cider-selector-methods
do (insert (format "%c:\t%s\n" key line)))
(goto-char (point-min))