[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)
- [nongnu] elpa/hyperdrive fac9e009c5 04/31: Chore: Use defun-style line-wrapping in cl-{macrolet, labels}, (continued)
- [nongnu] elpa/hyperdrive fac9e009c5 04/31: Chore: Use defun-style line-wrapping in cl-{macrolet, labels}, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive f79591ae3b 03/31: Chore: Use \n instead of newline character in format strings, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive c19696aaf6 01/31: Chore: Favor format over concat when constructing URLs, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive cc4e9c2507 06/31: Chore: Begin cl-labels' BINDINGS on a new line, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 6bd2ae7036 07/31: Chore: Begin format-spec's FORMAT and SPECIFICATION on new lines, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 9c11d63570 25/31: Merge branch 'cleanup', ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 3c537e9b78 23/31: Chore: Minor whitespace cleanup, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 1e8c2f0973 24/31: Chore: Use semantically correct contitionals, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 6b9bc701e5 14/31: Chore: Shorten long lines in hd/dir-handler, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 8131f9afbf 16/31: Chore: Shorten long lines in h/history--format-range-entry, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 772cea7acf 15/31: Chore: Shorten long lines in h/diff-file-entries,
ELPA Syncer <=
- [nongnu] elpa/hyperdrive cc4f2caddc 31/31: Change: (h/org--link) Return plist, not alist, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 3b6d5eb3d3 28/31: Docs: Document hyperdrive-gateway-process-type, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive aaf7581df2 10/31: Chore: Spread nested conditions across multiple lines, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 42bd06b68c 29/31: Fix: (h/{start, stop}) Docstrings, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 43ddaf6cd4 30/31: Tidy: (h/gateway-process-type) Improve docstring, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 063e94607c 20/31: Chore: Begin multi-line values of defvar on a new line, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 7db9cc3785 21/31: Chore: Shorten assorted long lines, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 3edc7cc2ea 05/31: Chore: Begin pcase-let*'s BINDINGS on a new line, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive c4c9471144 09/31: Chore: Set one variable per setf and setq-local form, ELPA Syncer, 2023/12/01
- [nongnu] elpa/hyperdrive 285692b095 08/31: Chore: Consistently use setf even if setq would work, ELPA Syncer, 2023/12/01