emacs/lib-src
Laurent Stacul 8db310ce8b Fix etags for Ruby module definitions with ::
Problem: In Ruby we can define a nested module/class the safe
way (in the sense, if the parent module does not exist, it will
define it:

  module M
    module N
    end
  end

If M already exists, we can also write:

  module M::N; end

With the later notation, the tag generated by etags will be M::N.
When browsing the code, using xref-find-definitions when the point
is on N, will not be able to find the definition of N because the
implicit tag name is M::N.

This is the same problem with nested classes or even some rare
allowed definitions like explicitely defining a module/class from
the global namespace:

  class ::A; end

Solution: We need to give an explicit tag name.  To achieve this,
on module/class definition we truncate the name to the last found
column.
* lib-src/etags.c (Ruby_functions): Support "::" in module
definitions.
* test/manual/etags/README: Update instructions.
* test/manual/etags/ruby-src/test1.ru: Add identifiers with "::".
* test/manual/etags/CTAGS.good:
* test/manual/etags/CTAGS.good_crlf:
* test/manual/etags/CTAGS.good_update:
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/ETAGS.good_7: Adapt expected results to the
change.  (Bug#77421)

Copyright-paperwork-exempt: yes
2025-04-03 08:50:59 +03:00
..
asset-directory-tool.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
be_resources.cc Update copyright year to 2025 2025-01-01 07:39:17 +00:00
ChangeLog.1 Update copyright year to 2025 2025-01-01 07:39:17 +00:00
COPYING Merge from Gnulib 2017-10-01 18:31:10 -07:00
ebrowse.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
emacsclient.c Fix capitalization ELisp -> Elisp 2025-03-12 09:38:33 +08:00
etags.c Fix etags for Ruby module definitions with :: 2025-04-03 08:50:59 +03:00
hexl.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
make-docfile.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
make-fingerprint.c ; * lib-src/make-fingerprint.c: Fix copyright year. 2025-01-09 06:22:21 +01:00
Makefile.in Remove ctags program 2025-03-22 11:57:29 -07:00
movemail.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
ntlib.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
ntlib.h Update copyright year to 2025 2025-01-01 07:39:17 +00:00
pop.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
pop.h Update copyright year to 2025 2025-01-01 07:39:17 +00:00
rcs2log Fix copyright years by hand 2025-01-01 07:41:51 +00:00
README
seccomp-filter.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00
update-game-score.c Update copyright year to 2025 2025-01-01 07:39:17 +00:00

This directory contains the source code for the architecture-dependent
files that go in ${archlibdir}.  At present, these are mostly utility
programs used by GNU Emacs.