[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt c374b17f5c 314/323: Don't require file to be
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt c374b17f5c 314/323: Don't require file to be saved, but do take advantage if it is |
Date: |
Thu, 9 Mar 2023 10:59:00 -0500 (EST) |
branch: externals/beardbolt
commit c374b17f5caa3dbed4f69d9edad04edfe0467099
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Don't require file to be saved, but do take advantage if it is
* beardbolt.el (bb--c/c++-setup): Check buffer-modified-p
---
beardbolt.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/beardbolt.el b/beardbolt.el
index 06423ad854..014e9100be 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -201,16 +201,21 @@ Useful if you have multiple objdumpers and want to select
between them")
(cl-defun bb--c/c++-setup (&key base-cmd language)
"Get compile specs for gcc/clang."
- (let* ((base-command (ensure-list (or bb-command
+ (let* ((modified-p (buffer-modified-p))
+ (source-hint (if modified-p "<stdin>" (file-name-nondirectory
+ (buffer-file-name))))
+ (base-command (ensure-list (or bb-command
(bb--guess-from-ccj)
base-cmd)))
(cc (car (split-string (car base-command)))))
(cl-labels ((f (x) (expand-file-name x (bb--sandbox-dir)))
(compile (in out) `(,@base-command
- "-x" ,language "-"
"-g1"
"-S" ,(format "-masm=%s" bb-asm-format)
- "-o" ,out "<" ,in))
+ "-o" ,out
+ ,@(if modified-p
+ `("-x" ,language "-" "<" ,in)
+ `(,(buffer-file-name)))))
(assemble (in out) `("&&" ,cc "-c" ,in "-o" ,out))
(link (in out) `("&&" ,cc ,in "-o" ,out))
(execute (in) `("&& (" ,in
@@ -229,7 +234,7 @@ Useful if you have multiple objdumpers and want to select
between them")
,(link (f "beardbolt.o") (f "beardbolt.out"))
,(execute (f "beardbolt.out")))))
(f "beardbolt.s")))
- ,(lambda (_dump-file) (bb--process-asm "<stdin>")))
+ ,(lambda (_dump-file) (bb--process-asm source-hint)))
(:compile-assemble-disassemble
,(lambda (dump-file)
(cons
@@ -241,7 +246,7 @@ Useful if you have multiple objdumpers and want to select
between them")
,(execute (f "beardbolt.out")))))
(f "beardbolt.o.disass")))
,(lambda (_dump-file)
- (bb--process-disassembled-lines "<stdin>")))))))
+ (bb--process-disassembled-lines source-hint)))))))
(cl-defun bb--rust-setup () "Get compile specs for rustc"
(let* ((base (ensure-list (or bb-command "rustc"))))
- [elpa] externals/beardbolt b71d1bd763 265/323: * beardbolt.el (bb-compile): Fix handling of bb-asm-format., (continued)
- [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
- [elpa] externals/beardbolt 2542f24813 285/323: Tweak, rework, speed up main algorithm again, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 85bc714336 295/323: Simplify source file tracking, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c5086ea624 294/323: bb--output-mode now a major mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 298a5fe6a2 296/323: Fix starter/beardbolt.cpp, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--output-mode, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0ae21a302a 302/323: Simplify window management in preparation of beardbolt-execute-program, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 842b2159da 305/323: More simplification, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 60d189b0a6 310/323: Advertise beardbolt-execute and a few other things, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c374b17f5c 314/323: Don't require file to be saved, but do take advantage if it is,
ELPA Syncer <=
- [elpa] externals/beardbolt 4a050afaaa 315/323: Attempt to fix more window management bugs, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0d61c2edac 311/323: Add support for rustc, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt be3cf0a712 318/323: Fix problems with beardbolt-compile when file is saved, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 349ace7310 164/323: Merge branch 'master' of gitlab.com:jgkamat/rmsbolt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5aeda6f846 155/323: Add basic documentation for compile_commands.json, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 246377bbff 173/323: Add dummy panic handler to reduce size of zig diassembly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 73dcaca98d 177/323: Remove unneeded variables, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 28ccabf318 190/323: Clean up overlays and simplify hook when asm buffer is closed, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3a8964d537 204/323: Update Readme, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 7c81d55d3e 202/323: Format go block, ELPA Syncer, 2023/03/09