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

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

RE: delete-horizontal-space and NO-BREAK SPACE


From: Drew Adams
Subject: RE: delete-horizontal-space and NO-BREAK SPACE
Date: Mon, 23 Aug 2010 08:50:53 -0700

> more and more often I get emails with NO-BREAK SPACE characters (ascii
> 160) in them which are used for alignment purposes.  When replying to
> such e-mails, I usually have to edit this a lot and wish 'M-\' would
> erase the whole stretch of the characters.
> 
> Looking up the definition of delete-horizontal-space, it is 
> obvious that it doesn't do this as it only erases " \t".
> 
> Is there another nice function really erasing all space characters
> (i.e. chars belonging to the "space" category) or should the 
> funtion be improved?

I would suggest that you file an enhancement request, via `M-x
report-emacs-bug'. The Emacs developers will then DTRT (decide whether and where
to enhance Emacs for this).

IMO, there should be a user option that controls what "whitespace" is affected
by this and similar commands (e.g. `fixup-whitespace',
`delete-trailing-whitespace', `delete-blank-lines').

And modes and other functions should feel free to bind that option when (they
are sure it is truly) appropriate.

[Yes, I know that some consider it heresy to allow/endorse Lisp binding of user
options. I do not. Sometimes it makes sense for a function to control an option
value, but yes of course, generally the user knows best. If it is problematic
for some given option/context, then value choices can be provided for both
possibilities - some values inform programs not to override/bind. E.g., if
non-nil (or whatever), then just bind to the existing value (essentially a
no-op), respecting the user choice, else do something the program considers more
appropriate.]




reply via email to

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