[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 42b0ab4239 225/323: Make it clear that we're
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 42b0ab4239 225/323: Make it clear that we're operating on a list of asm regions |
Date: |
Thu, 9 Mar 2023 10:58:33 -0500 (EST) |
branch: externals/beardbolt
commit 42b0ab4239518a9752c81eaec78ca92852ff412d
Author: Erik Arvstedt <erik.arvstedt@gmail.com>
Commit: Erik Arvstedt <erik.arvstedt@gmail.com>
Make it clear that we're operating on a list of asm regions
- Rename hash-table -> line-mappings, asm-lines -> asm-regions
- Use cl-loop for `(start . end)` cons destructuring
---
rmsbolt.el | 38 ++++++++++++++++++--------------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index 30b9a8a6ed..ec2378b58d 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1650,8 +1650,8 @@ Are you running two compilations at the same time?"))
(if (eq (current-buffer) src-buffer)
current-line
(get-text-property (point) 'rmsbolt-src-line)))
- (hash-table (buffer-local-value 'rmsbolt-line-mapping src-buffer))
- (asm-lines (gethash src-current-line hash-table))
+ (line-mappings (buffer-local-value 'rmsbolt-line-mapping
src-buffer))
+ (asm-regions (gethash src-current-line line-mappings))
;; TODO also consider asm
(src-pts
(with-current-buffer src-buffer
@@ -1672,21 +1672,19 @@ Are you running two compilations at the same time?"))
(with-current-buffer output-buffer
(let ((saved-pt (point)))
(save-excursion
- (dolist (l asm-lines)
- (let* ((start (car l))
- (end (cdr l))
- (start-pt (progn (rmsbolt--goto-line start)
- (c-point 'bol)))
- (end-pt (progn (rmsbolt--goto-line end)
- (c-point 'bonl))))
- (when (and (not line-visible)
- (not scroll-src-buffer-p))
- (setq line-visible (or (rmsbolt--point-visible start-pt)
- (rmsbolt--point-visible end-pt)
- (and (> saved-pt start-pt)
- (< saved-pt end-pt)))))
- (push (rmsbolt--setup-overlay start-pt end-pt
output-buffer)
- rmsbolt-overlays)))))
+ (cl-loop for (start . end) in asm-regions
+ do (let ((start-pt (progn (rmsbolt--goto-line start)
+ (c-point 'bol)))
+ (end-pt (progn (rmsbolt--goto-line end)
+ (c-point 'bonl))))
+ (when (and (not line-visible)
+ (not scroll-src-buffer-p))
+ (setq line-visible (or (rmsbolt--point-visible
start-pt)
+ (rmsbolt--point-visible
end-pt)
+ (and (> saved-pt
start-pt)
+ (< saved-pt
end-pt)))))
+ (push (rmsbolt--setup-overlay start-pt end-pt
output-buffer)
+ rmsbolt-overlays)))))
(when (or (not line-visible) force)
;; Scroll buffer to first line
(when-let ((scroll-buffer (if scroll-src-buffer-p
@@ -1697,10 +1695,10 @@ Are you running two compilations at the same time?"))
src-current-line
(progn
(car-safe
- ;; If forcing, pick the min line
instead
+ ;; If forcing, pick the last region
instead
(if force
- (car-safe (last asm-lines))
- (cl-first asm-lines)))))))
+ (car-safe (last asm-regions))
+ (cl-first asm-regions)))))))
(with-selected-window window
(rmsbolt--goto-line line-scroll)
;; If we scrolled, recenter
- [elpa] externals/beardbolt 8cf49aeac6 167/323: Add zig starter, (continued)
- [elpa] externals/beardbolt 8cf49aeac6 167/323: Add zig starter, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2a83b76cd9 172/323: Prevent overriding windows when no output window available, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 820211abd4 169/323: Update supported languages list, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b47b9b4d74 175/323: Add support for Go, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a717d49879 198/323: Clear out default variables after post processing is finished, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a06c8d9fc6 210/323: Add command `rmsbolt`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 54bdd5090e 209/323: Add rustic-mode to default rust definitions, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7c735240b0 192/323: Clean up buffer overlays explicitly on output buffer kill, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1267509ab4 220/323: Move `rmsbolt-with-display-buffer-no-window`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 8544df3e9d 222/323: Use `rmsbolt--cleanup-overlays`, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 42b0ab4239 225/323: Make it clear that we're operating on a list of asm regions,
ELPA Syncer <=
- [elpa] externals/beardbolt 4f4a7f85ac 223/323: Simplify visibility check logic, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3a1e068bb8 228/323: Don't update overlays if the src buffer is no longer current, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b56d3b6cdb 245/323: Merge branch 'improve-starters' into 'master', ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 16f887917b 252/323: Improve rainbow color selection algorithm, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9bc7e8aeb8 236/323: Remove `rmsbolt--post-command-hook` when mode is deactivated, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 660739681c 254/323: Rename every rms* file to beard*, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt f846655a35 250/323: Rework rmsbolt-rainbowize to reuse more code, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 78eed53af1 260/323: Don't hang a "[Compiling]" forever in the mode-line, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b71d1bd763 265/323: * beardbolt.el (bb-compile): Fix handling of bb-asm-format., ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4cbe58f834 279/323: Add -g1 instead of -g to speed it up massively, ELPA Syncer, 2023/03/09