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

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

Re: Newline and copy above line's indentation


From: Emanuel Berg
Subject: Re: Newline and copy above line's indentation
Date: Tue, 03 Jul 2018 16:37:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

(defun copy-whitespace-above-and-indent-2 ()
  (interactive)
  (let ((start)
        (stop) )
    (save-excursion
      (forward-line -1)
      (setq start (point))
      (beginning-of-line-text)
      (setq stop  (point)) )
    (insert "\n" (buffer-substring start stop)) ))

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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