diff options
| author | Richard M. Stallman | 1993-01-02 21:21:14 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1993-01-02 21:21:14 +0000 |
| commit | fdcba502fabb3a06669fa43bf20a84c8fb7d185e (patch) | |
| tree | 6007fcf579da9e3714d439810166eea263babe95 | |
| parent | 76a66e5e9fcabb8735019500e273e6205d3f3f2c (diff) | |
| download | emacs-fdcba502fabb3a06669fa43bf20a84c8fb7d185e.tar.gz emacs-fdcba502fabb3a06669fa43bf20a84c8fb7d185e.zip | |
(compilation-sentinel): Change buffer-read-only with let.
| -rw-r--r-- | lisp/progmodes/compile.el | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 45e4905b878..3c47657c918 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -367,26 +367,25 @@ Runs `compilation-mode-hook' with `run-hooks' (which see)." | |||
| 367 | ;; Write something in the compilation buffer | 367 | ;; Write something in the compilation buffer |
| 368 | ;; and hack its mode line. | 368 | ;; and hack its mode line. |
| 369 | (set-buffer buffer) | 369 | (set-buffer buffer) |
| 370 | (setq buffer-read-only nil) | 370 | (let ((buffer-read-only nil)) |
| 371 | (setq omax (point-max) | 371 | (setq omax (point-max) |
| 372 | opoint (point)) | 372 | opoint (point)) |
| 373 | (goto-char omax) | 373 | (goto-char omax) |
| 374 | ;; Record where we put the message, so we can ignore it | 374 | ;; Record where we put the message, so we can ignore it |
| 375 | ;; later on. | 375 | ;; later on. |
| 376 | (insert ?\n mode-name " " msg) | 376 | (insert ?\n mode-name " " msg) |
| 377 | (forward-char -1) | 377 | (forward-char -1) |
| 378 | (insert " at " (substring (current-time-string) 0 19)) | 378 | (insert " at " (substring (current-time-string) 0 19)) |
| 379 | (forward-char 1) | 379 | (forward-char 1) |
| 380 | (setq mode-line-process | 380 | (setq mode-line-process |
| 381 | (concat ": " | 381 | (concat ": " |
| 382 | (symbol-name (process-status proc)))) | 382 | (symbol-name (process-status proc)))) |
| 383 | ;; Since the buffer and mode line will show that the | 383 | ;; Since the buffer and mode line will show that the |
| 384 | ;; process is dead, we can delete it now. Otherwise it | 384 | ;; process is dead, we can delete it now. Otherwise it |
| 385 | ;; will stay around until M-x list-processes. | 385 | ;; will stay around until M-x list-processes. |
| 386 | (delete-process proc) | 386 | (delete-process proc) |
| 387 | ;; Force mode line redisplay soon. | 387 | ;; Force mode line redisplay soon. |
| 388 | (set-buffer-modified-p (buffer-modified-p)) | 388 | (set-buffer-modified-p (buffer-modified-p))) |
| 389 | (setq buffer-read-only t) ;I think is this wrong --roland | ||
| 390 | (if (and opoint (< opoint omax)) | 389 | (if (and opoint (< opoint omax)) |
| 391 | (goto-char opoint)) | 390 | (goto-char opoint)) |
| 392 | (if compilation-finish-function | 391 | (if compilation-finish-function |