Unquote results in README examples

* dev/examples-to-docs.el (dash--print-lisp-as-md)
(example-to-string): Unquote printed expected result, as that is
both more correct and consistent with standard Emacs documentation.

* README.md: Regenerate.
master
Basil L. Contovounesios 5 years ago
parent 03748d885a
commit f6554c3701
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 708
      README.md
  2. 7
      dev/examples-to-docs.el

File diff suppressed because it is too large Load Diff

@ -38,12 +38,15 @@
(save-excursion (prin1 obj)))
(while (re-search-forward
(rx (| (group ?\' symbol-start "nil" symbol-end) "\\?")) nil 'move)
;; 'nil -> '(), `-any\?' -> `-any?'.
(replace-match (if (match-beginning 1) "'()" "?") t t)))
;; 'nil -> (), `-any\?' -> `-any?'.
(replace-match (if (match-beginning 1) "()" "?") t t)))
(defun example-to-string (example)
(pcase-let ((`(,actual ,sym ,expected) example)
(print-quoted t))
(and (eq (car-safe expected) 'quote)
(not (equal expected ''()))
(setq expected (cadr expected)))
(with-output-to-string
(with-current-buffer standard-output
(dash--print-lisp-as-md actual)

Loading…
Cancel
Save