From: Stephen Berman <stephen.berman@gmx.net>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: emacs-25 f708cb2: Clarify doc string of 'transpose-sexps'
Date: Fri, 04 Nov 2016 15:09:02 +0100 [thread overview]
Message-ID: <8737j7e3r5.fsf@gmx.net> (raw)
In-Reply-To: <20161104095223.631AB22012D@vcs.savannah.gnu.org> (Eli Zaretskii's message of "Fri, 4 Nov 2016 09:52:23 +0000 (UTC)")
On Fri, 4 Nov 2016 09:52:23 +0000 (UTC) eliz@gnu.org (Eli Zaretskii) wrote:
> branch: emacs-25
> commit f708cb22a1608f8a5aea671afebea44d216d9496
> Author: Eli Zaretskii <eliz@gnu.org>
> Commit: Eli Zaretskii <eliz@gnu.org>
>
> 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
next parent reply other threads:[~2016-11-04 14:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20161104095223.23249.72530@vcs.savannah.gnu.org>
[not found] ` <20161104095223.631AB22012D@vcs.savannah.gnu.org>
2016-11-04 14:09 ` Stephen Berman [this message]
2016-11-04 14:31 ` emacs-25 f708cb2: Clarify doc string of 'transpose-sexps' Drew Adams
2016-11-04 15:47 ` Stephen Berman
2016-11-04 16:44 ` Drew Adams
2016-11-04 17:08 ` Stephen Berman
2016-11-04 17:21 ` Drew Adams
2016-11-04 17:50 ` Stephen Berman
2016-11-04 18:00 ` Drew Adams
2016-11-04 18:33 ` Eli Zaretskii
2016-11-04 18:30 ` Eli Zaretskii
2016-11-04 18:26 ` Eli Zaretskii
2016-11-04 18:14 ` Eli Zaretskii
[not found] <<20161104095223.23249.72530@vcs.savannah.gnu.org>
[not found] ` <<20161104095223.631AB22012D@vcs.savannah.gnu.org>
[not found] ` <<8737j7e3r5.fsf@gmx.net>
[not found] ` <<ba4a000f-c63d-4fde-94b9-d493e895b7c7@default>
[not found] ` <<87y40zckn9.fsf@gmx.net>
[not found] ` <<977b7eaa-1c5f-4d8b-be5d-33ec73f5a962@default>
[not found] ` <<87twbncgve.fsf@gmx.net>
[not found] ` <<3687e9ab-658b-49b9-b766-8658d5c48374@default>
[not found] ` <<87pombceyc.fsf@gmx.net>
[not found] ` <<83cd67b5-cb42-4fea-b6be-21e9ec8075a7@default>
[not found] ` <<83oa1vjdrx.fsf@gnu.org>
2016-11-04 19:36 ` Drew Adams
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737j7e3r5.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=eliz@gnu.org \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.