File 1121-erts-Clarify-_to_existing_atom-documentation.patch of Package erlang
From 3f8692c41879a4b95a554cb53e0da11865c3f604 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 22 Jan 2021 17:03:26 +0100
Subject: [PATCH 1/8] erts: Clarify *_to_existing_atom documentation
---
erts/doc/src/erlang.xml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 97f6f7e83d..0511b940ea 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -448,9 +448,11 @@ Z = erlang:adler32_combine(X,Y,iolist_size(Data2)).</code>
<name name="binary_to_existing_atom" arity="2"/>
<fsummary>Convert from text representation to an atom.</fsummary>
<desc>
- <p>As <seealso
- marker="#binary_to_atom/2"><c>binary_to_atom/2</c></seealso>,
- but the atom must exist.</p>
+ <p>The same as
+ <seealso marker="#binary_to_atom/2"><c>binary_to_atom/2</c></seealso>,
+ but the atom must exist. An atom exists if it has
+ been created by the run-time system by either loading code or creating
+ a term in which the atom is part.</p>
<p>The Erlang system has a <seealso
marker="system/efficiency_guide:advanced">configurable
@@ -2753,7 +2755,9 @@ false</code>
<desc>
<p>Returns the atom whose text representation is
<c><anno>String</anno></c>,
- but only if there already exists such atom.</p>
+ but only if there already exists such atom. An atom exists if it has
+ been created by the run-time system by either loading code or creating
+ a term in which the atom is part.</p>
<p>Failure: <c>badarg</c> if there does not already exist an atom
whose text representation is <c><anno>String</anno></c>.</p>
</desc>
--
2.26.2