error buffer is now read-only.

This commit is contained in:
Kazu Yamamoto 2015-08-14 11:40:57 +09:00
parent f762209e60
commit cfddddcfe8

View File

@ -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))))