From unknown Tue Jun 24 05:14:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27507: [PATCH] Make `cycle-spacing' allow 'negative-zero in place of an integer Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 27 Jun 2017 16:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 27507@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.149858249012557 (code B ref -1); Tue, 27 Jun 2017 16:55:03 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jun 2017 16:54:50 +0000 Received: from localhost ([127.0.0.1]:41069 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPtlK-0003GS-D8 for submit@debbugs.gnu.org; Tue, 27 Jun 2017 12:54:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPtlI-0003G3-M6 for submit@debbugs.gnu.org; Tue, 27 Jun 2017 12:54:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPtlB-0008F1-LD for submit@debbugs.gnu.org; Tue, 27 Jun 2017 12:54:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53715) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dPtlB-0008El-Eo for submit@debbugs.gnu.org; Tue, 27 Jun 2017 12:54:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPtl9-0007Cb-OB for bug-gnu-emacs@gnu.org; Tue, 27 Jun 2017 12:54:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPtC2-0007IJ-GO for bug-gnu-emacs@gnu.org; Tue, 27 Jun 2017 12:18:23 -0400 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:34878) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPtC2-0007H8-9w for bug-gnu-emacs@gnu.org; Tue, 27 Jun 2017 12:18:22 -0400 Received: by mail-wm0-x230.google.com with SMTP id w126so29379838wme.0 for ; Tue, 27 Jun 2017 09:18:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=uNgDZBt2Nf+Mp/vfusV5zxTEFOzs7AlBEZ9gA+aRkyc=; b=V1BCtYc+txAinELLYoo6qZjGGSQrTKQqBKQ3ln7DIdCHystO7VsEo3FZ/Elhv5e5Bu 86Px+JAJ+QJn8PRhG05HZ9JWIwKazmm9sRBy4IPEgkfmFbDBnSwyJZcrtsAXH7XhSpZJ eytRXS+SO5cw4OUxa4uDHRte8eN8XCnRc/223tXgVZJRgfCfx4Nq5vaoGju4ec/sP55W bdnV5kasj6jK8umt4x9wEEnbi5HWJneOSfsFzv9zyL36TPS238Eu156QYpmctHWJV3Mb +Pn5YMNMGzNYhLG1599nl0pDEGRG3OzUkl7CFkO9jOHco6EzmURgJhk+Pk3l1XQIk5JP XGUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=uNgDZBt2Nf+Mp/vfusV5zxTEFOzs7AlBEZ9gA+aRkyc=; b=bczqAcFg64WC7wMgPVPK1aLEaI0PChcPQxdCAtvoSczvht2uZEALXkAwZxRxG1wYsX YFSp5DTOzgOJDi8lMB+LweOO7ZsOoIwgsTPwr+QnnbQiwQpwWJx7+I/Sx0L+3kHg2Bgf kt6IbInWuI//ZizEI6o1j4+Vs5uf9VOtxC7iyAg04qP4xnq/ISXp9Iu56grks/bWWkgY Dz1wd3XIzxdENJwvn28r5TYxw6Vr9nNuVzMzDa5YREMoafr0zjjX13Kr3/EU69CHkAeA jFj0np+je9pJZB6v/FxjV07LPBGO8McF79WrEHk56F8/Hm51y2mwT3xHNHyAWGEF4W8A 3n5A== X-Gm-Message-State: AKS2vOxNOtrdl0yKsdEn3/tgeZQdsC0yEjdYjWCVvyUnGXJl3oVCgDrs NCBev6uIwMzs872v X-Received: by 10.28.145.12 with SMTP id t12mr3717857wmd.7.1498580299228; Tue, 27 Jun 2017 09:18:19 -0700 (PDT) Received: from melibre. ([2001:4ca0:0:f225:c202:3d69:23de:b71a]) by smtp.gmail.com with ESMTPSA id l190sm3561357wmb.18.2017.06.27.09.18.16 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Jun 2017 09:18:18 -0700 (PDT) From: Mekeor Melire Date: Tue, 27 Jun 2017 18:18:06 +0200 Message-ID: <87vanhpfpd.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) * lisp/simple.el (cycle-spacing): beside accepting an integer as first argument N, also allow N to be 'negative-zero. This allows to delete all spaces including newlines with (cycle-spacing 'negative-zero). --- lisp/simple.el | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index a5565ab..00df813 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -867,18 +867,20 @@ The first time `cycle-spacing' runs, it saves in this variable: its N argument, the original point position, and the original spacing around point.") -(defun cycle-spacing (&optional n preserve-nl-back mode) +(defun cycle-spacing (&optional n-or-negative-zero preserve-nl-back mode) "Manipulate whitespace around point in a smart way. In interactive use, this function behaves differently in successive consecutive calls. The first call in a sequence acts like `just-one-space'. It deletes all spaces and tabs around point, leaving one space -\(or N spaces). N is the prefix argument. If N is negative, -it deletes newlines as well, leaving -N spaces. -\(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.) +\(or N spaces). N is the prefix argument. If N is a negative integer, +it deletes newlines as well, leaving -N spaces. If N is 'negative-zero, it +deletes all spaces and newlines. \(If PRESERVE-NL-BACK is non-nil, it does +not delete newlines before point.) -The second call in a sequence deletes all spaces. +The second call in a sequence deletes all spaces. It is skipped if N is 0 +or the symbol 'negative-zero. The third call in a sequence restores the original whitespace (and point). @@ -890,9 +892,14 @@ the function goes straight to the second step. Repeatedly calling the function with different values of N starts a new sequence each time." (interactive "*p") - (let ((orig-pos (point)) - (skip-characters (if (and n (< n 0)) " \t\n\r" " \t")) - (num (abs (or n 1)))) + (letrec + ((orig-pos (point)) + (n-is-negative-zero (eq n-or-negative-zero 'negative-zero)) + (n (if (or (null n-or-negative-zero) n-is-negative-zero) + 0 n-or-negative-zero)) + (skip-characters (if (or n-is-negative-zero (< n 0)) " \t\n\r" " \t")) + (num (abs (or n 1)))) + (skip-chars-backward (if preserve-nl-back " \t" skip-characters)) (constrain-to-field nil orig-pos) (cond -- 2.8.4 (Apple Git-73) From unknown Tue Jun 24 05:14:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27507: [PATCH] Make `cycle-spacing' allow 'negative-zero in place of an integer Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Jun 2017 01:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mekeor Melire Cc: 27507@debbugs.gnu.org Received: via spool by 27507-submit@debbugs.gnu.org id=B27507.149878605412478 (code B ref 27507); Fri, 30 Jun 2017 01:28:02 +0000 Received: (at 27507) by debbugs.gnu.org; 30 Jun 2017 01:27:34 +0000 Received: from localhost ([127.0.0.1]:45226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQkic-0003FC-Dd for submit@debbugs.gnu.org; Thu, 29 Jun 2017 21:27:34 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:36592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQkia-0003Ey-6p for 27507@debbugs.gnu.org; Thu, 29 Jun 2017 21:27:32 -0400 Received: by mail-it0-f52.google.com with SMTP id m68so54467518ith.1 for <27507@debbugs.gnu.org>; Thu, 29 Jun 2017 18:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=NWqFBPRBPrnOfEPS3u5K2dbKxmgooniadGk662vM/PQ=; b=CTmV69kUwDjP2D0iOblGtqfox+dQf5BvKpA8Ag5udCNmv74hn4Yi+XxfKK74eBqed4 MlyiWRjdALLzdYABbKpE3YIqMQZc4rIIbhe9glk3yVAHSIR/UKfjXkFWU766Da6hMvh/ 7iE/Bnr0P9/r7zmrA6eHBHNjzsR7v44hz9HUwOjsaFDCxcIVfWYecS+a1Mwlf7vvPvkb zsCyFs6wKxAleISQ1Oc7l2hGo9BE7LA89KRQcthYKY32nY3NWJX/KqQqdg+HrYl5K1D7 Zsiy+GGJyLdbdIiUicawWneBw96GS1F1L2Oc3/EgPp0rp/qegHgFUx0oLVyDVrhluz3u 4QYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=NWqFBPRBPrnOfEPS3u5K2dbKxmgooniadGk662vM/PQ=; b=Kv69neGh2JMG4TS3IdzhtgbzNdqZokbmUEyNBprRPWMuGrNdY/ax23mbTxH7v3/pV5 oM79dBEBZrt0j4y3eknRnSY0NUr2/zGiHPPJM/ZmhBnxt7mqks+yzuShrq9jru2pCt5p BM3KmWfjMuQNmJOXO0ZMrZTo0EJ4OhxtLsAYm6LdwhrC0In1yKE9tYwCIAGl4R8gDDxX /P/QIp7zgfe2gTiLLOwcCXJD3ABiFyjipAOws6HPW/v1py9OYvjBXJ3kWDgDFZ6F21CJ 1DvMkYljoHuyYJV5tf9TUul8bHxVTROsNKECFX1ByR+iTdOza5uCmOtYijdVXHg8gomw r9mQ== X-Gm-Message-State: AKS2vOwSr/4GTI0TaCKu6P0YF3bdFe7c7Fzsw9GwaEvhOEkeeZ7jF/CY gA1BLPlDZPIeYtlf X-Received: by 10.36.94.10 with SMTP id h10mr17372861itb.103.1498786046632; Thu, 29 Jun 2017 18:27:26 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id c198sm3557535ioe.48.2017.06.29.18.27.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Jun 2017 18:27:26 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87vanhpfpd.fsf@gmail.com> Date: Thu, 29 Jun 2017 21:29:02 -0400 In-Reply-To: <87vanhpfpd.fsf@gmail.com> (Mekeor Melire's message of "Tue, 27 Jun 2017 18:18:06 +0200") Message-ID: <87zicql0v5.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Mekeor Melire writes: > * lisp/simple.el (cycle-spacing): beside accepting an integer as first > argument N, also allow N to be 'negative-zero. This allows to delete > all spaces including newlines with (cycle-spacing 'negative-zero). This behaviour can't be used interactively right? If you want a function to delete all space including newlines, I think it's better to add one instead of adding yet another mode to cycle-spacing which won't even be used by interactive callers. That is, instead of (cycle-spacing 'negative-zero) something like (delete-whitespace). > + (letrec You only need let* here, I think. From unknown Tue Jun 24 05:14:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27507: [PATCH] Make `cycle-spacing' allow 'negative-zero in place of an integer Resent-From: Mekeor Melire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2017 16:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: Mekeor Melire , 27507@debbugs.gnu.org Received: via spool by 27507-submit@debbugs.gnu.org id=B27507.14989258486354 (code B ref 27507); Sat, 01 Jul 2017 16:18:02 +0000 Received: (at 27507) by debbugs.gnu.org; 1 Jul 2017 16:17:28 +0000 Received: from localhost ([127.0.0.1]:47854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRL5L-0001eQ-WD for submit@debbugs.gnu.org; Sat, 01 Jul 2017 12:17:28 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:35008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRL5K-0001eE-J6 for 27507@debbugs.gnu.org; Sat, 01 Jul 2017 12:17:26 -0400 Received: by mail-wr0-f194.google.com with SMTP id z45so41486758wrb.2 for <27507@debbugs.gnu.org>; Sat, 01 Jul 2017 09:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=h3Z9xj5UhrKJrUkjbt4LuhqbVAum6/P1sRPOtDIVMQI=; b=NPqHL90PHbc+KbkNWdDxOyyRz9e2AxrWJPkAHeCDcjC0zXLWlElQlkBt6cMRSAVjb+ dlqSRMb1XaYYSj8P1kCRpTD0ZwZXkThTbu/tV2VG97lEeKHBTwKAYYo9S5M6KaEk8b6a 61AosHiRNc/ABigG94c5itLdmTQBWMUQzkpxRqS0ugmPS4P0VFA/jP0EU7Tpbtla35qs TT58Q2HhdrB2mkXJawSiO99//BXeEzgwAHYQ9cXwniv+EUCmgfENhhz2LX4BNLSxp7Ie n6OE6IcGBwaJRk4B0+4ZIlhRbKBI1jOTRWra5uoFPcN+0N3E9MOG6xV6lP9OcB8KTFVE yRBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=h3Z9xj5UhrKJrUkjbt4LuhqbVAum6/P1sRPOtDIVMQI=; b=IvdXTNoCQVURw4fGdYAnLE6TelvzEUQOaZmxIIzpUngo/fwaXC4Xwdq8jsLfhPocR5 GjdwlghoCJdS1uFiEwhfpyVL2z6YjEzg/xgMGtC6EFI1DXDZqgOND/q6ArH67k6gZ8c0 u+w43sokHoupgiSCB0aQ2WbHrchBZypanSqLp/duoILU5iY/EWrjLf/5s8WwfsgfRcSY JoaoTzsjZJ+il5sPxZV1YRquE78BCqR2GFrFbd4I3Xhk5KG8eDoIlMRxb8M9J+wbiTaU DF/N3M7wKRGvbUwZWADtfcc1bRaQCWWpBzQKgzuvPfgvefJknFMck79XuphDK2vO28sT ph4A== X-Gm-Message-State: AKS2vOxPubtN2qbdi8vuat0byGQJjfje/USad7DyCvbhB9Jf8CQdLUZ/ q5HPS3Te7YmbMLf/mvE= X-Received: by 10.223.146.195 with SMTP id 61mr15102946wrn.134.1498925840500; Sat, 01 Jul 2017 09:17:20 -0700 (PDT) Received: from melibre. ([2001:a61:2267:eb01:6504:dc0:3542:fb2f]) by smtp.gmail.com with ESMTPSA id n71sm12709576wrb.62.2017.07.01.09.17.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Jul 2017 09:17:19 -0700 (PDT) References: <87vanhpfpd.fsf@gmail.com> <87zicql0v5.fsf@users.sourceforge.net> From: Mekeor Melire In-reply-to: <87zicql0v5.fsf@users.sourceforge.net> Date: Sat, 01 Jul 2017 18:17:06 +0200 Message-ID: <87fuegdtdp.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) npostavs@users.sourceforge.net writes: > Mekeor Melire writes: >> * lisp/simple.el (cycle-spacing): beside accepting an integer as first >> argument N, also allow N to be 'negative-zero. This allows to delete >> all spaces including newlines with (cycle-spacing 'negative-zero). > This behaviour can't be used interactively right? If you want a > function to delete all space including newlines, I think it's better to > add one instead of adding yet another mode to cycle-spacing which won't > even be used by interactive callers. > That is, instead of (cycle-spacing 'negative-zero) something like > (delete-whitespace). Well, the point is that delete-whitespace would mostly have the same logic as cycle-spacing. So, should we define a more general function then, which both delete-whitespace and cycle-spacing would be based upon? So, currently `cycle-spacing' is used like this: (cycle-spacing &optional N PRESERVE-NL-BACK MODE) And the problem is that the sign(ature) of N is used to determine whether to delete newlines as well. So, if N is zero, we have a problem. So, I think we shouldn't use the signature of N but instead that should be another argument. But maybe let's use that new argument for a new function so that cycle-spacing stays backwardscompatible? So, I propose something like this: (defun (cycle-spacing &optional n preserve-nl-back mode) (cycle-spacing-general n preserve-nl-back (< n 0) mode)) (defun (cycle-spacing-general &optional n preserve-nl-back delete-newlines mode) ;; use (abs n) in place of n here ;; ... ) ;; this is optional: (defun (delete-whitespace &optional n preserve-n-back mode) (cycle-spacing-general n preserve-nl-back t mode)) >> + (letrec > > You only need let* here, I think. Uhm, I'm not sure. I'll check it out. Thanks for your feedback! From unknown Tue Jun 24 05:14:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27507: [PATCH] Make `cycle-spacing' allow 'negative-zero in place of an integer Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2017 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mekeor Melire Cc: 27507@debbugs.gnu.org Received: via spool by 27507-submit@debbugs.gnu.org id=B27507.149893285416569 (code B ref 27507); Sat, 01 Jul 2017 18:15:01 +0000 Received: (at 27507) by debbugs.gnu.org; 1 Jul 2017 18:14:14 +0000 Received: from localhost ([127.0.0.1]:47950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRMuL-0004JB-T3 for submit@debbugs.gnu.org; Sat, 01 Jul 2017 14:14:14 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:36081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dRMuK-0004Iy-Ej for 27507@debbugs.gnu.org; Sat, 01 Jul 2017 14:14:12 -0400 Received: by mail-it0-f47.google.com with SMTP id m68so73983990ith.1 for <27507@debbugs.gnu.org>; Sat, 01 Jul 2017 11:14:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=z0KrxKCjqdbqHI9sGj8/6q9jvppLFKStQotykSdKWGk=; b=KHguQ/dqxBSyFcKrrjEV+K8V+1solPizUqwPYadnqLm3SBqAu4AZoV9vq/o9mYxqrQ 3Myb29IGMsZtblTAyJUqeX5SQzxRBcmDXVcqxlNYDaiDtEU72X5VbL+kh0DSd7T2/vXv wJJ1cQ52E6gnD2pRoB2eXciD3BRaQQMMSeWC726Zb3WMsuEki9avpAvncWAYkuPrkfNj CdBQqaoTKoIVv4B9AEFeqhKmqqcyXzJB75mCfgppnRCeF4XvoccvsDNqX6EX+ILmpyYd c6M5KjgRaznfVcDrRLiW5a5tHmzDP2aLBzi+B1d9bv21ANg3x/IO+o2jbRb6ZLyr6Bt/ fo+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=z0KrxKCjqdbqHI9sGj8/6q9jvppLFKStQotykSdKWGk=; b=H2PSVuMpaF7u0L3WhMX76FTQZwZ6aDyXNq7/yr2kpHbRq7kNbGbBkmluszFWUCMgIQ r8es7gu8Gw84GA+7eEDKu/2d2ITX5kvbd8fju2D7qdjwai2+ez2LXcwlspoHnhIG4HHg vdtHPThlYvneU6qhbIOWSCOl6poRH2Di2rE6SxT3aT5Y7FN+bnv6JDCxCVSrkcP1mRvC UjBC8WoVV2/SEXwu9Slu0i+/DOMPhTkin4KKqp+4CyvToJ25N5kErlSYJmG/im+kOack mpUOYIrpsKmGicT8Ltl3Pu1pvkjpvegLFMKf77lpANnOMMcHLDPSMbmp84oIfFOKG/RH uLVw== X-Gm-Message-State: AIVw111veqSNFzueN4HL973lIBseJSHscrtnh1Lu/907TzDbOlsfxAD5 q7SxVjkY98iMQVEW X-Received: by 10.36.103.207 with SMTP id u198mr1825279itc.27.1498932846664; Sat, 01 Jul 2017 11:14:06 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 199sm267541itm.14.2017.07.01.11.14.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 01 Jul 2017 11:14:05 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87vanhpfpd.fsf@gmail.com> <87zicql0v5.fsf@users.sourceforge.net> <87fuegdtdp.fsf@gmail.com> Date: Sat, 01 Jul 2017 14:15:42 -0400 In-Reply-To: <87fuegdtdp.fsf@gmail.com> (Mekeor Melire's message of "Sat, 01 Jul 2017 18:17:06 +0200") Message-ID: <87a84okoq9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Mekeor Melire writes: > Well, the point is that delete-whitespace would mostly have the same > logic as cycle-spacing. So, should we define a more general function > then, which both delete-whitespace and cycle-spacing would be based > upon? So, currently `cycle-spacing' is used like this: > > (cycle-spacing &optional N PRESERVE-NL-BACK MODE) > > And the problem is that the sign(ature) of N is used to determine > whether to delete newlines as well. So, if N is zero, we have a > problem. I'm still a bit confused why you specfically want to use cycle-spacing to delete newlines and spaces. What logic of cycle-spacing would be applicable when N is zero? Can you give an example usage? From unknown Tue Jun 24 05:14:31 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27507: [PATCH] Make `cycle-spacing' allow 'negative-zero in place of an integer Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Oct 2017 00:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27507 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Mekeor Melire Cc: 27507@debbugs.gnu.org Received: via spool by 27507-submit@debbugs.gnu.org id=B27507.150819993716374 (code B ref 27507); Tue, 17 Oct 2017 00:26:01 +0000 Received: (at 27507) by debbugs.gnu.org; 17 Oct 2017 00:25:37 +0000 Received: from localhost ([127.0.0.1]:44478 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4FhR-0004Fw-GY for submit@debbugs.gnu.org; Mon, 16 Oct 2017 20:25:37 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:48023) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e4FhP-0004Fc-Kh; Mon, 16 Oct 2017 20:25:35 -0400 Received: by mail-io0-f174.google.com with SMTP id h70so390227ioi.4; Mon, 16 Oct 2017 17:25:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6+z5gK9lPhigkuCNF6h8BGuX6CdbdjckNi4gT4XHEwM=; b=lRay2AViu23Pmim4ljZK9d7CypuNEXsrvQc4lrEgg7HZDWYFpaUsGaw+rGJD1eJT6M 1O7PK5qcFsOj9B4YS/z9na0NcHrVkWLARdoP2Zy7EC928uSzhY3/uww1DrQc5tSgTnaD BoMIeOem56VyoMuXIXN2CaFh/DeKSrsciB1TnS+RAgh+UeYaxQ89l+4hjmoeMmDVswXp eTrOAKXOvYVU27VinarT+uHYT7AuDS93G74LbN07C0PPhbYQu8boTFdbqYAhN+4VpeEW A3StJUkDhNaO87a2oPD8ta+KmQCEFyMNWE9oYdRyhqzYWta6ZrCGyXSabW7HvDYlMxjx QADA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=6+z5gK9lPhigkuCNF6h8BGuX6CdbdjckNi4gT4XHEwM=; b=OkGBB90qn1qhiVE9Aba7i82EVXSqioaRIa23xB2LKdIdmZ+tS91t51Up2NPzdM4O1I YmaGa+6CjrC3bsx4NAgNL2FS0EaZYQPNdyQLQ48PLlyLgJfb9n1uGt0dmdl8J3/cW8Jw 2sRoAK2JDRo7+sly1+R341/5icYNkeJNv0XUP4RI0q0ff2a/PQc9s+0LjchNoK14jbCJ zadPpzgudjnvs+fLeYi8PEA5IbKgBwMQWmHNQFBC7KZOkuQ4gOY+bcuggujdLpt07S0t JbigD5YKDmzObRBy27bZovGakciwx0hSsTdDbI+9AYm5+yAq09BQ5/czXd/uao+eZMIu 81Ag== X-Gm-Message-State: AMCzsaWALnjNXF3jk54i7anTo2eSN7z/fRphd+FxOve/BG5blQs8ReqY YFGL8hoBbHCyzrfF+N3fcDJDFA== X-Google-Smtp-Source: AOwi7QDofUYNXX8Lix0Si44EB5fxmiCIAZ6UJhpeZi0yOVH3loHw+E4BobkYWOI4EQhoNDKBnrQaEw== X-Received: by 10.107.59.211 with SMTP id i202mr13797723ioa.79.1508199929850; Mon, 16 Oct 2017 17:25:29 -0700 (PDT) Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id y197sm4630558itc.39.2017.10.16.17.25.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Oct 2017 17:25:28 -0700 (PDT) From: Noam Postavsky References: <87vanhpfpd.fsf@gmail.com> <87zicql0v5.fsf@users.sourceforge.net> <87fuegdtdp.fsf@gmail.com> <87a84okoq9.fsf@users.sourceforge.net> Date: Mon, 16 Oct 2017 20:25:26 -0400 In-Reply-To: <87a84okoq9.fsf@users.sourceforge.net> (npostavs's message of "Sat, 01 Jul 2017 14:15:42 -0400") Message-ID: <87d15mhb7t.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) tags 27507 + moreinfo quit npostavs@users.sourceforge.net writes: > Mekeor Melire writes: > >> Well, the point is that delete-whitespace would mostly have the same >> logic as cycle-spacing. So, should we define a more general function >> then, which both delete-whitespace and cycle-spacing would be based >> upon? So, currently `cycle-spacing' is used like this: >> >> (cycle-spacing &optional N PRESERVE-NL-BACK MODE) >> >> And the problem is that the sign(ature) of N is used to determine >> whether to delete newlines as well. So, if N is zero, we have a >> problem. > > I'm still a bit confused why you specfically want to use cycle-spacing > to delete newlines and spaces. What logic of cycle-spacing would be > applicable when N is zero? Can you give an example usage? Ping? From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 09 17:35:33 2017 Received: (at control) by debbugs.gnu.org; 9 Nov 2017 22:35:33 +0000 Received: from localhost ([127.0.0.1]:32769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCvQ5-0006UH-86 for submit@debbugs.gnu.org; Thu, 09 Nov 2017 17:35:33 -0500 Received: from mail-wm0-f45.google.com ([74.125.82.45]:47991) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCvQ4-0006U4-2b for control@debbugs.gnu.org; Thu, 09 Nov 2017 17:35:32 -0500 Received: by mail-wm0-f45.google.com with SMTP id b14so4998004wme.2 for ; Thu, 09 Nov 2017 14:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:date:message-id:mime-version; bh=UGex4CiX3OL21duahzXL16w3I7IaBB9hPmegaC0mraU=; b=mTynTLdJGcfxdpIziLUZRoy+Dj1J95J7tXEf3z6whjtheLIT+aNTbOMFKTUCnWGmKf RYuQ0Fb1sY576UcR6ishXQNlwsQYyjjTvCtl8O5pVlkZAbk57FvfKArWfJyArr7f2KmV Bi+Vz9tVJFx7A61kX4ESEL1DThQYbsyOy+IUaJdNU8Rn4hKjmbZgyDR6maD1kaYJbhMh Cg+/+QjubQrV5AP5xs5FskXiHXDEW+XvLew7Ai1WvKkDrlIIuTS/ERZikd+zotFo/O1i PZCEgKIRu0zVVw/8Abm+k8usBE9nF0nBZKq9lfWe20ZyqL9x649iLyMHWgx1Empib1xS xK6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:date:message-id:mime-version; bh=UGex4CiX3OL21duahzXL16w3I7IaBB9hPmegaC0mraU=; b=FPqG1iUeFdDEK5B2vC0gHm/3l1gdO9r4ZHLVvVnUUrq4bnV/n42RyqW80/32QVi1iJ pxjqp/yVrXKDqbm3KEqBPZXKIRjXmzdzTl6X9uio8PUSDG01NW/sNbPLYGmsCjE0lTCV +07yYheUmpFaN2/sVMwTHJJvGoXxIcDw51xE2UhrBLf2IPpjorY35bCDqgVAHrQ7jK9M LMjE8HZ+d1tF4A7g3gP/fZ4qAx2khGm42iboVMHNqw+52IuohwA+MNAiOhiP/aABAm8Z rE59tWJxgbekWZYLGoNPXG5WtFgpNI379aKcDKadSeBrmFo71NnU73qxQiqiZ0aYY5qR jYYQ== X-Gm-Message-State: AJaThX7FLvl7My8z3blTtv/+m4QOCZLbZK5K3WfObDmh0orI5BROoMuH 07O9phOUsQ85X7uG2he8zJVkJA== X-Google-Smtp-Source: AGs4zMZB+/yaJq0XPzguHTovy8KfXh+h8kmKjrVkboND+X64aewLBjzn9R54rk6Rx4jrK/EKgvTXUw== X-Received: by 10.28.31.76 with SMTP id f73mr1046571wmf.139.1510266925960; Thu, 09 Nov 2017 14:35:25 -0800 (PST) Received: from melibre. ([2001:a61:22f5:1001:6e8:37fd:49a6:1267]) by smtp.gmail.com with ESMTPSA id h185sm27665wma.19.2017.11.09.14.35.24 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 Nov 2017 14:35:25 -0800 (PST) From: Mekeor Melire To: control@debbugs.gnu.org Date: Thu, 09 Nov 2017 23:35:23 +0100 Message-ID: <878tfff5ck.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 27507 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mekeor.melire[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.45 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: close 27507 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.45 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [74.125.82.45 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (mekeor.melire[at]gmail.com) 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 0.0 TVD_SPACE_RATIO No description available. 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders close 27507