Created
April 2, 2016 20:16
-
-
Save yrns/e9b0cf1c24a87812e1ecab9816823f4c to your computer and use it in GitHub Desktop.
Emacs ramda-destruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ramda-destruct | |
(defun ramda-destruct () | |
(interactive) | |
;; save-excursion does not work with replace. Can't use point since | |
;; the buffer contents are changing. | |
(let ((line (line-number-at-pos)) | |
(column (current-column))) | |
(shell-command-on-region (point-min) (point-max) "ramda-destruct" t t) | |
(goto-char (point-min)) | |
(forward-line (- line 1)) | |
(move-to-column column))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://github.com/raine/ramda-destruct