emacs-devel
[Top][All Lists]
Advanced

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

Re: shouldn't `delete-blank-lines' treat form-feed as whitespace?


From: Stefan Monnier
Subject: Re: shouldn't `delete-blank-lines' treat form-feed as whitespace?
Date: Wed, 03 Mar 2010 23:28:36 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

> Yes, I suppose the notion of whitespace is mode-dependent, and
> [:space:] should capture that notion appropriately for each
> mode. Good point.

It's actually even more delicate than that.

There's basically the notion of "blank" for characters that have no
associated semantics in the corresponding language.  And then there's
the notion of "blank" for characters which *users* consider as having
no semantics.

Usually the first includes form-feed and other such things and is best
handled by forward-comment.  Usually the second only includes \s, \t,
\n, \r but doesn't include form-feed.

syntax-tables usually use the `space' syntax for \s, \t, form-feed, \r,
and sometimes \n (but not always because of newline-terminated
comments).  So using the `space' syntax is usually not a good choice
because of the \n issue and because it doesn't handle comments.


        Stefan




reply via email to

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