emacs-devel
[Top][All Lists]
Advanced

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

Re: cc-mode: Make all parameters introduced in Emacs 26 optional


From: Clément Pit-Claudel
Subject: Re: cc-mode: Make all parameters introduced in Emacs 26 optional
Date: Mon, 12 Mar 2018 19:29:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 2018-03-12 18:40, Stefan Monnier wrote:
>> Is there any way for package to know how many mandatory arguments a
>> function has, to be able to branch out for compatibility reasons?
> 
> The way I recommend is:
> 
>     (condition-case nil
>         (call1 ...)
>       (wrong-number-of-arguments
>        (call2 ...)))

Out of (mostly theoretical) curiosity: is there a way to restrict that 
condition-case to that specific function call? (rather than catching all 
incorrect calls in that call tree)



reply via email to

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