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

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

[nongnu] elpa/hyperdrive 772cea7acf 15/31: Chore: Shorten long lines in


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 772cea7acf 15/31: Chore: Shorten long lines in h/diff-file-entries
Date: Fri, 1 Dec 2023 01:00:39 -0500 (EST)

branch: elpa/hyperdrive
commit 772cea7acfef056f9a8f314b2d763b404fab27a2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Joseph Turner <joseph@ushin.org>

    Chore: Shorten long lines in h/diff-file-entries
---
 hyperdrive-diff.el | 62 ++++++++++++++++++++++++++++--------------------------
 1 file changed, 32 insertions(+), 30 deletions(-)

diff --git a/hyperdrive-diff.el b/hyperdrive-diff.el
index 5034f1bfc7..4c8490cc2f 100644
--- a/hyperdrive-diff.el
+++ b/hyperdrive-diff.el
@@ -67,36 +67,38 @@ This function is intended to diff files, not directories."
          new-response
          (queue (make-plz-queue
                  :limit h/queue-limit
-                 :finally (lambda ()
-                            (unless (or old-response new-response)
-                              (h/error "Files non-existent"))
-                            (let ((old-buffer (generate-new-buffer
-                                               (h//format-entry
-                                                old-entry 
h/buffer-name-format)))
-                                  (new-buffer (generate-new-buffer
-                                               (h//format-entry
-                                                new-entry 
h/buffer-name-format)))
-                                  ;; TODO: Improve diff buffer name.
-                                  (diff-buffer (get-buffer-create 
"*hyperdrive-diff*")))
-                              (when old-response
-                                (with-current-buffer old-buffer
-                                  (insert (plz-response-body old-response))))
-                              (when new-response
-                                (with-current-buffer new-buffer
-                                  (insert (plz-response-body new-response))))
-                              (unwind-protect
-                                  (condition-case err
-                                      (progn
-                                        (diff-no-select old-buffer new-buffer 
nil t diff-buffer)
-                                        (with-current-buffer diff-buffer
-                                          (setf h/diff-entries (cons old-entry 
new-entry))
-                                          (h/diff-mode)
-                                          (when then
-                                            (funcall then))))
-                                    (error (kill-buffer diff-buffer)
-                                           (signal (car err) (cdr err))))
-                                (kill-buffer old-buffer)
-                                (kill-buffer new-buffer)))))))
+                 :finally
+                 (lambda ()
+                   (unless (or old-response new-response)
+                     (h/error "Files non-existent"))
+                   (let ((old-buffer (generate-new-buffer
+                                      (h//format-entry
+                                       old-entry h/buffer-name-format)))
+                         (new-buffer (generate-new-buffer
+                                      (h//format-entry
+                                       new-entry h/buffer-name-format)))
+                         ;; TODO: Improve diff buffer name.
+                         (diff-buffer (get-buffer-create "*hyperdrive-diff*")))
+                     (when old-response
+                       (with-current-buffer old-buffer
+                         (insert (plz-response-body old-response))))
+                     (when new-response
+                       (with-current-buffer new-buffer
+                         (insert (plz-response-body new-response))))
+                     (unwind-protect
+                         (condition-case err
+                             (progn
+                               (diff-no-select old-buffer
+                                               new-buffer nil t diff-buffer)
+                               (with-current-buffer diff-buffer
+                                 (setf h/diff-entries (cons old-entry 
new-entry))
+                                 (h/diff-mode)
+                                 (when then
+                                   (funcall then))))
+                           (error (kill-buffer diff-buffer)
+                                  (signal (car err) (cdr err))))
+                       (kill-buffer old-buffer)
+                       (kill-buffer new-buffer)))))))
     (h/api 'get (he/url old-entry)
       :queue queue :as 'response :else #'ignore
       :then (lambda (response)



reply via email to

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