From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Patch to change just-one-space Date: Tue, 7 Dec 2010 10:43:11 +0100 Message-ID: <201012071043.12395.tassilo@member.fsf.org> References: <7b501d5c0908131337g300e8895i465719007e29074c@mail.gmail.com> <87fwusjvcy.fsf@member.fsf.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291715026 22469 80.91.229.12 (7 Dec 2010 09:43:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Dec 2010 09:43:46 +0000 (UTC) Cc: xahlee@gmail.com, Daniel Colascione , Stefan Monnier , Deniz Dogan To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 07 10:43:41 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PPu5E-0002pF-Nv for ged-emacs-devel@m.gmane.org; Tue, 07 Dec 2010 10:43:40 +0100 Original-Received: from localhost ([127.0.0.1]:56956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPu5D-0000dH-AT for ged-emacs-devel@m.gmane.org; Tue, 07 Dec 2010 04:43:39 -0500 Original-Received: from [140.186.70.92] (port=58031 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPu4r-0000an-Km for emacs-devel@gnu.org; Tue, 07 Dec 2010 04:43:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPu4q-0002gW-9t for emacs-devel@gnu.org; Tue, 07 Dec 2010 04:43:17 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:3780) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPu4q-0002gQ-52 for emacs-devel@gnu.org; Tue, 07 Dec 2010 04:43:16 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id C55EC7801683; Tue, 7 Dec 2010 10:43:14 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01644-04; Tue, 7 Dec 2010 10:43:14 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.localnet (tsdh.uni-koblenz.de [141.26.67.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTP id 6498A7801681; Tue, 7 Dec 2010 10:43:13 +0100 (CET) User-Agent: KMail/1.13.5 (Linux/2.6.37-rc4+; KDE/4.5.4; x86_64; ; ) In-Reply-To: X-Virus-Scanned: amavisd-new at uni-koblenz.de X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133492 Archived-At: 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