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

Re: zleparameter module strangeness



Bart Schaefer wrote:

> Execute the command "set" and look at the value reported for "widgets".

I forgot to make a diff for `zleparameter' for 8474.

Bye
 Sven

diff -u oldsrc/Zle/zleparameter.c Src/Zle/zleparameter.c
--- oldsrc/Zle/zleparameter.c	Wed Nov  3 10:25:43 1999
+++ Src/Zle/zleparameter.c	Wed Nov  3 11:42:30 1999
@@ -146,7 +146,8 @@
 	for (hn = thingytab->nodes[i]; hn; hn = hn->next) {
 	    pm.nam = hn->nam;
 	    if (func != scancountparams &&
-		(flags & (SCANPM_WANTVALS|SCANPM_MATCHVAL)))
+		((flags & (SCANPM_WANTVALS|SCANPM_MATCHVAL)) ||
+		 !(flags & SCANPM_WANTKEYS)))
 		pm.u.str = widgetstr(((Thingy) hn)->widget);
 	    func((HashNode) &pm, flags);
 	}
@@ -189,7 +190,7 @@
     { "widgets", PM_READONLY,
       getpmwidgets, scanpmwidgets, hashsetfn,
       NULL, NULL, stdunsetfn, NULL },
-    { "keymaps", PM_ARRAY|PM_HIDE|PM_SPECIAL|PM_READONLY,
+    { "keymaps", PM_ARRAY|PM_SPECIAL|PM_READONLY,
       NULL, NULL, NULL,
       arrsetfn, keymapsgetfn, stdunsetfn, NULL },
     { NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
@@ -219,7 +220,7 @@
 	    if (def->hsetfn)
 		def->pm->sets.hfn = def->hsetfn;
 	} else {
-	    if (!(def->pm = createparam(def->name, def->flags)))
+	    if (!(def->pm = createparam(def->name, def->flags | PM_HIDE)))
 		return 1;
 	    def->pm->sets.afn = def->setfn;
 	    def->pm->gets.afn = def->getfn;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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