commit 94059a4e08514b9fc628cb9ba6006efa62d72d25 Author: Gavin Smith Date: Sun Mar 9 19:18:01 2014 +0000 * session.c (initialize_terminal_and_keymaps, initialize_info_session): Function split out. * info.c (main): Call initialize_terminal_and_keymaps before loading file. This is needed in case a variable in .infokey affects the loading of the file. diff --git a/info.c b/info.c index ec5bcf7..4ba4f41 100644 --- a/info.c +++ b/info.c @@ -721,6 +721,9 @@ There is NO WARRANTY, to the extent permitted by law.\n"), argc -= optind; argv += optind; + /* Load custom key mappings and variable settings */ + initialize_terminal_and_keymaps (); + if (all_matches_p) return all_files (user_filename, argc, argv); diff --git a/session.c b/session.c index 868964e..9240510 100644 --- a/session.c +++ b/session.c @@ -251,10 +251,8 @@ info_read_and_dispatch (void) /* Found in signals.c */ extern void initialize_info_signal_handler (void ); -/* Initialize the first info session by starting the terminal, window, - and display systems. If CLEAR_SCREEN is 0, don't clear the screen. */ void -initialize_info_session (NODE *node, int clear_screen) +initialize_terminal_and_keymaps (void) { char *term_name = getenv ("TERM"); terminal_initialize_terminal (term_name); @@ -268,13 +266,20 @@ initialize_info_session (NODE *node, int clear_screen) exit (EXIT_FAILURE); } + initialize_info_keymaps (); +} + +/* Initialize the first info session by starting the terminal, window, + and display systems. If CLEAR_SCREEN is 0, don't clear the screen. */ +void +initialize_info_session (NODE *node, int clear_screen) +{ if (clear_screen) { terminal_prep_terminal (); terminal_clear_screen (); } - initialize_info_keymaps (); window_initialize_windows (screenwidth, screenheight); initialize_info_signal_handler (); display_initialize_display (screenwidth, screenheight);