emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--out


From: ELPA Syncer
Subject: [elpa] externals/beardbolt 067096f3b9 299/323: Friendlier beardbolt--output-mode
Date: Thu, 9 Mar 2023 10:58:53 -0500 (EST)

branch: externals/beardbolt
commit 067096f3b9a8ff4edbc07f14841bbab98567aec1
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Friendlier beardbolt--output-mode
    
    Make it read-only, don't display line numbers, bind q to quit-window.
    
    * beardbolt.el (bb--output-mode): Tweak.
    (bb--handle-finish-compile): Bind inhibit-read-only
    to t.
---
 beardbolt.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/beardbolt.el b/beardbolt.el
index 16c82e0be9..1368b525c9 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -521,7 +521,8 @@ Argument STR compilation finish status."
        ((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))
+        (let* ((inhibit-modification-hooks t)
+               (inhibit-read-only t))
           (erase-buffer)
           (mapc #'delete-overlay (overlays-in (point-min) (point-max)))
           (insert-file-contents declared-output)
@@ -735,7 +736,8 @@ With prefix argument, choose from starter files in 
`bb-starter-files'."
   (add-hook 'kill-buffer-hook #'bb--on-kill-output-buffer nil t)
   (add-hook 'post-command-hook #'bb--output-buffer-pch nil t)
   (setq truncate-lines t)
-  (display-line-numbers-mode))
+  (read-only-mode t)
+  (local-set-key (kbd "q") 'quit-window))
 
 ;;;###autoload
 (defun beardbolt ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]