branch: elpa/git-commit
commit 7c794201c473e19c6c41c73148221151997d8197
Author: Jonas Bernoulli <jo...@bernoul.li>
Commit: Jonas Bernoulli <jo...@bernoul.li>

    Drop support for Emacs 25
---
 default.mk                |  2 +-
 lisp/git-commit-pkg.el    |  2 +-
 lisp/git-commit.el        |  2 +-
 lisp/magit-apply.el       |  5 -----
 lisp/magit-base.el        | 43 ++++++-------------------------------------
 lisp/magit-diff.el        | 21 ---------------------
 lisp/magit-extras.el      | 26 ++++++++------------------
 lisp/magit-pkg.el         |  2 +-
 lisp/magit-process.el     |  7 +++----
 lisp/magit-section-pkg.el |  2 +-
 lisp/magit-section.el     |  2 +-
 lisp/magit.el             |  2 +-
 12 files changed, 24 insertions(+), 92 deletions(-)

diff --git a/default.mk b/default.mk
index 6d9ab5e32f..6a50e28603 100644
--- a/default.mk
+++ b/default.mk
@@ -133,7 +133,7 @@ WITH_EDITOR_MELPA_SNAPSHOT   = 20240415
 
 DEV_VERSION_SUFFIX = .50-git
 
-EMACS_VERSION        = 25.1
+EMACS_VERSION = 26.1
 
 EMACSOLD := $(shell $(BATCH) --eval \
   "(and (version< emacs-version \"$(EMACS_VERSION)\") (princ \"true\"))")
diff --git a/lisp/git-commit-pkg.el b/lisp/git-commit-pkg.el
index ca6f499d99..a81334282d 100644
--- a/lisp/git-commit-pkg.el
+++ b/lisp/git-commit-pkg.el
@@ -1,6 +1,6 @@
 (define-package "git-commit" "3.3.0.50-git"
   "Edit Git commit messages."
-  '((emacs       "25.1")
+  '((emacs       "26.1")
     (compat      "29.1.4.5")
     (transient   "20240421")
     (with-editor "20240415"))
diff --git a/lisp/git-commit.el b/lisp/git-commit.el
index bae4f3727e..3daf92ee54 100644
--- a/lisp/git-commit.el
+++ b/lisp/git-commit.el
@@ -13,7 +13,7 @@
 
 ;; Package-Version: 3.3.0.50-git
 ;; Package-Requires: (
-;;     (emacs "25.1")
+;;     (emacs "26.1")
 ;;     (compat "29.1.4.5")
 ;;     (seq "2.24")
 ;;     (transient "0.6.0")
diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 2ab1690f53..bdac5e1388 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -49,11 +49,6 @@
                   (path &optional prefer-short))
 (defvar borg-user-emacs-directory)
 
-(cl-eval-when (compile load)
-  (when (< emacs-major-version 26)
-    (defalias 'smerge-keep-upper 'smerge-keep-mine)
-    (defalias 'smerge-keep-lower 'smerge-keep-other)))
-
 ;;; Options
 
 (defcustom magit-delete-by-moving-to-trash t
diff --git a/lisp/magit-base.el b/lisp/magit-base.el
index 419b02067b..3aabfff42d 100644
--- a/lisp/magit-base.el
+++ b/lisp/magit-base.el
@@ -33,7 +33,7 @@
 ;;; Code:
 
 (defconst magit--minimal-git "2.2.0")
-(defconst magit--minimal-emacs "25.1")
+(defconst magit--minimal-emacs "26.1")
 
 (require 'cl-lib)
 (require 'compat)
@@ -636,15 +636,11 @@ acts similarly to `completing-read', except for the 
following:
   (unless (or (bound-and-true-p helm-mode)
               (bound-and-true-p ivy-mode))
     (setq choices (magit--completion-table choices)))
-  (cl-letf (((symbol-function #'completion-pcm--all-completions)))
-    (when (< emacs-major-version 26)
-      (fset 'completion-pcm--all-completions
-            'magit-completion-pcm--all-completions))
-    (let ((ivy-sort-functions-alist nil)
-          (vertico-sort-function nil))
-      (completing-read prompt choices
-                       predicate require-match
-                       initial-input hist def))))
+  (let ((ivy-sort-functions-alist nil)
+        (vertico-sort-function nil))
+    (completing-read prompt choices
+                     predicate require-match
+                     initial-input hist def)))
 
 (define-obsolete-function-alias 'magit-completing-read-multiple*
   'magit-completing-read-multiple "Magit-Section 4.0.0")
@@ -674,12 +670,6 @@ third-party completion frameworks."
                      (equal omit-nulls t))
             (setq input string))
           (funcall split-string string separators omit-nulls trim)))
-       ;; In Emacs 25 this function has a bug, so we use a copy of the
-       ;; version from Emacs 26. bef9c7aa3
-       ((symbol-function #'completion-pcm--all-completions)
-        (if (< emacs-major-version 26)
-            'magit-completion-pcm--all-completions
-          (symbol-function #'completion-pcm--all-completions)))
        ;; Prevent `BUILT-IN' completion from messing up our existing
        ;; order of the completion candidates. aa5f098ab
        (table (magit--completion-table table))
@@ -1073,27 +1063,6 @@ This function should be named `version>=' and be part of 
Emacs."
   (advice-add 'auto-revert-handler :around 'auto-revert-handler@bug21559)
   )
 
-(when (< emacs-major-version 26)
-  ;; In Emacs 25 `completion-pcm--all-completions' reverses the
-  ;; completion list.  This is the version from Emacs 26, which
-  ;; fixes that issue.  bug#24676
-  (defun magit-completion-pcm--all-completions (prefix pattern table pred)
-    (if (completion-pcm--pattern-trivial-p pattern)
-        (all-completions (concat prefix (car pattern)) table pred)
-      (let* ((regex (completion-pcm--pattern->regex pattern))
-             (case-fold-search completion-ignore-case)
-             (completion-regexp-list (cons regex completion-regexp-list))
-             (compl (all-completions
-                     (concat prefix
-                             (if (stringp (car pattern)) (car pattern) ""))
-                     table pred)))
-        (if (not (functionp table))
-            compl
-          (let ((poss ()))
-            (dolist (c compl)
-              (when (string-match-p regex c) (push c poss)))
-            (nreverse poss)))))))
-
 (defun magit-which-function ()
   "Return current function name based on point.
 
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index fe97d57c49..ccc66aea89 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -465,25 +465,6 @@ image, accordingly.  Either the car or the cdr may be nil."
                  (choice (const  :tag "No committer image" nil)
                          (regexp :tag "Committer regexp" "^Commit:     ")))))
 
-(defcustom magit-revision-use-gravatar-kludge nil
-  "Whether to work around a bug which affects display of gravatars.
-
-Gravatar images are spliced into two halves which are then
-displayed on separate lines.  On macOS the splicing has a bug in
-some Emacs builds, which causes the top and bottom halves to be
-interchanged.  Enabling this option works around this issue by
-interchanging the halves once more, which cancels out the effect
-of the bug.
-
-See https://github.com/magit/magit/issues/2265
-and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=7847.
-
-Starting with Emacs 26.1 this kludge should not be required for
-any build."
-  :package-version '(magit . "2.3.0")
-  :group 'magit-revision
-  :type 'boolean)
-
 (defcustom magit-revision-fill-summary-line nil
   "Whether to fill excessively long summary lines.
 
@@ -2908,8 +2889,6 @@ Refer to user option 
`magit-revision-insert-related-refs-display-alist'."
             (let ((top (list image '(slice 0.0 0.0 1.0 0.5)))
                   (bot (list image '(slice 0.0 0.5 1.0 1.0)))
                   (align `((space :align-to ,align-to))))
-              (when magit-revision-use-gravatar-kludge
-                (cl-rotatef top bot))
               (let ((inhibit-read-only t))
                 (insert (propertize " " 'display top))
                 (insert (propertize " " 'display align))
diff --git a/lisp/magit-extras.el b/lisp/magit-extras.el
index 9ced25556e..5fc5316943 100644
--- a/lisp/magit-extras.el
+++ b/lisp/magit-extras.el
@@ -197,27 +197,17 @@ blame to center around the line point is on."
 (defun ido-enter-magit-status ()
   "Drop into `magit-status' from file switching.
 
-This command does not work in Emacs 26.1.
-See https://github.com/magit/magit/issues/3634
-and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707.
-
 To make this command available use something like:
 
-  (add-hook \\='ido-setup-hook
-            (lambda ()
-              (keymap-set ido-completion-map
-                          \"C-x g\" \\='ido-enter-magit-status)))
-
-Starting with Emacs 25.1 the Ido keymaps are defined just once
-instead of every time Ido is invoked, so now you can modify it
-like pretty much every other keymap:
-
   (keymap-set ido-common-completion-map
-              \"C-x g\" \\='ido-enter-magit-status)"
+              \"C-x g\" \\='ido-enter-magit-status)
+
+This command does not work in Emacs 26.1.
+See https://github.com/magit/magit/issues/3634
+and https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31707.";
   (interactive)
   (setq ido-exit 'fallback)
-  (setq ido-fallback #'magit-status)                ; for Emacs >= 26.2
-  (with-no-warnings (setq fallback #'magit-status)) ; for Emacs 25
+  (setq ido-fallback #'magit-status)
   (exit-minibuffer))
 
 ;;;###autoload
@@ -235,10 +225,10 @@ well.  If you want to use another key, then you must set 
this
 to nil before loading Magit to prevent \"m\" from being bound.")
 
 (with-eval-after-load 'project
-  ;; Only more recent versions of project.el have `project-prefix-map' and
-  ;; `project-switch-commands', though project.el is available in Emacs 25.
   (when (and magit-bind-magit-project-status
+             ;; Added in Emacs 28.1.
              (boundp 'project-prefix-map)
+             (boundp 'project-switch-commands)
              ;; Only modify if it hasn't already been modified.
              (equal project-switch-commands
                     (eval (car (get 'project-switch-commands 'standard-value))
diff --git a/lisp/magit-pkg.el b/lisp/magit-pkg.el
index 001c90e941..e64cd4cbd7 100644
--- a/lisp/magit-pkg.el
+++ b/lisp/magit-pkg.el
@@ -1,6 +1,6 @@
 (define-package "magit" "3.3.0.50-git"
   "A Git porcelain inside Emacs."
-  '((emacs         "25.1")
+  '((emacs         "26.1")
     (compat        "29.1.4.5")
     (dash          "20240405")
     (git-commit    "20240429")
diff --git a/lisp/magit-process.el b/lisp/magit-process.el
index 0e56dafa7e..9f74469d7e 100644
--- a/lisp/magit-process.el
+++ b/lisp/magit-process.el
@@ -448,10 +448,9 @@ conversion."
     (apply #'process-file process infile buffer display args)))
 
 (defun magit-process-environment ()
-  ;; The various w32 hacks are only applicable when running on the
-  ;; local machine.  As of Emacs 25.1, a local binding of
-  ;; process-environment different from the top-level value affects
-  ;; the environment used in
+  ;; The various w32 hacks are only applicable when running on the local
+  ;; machine.  A local binding of process-environment different from the
+  ;; top-level value affects the environment used in
   ;; tramp-sh-handle-{start-file-process,process-file}.
   (let ((local (not (file-remote-p default-directory))))
     (append magit-git-environment
diff --git a/lisp/magit-section-pkg.el b/lisp/magit-section-pkg.el
index 787b30f812..b7c4a1fa8c 100644
--- a/lisp/magit-section-pkg.el
+++ b/lisp/magit-section-pkg.el
@@ -1,6 +1,6 @@
 (define-package "magit-section" "3.3.0.50-git"
   "Sections for read-only buffers."
-  '((emacs  "25.1")
+  '((emacs  "26.1")
     (compat "29.1.4.5")
     (dash   "20240405"))
   :homepage "https://magit.vc";
diff --git a/lisp/magit-section.el b/lisp/magit-section.el
index 1c34575fe3..2b39533409 100644
--- a/lisp/magit-section.el
+++ b/lisp/magit-section.el
@@ -10,7 +10,7 @@
 
 ;; Package-Version: 3.3.0.50-git
 ;; Package-Requires: (
-;;     (emacs "25.1")
+;;     (emacs "26.1")
 ;;     (compat "29.1.4.5")
 ;;     (dash "2.19.1")
 ;;     (seq "2.24"))
diff --git a/lisp/magit.el b/lisp/magit.el
index 943416379d..f7775994bb 100644
--- a/lisp/magit.el
+++ b/lisp/magit.el
@@ -19,7 +19,7 @@
 
 ;; Package-Version: 3.3.0.50-git
 ;; Package-Requires: (
-;;     (emacs "25.1")
+;;     (emacs "26.1")
 ;;     (compat "29.1.4.5")
 ;;     (dash "2.19.1")
 ;;     (git-commit "3.3.0")

Reply via email to