[m-rev.] for review: minor change to mtags

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jul 5 23:25:20 AEST 2001


Estimated hours taken: 0.5
Branches: main

scripts/mtags:
	When searching for the clauses that match a given predicate
	declaration, assume that the clause has the same number of
	module qualifiers as the declaration.  This is more likely to be
	correct than always assuming that the clause has the same
	number of qualifiers as the call, which is what we did previously.
	
	(The ideal thing to do here would be to search for clauses with
	any number of qualifiers, but that is tricky to do right, because
	the right operator to use for disjunction in the search pattern
	varies depending on the exact vim options set; it could be either
	"|" or "\|".)

Workspace: /home/hg/fjh/ws-hg4/mercury
Index: scripts/mtags
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mtags,v
retrieving revision 1.27
diff -u -d -r1.27 mtags
--- scripts/mtags	2000/12/11 10:43:11	1.27
+++ scripts/mtags	2001/07/05 13:12:38
@@ -242,6 +242,9 @@
 	$match_line =~ s|\\|\\\\|g;   # replace `\' with `\\'
 	$match_line =~ s|/|\\/|g;     # replace `/' with `\/'
 
+	# $src_name holds the name as it was in the original source
+	$src_name = $name;
+
 	# output a tag for the fully-qualified name
 	if (substr($name, 0, length($module)) ne $module) {
 		$name = "${module}__$name";
@@ -281,7 +284,7 @@
 		# Output commands to alter the search buffer.
 		if ($search_definitions) {
 		    if ($kind eq "pred" || $kind eq "func") {
-			printf out ";kq|/^\\<%s\\>/;'q", $name;
+			printf out ";kq|/^\\<%s\\>/;'q", $src_name;
 		    } else {
 			printf out ";kq|-;/\\<%s\\>/;'q", $name;
 		    }

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list