[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 0ae21a302a 302/323: Simplify window managemen
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 0ae21a302a 302/323: Simplify window management in preparation of beardbolt-execute-program |
Date: |
Thu, 9 Mar 2023 10:58:55 -0500 (EST) |
branch: externals/beardbolt
commit 0ae21a302a33aed044d95290aecfaf94e0fef3f5
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Simplify window management in preparation of beardbolt-execute-program
* beardbolt.el (bb--handle-finish-compile): Simplify.
(bb--output-mode): Buffer-disable undo here.
---
beardbolt.el | 29 ++++++++++++-----------------
1 file changed, 12 insertions(+), 17 deletions(-)
diff --git a/beardbolt.el b/beardbolt.el
index 1368b525c9..8113be7eaa 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -513,17 +513,13 @@ Argument STR compilation finish status."
(split-width-threshold (min split-width-threshold 100)))
(with-current-buffer output-buffer
(bb--output-mode)
-
(setq bb--source-buffer src-buffer)
- (buffer-disable-undo)
- ;; Store src buffer value for later linking
- (cond
- ((string-match "^finished" str)
- (display-buffer (current-buffer) `(() (inhibit-same-window . t)))
- ;; Replace buffer contents but save point and scroll
- (let* ((inhibit-modification-hooks t)
- (inhibit-read-only t))
- (erase-buffer)
+ (let* ((inhibit-modification-hooks t)
+ (inhibit-read-only t))
+ (erase-buffer)
+ (cond
+ ((string-match "^finished" str)
+ (display-buffer (current-buffer)
`((display-buffer-use-least-recent-window)))
(mapc #'delete-overlay (overlays-in (point-min) (point-max)))
(insert-file-contents declared-output)
(setq bb--line-mappings nil)
@@ -533,13 +529,11 @@ Argument STR compilation finish status."
(shell-command-on-region (point-min) (point-max) "c++filt"
(current-buffer) 'no-mark))
(bb--rainbowize src-buffer))
- (when-let ((w (get-buffer-window compilation-buffer)))
- (quit-window nil w)))
- (t
- (when-let ((w (get-buffer-window)))
- (quit-window t w))
- (unless (string-match "^interrupt" str)
- (display-buffer compilation-buffer '(nil (inhibit-same-window .
t)))))))))
+ (t
+ (insert "<Compilation failed>")
+ (unless (or (string-match "^interrupt" str)
+ (get-buffer-window compilation-buffer))
+ (display-buffer compilation-buffer
`((display-buffer-use-least-recent-window))))))))))
;;;;; Parsing Options
(defvar-local bb--language-descriptor nil)
@@ -737,6 +731,7 @@ With prefix argument, choose from starter files in
`bb-starter-files'."
(add-hook 'post-command-hook #'bb--output-buffer-pch nil t)
(setq truncate-lines t)
(read-only-mode t)
+ (buffer-disable-undo)
(local-set-key (kbd "q") 'quit-window))
;;;###autoload
- [elpa] externals/beardbolt 660739681c 254/323: Rename every rms* file to beard*, (continued)
- [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
- [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 <=
- [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, 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