[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards a cleaner build: ieieo

From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build: ieieo
Date: Fri, 14 Jun 2019 14:13:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>     (pcase-let* ((`(,uses-cnm . ,fun) (cl--generic-lambda args body)))
>>       `(progn
>>          ,(and (get name 'byte-obsolete-info)
>>                (or (not (fboundp 'byte-compile-warning-enabled-p))
>>                    (byte-compile-warning-enabled-p 'obsolete))
>>                (let* ((obsolete (get name 'byte-obsolete-info)))
>>                  (macroexp--warn-and-return
>>                   (macroexp--obsolete-warning name obsolete "generic 
>> function")
>>                   nil)))
> IIUC, this is to emit a warning when a package defines a method for an
> obsolete generic-function (e.g. a method for object-print) so that the
> author is made aware of the need to port the method to the new
> generic function (e.g. cl-print-object).

Yes, but the byte compiler will also output this warning...  so you get
the warning twice, but only the second is on a form that allows jumping
to the definition:

`object-print' is an obsolete generic function (as of 26.1); use 
`cl-print-object' instead.

In toplevel form:
emacs-lisp/eieio.el:850:11:Warning: `object-print' is an obsolete function (as
    of 26.1); use `cl-print-object' instead.

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]