branch: externals/yaml
commit e787dd06c661e167b5afb96173b69d34eddfba1d
Merge: 0ac7f365bb ee34639c96
Author: Zachary Romero <[email protected]>
Commit: GitHub <[email protected]>
Merge pull request #42 from kisaragi-hiu/bring-docstring-up-to-date
---
README.md | 5 +++--
yaml.el | 17 ++++++++++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index 5b0edcda2b..9a7d2b7eaa 100644
--- a/README.md
+++ b/README.md
@@ -18,8 +18,9 @@ The following keyword args are accepted:
- `alist`
- `plist`
- `:object-key-type` specifies how map keys should be handled. It takes the
following symbols:
- - `string` (default)
- - `symbol` keys of maps will be converted to symbols. Not that this matches
the behavior of the JSON parser.
+ - `string`
+ - `symbol` (default) Use symbols as keys. If `:object-type` is `plist`,
this becomes the same as `keyword`.
+ - `keyword` Always use keywords as keys.
- `:sequence-type` specifies the Lisp data structure to store the
parsed sequences in. It takes the following symbols:
- `array` (default)
diff --git a/yaml.el b/yaml.el
index ff5de1ed21..0c17aca32c 100644
--- a/yaml.el
+++ b/yaml.el
@@ -1084,16 +1084,23 @@ then check EXPR at the current position."
OBJECT-TYPE specifies the Lisp object to use for representing
key-value YAML mappings. Possible values for OBJECT-TYPE are
-the symbols hash-table, alist, and plist.
+the symbols `hash-table' (default), `alist', and `plist'.
-SEQUENCE-TYPE specifies the Lisp object to use for representing YAML
-sequences. Possible values for SEQUENCE-TYPE are the symbols list, and array.
+OBJECT-KEY-TYPE specifies the Lisp type to use for keys in
+key-value YAML mappings. Possible values are the symbols
+`string', `symbol', and `keyword'. By default, this is `symbol';
+if OBJECT-TYPE is `plist', the default is `keyword' (and `symbol'
+becomes synonym for `keyword').
+
+SEQUENCE-TYPE specifies the Lisp object to use for representing
+YAML sequences. Possible values for SEQUENCE-TYPE are the symbols
+`list', and `array' (default).
NULL-OBJECT contains the object used to represent the null value.
-It defaults to the symbol :null.
+It defaults to the symbol `:null'.
FALSE-OBJECT contains the object used to represent the false
-value. It defaults to the symbol :false."
+value. It defaults to the symbol `:false'."
(yaml--initialize-parsing-state args)
(let ((res (yaml--parse string
(yaml--top))))