Fix printing in Emacs < 27

* dev/examples-to-docs.el (example-to-string):
* dev/examples-to-info.el (dash--print-lisp-as-texi): Turn on
print-quoted for the benefit of Emacs versions before 27.
master
Basil L. Contovounesios 5 years ago
parent a6b16ea5bf
commit 56db327365
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 3
      dev/examples-to-docs.el
  2. 2
      dev/examples-to-info.el

@ -29,7 +29,8 @@
(defvar functions ())
(defun example-to-string (example)
(-let [(actual sym expected) example]
(-let (((actual sym expected) example)
(print-quoted t))
(--> (cond
((eq sym '=>) (format "=> %S" expected))
((eq sym '~>) (format "~> %S" expected))

@ -30,7 +30,7 @@
(defun dash--print-lisp-as-texi (obj)
"Print Lisp OBJ suitably for Texinfo."
(save-excursion (prin1 obj))
(save-excursion (let ((print-quoted t)) (prin1 obj)))
(while (re-search-forward (rx (| (group "\\?")
(group (in "{}"))
(group ?\' symbol-start "nil" symbol-end)

Loading…
Cancel
Save