Refactor add-hook! and associate!; associate! only for minor modes now

This commit is contained in:
Henrik Lissner 2017-03-02 18:14:52 -05:00
parent ea8ed1f997
commit c037c325a1
4 changed files with 75 additions and 47 deletions

View file

@ -1,6 +1,6 @@
;;; module-data.el
(associate! conf-mode :match "/sxhkdrc$")
(push '("/sxhkdrc" . conf-mode) auto-mode-alist)
(def-package! nxml-mode

View file

@ -60,7 +60,7 @@
:preface
(defvar nose-mode-map (make-sparse-keymap))
:init
(associate! nose-mode :match "/test_.+\\.py$" :in (python-mode))
(associate! nose-mode :match "/test_.+\\.py$" :modes (python-mode))
:config
(set! :popup "*nosetests*" :size 0.4 :noselect t)
(set! :yas-minor-mode 'nose-mode)

View file

@ -44,7 +44,7 @@
:mode ("/\\.rspec$" . text-mode)
:init
(associate! rspec-mode :match "/\\.rspec$")
(associate! rspec-mode :in (ruby-mode yaml-mode) :files ("/spec/"))
(associate! rspec-mode :modes (ruby-mode yaml-mode) :files ("/spec/"))
(defvar rspec-mode-verifiable-map (make-sparse-keymap))
(defvar evilmi-ruby-match-tags
'((("unless" "if") ("elsif" "else") "end")