Index: trunk/SRC/ToBeReviewed/POSTSCRIPT/ps.pro
===================================================================
--- trunk/SRC/ToBeReviewed/POSTSCRIPT/ps.pro	(revision 228)
+++ trunk/SRC/ToBeReviewed/POSTSCRIPT/ps.pro	(revision 229)
@@ -88,9 +88,8 @@
 ; We rewrite idlsave.pro
    putfile, myuniquetmpdir+'idlsave.pro', vectjournal
+; update the list of .pro and .sav in !PATH
+   path_cache, /rebuild
 ; apply idlsave
-   cd,  current = curdir
-   cd, myuniquetmpdir
 @idlsave   
-   cd, curdir
 ; We reopen the journal and we put in it all elements of vectjournal but the 2 first and the 3 last line.
 journal, myuniquetmpdir+'idlsave.pro'
Index: trunk/SRC/ToBeReviewed/UTILITAIRE/oups.pro
===================================================================
--- trunk/SRC/ToBeReviewed/UTILITAIRE/oups.pro	(revision 228)
+++ trunk/SRC/ToBeReviewed/UTILITAIRE/oups.pro	(revision 229)
@@ -65,10 +65,9 @@
  ELSE vectjournal[n_elements(vectjournal)-1] = '' 
 ; we rewrite idlsave.pro
-putfile, myuniquetmpdir+'idlsave.pro', vectjournal
-; we compile, then we apply idlsave
-cd,  current = curdir
-cd, myuniquetmpdir
+ putfile, myuniquetmpdir+'idlsave.pro', vectjournal
+; update the list of .pro and .sav in !PATH
+ path_cache, /rebuild
+; apply idlsave
 @idlsave   
-cd, curdir
 ; the journal has just been reopened, and we put elements of vectjournal in it. 
 for i = 0, n_elements(vectjournal)-1 DO $
Index: trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro
===================================================================
--- trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro	(revision 228)
+++ trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro	(revision 229)
@@ -70,10 +70,9 @@
 ;
 ; we rewrite idlsave.pro
-putfile, myuniquetmpdir+'idlsave.pro', vectjournal
+  putfile, myuniquetmpdir+'idlsave.pro', vectjournal
+; update the list of .pro and .sav in !PATH
+   path_cache, /rebuild
 ; apply idlsave
-   cd,  current = curdir
-   cd, myuniquetmpdir
 @idlsave   
-   cd, curdir
 ; the journal has just been reopened, and we put in elements of vectjournal. 
 for i = 0, n_elements(vectjournal)-1 DO $
Index: trunk/SRC/Utilities/createfunc.pro
===================================================================
--- trunk/SRC/Utilities/createfunc.pro	(revision 228)
+++ trunk/SRC/Utilities/createfunc.pro	(revision 229)
@@ -69,9 +69,13 @@
                        , 'return, res' $
                        , 'end']
-; go in dirname directory
-   cd, dirname, current = old_dir
+; is dirname in !path?
+   cd, current = here
+   pathlist = [here, strsplit(!path, path_sep(/search_path),/extract)]
+   inpath = total((file_search(dirname))[0] EQ pathlist)
+   IF inpath EQ 0 THEN !path = !path + path_sep(/search_path) + inpath
+; update the list of .pro and .sav in !PATH
+   path_cache, /rebuild
 ; compile it
    resolve_routine, shortfilename, /is_function
-   cd, old_dir
 ; execute it
    res = call_function(shortfilename, _EXTRA = ex)
Index: trunk/SRC/Utilities/createpro.pro
===================================================================
--- trunk/SRC/Utilities/createpro.pro	(revision 228)
+++ trunk/SRC/Utilities/createpro.pro	(revision 229)
@@ -79,4 +79,9 @@
    putfile, filename, ['pro ' + shortfilename + kwdlist $
                        , 'compile_opt idl2, hidden, strictarrsubs', command, 'return', 'end']
+; is dirname in !path?
+   cd, current = here
+   pathlist = [here, strsplit(!path, path_sep(/search_path),/extract)]
+   inpath = total((file_search(dirname))[0] EQ pathlist)
+   IF inpath EQ 0 THEN !path = !path + path_sep(/search_path) + inpath
 ; update the list of .pro and .sav in !PATH
    path_cache, /rebuild
Index: trunk/SRC/buildinit.pro
===================================================================
--- trunk/SRC/buildinit.pro	(revision 228)
+++ trunk/SRC/buildinit.pro	(revision 229)
@@ -488,6 +488,6 @@
 ; define the !path
   init = [init, '!path = expand_path(''+'' + '''+myIDL+''') $' $
-          , '      + '':'' + expand_path(''+'' + '''+saxodir+''') $' $
-          , '      + '':'' + expand_path(''+'' + !dir)']
+          , '      + path_sep(/search_path) + expand_path(''+'' + '''+saxodir+''') $' $
+          , '      + path_sep(/search_path) + expand_path(''+'' + !dir)']
 ;
 ; should we keep the compatibility with the old version?
