From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Aidan Kehoe Newsgroups: gmane.emacs.bugs Subject: bug#32979: 27.0.50; Oddity in #'keywordp comments. Date: Sun, 7 Oct 2018 23:03:25 +0100 Message-ID: <5bba.82ad.afd6b.dba0@parhasard.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1538949726 11794 195.159.176.226 (7 Oct 2018 22:02:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2018 22:02:06 +0000 (UTC) To: 32979@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 08 00:02:02 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9H7i-0002v8-CY for geb-bug-gnu-emacs@m.gmane.org; Mon, 08 Oct 2018 00:02:02 +0200 Original-Received: from localhost ([::1]:43636 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9H9o-0003bx-K9 for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Oct 2018 18:04:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9H9i-0003bl-9e for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:04:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9H9e-0000mC-T3 for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:04:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35455) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g9H9e-0000ld-KV for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g9H9e-00037V-EV for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Aidan Kehoe Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Oct 2018 22:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 32979 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153894982511965 (code B ref -1); Sun, 07 Oct 2018 22:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Oct 2018 22:03:45 +0000 Original-Received: from localhost ([127.0.0.1]:39713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9H9M-00036v-QQ for submit@debbugs.gnu.org; Sun, 07 Oct 2018 18:03:45 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g9H9L-00036j-1Z for submit@debbugs.gnu.org; Sun, 07 Oct 2018 18:03:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9H9E-0008UJ-P2 for submit@debbugs.gnu.org; Sun, 07 Oct 2018 18:03:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55136) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g9H9E-0008U3-K4 for submit@debbugs.gnu.org; Sun, 07 Oct 2018 18:03:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9H9D-0003XH-Fs for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:03:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g9H9A-0008Pz-A9 for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:03:35 -0400 Original-Received: from mail.parhasard.net ([88.198.122.198]:32830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g9H99-0008PH-RI for bug-gnu-emacs@gnu.org; Sun, 07 Oct 2018 18:03:32 -0400 Original-Received: by mail.parhasard.net (Postfix, from userid 1000) id A5BE04A234E; Mon, 8 Oct 2018 00:03:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=parhasard.net; s=mail; t=1538949808; bh=hikJtkGXZyZzmxtnv/sXRzpAlzRvjn+/EkTOBzdUitU=; h=From:Date:To:Subject:From; b=UuEdEl3nBs6DM/FVQ97hnt+vxn1kWRUSqhKqQbRaRZXlTeK80cDGkFPgaIgMpcZKr ERJoyPa19mYywuN5o8f5iBT/9B1viTQcmOqNzqGQd4hms08L/zTDdcRr+tyN+eccx7 vgRB5kDN9yWd978u8Qbl5uWg9Vorb3z4Z8nAokaI= X-Mailer: VM 8.2.0b under 21.5 (beta34) "kale" 0f7b7204a7ff+ XEmacs Lucid (i386-apple-darwin10.8.0) X-NS5-file-as-sent: t X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:150995 Archived-At: When I read the source for the Lisp function #'keywordp, in data.c, I encounter the following: /* Define this in C to avoid unnecessarily consing up the symbol name. */ DEFUN ("keywordp", Fkeywordp, Skeywordp, 1, 1, 0, doc: /* Return t if OBJECT is a keyword. This means that it is a symbol with a print name beginning with `:' interned in the initial obarray. */) (Lisp_Object object) { if (SYMBOLP (object) && SREF (SYMBOL_NAME (object), 0) =3D=3D ':' && SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (object)) return Qt; return Qnil; } It's completely reasonable to implement the #'keywordp predicate in C giv= en the internal GNU Emacs approach to keywords. The equivalent Lisp implementation of: (defun keywordp (object) (and object (symbolp object) (eq ?: (aref (symbol-name object) 0)) (eq object (intern-soft (symbol-name object) obarray)))) involves a hash table lookup after a Lisp funcall, and checking #'keyword= p should be cheap. The comment, however, has nothing to do with anything, t= here is no consing or other dynamic memory allocation at any point, neither in= the obvious Lisp implementation, the old cl-compat.el implementation of 20.7,= nor the current code. The comment should be removed. In GNU Emacs 27.0.50 (build 1, i386-apple-darwin10.8.0, NS appkit-1038.36= Version 10.6.8 (Build 10K549)) of 2018-08-25 built on bonbon Repository revision: 161139a42c02cce051c51fb80c6ae00c9e6beaa6 Windowing system distributor 'Apple', version 10.3.1038 System Description: Mac OS X 10.6.8 Recent messages: Mark set [2 times] Entering debugger... Back to top level Quit s-< is undefined C-x C-g is undefined Mark set [2 times] Mark saved where search started Quit Mark set Configured using: 'configure CC=3Dgcc-4.2 CFLAGS=3D-fobjc-exceptions PKG_CONFIG_PATH=3D/usr/pkg/lib/pkgconfig:/X11/lib/pkgconfig' Configured features: RSVG IMAGEMAGICK DBUS NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS THREADS LCMS2 Important settings: value of $LANG: de_DE.UTF-8 locale-coding-system: utf-8-unix Major mode: C/*l Minor modes in effect: diff-auto-refine-mode: t tooltip-mode: t global-eldoc-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils misearch multi-isearch vc-git diff-mode easy-mmode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs thingatpt find-func help-fns radix-tree cl-print debug backtrace help-mode easymenu cl-loaddefs cl-lib elec-pair time-date tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 8 238509 10624) (symbols 24 23285 1) (strings 16 38140 2495) (string-bytes 1 1151011) (vectors 12 40088) (vector-slots 4 878428 30532) (floats 8 55 214) (intervals 28 1547 405) (buffers 536 17)) --=20 =E2=80=98As I sat looking up at the Guinness ad, I could never figure out= / How your man stayed up on the surfboard after forty pints of stout=E2=80=99 (C. Moore)