eschulte / rinari

Rinari Is Not A Rails IDE (it is an Emacs minor mode for Rails)
http://rinari.rubyforge.org
GNU General Public License v3.0
412 stars 68 forks source link

I am try to add some special keywords face. ruby-local-enable-extra-keywords is not defined. #84

Closed zw963 closed 9 years ago

zw963 commented 9 years ago
(defun rinari-highlight-keywords (keywords)
  "Highlight the passed KEYWORDS in current buffer.
Use `font-lock-add-keywords' in case of `ruby-mode' or
`ruby-extra-keywords' in case of Enhanced Ruby Mode."
  (if (boundp 'ruby-extra-keywords)
      (progn
        (setq ruby-extra-keywords (append ruby-extra-keywords keywords))
        (ruby-local-enable-extra-keywords))
    (font-lock-add-keywords
     nil
     (list (list
            (concat "\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b"
                    (regexp-opt keywords t)
                    (eval-when-compile (if (string-match "\\_>" "ruby")
                                           "\\_>"
                                         "\\>")))
            (list 2 'font-lock-builtin-face))))))
zw963 commented 9 years ago

I see, it defined from Enhanced-Ruby-Mode. Thanks.