diff --git a/cider-browse-ns.el b/cider-browse-ns.el index 4e9e6be79..142295bc4 100644 --- a/cider-browse-ns.el +++ b/cider-browse-ns.el @@ -268,10 +268,10 @@ list of items." (let* ((max-length (cider-browse-ns--column-width items))) (cl-labels ((keys-from-pred - (pred items) - (nrepl-dict-keys (nrepl-dict-filter (lambda (_ var-meta) - (funcall pred var-meta)) - items)))) + (pred items) + (nrepl-dict-keys (nrepl-dict-filter (lambda (_ var-meta) + (funcall pred var-meta)) + items)))) (cond ((eql cider-browse-ns-group-by 'type) (let* ((func-keys (keys-from-pred #'cider-browse-ns--meta-function-p items)) diff --git a/cider-doc.el b/cider-doc.el index addfdeb82..17c562126 100644 --- a/cider-doc.el +++ b/cider-doc.el @@ -447,10 +447,10 @@ in a COMPACT format is specified, FOR-TOOLTIP if specified." (cider--help-setup-xref (list #'cider-doc-lookup (format "%s/%s" ns name)) nil buffer) (with-current-buffer buffer (cl-flet ((emit (text &optional face sep) - (insert (if face - (propertize text 'font-lock-face face) - text) - (or sep "\n")))) + (insert (if face + (propertize text 'font-lock-face face) + text) + (or sep "\n")))) (emit (if class java-name clj-name) 'font-lock-function-name-face) (when super (emit (concat "Extends: " (cider-font-lock-as 'java-mode super)))) diff --git a/cider-eval.el b/cider-eval.el index 0a422fe43..a40e404c7 100644 --- a/cider-eval.el +++ b/cider-eval.el @@ -406,12 +406,12 @@ _ARG and _RESET are ignored, as there is only ever one compilation error. They exist for compatibility with `next-error'." (interactive) (cl-labels ((goto-next-note-boundary - () - (let ((p (or (cider-find-property 'cider-note-p) - (cider-find-property 'cider-note-p t)))) - (when p - (goto-char p) - (message "%s" (get-char-property p 'cider-note)))))) + () + (let ((p (or (cider-find-property 'cider-note-p) + (cider-find-property 'cider-note-p t)))) + (when p + (goto-char p) + (message "%s" (get-char-property p 'cider-note)))))) ;; if we're already on a compilation error, first jump to the end of ;; it, so that we find the next error. (when (get-char-property (point) 'cider-note-p) diff --git a/cider-mode.el b/cider-mode.el index ceea16a42..7c6082406 100644 --- a/cider-mode.el +++ b/cider-mode.el @@ -789,40 +789,40 @@ with the given LIMIT." deprecated enlightened macros functions vars instrumented traced) (cl-labels ((handle-plist - (plist) - ;; Note that (memq 'function cider-font-lock-dynamically) and similar statements are evaluated differently - ;; for `core' - they're always truthy for `core' (see related core-handling code some lines below): - (let ((do-function (memq 'function cider-font-lock-dynamically)) - (do-var (memq 'var cider-font-lock-dynamically)) - (do-macro (memq 'macro cider-font-lock-dynamically)) - (do-deprecated (memq 'deprecated cider-font-lock-dynamically))) - (while plist - (let ((sym (pop plist)) - (meta (pop plist))) - (pcase (nrepl-dict-get meta "cider/instrumented") - (`nil nil) - (`"\"breakpoint-if-interesting\"" - (push sym instrumented)) - (`"\"light-form\"" - (push sym enlightened))) - ;; The ::traced keywords can be inlined by MrAnderson, so - ;; we catch that case too. - ;; FIXME: This matches values too, not just keys. - (when (seq-find (lambda (k) (and (stringp k) - (string-match (rx "clojure.tools.trace/traced" eos) k))) - meta) - (push sym traced)) - (when (and do-deprecated (nrepl-dict-get meta "deprecated")) - (push sym deprecated)) - (let ((is-macro (nrepl-dict-get meta "macro")) - (is-function (or (nrepl-dict-get meta "fn") - (nrepl-dict-get meta "arglists")))) - (cond ((and do-macro is-macro) - (push sym macros)) - ((and do-function is-function) - (push sym functions)) - ((and do-var (not is-function) (not is-macro)) - (push sym vars))))))))) + (plist) + ;; Note that (memq 'function cider-font-lock-dynamically) and similar statements are evaluated differently + ;; for `core' - they're always truthy for `core' (see related core-handling code some lines below): + (let ((do-function (memq 'function cider-font-lock-dynamically)) + (do-var (memq 'var cider-font-lock-dynamically)) + (do-macro (memq 'macro cider-font-lock-dynamically)) + (do-deprecated (memq 'deprecated cider-font-lock-dynamically))) + (while plist + (let ((sym (pop plist)) + (meta (pop plist))) + (pcase (nrepl-dict-get meta "cider/instrumented") + (`nil nil) + (`"\"breakpoint-if-interesting\"" + (push sym instrumented)) + (`"\"light-form\"" + (push sym enlightened))) + ;; The ::traced keywords can be inlined by MrAnderson, so + ;; we catch that case too. + ;; FIXME: This matches values too, not just keys. + (when (seq-find (lambda (k) (and (stringp k) + (string-match (rx "clojure.tools.trace/traced" eos) k))) + meta) + (push sym traced)) + (when (and do-deprecated (nrepl-dict-get meta "deprecated")) + (push sym deprecated)) + (let ((is-macro (nrepl-dict-get meta "macro")) + (is-function (or (nrepl-dict-get meta "fn") + (nrepl-dict-get meta "arglists")))) + (cond ((and do-macro is-macro) + (push sym macros)) + ((and do-function is-function) + (push sym functions)) + ((and do-var (not is-function) (not is-macro)) + (push sym vars))))))))) ;; For core members, we override `cider-font-lock-dynamically', since all core members should get the same treatment: (when (memq 'core cider-font-lock-dynamically) (let ((cider-font-lock-dynamically '(function var macro core deprecated))) diff --git a/cider-ns.el b/cider-ns.el index 70e06d0be..ca5752a0c 100644 --- a/cider-ns.el +++ b/cider-ns.el @@ -166,13 +166,13 @@ presenting the error message as an overlay." "Refresh LOG-BUFFER with RESPONSE." (nrepl-dbind-response response (out err reloading progress status error error-ns after before) (cl-flet* ((log (message &optional face) - (cider-emit-into-popup-buffer log-buffer message face t)) + (cider-emit-into-popup-buffer log-buffer message face t)) (log-echo (message &optional face) - (log message face) - (unless cider-ns-refresh-show-log-buffer - (let ((message-truncate-lines t)) - (message "cider-ns-refresh: %s" message))))) + (log message face) + (unless cider-ns-refresh-show-log-buffer + (let ((message-truncate-lines t)) + (message "cider-ns-refresh: %s" message))))) (cond (out (log out)) diff --git a/cider-repl.el b/cider-repl.el index 675db2e28..606a46f3e 100644 --- a/cider-repl.el +++ b/cider-repl.el @@ -354,11 +354,11 @@ description transform) where transform is called with the param-value if present." (cl-labels ((emit-comment - (contents) - (insert-before-markers - (propertize - (if (string-blank-p contents) ";;\n" (concat ";; " contents "\n")) - 'font-lock-face 'font-lock-comment-face)))) + (contents) + (insert-before-markers + (propertize + (if (string-blank-p contents) ";;\n" (concat ";; " contents "\n")) + 'font-lock-face 'font-lock-comment-face)))) (let ((jack-in-command (plist-get cider-launch-params :jack-in-cmd)) (cljs-repl-type (plist-get cider-launch-params :cljs-repl-type)) (cljs-init-form (plist-get cider-launch-params :repl-init-form))) diff --git a/cider-selector.el b/cider-selector.el index ec4a6503d..0d1064f1d 100644 --- a/cider-selector.el +++ b/cider-selector.el @@ -121,56 +121,56 @@ is chosen. The returned buffer is selected with #'< :key #'car)))) (def-cider-selector-method ?? "Selector help buffer." - (ignore-errors (kill-buffer cider-selector-help-buffer)) - (with-current-buffer (get-buffer-create cider-selector-help-buffer) - (insert "CIDER Selector Methods:\n\n") - (cl-loop for (key line nil) in cider-selector-methods - do (insert (format "%c:\t%s\n" key line))) - (goto-char (point-min)) - (help-mode) - (display-buffer (current-buffer) t)) - (cider-selector) - (current-buffer)) + (ignore-errors (kill-buffer cider-selector-help-buffer)) + (with-current-buffer (get-buffer-create cider-selector-help-buffer) + (insert "CIDER Selector Methods:\n\n") + (cl-loop for (key line nil) in cider-selector-methods + do (insert (format "%c:\t%s\n" key line))) + (goto-char (point-min)) + (help-mode) + (display-buffer (current-buffer) t)) + (cider-selector) + (current-buffer)) (cl-pushnew (list ?4 "Select in other window" (lambda () (cider-selector t))) cider-selector-methods :key #'car) (def-cider-selector-method ?c - "Most recently visited clojure-mode buffer." - (cider-selector--recently-visited-buffer '(clojure-mode clojure-ts-mode))) + "Most recently visited clojure-mode buffer." + (cider-selector--recently-visited-buffer '(clojure-mode clojure-ts-mode))) (def-cider-selector-method ?e - "Most recently visited emacs-lisp-mode buffer." - (cider-selector--recently-visited-buffer 'emacs-lisp-mode)) + "Most recently visited emacs-lisp-mode buffer." + (cider-selector--recently-visited-buffer 'emacs-lisp-mode)) (def-cider-selector-method ?q "Abort." - (top-level)) + (top-level)) (def-cider-selector-method ?r - "Current REPL buffer or as a fallback, the most recently + "Current REPL buffer or as a fallback, the most recently visited cider-repl-mode buffer." - (or (cider-current-repl) - (cider-selector--recently-visited-buffer 'cider-repl-mode))) + (or (cider-current-repl) + (cider-selector--recently-visited-buffer 'cider-repl-mode))) (def-cider-selector-method ?m - "Current connection's *nrepl-messages* buffer." - (nrepl-messages-buffer (cider-current-repl))) + "Current connection's *nrepl-messages* buffer." + (nrepl-messages-buffer (cider-current-repl))) (def-cider-selector-method ?x - "*cider-error* buffer." - cider-error-buffer) + "*cider-error* buffer." + cider-error-buffer) (def-cider-selector-method ?p - "*cider-profile* buffer." - cider-profile-buffer) + "*cider-profile* buffer." + cider-profile-buffer) (def-cider-selector-method ?d - "*cider-doc* buffer." - cider-doc-buffer) + "*cider-doc* buffer." + cider-doc-buffer) (def-cider-selector-method ?s - "*cider-scratch* buffer." - (cider-scratch-find-or-create-buffer)) + "*cider-scratch* buffer." + (cider-scratch-find-or-create-buffer)) (provide 'cider-selector) diff --git a/cider-stacktrace.el b/cider-stacktrace.el index 930193897..b8d91add3 100644 --- a/cider-stacktrace.el +++ b/cider-stacktrace.el @@ -346,9 +346,9 @@ filters for the resulting machinery." (save-excursion (goto-char (point-min)) (cl-flet ((next-detail (end) - (when-let* ((pos (next-single-property-change (point) 'detail))) - (when (< pos end) - (goto-char pos))))) + (when-let* ((pos (next-single-property-change (point) 'detail))) + (when (< pos end) + (goto-char pos))))) (let ((inhibit-read-only t)) ;; For each cause... (while (cider-stacktrace-next-cause) diff --git a/nrepl-client.el b/nrepl-client.el index ed29fc8a1..f88859670 100644 --- a/nrepl-client.el +++ b/nrepl-client.el @@ -1402,9 +1402,9 @@ If ID is nil, return nil." "Pretty print nREPL list like OBJECT. FOREGROUND and BUTTON are as in `nrepl-log-pp-object'." (cl-flet ((color (str) - (propertize str 'face - (append '(:weight ultra-bold) - (when foreground `(:foreground ,foreground)))))) + (propertize str 'face + (append '(:weight ultra-bold) + (when foreground `(:foreground ,foreground)))))) (let ((head (format "(%s" (car object)))) (insert (color head)) (if (null (cdr object))