Skip to content

Instantly share code, notes, and snippets.

@zkat
Last active October 6, 2015 04:28
Show Gist options
  • Select an option

  • Save zkat/2936463 to your computer and use it in GitHub Desktop.

Select an option

Save zkat/2936463 to your computer and use it in GitHub Desktop.
I want this over here, please
(global-set-key (kbd "C-M-s") 'save-current-point)
;; (global-set-key (kbd "C-c p") 'load-last-point)
(global-set-key (kbd "C-M-y") 'yank-to-last-point-and-indent)
(defun save-current-point ()
(interactive)
(point-to-register 'p)
(message "Current point saved"))
(defun load-last-point ()
(interactive)
(jump-to-register 'p))
(defun yank-to-last-point-and-indent ()
(interactive)
(load-last-point)
(yank)
(paredit-backward)
(indent-sexp))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment