update of packages

This commit is contained in:
2023-11-04 19:26:41 +01:00
parent e162a12b58
commit 3b54a3236d
726 changed files with 297673 additions and 34585 deletions

View File

@@ -1,6 +1,6 @@
;;; magit.el --- A Git porcelain inside Emacs -*- lexical-binding:t; coding:utf-8 -*-
;; Copyright (C) 2008-2022 The Magit Project Contributors
;; Copyright (C) 2008-2023 The Magit Project Contributors
;; Author: Marius Vollmer <marius.vollmer@gmail.com>
;; Jonas Bernoulli <jonas@bernoul.li>
@@ -20,10 +20,11 @@
;; Package-Version: 3.3.0.50-git
;; Package-Requires: (
;; (emacs "25.1")
;; (compat "28.1.1.2")
;; (compat "29.1.3.4")
;; (dash "2.19.1")
;; (git-commit "3.3.0")
;; (magit-section "3.3.0")
;; (seq "2.24")
;; (transient "0.3.6")
;; (with-editor "3.0.5"))
@@ -75,6 +76,7 @@
;; For `magit:--gpg-sign'
(declare-function epg-list-keys "epg" (context &optional name mode))
(declare-function epg-decode-dn "epg" (alist))
(defvar epa-protocol)
;;; Options
@@ -84,7 +86,7 @@ If the specified primary key has signing capacity then it is used
as the value of the `--gpg-sign' argument without prompting, even
when other such keys exist. To be able to select another key you
must then use a prefix argument."
:package-version '(magit . "3.4.0")
:package-version '(magit . "4.0.0")
:group 'magit-commands
:type 'string)
@@ -227,7 +229,7 @@ and/or `magit-branch-remote-head'."
(defface magit-signature-error
'((t :foreground "light blue"))
"Face for signatures that cannot be checked (e.g. missing key)."
"Face for signatures that cannot be checked (e.g., missing key)."
:group 'magit-faces)
(defface magit-cherry-unmatched
@@ -248,69 +250,79 @@ and/or `magit-branch-remote-head'."
;;; Global Bindings
;;;###autoload
(define-obsolete-variable-alias 'global-magit-file-mode
'magit-define-global-key-bindings "Magit 3.0.0")
(defcustom magit-define-global-key-bindings 'default
"Which set of key bindings to add to the global keymap, if any.
;;;###autoload
(defcustom magit-define-global-key-bindings t
"Whether to bind some Magit commands in the global keymap.
This option controls which set of Magit key bindings, if any, may
be added to the global keymap, even before Magit is first used in
the current Emacs session.
If this variable is non-nil, then the following bindings may
be added to the global keymap. The default is t.
If the value is nil, no bindings are added.
key binding
--- -------
C-x g magit-status
C-x M-g magit-dispatch
C-c M-g magit-file-dispatch
If `default', maybe add:
These bindings may be added when `after-init-hook' is run.
Each binding is added if and only if at that time no other key
is bound to the same command and no other command is bound to
the same key. In other words we try to avoid adding bindings
that are unnecessary, as well as bindings that conflict with
other bindings.
C-x g `magit-status'
C-x M-g `magit-dispatch'
C-c M-g `magit-file-dispatch'
Adding the above bindings is delayed until `after-init-hook'
is called to allow users to set the variable anywhere in their
init file (without having to make sure to do so before `magit'
is loaded or autoloaded) and to increase the likelihood that
all the potentially conflicting user bindings have already
been added.
If `recommended', maybe add:
C-x g `magit-status'
C-c g `magit-dispatch'
C-c f `magit-file-dispatch'
These bindings are strongly recommended, but we cannot use
them by default, because the \"C-c <LETTER>\" namespace is
strictly reserved for bindings added by the user.
The bindings in the chosen set may be added when
`after-init-hook' is run. Each binding is added if, and only
if, at that time no other key is bound to the same command,
and no other command is bound to the same key. In other words
we try to avoid adding bindings that are unnecessary, as well
as bindings that conflict with other bindings.
Adding these bindings is delayed until `after-init-hook' is
run to allow users to set the variable anywhere in their init
file (without having to make sure to do so before `magit' is
loaded or autoloaded) and to increase the likelihood that all
the potentially conflicting user bindings have already been
added.
To set this variable use either `setq' or the Custom interface.
Do not use the function `customize-set-variable' because doing
that would cause Magit to be loaded immediately when that form
that would cause Magit to be loaded immediately, when that form
is evaluated (this differs from `custom-set-variables', which
doesn't load the libraries that define the customized variables).
Setting this variable to nil has no effect if that is done after
the key bindings have already been added.
We recommend that you bind \"C-c g\" instead of \"C-c M-g\" to
`magit-file-dispatch'. The former is a much better binding
but the \"C-c <letter>\" namespace is strictly reserved for
users; preventing Magit from using it by default.
Also see info node `(magit)Commands for Buffers Visiting Files'."
:package-version '(magit . "3.0.0")
Setting this variable has no effect if `after-init-hook' has
already been run."
:package-version '(magit . "4.0.0")
:group 'magit-essentials
:type 'boolean)
:type '(choice (const :tag "Add no binding" nil)
(const :tag "Use default bindings" default)
(const :tag "Use recommended bindings" recommended)))
;;;###autoload
(progn
(defun magit-maybe-define-global-key-bindings (&optional force)
"See variable `magit-define-global-key-bindings'."
(when magit-define-global-key-bindings
(let ((map (current-global-map)))
(dolist (elt '(("C-x g" . magit-status)
("C-x M-g" . magit-dispatch)
("C-c M-g" . magit-file-dispatch)))
(let ((key (kbd (car elt)))
(def (cdr elt)))
(when (or force
(not (or (lookup-key map key)
(where-is-internal def (make-sparse-keymap) t))))
(define-key map key def)))))))
(pcase-dolist (`(,key . ,def)
(cond ((eq magit-define-global-key-bindings 'recommended)
'(("C-x g" . magit-status)
("C-c g" . magit-dispatch)
("C-c f" . magit-file-dispatch)))
('(("C-x g" . magit-status)
("C-x M-g" . magit-dispatch)
("C-c M-g" . magit-file-dispatch)))))
;; This is autoloaded and thus is used before `compat' is
;; loaded, so we cannot use `keymap-lookup' and `keymap-set'.
(when (or force
(not (or (lookup-key map (kbd key))
(where-is-internal def (make-sparse-keymap) t))))
(define-key map (kbd key) def))))))
(if after-init-time
(magit-maybe-define-global-key-bindings)
(add-hook 'after-init-hook #'magit-maybe-define-global-key-bindings t)))
@@ -389,12 +401,12 @@ Also see info node `(magit)Commands for Buffers Visiting Files'."
("U" "Unstage all" magit-unstage-all)]]
["Essential commands"
:if-derived magit-mode
[("g" " refresh current buffer" magit-refresh)
("q" " bury current buffer" magit-mode-bury-buffer)
("<tab>" " toggle section at point" magit-section-toggle)
("<return>" "visit thing at point" magit-visit-thing)]
[("C-x m" "show all key bindings" describe-mode)
("C-x i" "show Info manual" magit-info)]])
[("g" " Refresh current buffer" magit-refresh)
("q" " Bury current buffer" magit-mode-bury-buffer)
("<tab>" " Toggle section at point" magit-section-toggle)
("<return>" "Visit thing at point" magit-visit-thing)]
[("C-x m" "Show all key bindings" describe-mode)
("C-x i" "Show Info manual" magit-info)]])
;;; Git Popup
@@ -544,7 +556,7 @@ is run in the top-level directory of the current working tree."
(defconst magit-font-lock-keywords
(eval-when-compile
`((,(concat "(\\(magit-define-section-jumper\\)\\_>"
"[ \t'\(]*"
"[ \t'(]*"
"\\(\\(?:\\sw\\|\\s_\\)+\\)?")
(1 'font-lock-keyword-face)
(2 'font-lock-function-name-face nil t))
@@ -553,7 +565,8 @@ is run in the top-level directory of the current working tree."
"magit-bind-match-strings"
"magit-with-temp-index"
"magit-with-blob"
"magit-with-toplevel") t)
"magit-with-toplevel")
t)
"\\_>")
. 1))))
@@ -566,13 +579,16 @@ is run in the top-level directory of the current working tree."
Use the function by the same name instead of this variable.")
;;;###autoload
(defun magit-version (&optional print-dest)
(defun magit-version (&optional print-dest interactive)
"Return the version of Magit currently in use.
If optional argument PRINT-DEST is non-nil, output
stream (interactively, the echo area, or the current buffer with
a prefix argument), also print the used versions of Magit, Git,
and Emacs to it."
(interactive (list (if current-prefix-arg (current-buffer) t)))
If optional argument PRINT-DEST is non-nil, also print the used
versions of Magit, Transient, Git and Emacs to the output stream
selected by that argument. Interactively use the echo area, or
with a prefix argument use the current buffer. Additionally put
the output in the kill ring.
\n(fn &optional PRINT-DEST)"
(interactive (list (if current-prefix-arg (current-buffer) t) t))
(let ((magit-git-global-arguments nil)
(toplib (or load-file-name buffer-file-name))
debug)
@@ -614,12 +630,12 @@ and Emacs to it."
(when (featurep 'package)
(push 'elpa debug)
(ignore-errors
(--when-let (assq 'magit package-alist)
(when-let ((version (cadr (assq 'magit package-alist))))
(push t debug)
(setq magit-version
(and (fboundp 'package-desc-version)
(package-version-join
(package-desc-version (cadr it))))))))
(package-desc-version version)))))))
(progn
(push 'dirname debug)
(let ((dirname (file-name-nondirectory
@@ -628,7 +644,7 @@ and Emacs to it."
(setq magit-version (match-string 1 dirname)))))
;; If all else fails, just report the commit hash. It's
;; better than nothing and we cannot do better in the case
;; of e.g. a shallow clone.
;; of e.g., a shallow clone.
(progn
(push 'hash debug)
;; Same check as above to see if it's really the Magit repo.
@@ -640,24 +656,35 @@ and Emacs to it."
(magit-git-string "rev-parse" "HEAD"))))))))
(if (stringp magit-version)
(when print-dest
(princ (format "Magit %s%s, Git %s, Emacs %s, %s"
(or magit-version "(unknown)")
(or (and (ignore-errors
(magit--version>= magit-version "2008"))
(ignore-errors
(require 'lisp-mnt)
(and (fboundp 'lm-header)
(format
" [>= %s]"
(with-temp-buffer
(insert-file-contents
(locate-library "magit.el" t))
(lm-header "Package-Version"))))))
"")
(magit--safe-git-version)
emacs-version
system-type)
print-dest))
(let ((str (format
"Magit %s%s, Transient %s, Git %s, Emacs %s, %s"
(or magit-version "(unknown)")
(or (and (ignore-errors
(magit--version>= magit-version "2008"))
(ignore-errors
(require 'lisp-mnt)
(and (fboundp 'lm-header)
(format
" [>= %s]"
(with-temp-buffer
(insert-file-contents
(locate-library "magit.el" t))
(lm-header "Package-Version"))))))
"")
(or (ignore-errors
(require 'lisp-mnt)
(and (fboundp 'lm-header)
(with-temp-buffer
(insert-file-contents
(locate-library "transient.el" t))
(lm-header "Package-Version"))))
"(unknown)")
(magit--safe-git-version)
emacs-version
system-type)))
(when interactive
(kill-new str))
(princ str print-dest)))
(setq debug (reverse debug))
(setq magit-version 'error)
(when magit-version
@@ -726,7 +753,6 @@ For X11 something like ~/.xinitrc should work.\n"
(require 'magit-bisect)
(require 'magit-stash)
(require 'magit-blame)
(require 'magit-obsolete)
(require 'magit-submodule)
(unless (load "magit-autoloads" t t)
(require 'magit-patch)