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

PATCH: cleanup



This contains mostly cleanups for the manual stuff.

But it also contains some hunks to put `funcall' in its own file (and
naming that `_funcall', of course).


And reading the whole of compsys.yo again, it made ne notice that we
really need another name instead of `tags' because that's already used
for the `#compdef' and `#autoload' things.


And a question: as I already said, I'd like to change the name of the
`description' style to `verbose' But there are other turned-into-styles
config keys which could do with a bit of cleanup. For example we could 
use the `accept' style use seperate string instead of that ugly `2n!'
stuff. And we could change styles like `menu' to use separate words,
too, instead of the `*whatever*' test we have now, or, probably
better, we could try to split some of the styles into multiple styles
with better names. And we could turn styles like `insert' into boolean 
types. Finally we could think about styles that are used like
`last-prompt' but turn on menu-completion, -selection, and the
listing-options.

The question is: is now the right time for such changes or should we
wait until we all have gotten used to the styles stuff?

Bye
 Sven

diff -u oldsrc/Zle/compcore.c Src/Zle/compcore.c
--- oldsrc/Zle/compcore.c	Wed Nov  3 12:53:50 1999
+++ Src/Zle/compcore.c	Thu Nov  4 11:23:30 1999
@@ -428,7 +428,7 @@
     /* If we are doing a menu-completion... */
 
     if (menucmp && *lst != COMP_LIST_EXPAND && 
-	(!compwidget || compwidget == lastcompwidget)) {
+	(menucmp != 1 || !compwidget || compwidget == lastcompwidget)) {
 	do_menucmp(*lst);
 	return 1;
     }
diff -u oldsrc/Zle/complist.c Src/Zle/complist.c
--- oldsrc/Zle/complist.c	Wed Nov  3 12:53:50 1999
+++ Src/Zle/complist.c	Thu Nov  4 11:30:04 1999
@@ -545,7 +545,7 @@
     Cmgroup *pg;
     Thingy cmd;
     Menustack u = NULL;
-    int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl;
+    int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl, wasnext = 0;
     char *s;
 
     HEAPALLOC {
@@ -591,7 +591,7 @@
 		while (mcol < mcols - 1 && p[1] == minfo.cur)
 		    mcol++, p++, pg++;
 	    }
-	    setwish = 0;
+	    setwish = wasnext = 0;
 
 	getk:
 
@@ -634,7 +634,7 @@
 		}
 		clearlist = listshown = 1;
 		mselect = (*(minfo.cur))->gnum;
-		setwish = 1;
+		setwish = wasnext = 1;
 		continue;
 	    } else if (cmd == Th(z_acceptandhold) ||
 		       cmd == Th(z_acceptandmenucomplete)) {
@@ -858,6 +858,11 @@
 	if (acc) {
 	    menucmp = lastambig = hasoldlist = 0;
 	    do_single(*(minfo.cur));
+	}
+	if (wasnext) {
+	    menucmp = 2;
+	    showinglist = -2;
+	    minfo.asked = 0;
 	}
 	if (!noselect) {
 	    showinglist = -2;
diff -u oldsrc/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- oldsrc/Zle/zle_tricky.c	Wed Nov  3 12:53:51 1999
+++ Src/Zle/zle_tricky.c	Thu Nov  4 11:24:49 1999
@@ -77,7 +77,8 @@
 /**/
 int usemenu, useglob;
 
-/* != 0 if we are in the middle of a menu completion. */
+/* != 0 if we are in the middle of a menu completion. May be == 2 to force *
+ * menu completion even if using different widgets.                        */
 
 /**/
 int menucmp;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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