Andreas Röhler writes:
Please trim your posts, Andreas.
as it happens `whitespace-trailing-regexp' already exists,
Not in XEmacs core or packages as far as I can tell, and that's a
horrible name for a core variable, although it's easy to see why it
would arise as an internal variable of the "whitespace" library.
what about that form:
If that's from GNU Emacs, it still runs into the fact that this is
redundant. The basic idea is trivially implementable in only slightly
less sophisticated form, simply treating formfeed as non-whitespace:
(while (search-forward #r"[ \t]$" nil t)
(delete-horizontal-space))
This should typically be good enough, since formfeed is normally
visible as "^L", so whitespace preceding "^L" at end of line will
usually be quite visible), and much more sophisticated functionality
is available in the package distribution as whitespace.el and
whitespace-visual.el.
OTOH, I have trouble imagining a use case for the more general feature
that would not be more useful if non-trailing whitespace were cleaned
up, too. That is, I don't understand why someone would go to the
trouble of entering no-break spaces or non-default-width spaces at the
end of the line if they didn't specifically want them there, and I
don't see any reason why they would get them inadvertantly, while
there are all kinds of reasons why people inadvertantly end up with
trailing ASCII whitespace.
AFAIK Didier is not actively improving whitespace.el, but he made a
point of accepting maintainership, and I'm sure he'd respond quickly
to patch submissions.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta