diff options
author | Tianxiang Xiong <tianxiang.xiong@gmail.com> | 2018-02-07 21:34:08 -0800 |
---|---|---|
committer | Bozhidar Batsov <bozhidar.batsov@gmail.com> | 2018-02-11 20:38:38 +0700 |
commit | c74cc6ac123b239503b91fa20fab1e75d0e2385d (patch) | |
tree | 589d762630ec70d4c4a28ffd87515d5cf568cb7b | |
parent | b81073f38552a849c2636bbc2c5d7e152787b88c (diff) |
Add `cider-profile-menu`
The submenu can be found under the CIDER Interactions menu.
-rw-r--r-- | cider-mode.el | 17 | ||||
-rw-r--r-- | cider-profile.el | 18 |
2 files changed, 24 insertions, 11 deletions
diff --git a/cider-mode.el b/cider-mode.el index 287bc92b..095e1a12 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -279,6 +279,14 @@ Configure `cider-cljs-*-repl' to change the ClojureScript REPL to use for your b ["Find resource" cider-find-resource] ["Find keyword" cider-find-keyword] ["Go back" cider-pop-back]) + ("Browse" + ["Browse namespace" cider-browse-ns] + ["Browse all namespaces" cider-browse-ns-all] + ["Browse spec" cider-browse-spec] + ["Browse all specs" cider-browse-spec-all] + ["Browse REPL input history" cider-repl-history] + ["Browse classpath" cider-classpath] + ["Browse classpath entry" cider-open-classpath-entry]) ("Macroexpand" ["Macroexpand-1" cider-macroexpand-1] ["Macroexpand-all" cider-macroexpand-all]) @@ -293,14 +301,7 @@ Configure `cider-cljs-*-repl' to change the ClojureScript REPL to use for your b ["List instrumented defs" cider-browse-instrumented-defs] "--" ["Configure the Debugger" (customize-group 'cider-debug)]) - ("Browse" - ["Browse namespace" cider-browse-ns] - ["Browse all namespaces" cider-browse-ns-all] - ["Browse spec" cider-browse-spec] - ["Browse all specs" cider-browse-spec-all] - ["Browse REPL input history" cider-repl-history] - ["Browse classpath" cider-classpath] - ["Browse classpath entry" cider-open-classpath-entry]) + ,cider-profile-menu ("Misc" ["Clojure Cheatsheet" cider-cheatsheet] ["Flush completion cache" cider-completion-flush-caches])) diff --git a/cider-profile.el b/cider-profile.el index 46221e71..0b00d401 100644 --- a/cider-profile.el +++ b/cider-profile.el @@ -41,6 +41,17 @@ map) "CIDER profiler keymap.") +(defconst cider-profile-menu + '("Profile" + ["Toggle var profiling" cider-profile-toggle] + ["Toggle namespace profiling" cider-profile-ns-toggle] + "--" + ["Display var profiling status" cider-profile-var-profiled-p] + ["Display max sample count" cider-profile-samples] + ["Display summary" cider-profile-summary] + ["Clear data" cider-profile-clear]) + "CIDER profiling submenu.") + ;;;###autoload (defun cider-profile-message-response-handler (handler &optional buffer) "Default message response handler. @@ -171,9 +182,10 @@ With prefix arg or no symbol at point, prompts for a var." ;;;###autoload (defun cider-profile-var-summary (query) - "Display profile date var under point QUERY. -Defaults to the symbol at point. -With prefix arg or no symbol at point, prompts for a var." + "Display profile data for var under point QUERY. + +Defaults to the symbol at point. With prefix arg or no symbol at point, +prompts for a var." (interactive "P") (cider-ensure-op-supported "profile-var-summary") (cider-read-symbol-name |