diff options
author | Bozhidar Batsov <bozhidar@batsov.com> | 2018-09-15 09:17:50 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@batsov.com> | 2018-09-15 09:17:50 +0300 |
commit | a6a9b8084db7a0e14cae8d0c0a2654d82d4d4aae (patch) | |
tree | bcdfceb49adec1093db1195fc08c072b0ddaed89 /cider-mode.el | |
parent | 67af6586659106accb25fc20b7853a3aa5a9e13b (diff) |
Replace usages of eval-after-load with with-eval-after-load
`with-eval-after-load` was introduced in Emacs 24.4 and its
usage results in a cleaner code.
`eval-after-load` is considered ill-behaved because it is a function,
not a macro, and thus requires the code inside it to be quoted, which
means that it cannot be byte-compiled. It also accepts only one form,
so if you have more than one, you need to use `progn`.
More details - https://stackoverflow.com/questions/21880139/what-is-with-eval-after-load-in-emacs-lisp
Diffstat (limited to 'cider-mode.el')
-rw-r--r-- | cider-mode.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/cider-mode.el b/cider-mode.el index 8258f05c..da2e5d4f 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -512,21 +512,21 @@ 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 + :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]))) ;;; Dynamic indentation (defcustom cider-dynamic-indentation t |