disable function added to disable abilities
This commit is contained in:
parent
34e07c2c39
commit
b6d22db359
|
@ -7,4 +7,6 @@
|
|||
'web
|
||||
'ruby)
|
||||
|
||||
(disable 'rbenv)
|
||||
(describe-variable disabled-abilities)
|
||||
(fg42-initialize)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
(setup-inf-and-robe)
|
||||
(setup-bundler)
|
||||
|
||||
(with-ability 'rbenv
|
||||
(with-ability rbenv
|
||||
(require 'rbenv)
|
||||
(global-rbenv-mode))
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
"Web development plugin initialization."
|
||||
(message "Initializing 'ruby' extension.")
|
||||
|
||||
(with-ability 'global-rbenv
|
||||
(with-ability global-rbenv
|
||||
(require 'rbenv)
|
||||
(global-rbenv-mode))
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
(setq irbpath (rbenv--expand-path "shims" "irb"))
|
||||
(setq irb (concat irbpath irbparams))
|
||||
(add-to-list 'inf-ruby-implementations (cons "ruby" irb))
|
||||
(inf-ruby-minor-mode t)
|
||||
(inf-ruby-minor-mode t))
|
||||
|
||||
|
||||
;;;###autoload
|
||||
|
@ -60,7 +60,4 @@
|
|||
;; Hack autocomplete so it treat :symbole and symbole the same way
|
||||
(modify-syntax-entry ?: "."))
|
||||
|
||||
|
||||
|
||||
|
||||
(provide 'extensions/ruby/setup)
|
||||
|
|
|
@ -24,6 +24,11 @@
|
|||
"Return t if ability was not in disabled-abilities."
|
||||
(if (gethash name disabled-abilities) nil t))
|
||||
|
||||
(defun disable (&rest abilities)
|
||||
"Add the given abilities to disabled-abilities hash"
|
||||
(dolist (abl abilities)
|
||||
(puthash abl t disabled-abilities)))
|
||||
|
||||
;; Macros ---------------------------------
|
||||
(defmacro ability (name deps &rest body)
|
||||
"Define an ability with the given name.
|
||||
|
|
Loading…
Reference in New Issue