diff options
author | defanor <defanor@uberspace.net> | 2017-11-06 21:06:50 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-11-06 21:06:50 +0300 |
commit | 5301bb027cf56a0e1148808f11510e7fcc298b86 (patch) | |
tree | 1532eded12d3219b098528ba20a5d6b88dc520a7 /pancake.el | |
parent | e19d502ced73cf9fcbc5c8b7c2983983b48566d7 (diff) |
pancake.el: use `inhibit-read-only'
Diffstat (limited to 'pancake.el')
-rw-r--r-- | pancake.el | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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 ""))))) |