Function: projectile-replace--toggle-file
projectile-replace--toggle-file is an interactive and byte-compiled
function defined in projectile.el.
Signature
(projectile-replace--toggle-file)
Documentation
Toggle all matches in the file of the match on the current line.
If any of the file's matches are enabled they are all disabled; otherwise they are all enabled.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile-replace--toggle-file ()
"Toggle all matches in the file of the match on the current line.
If any of the file's matches are enabled they are all disabled;
otherwise they are all enabled."
(interactive)
(let ((m (projectile-replace--match-at-point)))
(unless m (user-error "No match on this line"))
(let* ((file (projectile-replace--match-file m))
(fmatches (cl-remove-if-not
(lambda (x) (equal (projectile-replace--match-file x) file))
projectile-replace--matches))
(target (not (cl-every #'projectile-replace--match-enabled fmatches))))
(dolist (x fmatches)
(setf (projectile-replace--match-enabled x) target)))
(projectile-replace--render-preserve)))