From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73626: 30.0.91; Type specifiers of functions Date: Sat, 19 Oct 2024 10:01:15 +0300 Message-ID: <867ca4mv9g.fsf@gnu.org> References: <86msjkxdf5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26268"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73626@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 09:02:04 2024 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 1t23TP-0006kv-R1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 09:02:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t23T2-0001fo-Li; Sat, 19 Oct 2024 03:01:40 -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 1t23T2-0001ff-1T for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 03:01:40 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t23T1-0000v1-PA for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 03:01:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=NOcspJIQCmT9rZMZdKftxTxERWdy/3ZphNq+WipJmG0=; b=KU2oBQkiEMblKfK/wF9+ua+Sw0M+QMvw+JwKD5s9RkkRvW5sasnaE6bVXjkV+CNU4fMTMebY70iudghZcuQ7mCuGq/q0B0pbYZCO1j2HhZJuvt3ZaRtJ0m1TSJcZ+rmSCwp3FEOzSPL1NCE09+H2v8BAdPe+nnXv1dlvGk7IkO4ytp5k3A8HKitd5YvN90iIz/uMtjGhQN24zDPsUgZ/qJXNV6etcPvn+uvyqw5k2Zi+RrIad8t83GWJJRO3dBCB7pWPZvK0mbchFUMbRSVgBuAAn/j+dh4RXqYA/H9Ojxi49Av97I2XThZwHsDia1DKA+jpBdIgqpDKkECmQ4KjhA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t23TP-0006xP-3c for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 03:02:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 07:02:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73626 X-GNU-PR-Package: emacs Original-Received: via spool by 73626-submit@debbugs.gnu.org id=B73626.172932130926713 (code B ref 73626); Sat, 19 Oct 2024 07:02:03 +0000 Original-Received: (at 73626) by debbugs.gnu.org; 19 Oct 2024 07:01:49 +0000 Original-Received: from localhost ([127.0.0.1]:41072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t23TB-0006wn-4O for submit@debbugs.gnu.org; Sat, 19 Oct 2024 03:01:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t23T9-0006wW-Am for 73626@debbugs.gnu.org; Sat, 19 Oct 2024 03:01:47 -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 1t23Sg-0000rl-LK for 73626@debbugs.gnu.org; Sat, 19 Oct 2024 03:01:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=NOcspJIQCmT9rZMZdKftxTxERWdy/3ZphNq+WipJmG0=; b=W67joeAvvYAlx3GnA2MP wz4Jto4EqIXtnhvQf+3y2cNKfyfewjr1udBbaBPPxVc3GW28oe0Hw1Xss6mjiGwevFKKBwnGRuyAc YYXGocnJ9pWD2g1DQFfyfoQlmPn+kypOCgSYBDaDKJ9Pt8rIC1DMcFrHGMXRBLgmQ4RQi+uz4elRV sAEZhQQlMgsor8nMmXykl8+GJ4Fs5XBzhZ0jF8LxQNDHAPf3O+ZLEson9KGx/tNPA0eBVfaYc8+eS fRWQyoJ+MBn5DM9RAKo65L/QGNMNlZoc74u1RYe7KNYZ35weGSCZFAAZm9MeUc1xDuhMlAoPkYj8B inUg4rpsMMOF3Q==; In-Reply-To: <86msjkxdf5.fsf@gnu.org> (message from Eli Zaretskii on Fri, 04 Oct 2024 15:25:50 +0300) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293836 Archived-At: Ping! > Cc: Andrea Corallo > Date: Fri, 04 Oct 2024 15:25:50 +0300 > From: Eli Zaretskii > > To reproduce: > > emacs -Q > C-h f sort-lines RET > > (That particular function is just an example, basically, any function > should do.) > > Observe in the *Help* buffer: > > sort-lines is an autoloaded interactive byte-code-function in > ‘sort.el’. > > (sort-lines REVERSE BEG END) > > If sort.el was native-compiled, you will see this instead: > > sort-lines is an autoloaded interactive native-comp-function in > ‘sort.el’. > > (sort-lines REVERSE BEG END) > > So far so good, but in a long-running Emacs session I see this: > > sort-lines is an autoloaded interactive native-comp-function in > ‘sort.el’. > > (sort-lines REVERSE BEG END) > > Inferred type: (function (t t t) t) <<<<<<<<<<<<<<<<<<<<<< > > and sometimes this: > > bobp is a primitive-function in ‘src/editfns.c’. > > (bobp) > > Declared type: (function nil boolean) <<<<<<<<<<<<<<<<<<<<< > > These Declared/Inferred type thingies are not documented anywhere, > AFAICT. If one looks really hard, one can find in "Declare Form" the > description of "(ftype TYPE &optional FUNCTION)", but still nothing > about declared/inferred. I see in help-fns.el:help-fns--signature > that we call comp-function-type-spec to get this information, and the > doc string of comp-function-type-spec says: > > Return the type specifier of FUNCTION. > > But there are no matches for "type specifier" anywhere in the ELisp > manual, and comp-function-type-spec itself is not documented there. > > Even after looking and finding all those pieces of the puzzle, the > overall picture is not clear. The following is missing, and should be > documented in the ELisp manual: > > . what is the importance of inferred vs declared type > . how to read the type specifiers, and in particular what do those > "t" members mean, and more generally, which forms can appear in the > car of the cons cell returned by comp-function-type-spec > . why "C-h f" shows this information only for some functions and not > for others, and what is the significance of that > > Bottom line: we decided that this information is important enough to > show it in the *Help* buffer, so we should explain its arcane parts to > make them useful. > > In GNU Emacs 30.0.91 (build 26, i686-pc-mingw32) of 2024-10-04 built on > ELIZ-PC > Windowing system distributor 'Microsoft Corp.', version 10.0.22631 > System Description: Microsoft Windows 10 Enterprise (v10.0.2009.22631.4169) > > Configured using: > 'configure -C --prefix=/d/usr --with-wide-int > --enable-checking=yes,glyphs --without-native-compilation 'CFLAGS=-O0 > -gdwarf-4 -g3'' > > Configured features: > ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES NOTIFY W32NOTIFY > PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS > TREE_SITTER WEBP XPM ZLIB > > Important settings: > value of $LANG: ENU > locale-coding-system: cp1252 > > Major mode: Lisp Interaction > > Minor modes in effect: > tooltip-mode: t > global-eldoc-mode: t > eldoc-mode: t > show-paren-mode: t > electric-indent-mode: t > mouse-wheel-mode: t > tool-bar-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > font-lock-mode: t > blink-cursor-mode: t > minibuffer-regexp-mode: t > line-number-mode: t > indent-tabs-mode: t > transient-mark-mode: t > auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > > Load-path shadows: > None found. > > Features: > (shadow mail-extr emacsbug message mailcap yank-media puny dired > dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 > epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode > mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 > rfc2045 ietf-drums mm-util mail-prsvr mail-utils shortdoc > text-property-search comp-common rx sort thingatpt help-fns radix-tree > help-mode cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren > electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel > touch-screen dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars > term/common-win tool-bar dnd fontset image regexp-opt fringe > tabulated-list replace newcomment text-mode lisp-mode prog-mode register > page tab-bar menu-bar rfn-eshadow isearch easymenu timer select > scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors > frame minibuffer nadvice seq simple cl-generic indonesian philippine > cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao > korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech > european ethiopic indian cyrillic chinese composite emoji-zwj charscript > charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure > cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp > files window text-properties overlay sha1 md5 base64 format env > code-pages mule custom widget keymap hashtable-print-readable backquote > threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process > emacs) > > Memory information: > ((conses 16 62131 14624) (symbols 48 7053 0) (strings 16 20202 2856) > (string-bytes 1 391879) (vectors 16 10151) > (vector-slots 8 115928 8847) (floats 8 79 4) (intervals 40 346 149) > (buffers 896 11)) > > > >