[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113129: * lisp/progmodes/ruby-mode.el (auto-mode-al
From: |
Dmitry Gutov |
Subject: |
[Emacs-diffs] trunk r113129: * lisp/progmodes/ruby-mode.el (auto-mode-alist): Consolidate different |
Date: |
Fri, 21 Jun 2013 23:14:39 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113129
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sat 2013-06-22 03:14:38 +0400
message:
* lisp/progmodes/ruby-mode.el (auto-mode-alist): Consolidate different
entries into one regexp and add more *file-s.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/ruby-mode.el
rubymode.el-20091113204419-o5vbwnq5f7feedwu-8804
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-21 23:07:49 +0000
+++ b/lisp/ChangeLog 2013-06-21 23:14:38 +0000
@@ -3,6 +3,8 @@
* progmodes/ruby-mode.el (ruby-font-lock-keywords): Highlight
keyword-like methods on Kernel and Module with
font-lock-builtin-face.
+ (auto-mode-alist): Consolidate different entries into one regexp
+ and add more *file-s.
2013-06-21 Stephen Berman <address@hidden>
=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el 2013-06-21 23:07:49 +0000
+++ b/lisp/progmodes/ruby-mode.el 2013-06-21 23:14:38 +0000
@@ -1867,11 +1867,15 @@
;;; Invoke ruby-mode when appropriate
;;;###autoload
-(add-to-list 'auto-mode-alist (cons (purecopy "\\.rb\\'") 'ruby-mode))
-;;;###autoload
-(add-to-list 'auto-mode-alist (cons (purecopy "Rakefile\\'") 'ruby-mode))
-;;;###autoload
-(add-to-list 'auto-mode-alist (cons (purecopy "\\.gemspec\\'") 'ruby-mode))
+(add-to-list 'auto-mode-alist
+ (cons (purecopy (concat "\\(?:\\."
+ (regexp-opt '("rb" "ru" "rake" "thor"
+ "jbuilder" "gemspec"))
+ "\\|/"
+ (regexp-opt '("Gemfile" "Rakefile"
+ "Capfile" "Thorfile"
+ "Vagrantfile"))
+ "\\)\\'")) 'ruby-mode))
;;;###autoload
(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113129: * lisp/progmodes/ruby-mode.el (auto-mode-alist): Consolidate different,
Dmitry Gutov <=