unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* obsolete functions found during the build process
@ 2017-08-12  7:42 Jean-Christophe Helary
  2017-08-12  8:45 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Jean-Christophe Helary @ 2017-08-12  7:42 UTC (permalink / raw)
  To: emacs-devel

There are plenty of warnings during the build process about obsolete functions "as of 2n.n".

For ex:

In nnmh-request-list-1:
gnus/nnmh.el:245:14:Warning: ‘string-to-multibyte’ is an obsolete function (as
    of 26.1); use ‘decode-coding-string’.

Is there anything to be done about that ?

Jean-Christophe


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: obsolete functions found during the build process
  2017-08-12  7:42 obsolete functions found during the build process Jean-Christophe Helary
@ 2017-08-12  8:45 ` Eli Zaretskii
  2017-08-12 10:25   ` Jean-Christophe Helary
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Eli Zaretskii @ 2017-08-12  8:45 UTC (permalink / raw)
  To: Jean-Christophe Helary; +Cc: emacs-devel

> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
> Date: Sat, 12 Aug 2017 09:42:33 +0200
> 
> In nnmh-request-list-1:
> gnus/nnmh.el:245:14:Warning: ‘string-to-multibyte’ is an obsolete function (as
>     of 26.1); use ‘decode-coding-string’.
> 
> Is there anything to be done about that ?

In general, replace the obsolete functions as the warning suggests.
In some cases, the use of the obsolete function is justified, though.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: obsolete functions found during the build process
  2017-08-12  8:45 ` Eli Zaretskii
@ 2017-08-12 10:25   ` Jean-Christophe Helary
  2017-08-12 17:40   ` Paul Eggert
  2017-08-13 21:14   ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: Jean-Christophe Helary @ 2017-08-12 10:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Thank you Eli.

Jean-Christophe 

> On Aug 12, 2017, at 10:45, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
>> Date: Sat, 12 Aug 2017 09:42:33 +0200
>> 
>> In nnmh-request-list-1:
>> gnus/nnmh.el:245:14:Warning: ‘string-to-multibyte’ is an obsolete function (as
>>    of 26.1); use ‘decode-coding-string’.
>> 
>> Is there anything to be done about that ?
> 
> In general, replace the obsolete functions as the warning suggests.
> In some cases, the use of the obsolete function is justified, though.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: obsolete functions found during the build process
  2017-08-12  8:45 ` Eli Zaretskii
  2017-08-12 10:25   ` Jean-Christophe Helary
@ 2017-08-12 17:40   ` Paul Eggert
  2017-08-12 20:13     ` Eric Abrahamsen
  2017-08-13 21:14   ` Stefan Monnier
  2 siblings, 1 reply; 6+ messages in thread
From: Paul Eggert @ 2017-08-12 17:40 UTC (permalink / raw)
  To: Eli Zaretskii, Jean-Christophe Helary; +Cc: emacs-devel

Eli Zaretskii wrote:
> In some cases, the use of the obsolete function is justified, though.


Is there some way for code to say "I know this function is obsolete, but the 
call is justified so don't warn about it"? That would be helpful, so that 
compiles could be clean and so that people would be more likely to pay attention 
to any stray warnings that do crop up.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: obsolete functions found during the build process
  2017-08-12 17:40   ` Paul Eggert
@ 2017-08-12 20:13     ` Eric Abrahamsen
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Abrahamsen @ 2017-08-12 20:13 UTC (permalink / raw)
  To: emacs-devel

Paul Eggert <eggert@cs.ucla.edu> writes:

> Eli Zaretskii wrote:
>> In some cases, the use of the obsolete function is justified, though.
>
>
> Is there some way for code to say "I know this function is obsolete,
> but the call is justified so don't warn about it"? That would be
> helpful, so that compiles could be clean and so that people would be
> more likely to pay attention to any stray warnings that do crop up.

Maybe the `with-no-warnings' macro?

Eric




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: obsolete functions found during the build process
  2017-08-12  8:45 ` Eli Zaretskii
  2017-08-12 10:25   ` Jean-Christophe Helary
  2017-08-12 17:40   ` Paul Eggert
@ 2017-08-13 21:14   ` Stefan Monnier
  2 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2017-08-13 21:14 UTC (permalink / raw)
  To: emacs-devel

> In general, replace the obsolete functions as the warning suggests.
> In some cases, the use of the obsolete function is justified, though.

AFAICT, there are indeed cases where using decode-coding-string instead
of string-to-multibyte is not really an option, but that means
"obsolete" is not really a good description.

Using with-no-warnings to mask obsolescence warnings is OK when we know
that the code is only kept for backward compatibility, but when there is
no good replacement, it's not a good solution.

So we should strive to provide valid alternatives for every use of
string-to-multibyte (or de-obsolete it, tho it's not my favorite solution).


        Stefan




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-13 21:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-12  7:42 obsolete functions found during the build process Jean-Christophe Helary
2017-08-12  8:45 ` Eli Zaretskii
2017-08-12 10:25   ` Jean-Christophe Helary
2017-08-12 17:40   ` Paul Eggert
2017-08-12 20:13     ` Eric Abrahamsen
2017-08-13 21:14   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).