Le 16 avr. 2012 à 19:19, Jim Meyering a écrit : > Good one. > I prefer to use " +" rather than " *",
You are right, I started for grep, not grep -E. > and suppose someone might say "See also ...", too, > so added the (also +)? term. > > Do you think it's worth worrying about "Also see @xref...", too? which includes "see @xref" :) > > > diff --git a/top/maint.mk b/top/maint.mk > index 2228a37..700dd1c 100644 > --- a/top/maint.mk > +++ b/top/maint.mk > @@ -838,6 +838,13 @@ sc_texinfo_acronym: > halt='found use of Texinfo @acronym{}' \ > $(_sc_search_regexp) > > +# Avoid double "see" when contributed by @xref. > +sc_texinfo_see_xref: > + @prohibit='[Ss]ee +(also +)?@p?xref\{' \ > + in_vc_files='$(texinfo_suffix_re_)' \ > + halt='found use of "See @xref{}"' \ > + $(_sc_search_regexp) That's good with me. I would be happy to be able to catch broken lines though. It would be nice to be able to escape from the constraint of grep per-line. In Texinfo "\n\n" is a better separator imho. How about using Perl instead of Grep? > + > cvs_keywords = \ > Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State