Klimi's new dotfiles with stow.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.6 KiB

5 years ago
  1. ;;; magit-core.el --- core functionality -*- lexical-binding: t -*-
  2. ;; Copyright (C) 2010-2019 The Magit Project Contributors
  3. ;;
  4. ;; You should have received a copy of the AUTHORS.md file which
  5. ;; lists all contributors. If not, see http://magit.vc/authors.
  6. ;; Author: Jonas Bernoulli <jonas@bernoul.li>
  7. ;; Maintainer: Jonas Bernoulli <jonas@bernoul.li>
  8. ;; Magit is free software; you can redistribute it and/or modify it
  9. ;; under the terms of the GNU General Public License as published by
  10. ;; the Free Software Foundation; either version 3, or (at your option)
  11. ;; any later version.
  12. ;;
  13. ;; Magit is distributed in the hope that it will be useful, but WITHOUT
  14. ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  15. ;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
  16. ;; License for more details.
  17. ;;
  18. ;; You should have received a copy of the GNU General Public License
  19. ;; along with Magit. If not, see http://www.gnu.org/licenses.
  20. ;;; Commentary:
  21. ;; This library requires several other libraries, so that yet other
  22. ;; libraries can just require this one, instead of having to require
  23. ;; all the other ones. In other words this separates the low-level
  24. ;; stuff from the rest. It also defines some Custom groups.
  25. ;;; Code:
  26. (require 'magit-utils)
  27. (require 'magit-section)
  28. (require 'magit-git)
  29. (require 'magit-mode)
  30. (require 'magit-margin)
  31. (require 'magit-process)
  32. (require 'magit-transient)
  33. (require 'magit-autorevert)
  34. (when (magit--libgit-available-p)
  35. (condition-case err
  36. (require 'magit-libgit)
  37. (error
  38. (setq magit-inhibit-libgit 'error)
  39. (message "Error while loading `magit-libgit': %S" err)
  40. (message "That is not fatal. The `libegit2' module just won't be used."))))
  41. (defgroup magit nil
  42. "Controlling Git from Emacs."
  43. :link '(url-link "https://magit.vc")
  44. :link '(info-link "(magit)FAQ")
  45. :link '(info-link "(magit)")
  46. :group 'tools)
  47. (defgroup magit-essentials nil
  48. "Options that every Magit user should briefly think about.
  49. Each of these options falls into one or more of these categories:
  50. * Options that affect Magit's behavior in fundamental ways.
  51. * Options that affect safety.
  52. * Options that affect performance.
  53. * Options that are of a personal nature."
  54. :link '(info-link "(magit)Essential Settings")
  55. :group 'magit)
  56. (defgroup magit-miscellaneous nil
  57. "Miscellanous Magit options."
  58. :group 'magit)
  59. (defgroup magit-commands nil
  60. "Options controlling behavior of certain commands."
  61. :group 'magit)
  62. (defgroup magit-git-arguments nil
  63. "Options controlling what arguments are passed to Git.
  64. Most of these options can be set using the respective popup,
  65. and it is recommended that you do that because then you can
  66. be certain that Magit supports the arguments that you select.
  67. An option `magit-NAME-argument' specifies the arguments that
  68. are enabled by default by the popup `magit-NAME-popup'."
  69. :link '(info-link "(magit-popup)Customizing Existing Popups")
  70. :link '(info-link "(magit-popup)Usage")
  71. :group 'magit-commands)
  72. (defgroup magit-modes nil
  73. "Modes used or provided by Magit."
  74. :group 'magit)
  75. (defgroup magit-buffers nil
  76. "Options concerning Magit buffers."
  77. :link '(info-link "(magit)Modes and Buffers")
  78. :group 'magit)
  79. (defgroup magit-refresh nil
  80. "Options controlling how Magit buffers are refreshed."
  81. :link '(info-link "(magit)Automatic Refreshing of Magit Buffers")
  82. :group 'magit
  83. :group 'magit-buffers)
  84. (defgroup magit-faces nil
  85. "Faces used by Magit."
  86. :group 'magit
  87. :group 'faces)
  88. (defgroup magit-extensions nil
  89. "Extensions to Magit."
  90. :group 'magit)
  91. (custom-add-to-group 'magit-modes 'git-commit 'custom-group)
  92. (custom-add-to-group 'magit-faces 'git-commit-faces 'custom-group)
  93. (custom-add-to-group 'magit-modes 'git-rebase 'custom-group)
  94. (custom-add-to-group 'magit-faces 'git-rebase-faces 'custom-group)
  95. (custom-add-to-group 'magit-process 'with-editor 'custom-group)
  96. (defgroup magit-related nil
  97. "Options that are relevant to Magit but that are defined elsewhere."
  98. :link '(custom-group-link vc)
  99. :link '(custom-group-link smerge)
  100. :link '(custom-group-link ediff)
  101. :link '(custom-group-link auto-revert)
  102. :group 'magit
  103. :group 'magit-extensions
  104. :group 'magit-essentials)
  105. (custom-add-to-group 'magit-related 'auto-revert-check-vc-info 'custom-variable)
  106. (custom-add-to-group 'magit-auto-revert 'auto-revert-check-vc-info 'custom-variable)
  107. (custom-add-to-group 'magit-related 'ediff-window-setup-function 'custom-variable)
  108. (custom-add-to-group 'magit-related 'smerge-refine-ignore-whitespace 'custom-variable)
  109. (custom-add-to-group 'magit-related 'vc-follow-symlinks 'custom-variable)
  110. ;;; _
  111. (provide 'magit-core)
  112. ;;; magit-core.el ends here