unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: delete-trailing-whitespace and binary files
Date: Sat, 27 May 2006 00:31:49 +0200	[thread overview]
Message-ID: <m3bqtke7u2.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <E1FiC4O-0006zE-SD@fencepost.gnu.org> (Richard Stallman's message of "Mon, 22 May 2006 11:11:44 -0400")

Richard Stallman <rms@gnu.org> 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 <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2006-05-26 22:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-21 18:46 delete-trailing-whitespace and binary files Kim F. Storm
2006-05-21 18:50 ` Eli Zaretskii
2006-05-22 15:11 ` Richard Stallman
2006-05-26 22:31   ` Kim F. Storm [this message]
2006-05-27  3:20     ` Stefan Monnier
2006-05-30 20:10       ` Kevin Rodgers
2006-06-01 14:23         ` Kim F. Storm
2006-06-02  3:13           ` Richard Stallman
2006-06-02  8:28             ` David Kastrup
2006-06-02 22:39               ` Richard Stallman
2006-06-02 22:45                 ` David Kastrup
2006-06-04  2:24                   ` Richard Stallman
2006-06-06 20:25                     ` Stuart D. Herring
2006-06-06 21:16                       ` Stuart D. Herring
2006-06-07  2:20                         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3bqtke7u2.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).