From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6799 invoked from network); 5 Dec 1998 04:42:15 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 5 Dec 1998 04:42:15 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id XAA07988; Fri, 4 Dec 1998 23:38:08 -0500 (EST) Resent-Date: Fri, 4 Dec 1998 23:38:08 -0500 (EST) From: "Bart Schaefer" Message-Id: <981204203644.ZM22183@candle.brasslantern.com> Date: Fri, 4 Dec 1998 20:36:44 -0800 In-Reply-To: <19981205025521.27213@athenaeum.demon.co.uk> Comments: In reply to Phil Pennock "PATCH: WORDCHARS and emulate" (Dec 5, 2:55am) References: <19981205025521.27213@athenaeum.demon.co.uk> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Phil Pennock , Zsh Development Workers Subject: Re: PATCH: WORDCHARS and emulate MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"m0s1x3.0.ly1.lYBQs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4705 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 5, 2:55am, Phil Pennock wrote: } Subject: PATCH: WORDCHARS and emulate } } This patch sets wordchars on startup according to emulation mode and } resets it upon an 'emulate' command. Yes, it gets totally clobbered by } emulate. This is not a reasonable side-effect of "emulate." LOTS of shell functions, including those in the zsh distribution that are used for completions etc., call "emulate". If it's going to change anything like WORDCHARS, it has to save it and restore it when the emulation mode ceases to be in effect. And since the only thing that tracks emulation mode is "setopt localoptions", it's in effect impossible to save and restore anything other than options during emulation. So you could conceivably do this by having an option to turn WORDCHARS on and off, and arrange that "emulate -R" always unsets that option; and then have values for the internal wordchars array that are independent of the WORDCHARS variable and which get switched in depending on the emulation. But you can't stomp WORDCHARS itself. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com