]> code.delx.au - gnu-emacs/commitdiff
(compilation-start): Bind buffer-read-only to nil before
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Jan 2005 15:52:07 +0000 (15:52 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Jan 2005 15:52:07 +0000 (15:52 +0000)
invoking call-process.  Reset buffer's modified flag after
fontifying it in the no-async branch.

lisp/ChangeLog
lisp/progmodes/compile.el

index 4699f639d575d2e6678ef2797ee1367160b93d66..0ac939a0d6ab0fbc1f82248bc61bbd642eba7f8d 100644 (file)
@@ -1,5 +1,9 @@
 2005-01-29  Eli Zaretskii  <eliz@gnu.org>
 
+       * progmodes/compile.el (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.
+
        * wid-edit.el (widget-specify-button): If mouse pointer shape
        cannot be changed, use mouse face instead.
 
index 601eb03946e80e56496b8229b590d0cf9c2105a9..7b401da794e21d85c6831ba51c8e24dc081cfcc2 100644 (file)
@@ -985,8 +985,9 @@ Returns the compilation buffer created."
          (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 @@ exited abnormally with code %d\n"
          ;; 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))