magit-core.el 4.45 KB
Newer Older
1
;;; magit-core.el --- core functionality  -*- lexical-binding: t -*-
2

Jonas Bernoulli's avatar
Jonas Bernoulli committed
3
;; Copyright (C) 2010-2018  The Magit Project Contributors
4
;;
5 6
;; You should have received a copy of the AUTHORS.md file which
;; lists all contributors.  If not, see http://magit.vc/authors.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

;; Author: Jonas Bernoulli <jonas@bernoul.li>
;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>

;; Magit is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; Magit is distributed in the hope that it will be useful, but WITHOUT
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
;; or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
;; License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with Magit.  If not, see http://www.gnu.org/licenses.

24 25 26 27 28 29 30
;;; Commentary:

;; This library requires several other libraries, so that yet other
;; libraries can just require this one, instead of having to require
;; all the other ones.  In other words this separates the low-level
;; stuff from the rest.  It also defines some Custom groups.

31 32 33 34 35 36
;;; Code:

(require 'magit-utils)
(require 'magit-section)
(require 'magit-git)
(require 'magit-mode)
37
(require 'magit-margin)
38
(require 'magit-process)
39
(require 'magit-autorevert)
40

41 42
(defgroup magit nil
  "Controlling Git from Emacs."
43 44 45
  :link '(url-link "https://magit.vc")
  :link '(info-link "(magit)FAQ")
  :link '(info-link "(magit)")
46 47
  :group 'tools)

48 49 50 51 52 53 54 55 56
(defgroup magit-essentials nil
  "Options that every Magit user should briefly think about.

Each of these options falls into one or more of these categories:

* Options that affect Magit's behavior in fundamental ways.
* Options that affect safety.
* Options that affect performance.
* Options that are of a personal nature."
57
  :link '(info-link "(magit)Essential Settings")
58 59 60 61 62 63
  :group 'magit)

(defgroup magit-miscellaneous nil
  "Miscellanous Magit options."
  :group 'magit)

64 65 66 67
(defgroup magit-commands nil
  "Options controlling behavior of certain commands."
  :group 'magit)

68 69 70 71 72 73 74 75 76
(defgroup magit-git-arguments nil
  "Options controlling what arguments are passed to Git.

Most of these options can be set using the respective popup,
and it is recommended that you do that because then you can
be certain that Magit supports the arguments that you select.

An option `magit-NAME-argument' specifies the arguments that
are enabled by default by the popup `magit-NAME-popup'."
77 78
  :link '(info-link "(magit-popup)Customizing Existing Popups")
  :link '(info-link "(magit-popup)Usage")
79 80
  :group 'magit-commands)

81 82 83 84
(defgroup magit-modes nil
  "Modes used or provided by Magit."
  :group 'magit)

85 86
(defgroup magit-buffers nil
  "Options concerning Magit buffers."
87
  :link '(info-link "(magit)Modes and Buffers")
88 89
  :group 'magit)

90 91
(defgroup magit-refresh nil
  "Options controlling how Magit buffers are refreshed."
92
  :link '(info-link "(magit)Automatic Refreshing of Magit Buffers")
93 94 95
  :group 'magit
  :group 'magit-buffers)

96 97 98 99 100
(defgroup magit-faces nil
  "Faces used by Magit."
  :group 'magit
  :group 'faces)

101 102 103 104
(defgroup magit-extensions nil
  "Extensions to Magit."
  :group 'magit)

105 106 107 108 109 110 111
(custom-add-to-group 'magit-modes   'magit-popup       'custom-group)
(custom-add-to-group 'magit-faces   'magit-popup-faces 'custom-group)
(custom-add-to-group 'magit-modes   'git-commit        'custom-group)
(custom-add-to-group 'magit-faces   'git-commit-faces  'custom-group)
(custom-add-to-group 'magit-modes   'git-rebase        'custom-group)
(custom-add-to-group 'magit-faces   'git-rebase-faces  'custom-group)
(custom-add-to-group 'magit-process 'with-editor       'custom-group)
112

113 114
(defgroup magit-related nil
  "Options that are relevant to Magit but that are defined elsewhere."
115 116 117 118
  :link '(custom-group-link vc)
  :link '(custom-group-link smerge)
  :link '(custom-group-link ediff)
  :link '(custom-group-link auto-revert)
119 120 121 122 123 124 125
  :group 'magit
  :group 'magit-extensions
  :group 'magit-essentials)

(custom-add-to-group 'magit-related     'auto-revert-check-vc-info 'custom-variable)
(custom-add-to-group 'magit-auto-revert 'auto-revert-check-vc-info 'custom-variable)

126
(custom-add-to-group 'magit-related 'ediff-window-setup-function 'custom-variable)
127 128
(custom-add-to-group 'magit-related 'smerge-refine-ignore-whitespace 'custom-variable)
(custom-add-to-group 'magit-related 'vc-follow-symlinks 'custom-variable)
129

130
;;; _
131 132
(provide 'magit-core)
;;; magit-core.el ends here