bug-gnu-emacs
[Top][All Lists]
Advanced

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

compile.el compile-goto-error bug


From: Gustav Hållberg
Subject: compile.el compile-goto-error bug
Date: Thu, 12 Dec 2002 06:00:19 +0100

This bug exists in emacs 21.1.4 (and just about every older version I've seen).

When using compile-goto-error from compile.el, the compilation buffer is
erroneously marked as modified, since there is a call to add-text-properties.
This is very annoying if compilation-minor-mode is used on a regular file
(rather than *compilation* buffer).

Suggested patch:

--- /usr/local/emacs/emacs-21.1/share/emacs/21.1/lisp/progmodes/compile.el      
Wed Sep 19 22:59:24 2001
+++ compile.el  Thu Dec 12 05:58:59 2002
@@ -1315,6 +1315,7 @@
            (let ((inhibit-read-only t)
                  (buffer-undo-list t)
                  deactivate-mark
+                 (buffer-was-modified (buffer-modified-p))
                  (error-list compilation-error-list))
              (while error-list
                (save-excursion
@@ -1322,7 +1323,8 @@
                                       (progn (end-of-line) (point))
                                       '(mouse-face highlight help-echo "\
 mouse-2: visit this file and line")))
-               (setq error-list (cdr error-list))))
+               (setq error-list (cdr error-list)))
+             (set-buffer-modified-p buffer-was-modified))
            )))))
 
 (defun compile-mouse-goto-error (event)

- Gustav



reply via email to

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