emacs-devel
[Top][All Lists]
Advanced

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

Re: Towards a cleaner build


From: Lars Ingebrigtsen
Subject: Re: Towards a cleaner build
Date: Sun, 09 Jun 2019 18:24:52 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Noam Postavsky <address@hidden> writes:

> On Sun, 9 Jun 2019 at 11:40, Lars Ingebrigtsen <address@hidden> wrote:
>
>> (with-suppressed-warnings ((lexical prefixless))
>>   (defvar prefixless))
>
> It's a bit funny that the warning is named 'lexical', when it's about
> a non-lexical variable.
>
>>   (with-suppressed-warnings ((obsolete obsolete))
>>     (obsolete))
>
>>   (with-suppressed-warnings ((obsolete obsolete-variable))
>>     obsolete-variable)
>
> We might want to support suppressing the warning for obsolete
> functions and variables separately?
>
>>   (with-suppressed-warnings ((mapcar mapcar))
>>     (mapcar #'list '(1 2 3)))
>
> This is the 'mapcar called for effect' one, right? Could we group it
> with 'value returned from (+ 1 2) is unused' for (progn (+ 1 2) nil)?
> Even though the byte compiler implementation might have them seperate,
> I think they're pretty much the same thing from the point of view of
> an elisp author.

I agree with all these, but I thought it might be nice to have the same
symbols as in byte-compile-warnings (and byte-compile-warning-types),
which are:

=> (redefine callargs free-vars unresolved obsolete noruntime cl-functions 
interactive-only make-local mapcar constants suspicious lexical)

If we diverge featurewise between `byte-compile-warnings' and
`with-suppressed-warnings', I think that will be confusing.

But...  perhaps we could tweak `byte-compile-warnings' featurewise, too?
That is, split `obsolete' into `obsolete-function' and
`obsolete-variable' (and retain `obsolete' as a catch-all for both),
etc...  Perhaps that'd be nice?

`effect' would then be the new synonym for `mapcar'...  And we could
have `no-prefix' as a synonym for `lexical'.  Actually, I'd guess that
`lexical' was chosen because you only get that warning in files with
lexical binding, but it's kinda opaque that it has that effect.

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