From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Dealing with obsoletion warnings in non-core code Date: Mon, 28 Sep 2020 21:16:09 +0300 Message-ID: <83imbxlqc6.fsf@gnu.org> References: <20200928143540.GB1002@odonien.localdomain> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32705"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 28 20:19:25 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kMxkB-0008Pt-Qb for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 20:19:23 +0200 Original-Received: from localhost ([::1]:57460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMxkA-0000yn-QU for ged-emacs-devel@m.gmane-mx.org; Mon, 28 Sep 2020 14:19:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMxhF-00083N-LD for emacs-devel@gnu.org; Mon, 28 Sep 2020 14:16:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:49174) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMxhF-00077M-Bx; Mon, 28 Sep 2020 14:16:21 -0400 Original-Received: from [176.228.60.248] (port=4618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kMxhE-0003rR-Gl; Mon, 28 Sep 2020 14:16:21 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 28 Sep 2020 13:32:47 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:256632 Archived-At: > From: Stefan Monnier > Date: Mon, 28 Sep 2020 13:32:47 -0400 > > > Ideally I'd like to be able to write the following instead to avoid the > > needless repetition: > > > > (if (fboundp 'recommended-function) > > (recommended-function) > > (old-but-useful-function)) > > Indeed, it's a problem of which I'm aware but I don't know how to solve > it nicely. What about something like the below? (if (> emacs-major-version NN) (defun recommended-function (...) ...))