From: Richard M. Stallman Date: Sat, 29 Apr 1995 16:37:06 +0000 (+0000) Subject: (compile-internal): Disable undo before erasing X-Git-Tag: emacs-19.34~4240 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5d5ab7ac5064ff21f648e9fc260e9fc90e9e92d8;p=emacs.git (compile-internal): Disable undo before erasing the buffer, then enable again afterward. (compilation-sentinel): Use force-mode-line-update. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 936e96c8755..ba3e0672b78 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -361,7 +361,9 @@ Returns the compilation buffer created." ;; will happen, and insert a `cd' command to indicate this. (set-buffer outbuf) (setq buffer-read-only nil) + (buffer-disable-undo (current-buffer)) (erase-buffer) + (buffer-enable-undo (current-buffer)) (setq default-directory thisdir) (insert "cd " thisdir "\n" command "\n") (set-buffer-modified-p nil)) @@ -374,7 +376,6 @@ Returns the compilation buffer created." (save-excursion (set-buffer outbuf) (compilation-mode) - (buffer-disable-undo (current-buffer)) ;; (setq buffer-read-only t) ;;; Non-ergonomic. (set (make-local-variable 'compilation-parse-errors-function) parser) (set (make-local-variable 'compilation-error-message) error-message) @@ -555,7 +556,7 @@ See `compilation-mode'." ;; will stay around until M-x list-processes. (delete-process proc) ;; Force mode line redisplay soon. - (set-buffer-modified-p (buffer-modified-p))) + (force-mode-line-update)) (if (and opoint (< opoint omax)) (goto-char opoint)) (if compilation-finish-function