Advertisement
Guest User

Untitled

a guest
Mar 8th, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.45 KB | None | 0 0
  1. (defun foo ()
  2.   "docstring"
  3.   (save-excursion
  4.     (beginning-of-line)
  5.     (push-mark (point) t nil)
  6.     (let ((this-indent (current-indentation)))
  7.       (forward-line 1)
  8.       (while (> (current-indentation) this-indent)
  9.         (forward-line 1)))
  10.     (beginning-of-line)
  11.     ;; do something sensible with the region instead
  12.     (copy-region-as-kill (region-beginning) (region-end))
  13.     (end-of-buffer)
  14.     (yank)
  15.     ;; end of party
  16.     ))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement