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

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

Re: Making a non-ASCII space character visible


From: Eli Zaretskii
Subject: Re: Making a non-ASCII space character visible
Date: Sun, 17 Jun 2018 22:31:21 +0300

> From: Will Parsons <varro@nodomain.invalid>
> Date: Sun, 17 Jun 2018 15:09:00 -0400
> 
> > global-whitespace-mode (the function) sets global-whitespace-mode (the
> > variable), not whitespace-mode.
> 
> So, using the function global-whitespace-mode is *not* the way to
> enable whitespace mode?

It enables global-whitespace-mode.

> I find that confusing; where would use one vs the other?

One is global, the other is local to the buffer in which you turn it
on.

> >> Adding (whitespace-mode 1) to my .emacs file apparently has no effect;
> >> the value of whitespace-mode is still nil.
> >
> > In what buffer?
> 
> In any buffer.

We are mis-communicating.  My point was that the above only turns the
mode on in the buffer that happened to be current when the expression
was evaluated.  And that is not what you want, so whitespace-mode
should normally be turned on from some major-mode hook.

> As I stated elsewhere, by manually editing my customization file.
> (And I can see the change via the regular Customization interface
> under Whitespace Display Mappings - the added character is displayed
> like a space, but I can run describe-char on it and see the 2007.)

If I copy the into *scratch* value of the defcustom converted to a
setq expression, add to it the customization for u+2007, evaluate the
expression, and then re-enable whitespace-mode, I do see it take
effect: the u+2007 character is displayed as the NBSP is.

So I'm unsure why it isn't working for you.



reply via email to

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