From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Georg.Wittig@zv.Fraunhofer.de (Georg Wittig) Newsgroups: gmane.emacs.help Subject: Re: display of TAB character Date: 24 Dec 2003 12:57:30 +0100 Organization: Fraunhofer Gesellschaft, St. Augustin, Germany Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3fe97f2a$1@news.fhg.de> References: <87vfof1901.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1072267326 5803 80.91.224.253 (24 Dec 2003 12:02:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 24 Dec 2003 12:02:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 24 13:02:03 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AZ7iE-0005tr-00 for ; Wed, 24 Dec 2003 13:02:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AZ8eK-0000iy-HV for geh-help-gnu-emacs@m.gmane.org; Wed, 24 Dec 2003 08:02:04 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: nn/6.6.5 Original-Lines: 40 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!usenet-feed.fhg.de!news.fhg.de!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:119616 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15557 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15557 Kai Grossjohann 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.