[前][次][番号順一覧][スレッド一覧]

ruby-changes:53820

From: nobu <ko1@a...>
Date: Tue, 27 Nov 2018 22:47:54 +0900 (JST)
Subject: [ruby-changes:53820] nobu:r66038 (trunk): ruby-style.el: ruby-style-c-mode by VCS [ci skip]

nobu	2018-11-27 22:47:49 +0900 (Tue, 27 Nov 2018)

  New Revision: 66038

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66038

  Log:
    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.

  Modified files:
    trunk/misc/ruby-style.el
Index: misc/ruby-style.el
===================================================================
--- misc/ruby-style.el	(revision 66037)
+++ misc/ruby-style.el	(revision 66038)
@@ -75,7 +75,20 @@ https://github.com/ruby/ruby/blob/trunk/misc/ruby-style.el#L75
             (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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]