emacs-devel
[Top][All Lists]
Advanced

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

Re: Patch to change just-one-space


From: Tassilo Horn
Subject: Re: Patch to change just-one-space
Date: Tue, 7 Dec 2010 10:43:11 +0100
User-agent: KMail/1.13.5 (Linux/2.6.37-rc4+; KDE/4.5.4; x86_64; ; )

On Monday 06 December 2010 19:22:04 Stefan Monnier wrote:

Hi Stefan,

> >>> Attached is a bzr bundle which does this. If the user passes the
> >>> argument -N, it will remove any whitespace characters (spaces, tabs,
> >>> carriage returns, newlines) and leave N spaces. Unfortunately I
> >>> couldn't think of a good way to make e.g. "M-- M-0 M-SPC" leave 0
> >>> spaces.
> >> 
> >> Any objection to such a change?  Removing newlines sounds OK to me,
> >> but I don't use just-one-space, so I don't have a good feeling for
> >> what other useful meaning could be used for a negative argument.
> 
> I saw no objections, so I installed it on the trunk.

There's a problem with your change.  When you call `just-one-space' from
lisp without explicit argument and thus n is nil, you get an error,
because the function expects it to be a number.  So something like

  (setq n (or n 1))

seems to be needed.

Bye,
Tassilo



reply via email to

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