Changeset 389d487


Ignore:
Timestamp:
Oct 17, 2011, 8:12:36 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.9
Children:
db27602, ecfbdcc, 89701bb, a19c9a3
Parents:
ef4074b
git-author:
David Benjamin <davidben@mit.edu> (10/17/11 19:53:16)
git-committer:
David Benjamin <davidben@mit.edu> (10/17/11 20:12:36)
Message:
Switch to interactive context before sourcing the startup file

There are no invariants that don't hold before the previous place we
flip the interactive bit; although default_style is applied afterwards,
there is still a style set before that code.

There is no code which reads the READCONFIG bit, so no behavior should
change from there. Setting the interactive bit makes
owl_function_load{login,}subs noisier, but that's fine. A number of
commands were labeled OWL_CTX_INTERACTIVE, but that doesn't change much
because, unless the command is OWLCMD_*_CTX, the bits are ignored.

What does change is that .owl/startup is allowed to leave with a context
on the stack. In particular, this /finally/ fixes #161.

More fundamentally, this makes .owl/startup identical to the user having
run those commands in succession, which is a nice simplification.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    r3b17b57 r389d487  
    585585  );
    586586
     587  owl_function_debugmsg("startup: setting context interactive");
     588
     589  owl_global_pop_context(&g);
     590  owl_global_push_context(&g, OWL_CTX_INTERACTIVE|OWL_CTX_RECV, NULL, "recv", NULL);
     591
    587592  /* process the startup file */
    588593  owl_function_debugmsg("startup: processing startup file");
     
    596601      owl_function_error("No such style: %s", owl_global_get_default_style(&g));
    597602
    598   owl_function_debugmsg("startup: setting context interactive");
    599 
    600   owl_global_pop_context(&g);
    601   owl_global_push_context(&g, OWL_CTX_INTERACTIVE|OWL_CTX_RECV, NULL, "recv", NULL);
    602 
    603603  source = owl_window_redraw_source_new();
    604604  g_source_attach(source, NULL);
Note: See TracChangeset for help on using the changeset viewer.