From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#43780: 27.1; defvaralias and define-obsolete-variable-alias Date: Sat, 3 Oct 2020 11:16:25 -0700 (PDT) Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24419"; mail-complaints-to="usenet@ciao.gmane.io" To: 43780@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 03 20:17:10 2020 Return-path: Envelope-to: geb-bug-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 1kOm5l-0006Fk-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Oct 2020 20:17:09 +0200 Original-Received: from localhost ([::1]:44692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOm5k-0006aH-N9 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 03 Oct 2020 14:17:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOm5e-0006a8-Az for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2020 14:17:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:32898) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kOm5e-0007VY-1t for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2020 14:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kOm5d-00010g-Ue for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2020 14:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 03 Oct 2020 18:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43780 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16017490063855 (code B ref -1); Sat, 03 Oct 2020 18:17:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2020 18:16:46 +0000 Original-Received: from localhost ([127.0.0.1]:44444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOm5O-000107-7u for submit@debbugs.gnu.org; Sat, 03 Oct 2020 14:16:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:33454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kOm5F-0000zt-A7 for submit@debbugs.gnu.org; Sat, 03 Oct 2020 14:16:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOm5F-0006YX-4g for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2020 14:16:37 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:42174) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOm5B-0007SW-Lz for bug-gnu-emacs@gnu.org; Sat, 03 Oct 2020 14:16:36 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 093IDuvl045185 for ; Sat, 3 Oct 2020 18:16:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=oOg0uNyneBZpkLRo7SEhsToPidR4NUQxgp6F0NNt/vA=; b=GSKcOn1bA3JUq6T5Ywh8fTN24oFvLf6SS6FvcPZjM6WblFrGLE9zmMDwn9RcUvOYX5K0 z5/2fctT9EeHi2yAaFU2Wgywzx8Na1M0ws06Nrh8TC9I+zcLv8yY88RtpjdwbltnpwSx eOP/S0rPDgCHFFrRdKZpfzE0YL6LkXCHYm+6Iqdj/YN0vkwL3HDSdLJwet/rz6eKc1Sr jBqf+XbyRijMTnVLVXIKrPC+SflypstFxdZu9ZQliKbNxntAauKCA51hN+eK6SKRs2+0 /9b41N9qwtfxtyjpRslMbXgBVqHF63T5YfoUMKcCR5uD4eD9mqrmx9HnqaP2BAXliW/x hQ== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 33xh8kh5f4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 03 Oct 2020 18:16:28 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 093IFwCv083371 for ; Sat, 3 Oct 2020 18:16:27 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 33xedsuq8c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 03 Oct 2020 18:16:27 +0000 Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 093IGQds023729 for ; Sat, 3 Oct 2020 18:16:26 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5056.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9763 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 mlxscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 suspectscore=1 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010030154 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9763 signatures=668680 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 suspectscore=1 impostorscore=0 priorityscore=1501 clxscore=1015 phishscore=0 malwarescore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2010030154 Received-SPF: pass client-ip=141.146.126.78; envelope-from=drew.adams@oracle.com; helo=aserp2120.oracle.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/03 14:16:29 X-ACL-Warn: Detected OS = Linux 3.1-3.10 [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189717 Archived-At: I have code that uses `inhibit-null-byte-detection'. Emacs 27 has (unfortunately) used `define-obsolete-variable-alias' to declare that variable obsolete, in favor of the much more erudite and sophisticated `inhibit-null-byte-detection'. I don't want my code to forever give a compiler warning for that, and I don't want to change my code to use (if (boundp...)(...)(...)) everywhere. And I do want it to continue to be compatible with releases before Emacs 27. So I added this, hoping to get back `inhibit-null-byte-detection' without the annoying gratuitous warning: (when (> emacs-major-version 26) (defvaralias 'inhibit-null-byte-detection 'inhibit-nul-byte-detection)) The `define-obsolete-variable-alias' is done by `emacs -Q', and my `defvaralias' comes after that. So I was hoping it would simply make `inhibit-null-byte-detection' a recognized alias of the existing new variable `inhibit-nul-byte-detection' (no?). Alas, the byte-compiler still warns that `inhibit-null-byte-detection' is obsolete. Seems like a bug to me. Why shouldn't the last alias declaration win? Please tell me the best way to leave my code alone, using `inhibit-null-byte-detection', and yet eliminate (only) this byte-compiler warning. Should I just use (put 'inhibit-null-byte-detection 'byte-obsolete-variable nil)? Ideally I'd want to affect only byte-compilation of the given file, and not want to globally change whether `inhibit-null-byte-detection' is considered obsolete. This is a serious question, not rhetorical. (And please don't perform any more such gratuitous renamings that don't really help anyone. There are other, more important things to rename, if someone is overeager enough to really want to start renaming names that aren't perfect.) In GNU Emacs 27.1 (build 1, x86_64-w64-mingw32) of 2020-08-12 built on CIRROCUMULUS Repository revision: 86d8d76aa36037184db0b2897c434cdaab1a9ae8 Repository branch: HEAD Windowing system distributor 'Microsoft Corp.', version 10.0.18362 System Description: Microsoft Windows 10 Pro (v10.0.1903.18362.1082)