]> git.eshelyaron.com Git - emacs.git/commitdiff
Change Ruby file names and extensions recognized by 'etags'
authorEli Zaretskii <eliz@gnu.org>
Tue, 2 Feb 2016 17:50:08 +0000 (19:50 +0200)
committerEli Zaretskii <eliz@gnu.org>
Tue, 2 Feb 2016 17:50:08 +0000 (19:50 +0200)
* lib-src/etags.c <Ruby_filenames>: New variable, holds names
of Ruby files.
<Ruby_suffixes>: Treat .rb, .ru, and .rbw as Ruby extensions.
<lang_names>: Add Ruby_filenames to the Ruby entry.
* test/etags/ruby-src/test1.ru: Renamed from test1.ruby.
(Bug#22241)

lib-src/etags.c
test/etags/ruby-src/test1.ru [new file with mode: 0644]
test/etags/ruby-src/test1.ruby [deleted file]

index 769a22027f765a86c9890b63a70712547445a636..acf20ddceb9b0a23ccba2b553e9306735bb8559e 100644 (file)
@@ -729,7 +729,9 @@ static const char Python_help [] =
 generate a tag.";
 
 static const char *Ruby_suffixes [] =
-  { "rb", "ruby", NULL };
+  { "rb", "ru", "rbw", NULL };
+static const char *Ruby_filenames [] =
+  { "Rakefile", "Thorfile", NULL };
 static const char Ruby_help [] =
   "In Ruby code, 'def' or 'class' or 'module' at the beginning of\n\
 a line generate a tag.  Constants also generate a tag.";
@@ -813,7 +815,7 @@ static language lang_names [] =
   { "proc",      no_lang_help,   plain_C_entries,   plain_C_suffixes   },
   { "prolog",    Prolog_help,    Prolog_functions,  Prolog_suffixes    },
   { "python",    Python_help,    Python_functions,  Python_suffixes    },
-  { "ruby",      Ruby_help,      Ruby_functions,    Ruby_suffixes      },
+  { "ruby",      Ruby_help,Ruby_functions,Ruby_suffixes,Ruby_filenames },
   { "scheme",    Scheme_help,    Scheme_functions,  Scheme_suffixes    },
   { "tex",       TeX_help,       TeX_commands,      TeX_suffixes       },
   { "texinfo",   Texinfo_help,   Texinfo_nodes,     Texinfo_suffixes   },
diff --git a/test/etags/ruby-src/test1.ru b/test/etags/ruby-src/test1.ru
new file mode 100644 (file)
index 0000000..75dcd51
--- /dev/null
@@ -0,0 +1,38 @@
+class A
+ def a()
+  super(" do ")
+ end
+ def b()
+ end
+end
+
+module A
+  class B
+    ABC = 4
+    Def_ = 'blah'
+    Xyzzy =10
+
+    def foo!
+    end
+
+    def self._bar?(abc)
+    end
+
+    class << self
+      def qux=(tee)
+      end
+    end
+    def X
+      attr_reader :foo
+      attr_reader :read1, :read2; attr_writer :write1, :write2
+      attr_writer :bar
+      attr_accessor :tee
+      alias_method :qux, :tee
+    end
+  end
+end
+
+A::Constant = 5
+
+# def foo_in_comment
+# end
diff --git a/test/etags/ruby-src/test1.ruby b/test/etags/ruby-src/test1.ruby
deleted file mode 100644 (file)
index 75dcd51..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-class A
- def a()
-  super(" do ")
- end
- def b()
- end
-end
-
-module A
-  class B
-    ABC = 4
-    Def_ = 'blah'
-    Xyzzy =10
-
-    def foo!
-    end
-
-    def self._bar?(abc)
-    end
-
-    class << self
-      def qux=(tee)
-      end
-    end
-    def X
-      attr_reader :foo
-      attr_reader :read1, :read2; attr_writer :write1, :write2
-      attr_writer :bar
-      attr_accessor :tee
-      alias_method :qux, :tee
-    end
-  end
-end
-
-A::Constant = 5
-
-# def foo_in_comment
-# end