[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/yaml 8903b6c7e4 055/124: return plist key as a keyword
From: |
ELPA Syncer |
Subject: |
[elpa] externals/yaml 8903b6c7e4 055/124: return plist key as a keyword as a default |
Date: |
Fri, 29 Nov 2024 16:00:00 -0500 (EST) |
branch: externals/yaml
commit 8903b6c7e46cae482da0c0395ff3f0559155f339
Author: Naoya Yamashita <conao3@gmail.com>
Commit: Naoya Yamashita <conao3@gmail.com>
return plist key as a keyword as a default
---
yaml.el | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/yaml.el b/yaml.el
index a858a82d76..4fb3c77dd2 100644
--- a/yaml.el
+++ b/yaml.el
@@ -413,9 +413,12 @@ This flag is intended for development purposes.")
(progn
(let ((key (pop yaml--cache))
(table (car yaml--object-stack)))
- (when (and (eql 'symbol yaml--parsing-object-key-type)
- (stringp key))
- (setq key (intern key)))
+ (when (stringp key)
+ (cond
+ ((eql 'symbol yaml--parsing-object-key-type)
+ (setq key (intern key)))
+ ((eql 'keyword yaml--parsing-object-key-type)
+ (setq key (intern (format ":%s" key))))))
(puthash key value table))
(pop yaml--state-stack)))
((equal top-state :trail-comments)
@@ -967,10 +970,14 @@ value. It defaults to the symbol :false."
(cond
((or (not object-key-type)
(equal 'string object-key-type))
- (setq yaml--parsing-object-key-type 'string))
+ (if (equal 'plist yaml--parsing-object-type)
+ (setq yaml--parsing-object-key-type 'keyword)
+ (setq yaml--parsing-object-key-type 'string)))
((equal 'symbol object-key-type)
(setq yaml--parsing-object-key-type 'symbol))
- (t (error "Invalid object-key-type. object-key-type must be string, or
symbol")))
+ ((equal 'keyword object-key-type)
+ (setq yaml--parsing-object-key-type 'keyword))
+ (t (error "Invalid object-key-type. object-key-type must be string,
keyword, or symbol")))
(cond
((or (not sequence-type)
(equal sequence-type 'array))
- [elpa] externals/yaml 1fb0519023 039/124: Fix static check warnings, (continued)
- [elpa] externals/yaml 1fb0519023 039/124: Fix static check warnings, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml fbf28ffb1d 041/124: Add yaml-spec-1.2.json file, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml d8f676b54d 037/124: Add require for cl-lib, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a90fc1580c 045/124: Update commentary file, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 79a6bbc1e1 040/124: Fix various parsing bugs; reduce stack usage of parsing strings, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 367f470203 029/124: Add github action file, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a45f60c999 051/124: Merge pull request #8 from zkry/symbol-keys, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 10af746dad 050/124: Add option to convert string keys to symbols, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 96d3e51aeb 048/124: Add yaml-encode feature, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 51023c4551 049/124: Merge pull request #7 from zkry/add-yaml-encode, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 8903b6c7e4 055/124: return plist key as a keyword as a default,
ELPA Syncer <=
- [elpa] externals/yaml ed108ab526 084/124: add option for skipping processing of scalars, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml a2ed8f1fd6 072/124: Fix empty single quote string bug, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 419e85fbce 094/124: fix folding block parsing error, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 0bf6a1b686 088/124: YAML anchor should match exactly how it was defined, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 2aa5a6faf7 056/124: Merge pull request #16 from conao3/indent, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 5b352258f5 067/124: Merge pull request #24 from j-shilling/fix-alist-to-hash, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml d0abc17e3d 060/124: Merge pull request #18 from conao3/alist-symbol, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml e32ef2f5e5 092/124: add note to yaml-parse-string-with-pos function, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml c56d47254d 091/124: add unit test, ELPA Syncer, 2024/11/29
- [elpa] externals/yaml 69c699a15a 071/124: Minor code formatting fixes, ELPA Syncer, 2024/11/29