Skip to content

Rename the #_ toggle commands to "discard"#705

Merged
bbatsov merged 2 commits into
masterfrom
rename-toggle-discard
Jul 9, 2026
Merged

Rename the #_ toggle commands to "discard"#705
bbatsov merged 2 commits into
masterfrom
rename-toggle-discard

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 9, 2026

Copy link
Copy Markdown
Member

Clojure and edn officially call #_ the discard reader macro, and clojure-mode already uses that term on the font-lock side (clojure-discard-face, #688). The toggle commands were the odd ones out, still calling it "ignore".

Renames them to match:

  • clojure-toggle-ignore -> clojure-toggle-discard
  • clojure-toggle-ignore-surrounding-form -> clojure-toggle-discard-surrounding-form
  • clojure-toggle-ignore-defun -> clojure-toggle-discard-defun

The old names stay as define-obsolete-function-aliases, so existing configs and keybindings keep working (with a deprecation warning). Keybindings, menu labels, docstrings and the README are updated too; there is a test covering the aliases.

Part of an effort to standardize on "discard" across the clojure-emacs Emacs packages (CIDER just did the same for its cider-comment-style option).

bbatsov added 2 commits July 9, 2026 12:47
Clojure and edn officially call `#_` the discard reader macro, and clojure-mode
already uses that term for `clojure-discard-face`.  Rename the toggle commands
to match: `clojure-toggle-discard', `clojure-toggle-discard-surrounding-form'
and `clojure-toggle-discard-defun', keeping the old `clojure-toggle-ignore*'
names as obsolete aliases.  Keybindings, menu, docstrings and the README are
updated accordingly.
@bbatsov bbatsov merged commit 3c68569 into master Jul 9, 2026
7 checks passed
@bbatsov bbatsov deleted the rename-toggle-discard branch July 9, 2026 09:52
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.

1 participant