[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt b6127c7f67 007/323: Fix error when not filter
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt b6127c7f67 007/323: Fix error when not filtering for labels |
Date: |
Thu, 9 Mar 2023 10:57:49 -0500 (EST) |
branch: externals/beardbolt
commit b6127c7f677ac7392247d6f71d60db7d789b6b7c
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Fix error when not filtering for labels
---
rmsbolt.el | 88 ++++++++++++++++++++++++++------------------------------------
1 file changed, 37 insertions(+), 51 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index dbeaacd673..839888abcc 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -210,51 +210,41 @@
(defun rmsbolt--process-asm-lines (asm-lines)
"Process and filter a set of asm lines."
- (when rmsbolt-filter-unused-labels
- (let ((used-labels (rmsbolt--find-used-labels asm-lines))
- (result nil)
- (prev-label nil))
- (dolist (line asm-lines)
- (let* ((raw-match (or (string-match rmsbolt-label-def line)
- (string-match rmsbolt-assignment-def line)))
- (match (when raw-match
- (match-string 1 line)))
- (used-label (cl-find match used-labels :test #'equal)))
- (cl-tagbody
- ;; End block, reset prev-label and source
- (when (string-match-p rmsbolt-endblock line)
- (setq prev-label nil))
-
- ;; continue means we don't add to the ouptut
- (when match
- (if (not used-label)
- ;; Unused label
- (when rmsbolt-filter-unused-labels
- (go continue))
- ;; Real label, set prev-label
- (setq prev-label raw-match)))
- (when (and rmsbolt-filter-asm-directives
- (not match))
- (if (and (string-match-p rmsbolt-data-defn line)
- prev-label)
- ;; data is being used
- nil
- (when (string-match-p rmsbolt-directive line)
- (go continue))))
- (push line result)
- continue)))
-
- (mapconcat 'identity
- (nreverse result)
- "\n")
- ))
-
- ;; (when rmsbolt-filter-asm-directives
- ;; (setq asm-lines
- ;; (cl-remove-if
- ;; (apply-partially #'string-match-p +rmsbolt-assembler-pattern+)
- ;; asm-lines)))
- )
+ (let ((used-labels (rmsbolt--find-used-labels asm-lines))
+ (result nil)
+ (prev-label nil))
+ (dolist (line asm-lines)
+ (let* ((raw-match (or (string-match rmsbolt-label-def line)
+ (string-match rmsbolt-assignment-def line)))
+ (match (when raw-match
+ (match-string 1 line)))
+ (used-label (cl-find match used-labels :test #'equal)))
+ (cl-tagbody
+ ;; End block, reset prev-label and source
+ (when (string-match-p rmsbolt-endblock line)
+ (setq prev-label nil))
+
+ ;; continue means we don't add to the ouptut
+ (when match
+ (if (not used-label)
+ ;; Unused label
+ (when rmsbolt-filter-unused-labels
+ (go continue))
+ ;; Real label, set prev-label
+ (setq prev-label raw-match)))
+ (when (and rmsbolt-filter-asm-directives
+ (not match))
+ (if (and (string-match-p rmsbolt-data-defn line)
+ prev-label)
+ ;; data is being used
+ nil
+ (when (string-match-p rmsbolt-directive line)
+ (go continue))))
+ (push line result)
+ continue)))
+ (mapconcat 'identity
+ (nreverse result)
+ "\n")))
(defun rmsbolt--handle-finish-compile (buffer _str)
"Finish hook for compilations."
@@ -361,9 +351,7 @@ int main() {
(save-buffer))
(unless rmsbolt-mode
- (rmsbolt-mode 1))
- )
- )
+ (rmsbolt-mode 1))))
;;;; Mode Definition:
@@ -378,9 +366,7 @@ int main() {
(add-hook 'kill-emacs-hook
(lambda ()
(delete-directory rmsbolt-temp-dir t)
- (setq rmsbolt-temp-dir nil))))
-
- )
+ (setq rmsbolt-temp-dir nil)))))
(provide 'rmsbolt)
- [elpa] branch externals/beardbolt created (now 06fd5a1eee), ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 2626732524 003/323: Add filter for assembler directives, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 43f0eac016 004/323: Add support for changing compiler and flags, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 61ccd7a73e 001/323: Initial commit, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b6127c7f67 007/323: Fix error when not filtering for labels,
ELPA Syncer <=
- [elpa] externals/beardbolt 38649b53f2 018/323: Relicense to affero GPL, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt f04df12d28 011/323: Add config facility for object dumping, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 74b773d370 026/323: Fix crash on quit for real, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a9e5fbfd7a 028/323: Implement line number parsing for disassembled files, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3b6bb5bd75 030/323: Add basic overlays to view matched lines, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5ab75b7f56 014/323: Add stubs for dissasembly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0a55783f33 029/323: Add skeleton for font-lock, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 8dcd74b511 031/323: Clean up rmsbolt.c by moving starters into helper files, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt aea0966e9d 035/323: Don't add binary asm line data when viewing different files, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c066da01c4 052/323: Fix ocaml def, ELPA Syncer, 2023/03/09