branch: externals/beardbolt
commit 3baf531b556aef8dd72b0145eced4d2748df34f0
Author: Erik Arvstedt <[email protected]>
Commit: Erik Arvstedt <[email protected]>
Refactor: Move let binding closer to point of usage
The variables defined in the let binding are only used by
`compilation-start`.
This makes the next commit more readable.
---
rmsbolt.el | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/rmsbolt.el b/rmsbolt.el
index e403a7db26..1b829da910 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -1534,15 +1534,15 @@ and return it."
(error "Objdumper not recognized"))))
;; Convert to demangle if we need to
(setq cmd (rmsbolt--demangle-command cmd lang src-buffer))
- (let ((shell-file-name (or (executable-find rmsbolt--shell)
- shell-file-name)))
- (with-current-buffer
+ (with-current-buffer ; With compilation buffer
+ (let ((shell-file-name (or (executable-find rmsbolt--shell)
+ shell-file-name)))
;; TODO should this be configurable?
(rmsbolt-with-display-buffer-no-window
- (compilation-start cmd nil (lambda (&rest _)
"*rmsbolt-compilation*")))
- (add-hook 'compilation-finish-functions
- #'rmsbolt--handle-finish-compile nil t)
- (setq rmsbolt-src-buffer src-buffer)))))))
+ (compilation-start cmd nil (lambda (&rest _)
"*rmsbolt-compilation*"))))
+ (add-hook 'compilation-finish-functions
+ #'rmsbolt--handle-finish-compile nil t)
+ (setq rmsbolt-src-buffer src-buffer))))))
;;;; Keymap
(defvar rmsbolt-mode-map