Skip to content

Commit

Permalink
* lisp/magit-section.el: Allow several functions as arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCassou committed Mar 18, 2024
1 parent 28bcd29 commit b7f2dae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lisp/magit-section.el
Expand Up @@ -2179,10 +2179,15 @@ again use `remove-hook'."

(defun magit-disable-section-inserter (fn)
"Disable the section inserter FN in the current repository.
FN can be a single section inserter or a list of inserters.
It is only intended for use in \".dir-locals.el\" and
\".dir-locals-2.el\". Also see info node `(magit)Per-Repository
Configuration'."
(cl-pushnew fn magit-disabled-section-inserters))
(unless (listp fn) (cl-callf list fn))
(dolist (each fn)
(cl-pushnew each magit-disabled-section-inserters)))

(put 'magit-disable-section-inserter 'safe-local-eval-function t)

Expand Down

0 comments on commit b7f2dae

Please sign in to comment.