jed-users mailing list

[2008 Date Index] [2008 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[PATCH] S‐Lang module import: Check for slsh/ before slsh/local-packages


Assuming the parent directory is not present, due to the directory is
missing, is errorprone. The old code didn't look for the directory slsh/
and therefore missed the modules located there, if the directory
slsh/local-packages doesn't exist.
---
 lib/site.sl |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/lib/site.sl b/lib/site.sl
index af4034f..a4cae60 100644
--- a/lib/site.sl
+++ b/lib/site.sl
@@ -3312,7 +3312,7 @@ if (is_defined ("import"))
 	$1 = ();
 	if ($1 == NULL)
 	  continue;
-	$2 = path_concat ($1, "share/slsh/local-packages");
+	$2 = path_concat ($1, "share/slsh");
 	if (2 != file_status ($2))
 	  continue;
 	append_to_slang_load_path ($2);
@@ -3321,12 +3321,15 @@ if (is_defined ("import"))
 	if (2 == file_status ($2))
 	  jed_append_doc_file ($2);
 
-	$2 = path_concat ($1, "share/slsh");
-	append_to_slang_load_path ($2);
-
-	$2 = path_concat ($2, "help");
+	$2 = path_concat ($1, "share/slsh/local-packages");
 	if (2 == file_status ($2))
-	  jed_append_doc_file ($2);
+          {
+            append_to_slang_load_path ($2);
+
+            $2 = path_concat ($2, "help");
+            if (2 == file_status ($2))
+              jed_append_doc_file ($2);
+          }
 
 	break;
      }
-- 
1.5.5.1


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2008 date index] [2008 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]