summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEksperimental <eksperimental@users.noreply.github.com>2018-04-22 14:17:08 +0700
committerJosé Valim <jose.valim@gmail.com>2018-04-22 09:17:08 +0200
commit87f88614d33f309b5b2f44c88db02b46e158776c (patch)
treea3c3d24b39169f15dd83bfbc718aee33108d231c
parented766858b97ce1b3c8903d1424950dfaae72b4c0 (diff)
downloadelixir-87f88614d33f309b5b2f44c88db02b46e158776c.tar.gz
Add __STACKTRACE__/0 to Naming Conventions page (#7578)
Additionally sort special forms alphabetically.
-rw-r--r--lib/elixir/lib/macro.ex2
-rw-r--r--lib/elixir/pages/Naming Conventions.md2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/elixir/lib/macro.ex b/lib/elixir/lib/macro.ex
index 55050ef87..1b2a120ef 100644
--- a/lib/elixir/lib/macro.ex
+++ b/lib/elixir/lib/macro.ex
@@ -1078,7 +1078,7 @@ defmodule Macro do
* Macros (local or remote)
* Aliases are expanded (if possible) and return atoms
- * Compilation environment macros (`__ENV__/0`, `__MODULE__/0` and `__DIR__/0`)
+ * Compilation environment macros (`__CALLER__/0`, `__DIR__/0`, `__ENV__/0` and `__MODULE__/0`)
* Module attributes reader (`@foo`)
If the expression cannot be expanded, it returns the expression
diff --git a/lib/elixir/pages/Naming Conventions.md b/lib/elixir/pages/Naming Conventions.md
index ed6e92381..5de2db050 100644
--- a/lib/elixir/pages/Naming Conventions.md
+++ b/lib/elixir/pages/Naming Conventions.md
@@ -40,7 +40,7 @@ Due to this property, Elixir relies on functions starting with underscore to att
iex> String.__info__(:functions)
[at: 2, capitalize: 1, chunk: 2, ...]
-Elixir also includes four special forms that follow the double underscore format. These forms retrieve compile-time information about the current environment: `__MODULE__/0`, `__DIR__/0`, `__ENV__/0` and `__CALLER__/0`.
+Elixir also includes five special forms that follow the double underscore format: `__CALLER__/0`, `__DIR__/0`, `__ENV__/0`and `__MODULE__/0` retrieve compile-time information about the current environment, while `__STACKTRACE__/0` retrieves the stacktrace for the current exception.
## Trailing bang (`foo!`)