emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

compilation-mode makes the buffer read-only


From: Stefan
Subject: compilation-mode makes the buffer read-only
Date: Sun, 31 Oct 2004 18:05:40 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (darwin)

The recent change that makes compilation-mode buffers read-only breaks
C-u M-x checkdoc-current-buffer RET

Of course I can add some inhibit-read-only bindings in checkdoc.el but why
not avoid those incompatibilities altogether.  How about the patch below?


        Stefan


--- orig/lisp/progmodes/compile.el
+++ mod/lisp/progmodes/compile.el
@@ -939,7 +939,9 @@
              (unless (getenv "EMACS") '("EMACS=t"))
              (copy-sequence process-environment))))
        (if (not (eq mode t))
-           (funcall mode)
+           (progn
+             (funcall mode)
+             (setq buffer-read-only t))
          (setq buffer-read-only nil)
          (with-no-warnings (comint-mode))
          (compilation-shell-minor-mode))
@@ -1203,8 +1205,6 @@
   "Prepare the buffer for the compilation parsing commands to work.
 Optional argument MINOR indicates this is called from
 `compilation-minor-mode'."
-  (unless minor
-    (setq buffer-read-only t))
   (make-local-variable 'compilation-current-error)
   (make-local-variable 'compilation-messages-start)
   (make-local-variable 'compilation-error-screen-columns)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]