From: Georg.Wittig@zv.Fraunhofer.de (Georg Wittig)
Subject: Re: display of TAB character
Date: 24 Dec 2003 12:57:30 +0100 [thread overview]
Message-ID: <3fe97f2a$1@news.fhg.de> (raw)
In-Reply-To: 87vfof1901.fsf@emptyhost.emptydomain.de
Kai Grossjohann <kai@emptydomain.de> writes:
> georg1000@gmx.de writes:
>
> > I was unable to find out how to do this. The only way to change
> > the display of TAB is by changing `tab-width', which can only be set to
> > a constant value.
>
> That's also what I think.
>
> > I do not want to change the behaviour of the tab key (with
> > `tab-stop-list' for example), but the display of the TAB key.
>
> To change the display of the tab key, you have to paint your keyboard ;-)
Here's a small code sequence you can put into your ~/.emacs. It
assigns a color to the TAB-Key and to a trailing space character at
the end of the line. I think I found it in this news group some years
ago. Works for me quite well and fast.
(custom-set-faces
'(my-tab-face ((((class color)) (:background "lemon chiffon"))) t)
'(my-trailing-space-face ((((class color)) (:background "Gold"))) t))
(add-hook 'font-lock-mode-hook
(function
(lambda ()
(setq font-lock-keywords
(append font-lock-keywords
'(("\t+" (0 'my-tab-face t))
("[ \t]+$" (0 'my-trailing-space-face t))))))))
--
/"\ ASCII ribbon | Georg Wittig, FhG - Georg.Wittig@zv.Fraunhofer.de
\ / campain against|
X HTML e-mail and|
/ \ news | Der Bagger ist der natuerliche Feind des Internet.
next prev parent reply other threads:[~2003-12-24 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.669.1069892300.399.help-gnu-emacs@gnu.org>
2003-12-17 20:31 ` display of TAB character Kai Grossjohann
2003-12-24 11:57 ` Georg Wittig [this message]
2003-11-26 23:15 georg1000
2003-11-27 6:45 ` Eli Zaretskii
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='3fe97f2a$1@news.fhg.de' \
--to=georg.wittig@zv.fraunhofer.de \
/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).