1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* misc/ruby-mode.el (ruby-mode-set-encoding): commit miss.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-05-31 09:27:06 +00:00
parent 97a1d656f8
commit 4acf013ffd

View file

@ -342,7 +342,7 @@ Also ignores spaces after parenthesis when 'space."
(cdr (assq coding-system ruby-encoding-map)))
coding-system))
"ascii-8bit"))
(unless (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))