diff options
author | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-10-21 23:36:07 +0100 |
---|---|---|
committer | Artur Malabarba <bruce.connor.am@gmail.com> | 2015-10-21 23:36:07 +0100 |
commit | 4210c4d076f4b91585b5621d2b64097ae2483c55 (patch) | |
tree | 9f6cfc3566e07845795cc60d75e5f7b9bc9c44e7 /cider-debug.el | |
parent | 33263a858cd4aa228f990cfc82e64a9a7a3b3c0a (diff) |
Normalize the usage of if/when-let with that of let
Diffstat (limited to 'cider-debug.el')
-rw-r--r-- | cider-debug.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cider-debug.el b/cider-debug.el index a96016b2..0164ed40 100644 --- a/cider-debug.el +++ b/cider-debug.el @@ -109,8 +109,8 @@ This variable must be set before starting the repl connection." (defun cider-browse-instrumented-defs () "List all instrumented definitions." (interactive) - (if-let (all (thread-first (cider-nrepl-send-sync-request (list "op" "debug-instrumented-defs")) - (nrepl-dict-get "list"))) + (if-let ((all (thread-first (cider-nrepl-send-sync-request (list "op" "debug-instrumented-defs")) + (nrepl-dict-get "list")))) (with-current-buffer (cider-popup-buffer cider-browse-ns-buffer t) (let ((inhibit-read-only t)) (erase-buffer) @@ -313,8 +313,8 @@ In order to work properly, this mode must be activated by ;; We wait a moment before clearing overlays and the read-onlyness, so that ;; cider-nrepl has a chance to send the next message, and so that the user ;; doesn't accidentally hit `n' between two messages (thus editing the code). - (when-let (proc (unless nrepl-ongoing-sync-request - (get-buffer-process (cider-current-connection)))) + (when-let ((proc (unless nrepl-ongoing-sync-request + (get-buffer-process (cider-current-connection))))) (accept-process-output proc 0.5)) (unless cider--debug-mode (setq buffer-read-only nil) @@ -391,7 +391,7 @@ specific message." "Create a new debugging buffer with CODE and namespace NS. ID is the id of the message that instrumented CODE." (let ((buffer-name (format cider--debug-buffer-format id))) - (if-let (buffer (get-buffer buffer-name)) + (if-let ((buffer (get-buffer buffer-name))) (cider-popup-buffer-display buffer 'select) (with-current-buffer (cider-popup-buffer buffer-name 'select #'clojure-mode 'ancillary) @@ -409,7 +409,7 @@ ID is the id of the message that instrumented CODE." (defun cider--debug-goto-keyval (key) "Find KEY in current sexp or return nil." - (when-let (limit (ignore-errors (save-excursion (up-list) (point)))) + (when-let ((limit (ignore-errors (save-excursion (up-list) (point))))) (search-forward-regexp (concat "\\_<" (regexp-quote key) "\\_>") limit 'noerror))) @@ -488,8 +488,8 @@ needed. It is expected to contain at least \"key\", \"input-type\", and (when (or code (and file point)) ;; We prefer in-source debugging. (when (and file point) - (if-let (buf (find-buffer-visiting file)) - (if-let (win (get-buffer-window buf)) + (if-let ((buf (find-buffer-visiting file))) + (if-let ((win (get-buffer-window buf))) (select-window win) (pop-to-buffer buf)) (find-file file)) |