Add macros-evil.el and defmacro define-temp-ex-cmd!

This commit is contained in:
Henrik Lissner 2016-03-31 14:37:52 -04:00
parent 5b2874f410
commit 12a33391fd
4 changed files with 37 additions and 26 deletions

View file

@ -75,18 +75,6 @@
(single-key-description
(or macro (read-char "@-"))))))
;;;###autoload
(defmacro define-text-object! (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)))))
;;; Custom argument handlers
;;;###autoload
(defun narf/-ex-match-init (name &optional face update-hook)