emacs-devel
[Top][All Lists]
Advanced

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

Re: tramp-compat-funcall -> compat-funcall?


From: Ted Zlatanov
Subject: Re: tramp-compat-funcall -> compat-funcall?
Date: Thu, 22 Sep 2016 16:18:17 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

On Thu, 22 Sep 2016 08:31:22 -0400 Stefan Monnier <address@hidden> wrote: 

SM> I think hiding this behind (tramp-)compat-funcall would be better
SM> avoided (just like using with-no-warnings should be avoided whenever
SM> possible).

SM> IOW, if there's a kind of situation that recurs often enough to warrant
SM> something like (tramp-)compat-funcall you should report this as a bug.

The use case, I think, is "to provide compatibility with older Emacsen,
I need a convenient way to call a function softly without compiler
warnings if it doesn't exist." I think, based on the two examples I gave
(`gnus-funcall-no-warning' was the other instance), that it's not an
uncommon need, and it's better to provide it in a core facility than ask
package maintainers to implement it.

If the use case is misguided, then what's the right way to call
functions that are missing in 25.1 but are needed in 24.3 for example?
Do we need a layered cond-like funcall instead, which tries several
invocations (not necessarily with the same arguments) until one
succeeds? In either case, the compiler warnings seem better silenced
than active, unless none of the cases succeed.

Ted




reply via email to

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