help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs 23 whitespace-mode, change newline display glyph


From: Xah Lee
Subject: Re: emacs 23 whitespace-mode, change newline display glyph
Date: Sat, 15 Aug 2009 01:45:18 -0700 (PDT)
User-agent: G2/1.0

On Aug 12, 5:44 am, CHENG Gao <cheng...@gmail.com> wrote:
> > in my emacs 23 both on Windows and Mac, the white space shows as $,
> > not ¶, when in whitespace-mode or whitespace-newline-mode.
>
> > How to make it show line breaks using ¶ ?
>
> > i tried to read the doc... which took me too See also `whitespace-
> > style', `whitespace-newline' and `whitespace-display-mappings', and
> > customize... but its rather confusing.

> Through reading whitespace-mode source, I found this works:
>  (setq whitespace-display-mappings '(
>   (newline-mark 10
>                           [182 10])))

it turns out, you have to set the whole list, not just one. The above
will basically make it not display any glyphs to tabs and spaces.

I spent several hours looking into this, here's the solution:

(setq whitespace-display-mappings
 '(
   (space-mark 32 [183] [46]) ; normal space
   (space-mark 160 [164] [95])
   (space-mark 2208 [2212] [95])
   (space-mark 2336 [2340] [95])
   (space-mark 3616 [3620] [95])
   (space-mark 3872 [3876] [95])
   (newline-mark 10 [182 10]) ; newlne
   (tab-mark 9 [9655 9] [92 9]) ; tab
))

more detail here:

• How to use and setup Emacs's whitespace-mode
  http://xahlee.org/emacs/whitespace-mode.html

  Xah
∑ http://xahlee.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]