[Top][All Lists]

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

Re: Transposing words over middle words

From: Emanuel Berg
Subject: Re: Transposing words over middle words
Date: Sun, 19 Nov 2017 03:15:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

ken wrote:

> That's great.  Thanks.  It's  quite nice that
> the point remains in place.  Is there perhaps
> a way to return the mark to where it was
> prior to invoking "M-a" so that it, too,
> remains in place?

I'm not aware of any "save-mark-excursion" as
in `save-excursion' or `save-restriction', but
what about simply `pop-mark' last thing?

(defun transpose-over-word-2 ()
  (backward-char 1)
  (forward-word 3)
  (backward-char 1)
  (transpose-words 0)
  (forward-word 1)
  (pop-mark) )

Or perhaps it should be done after
`transpose-words', as that is what acts on the

If that doesn't work saving it in a `let' first
and then pushing it back should work...

underground experts united

reply via email to

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