[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [NonGNU ELPA] new package: eglot-inactive-regions
From: |
Filippo Argiolas |
Subject: |
Re: [NonGNU ELPA] new package: eglot-inactive-regions |
Date: |
Thu, 05 Dec 2024 22:19:56 +0100 |
Philip Kaludercic <philipk@posteo.net> writes:
> Filippo Argiolas <filippo.argiolas@gmail.com> writes:
>
>> Philip Kaludercic <philipk@posteo.net> writes:
>>
>>> Filippo Argiolas <filippo.argiolas@gmail.com> writes:
>>>
>>>> Filippo Argiolas <filippo.argiolas@gmail.com> writes:
>>>>
>>>>> Philip Kaludercic <philipk@posteo.net> writes:
>>>>>
>>>>>> I would try something of the form like
>>>>>>
>>>>>> (if (fboundp 'new-function)
>>>>>> (new-function ...)
>>>>>> (old-function ...))
>>>>>>
>>>>>> If on the other hand there has already been a new release of Eglot with
>>>>>> these commands, then just depend on that version and the issue would
>>>>>> resolve itself.
>>>>>>
>>>>>
>>>>> CC-ing João.
>>>>>
>>>>> I pushed the suggested change but I still get the compile warnings about
>>>>> deprecated functions. I'd like to keep supporting emacs-29, should I
>>>>> just disregard the warning?
>>>>>
>>>>> Sorry for the ignorance, how would the dependency on a specific eglot
>>>>> version work now that it's in core?
>>>>> Does it require the users to have additional repos enabled?
>>>>>
>>>>> Sounds strange to me that we have macros to deprecate functions but no
>>>>> mechanism to automatically switch to the new one if it's just a
>>>>> rename. Am I missing something obvious?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Filippo
>>>>
>>>> How about something like:
>>>>
>>>> ;; fallback to deprecated eglot functions
>>>> (when (version< emacs-version "30")
>>>> (defalias 'eglot-uri-to-path 'eglot--uri-to-path)
>>>> (defalias 'eglot-range-region 'eglot--range-region))
>>>>
>>>> or even something similar with a check on eglot version?
>>>
>>> That can be dangerous if other packages do fboundp checks and infer too
>>> much from that. I would try to see if adding `declare-function's could
>>> help suppress the warnings?
>>
>> Nope, the only solution working so far is to call the deprecated
>> functions with `with-no-warnings'.
>>
>> Guess I'll go with this. I'd be fine with the warnings too if we didn't
>> have the annoying habit of scaring the end users with them :-)
>
> I don't have your source code available right now, my last suggestion
> would be to use `with-suppressed-warnings' where you can suppress
> specific obsoletion warnings, but that requires Emacs 27.1 or newer.
>
Thanks this seems to do the trick!
Filippo
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, (continued)
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Philip Kaludercic, 2024/12/01
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/02
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/04
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/04
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Philip Kaludercic, 2024/12/04
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/05
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Philip Kaludercic, 2024/12/05
- Re: [NonGNU ELPA] new package: eglot-inactive-regions,
Filippo Argiolas <=
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Philip Kaludercic, 2024/12/06
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/06
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Philip Kaludercic, 2024/12/06
- Re: [NonGNU ELPA] new package: eglot-inactive-regions, Filippo Argiolas, 2024/12/06