about summary refs log tree commit diff
path: root/Src/options.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-10-11 20:14:01 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-10-11 20:14:01 +0000
commit4b86cc48f704152ccca13c50bc3acd59b4217ecc (patch)
treecfae43df67e766bd504da4a287a5e9307c931a60 /Src/options.c
parentad92cb3203e5d95be91019633e8f1f5835b12794 (diff)
downloadzsh-4b86cc48f704152ccca13c50bc3acd59b4217ecc.tar.gz
zsh-4b86cc48f704152ccca13c50bc3acd59b4217ecc.tar.xz
zsh-4b86cc48f704152ccca13c50bc3acd59b4217ecc.zip
30726: make shell options passed to emulate stick along with the emulation
Diffstat (limited to 'Src/options.c')
-rw-r--r--Src/options.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/Src/options.c b/Src/options.c
index 87e9abe2d..80fef3d00 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -35,29 +35,21 @@
 /**/
 mod_export int emulation;
  
-/* current sticky emulation:  0 means none */
+/* current sticky emulation:  sticky = NULL means none */
 
 /**/
-mod_export int sticky_emulation;
+mod_export Emulation_options sticky;
 
 /* the options; e.g. if opts[SHGLOB] != 0, SH_GLOB is turned on */
- 
+
 /**/
 mod_export char opts[OPT_SIZE];
 
-/*
- * the options that need setting for current sticky emulation, if any:
- * same format as opts.
- */
-
-/**/
-mod_export char sticky_opts[OPT_SIZE];
- 
 /* Option name hash table */
 
 /**/
 mod_export HashTable optiontab;
- 
+
 /* The canonical option name table */
 
 #define OPT_CSH		EMULATE_CSH
@@ -786,7 +778,7 @@ dosetopt(int optno, int value, int force, char *new_opts)
 	    return -1;
 #endif /* GETPWNAM_FAKED */
     } else if ((optno == EMACSMODE || optno == VIMODE) && value) {
-	if (sticky_emulation)
+	if (sticky && sticky->emulation)
 	    return -1;
 	zleentry(ZLE_CMD_SET_KEYMAP, optno);
 	new_opts[(optno == EMACSMODE) ? VIMODE : EMACSMODE] = 0;