diff src/defun.cc @ 5397:b12c0f920da0

[project @ 2005-06-17 07:52:28 by jwe]
author jwe
date Fri, 17 Jun 2005 07:52:28 +0000
parents 4c8a2e4e0717
children db34dff19947
line wrap: on
line diff
--- a/src/defun.cc	Fri Jun 17 04:10:53 2005 +0000
+++ b/src/defun.cc	Fri Jun 17 07:52:28 2005 +0000
@@ -154,8 +154,14 @@
   sym_rec->unprotect ();
   sym_rec->define (new octave_dld_function (f, shl, name, doc), t);
   sym_rec->document (doc);
-  sym_rec->make_eternal ();
-  sym_rec->protect ();
+
+  // Also insert the full name in the symbol table.  This way, we can
+  // properly cope with changes to LOADPATH.
+
+  symbol_record *full_sr = fbi_sym_tab->lookup (shl.file_name (), true);
+
+  full_sr->alias (sym_rec, true);
+  full_sr->hide ();
 }
 
 void