From: weber <hugows@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: How to font lock buffer name starts with space
Date: Fri, 28 Sep 2007 14:16:37 -0700 [thread overview]
Message-ID: <1191014197.092646.319770@y42g2000hsy.googlegroups.com> (raw)
In-Reply-To: <mailman.1449.1191008048.18990.help-gnu-emacs@gnu.org>
On Sep 28, 4:33 pm, j...@pobox.com (John Paul Wallington) wrote:
> "Ye Wenbin" <wenbi...@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))))
I know its not the answer for your question, but maybe it would be
interesting for you to start using Ido for switching buffers?
Then you can choose which ones to hide from the list like this:
(setq ido-ignore-buffers '("^ " "^\\*" "^\\#" "muse$")) ;; ignore
*Messages* etc
Here is a link: http://www.emacswiki.org/cgi-bin/emacs/InteractivelyDoThings
HTH,
weber
next prev parent reply other threads:[~2007-09-28 21:16 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 ` How to font lock buffer name starts with space John Paul Wallington
[not found] ` <mailman.1449.1191008048.18990.help-gnu-emacs@gnu.org>
2007-09-28 21:16 ` weber [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1191014197.092646.319770@y42g2000hsy.googlegroups.com \
--to=hugows@gmail.com \
--cc=help-gnu-emacs@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.