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: Inferred function types in the *Help* buffer Date: Thu, 1 Jun 2023 16:50:40 +0200 Message-ID: References: <83o7manh0e.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) 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="4663"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrea Corallo , Eli Zaretskii , emacs-devel To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 01 18:03:32 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 1q4klw-0000rt-I8 for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Jun 2023 18:03:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4klN-0005ai-6C; Thu, 01 Jun 2023 12:02:57 -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 1q4jda-0000dn-9F for emacs-devel@gnu.org; Thu, 01 Jun 2023 10:50:50 -0400 Original-Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4jdV-0004gR-Ek; Thu, 01 Jun 2023 10:50:50 -0400 Original-Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-4f3baf04f0cso1169199e87.1; Thu, 01 Jun 2023 07:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685631042; x=1688223042; 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=t3pvawID9g7m7xMqT15SB80kS7KfwBz3X9u0C6XBeb4=; b=jYHG5Xd8LKITr7T4Y1exmizU7wg3qZV4MDiBPNvbc40Hw5p9saWFP5HTEry29TRhvN 9ft+43TfNnwqarq7l4wyOlChjT8EtYU7kjCbjPzYsDbXFWWDiPThDyoMMxIutSyL7bn8 rGCO1zgUTDW42ETOQiBid/yp0ACiHBny771SRVXPE8fpC7aStWPD3ntABBzSbTAW3XKF TxzEeHb6fV4Sa0+ixFigUEM8MCBfKN8iEXDqR7Bk1ZcBvjL174ofxVNzoewK/TSUbh0m 4l9jWBvrPZqlqRqmcBQlWu9NbbI0cl13NExRR3ngisSR67oVEPFJRsOcwx2+0qCh1Rij IGog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685631042; x=1688223042; 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=t3pvawID9g7m7xMqT15SB80kS7KfwBz3X9u0C6XBeb4=; b=l81tqUfaqhkv/58VSGSJEpmZAIbwLhBxc/TCf9Twf0EjivZ4CE5O/41e3f1bkBX5Wk 9qLimI9gNi0YEc0LgNhRpClSGtQGPZ+HwYUOVLqB6s2hl4N8EeU/Jv8pWBVhZ+qywscR U95rJ7FEc2l6WLpXviJYV1X1ppGDFRJy8hOKBbBpXjEcQ5Uja5DD947xEkaUN0nwElIu wjneZjLHQ2jl5GL/ZsbIjHxY/+uKxzQbl+bTzHR/K/WRQEQXDyb9xEAX6xRrmX1IWLbE 0lGNbhGJ1DX2t2zVcoscVxiQRhxWLs8pFUSFRT+hdq1DfwRQ7PvFU1w3NlwoYJndnr8f ST5g== X-Gm-Message-State: AC+VfDwqPterP1i54/M3GNJoTXqvv/Jzcmp+qoc7Q4A/PTLTpvH/kj0Y JIJ4r9kr/T7JrQJvT5UySwRTkfvvLPc= X-Google-Smtp-Source: ACHHUZ5YR7s1bjgSyPstz1Vml0gPAVW8KVKKLYXIQZSdS8gcHICa3Miib6x0wSmZKMz13ZBJUU1kTQ== X-Received: by 2002:a2e:96d0:0:b0:2ac:78b0:8aef with SMTP id d16-20020a2e96d0000000b002ac78b08aefmr5386645ljj.16.1685631042359; Thu, 01 Jun 2023 07:50:42 -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 u15-20020a2e854f000000b002a9f966f4b3sm3819916ljj.26.2023.06.01.07.50.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2023 07:50:41 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x131.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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 01 Jun 2023 12:02:35 -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:306520 Archived-At: 1 juni 2023 kl. 15.34 skrev Andrea Corallo : > Are you suggesting we need some kind of override method for this? Maybe. It depends on what the purpose of showing the type in the help = test is in the first place. > Again, if you've found these to be incorrect that's a bug we already > have in the code in use. They had to be reported/looked into since > probably the time we noticed this inchoerence for the first time. Sorry, I originally assumed that I had misunderstood what the types = meant and how they were used by the native compiler. After all, I cannot = take it for granted that internals of code found elsewhere should be = neatly arranged for my own purposes. > Aren't the entries we have in agreement with the docstring? If the > docstring is not in sync with the implementation we have either to fix > one o the other I think. It's a policy problem: either we trust handlers to be implemented to = spec or we distrust them just to be on the safe side. Normally we assume = that users follow documented rules or suffer the consequences, but in = this case it may not be the same user who writes the handler and who = calls the function, so it may be fairer to shield the caller by = normalising the return value of all handlers in these and other cases. > - (coordinates-in-window-p (function (cons window) boolean)) > + (coordinates-in-window-p (function (cons window) (or cons (member = bottom-divider right-divider mode-line header-line = tab-lineleft-fringeright-fringevertical-line left-margin = right-margin)))) Typos here (and null is missing). > - (framep (function (t) boolean)) > + (framep (function (t) (or boolean (member x w32 ns pc pgtk = haiku)))) This may be too fragile. Next port won't find this place to add its = name. Of course, if we manage to put these type declarations near the function = definitions then accuracy would likely be better and maintenance easier = (and more likely to take place at all).