From: jpw@pobox.com (John Paul Wallington)
To: "Ye Wenbin" <wenbinye@gmail.com>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: How to font lock buffer name starts with space
Date: Fri, 28 Sep 2007 20:33:44 +0100 [thread overview]
Message-ID: <878x6qfuuf.fsf@laptop.shootybangbang.com> (raw)
In-Reply-To: <mailman.1432.1190993253.18990.help-gnu-emacs@gnu.org> (Ye Wenbin's message of "Fri\, 28 Sep 2007 23\:27\:08 +0800")
"Ye Wenbin" <wenbinye@gmail.com> writes:
> But it turns that the font lock is inhibit for the buffer name starts
> with space.
> How to active font-lock for that buffer?
That's tricky because skipping hidden buffers is hard-coded in the
`font-lock-mode' function. Interactively, I guess you could rename
the buffer at an opportune moment using M-x rename-buffer or a piece
of advice like so (largely untested):
(defadvice font-lock-mode (around fontify-hidden-buffers compile activate)
"Allow hidden buffers."
(let ((original-buffer-name (buffer-name))
new-buffer-name)
(unwind-protect
(progn
(setq new-buffer-name
(generate-new-buffer-name original-buffer-name))
(rename-buffer new-buffer-name)
ad-do-it)
(rename-buffer original-buffer-name))))
next parent reply other threads:[~2007-09-28 19:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1432.1190993253.18990.help-gnu-emacs@gnu.org>
2007-09-28 19:33 ` John Paul Wallington [this message]
[not found] ` <mailman.1449.1191008048.18990.help-gnu-emacs@gnu.org>
2007-09-28 21:16 ` How to font lock buffer name starts with space weber
2007-09-28 15:27 Ye Wenbin
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878x6qfuuf.fsf@laptop.shootybangbang.com \
--to=jpw@pobox.com \
--cc=help-gnu-emacs@gnu.org \
--cc=wenbinye@gmail.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).