Conversation
CIDER requires Emacs 28+, so `(version< emacs-version "26")` branches can never be taken. Simplify `cider--ssh-hosts` to use a plain `let` binding for `non-essential` instead of `cl-progv`, and simplify `cider--tramp-file-name` to call `make-tramp-file-name` directly.
These aliases were deprecated since CIDER 0.18. The current version is 1.21, so any external code has had ample time to update.
Replace the two-step pattern of make-local-variable followed by push with a single setq-local call in cider-repl-setup-paredit.
- Fix typo "returrns" -> "returns" in test description - Fix copy-paste bug: duplicate -T:test alias test, second should be -X:test - Remove describe block incorrectly nested inside an it block - Replace fset on global names (file-name, line-num, col-num, face) with properly namespaced test helper functions to avoid polluting the global function namespace
Use the more idiomatic (unless ...) form instead of (when (not ...)) across cider-xref.el, cider-repl.el, nrepl-client.el, and cider-stacktrace.el.
- Simplify (not (null dir)) to just dir in boolean context - Use string-empty-p instead of (= (length path) 0) - Merge adjacent string literal concatenations into single strings
- Remove cider-inspector-spacious-collections (defvar never referenced; code that used it was removed in a prior refactoring) - Remove cider-repl-history-separator-face (defcustom never wired up; the face is defined but never applied to the separator text) - Remove cider--clojure-execution-error and cider--clojure-spec-execution-error (rx fragments defined but never composed into any regexp)
- Remove (require 'url-vars) from cider-clojuredocs.el - Remove (require 'map) and (require 'seq) from cider-debug.el - Remove (require 'map) and (require 'seq) from cider-format.el - Remove (require 'map) from cider-stacktrace.el
- Remove (declare-function cider-mode ...) from cider-xref.el - Remove (declare-function cider-nrepl-request:eval ...) from cider-connection.el - Remove (declare-function cider-classpath-entries ...) from cider-connection.el - Remove (declare-function cider-repl-emit-interactive-stderr ...) from nrepl-client.el
Member
Author
|
In case someone's wondering - I'm trying to determine how well does Claude Code work with Elisp these days and a bulk attempt to fix some small problems seemed like a good starting point. I have to say I'm pleasantly surprised that it actually discovered many small issues, even if it clearly is not well-versed in Elisp, compared to something like Python or Rust. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A collection of small code quality improvements across the codebase:
(version< emacs-version "26")branches incider.elcan never be takenmake-local-variable+pushwithsetq-local-T:testinstead of-X:test),describeincorrectly nested insideit, andfsetpolluting global function namespace replaced with properly namespaced helpers(when (not ...))with(unless ...)— 7 instances across 4 files(not (null x))→x,(= (length path) 0)→(string-empty-p path), merge adjacent string literal concatenationsdefvar/defcustom/defconst, 6 unusedrequirestatements, 4 unuseddeclare-functionstatementsTest plan
cider-stacktrace.elremain)