From f735ddcd7472cdb0c9093e803db57a8828f59933 Mon Sep 17 00:00:00 2001 From: Pierre Courtieu Date: Wed, 11 Feb 2015 16:46:53 +0000 Subject: Fixed read-only error for compile before require option. the emacs bug seems solved: the error with read-only always occur whatever locale is used. So I toggle read-only off in coq-compile-response. --- coq/coq-compile-common.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/coq/coq-compile-common.el b/coq/coq-compile-common.el index 45fe2564..5a8c3af0 100644 --- a/coq/coq-compile-common.el +++ b/coq/coq-compile-common.el @@ -130,7 +130,7 @@ Must be used together with `coq-par-enable'." (condition-case nil (with-temp-buffer (setq status - (call-process "getconf" nil (current-buffer) nil + (call-process "getconf" nil (current-buffer) t "_NPROCESSORS_ONLN")) (setq ncpus (string-to-number (buffer-string)))) (error @@ -576,7 +576,12 @@ the command whose output will appear in the buffer." (setq buffer-object (get-buffer-create coq-compile-response-buffer)) (with-current-buffer buffer-object - (compilation-mode))) + (compilation-mode) + ;; read-only-mode makes compilation fail if some messages need + ;; to be displayed by compilation. there was a bug in emacs 23 + ;; which make it work some time without this, but now it seems + ;; mandatory: + (read-only-mode 0))) ;; I don't really care if somebody gets the right mode when ;; he saves and reloads this buffer. However, error messages in ;; the first line are not found for some reason ... -- cgit v1.2.3