[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt ebc56d81b0 127/323: Disable automatic recompi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt ebc56d81b0 127/323: Disable automatic recompile for buffers larger than 500 lines |
Date: |
Thu, 9 Mar 2023 10:58:24 -0500 (EST) |
branch: externals/beardbolt
commit ebc56d81b0a3d78e8edba46e581e67b128a9b96f
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>
Disable automatic recompile for buffers larger than 500 lines
Sticking to the conservative size because loop unrolling can really
blow up the assembly size, and that's the bottleneck.
Issue #9
---
rmsbolt.el | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index d2b814fe08..1822bcc96e 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -88,9 +88,15 @@
"Lighter displayed in mode line when function `rmsbolt-mode' is active."
:type 'string
:group 'rmsbolt)
+(defcustom rmsbolt-large-buffer-size 500
+ "Number of lines past which a buffer is considred large."
+ :type 'integer
+ :group 'rmsbolt)
(defcustom rmsbolt-automatic-recompile t
"Whether to automatically recompile on source buffer changes.
-Emacs-lisp does not support automatic-recompilation currently."
+Emacs-lisp does not support automatic-recompilation currently.
+This setting is automatically disabled on large buffers, use
+'force to force-enable it."
:type 'boolean
:group 'rmsbolt)
@@ -621,6 +627,7 @@ This should be an object of type `rmsbolt-lang', normally
set by the major mode"
Lifted from
https://emacs.stackexchange.com/questions/35936/disassembly-of-a-bytecode-file"
(if (not (require 'cl-print nil 'noerror))
(error "Package cl-print or Emacs 26+ are required for the Emacs
disassembler")
+ (require 'cl-print)
(byte-compile-file filename)
;; .el -> .elc
(setq filename (concat filename "c"))
@@ -1251,6 +1258,10 @@ Argument OVERRIDE-BUFFER use this buffer instead of
reading from the output file
(is-not-elisp (not (eq 'emacs-lisp-mode
(with-current-buffer src-buffer
major-mode))))
+ (is-not-large (or (< (with-current-buffer src-buffer
+ (line-number-at-pos (point-max)))
+ rmsbolt-large-buffer-size)
+ (eq rmsbolt-automatic-recompile 'force)))
(modified (buffer-modified-p src-buffer)))
(with-current-buffer src-buffer
;; Write to disk
- [elpa] externals/beardbolt 74fc122c39 101/323: Fix typo in supports-{disass, asm}, (continued)
- [elpa] externals/beardbolt 74fc122c39 101/323: Fix typo in supports-{disass, asm}, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 36bfe74010 102/323: Force using bash whenever available, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 15aa590bcf 106/323: Add ability to specify moved initial src file, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b60a9e3a84 117/323: Fix errors with emacs <25 with elisp disass, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a5855171f8 120/323: Fix byte-compilation warnings, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0d5774397b 124/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt be3f92821e 140/323: Clean up PHP exporter slightly, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a4e0b8a805 134/323: Optimize disassembly function, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 3527f2fa3a 123/323: Fix source code highlighting when multiple files are provided, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d564f9def8 131/323: Update README.org, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ebc56d81b0 127/323: Disable automatic recompile for buffers larger than 500 lines,
ELPA Syncer <=
- [elpa] externals/beardbolt 5f998f34d7 137/323: Update README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 4679974da1 141/323: Add documentation and starter file for PHP support, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 345dd21d24 145/323: Fix typo in docstring, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 33c687fae5 151/323: Implement helpers for compile_commands parsing, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 708260ac56 163/323: Add sharplab to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 79de946e68 161/323: Add IRC channel to README, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt cc4347908c 179/323: Inline demo screencast, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt b6e105190c 168/323: Actually use hidden-func-zig, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 10b70ca151 181/323: Add custom logic for finding swiftc, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 565d4a44ee 180/323: Convert if chain into cond, ELPA Syncer, 2023/03/09