summaryrefslogtreecommitdiff
path: root/pancake.el
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-06 21:06:50 +0300
committerdefanor <defanor@uberspace.net>2017-11-06 21:06:50 +0300
commit5301bb027cf56a0e1148808f11510e7fcc298b86 (patch)
tree1532eded12d3219b098528ba20a5d6b88dc520a7 /pancake.el
parente19d502ced73cf9fcbc5c8b7c2983983b48566d7 (diff)
pancake.el: use `inhibit-read-only'
Diffstat (limited to 'pancake.el')
-rw-r--r--pancake.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/pancake.el b/pancake.el
index 939da2a..2e72969 100644
--- a/pancake.el
+++ b/pancake.el
@@ -210,16 +210,15 @@
(let ((output (read raw-line)))
(pcase output
(`(render . ,alist)
- (read-only-mode -1)
- (delete-region (point-min) (point-max))
;; todo: maybe store identifiers and links for
;; further manipulation
- (setq pancake-current-uri (alist-get 'uri alist))
- (dolist (line (alist-get 'lines alist))
- (pancake-print-line line)
- (newline))
- (read-only-mode 1)
- (goto-char (point-min)))
+ (let ((inhibit-read-only t))
+ (delete-region (point-min) (point-max))
+ (setq pancake-current-uri (alist-get 'uri alist))
+ (dolist (line (alist-get 'lines alist))
+ (pancake-print-line line)
+ (newline))
+ (goto-char (point-min))))
(`(goto ,line) (goto-line line))))))
(setq pancake-process-output "")))))