[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: whitespace-mode and visual-line-mode
From: |
Eli Zaretskii |
Subject: |
Re: whitespace-mode and visual-line-mode |
Date: |
Wed, 25 Apr 2012 17:31:59 +0300 |
> Date: Wed, 25 Apr 2012 10:17:07 -0400
> From: Matt McClure <matthewlmcclure@gmail.com>
> Cc: help-gnu-emacs@gnu.org
>
> > Customize whitespace-display-mappings so that the whitespace
> > characters are displayed as themselves, instead of as fancy non-ASCII
> > glyphs. (You will still have the faces to show the whitespace.)
> >
>
> Hm. I tried, but Emacs still didn't wrap at word boundaries.
Try this:
(setq whitespace-display-mappings
'(
(space-mark ?\ [?\ ] [?.])
(space-mark ?\xA0 [?\u00A4] [?_])
(space-mark ?\x8A0 [?\x8A4] [?_])
(space-mark ?\x920 [?\x924] [?_])
(space-mark ?\xE20 [?\xE24] [?_])
(space-mark ?\xF20 [?\xF24] [?_])
(newline-mark ?\n [?$ ?\n])
(tab-mark ?\t [?\t] [?\\ ?\t])))
The main point is to have the space and TAB be displayed as
themselves. You tried to display a '.' instead of a space, which
won't fly with word wrap: it needs to see the space character to break
the line.