[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 842b2159da 305/323: More simplification
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 842b2159da 305/323: More simplification |
Date: |
Thu, 9 Mar 2023 10:58:57 -0500 (EST) |
branch: externals/beardbolt
commit 842b2159daa578946eac8823b25cba431e232e3a
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
More simplification
* beardbolt.el (bb--source-buffer-pch)
(bb--on-kill-source-buffer, bb--on-kill-asm-buffer)
(bb--asm-buffer-pch): Delete.
(bb-mode, bb--asm-mode): Simplify.
---
beardbolt.el | 29 ++++++-----------------------
1 file changed, 6 insertions(+), 23 deletions(-)
diff --git a/beardbolt.el b/beardbolt.el
index bd4a7e9834..fa56f4c9d5 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -643,28 +643,13 @@ With prefix argument, choose from starter files in
`bb-starter-files'."
(overlay-put ov 'face (overlay-get ov 'beardbolt-rainbow-face)))
(setq bb--currently-synched-overlays nil)))))
-(defun bb--source-buffer-pch ()
- (bb--synch-relation-overlays))
-
-(defun bb--on-kill-source-buffer ()
- (bb--when-live-buffer bb--asm-buffer
- (kill-buffer bb--asm-buffer)))
-
-(defun bb--on-kill-asm-buffer ()
- (bb--delete-rainbow-overlays))
-
-(defun bb--asm-buffer-pch ()
- (bb--synch-relation-overlays))
-
(defvar bb--change-timer nil)
(defun bb--after-change (&rest _)
(when bb-compile-delay
(when (timerp bb--change-timer) (cancel-timer bb--change-timer))
- (setq bb--change-timer (run-with-timer bb-compile-delay nil
#'bb--on-change-timer))))
-
-(defun bb--on-change-timer ()
- (bb-compile (bb--get-lang)))
+ (setq bb--change-timer
+ (run-with-timer bb-compile-delay nil #'bb-compile (bb--get-lang)))))
(defun bb--guess-from-ccj ()
(if-let* ((ccj-basename "compile_commands.json")
@@ -691,17 +676,15 @@ With prefix argument, choose from starter files in
`bb-starter-files'."
(bb-mode
(setq-local bb--language-descriptor (bb--get-lang))
(add-hook 'after-change-functions #'bb--after-change nil t)
- (add-hook 'kill-buffer-hook #'bb--on-kill-source-buffer nil t)
- (add-hook 'post-command-hook #'bb--source-buffer-pch nil t))
+ (add-hook 'post-command-hook #'bb--synch-relation-overlays nil t))
(t
(remove-hook 'after-change-functions #'bb--after-change t)
- (remove-hook 'kill-buffer-hook #'bb--on-kill-source-buffer t)
- (remove-hook 'post-command-hook #'bb--source-buffer-pch t))))
+ (remove-hook 'post-command-hook #'bb--synch-relation-overlays t))))
(define-derived-mode bb--asm-mode asm-mode "⚡asm ⚡"
"Toggle `bearbolt--output-mode', internal mode for asm buffers."
- (add-hook 'kill-buffer-hook #'bb--on-kill-asm-buffer nil t)
- (add-hook 'post-command-hook #'bb--asm-buffer-pch nil t)
+ (add-hook 'kill-buffer-hook #'bb--delete-rainbow-overlays nil t)
+ (add-hook 'post-command-hook #'bb--synch-relation-overlays nil t)
(setq truncate-lines t)
(read-only-mode t)
(buffer-disable-undo)
- [elpa] externals/beardbolt f846655a35 250/323: Rework rmsbolt-rainbowize to reuse more code, (continued)
- [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
- [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 <=
- [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, 2023/03/09
- [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