From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs revision #107149 Date: Sun, 12 Feb 2012 22:15:18 -0500 Message-ID: References: <20120210232039.GC4340@acm.acm> <87pqdlbby2.fsf@gnus.org> <20120211195927.GA3969@acm.acm> <87zkcnhjfw.fsf@gnus.org> <20120212222238.GA2810@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1329102929 21691 80.91.229.3 (13 Feb 2012 03:15:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 13 Feb 2012 03:15:29 +0000 (UTC) Cc: bug-cc-mode@gnu.org, Lars Ingebrigtsen , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 13 04:15:27 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwmNz-0002Fb-4T for ged-emacs-devel@m.gmane.org; Mon, 13 Feb 2012 04:15:27 +0100 Original-Received: from localhost ([::1]:54283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwmNy-0006dy-9Z for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2012 22:15:26 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:57503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwmNu-0006dq-Ut for emacs-devel@gnu.org; Sun, 12 Feb 2012 22:15:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwmNt-0000Fq-9y for emacs-devel@gnu.org; Sun, 12 Feb 2012 22:15:22 -0500 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:47816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwmNt-0000Fh-0F; Sun, 12 Feb 2012 22:15:21 -0500 Original-Received: from pastel.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q1D3FJw7028561; Sun, 12 Feb 2012 22:15:19 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id F3F0859537; Sun, 12 Feb 2012 22:15:18 -0500 (EST) In-Reply-To: <20120212222238.GA2810@acm.acm> (Alan Mackenzie's message of "Sun, 12 Feb 2012 22:22:38 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4130=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4130> : streams <728078> : uri <1064341> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148532 Archived-At: > Try this instead: It solves the actual problem stated in the comment, > rather than papering over it: > *** mm-view.el~ 2012-02-08 14:25:18.000000000 +0000 > --- mm-view.el 2012-02-12 21:50:34.000000000 +0000 > *************** > *** 601,610 **** > (require 'font-lock) > ;; I find font-lock a bit too verbose. > (let ((font-lock-verbose nil) > ! (font-lock-support-mode nil)) > ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. > ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes. > ! (set (make-local-variable 'font-lock-mode-hook) nil) > (setq buffer-file-name (mm-handle-filename handle)) > (set (make-local-variable 'enable-local-variables) nil) > (with-demoted-errors > --- 601,612 ---- > (require 'font-lock) > ;; I find font-lock a bit too verbose. > (let ((font-lock-verbose nil) > ! (font-lock-support-mode nil) > ! (font-lock-mode-hook font-lock-mode-hook)) > ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. > ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes. > ! (remove-hook 'font-lock-mode-hook 'turn-on-fast-lock) > ! (remove-hook 'font-lock-mode-hook 'turn-on-lazy-lock) > (setq buffer-file-name (mm-handle-filename handle)) > (set (make-local-variable 'enable-local-variables) nil) > (with-demoted-errors Actually, a real fix to this problem involves adding new a font-lock function, which I like to call font-lock-ensure-fontification, which mm-view would then call to force immediate fontification of the specified region. This function would know how to handle jit-lock, lazy-lock, and whichever other accelerator we come up with. Such a functionality is also needed in other packages, such as in htmlfontify. We have a bug report for this, but I can't find it any more. Stefan