From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22683 invoked from network); 8 Sep 2004 14:23:36 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Sep 2004 14:23:36 -0000 Received: (qmail 60462 invoked from network); 8 Sep 2004 14:23:30 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Sep 2004 14:23:30 -0000 Received: (qmail 4144 invoked by alias); 8 Sep 2004 14:23:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20330 Received: (qmail 4133 invoked from network); 8 Sep 2004 14:23:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Sep 2004 14:23:18 -0000 Received: (qmail 60134 invoked from network); 8 Sep 2004 14:23:18 -0000 Received: from lhuumrelay3.lnd.ops.eu.uu.net (62.189.58.19) by a.mx.sunsite.dk with SMTP; 8 Sep 2004 14:23:17 -0000 Received: from MAILSWEEPER01.csr.com (mailhost1.csr.com [62.189.183.235]) by lhuumrelay3.lnd.ops.eu.uu.net (8.11.0/8.11.0) with ESMTP id i88ENFv16978 for ; Wed, 8 Sep 2004 14:23:16 GMT Received: from EXCHANGE02.csr.com (unverified [192.168.137.45]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 8 Sep 2004 15:22:22 +0100 Received: from news01.csr.com ([192.168.143.38]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 8 Sep 2004 15:24:13 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.12.11/8.12.11) with ESMTP id i88EN5tV008969 for ; Wed, 8 Sep 2004 15:23:06 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.12.11/8.12.11/Submit) with ESMTP id i88EN5wS008966 for ; Wed, 8 Sep 2004 15:23:05 +0100 Message-Id: <200409081423.i88EN5wS008966@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: zsh exits after delete-char-or-list and two ^Cs In-reply-to: References: <200409020919.i829J0eC012233@news01.csr.com> <200409030937.i839bJxR018972@news01.csr.com> Date: Wed, 08 Sep 2004 15:23:05 +0100 From: Peter Stephenson X-OriginalArrivalTime: 08 Sep 2004 14:24:13.0267 (UTC) FILETIME=[8395E230:01C495AF] X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 This rearranges the status. Most of this is just clarification. I move documentation for calling zle on its own to the top, since it was a bit buried. Index: Doc/Zsh/zle.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v retrieving revision 1.40 diff -u -r1.40 zle.yo --- Doc/Zsh/zle.yo 2 Sep 2004 14:34:39 -0000 1.40 +++ Doc/Zsh/zle.yo 8 Sep 2004 14:20:18 -0000 @@ -312,6 +312,7 @@ cindex(calling widgets) cindex(widgets, defining) cindex(defining widgets) +xitem(tt(zle)) xitem(tt(zle) tt(-l) [ tt(-L) | tt(-a) ] [ var(string) ... ]) xitem(tt(zle) tt(-D) var(widget) ...) xitem(tt(zle) tt(-A) var(old-widget) var(new-widget)) @@ -323,10 +324,18 @@ xitem(tt(zle) tt(-K) var(keymap)) xitem(tt(zle) tt(-F) [ tt(-L) ] [ var(fd) [ var(handler) ] ]) xitem(tt(zle) tt(-I)) -xitem(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...) -item(tt(zle))( +item(tt(zle) var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)( The tt(zle) builtin performs a number of different actions concerning -ZLE. Which operation it performs depends on its options: +ZLE. + +With no options and no arguments, only the return status will be +set. It is zero if ZLE is currently active and widgets could be +invoked using this builtin command and non-zero otherwise. +Note that even if non-zero status is returned, zle may still be active as +part of the completion system; this does not allow direct calls to ZLE +widgets. + +Otherwise, which operation it performs depends on its options: startitem() item(tt(-l) [ tt(-L) | tt(-a) ])( @@ -392,7 +401,9 @@ This command can safely be called outside user defined widgets; if zle is active, the display will be refreshed, while if zle is not active, the command has no effect. In this case there will usually be no other -arguments. The status is zero if zle was active, else one. +arguments. + +The status is zero if zle was active, else one. ) item(tt(-M) var(string))( As with the tt(-R) option, the var(string) will be displayed below the @@ -505,12 +516,10 @@ Note that there are normally better ways of manipulating the display from within zle widgets; see, for example, `tt(zle -R)' above. -The returned status is zero if a zle widget can be called immediately. -Note this is independent of whether the display has been invalidated. -For example, if a completion widget is active a zle widget cannot be used -and the status is one even if the display was invalidated; on the other -hand, the status may be zero if the display was invalidated by a previous -call to `tt(zle -I)'. +The returned status is zero if zle was invalidated, even though +this may have been by a previous call to `tt(zle -I)' or by a system +notification. To test if a zle widget may be called at this point, execute +tt(zle) with no arguments and examine the return status. ) item(var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)( Invoke the specified widget. This can only be done when ZLE is @@ -540,10 +549,6 @@ it should call the tt(beep) widget directly. ) enditem() - -With no options and no arguments, only the return status will be -set. It is zero if ZLE is currently active and widgets could be -invoked using this builtin command and non-zero if ZLE is not active. ) enditem() Index: Src/Zle/zle_thingy.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_thingy.c,v retrieving revision 1.14 diff -u -r1.14 zle_thingy.c --- Src/Zle/zle_thingy.c 2 Sep 2004 14:34:39 -0000 1.14 +++ Src/Zle/zle_thingy.c 8 Sep 2004 14:20:21 -0000 @@ -709,7 +709,7 @@ if (zleactive) { if (!trashedzle) trashzle(); - return !zle_usable(); + return 0; } else return 1; } -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************