Subject: bug#63288: [PATCH] Mark cl-proclaim, cl-declaim, and cl-declare as obsolete

From: Thierry Volpiatto <[email-masked]>
Date: Thu, 20 Feb 2025 14:38:14 +0000

Stefan Monnier <[email-masked]> writes:

>>>> (defmacro my-with-progress (&rest body)
>>>>   `(let ((reporter (make-progress-reporter "Updating...")))
>>>>      (progn
>>>>        ,@body)))
>>>>
>>>> (defun my-updating ()
>>>>   (cl-declare (special reporter))
>>>>   (my-with-progress
>>>>    (cl-loop for elm in '(a b c d e f g)
>>>>             do (progn
>>>>                  (sit-for 1)
>>>>                  (progress-reporter-update reporter))
>>>>             collect elm)))
>>>
>>> I don't see what is the use of (cl-declare (special reporter)) here.
>>> What do you think it changes to the behavior of this code?
>>
>> It declare reporter as a variable and prevent byte compile warnings,
>
> Really?  AFAICT the code should work just fine, and without warnings, if
> you just remove the `cl-declare` and leave the variable be lexically scoped.

Hu yes indeed, I haven't tried this beeing sure it would produce
warnings but it doesn't!

Thanks.

-- 
Thierry