mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
ruby-style.el: ruby-style-c-mode by VCS [ci skip]
* misc/ruby-style.el (ruby-style-c-mode): set ruby-style if the remote repository is ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5bc8bb36c9
commit
047111584f
1 changed files with 14 additions and 1 deletions
|
@ -75,7 +75,20 @@
|
|||
(let ((head (progn (forward-line 100) (point)))
|
||||
(case-fold-search nil))
|
||||
(goto-char (point-min))
|
||||
(re-search-forward "Copyright (C) .* Yukihiro Matsumoto" head t))))
|
||||
(re-search-forward "Copyright (C) .* Yukihiro Matsumoto" head t)))
|
||||
(condition-case ()
|
||||
(with-temp-buffer
|
||||
(when (= 0 (call-process "git" nil t nil "remote" "get-url" "origin"))
|
||||
(goto-char (point-min))
|
||||
(looking-at ".*/ruby\\(\\.git\\)?$")))
|
||||
(error))
|
||||
(condition-case ()
|
||||
(with-temp-buffer
|
||||
(when (= 0 (call-process "svn" nil t nil "info" "--xml"))
|
||||
(goto-char (point-min))
|
||||
(search-forward-regexp "<root>.*/ruby</root>" nil)))
|
||||
(error))
|
||||
nil)
|
||||
(c-set-style "ruby")))
|
||||
|
||||
(provide 'ruby-style)
|
||||
|
|
Loading…
Add table
Reference in a new issue