Commit f3eaab0a authored by Mark Oteiza's avatar Mark Oteiza
Browse files

Turn on lexical-binding in ruby-mode

* lisp/progmodes/ruby-mode.el: Turn on lexical-binding.
(ruby-font-lock-syntax-table): Use make-syntax-table.
(ruby-mode): 'define-derived-mode' writes the keys for us.
parent edadd31b
;;; ruby-mode.el --- Major mode for editing Ruby files
;;; ruby-mode.el --- Major mode for editing Ruby files -*- lexical-binding: t -*-
;; Copyright (C) 1994-2017 Free Software Foundation, Inc.
......@@ -2035,7 +2035,7 @@ It will be properly highlighted even when the call omits parens.")
(defvar ruby-font-lock-syntax-table
(let ((tbl (copy-syntax-table ruby-mode-syntax-table)))
(let ((tbl (make-syntax-table ruby-mode-syntax-table)))
(modify-syntax-entry ?_ "w" tbl)
"The syntax table to use for fontifying Ruby mode buffers.
......@@ -2255,9 +2255,7 @@ See `font-lock-syntax-table'.")
(define-derived-mode ruby-mode prog-mode "Ruby"
"Major mode for editing Ruby code.
"Major mode for editing Ruby code."
(setq-local imenu-create-index-function 'ruby-imenu-create-index)
......@@ -2286,7 +2284,8 @@ See `font-lock-syntax-table'.")
"\\)\\'")) 'ruby-mode))
(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment