[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tomelr 65653d53ee 30/84: chore(doc): M-x checkdoc fixes
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tomelr 65653d53ee 30/84: chore(doc): M-x checkdoc fixes |
Date: |
Tue, 3 May 2022 09:58:10 -0400 (EDT) |
branch: externals/tomelr
commit 65653d53eef32eb4c9735c2e36aea175c9b15881
Author: Kaushal Modi <kaushal.modi@gmail.com>
Commit: Kaushal Modi <kaushal.modi@gmail.com>
chore(doc): M-x checkdoc fixes
---
tomelr.el | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/tomelr.el b/tomelr.el
index ce1ebd4e9d..4cbfbe45dc 100644
--- a/tomelr.el
+++ b/tomelr.el
@@ -147,7 +147,9 @@ Return nil if KEYWORD is not recognized as a TOML keyword."
If TRIM-INIT-CHARS is positive, those many initial characters
of the STRING are not inserted.
-Return the same STRING passed as input."
+Return the same STRING passed as input. See
+`tomelr-encode-string' instead if you need a function that
+returns the TOML representation as a string."
;; (message "[tomelr--print-string DBG] string = `%s'" string)
(let ((special-chars '((?b . ?\b) ;U+0008
(?f . ?\f) ;U+000C
@@ -227,7 +229,7 @@ Signal `tomelr-key-format' if it cannot be encoded as a
string."
;;;; Objects
(defun tomelr--print-pair (key val)
- "Insert TOML representation of KEY-VAL pair at point."
+ "Insert TOML representation of KEY - VAL pair at point."
(let ((type (cond
;; TODO: Need to find a robust way of detecting TOML tables.
((and (mapp val)
@@ -250,7 +252,7 @@ Signal `tomelr-key-format' if it cannot be encoded as a
string."
(tomelr--print val))))
(defun tomelr--print-map (map)
- "Insert TOML object representation of MAP at point.
+ "Insert a TOML representation of MAP at point.
This works for any MAP satisfying `mapp'."
;; (message "[tomelr--print-map DBG] map = %S" map)
(unless (map-empty-p map)
@@ -258,9 +260,12 @@ This works for any MAP satisfying `mapp'."
(map-do #'tomelr--print-pair map))))
(defun tomelr--print-unordered-map (map)
- "Like `tomelr--print-map', but optionally sort MAP first.
+ "Insert a TOML representation of MAP at point, but optionally sort MAP first.
+
If `tomelr-encoding-object-sort-predicate' is non-nil, this first
-transforms an unsortable MAP into a sortable alist."
+transforms an unsortable MAP into a sortable alist.
+
+See `tomelr-encode-plist' that returns the same as a string."
(if (and tomelr-encoding-object-sort-predicate
(not (map-empty-p map)))
(tomelr--print-alist (map-pairs map) t)
@@ -269,8 +274,11 @@ transforms an unsortable MAP into a sortable alist."
;;;; Lists (including alists and plists)
(defun tomelr--print-alist (alist &optional destructive)
"Insert a TOML representation of ALIST at point.
+
Sort ALIST first if `tomelr-encoding-object-sort-predicate' is
-non-nil. Sorting can optionally be DESTRUCTIVE for speed."
+non-nil. Sorting can optionally be DESTRUCTIVE for speed.
+
+See `tomelr-encode-alist' that returns the same as a string."
(tomelr--print-map (if (and tomelr-encoding-object-sort-predicate alist)
(sort (if destructive alist (copy-sequence alist))
(lambda (a b)
@@ -290,7 +298,7 @@ non-nil. Sorting can optionally be DESTRUCTIVE for speed."
;;
(defun tomelr--print-list (list)
- "Like `tomelr-encode-list', but insert the TOML at point."
+ "Insert a TOML representation of LIST at point."
(cond ((tomelr-alist-p list) (tomelr--print-alist list))
((tomelr-plist-p list) (tomelr--print-unordered-map list))
((listp list) (tomelr--print-array list))
@@ -298,7 +306,8 @@ non-nil. Sorting can optionally be DESTRUCTIVE for speed."
;;;; Arrays
(defun tomelr--print-array (array)
- "Like `tomelr-encode-array', but insert the TOML at point."
+ "Insert a TOML representation of ARRAY at point.
+See `tomelr-encode-array' that returns the same as a string."
(insert "[ ")
(unless (= 0 (length array))
(tomelr--with-indentation
@@ -319,7 +328,8 @@ ARRAY can also be a list."
;;;; Print wrapper
(defun tomelr--print (object)
- "Like `tomelr-encode', but insert or print the TOML at point."
+ "Insert a TOML representation of OBJECT at point.
+See `tomelr-encode' that returns the same as a string."
(cond ((tomelr--print-keyword object))
((listp object) (tomelr--print-list object))
((tomelr--print-stringlike object))
- [elpa] externals/tomelr b3b6a28d15 68/84: doc: Add more examples, (continued)
- [elpa] externals/tomelr b3b6a28d15 68/84: doc: Add more examples, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr f9d670e165 56/84: refactor: Clean up unused code, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 511240765b 71/84: chore: Ignore .elc files, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ed13b73e9b 74/84: feat: Support string keys, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr de661716af 72/84: style: Remove space from after and before [ and ] brackets, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 334b7cba54 76/84: refactor: Don't attempt to triple-quote TOML keys, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr c2d1328c44 80/84: fix: Boolean coercing when value is a symbol true or false, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr ebe5959174 75/84: feat: Auto-coerce string to boolean, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a676192b43 81/84: fix: Integer coercing of a number strings with underscores, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 8da825067b 15/84: chore(readme): Update, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 65653d53ee 30/84: chore(doc): M-x checkdoc fixes,
ELPA Syncer <=
- [elpa] externals/tomelr bcaea16ec0 39/84: chore(doc): Clean up old code block, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 45542fb234 67/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 7c004af90d 66/84: style: Remove unnecessary tomelr-encode-* functions, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 568de5efb2 83/84: chore: Bump version, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0d4674f782 42/84: test: Test `tomelr--toml-table-p`, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 0eb4fa04ac 43/84: fix: Don't let array of TOML tables be recognized as TOML tables, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr a33dbd1286 50/84: fix: Detect nested TTA correctly when not present in first TT key, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr dc9b2a63f8 60/84: doc: Remove an invalid example, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 044b5e1a04 61/84: fix: TT with key with array value are detected correctly, ELPA Syncer, 2022/05/03
- [elpa] externals/tomelr 171e5a7682 62/84: fix: List format array of plists now detected as TOML Table Array, ELPA Syncer, 2022/05/03