zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: numeric argument in widgets
Date: Mon, 1 Mar 1999 13:19:06 +0100 (MET)	[thread overview]
Message-ID: <199903011219.NAA14496@beta.informatik.hu-berlin.de> (raw)


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


             reply	other threads:[~1999-03-01 12:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-01 12:19 Sven Wischnowsky [this message]
1999-03-01 13:07 ` Peter Stephenson
1999-03-01 13:25 Sven Wischnowsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199903011219.NAA14496@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).