summaryrefslogtreecommitdiff
path: root/cider-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'cider-mode.el')
-rw-r--r--cider-mode.el47
1 files changed, 26 insertions, 21 deletions
diff --git a/cider-mode.el b/cider-mode.el
index 8258f05c..8c5c4dd9 100644
--- a/cider-mode.el
+++ b/cider-mode.el
@@ -1,7 +1,7 @@
;;; cider-mode.el --- Minor mode for REPL interactions -*- lexical-binding: t -*-
;; Copyright © 2012-2013 Tim King, Phil Hagelberg, Bozhidar Batsov
-;; Copyright © 2013-2018 Bozhidar Batsov, Artur Malabarba and CIDER contributors
+;; Copyright © 2013-2019 Bozhidar Batsov, Artur Malabarba and CIDER contributors
;;
;; Author: Tim King <kingtim@gmail.com>
;; Phil Hagelberg <technomancy@gmail.com>
@@ -54,7 +54,7 @@ Info contains the connection type, project name and host:port endpoint."
(if-let* ((current-connection (ignore-errors (cider-current-repl))))
(with-current-buffer current-connection
(concat
- cider-repl-type
+ (symbol-name cider-repl-type)
(when cider-mode-line-show-connection
(format ":%s@%s:%s"
(or (cider--project-name nrepl-project-dir) "<no project>")
@@ -133,8 +133,8 @@ Clojure buffer and the REPL buffer."
(when-let* ((type (cider-repl-type-for-buffer b)))
(unless a-buf
(setq a-buf b))
- (or (equal type "multi")
- (equal type repl-type)))))
+ (or (eq type 'multi)
+ (eq type repl-type)))))
(buffer-list)))))
(if-let* ((buf (or the-buf a-buf)))
(if cider-repl-display-in-current-window
@@ -512,21 +512,23 @@ As it stands Emacs fires these events on <mouse-8> and <mouse-9> on 'x' and
;; loaded yet, this will be shown in Clojure buffers next to the "Clojure"
;; menu.
;;;###autoload
-(eval-after-load 'clojure-mode
- '(easy-menu-define cider-clojure-mode-menu-open clojure-mode-map
- "Menu for Clojure mode.
+(with-eval-after-load 'clojure-mode
+ (easy-menu-define cider-clojure-mode-menu-open clojure-mode-map
+ "Menu for Clojure mode.
This is displayed in `clojure-mode' buffers, if `cider-mode' is not active."
- `("CIDER" :visible (not cider-mode)
- ["Start a Clojure REPL" cider-jack-in
- :help "Starts an nREPL server (with Leiningen, Boot, or Gradle) and connects a REPL to it."]
- ["Connect to a Clojure REPL" cider-connect
- :help "Connects to a REPL that's already running."]
- ["Connect to a ClojureScript REPL" cider-connect-clojurescript
- :help "Connects to a ClojureScript REPL that's already running."]
- ["Start a Clojure REPL, and a ClojureScript REPL" cider-jack-in-cljs
- :help "Starts an nREPL server, connects a Clojure REPL to it, and then a ClojureScript REPL."]
- "--"
- ["View manual online" cider-view-manual])))
+ `("CIDER" :visible (not cider-mode)
+ ["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 manual online" cider-view-manual])))
;;; Dynamic indentation
(defcustom cider-dynamic-indentation t
@@ -571,9 +573,9 @@ variable to nil you'll still see basic syntax highlighting.
The value is a list of symbols, each one indicates a different type of var
that should be font-locked:
- `macro' (default): Any defined macro gets the `font-lock-builtin-face'.
+ `macro' (default): Any defined macro gets the `font-lock-keyword-face'.
`function': Any defined function gets the `font-lock-function-face'.
- `var': Any non-local var gets the `font-lock-variable-face'.
+ `var': Any non-local var gets the `font-lock-variable-name-face'.
`deprecated' (default): Any deprecated var gets the `cider-deprecated-face'
face.
`core' (default): Any symbol from clojure.core (face depends on type).
@@ -672,7 +674,10 @@ the LIMIT in `cider--anchored-search-suppressed-forms`"
An unused reader conditional expression is an expression for a platform
that does not match the CIDER connection for the buffer. Search is done
with the given LIMIT."
- (let ((repl-types (seq-uniq (seq-map #'cider-repl-type (cider-repls))))
+ (let ((repl-types (seq-uniq (seq-map
+ (lambda (repl)
+ (symbol-name (cider-repl-type repl)))
+ (cider-repls))))
(result 'retry))
(while (and (eq result 'retry) (<= (point) limit))
(condition-case condition