From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6243 invoked from network); 21 Mar 2005 16:57:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Mar 2005 16:57:44 -0000 Received: (qmail 66838 invoked from network); 21 Mar 2005 16:57:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Mar 2005 16:57:39 -0000 Received: (qmail 18482 invoked by alias); 21 Mar 2005 16:57:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21042 Received: (qmail 18468 invoked from network); 21 Mar 2005 16:57:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Mar 2005 16:57:34 -0000 Received: (qmail 66517 invoked from network); 21 Mar 2005 16:57:34 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 21 Mar 2005 16:57:23 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 21 Mar 2005 16:55:48 +0000 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 21 Mar 2005 16:59:23 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j2LGvLxA015429 for ; Mon, 21 Mar 2005 16:57:21 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j2LGvKqW015426 for ; Mon, 21 Mar 2005 16:57:21 GMT Message-Id: <200503211657.j2LGvKqW015426@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Can't redefine execute-named-cmd ?? In-reply-to: <1050321161151.ZM12393@candle.brasslantern.com> References: <1050321015030.ZM11555@candle.brasslantern.com> <200503211113.j2LBDYRI006513@news01.csr.com> <1050321161151.ZM12393@candle.brasslantern.com> Date: Mon, 21 Mar 2005 16:57:20 +0000 From: Peter Stephenson X-OriginalArrivalTime: 21 Mar 2005 16:59:23.0912 (UTC) FILETIME=[554D1080:01C52E37] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 Bart Schaefer wrote: > On Mar 21, 11:13am, Peter Stephenson wrote: > } > } execute-named-command as well as the isearch commands have horribly > } incestuous ways of using key bindings. > > Obviously so, but what does that have to do with the inability to > redefine it? It's kludged into getkeycmd() in a horrible way. It doesn't have its own separate widget; it simply gets recognised when we try to read a command from keystrokes, and the resulting command read by executenamedcommand() is returned instead. It's the same for execute-last-named-command. > And why does it cause a crash when calling it by name > with "zle execute-named-cmd"? Because it doesn't work like a proper widget, the value of the function is set to NULL. This isn't handled. Until someone can de-kludge it, the best we can do is test for the NULL and document the limitations. Index: Doc/Zsh/zle.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v retrieving revision 1.45 diff -u -r1.45 zle.yo --- Doc/Zsh/zle.yo 16 Nov 2004 19:06:40 -0000 1.45 +++ Doc/Zsh/zle.yo 21 Mar 2005 16:55:22 -0000 @@ -1670,10 +1670,14 @@ Any other character that is not bound to tt(self-insert) or tt(self-insert-unmeta) will beep and be ignored. The bindings of the current insert mode will be used. + +Currently this command may not be redefined or called by name. ) tindex(execute-last-named-cmd) item(tt(execute-last-named-cmd) (ESC-z) (unbound) (unbound))( Redo the last function executed with tt(execute-named-cmd). + +Currently this command may not be redefined or called by name. ) tindex(get-line) item(tt(get-line) (ESC-G ESC-g) (unbound) (unbound))( Index: Src/Zle/zle_main.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v retrieving revision 1.65 diff -u -r1.65 zle_main.c --- Src/Zle/zle_main.c 15 Mar 2005 10:51:04 -0000 1.65 +++ Src/Zle/zle_main.c 21 Mar 2005 16:55:22 -0000 @@ -1053,6 +1053,8 @@ ret = completecall(args); if (atcurhist) histline = curhist; + } else if (!w->u.fn) { + handlefeep(zlenoargs); } else { queue_signals(); ret = w->u.fn(args); -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, 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. **********************************************************************