* [denbuen@sandia.gov: Bug (CVS HEAD): `before-revert-hook' not run before auto-revert-tail-mode reverts]
@ 2007-07-06 4:38 Richard Stallman
2007-07-06 12:59 ` Fwd: Bug (CVS HEAD): `before-revert-hook' not run before auto-revert-tail-mode reverts Stefan Monnier
0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2007-07-06 4:38 UTC (permalink / raw)
To: emacs-devel
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" <denbuen@sandia.gov>
To: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
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
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
------- End of forwarded message -------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-06 12:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-06 4:38 [denbuen@sandia.gov: Bug (CVS HEAD): `before-revert-hook' not run before auto-revert-tail-mode reverts] Richard Stallman
2007-07-06 12:59 ` Fwd: Bug (CVS HEAD): `before-revert-hook' not run before auto-revert-tail-mode reverts Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.