emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/git-commit f321409f4d 01/10: Rename magit-utils.el to magi


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit f321409f4d 01/10: Rename magit-utils.el to magit-base.el
Date: Tue, 22 Feb 2022 08:58:15 -0500 (EST)

branch: elpa/git-commit
commit f321409f4d67dff38220ed479b88d9e6b88b2dee
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Rename magit-utils.el to magit-base.el
    
    It hasn't been true for quite some time that this library only (or
    even just mostly) defined things that have "very little to do with
    Git or Magit", and it is time to account for that.
    
    "magit-base.el" serves a role similar to that of "magit-core.el",
    except that it comes even earlier in the dependency tree.  For that
    reason other libraries that depend on one or more of the libraries
    that `magit-base' depends on should just require that feature.
---
 default.mk                             |  4 ++--
 docs/Makefile                          |  2 +-
 docs/magit-section.org                 |  4 ++--
 docs/magit.org                         |  4 ++--
 lisp/Makefile                          | 20 +++++++++-----------
 lisp/git-commit.el                     |  8 ++++----
 lisp/{magit-utils.el => magit-base.el} | 19 +++++++------------
 lisp/magit-core.el                     |  3 +--
 lisp/magit-git.el                      |  3 +--
 lisp/magit-margin.el                   |  2 +-
 lisp/magit-mode.el                     |  2 +-
 lisp/magit-process.el                  |  3 +--
 12 files changed, 32 insertions(+), 42 deletions(-)

diff --git a/default.mk b/default.mk
index 1e821c8bab..479225a222 100644
--- a/default.mk
+++ b/default.mk
@@ -50,9 +50,8 @@ PDFFILES  = $(addsuffix .pdf,$(filter-out 
git-commit,$(PACKAGES)))
 EPUBFILES = $(addsuffix .epub,$(filter-out git-commit,$(PACKAGES)))
 
 ELS  = git-commit.el
-ELS += magit-transient.el
-ELS += magit-utils.el
 ELS += magit-section.el
+ELS += magit-base.el
 ifeq "$(BUILD_MAGIT_LIBGIT)" "true"
 ELS += magit-libgit.el
 endif
@@ -60,6 +59,7 @@ ELS += magit-git.el
 ELS += magit-mode.el
 ELS += magit-margin.el
 ELS += magit-process.el
+ELS += magit-transient.el
 ELS += magit-autorevert.el
 ELS += magit-core.el
 ELS += magit-diff.el
diff --git a/docs/Makefile b/docs/Makefile
index aa160ab8df..8fb7dae71a 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -165,7 +165,7 @@ release-manuals: $(PUBLISH_TARGETS)
 
 # Lisp ###############################################################
 
-# When making changes here, then also adjust the copy in magit-utils.el.
+# When making changes here, then also adjust the copy in magit-base.el.
 define ORG_MAN_EXPORT
 (advice-add 'org-man-export :around 'org-man-export--magit-gitman)
 (defun org-man-export--magit-gitman (fn link description format)
diff --git a/docs/magit-section.org b/docs/magit-section.org
index bda34a7506..deb8769f2f 100644
--- a/docs/magit-section.org
+++ b/docs/magit-section.org
@@ -269,8 +269,8 @@ General Public License for more details.
 
 # IMPORTANT: Also update ORG_ARGS and ORG_EVAL in the Makefile.
 # Local Variables:
-# eval: (require 'magit-utils nil t)
-# eval: (require 'ol-man      nil t)
+# eval: (require 'magit-base nil t)
+# eval: (require 'ol-man nil t)
 # indent-tabs-mode: nil
 # org-src-preserve-indentation: nil
 # End:
diff --git a/docs/magit.org b/docs/magit.org
index a88dde8c56..7cfcb5e913 100644
--- a/docs/magit.org
+++ b/docs/magit.org
@@ -9132,8 +9132,8 @@ General Public License for more details.
 
 # IMPORTANT: Also update ORG_ARGS and ORG_EVAL in the Makefile.
 # Local Variables:
-# eval: (require 'magit-utils nil t)
-# eval: (require 'ol-man      nil t)
+# eval: (require 'magit-base nil t)
+# eval: (require 'ol-man nil t)
 # indent-tabs-mode: nil
 # org-src-preserve-indentation: nil
 # End:
diff --git a/lisp/Makefile b/lisp/Makefile
index d56731ca9c..065297c68b 100644
--- a/lisp/Makefile
+++ b/lisp/Makefile
@@ -10,24 +10,22 @@ all: lisp
 ## Build order #######################################################
 
 git-commit.elc:
-magit-utils.elc:
 magit-section.elc:
+magit-base.elc:            magit-section.elc
 ifeq "$(BUILD_MAGIT_LIBGIT)" "true"
 magit-libgit.elc:
-magit-git.elc:             magit-utils.elc magit-section.elc magit-libgit.elc
+magit-git.elc:             magit-base.elc magit-libgit.elc
 else
-magit-git.elc:             magit-utils.elc magit-section.elc
+magit-git.elc:             magit-base.elc
 endif
-magit-mode.elc:            magit-section.elc magit-git.elc
-magit-margin.elc:          magit-section.elc magit-mode.elc
-magit-process.elc:         magit-utils.elc magit-section.elc \
-                           magit-git.elc magit-mode.elc
+magit-mode.elc:            magit-base.elc magit-git.elc
+magit-margin.elc:          magit-base.elc magit-mode.elc
+magit-process.elc:         magit-base.elc magit-git.elc magit-mode.elc
 magit-transient.elc:       magit-git.elc magit-mode.elc magit-process.elc
 magit-autorevert.elc:      magit-git.elc magit-process.elc
-magit-core.elc:            magit-margin.elc magit-utils.elc \
-                           magit-section.elc magit-git.elc \
-                           magit-transient.elc magit-mode.elc \
-                           magit-process.elc magit-autorevert.elc
+magit-core.elc:            magit-base.elc magit-git.elc magit-mode.elc \
+                           magit-margin.elc magit-process.elc \
+                           magit-transient.elc magit-autorevert.elc
 magit-diff.elc:            git-commit.elc magit-core.elc
 magit-log.elc:             magit-core.elc magit-diff.elc
 magit-wip.elc:             magit-core.elc magit-log.elc
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index 17594bcf55..fa5782d535 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -115,9 +115,9 @@
 (require 'seq)
 (require 'subr-x)
 
+(require 'magit-base nil t)
 (require 'magit-git nil t)
 (require 'magit-mode nil t)
-(require 'magit-utils nil t)
 
 (require 'log-edit)
 (require 'ring)
@@ -135,7 +135,7 @@
 (defvar font-lock-beg)
 (defvar font-lock-end)
 
-(declare-function magit-completing-read "magit-utils"
+(declare-function magit-completing-read "magit-base"
                   (prompt collection &optional predicate require-match
                           initial-input hist def fallback))
 (declare-function magit-expand-git-file-name "magit-git" (filename))
@@ -210,7 +210,7 @@ The major mode configured here is turned on by the minor 
mode
   "Hook run at the end of `git-commit-setup'."
   :group 'git-commit
   :type 'hook
-  :get (and (featurep 'magit-utils) 'magit-hook-custom-get)
+  :get (and (featurep 'magit-base) 'magit-hook-custom-get)
   :options '(git-commit-save-message
              git-commit-setup-changelog-support
              magit-generate-changelog
@@ -240,7 +240,7 @@ This hook is only run if `magit' is available.
 Also see `magit-post-commit-hook'."
   :group 'git-commit
   :type 'hook
-  :get (and (featurep 'magit-utils) 'magit-hook-custom-get))
+  :get (and (featurep 'magit-base) 'magit-hook-custom-get))
 
 (defcustom git-commit-finish-query-functions
   '(git-commit-check-style-conventions)
diff --git a/lisp/magit-utils.el b/lisp/magit-base.el
similarity index 98%
rename from lisp/magit-utils.el
rename to lisp/magit-base.el
index f44926e6ac..ecb04421a2 100644
--- a/lisp/magit-utils.el
+++ b/lisp/magit-base.el
@@ -1,4 +1,4 @@
-;;; magit-utils.el --- various utilities  -*- lexical-binding: t; coding: 
utf-8 -*-
+;;; magit-base.el --- early birds   -*- lexical-binding: t; coding: utf-8 -*-
 
 ;; Copyright (C) 2010-2022  The Magit Project Contributors
 ;;
@@ -28,15 +28,10 @@
 
 ;;; Commentary:
 
-;; This library defines several utility functions used by several
-;; other libraries which cannot depend on one another (because
-;; circular dependencies are not good).  Luckily most (all) of these
-;; functions have very little (nothing) to do with Git, so we not only
-;; have to do this, it even makes sense.
-
-;; Unfortunately there are also some options which are used by several
-;; libraries which cannot depend on one another, they are defined here
-;; too.
+;; This library defines utility functions, options and other things that
+;; have to be available early on because they are used by several other
+;; libraries, which cannot depend on one another, because that would lead
+;; to circular dependencies.
 
 ;;; Code:
 
@@ -1230,5 +1225,5 @@ Like `message', except that `message-log-max' is bound to 
nil."
          ,@body))))
 
 ;;; _
-(provide 'magit-utils)
-;;; magit-utils.el ends here
+(provide 'magit-base)
+;;; magit-base.el ends here
diff --git a/lisp/magit-core.el b/lisp/magit-core.el
index c0873a9843..1eda58e9e3 100644
--- a/lisp/magit-core.el
+++ b/lisp/magit-core.el
@@ -32,8 +32,7 @@
 
 ;;; Code:
 
-(require 'magit-utils)
-(require 'magit-section)
+(require 'magit-base)
 (require 'magit-git)
 (require 'magit-mode)
 (require 'magit-margin)
diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index ea0cb1732d..fcabd0fab9 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -29,8 +29,7 @@
 
 ;;; Code:
 
-(require 'magit-utils)
-(require 'magit-section)
+(require 'magit-base)
 
 ;; From `magit-branch'.
 (defvar magit-branch-prefer-remote-upstream)
diff --git a/lisp/magit-margin.el b/lisp/magit-margin.el
index 5f6375a64b..ae8d8ad9bf 100644
--- a/lisp/magit-margin.el
+++ b/lisp/magit-margin.el
@@ -32,7 +32,7 @@
 
 ;;; Code:
 
-(require 'magit-section)
+(require 'magit-base)
 (require 'magit-transient)
 (require 'magit-mode)
 
diff --git a/lisp/magit-mode.el b/lisp/magit-mode.el
index 4ec9c27f99..7dc1282472 100644
--- a/lisp/magit-mode.el
+++ b/lisp/magit-mode.el
@@ -31,7 +31,7 @@
 
 ;;; Code:
 
-(require 'magit-section)
+(require 'magit-base)
 (require 'magit-git)
 
 (require 'format-spec)
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 165bd1628a..f069c991fd 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -33,8 +33,7 @@
 
 ;;; Code:
 
-(require 'magit-utils)
-(require 'magit-section)
+(require 'magit-base)
 (require 'magit-git)
 (require 'magit-mode)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]