From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: font-lock doesn't work on MIME parts
Date: Fri, 02 Sep 2005 20:04:50 +0900 [thread overview]
Message-ID: <b4mslwn91d9.fsf@jpl.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 264 bytes --]
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.)
[-- Attachment #2: Type: application/emacs-lisp, Size: 21 bytes --]
[-- Attachment #3: Type: text/plain, Size: 187 bytes --]
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.)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Type: text/x-patch, Size: 605 bytes --]
--- 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.
next reply other threads:[~2005-09-02 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-02 11:04 Katsumi Yamaoka [this message]
2005-09-06 5:22 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mslwn91d9.fsf@jpl.org \
--to=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).