From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.devel Subject: Re: Inferred function types in the *Help* buffer Date: Thu, 01 Jun 2023 10:09:56 -0400 Message-ID: References: <83o7manh0e.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Andrea Corallo , Eli Zaretskii , emacs-devel To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 01 16:10:57 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 1q4j0y-000AGw-ME for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Jun 2023 16:10:56 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4j04-00046Z-Ga; Thu, 01 Jun 2023 10:10:00 -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 1q4j02-00042D-HY for emacs-devel@gnu.org; Thu, 01 Jun 2023 10:09:58 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4j00-0004d4-Hw; Thu, 01 Jun 2023 10:09:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=rzY9HzfTmLMYmW81IkS4qA7VgQYs6Dag5aaBqopOqqg=; b=RtOe1G5sX5cGGmU9Jl6E 4+i75GMhRZ5GABxaI7nWbTdfsucqtQphozbyLsH4mAfvwXL1BnXuuWxIDZhFlOrDzVZ8/nXVyLb2c oJdS/S14nFBP5vBPQoUySaCXIyurnGkQshbFIZL6tSWi9h63Ox9H/Go8jByP9bZObrgxixGbe8c88 4ddFJ8jChk9+zE/4YiZKkt2TQ595HLQT5xIIcDL8/31u85HW0N+cjNNLVFSxxal0LyMWzljQIdiic kRL+FOnoF7fL1Jd8xH+LBl03HLpl0a2YA/aifJk5eZEAIOS6AfSQZrkaj/Vc3Y+Ai7dVA6OgxrIym y4jPoG2N0/P9vw==; Original-Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1q4j00-0000Ue-9i; Thu, 01 Jun 2023 10:09:56 -0400 In-Reply-To: ("Mattias =?utf-8?Q?Engdeg=C3=A5rd=22's?= message of "Thu, 1 Jun 2023 15:06:24 +0200") 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:306515 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=C3=A5rd writes: [...] > Either I misunderstood what a return value of `boolean` means, or that > list is riddled with errors. The following functions are specified to > return boolean in comp-known-type-specifiers but actually may return > other values as well: > > proper-list-p > buffer-modified-p > coordinates-in-window-p > custom-variable-p > file-locked-p > file-symlink-p > frame-visible-p > framep Okay the attached should address these (please have a look if/when you've time). > and, since we have no guarantees about what file handlers actually return, > > file-directory-p > file-exists-p > file-newer-than-file-p > file-readable-p > file-writable-p 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. Thanks! Andrea --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-emacs-lisp-comp.el-comp-known-type-specifiers-F.patch >From 59383af6b309cd4f6b0340d7d1c8fd90ac71d569 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Thu, 1 Jun 2023 15:53:39 +0200 Subject: [PATCH] * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix a bunch of --- lisp/emacs-lisp/comp.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b2704ae1446..d361b312a60 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -317,7 +317,7 @@ comp-known-type-specifiers (buffer-file-name (function (&optional buffer) (or string null))) (buffer-list (function (&optional frame) list)) (buffer-local-variables (function (&optional buffer) list)) - (buffer-modified-p (function (&optional buffer) boolean)) + (buffer-modified-p (function (&optional buffer) (or boolean (member autosaved)))) (buffer-size (function (&optional buffer) integer)) (buffer-string (function () string)) (buffer-substring (function ((or integer marker) (or integer marker)) string)) @@ -344,7 +344,7 @@ comp-known-type-specifiers (concat (function (&rest sequence) string)) (cons (function (t t) cons)) (consp (function (t) boolean)) - (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)))) (copy-alist (function (list) list)) (copy-marker (function (&optional (or integer marker) boolean) marker)) (copy-sequence (function (sequence) sequence)) @@ -363,7 +363,7 @@ comp-known-type-specifiers (current-time-zone (function (&optional (or number list) (or symbol string cons integer)) cons)) - (custom-variable-p (function (symbol) boolean)) + (custom-variable-p (function (symbol) t)) (decode-char (function (cons t) (or fixnum null))) (decode-time (function (&optional (or number list) (or symbol string cons integer) @@ -392,11 +392,11 @@ comp-known-type-specifiers (ffloor (function (float) float)) (file-directory-p (function (string) boolean)) (file-exists-p (function (string) boolean)) - (file-locked-p (function (string) boolean)) + (file-locked-p (function (string) (or boolean string))) (file-name-absolute-p (function (string) boolean)) (file-newer-than-file-p (function (string string) boolean)) (file-readable-p (function (string) boolean)) - (file-symlink-p (function (string) boolean)) + (file-symlink-p (function (string) (or boolean string))) (file-writable-p (function (string) boolean)) (fixnump (function (t) boolean)) (float (function (number) float)) @@ -411,8 +411,8 @@ comp-known-type-specifiers (frame-first-window (function ((or frame window)) window)) (frame-root-window (function (&optional (or frame window)) window)) (frame-selected-window (function (&optional (or frame window)) window)) - (frame-visible-p (function (frame) boolean)) - (framep (function (t) boolean)) + (frame-visible-p (function (frame) (or boolean (member icon)))) + (framep (function (t) (or boolean (member x w32 ns pc pgtk haiku)))) (fround (function (float) float)) (ftruncate (function (float) float)) (get (function (symbol symbol) t)) @@ -506,7 +506,7 @@ comp-known-type-specifiers (previous-window (function (&optional window t t) window)) (prin1-to-string (function (t &optional t t) string)) (processp (function (t) boolean)) - (proper-list-p (function (t) boolean)) + (proper-list-p (function (t) (or fixnum null))) (propertize (function (string &rest t) string)) (radians-to-degrees (function (number) float)) (rassoc (function (t list) list)) -- 2.25.1 --=-=-=--