From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: New unwind-protect byte-compiler warning Date: Tue, 4 Apr 2023 13:20:59 +0200 Message-ID: <02132809-BAFB-4C1F-BC32-B6C510F3B4E3@gmail.com> References: <0106E951-59EB-42C9-8F99-4182F56C6311@gmail.com> <87fs9ghr96.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.14\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel , Juri Linkov To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Apr 04 14:29:42 2023 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 1pjfnB-0009Fg-M9 for ged-emacs-devel@m.gmane-mx.org; Tue, 04 Apr 2023 14:29:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjfn2-0001BU-4s; Tue, 04 Apr 2023 08:29:32 -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 1pjeim-0005qH-Mh for emacs-devel@gnu.org; Tue, 04 Apr 2023 07:21:04 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pjeik-0001ei-RY for emacs-devel@gnu.org; Tue, 04 Apr 2023 07:21:04 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id br6so41908339lfb.11 for ; Tue, 04 Apr 2023 04:21:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680607260; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:from:to:cc:subject :date:message-id:reply-to; bh=IJ9qIb75k56m6Z2LKR/BmtvbC6k3CDMkzxLGYOy2fp4=; b=XqFpLZWC3VrnIO8PyDB0BF6VEFrIqTigLiOQY4FDsABJmJ4nwBPprbu9LVgDjsmVRj DWkgIXQgndnkFZoaIeFez4haDWYRa2HWw2WjHnrem3Q7A1LR2jrBrMeqIr8uzX/u0aX5 G5lKc/K9wYlEM1u1COAw3S6PlDA2aCbaUUpk3Oy96nS6ypzwNeIjZBfsvUPCULr8Qakz 3f6E3y98lS1aCZS6Zemu0r+7w9wkvitnhy+MWTO0KJ6ddYAPiWXpzerWUEGjjdxQ9o6a x04T5EfrnNKoEqRohcOJceQA+/ouy5qQ4BSO3pH0ZZjdddjIgvpoc+y3mMGDQiRf6DVo 0tFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680607260; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:sender:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=IJ9qIb75k56m6Z2LKR/BmtvbC6k3CDMkzxLGYOy2fp4=; b=MkLNnTA++L4soLTtr9vqjPpK1EAUgLnWJ19C3zbESjs8/80xTDZvy9ajpuB86V67KE k1a0JKYK7jkF5LK7OjbSiObWrs9QZw4MMGAvJI0UVQDhN2VbfKP8tCwQqf3mMhq3gIzO 5Mokuu04eEbQQtoGUSL613EoFOcuA9ddoR6t9F4ocE/2X1Juaa08no2fEj603LSzcA5g yzUW0DOhZf7As87UQ+iLz0zJ+6IeQmSRFI46Tw9ro5cc+yc5+3qoyVb/0SoOujDFY1k8 MtK8CeEPlgdGF3NyG+zmJG2bcLGAsMfwxBqFBCb+LLMkNpZFgM5yvLWvdoq/gJ47J9q8 zQSQ== X-Gm-Message-State: AAQBX9eh3pQzX349jVZXJHxkXTG7qGwox8aYDxvrgJ2iPc0ztrOCsJ+G iXfJ14MzCmbg62dGBFkXT4qz12gCYBM= X-Google-Smtp-Source: AKy350bMtkG6hSEib6NX3lruTbtojXR5vhZe3ayjjp2gPt+TiL+4h46YRdQu8LW+v+I/vRuNyG9hKw== X-Received: by 2002:a05:6512:143:b0:4e9:638d:8438 with SMTP id m3-20020a056512014300b004e9638d8438mr590804lfo.6.1680607260311; Tue, 04 Apr 2023 04:21:00 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id y27-20020ac2447b000000b004e9b183fc5bsm2281368lfl.8.2023.04.04.04.20.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2023 04:21:00 -0700 (PDT) In-Reply-To: <87fs9ghr96.fsf@gmail.com> X-Mailer: Apple Mail (2.3654.120.0.1.14) Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x130.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 04 Apr 2023 08:29:30 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305103 Archived-At: 4 apr. 2023 kl. 12.32 skrev Robert Pluim : > In mouse-wheel-global-text-scale: > mwheel.el:450:6: Warning: =E2=80=98unwind-protect=E2=80=99 without = unwind forms >=20 > is because we=CA=BCre protecting against errors from > `global-text-scale-adjust', but unlike `text-scale-{in,de}crease', > that doesn=CA=BCt signal an error when you reach the scale limit. >=20 > Juri, we can add an unwind form of `t' Note that `unwind-protect` does not itself "protect against errors". An = error signalled by the protected form will still be signalled after = execution of the unwind forms. An unwind form of `t` makes no more sense = than none at all; the value is just thrown away. Evidently there are a few cases of (unwind-protect FORM CONSTANT) in the Emacs tree (and GNU ELPA); it probably makes sense to warn about = them as well since they often arise from a misunderstanding of what = `unwind-protect` does.