changeset 6917:58b1a9e96037

[project @ 2007-09-19 20:45:13 by jwe]
author jwe
date Wed, 19 Sep 2007 20:45:13 +0000
parents b84be419beab
children dcd384e73cbe
files liboctave/ChangeLog liboctave/cmd-edit.cc
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog	Wed Sep 19 19:54:13 2007 +0000
+++ b/liboctave/ChangeLog	Wed Sep 19 20:45:13 2007 +0000
@@ -2,6 +2,8 @@
 
 	* cmd-edit.cc (command_editor::remove_startup_hook):
 	Fix cut-and-paste error.
+	(gnu_readline::set_startup_hook): Only set hook function if new
+	function is different from the current one.
 
 2007-09-18  John W. Eaton  <jwe@octave.org>
 
--- a/liboctave/cmd-edit.cc	Wed Sep 19 19:54:13 2007 +0000
+++ b/liboctave/cmd-edit.cc	Wed Sep 19 20:45:13 2007 +0000
@@ -403,7 +403,8 @@
 {
   previous_startup_hook = ::octave_rl_get_startup_hook ();
 
-  ::octave_rl_set_startup_hook (f);
+  if (f != previous_startup_hook)
+    ::octave_rl_set_startup_hook (f);
 }
 
 void