From: Vasilij Schneidermann Date: Tue, 19 Feb 2019 19:50:14 +0000 (+0100) Subject: elisp: Get rid of newline hack in printer X-Git-Url: https://git.hcoop.net/jackhill/mal.git/commitdiff_plain/a3b3a3cc7cc8384500631ced698047aa3dcbebad elisp: Get rid of newline hack in printer --- diff --git a/elisp/printer.el b/elisp/printer.el index f00efa79..48293529 100644 --- a/elisp/printer.el +++ b/elisp/printer.el @@ -12,8 +12,8 @@ (number-to-string (mal-value form))) ((eq type 'string) (if print-readably - ;; HACK prin1-to-string does only quotes and backslashes - (replace-regexp-in-string "\n" "\\\\n" (prin1-to-string value)) + (let ((print-escape-newlines t)) + (prin1-to-string value)) value)) ((or (eq type 'symbol) (eq type 'keyword)) (symbol-name value))