Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: 3.1.6-dev-22



Bart Schaefer wrote:

> On Apr 12, 11:10am, Sven Wischnowsky wrote:
> } Subject: PATCH: Re: 3.1.6-dev-22
> }
> } 
> } Peter Stephenson wrote:
> } 
> } > Sven Wischnowsky wrote:
> } > > So, I would like to make the question: should we remove it?
> } > 
> } > If even the completion system as it is doesn't need it, I think it's a good
> } > bet that commenting out at this stage won't cause any problems.
> } 
> } Here is the patch. Lotsa `#if's.
> 
> I slightly disapprove of using `#if 0' when it's scattered around like
> that.  Suppose we ever want to re-enable it:  How does someone other than
> Sven know which `#if 0' to remove and which ones to leave behind?
> 
> Not a big deal right now because there aren't any other #if in that file,
> but ... perhaps put a comment on each #if line?

No problem either.

Bye
 Sven

Index: Src/Zle/compcore.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compcore.c,v
retrieving revision 1.7
diff -u -r1.7 compcore.c
--- Src/Zle/compcore.c	2000/04/12 13:08:08	1.7
+++ Src/Zle/compcore.c	2000/04/13 08:06:30
@@ -63,6 +63,7 @@
 mod_export int insmnum, insspace;
 
 #if 0
+/* group-numbers in compstate[insert] */
 int insgnum, insgroup; /* mod_export */
 #endif
 
@@ -754,11 +755,13 @@
 	    useline = 2, usemenu = 0;
 	else if (idigit(*compinsert)) {
 #if 0
+	    /* group-numbers in compstate[insert] */
 	    char *m;
 #endif
 	    useline = 1; usemenu = 3;
 	    insmnum = atoi(compinsert);
 #if 0
+	    /* group-numbers in compstate[insert] */
 	    if ((m = strchr(compinsert, ':'))) {
 		insgroup = 1;
 		insgnum = atoi(m + 1);
@@ -778,6 +781,7 @@
 	    if (useline && (p = strchr(compinsert, ':'))) {
 		insmnum = atoi(++p);
 #if 0
+		/* group-numbers in compstate[insert] */
 		if ((p = strchr(p, ':'))) {
 		    insgroup = 1;
 		    insgnum = atoi(p + 1);
@@ -851,6 +855,7 @@
 	isuf = NULL;
 	insmnum = 1;
 #if 0
+	/* group-numbers in compstate[insert] */
 	insgnum = 1;
 	insgroup = 0;
 #endif
Index: Src/Zle/compctl.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compctl.c,v
retrieving revision 1.2
diff -u -r1.2 compctl.c
--- Src/Zle/compctl.c	2000/04/12 09:12:16	1.2
+++ Src/Zle/compctl.c	2000/04/13 08:06:30
@@ -1814,6 +1814,7 @@
 	isuf = NULL;
 	insmnum = 1;
 #if 0
+	/* group-numbers in compstate[insert] */
 	insgnum = 1;
 	insgroup = 0;
 #endif
Index: Src/Zle/compresult.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compresult.c,v
retrieving revision 1.6
diff -u -r1.6 compresult.c
--- Src/Zle/compresult.c	2000/04/13 08:05:57	1.6
+++ Src/Zle/compresult.c	2000/04/13 08:06:31
@@ -1077,6 +1077,7 @@
 	    minfo.cur = NULL;
     }
 #if 0
+    /* group-numbers in compstate[insert] */
     if (insgroup) {
 	insgnum = comp_mod(insgnum, lastpermgnum);
 	for (minfo.group = amatches;
@@ -1101,6 +1102,7 @@
 	    return;
 	}
 #if 0
+	/* group-numbers in compstate[insert] */
     }
 #endif
     mc = (minfo.group)->matches + insmnum;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author