I want to define a configurable variable in Emacs, but make it can be used in Ruby code.
The situation is like here:
https://github.com/zenspider/enhanced-ruby-mode/pull/68
I copy the content to here:
here is the elisp code that want to define a emacs variable to config the ruby indent for access modifiers (private, public, protected).
(defcustom enh-ruby-outdent-access-modifiers nil
"*Outdent public/protected/private modifiers if this is non-nil."
:type 'boolean :group 'enh-ruby)
(put 'enh-ruby-outdent-access-modifiers 'safe-local-variable 'booleanp)
And here is the ruby code.
when :period then
add :ident, tok
else
+ indent :s if %w(private protected public).include? tok
if @ermbuffer.extra_keywords.include? tok then
add :kw, tok
else