emacs-devel
[Top][All Lists]
Advanced

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

address@hidden: Bug (CVS HEAD): `before-revert-hook' not run before auto


From: Richard Stallman
Subject: address@hidden: Bug (CVS HEAD): `before-revert-hook' not run before auto-revert-tail-mode reverts]
Date: Fri, 06 Jul 2007 00:38:51 -0400

Would someone please DTRT with this, then ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=1.3 required=5.0 tests=RCVD_NUMERIC_HELO,SPF_PASS,
        UNPARSEABLE_RELAY autolearn=no version=3.1.0
Date: Thu, 05 Jul 2007 14:33:58 -0600
From: "Denis Bueno" <address@hidden>
To: "address@hidden" <address@hidden>
Thread-Topic: Bug (CVS HEAD): `before-revert-hook' not run before
        auto-revert-tail-mode reverts
Thread-Index: Ace/Q9AxDsswiCs3EdyX+wAX8tQlcQ==
MIME-Version: 1.0
Content-Type: text/plain;
 charset=us-ascii
Subject: Bug (CVS HEAD): `before-revert-hook' not run before
 auto-revert-tail-mode reverts

I submitted a patch a while ago that runs `after-revert-hook' immediately
after auto-revert-tail-mode reverts the end of the current buffer.  I just
now realised that `before-revert-hook' never gets run *before* the revert.

I submit the current one-line-change patch [1], in the hopes of fixing this
problem.

My motivation for this change is reasonable synergy between
`auto-revert-tail-mode' and `highlight-changes-mode', in order to get Emacs
to highlight the last several changes of a log file.  Setting
`highlight-changes-rotate-faces' on `after-revert-hook' causes the
highlighted text in the buffer always to have the same face; setting
`highlight-changes-rotate-faces' on `before-revert-hook' (were it called)
corrects my problem.

Thank you.

- -Denis


[1]
Index: lisp/autorevert.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/autorevert.el,v
retrieving revision 1.58
diff -u -r1.58 autorevert.el
- --- lisp/autorevert.el  24 Mar 2007 13:39:21 -0000      1.58
+++ lisp/autorevert.el  5 Jul 2007 20:31:54 -0000
@@ -451,6 +451,7 @@
        (file buffer-file-name)
        buffer-file-name)               ; ignore that file has changed
     (when (> size auto-revert-tail-pos)
+      (run-mode-hooks 'before-revert-hook)
       (undo-boundary)
       (save-restriction
        (widen)




_______________________________________________
Emacs-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------




reply via email to

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