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