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

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

[elpa] externals/beardbolt a06c8d9fc6 210/323: Add command `rmsbolt`


From: ELPA Syncer
Subject: [elpa] externals/beardbolt a06c8d9fc6 210/323: Add command `rmsbolt`
Date: Thu, 9 Mar 2023 10:58:32 -0500 (EST)

branch: externals/beardbolt
commit a06c8d9fc6ab3e218281baebb50978ffcaba05ae
Author: Erik Arvstedt <erik.arvstedt@gmail.com>
Commit: Erik Arvstedt <erik.arvstedt@gmail.com>

    Add command `rmsbolt`
    
    Previously, starting a rmsbolt compilation with code highlighting and
    automatic recompilation required two steps:
    1. Enable `rmsbolt-mode`
    2. Run `rmsbolt-compile`
    
    Because this is rather inconvenient, add function `rmsbolt` to combine
    both steps.
    This is now the default and recommended way for users to run a
    rmsbolt compilation.
---
 README.org       | 12 ++++++++----
 doc/rmsbolt.texi | 13 +++++++++----
 rmsbolt.el       | 10 ++++++++++
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index 7ea5545424..c957e0ed2a 100644
--- a/README.org
+++ b/README.org
@@ -63,10 +63,14 @@ though.
 #+END_SRC
 
 * Running
-Once installed, use the ~rmsbolt-starter~ command to generate starter files, or
-enable ~rmsbolt-mode~ in a supported language. Then run ~rmsbolt-compile~ or
-use the default ~C-c C-c~ binding. After the first run, the buffer should
-automatically update.
+Run ~rmsbolt~ to compile the current buffer. This enables ~rmsbolt-mode~
+for code region highlighting and automatic recompilation on buffer changes.
+
+~rmsbolt-mode~ also adds the key binding ~C-c C-c~ to run a compilation.
+
+Run ~rmsbolt-starter~ to generate an example source file for one of the 
supported languages.
+
+Run ~rmsbolt-compile~ to start a compilation without enabling ~rmsbolt-mode~.
 
 Language-specific quirks are listed in the full documentation.
 
diff --git a/doc/rmsbolt.texi b/doc/rmsbolt.texi
index 5830f07c47..e550986d0a 100644
--- a/doc/rmsbolt.texi
+++ b/doc/rmsbolt.texi
@@ -110,10 +110,15 @@ This is a quelpa formula for RMSbolt
 @node Running
 @chapter Running
 
-Once installed, use the @code{rmsbolt-starter} command to generate starter 
files, or
-enable @code{rmsbolt-mode} in a supported language. Then run 
@code{rmsbolt-compile} or use
-the default @code{C-c C-c} binding to pop open a disassembly buffer. After the 
first
-run, the buffer should automatically update.
+Once installed, run @code{rmsbolt} to compile the current buffer.
+This enables @code{rmsbolt-mode} for code region highlighting and
+automatic recompilation on buffer changes.
+
+@code{rmsbolt-mode} also adds the key binding @code{C-c C-c} to run a 
compilation.
+
+Run @code{rmsbolt-starter} to generate an example source file for one of the 
supported languages.
+
+Run @code{rmsbolt-compile} to start a compilation without enabling 
@code{rmsbolt-mode}.
 
 @node Configuring
 @chapter Configuring
diff --git a/rmsbolt.el b/rmsbolt.el
index 868d263d1a..1f1c796bb6 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1779,6 +1779,16 @@ This mode is enabled both in modes to be compiled and 
output buffers."
    (t ;; Cleanup
     (rmsbolt--cleanup-overlays))))
 
+;;;###autoload
+(defun rmsbolt ()
+  "Start a rmsbolt compilation and enable `rmsbolt-mode' for code region
+highlighting and automatic recompilation."
+  (interactive)
+  (if rmsbolt-mode
+      (rmsbolt-compile)
+    (rmsbolt-mode)
+    (run-at-time 0 nil (lambda () (rmsbolt-compile)))))
+
 (provide 'rmsbolt)
 
 ;;; rmsbolt.el ends here



reply via email to

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