help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Move line


From: Thien-Thi Nguyen
Subject: Re: Move line
Date: Sun, 01 Jun 2008 07:48:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

⎛⎞ Joost Kremers <address@hidden>
⎝⎠ 31 May 2008 23:03:20 GMT

   it's much simpler and shorter, and does something completely different...

I think OP wants some fusion of transpose-lines plus "save-excursion",
something like:

(defun transpose-lines/stay-put ()
  (let ((col (current-column)))
    (forward-line 1)
    (transpose-lines 1)
    (forward-line -1)
    (forward-char col)))

thi




reply via email to

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