zsh-workers
 help / color / mirror / code / Atom feed
* Re: PATCH: numeric argument in widgets
@ 1999-03-01 13:25 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-03-01 13:25 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> Sven Wischnowsky wrote:
> > +set_cursor(Param pm, long x)
> 
> that should be `set_numeric'.

Yes, compiled the wrong version...Sorry.

Bye
 Sven

--- os/Zle/zle_params.c	Mon Mar  1 13:20:07 1999
+++ Src/Zle/zle_params.c	Mon Mar  1 14:25:02 1999
@@ -250,7 +250,7 @@
 
 /**/
 static void
-set_cursor(Param pm, long x)
+set_numeric(Param pm, long x)
 {
     zmult = x;
 }

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: numeric argument in widgets
  1999-03-01 12:19 Sven Wischnowsky
@ 1999-03-01 13:07 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-03-01 13:07 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> +set_cursor(Param pm, long x)

that should be `set_numeric'.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* PATCH: numeric argument in widgets
@ 1999-03-01 12:19 Sven Wischnowsky
  1999-03-01 13:07 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-03-01 12:19 UTC (permalink / raw)
  To: zsh-workers


Dunno if you think this is the right way to do it. The patch below
adds the special zle parameter `NUMERIC' which makes the numeric
argument available inside zle widgets. (Should I have used
`NUMERICARG'?)

Bye
 Sven

diff -u os/Zle/zle_params.c Src/Zle/zle_params.c
--- os/Zle/zle_params.c	Mon Mar  1 13:11:31 1999
+++ Src/Zle/zle_params.c	Mon Mar  1 13:16:36 1999
@@ -67,6 +67,8 @@
         zleunsetfn, NULL },
     { "keys", PM_ARRAY | PM_READONLY, NULL, FN(get_keys),
         zleunsetfn, NULL },
+    { "NUMERIC", PM_INTEGER | PM_READONLY, FN(set_numeric), FN(get_numeric),
+        zleunsetfn, NULL },
     { NULL, 0, NULL, NULL, NULL, NULL }
 };
 
@@ -244,4 +246,18 @@
     *q = NULL;
 
     return r;
+}
+
+/**/
+static void
+set_cursor(Param pm, long x)
+{
+    zmult = x;
+}
+
+/**/
+static long
+get_numeric(Param pm)
+{
+    return zmult;
 }
diff -u od/Zsh/zle.yo Doc/Zsh/zle.yo
--- od/Zsh/zle.yo	Mon Mar  1 13:11:46 1999
+++ Doc/Zsh/zle.yo	Mon Mar  1 13:15:19 1999
@@ -154,6 +154,10 @@
 and meta-keys are repoted with a leading `tt(M-)', as in `tt(M-a)' and 
 `tt(M-^A)'.
 )
+vindex(NUMERIC)
+item(tt(NUMERIC) (integer))(
+The numeric argument.
+)
 enditem()
 sect(Standard Widgets)
 cindex(widgets, standard)

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-01 13:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-01 13:25 PATCH: numeric argument in widgets Sven Wischnowsky
  -- strict thread matches above, loose matches on Subject: below --
1999-03-01 12:19 Sven Wischnowsky
1999-03-01 13:07 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).