From: "Bart Schaefer" <schaefer@brasslantern.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: PATCH: 3.0.5: Re: PATCH: zsh-3.1.5-pws-7: emulate locally
Date: Wed, 10 Feb 1999 09:24:17 -0800 [thread overview]
Message-ID: <990210092417.ZM5236@candle.brasslantern.com> (raw)
In-Reply-To: <9902101654.AA46271@ibmth.df.unipi.it>
On Feb 10, 5:54pm, Peter Stephenson wrote:
} Subject: PATCH: zsh-3.1.5-pws-7: emulate locally
}
} When using `emulate' in a shell function to ensure the correct
} environment, it's a good habit to make sure the effect is local by
} setting localoptions. To encourage this good habit, I thought perhaps
} it might be sensible to have an option -L to emulate itself
Here's the same patch against 3.0.5 (lacking doc, unfortunately).
Index: Src/builtin.c
===================================================================
--- builtin.c 1999/01/15 16:39:06 1.11
+++ builtin.c 1999/02/10 17:21:08
@@ -4768,6 +4768,8 @@
bin_emulate(char *nam, char **argv, char *ops, int func)
{
emulate(*argv, ops['R']);
+ if (ops['L'])
+ dosetopt(LOCALOPTIONS, 1, 0);
return 0;
}
Index: Src/hashtable.h
===================================================================
--- hashtable.h 1997/06/27 19:18:21 1.3
+++ hashtable.h 1999/02/10 17:21:22
@@ -271,7 +271,7 @@
{NULL, "disown", 0, bin_fg, 0, -1, BIN_DISOWN, NULL, NULL},
{NULL, "echo", BINF_PRINTOPTS | BINF_ECHOPTS, bin_print, 0, -1, BIN_ECHO, "neE", "-"},
{NULL, "echotc", 0, bin_echotc, 1, -1, 0, NULL, NULL},
- {NULL, "emulate", 0, bin_emulate, 1, 1, 0, "R", NULL},
+ {NULL, "emulate", 0, bin_emulate, 1, 1, 0, "LR", NULL},
{NULL, "enable", 0, bin_enable, 0, -1, BIN_ENABLE, "afmr", NULL},
{NULL, "eval", BINF_PSPECIAL, bin_eval, 0, -1, BIN_EVAL, NULL, NULL},
{NULL, "exit", BINF_PSPECIAL, bin_break, 0, 1, BIN_EXIT, NULL, NULL},
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
prev parent reply other threads:[~1999-02-10 17:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-10 16:54 Peter Stephenson
1999-02-10 17:24 ` Bart Schaefer [this message]
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=990210092417.ZM5236@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.auc.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).