Function: clojure--toggle-ignore-next-sexp
clojure--toggle-ignore-next-sexp is a byte-compiled function defined
in clojure-mode.el.
Signature
(clojure--toggle-ignore-next-sexp &optional N)
Documentation
Insert or delete N #_ ignore macros at the current point.
Point must be directly before a sexp or the #_ characters. When acting on a top level form, insert #_ on a new line preceding the form to prevent indentation changes.
Source Code
;; Defined in ~/.emacs.d/elpa/clojure-mode-20260325.811/clojure-mode.el
;;; Toggle Ignore forms
(defun clojure--toggle-ignore-next-sexp (&optional n)
"Insert or delete N `#_' ignore macros at the current point.
Point must be directly before a sexp or the #_ characters.
When acting on a top level form, insert #_ on a new line
preceding the form to prevent indentation changes."
(let ((rgx (rx-to-string `(repeat ,(or n 1) (seq "#_" (* (in "\r\n" blank)))))))
(backward-prefix-chars)
(skip-chars-backward "#_ \r\n")
(skip-chars-forward " \r\n")
(if (looking-at rgx)
(delete-region (point) (match-end 0))
(dotimes (_ (or n 1)) (insert-before-markers "#_"))
(when (zerop (car (syntax-ppss)))
(insert-before-markers "\n")))))