unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Patch enabling after-revert-hook for auto-revert-tail-mode
@ 2007-03-08  1:42 Denis Bueno
  0 siblings, 0 replies; only message in thread
From: Denis Bueno @ 2007-03-08  1:42 UTC (permalink / raw)
  To: emacs-devel

Dear emacs-devel:

A while back I wanted two things to interact the way I expected:
hi-lock-mode and auto-revert-tail-mode. I wanted terms highlighted by
hi-lock-mode to continue to be highlighted after a revert by
auto-revert-tail-mode. But my hook (which refontifies the buffer)
wasn't getting executed after a revert.

The reason is, of course, obvious: after-revert-hook wasn't called. My
patch calls it  at the most obvious place I could think of.

It's a one-line change -- not much can go wrong, I think. I have been
using this change for many months now (and have recompiled emacs 6-8
times during that period). Please consider applying it. It is useful,
and seems like this is the way it should be  -- after-revert-hook
should happen after reverting the tail of the file.

-Denis

Index: lisp/autorevert.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/autorevert.el,v
retrieving revision 1.56
diff -u -r1.56 autorevert.el
--- lisp/autorevert.el  21 Jan 2007 03:53:12 -0000      1.56
+++ lisp/autorevert.el  8 Mar 2007 01:37:11 -0000
@@ -457,6 +457,7 @@
        (save-excursion
          (goto-char (point-max))
          (insert-file-contents file nil auto-revert-tail-pos size)))
+      (run-mode-hooks 'after-revert-hook)
       (undo-boundary)
       (setq auto-revert-tail-pos size)
       (set-buffer-modified-p modified)))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-03-08  1:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-08  1:42 Patch enabling after-revert-hook for auto-revert-tail-mode Denis Bueno

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).