From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13665 invoked from network); 15 May 2003 09:17:14 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 May 2003 09:17:14 -0000 Received: (qmail 15784 invoked by alias); 15 May 2003 09:17:06 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18539 Received: (qmail 15769 invoked from network); 15 May 2003 09:17:05 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 15 May 2003 09:17:05 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 15 May 2003 9:17:5 -0000 Received: from exchange01.csr.com (unverified) by (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Thu, 15 May 2003 10:26:58 +0100 Received: from csr.com (tinky-winky.csr.com [192.168.144.127]) by exchange01.csr.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id JWCPZY8Q; Thu, 15 May 2003 10:14:53 +0100 To: zsh-workers@sunsite.dk Subject: Re: Bug#190948: Violation against The Single UNIX ? Specification, Version 2 In-reply-to: "Peter Stephenson"'s message of "Wed, 14 May 2003 15:14:06 BST." <1787.1052921646@csr.com> Date: Thu, 15 May 2003 10:17:03 +0100 Message-ID: <82.1052990223@csr.com> From: Peter Stephenson Peter Stephenson wrote: > +pindex(VI) > +item(tt(VI))( > +If ZLE is loaded, turning on this option has the equivalent effect > +of `tt(bindkey -v)'. In addition, the EMACS option is unset. > +Turning it off has no effect. The option setting is > +not guaranteed to reflect the current keymap. This option is > +provided for compatibility; tt(bindkey) is the recommended interface. > ) Sigh. Doesn't autoload zle, so `set -o vi' before any zle configuration in .zshrc doesn't have any effect. Actually covered by the weasel words at the start of the manual entry, but I think this is one of those occasions where implementing the feature is easier than explaining every time why it doesn't work the way that's expected. By the way, this neighbourhood of init.c contains the comment: /* ZLE entry point pointers. They are defined here because the initial * * values depend on whether ZLE is linked in or not -- if it is, we * * avoid wasting space with the fallback functions. No other source * * file needs to know which modules are linked in. */ Except we don't avoid wasting space with the fallback functions, they are defined unconditionally. Anyone remember what's happening? Index: Src/init.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/init.c,v retrieving revision 1.33 diff -u -r1.33 init.c --- Src/init.c 14 May 2003 15:09:14 -0000 1.33 +++ Src/init.c 15 May 2003 09:12:10 -0000 @@ -1122,11 +1122,12 @@ mod_export ZleVoidIntFn spaceinlineptr = noop_function_int; # ifdef UNLINKED_XMOD_zshQszle mod_export ZleReadFn zlereadptr = autoload_zleread; +mod_export ZleVoidIntFn zlesetkeymapptr = autoload_zlesetkeymap; # else /* !UNLINKED_XMOD_zshQszle */ mod_export ZleReadFn zlereadptr = fallback_zleread; +mod_export ZleVoidIntFn zlesetkeymapptr = noop_function_int; # endif /* !UNLINKED_XMOD_zshQszle */ -mod_export ZleVoidIntFn zlesetkeymapptr = noop_function_int; #endif /* !LINKED_XMOD_zshQszle */ /**/ @@ -1152,6 +1153,16 @@ return (unsigned char *)shingetline(); } + +/**/ +static void +autoload_zlesetkeymap(int mode) +{ + zlesetkeymapptr = noop_function_int; + load_module("zsh/zle"); + (*zlesetkeymapptr)(mode); +} + /* compctl entry point pointers. Similar to the ZLE ones. */ -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************