From: Eli Zaretskii Date: Tue, 2 Feb 2016 18:31:43 +0000 (+0200) Subject: Fix names of tags generated for Ruby accessors X-Git-Tag: emacs-25.0.91~114 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=860da4dccb4f54391f3ff77a9dc23ca54e986cb4;p=emacs.git Fix names of tags generated for Ruby accessors * lib-src/etags.c (Ruby_functions): Don't include the leading colon ':' in tags for Ruby accessors and aliases. (Bug#22241) * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tags. --- diff --git a/lib-src/etags.c b/lib-src/etags.c index 760685a6693..ca6fe51bdb6 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -4721,6 +4721,8 @@ Ruby_functions (FILE *inf) do { char *np = cp; + if (*np == ':') + np++; cp = skip_name (cp); if (reader) make_tag (np, cp - np, true, diff --git a/test/etags/CTAGS.good b/test/etags/CTAGS.good index ac577e4acfd..afb1096b084 100644 --- a/test/etags/CTAGS.good +++ b/test/etags/CTAGS.good @@ -171,15 +171,6 @@ ${CHECKOBJS} make-src/Makefile /^${CHECKOBJS}: CFLAGS=-g3 -DNULLFREECHECK=0$/ /wh ps-src/rfc1245.ps /^\/wh { $/ /yen ps-src/rfc1245.ps /^\/yen \/.notdef \/.notdef \/.notdef \/.notdef \/.notdef / :a-forth-dictionary-entry forth-src/test-forth.fth /^create :a-forth-dictionary-entry$/ -:bar= ruby-src/test1.ru /^ attr_writer :bar$/ -:foo ruby-src/test1.ru /^ attr_reader :foo$/ -:qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ -:read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:tee ruby-src/test1.ru /^ attr_accessor :tee$/ -:tee= ruby-src/test1.ru /^ attr_accessor :tee$/ -:write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ -:write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ < tex-src/texinfo.tex /^\\def<{{\\tt \\less}}$/ << ruby-src/test.rb /^ def <<(y)$/ <= ruby-src/test.rb /^ def <=(y)$/ @@ -2565,6 +2556,7 @@ bar c-src/c.c /^void bar() {while(0) {}}$/ bar c.c 143 bar c-src/h.h 19 bar cp-src/x.cc /^XX::bar()$/ +bar= ruby-src/test1.ru /^ attr_writer :bar$/ bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/ base c-src/emacs/src/lisp.h 2188 base cp-src/c.C /^double base (void) const { return rng_base; }$/ @@ -3014,6 +3006,7 @@ foo f-src/entry.for /^ character*(*) function foo()$/ foo f-src/entry.strange_suffix /^ character*(*) function foo()$/ foo f-src/entry.strange /^ character*(*) function foo()$/ foo php-src/ptest.php /^foo()$/ +foo ruby-src/test1.ru /^ attr_reader :foo$/ foo! ruby-src/test1.ru /^ def foo!$/ foobar c-src/c.c /^int foobar() {;}$/ foobar c.c /^extern void foobar (void) __attribute__ ((section / @@ -3886,6 +3879,7 @@ questo ../c/c.web 34 quiettest make-src/Makefile /^quiettest:$/ quit_char c-src/emacs/src/keyboard.c 192 quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/ +qux ruby-src/test1.ru /^ alias_method :qux, :tee$/ qux= ruby-src/test1.ru /^ def qux=(tee)$/ r0 c-src/sysdep.h 54 r1 c-src/sysdep.h 55 @@ -3910,6 +3904,8 @@ read cp-src/conway.hpp /^ char read() { return alive; }$/ read php-src/lce_functions.php /^ function read()$/ read-key-sequence c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence", Fread_key_sequence, Sr/ read-key-sequence-vector c-src/emacs/src/keyboard.c /^DEFUN ("read-key-sequence-vector", Fread_key_seque/ +read1 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +read2 ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ read_char c-src/emacs/src/keyboard.c /^read_char (int commandflag, Lisp_Object map,$/ read_char_help_form_unwind c-src/emacs/src/keyboard.c /^read_char_help_form_unwind (void)$/ read_char_minibuf_menu_prompt c-src/emacs/src/keyboard.c /^read_char_minibuf_menu_prompt (int commandflag,$/ @@ -4284,6 +4280,8 @@ tags-with-face el-src/emacs/lisp/progmodes/etags.el /^(defmacro tags-with-face ( target_multibyte c-src/emacs/src/regex.h 407 tcpdump html-src/software.html /^tcpdump$/ teats cp-src/c.C 127 +tee ruby-src/test1.ru /^ attr_accessor :tee$/ +tee= ruby-src/test1.ru /^ attr_accessor :tee$/ temporarily_switch_to_single_kboard c-src/emacs/src/keyboard.c /^temporarily_switch_to_single_kboard (struct frame / tend c-src/etags.c 2432 terminate objc-src/Subprocess.m /^- terminate:sender$/ @@ -4452,6 +4450,8 @@ womboid c-src/h.h 75 word_size c-src/emacs/src/lisp.h 1473 write php-src/lce_functions.php /^ function write()$/ write php-src/lce_functions.php /^ function write($save="yes")$/ +write1= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ +write2= ruby-src/test1.ru /^ attr_reader :read1, :read2; attr_writer :wri/ write_abbrev c-src/abbrev.c /^write_abbrev (sym, stream)$/ write_classname c-src/etags.c /^write_classname (linebuffer *cn, const char *quali/ write_lex prol-src/natded.prolog /^write_lex(File):-$/ diff --git a/test/etags/ETAGS.good_1 b/test/etags/ETAGS.good_1 index 84831c9c743..87ab88fd6c2 100644 --- a/test/etags/ETAGS.good_1 +++ b/test/etags/ETAGS.good_1 @@ -3061,7 +3061,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3074,15 +3074,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_2 b/test/etags/ETAGS.good_2 index b97d5f75490..861598232a9 100644 --- a/test/etags/ETAGS.good_2 +++ b/test/etags/ETAGS.good_2 @@ -3631,7 +3631,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3644,15 +3644,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_3 b/test/etags/ETAGS.good_3 index 108fcae16db..52d5a613b61 100644 --- a/test/etags/ETAGS.good_3 +++ b/test/etags/ETAGS.good_3 @@ -3408,7 +3408,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3421,15 +3421,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_4 b/test/etags/ETAGS.good_4 index 1f10a40ccaf..333274cb253 100644 --- a/test/etags/ETAGS.good_4 +++ b/test/etags/ETAGS.good_4 @@ -3225,7 +3225,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -3238,15 +3238,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_5 b/test/etags/ETAGS.good_5 index 0a6cfc8e8e6..fdf2329ee06 100644 --- a/test/etags/ETAGS.good_5 +++ b/test/etags/ETAGS.good_5 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52 diff --git a/test/etags/ETAGS.good_6 b/test/etags/ETAGS.good_6 index cb1264f3e00..95d59d3db39 100644 --- a/test/etags/ETAGS.good_6 +++ b/test/etags/ETAGS.good_6 @@ -4142,7 +4142,7 @@ module ModuleExample1,0 def module_instance_method46,1051 def ModuleExample.module_class_methodmodule_class_method49,1131 -ruby-src/test1.ru,635 +ruby-src/test1.ru,655 class A1,0 def a(2,8 def b(5,38 @@ -4155,15 +4155,15 @@ module A9,57 def self._bar?(_bar?18,143 def qux=(qux=22,194 def X25,232 - attr_reader :foo26,242 - attr_reader :read1,27,265 - attr_reader :read1, :read2;27,265 - attr_reader :read1, :read2; attr_writer :write1,:write1=27,265 - attr_reader :read1, :read2; attr_writer :write1, :write2:write2=27,265 - attr_writer :bar:bar=28,328 - attr_accessor :tee29,351 - attr_accessor :tee:tee=29,351 - alias_method :qux,30,376 + attr_reader :foofoo26,242 + attr_reader :read1,read127,265 + attr_reader :read1, :read2;read227,265 + attr_reader :read1, :read2; attr_writer :write1,write1=27,265 + attr_reader :read1, :read2; attr_writer :write1, :write2write2=27,265 + attr_writer :barbar=28,328 + attr_accessor :teetee29,351 + attr_accessor :teetee=29,351 + alias_method :qux,qux30,376 A::Constant Constant35,425 tex-src/testenv.tex,52