> > - (customize-saved)
> > - (should (search-forward cus-edit-tests--obsolete-option-tag nil t))))
> > + (unwind-protect
> > + (progn
> > + (put 'cus-edit-tests--obsolete-option-tag 'saved-value '(t))
> > + (customize-saved)
> > + (should (search-forward cus-edit-tests--obsolete-option-tag nil t)))
> > + (put 'cus-edit-tests--obsolete-option-tag 'saved-value nil))))
>
> These are (fairly rare) good use-cases for `cl-letf`:
>
> (cl-letf (((get 'cus-edit-tests--obsolete-option-tag 'saved-value) '(t)))
> (customize-saved)
> (should (search-forward cus-edit-tests--obsolete-option-tag nil t)))
Indeed. I didn't know about cl-letf, thanks.
BTW, C-h f cl-letf RET
shows a link to the info node (cl) Function Bindings. Maybe a better
link is (cl) Modify Macros.