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

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

[nongnu] elpa/git-commit e2e90f7b0c 4/9: magit-ediff-buffers: Cosmetics


From: ELPA Syncer
Subject: [nongnu] elpa/git-commit e2e90f7b0c 4/9: magit-ediff-buffers: Cosmetics and new comments
Date: Mon, 16 May 2022 16:58:17 -0400 (EDT)

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

    magit-ediff-buffers: Cosmetics and new comments
---
 lisp/magit-ediff.el | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/lisp/magit-ediff.el b/lisp/magit-ediff.el
index 10396355b2..f5f045250d 100644
--- a/lisp/magit-ediff.el
+++ b/lisp/magit-ediff.el
@@ -126,11 +126,14 @@ recommend you do not further complicate that by enabling 
this.")
 (defmacro magit-ediff-buffers (quit &rest spec)
   (declare (indent 1))
   (let ((fn (if (length= spec 3) 'ediff-buffers3 'ediff-buffers))
-        (char ?@)
+        (char ?A)
         get make kill)
     (pcase-dolist (`(,g ,m) spec)
-      (let ((b (intern (format "buf%c" (cl-incf char)))))
+      (let ((b (intern (format "buf%c" char))))
         (push `(,b ,g) get)
+        ;; This is an unfortunate complication that I have added for
+        ;; the benefit of one user.  Pretend we used this instead:
+        ;; (push `(or ,b ,m) make)
         (push `(if ,b
                    (if magit-ediff-use-indirect-buffers
                        (prog1
@@ -143,7 +146,8 @@ recommend you do not further complicate that by enabling 
this.")
         (push `(unless ,b
                  (ediff-kill-buffer-carefully
                   ,(intern (format "ediff-buffer-%c" char))))
-              kill)))
+              kill))
+      (cl-incf char))
     (setq get  (nreverse get))
     (setq make (nreverse make))
     (setq kill (nreverse kill))
@@ -153,13 +157,12 @@ recommend you do not further complicate that by enabling 
this.")
          (,fn
           ,@make
           (list (lambda ()
-                  (setq-local
-                   ediff-quit-hook
-                   (list ,@(and quit (list quit))
-                         (lambda ()
-                           ,@kill
-                           (let ((magit-ediff-previous-winconf conf))
-                             (run-hooks 'magit-ediff-quit-hook)))))))
+                  (setq-local ediff-quit-hook
+                              (list ,@(and quit (list quit))
+                                    (lambda ()
+                                      ,@kill
+                                      (let ((magit-ediff-previous-winconf 
conf))
+                                        (run-hooks 
'magit-ediff-quit-hook)))))))
           ',fn)))))
 
 ;;;###autoload



reply via email to

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