zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: PATCH: sticky emulation
Date: Tue, 10 Feb 2009 19:18:04 -0800	[thread overview]
Message-ID: <090210191804.ZM7110@torch.brasslantern.com> (raw)
In-Reply-To: <18952.1234307021@pws-pc>

On Feb 10, 11:03pm, Peter Stephenson wrote:
} Subject: PATCH: sticky emulation
}
} This is how I envision (and have already described, at least briefly)
} sticky emulation for functions working.

This all seems quite reasonable to me, particularly because the
implementation appears to be a straightforward change to the code --
tends to imply that it fits naturally into the existing semantics.

Nit-pick:  The patch to Src/hashtable.c is a no-op.

} Note that sticky emulation is not propagated to autoloaded functions,
} neither when the autoload is set up nor when they are loaded

What about zcompiled functions?  Obviously there's no special case for
them, but their treatment may be worth explanation at doc time.

} - Sticky emulation does not cause options to be saved and reset while
} executing another function with the same sticky emulation.

I think this is fine.

} - Functions without sticky emulation are not specially handled, so are
} entered with no option changes, and do not have options reset on
} exit except as normal shell handling, e.g. LOCAL_OPTIONS.

I wouldn't expect this to behave any differently.

} Someone can probably tell me if I should be keeping the RESTRICTED
} and PRIVILEGED options when restoring options after executing a sticky
} function, as for LOCAL_OPTIONS handling but not as for "emulate"; my
} brain hurts.  I think the answer is "no" because it looks more like the
} latter case than the former, but it may not be that simple.

I think "no" is also the right answer; I've always been a little puzzled
about why those were made exceptions to LOCAL_OPTIONS.  I think the
answer to the latter is related to the fact that there's otherwise no
way to force *any* option to persist across LOCAL_OPTIONS.


  reply	other threads:[~2009-02-11  3:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10 23:03 Peter Stephenson
2009-02-11  3:18 ` Bart Schaefer [this message]
2009-02-11 20:28   ` Peter Stephenson
2009-02-11 23:37     ` Bart Schaefer
2009-02-12  9:44       ` Peter Stephenson
2009-02-12 10:10         ` Oliver Kiddle
2009-02-12 15:30           ` Peter Stephenson
2009-02-12 15:41           ` Bart Schaefer
2009-02-12 15:32         ` Bart Schaefer
2009-02-12  2:23     ` 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=090210191804.ZM7110@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).