Subject: Re: bug#39546: 28.0.50; Do not require subr-x at run time

From: Tino Calancha <[email-masked]>
Date: Mon, 10 Feb 2020 21:49:18 +0100

Tino Calancha <[email-masked]> writes:

> "Tassilo Horn" <[email-masked]> writes:
>
>> Am Mo, 10. Feb 2020, um 20:30, schrieb Tino Calancha:
>>> replace.el is a good agreement between subr-x.el (it's a defun, so 
>>> it doesn't fit well there) and subr.el.
>>> 
>>> As subr.el, replace.el is also loaded at start time, but it's ~ half size,
>>> and more important than that, it's all about replacing in Emacs.
>>
>> Sounds good to me!
>
> Here is the updated patch:
> - It deletes the cookie from subr-x (yes, we have one for when-let)
> - Move replace-region-contents inside replace.el (loaded at startup)
> - Add all required (eval-when...(req.. 'subr-x)) at tramp files
> - Replaced loading subr-x at run time with compile time for some other files
>
> I have run the testsuite without surprises.
Well, actually there was a surprise, but who don't like surprises after
all!
I missed this one (it was relying on the whe-let cookie):

diff --git a/lisp/image/exif.el b/lisp/image/exif.el
index 642bc58321..27ad616146 100644
--- a/lisp/image/exif.el
+++ b/lisp/image/exif.el
@@ -62,6 +62,7 @@
 ;;; Code:
 
 (require 'cl-lib)
+(eval-when-compile (require 'subr-x))
 
 (defvar exif-tag-alist
   '((11 processing-software)