summaryrefslogtreecommitdiff
path: root/pancake.el
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-10-31 03:23:38 +0300
committerdefanor <defanor@uberspace.net>2017-10-31 03:23:38 +0300
commit3c9a0247861ad8f7002cb38c48227901fd98de3e (patch)
tree412f880ea66b0c78180249baf94eabe33f0172df /pancake.el
parent77234d7cf55b82384a73759192c7011fa11b4e7a (diff)
Implement document reloading
Diffstat (limited to 'pancake.el')
-rw-r--r--pancake.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/pancake.el b/pancake.el
index c23b19e..392ccaa 100644
--- a/pancake.el
+++ b/pancake.el
@@ -269,6 +269,11 @@
(interactive)
(pancake-process-send "q"))
+(defun pancake-reload ()
+ "Reload the current document."
+ (interactive)
+ (pancake-process-send "r"))
+
(defun pancake-input (string)
"Pancake input handler: opens minibuffer for input.
Sets the initial contents to STRING, reads the rest, and passes
@@ -291,6 +296,7 @@ it to `pancake-process' as input."
(define-key map (kbd "B") 'pancake-go-backward)
(define-key map (kbd "F") 'pancake-go-forward)
(define-key map (kbd "Q") 'pancake-quit)
+ (define-key map (kbd "R") 'pancake-reload)
map)
"Keymap for `pancake-mode'.")