Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suppress print_exit_value for single function
- X-seq: zsh-workers 42751
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: undisclosed-recipients:;
- Subject: Re: Suppress print_exit_value for single function
- Date: Tue, 8 May 2018 10:00:21 +0100
- Cc: Zsh hackers' list <zsh-workers@xxxxxxx>
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180508090025euoutp01281e3b3fb2981f18a8ff9f9b2ddf0c14~sn8EUNVWD0518605186euoutp01L
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1525770025; bh=s2KkXZ0GryMJgDgVXTpD2yl28rVooHBz1v69xIeHjdc=; h=To:Date:From:CC:Subject:In-Reply-To:References:From; b=t1g8Na5p10Q4K4xhwzpLKZuo51GpRdQh5SfTyStFBvuwLx+ebUn27nix1PJ3kedZk JWLpqNTREnjeBHAeLPe3TWJZru2xLo5j/j51OuwadXhSOegj+017tU10H/3df+GncQ XIc2285Z2ZBQ+a1Bq++AxOcUig4UCdTlqZNNDChA=
- In-reply-to: <20180505151054.k4iwezfirs3uemsk@tarpaulin.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: SCSC
- References: <CAKc7PVBUGJqa19ix_qwDE+mtvTwYfZPfQ4LPNfUT67jGtFZx7w@mail.gmail.com> <CGME20180505151944epcas2p14b4a04a95c5f7bb72551262550bad88b@epcas2p1.samsung.com> <20180505151054.k4iwezfirs3uemsk@tarpaulin.shahaf.local2>
On Sat, 5 May 2018 15:10:54 +0000
Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> So, isn't the answer to that to teach the C code not to write the
> return value of a sched function to the global value of $? — but to
> keep printing printexitvalue warnings for sched functions?
Hook functions and the like are supposed to do this --- but I think when
I added the ability to run sched on a timer maintained by the line
editor, instead of just before a prompt as used to happen before that,
this got lost.
pws
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index be2b062..b78c47e 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -631,6 +631,8 @@ raw_getbyte(long do_keytmout, char *cptr)
continue;
}
if (selret == 0) {
+ zlong save_lastval;
+
/*
* Nothing ready and no error, so we timed out.
*/
@@ -648,6 +650,7 @@ raw_getbyte(long do_keytmout, char *cptr)
break;
case ZTM_FUNC:
+ save_lastval = lastval;
while (firstnode(timedfns)) {
Timedfn tfdat = (Timedfn)getdata(firstnode(timedfns));
/*
@@ -661,6 +664,7 @@ raw_getbyte(long do_keytmout, char *cptr)
break;
tfdat->func();
}
+ lastval = save_lastval;
/* Function may have messed up the display */
if (resetneeded)
zrefresh();
Messages sorted by:
Reverse Date,
Date,
Thread,
Author