branch: elpa/git-commit commit 4dd00058a1b989acf9cd9fa797229632adc8a6e9 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Use module type instead of corresponding magit-module-section class --- lisp/magit-diff.el | 6 +++--- lisp/magit-git.el | 4 ++-- lisp/magit-submodule.el | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el index b48eb1f0c5..fe97d57c49 100644 --- a/lisp/magit-diff.el +++ b/lisp/magit-diff.el @@ -2468,7 +2468,7 @@ section or a child thereof." (when rewind (setq range (replace-regexp-in-string "[^.]\\(\\.\\.\\)[^.]" "..." range t t 1))) - (magit-insert-section (magit-module-section module t) + (magit-insert-section (module module t) (magit-insert-heading (propertize (concat "modified " module) 'font-lock-face 'magit-diff-file-heading) @@ -2494,13 +2494,13 @@ section or a child thereof." (equal (match-string 1) module)) (magit-bind-match-strings (_module _range msg) nil (magit-delete-line) - (magit-insert-section (magit-module-section module) + (magit-insert-section (module module) (magit-insert-heading (propertize (concat "submodule " module) 'font-lock-face 'magit-diff-file-heading) " (" msg ")")))) (t - (magit-insert-section (magit-module-section module) + (magit-insert-section (module module) (magit-insert-heading (propertize (concat "modified " module) 'font-lock-face 'magit-diff-file-heading) diff --git a/lisp/magit-git.el b/lisp/magit-git.el index a080b898fd..7c86110238 100644 --- a/lisp/magit-git.el +++ b/lisp/magit-git.el @@ -1627,7 +1627,7 @@ to, or to some other symbolic-ref that points to the same ref." ([branch remote] (magit-section-parent-value it)))) (defun magit-module-at-point (&optional predicate) - (when (magit-section-match 'magit-module-section) + (when (magit-section-match 'module) (let ((module (oref (magit-current-section) value))) (and (or (not predicate) (funcall predicate module)) @@ -2886,7 +2886,7 @@ out. Only existing branches can be selected." (if predicate (user-error "No modules satisfying %s available" predicate) (user-error "No modules available")))) - (setq modules (magit-region-values 'magit-module-section)) + (setq modules (magit-region-values 'module)) (when modules (when predicate (setq modules (seq-filter predicate modules))) diff --git a/lisp/magit-submodule.el b/lisp/magit-submodule.el index 491ba1bbb8..24a3110dc1 100644 --- a/lisp/magit-submodule.el +++ b/lisp/magit-submodule.el @@ -488,7 +488,7 @@ or, failing that, the abbreviated HEAD commit hash." (dolist (module modules) (let ((default-directory (expand-file-name (file-name-as-directory module)))) - (magit-insert-section (magit-module-section module t) + (magit-insert-section (module module t) (insert (propertize (format path-format module) 'font-lock-face 'magit-diff-file-heading)) (if (not (file-exists-p ".git")) @@ -606,7 +606,7 @@ These sections can be expanded to show the respective commits." (expand-file-name (file-name-as-directory module)))) (when (file-accessible-directory-p default-directory) (magit-insert-section - ( magit-module-section module t + ( module module t :range range) (magit-insert-heading (propertize module