emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-trailing-whitespace and binary files


From: Kim F. Storm
Subject: Re: delete-trailing-whitespace and binary files
Date: Sat, 27 May 2006 00:31:49 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Richard Stallman <address@hidden> writes:

>     1) If file is binary (how to check that?), don't delete whitespace
>        when run from a hook (how to check that?).
>
> That is so complex that I think it would be undesirable.
>
>     2) Don't consider NUL to be whitespace.
>
> That seems like a good idea.  Is there EVER a reason for
> delete-trailing-whitespace to delete NUL?

If the syntax table says that NUL is whitespace, I guess it should do it...


I looked a little further at this.

Opening file spook.lines selects text-mode.

text-mode is derived from Fundamental-mode, which has
a somewhat peculiar (IMO) interpretation of "whitespace":

C-@ .. SPC              which means: whitespace
DEL .. ÿ                which means: whitespace
                        which means: whitespace
      .. ​              which means: whitespace
<<default>>             which means: whitespace


So delete-trailing-whitespace just does what it's supposed to do.

Is there a better major-mode to choose for spook.lines (e.g. via a
file local variable)?

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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