diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-31 09:22:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-31 09:22:25 +0000 |
commit | e3a1701442eef72602449a5f27c6b94e45881430 (patch) | |
tree | fbd988dbd75078cb93c1f0de954a534551ca144e | |
parent | ea046e22eda06e455c34ff5d4ec413d5538d6e38 (diff) |
* misc/ruby-mode.el (ruby-mode-set-encoding): skip shebang line
always regardless of ruby.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@28106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | misc/ruby-mode.el | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon May 31 18:22:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * misc/ruby-mode.el (ruby-mode-set-encoding): skip shebang line + always regardless of ruby. + Mon May 31 04:03:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (file_expand_path): check if expanded dname encoding is diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el index a72fabe0e6..0072f1e0d5 100644 --- a/misc/ruby-mode.el +++ b/misc/ruby-mode.el @@ -342,7 +342,7 @@ Also ignores spaces after parenthesis when 'space." (cdr (assq coding-system ruby-encoding-map))) coding-system)) "ascii-8bit")) - (if (looking-at "^#![^\n]*ruby") (beginning-of-line 2)) + (if (looking-at "^#!") (beginning-of-line 2)) (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") (unless (string= (match-string 2) coding-system) (goto-char (match-beginning 2)) |