branch: externals/tomelr
commit 7c004af90d70b0e86772496607ab21ed375fe8e2
Author: Kaushal Modi <[email protected]>
Commit: Kaushal Modi <[email protected]>
style: Remove unnecessary tomelr-encode-* functions
---
tomelr.el | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/tomelr.el b/tomelr.el
index 20d9a3190e..54e0164b64 100644
--- a/tomelr.el
+++ b/tomelr.el
@@ -129,9 +129,7 @@ Optional TYPE arg gives more information about the input
STRING.
For example, if the string is the name of a TOML key, it will be
set to `keyword'.
-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."
+Return the same STRING passed as input."
;; (message "[tomelr--print-string DBG] string = `%s'" string)
(let ((special-chars '((?b . ?\b) ;U+0008
(?f . ?\f) ;U+000C
@@ -176,10 +174,6 @@ returns the TOML representation as a string."
(and end-q (insert end-q))
string))
-(defun tomelr-encode-string (string)
- "Return a TOML representation of STRING."
- (tomelr--with-output-to-string (tomelr--print-string string)))
-
(defun tomelr--print-stringlike (object &optional type)
"Insert OBJECT encoded as a TOML string at point.
@@ -324,8 +318,7 @@ Definition of a TOML Table Array (TTA):
(format "[[%s]]" (string-join tomelr--print-table-hierarchy "."))))
(defun tomelr--print-array (array)
- "Insert a TOML representation of ARRAY at point.
-See `tomelr-encode-array' that returns the same as a string."
+ "Insert a TOML representation of ARRAY at point."
;; (message "[tomelr--print-array DBG] array = %S, TTA = %S"
;; array (tomelr--toml-table-array-p array))
(cond
@@ -352,11 +345,6 @@ See `tomelr-encode-array' that returns the same as a
string."
(insert " "))
(insert "]"))))
-(defun tomelr-encode-array (array)
- "Return a TOML representation of ARRAY.
-ARRAY can also be a list."
- (tomelr--with-output-to-string (tomelr--print-array array)))
-
;;;; Print wrapper
(defun tomelr--print (object)
"Insert a TOML representation of OBJECT at point.