From cfddddcfe8da8f4121d0ddd930a1447e84275127 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 14 Aug 2015 11:40:57 +0900 Subject: [PATCH] error buffer is now read-only. --- elisp/ghc-process.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elisp/ghc-process.el b/elisp/ghc-process.el index db22ef0..8214aa1 100644 --- a/elisp/ghc-process.el +++ b/elisp/ghc-process.el @@ -112,12 +112,16 @@ (goto-char (point-max)) (insert-buffer-substring tbuf 1 end)) (with-current-buffer (get-buffer-create ghc-error-buffer) - (let* ((cbuf (current-buffer)) + (setq buffer-read-only t) + (let* ((buffer-read-only nil) + (inhibit-read-only t) + (cbuf (current-buffer)) cwin) (unless (get-buffer-window cbuf) (display-buffer cbuf)) (setq cwin (get-buffer-window cbuf)) (goto-char (point-max)) (insert-buffer-substring tbuf 1 end) + (set-buffer-modified-p nil) (unless (pos-visible-in-window-p (point) cwin) (with-selected-window cwin (scroll-up 2))))