From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.devel Subject: Re: emacs-25 f708cb2: Clarify doc string of 'transpose-sexps' Date: Fri, 04 Nov 2016 15:09:02 +0100 Message-ID: <8737j7e3r5.fsf@gmx.net> References: <20161104095223.23249.72530@vcs.savannah.gnu.org> <20161104095223.631AB22012D@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1478268619 1121 195.159.176.226 (4 Nov 2016 14:10:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2016 14:10:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 04 15:10:15 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c2fBN-0002in-EL for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 15:09:25 +0100 Original-Received: from localhost ([::1]:39113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2fBQ-0000l2-8t for ged-emacs-devel@m.gmane.org; Fri, 04 Nov 2016 10:09:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2fBJ-0000km-9V for emacs-devel@gnu.org; Fri, 04 Nov 2016 10:09:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2fBF-0004rv-Bf for emacs-devel@gnu.org; Fri, 04 Nov 2016 10:09:21 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:51873) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2fB9-0004ZQ-RJ; Fri, 04 Nov 2016 10:09:12 -0400 Original-Received: from rosalinde ([89.245.89.33]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MfSrf-1cEXxz2IsF-00P8Yj; Fri, 04 Nov 2016 15:09:04 +0100 In-Reply-To: <20161104095223.631AB22012D@vcs.savannah.gnu.org> (Eli Zaretskii's message of "Fri, 4 Nov 2016 09:52:23 +0000 (UTC)") X-Provags-ID: V03:K0:+FhHbd1rc8zq4WM1vOBqurO9k3oxsvMX/kDwMFVEdyLzH1xuWFK v/2Gn1jGxVhbsvIaouvL1S901WJh3xpbdRLBTJEBXgK+gzPyBL/FNznJQRgGot4sPf+j5f8 zEyR19BOl9VMgCMH5QHvSTXvPNRICXGM2nl/T+y9jR3ZmGMrG5aWIa/iMsiUA93b5hgb/PC Z3xdvLIIZB2z0tp1+bugw== X-UI-Out-Filterresults: notjunk:1;V01:K0:uxipnjQ3wDQ=:TuOczpX3HcBv32UTtNdP1w ZNFEFVrN9cWE4fd+0CImiOrNOCOSFmWy1bVBKEihfH0QdZZ9s5YdFh9crWZrYxEmOJDyi/t/U qBuuCX5w1bSfg0ZbEIr0XLy+Cy1Iq8UAQaFfb2czEQx0B0GyobrKsrDHAT4yEuWFqPaNPQu5b 6WPC3EIxD8S/2wsy2zJubBalyi4W6D1B9X1hSr/JEAa7nSZVNF639uAHeMAdhP7j1umlv5U0m Kz1G18AyFlE7D1MNWgag1WR93ubeaCm3WIP/8LngJfDz2uMAgQrkIg28/khOl2t1uqYUhkQrS HvI7L+b7tHPi5c/g4zRENmRPMmSA0/ItCmStvrpQRfcDJKCuHLW+O3ym42QrTRxyq5Gzf4hi6 ht0OBLRVzFh3MiDt6j/Qv0V9mAK3Mc2ZQBzbSL+8w0WIoiqe9YKyJqKS7yZEBxKiQhns/Z4ae S8gIeoYjwFIxU74eROdAYsyLa4FjkLdwRkVgme0w0BW0hECPYtQsZnmMDATTz+kzrm1LPJZkB 1UzRvkoPzE2wqf3QvI9raG4ZG1FMLJkF3V6jGLmqX5j+E+m6p9kcM7edYZgCkcZLhnjjdJzgg JE064NDViwjszLCOB869tvIV36nnpzG6O5q4+cGFmGosCE6FpQQiBsTeDg8o3EzoJ0gPrD95L z6NlZfAhNzBh4AKWMBtg3oIeKN2jpV1bfag2S1pbL4B3Ish6HkoNm0SIVc8aOD8juseEzdX7z Ip1tVTpVa41G9DdnwWEUamCPp5YACoZfCl7mTFq8M5WAVVjvnk+wvjhcxMrlNBMKz8nvgebk X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.21 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209149 Archived-At: On Fri, 4 Nov 2016 09:52:23 +0000 (UTC) eliz@gnu.org (Eli Zaretskii) wrote: > branch: emacs-25 > commit f708cb22a1608f8a5aea671afebea44d216d9496 > Author: Eli Zaretskii > Commit: Eli Zaretskii > > Clarify doc string of 'transpose-sexps' > > * lisp/simple.el (transpose-sexps): Clarify the conditions for > transposing sexps that are lists or strings. Mention the effect > of the prefix argument. (Bug#24860) > --- > lisp/simple.el | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/lisp/simple.el b/lisp/simple.el > index 8f5324f..ff5774e 100644 > --- a/lisp/simple.el > +++ b/lisp/simple.el > @@ -6663,9 +6663,13 @@ are interchanged." > (transpose-subr 'forward-word arg)) > > (defun transpose-sexps (arg) > - "Like \\[transpose-words] but applies to sexps. > -Does not work on a sexp that point is in the middle of > -if it is a list or string." > + "Like \\[transpose-chars] (`transpose-chars'), but applies to sexps. > +Unlike `transpose-words', point must be between the two sexps and not ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > +in the middle of a sexp to be transposed. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > +With non-zero prefix arg ARG, effect is to take the sexp before point > +and drag it forward past ARG other sexps (backward if ARG is negative). > +If ARG is zero, the sexps ending at or after point and at or after mark > +are interchanged." > (interactive "*p") > (transpose-subr > (lambda (arg) The underlined sentence is not accurate, since transpose-sexps does work like transpose-words if point is in the middle of a symbol or number. Here's a more accurate statement: "If point is in the middle of a list or string, you cannot transpose that sexp with another sexp." Steve Berman