From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/60867 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: font-lock doesn't work on MIME parts Date: Fri, 02 Sep 2005 20:04:50 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1125659467 30150 80.91.229.2 (2 Sep 2005 11:11:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 2 Sep 2005 11:11:07 +0000 (UTC) Original-X-From: ding-owner+m9399=ding+2daccount=gmane.org@lists.math.uh.edu Fri Sep 02 13:11:04 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EB9Qw-0000YG-EB for ding-account@gmane.org; Fri, 02 Sep 2005 13:10:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EB9Qv-0004F5-00 for ding-account@gmane.org; Fri, 02 Sep 2005 06:10:09 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EB9Lw-0004Eu-00 for ding@lists.math.uh.edu; Fri, 02 Sep 2005 06:05:00 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EB9Lv-00066c-Qt for ding@lists.math.uh.edu; Fri, 02 Sep 2005 06:05:00 -0500 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EB9Lu-0003TE-00 for ; Fri, 02 Sep 2005 13:04:58 +0200 Original-Received: from localhost ([127.0.0.1]) by washington.hostforweb.net with esmtpa (Exim 4.50) id 1EB9Lu-0006kA-LW for ding@gnus.org; Fri, 02 Sep 2005 06:04:59 -0500 Original-To: ding@gnus.org X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:vCJMXZViib6V7w7ivZjvuMGvD1s= X-Hashcash: 1:20:050902:ding@gnus.org::hpOTAvDgYOgrw/CX:00000np0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:60867 Archived-At: --=-=-= Hi, I'm using the latest Emacs CVS, `font-lock-support-mode' is set to `jit-lock-mode' (it is the default). Recently I noticed MIME parts displayed inline in the Gnus article buffer aren't font-lock'ed. For instance: (The following line should be fontified.) --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline (require 'font-lock) --=-=-= Content-Disposition: inline I was unable to find the cause so far, but font-lock seems to work only when the buffer is visible. So, I made a patch for a makeshift. (The following part should also be fontified.) --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- mm-view.el~ 2005-08-28 21:51:06 +0000 +++ mm-view.el 2005-09-02 11:03:24 +0000 @@ -497,7 +497,11 @@ (funcall mode)) (let ((font-lock-verbose nil)) ;; I find font-lock a bit too verbose. - (font-lock-fontify-buffer)) + ;; FIXME: font-lock seems to work only when the buffer is visible. + (save-window-excursion + (set-window-buffer (selected-window) (current-buffer)) + (sit-for 0) + (font-lock-fontify-buffer))) ;; By default, XEmacs font-lock uses non-duplicable text ;; properties. This code forces all the text properties ;; to be copied along with the text. --=-=-=--