emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing tags


From: Juri Linkov
Subject: Re: Missing tags
Date: Thu, 05 Feb 2004 04:53:54 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Matthew Mundell <address@hidden> writes:
> With the CVS Emacs find-tag misses certain tags.  For example
>     M-. feature-symbols
> results in "No tags containing feature-symbols".
>
> It seems that the TAGS rules in lisp/Makefile.in ignore any file names
> which are listed after the loaddefs file(s).  This could be fixed as
> follows.
...
> -     els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
> "s,$(lisp)/loaddefs.*\.el,,"`; \
> +     els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
> "s,$(lisp)/loaddefs.*?\.el,,"`; \

Yes, you correctly noticed that sed truncates all files after the
loaddefs file.  However, your solution produces too many tags: it
adds duplicate tags from the loaddefs.el file instead of skipping it.
You added a question mark, but GNU sed don't support non-greedy
regexp operators (though newer super-sed does) and your regexp
fails.  So instead of:

        sed -e "s,$(lisp)/loaddefs.*\.el,,"

it's better to write the following regexp:

        sed -e "s,$(lisp)/loaddefs[^.]*\.el,,"

which skips all characters except a period with the assumption
that no file in the GNU Emacs CVS tree has a period in its name
before the `.el' extension.

However, this regexp still produces too many tags because it
adds duplicate tags from the ldefs-boot.el file.  To match both
loaddefs.el and ldefs-boot.el files sed could use GNU extended
regexps with the `-r' argument:

        sed -r -e "s,$(lisp)/l(oad)?defs[^.]*\.el,,g"

Index: emacs/lisp/Makefile.in
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/Makefile.in,v
retrieving revision 1.48
diff -u -r1.48 Makefile.in
--- emacs/lisp/Makefile.in      8 Nov 2003 01:38:07 -0000       1.48
+++ emacs/lisp/Makefile.in      5 Feb 2004 01:58:58 -0000
@@ -188,11 +188,11 @@
        $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
 
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.*\.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -r -e 
"s,$(lisp)/l(oad)?defs[^.]*\.el,,g"`; \
        ${ETAGS} $$els
 
 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e 
"s,$(lisp)/loaddefs.*\.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -r -e 
"s,$(lisp)/l(oad)?defs[^.]*\.el,,g"`; \
        ${ETAGS} -o TAGS-LISP $$els
 
 .SUFFIXES: .elc .el

-- 
http://www.jurta.org/emacs/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]