Refactor macros

This commit is contained in:
Henrik Lissner 2016-05-12 02:53:31 -04:00
parent f2df8192ff
commit d751be7898
8 changed files with 53 additions and 40 deletions

View file

@ -231,6 +231,12 @@ Examples:
(setq i (1+ i)))
`(progn ,@(apply #'nconc (delete nil (delete (list nil) (reverse forms))))))))
(defmacro def-repeat! (command next-func prev-func)
"Repeat motions with SPC/S-SPC"
`(defadvice ,command
(before ,(intern (format "narf-space--%s" (symbol-name command))) activate)
(define-key evil-motion-state-map (kbd "SPC") ',next-func)
(define-key evil-motion-state-map (kbd "S-SPC") ',prev-func)))
;;
(defun narf|update-scratch-buffer-cwd (&optional dir) ; see core-editor.el