Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Wordcode functions with empty bodies
- X-seq: zsh-workers 11902
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Wordcode functions with empty bodies
- Date: Wed, 14 Jun 2000 16:17:53 +0100
- In-reply-to: "Your message of Wed, 14 Jun 2000 16:08:40 BST." <0FW500762GQFIK@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> In principle, the trap test should already pick this sort of thing up, it
> just didn't crash often enough. More DPUTS()'s are probably the answer to
> similar future problems.
Even so, it might be better to add this. Does anyone have a better
version?
By the way, this answers a previous question of Bart's --- function traps
should be removed from the function table when localtraps is set.
Index: Test/08traps.ztst
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/08traps.ztst,v
retrieving revision 1.3
diff -u -r1.3 08traps.ztst
--- Test/08traps.ztst 2000/05/04 11:46:20 1.3
+++ Test/08traps.ztst 2000/06/14 15:15:18
@@ -175,3 +175,12 @@
>testunset
>f
>ERR-or!
+
+ f() {
+ setopt localtraps
+ TRAPWINCH() { print "Window changed. That wrecked the test."; }
+ }
+ f
+ f
+ functions TRAPWINCH
+1:Unsetting ordinary traps with localtraps.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author