From 714570912d678c10f4aa4b6a6692d958e0fc7fe7 Mon Sep 17 00:00:00 2001
From: Siri Hansen
Date: Wed, 28 Sep 2016 16:40:19 +0200
Subject: Document the order of directories added with code:add_pathsa/1
code:add_pathsa/1 reverts the list of directories when adding it at
the beginning of the code path. The command line option '-pa' behaves
in the same way. This is now documented.
---
lib/kernel/doc/src/code.xml | 11 ++++++++---
lib/sasl/doc/src/script.xml | 2 +-
2 files changed, 9 insertions(+), 4 deletions(-)
(limited to 'lib')
diff --git a/lib/kernel/doc/src/code.xml b/lib/kernel/doc/src/code.xml
index 4db377bcde..3143cdc825 100644
--- a/lib/kernel/doc/src/code.xml
+++ b/lib/kernel/doc/src/code.xml
@@ -382,9 +382,14 @@ zip:create("mnesia-4.4.7.ez",
Add directories to the beginning of the code path.
- Adds the directories in Dirs to the beginning of
- the code path. If a Dir exists, it is removed
- from the old position in the code path.
+ Traverses Dirs and adds
+ each Dir to the beginning of the code
+ path. This means that the order of Dirs
+ is reversed in the resulting code path. For example, if you
+ add [Dir1,Dir2], the resulting path will
+ be [Dir2,Dir1|OldCodePath].
+ If a Dir already exists in the code
+ path, it is removed from the old position.
Always returns ok, regardless of the validity of each
individual Dir.
diff --git a/lib/sasl/doc/src/script.xml b/lib/sasl/doc/src/script.xml
index 8ed132354d..b40ff28179 100644
--- a/lib/sasl/doc/src/script.xml
+++ b/lib/sasl/doc/src/script.xml
@@ -88,7 +88,7 @@
follows:
- -pa Dir1 Dir2 ... DirN adds the directories
- Dir1, Dir2, ..., DirN to the front of the initial
+ DirN, DirN-1, ..., Dir2, Dir1 to the front of the initial
load path.
- -pz Dir1 Dir2 ... DirN adds the directories
Dir1, Dir2, ..., DirN to the end of the initial
--
cgit v1.2.3