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

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

[nongnu] elpa/git-commit 473fc7a: Various fixes for older Emacsen


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit 473fc7a: Various fixes for older Emacsen
Date: Mon, 8 Nov 2021 15:57:39 -0500 (EST)

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

    Various fixes for older Emacsen
---
 lisp/magit-apply.el  |  5 +++++
 lisp/magit-commit.el |  2 +-
 lisp/magit-diff.el   | 10 ++++++----
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/lisp/magit-apply.el b/lisp/magit-apply.el
index 4e7ee00..fbd7e70 100644
--- a/lisp/magit-apply.el
+++ b/lisp/magit-apply.el
@@ -55,6 +55,11 @@
 (declare-function borg-assimilate "borg" (package url &optional partially))
 (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-commit.el b/lisp/magit-commit.el
index 133ef4b..06b971c 100644
--- a/lisp/magit-commit.el
+++ b/lisp/magit-commit.el
@@ -181,7 +181,7 @@ Also see https://github.com/magit/magit/issues/4132.";
 (defun magit-read-gpg-secret-key
     (prompt &optional initial-input history predicate)
   (require 'epa)
-  (let* ((keys (mapcan
+  (let* ((keys (cl-mapcan
                 (lambda (cert)
                   (and (or (not predicate)
                            (funcall predicate cert))
diff --git a/lisp/magit-diff.el b/lisp/magit-diff.el
index da89ec3..b4a951c 100644
--- a/lisp/magit-diff.el
+++ b/lisp/magit-diff.el
@@ -35,6 +35,7 @@
 
 (eval-when-compile (require 'ansi-color))
 (require 'diff-mode)
+(require 'image)
 (require 'smerge-mode)
 
 ;; For `magit-diff-popup'
@@ -2737,10 +2738,11 @@ or a ref which is not a branch, then it inserts 
nothing."
                                (car-safe
                                 (get-text-property (point) 'display)))
                               'image)))
-            (setf (image-property image :ascent) 'center)
-            (setf (image-property image :relief) 1)
-            (setf (image-property image :scale)  1)
-            (setf (image-property image :height) size)
+            ;; `image-property' wasn't added until 26.1.
+            (setcdr image (plist-put (cdr image) :ascent 'center))
+            (setcdr image (plist-put (cdr image) :relief 1))
+            (setcdr image (plist-put (cdr image) :scale  1))
+            (setcdr image (plist-put (cdr image) :height size))
             (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))))



reply via email to

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