zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: Re: more dependencies on emulation
Date: Fri, 19 Jul 1996 15:26:10 +0100 (BST)	[thread overview]
Message-ID: <11149.199607191426@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <960718194451.ZM784@candle.brasslantern.com> from "Bart Schaefer" at Jul 18, 96 07:44:51 pm

>Actually, the only options that make this difficult are those that (1)
>affect non-interactive behavior and (2) are not tied to an emulation.
>As long as the "emulate" command sets/unsets all the appropriately-
>tagged options, you can always do:
>
>	zshfoo() {
>	    setopt localoptions
>	    emulate zsh
>	    # Now do stuff using default zsh settings
>	}
>
>Note, though, that for this to work "emulate" should never turn OFF
>localoptions -- I note that it turns it ON for ksh, so right now it
>probably also turns it off sometimes.

This one's easy.  Execute emulate BEFORE setting localoptions.  The
setting of localoptions at the *end* of the function is what determines
which options are restored.

I hadn't considered that use of emulation before.  Do you think maybe
the emulation mode should be restored by localoptions in the way
options are?  Even after my patches, the emulation does have some
direct effect -- the single-letter option names.  I don't think that
should be changed.

-zefram



  reply	other threads:[~1996-07-19 14:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-18 14:23 Zefram
1996-07-18 22:18 ` Bart Schaefer
1996-07-19  1:34   ` Zoltan Hidvegi
1996-07-19  2:59     ` Bart Schaefer
1996-07-19 14:21       ` Zefram
1996-07-19 14:17     ` Zefram
1996-07-19 14:07   ` Zefram
1996-07-19  0:12 ` Zoltan Hidvegi
1996-07-19  2:44   ` Bart Schaefer
1996-07-19 14:26     ` Zefram [this message]
1996-07-19 18:14       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11149.199607191426@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).