changeset 19636:f3ac54ac2c6a

also skip startup message if session is not interactive * octave.cc (octave_initialize_interpreter): If session is not interactive or forced interactive, set inhibit_startup_message to true.
author John W. Eaton <jwe@octave.org>
date Wed, 21 Jan 2015 12:36:25 -0500
parents 228cfaf24208
children b74ae93040e8
files libinterp/octave.cc
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/octave.cc	Wed Jan 21 12:18:53 2015 -0500
+++ b/libinterp/octave.cc	Wed Jan 21 12:36:25 2015 -0500
@@ -710,10 +710,6 @@
 
       octave_print_terse_usage_and_exit ();
     }
-
-  // Don't print start-up message when directly executing a script
-  if (! code_to_eval.empty () || script_file)
-    inhibit_startup_message = true;
 }
 
 // EMBEDDED is declared int instead of bool because this function is
@@ -798,6 +794,10 @@
   if (! interactive && ! forced_line_editing)
     line_editing = false;
 
+  // Also skip start-up message unless session is interactive.
+  if (! (interactive || forced_interactive))
+    inhibit_startup_message = true;
+
   // Force default line editor if we don't want readline editing.
   if (! line_editing)
     command_editor::force_default_editor ();