Giant refactor! (part 1)

This commit is contained in:
Henrik Lissner 2016-05-20 19:08:02 -04:00
parent f38d868504
commit a984bf4f26
20 changed files with 490 additions and 541 deletions

View file

@ -1,17 +1,5 @@
;;; macros-evil.el
;;;###autoload
(defmacro def-textobj! (key start-regex end-regex)
(let ((inner-name (make-symbol "narf--inner-name"))
(outer-name (make-symbol "narf--outer-name")))
`(progn
(evil-define-text-object ,inner-name (count &optional beg end type)
(evil-select-paren ,start-regex ,end-regex beg end type count nil))
(evil-define-text-object ,outer-name (count &optional beg end type)
(evil-select-paren ,start-regex ,end-regex beg end type count t))
(define-key evil-inner-text-objects-map ,key (quote ,inner-name))
(define-key evil-outer-text-objects-map ,key (quote ,outer-name)))))
;;;###autoload
(defmacro def-tmp-excmd! (cmd-on cmd-off &rest commands)
"Creates a toggle for a set of ex commands, named CMD-ON and CMD-OFF."