Skip to content

Commit 21cf73e

Browse files
committed
Add support for close-all-views command
1 parent 10e346d commit 21cf73e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.org

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@
5858
| Key | Function |
5959
|-----------+----------------------------------------|
6060
| ~C-c C-a l~ | ~reveal-remote-clear~ |
61-
| ~C-c C-a q~ | ~reveal-remote-dispose~ |
61+
| ~C-c C-a q~ | ~reveal-remote-close-all-views~ |
62+
| ~C-c C-a x~ | ~reveal-remote-dispose~ |
6263
| ~C-c C-a e~ | ~reveal-remote-submit~ |
6364
| ~C-c C-a v~ | ~reveal-remote-open-view-last-sexp~ |
6465
| ~C-c C-a c~ | ~reveal-remote-open-view-defun-at-point~ |

reveal-remote-mode.el

+8-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
;; Currently requires CIDER and a pre-configured nrepl connection,
3535
;; but my goal is to make this work with inf-clojure as well.
3636
;;
37-
;; Tested against Reveal 1.3.196
37+
;; Tested against Reveal 1.3.209
3838

3939
;;; Code:
4040

@@ -128,6 +128,11 @@ which means that any unknown symbols will result in compile errors."
128128
(interactive)
129129
(reveal-remote--eval-command "clear-output"))
130130

131+
(defun reveal-remote-close-all-views ()
132+
"Close all open Reveal views."
133+
(interactive)
134+
(reveal-remote--eval-command "close-all-views"))
135+
131136
(defun reveal-remote-dispose ()
132137
"Disposes the Reveal window."
133138
(interactive)
@@ -163,7 +168,8 @@ meaning that you are able to trigger exceptions."
163168
(defvar reveal-remote-command-map
164169
(let ((map (make-sparse-keymap)))
165170
(define-key map (kbd "l") #'reveal-remote-clear)
166-
(define-key map (kbd "q") #'reveal-remote-dispose)
171+
(define-key map (kbd "q") #'reveal-remote-close-all-views)
172+
(define-key map (kbd "x") #'reveal-remote-dispose)
167173
(define-key map (kbd "e") #'reveal-remote-submit)
168174
(define-key map (kbd "v") #'reveal-remote-open-view-last-sexp)
169175
(define-key map (kbd "c") #'reveal-remote-open-view-defun-at-point)

0 commit comments

Comments
 (0)