From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lloyd Zusman Newsgroups: gmane.emacs.help Subject: Changes to `make-obsolete` and similar functions make upgrades nearly impossible. Date: Sun, 23 Apr 2023 13:56:58 +0000 (UTC) Message-ID: <19fa8e27-3fac-bc1d-0ed7-4c56d40a5351@potamuses.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39306"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.16 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 23 19:26:50 2023 Return-path: Envelope-to: geh-help-gnu-emacs@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 1pqdU9-0009zs-7s for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 23 Apr 2023 19:26:50 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqdU1-0002a2-J5; Sun, 23 Apr 2023 13:26:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqaDC-0005hU-BY for help-gnu-emacs@gnu.org; Sun, 23 Apr 2023 09:57:06 -0400 Original-Received: from aaa-aardvark.net ([45.33.123.70]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqaDA-0006tq-Ij for help-gnu-emacs@gnu.org; Sun, 23 Apr 2023 09:57:06 -0400 Original-Received: from aaa-aardvark.net (localhost [127.0.0.1]) by aaa-aardvark.net (Postfix) with ESMTP id B7255288A08 for ; Sun, 23 Apr 2023 09:56:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=potamuses.net; s=kabaotoko; t=1682258218; bh=MHOonLsC9dEeDbxLLoldOgXb8zgnC+6/z08Ds34Je3A=; h=To:From:Subject:Date:From; b=RojGPBh98J3l6SVjom1vQduMI85k6GC/lFgaXkgK/CJ8LTzjBpvjSUmSySdbx5VjX 6v/b+PkDds67m7sJQbKhfZfbcEfEVZrSq5UBXMxk6G35eO5ELJFCd37LjhVqb/pO3S Sx6nmBShXE9rS9B+owmZvJyJbuNgzy/x0Wq1Y9wtoI56lYJyxHbrvYycIu++6bixjt rrUrIHAA1MzOex1IeTND2QxtURqbVa//dICXY/QmxEKYw1y10guedxDQKO2E8Kga6i Cmic/glea/cR90hn+VNH/MWYIxVs06ExOPWwZJXb2MERdQtHjtpl+MQh2O0nbZqzAw vYfAmD4BC35cw== DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=javasig.com,; h=to:from :subject:message-id:mime-version:content-type :content-transfer-encoding:date; s=k2010; bh=Ibgm+ztW9j7LGnxYHVI zP+BflFw=; b=SUX11HyRlDWcWqtHU7aq1m5sZQ+Zq6iTm49w5Cvu0AjuSGU0n94 elL0RljT56s5SwN+61tFhuZ4Nmv4Gv8L1xUiNRRjYTOFaCh9BxlT72bvfUFJ7/lS LQdeR7/56vE9cdz/Wyrs8Gc/US83GSl3OcblvbGGAU7jv12Fk5c4azjI= Original-Received: from [173.56.31.34] (static-173-56-31-34.nycmny.fios.verizon.net [173.56.31.34]) by aaa-aardvark.net (Postfix) with ESMTPSA id 7F10728542F for ; Sun, 23 Apr 2023 09:56:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=potamuses.net; s=kabaotoko; t=1682258218; bh=MHOonLsC9dEeDbxLLoldOgXb8zgnC+6/z08Ds34Je3A=; h=To:From:Subject:Date:From; b=RojGPBh98J3l6SVjom1vQduMI85k6GC/lFgaXkgK/CJ8LTzjBpvjSUmSySdbx5VjX 6v/b+PkDds67m7sJQbKhfZfbcEfEVZrSq5UBXMxk6G35eO5ELJFCd37LjhVqb/pO3S Sx6nmBShXE9rS9B+owmZvJyJbuNgzy/x0Wq1Y9wtoI56lYJyxHbrvYycIu++6bixjt rrUrIHAA1MzOex1IeTND2QxtURqbVa//dICXY/QmxEKYw1y10guedxDQKO2E8Kga6i Cmic/glea/cR90hn+VNH/MWYIxVs06ExOPWwZJXb2MERdQtHjtpl+MQh2O0nbZqzAw vYfAmD4BC35cw== X-Orig-Date: Sun, 23 Apr 2023 09:56:57 -0400 X-Delivery-Timestamp: Sun, 23 Apr 2023 13:56:58 +0000 (UTC) Received-SPF: pass client-ip=45.33.123.70; envelope-from=hippoman@potamuses.net; helo=aaa-aardvark.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 23 Apr 2023 13:26:39 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143353 Archived-At: I'm a very long-term GNU emacs user: since the 1980's. I have been using numerous elisp packages, lots of which date back many years, and a few of my own elisp modules go all the way back to the 1980's. I have been using emacs-27.2 for a few years, and now I decided to upgrade again. However, when going to emacs-28.2, I hit an issue with the following emacs enhancement (this comes from the emacs change log): > 2021-01-03 Stefan Monnier > > * lisp/emacs-lisp/byte-run.el (make-obsolete): Make `when` mandatory > > (define-obsolete-function-alias, make-obsolete-variable) > (define-obsolete-variable-alias): Adjust similarly. Because of `when` becoming mandatory, I now get literally hundreds of messages which look like this when starting up emacs-28.2 ... > Warning (comp): /path/to/some-elisp-module.el: Error: Wrong number of arguments make-obsolete-variable I know that I can get rid of these messages by upgrading each and every one of my installed emacs packages. However, I have several dozens of these packages, and some are old, no-longer-maintained modules. It would take me a huge amount of time to replace the packages that are upgradable and to manually go into all of the no-longer-maintained packages and change the calling sequence of `make-obsolete` and the others. If the `when` parameter was not made mandatory in `make-obsolete` and its cousins, I would not have to do this huge amount of work to upgrade emacs. The `make-obsolete` family of functions are meant to help during upgrading. However, changing the mandatory/non-mandatory parameter semantics of those functions is actually an *impediment* to upgrading. Is there any existing fix for this problem short of the massive amount of work needed for me to upgrade and fix all my existing emacs packages? I'm thinking of doing something like the following. Put code like this at the top of my $HOME/.emacs file: > (if (not (fboundp 'orig-make-obsolete)) > (fset 'orig-make-obsolete > (symbol-function 'make-obsolete))) > (fmakunbound 'make-obsolete) > (unintern 'make-obsolete) > (defun make-obsolete (obsolete-name current-name &optional when-var) > (when when-var > (orig-make-obsolete obsolete-name current-name when-var))) ... or something like that. Is this kind of workaround my only hope for avoiding the huge amount of work necessary to upgrade and fix the code in all of my existing emacs packages? ... and what do you folks think about the possibility of making the `when` parameter optional again? Thank you in advance for any thoughts and suggestions. -- Lloyd Zusman hippoman@potamuses.net God bless you. .---------, 0__0 / ( oo'---, / oo\ ,\ | | \ ,=__/ \ / / /------| /| |__|-' |__|'