From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: [dbueno@gmail.com: Patch enabling after-revert-hook for auto-revert-tail-mode] Date: Thu, 08 Mar 2007 16:48:41 -0500 Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1173390739 7447 80.91.229.12 (8 Mar 2007 21:52:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2007 21:52:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Anders Lindgren Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 08 22:52:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HPQWx-0005sZ-PG for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2007 22:52:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPQXC-0006dq-Kr for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2007 16:52:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HPQVY-0005ry-6u for emacs-devel@gnu.org; Thu, 08 Mar 2007 16:50:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HPQVX-0005rf-BC for emacs-devel@gnu.org; Thu, 08 Mar 2007 16:50:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HPQVX-0005rZ-3u for emacs-devel@gnu.org; Thu, 08 Mar 2007 16:50:43 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HPQVH-0002LT-Ct for emacs-devel@gnu.org; Thu, 08 Mar 2007 16:50:27 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HPQTZ-0003Mx-3s; Thu, 08 Mar 2007 16:48:41 -0500 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:67587 Archived-At: Do you agree with this change? ------- Start of forwarded message ------- X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=failed version=3.1.0 DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Am/Ew8qlpZcpoiqvg/PNX9nhMDeFjKKAHmxRMYSOiNuMkvsESIts3BRqVzs4RdCphYqh5HWgbw8iv66699kkLnBPVXbuEUttwVHQaWnaG9SzFx4eSGvIY6RNz1MHD6TDg97JgJYKiUSgBCBzUEMamemaUafJErkfvJNH/wLRk2A= Date: Wed, 7 Mar 2007 20:42:52 -0500 From: "Denis Bueno" To: emacs-devel@gnu.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Disposition: inline Subject: Patch enabling after-revert-hook for auto-revert-tail-mode 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))) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel ------- End of forwarded message -------