From 6c41b327be1905d8ae7707ccda3d2bf2e6935e4e Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 31 Jan 2021 17:55:11 +0000 Subject: [PATCH] Move case-fold-search binding to where it's used * dev/examples-to-info.el (example-to-string): Move case-fold-search binding from here... (dash--print-lisp-as-texi): ...to here, where it's needed. --- dev/examples-to-info.el | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/dev/examples-to-info.el b/dev/examples-to-info.el index a32ca5f..c1b05b7 100644 --- a/dev/examples-to-info.el +++ b/dev/examples-to-info.el @@ -31,21 +31,21 @@ (defun dash--print-lisp-as-texi (obj) "Print Lisp OBJ suitably for Texinfo." (let ((print-quoted t) - (print-escape-control-characters t)) - (save-excursion (prin1 obj))) - (while (re-search-forward (rx (| (group ?\' symbol-start "nil" symbol-end) - (group "\\?") (group "\\00") (in "{}"))) - nil 'move) - (replace-match (cond ((match-beginning 1) "'()") ; 'nil -> '(). - ((match-beginning 2) "?") ; `-any\?' -> `-any?'. - ((match-beginning 3) "\\\\") ; \00N -> \N. - ("@\\&")) ; { -> @{. - t))) + (print-escape-control-characters t) + (case-fold-search nil)) + (save-excursion (prin1 obj)) + (while (re-search-forward (rx (| (group ?\' symbol-start "nil" symbol-end) + (group "\\?") (group "\\00") (in "{}"))) + nil 'move) + (replace-match (cond ((match-beginning 1) "'()") ; 'nil -> '(). + ((match-beginning 2) "?") ; `-any\?' -> `-any?'. + ((match-beginning 3) "\\\\") ; \00N -> \N. + ("@\\&")) ; { -> @{. + t)))) (defun example-to-string (example) (pcase-let* ((`(,actual ,err ,expected) example) - (err (eq err '!!>)) - (case-fold-search nil)) + (err (eq err '!!>))) (and err (consp expected) (setq expected (error-message-string expected))) (with-output-to-string