unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* display of TAB character
@ 2003-11-26 23:15 georg1000
  2003-11-27  6:45 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: georg1000 @ 2003-11-26 23:15 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 964 bytes --]

In http://www.jwz.org/doc/tabs-vs-spaces.html Jamie Zawinski
writes concerning the display of the TAB character:

    A third interpretation is for the ASCII TAB character to mean
    ``indent to the next tab stop,'' where the tab stops are set
    arbitrarily: they might not necessarily be equally distanced from
    each other. Most word processors can do this; 
    Emacs can do this. I don't think vi can do this, but I'm not sure.

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. 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.

Thanks in advance, Georg.

-- 
HoHoHo! Seid Ihr auch alle schön brav gewesen?

GMX Weihnachts-Special: Die 1. Adresse für Weihnachts-
männer und -frauen! http://www.gmx.net/de/cgi/specialmail

+++ GMX - die erste Adresse für Mail, Message, More! +++

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: display of TAB character
  2003-11-26 23:15 georg1000
@ 2003-11-27  6:45 ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2003-11-27  6:45 UTC (permalink / raw)


> Date: Thu, 27 Nov 2003 00:15:35 +0100 (MET)
> From: georg1000@gmx.de
> 
> In http://www.jwz.org/doc/tabs-vs-spaces.html Jamie Zawinski
> writes concerning the display of the TAB character:
> 
>     A third interpretation is for the ASCII TAB character to mean
>     ``indent to the next tab stop,'' where the tab stops are set
>     arbitrarily: they might not necessarily be equally distanced from
>     each other. Most word processors can do this; 
>     Emacs can do this. I don't think vi can do this, but I'm not sure.
> 
> I was unable to find out how to do this.

How did you look?  I typed "i tab stops" in the Emacs manual and was
immediately placed in the section which explains how to set the tab
stops.  I think that's what Jamie meant in the quoted fragment, but
I'm not sure if this does what you want.  Does it?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: display of TAB character
       [not found] <mailman.669.1069892300.399.help-gnu-emacs@gnu.org>
@ 2003-12-17 20:31 ` Kai Grossjohann
  2003-12-24 11:57   ` Georg Wittig
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Grossjohann @ 2003-12-17 20:31 UTC (permalink / raw)


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 ;-)

Kai

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: display of TAB character
  2003-12-17 20:31 ` display of TAB character Kai Grossjohann
@ 2003-12-24 11:57   ` Georg Wittig
  0 siblings, 0 replies; 4+ messages in thread
From: Georg Wittig @ 2003-12-24 11:57 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-24 11:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
2003-11-26 23:15 georg1000
2003-11-27  6:45 ` Eli Zaretskii

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).