Skip to content

Conversation

yuhan0
Copy link
Contributor

@yuhan0 yuhan0 commented Apr 30, 2022

See clojure-emacs/cider-nrepl#698.

Added prefix argument behaviors to cider-load-buffer, -load-file, -load-all-files, and -eval-ns-form commands, since these are likely to throw errors when some redefined namespace alias conflicts with the hidden REPL state. Conceptually something like a "hard reload".

Also adds a standalone command cider-undef-all, which is somewhat less useful on its own and would usually be followed by a load anyway. Proposed keybinding: C-c C-M-u by extension of C-c C-u.

Also fixes a bug in my last PR #3185 (I should really avoid doing these last minute refactorings 😶)


Before submitting the PR make sure the following things have been done (and denote this
by checking the relevant checkboxes):

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • All code passes the linter (eldev lint) which is based on elisp-lint and includes
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the user manual (if adding/changing user-visible functionality)

Thanks!

If you're just starting out to hack on CIDER you might find this section of its
manual
extremely useful.

(defun cider-eval-ns-form ()
"Evaluate the current buffer's namespace form."
(interactive)
(defun cider-eval-ns-form (&optional undef-all)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this mentioned in the docs. Perhaps it wasn't there in the first place?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added, thanks for the catch!

@bbatsov bbatsov merged commit af1ab56 into clojure-emacs:master May 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants