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

From: Thierry Volpiatto <[email-masked]>
Date: Wed, 19 Feb 2025 16:32:31 +0000

Stefan Monnier <[email-masked]> writes:

>> No, in some cases you must use (cl-declare (special ...)), and no you
>> can't use defvar in such cases, so if you intend to remove/deprecate
>
> Could you show us an example?

I used it in helm--completion-in-region to pass PROMPT and
REQUIRE-MATCH, don't know if it still needed, however
removing/deprecating cl-declare remove a nice feature IMHO like the
ability to do things like this:

(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)))

of course you can use a defvar in this case, but it is more handy to do
like this.

Sorry I don't have other examples in mind right now.

-- 
Thierry