changeset 59773:1ffd5f5591a2

(compilation-start): Bind buffer-read-only to nil before invoking call-process. Reset buffer's modified flag after fontifying it in the no-async branch.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 29 Jan 2005 15:50:26 +0000
parents 3ee04791024f
children a8e1cfe86c9b
files lisp/progmodes/compile.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Sat Jan 29 14:05:34 2005 +0000
+++ b/lisp/progmodes/compile.el	Sat Jan 29 15:50:26 2005 +0000
@@ -985,8 +985,9 @@
 	  (setq mode-line-process ":run")
 	  (force-mode-line-update)
 	  (sit-for 0)			; Force redisplay
-	  (let ((status (call-process shell-file-name nil outbuf nil "-c"
-				      command)))
+	  (let* ((buffer-read-only nil)	; call-process needs to modify outbuf
+		 (status (call-process shell-file-name nil outbuf nil "-c"
+				       command)))
 	    (cond ((numberp status)
 		   (compilation-handle-exit 'exit status
 					    (if (zerop status)
@@ -1003,6 +1004,7 @@
 	  ;; fontified, so fontify it now.
 	  (let ((font-lock-verbose nil)) ; shut up font-lock messages
 	    (font-lock-fontify-buffer))
+	  (set-buffer-modified-p nil)
 	  (message "Executing `%s'...done" command)))
       ;; Now finally cd to where the shell started make/grep/...
       (setq default-directory thisdir))