From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: agrambot@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2017 21:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27718@debbugs.gnu.org Cc: Alex X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Alex Received: via spool by submit@debbugs.gnu.org id=B.15001553563378 (code B ref -1); Sat, 15 Jul 2017 21:50:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jul 2017 21:49:16 +0000 Received: from localhost ([127.0.0.1]:40749 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWUw7-0000sP-RB for submit@debbugs.gnu.org; Sat, 15 Jul 2017 17:49:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36020) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWUw5-0000sC-M7 for submit@debbugs.gnu.org; Sat, 15 Jul 2017 17:49:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWUvz-0005Nv-QY for submit@debbugs.gnu.org; Sat, 15 Jul 2017 17:49:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dWUvz-0005Np-NO for submit@debbugs.gnu.org; Sat, 15 Jul 2017 17:49:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWUvw-00051Z-3p for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 17:49:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWUvs-0005K1-7t for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 17:49:04 -0400 Received: from mail-io0-x234.google.com ([2607:f8b0:4001:c06::234]:33664) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWUvs-0005Jn-2y for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 17:49:00 -0400 Received: by mail-io0-x234.google.com with SMTP id h64so28447752iod.0 for ; Sat, 15 Jul 2017 14:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=G/d1+QFuTandEzcpI9J/QYxUWXKhn/ir4kxuTJOdnXQ=; b=hXsn52PEmzUskvt57AARwAxAh8xpXbT6hsX7D7CCysvzb1CShSpobEmuAU+X80WrG5 Ns6b5RvWXK6msNXC2PeBPT8Iqjt55Jaihao9NhldNTGa6rMfo0t9nRlv+cy50rq7lSm7 BwsPeeiqkfg065Pi6tO+GL6ALzQxF5GSDyCK7D9KW/Ery7I+SiX8z73Qj8+sRp4JCj37 QkQFu/v6UNjyq9wsLLVCdyGEq11m4rUTVw8jG/odmSS/Jpedy3oPPB+LUui+v5iICSjU aHCN4IK6SvfgVRiUEkT/cRHIGuZhGmByLOrp7lZ29gRps6e0GkWQZRdBBNaTZb1gXsco B0Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=G/d1+QFuTandEzcpI9J/QYxUWXKhn/ir4kxuTJOdnXQ=; b=d88jh+4ofSfWNGhvX9IgLMlPuBMd0rInDXC7jx/BVs10dFj0V/z06pIlfLXbjyEs38 vI9xLPfirQvuKUEU04z0sALL9V0rJtambzKScYGUrki1EYRjYvEv/KFxRnohN20rYebM Xxr6fQyLBUYiTcYgxp6Q1OiOsessvV1KrlSJ1dL3G5kDwG6hgsnJI8efZlFOQAf5stZH oexJaKfwAZDPIb7kyX52hSb7E7thqTYiw/gMLQX38dDkjVS4+8a1ZMPRrg3QyQW6WzBj 4rEG2YpgGcvVCLcJCl/dBOwp3rA5PdP/6aAN3U72Y6c8vFYP9/j7oYt1HYOVG4ssc17m H9sQ== X-Gm-Message-State: AIVw113jNiI45/+UZKXS3VrmXjG0DL6D62OI5ewUjGM2MGnk43/acNMk 1/CGNYMxPNoIgz7q X-Received: by 10.107.142.134 with SMTP id q128mr15138352iod.100.1500155339174; Sat, 15 Jul 2017 14:48:59 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id t7sm4667424ita.1.2017.07.15.14.48.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 15 Jul 2017 14:48:58 -0700 (PDT) From: npostavs@users.sourceforge.net Date: Sat, 15 Jul 2017 17:50:32 -0400 Message-ID: <87tw2dcqtz.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ~/src/emacs$ .../emacs -Q -batch -f batch-byte-compile cl-typep-subclas= s.el ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.el (cl-typep eitest-ab =E2=80=99class-a) =3D> t ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.elc (cl-typep eitest-ab =E2=80=99class-a) =3D> nil Where cl-typep-subclass.el is --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=cl-typep-subclass.el Content-Description: test file (require 'eieio) (require 'eieio-base) (require 'eieio-opt) (eval-when-compile (require 'cl-lib)) (defclass class-a () () "Class A") (defclass class-b () () "Class B") (defclass class-ab (class-a class-b) () "Class A and B combined.") (defvar eitest-ab nil) (setq eitest-ab (class-ab)) (message "(cl-typep eitest-ab 'class-a) => %S" (cl-typep eitest-ab 'class-a)) --=-=-= Content-Type: text/plain This test case is a reduction from test/lisp/emacs-lisp/eieio-tests/eieio-tests.el. You can see that tests 23 and 24 will fail when you do 'make eieio-tests TEST_LOAD_EL=no'. In GNU Emacs 26.0.50 (build 64, x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars) of 2017-07-15 built on zony Repository revision: b30ee0c9225bad6e3fd0b511a6c5d9a64b8fd66a Windowing system distributor 'The X.Org Foundation', version 11.0.11901000 Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured using: 'configure --cache-file=../debug-config.cache 'CFLAGS=-O0 -g3 -march=native' --enable-checking=yes,glyphs --enable-check-lisp-object-type MAKEINFO=makeinfo-4.13a --with-x-toolkit=lucid --with-toolkit-scroll-bars --with-gif=no --with-jpeg=no' Configured features: XPM TIFF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11 LIBSYSTEMD --=-=-=-- From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2017 12:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 27718@debbugs.gnu.org Cc: Stefan Monnier , Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150063970011940 (code B ref 27718); Fri, 21 Jul 2017 12:22:02 +0000 Received: (at 27718) by debbugs.gnu.org; 21 Jul 2017 12:21:40 +0000 Received: from localhost ([127.0.0.1]:50440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYWw8-00036V-1t for submit@debbugs.gnu.org; Fri, 21 Jul 2017 08:21:40 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:37840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYWw5-000368-Ju; Fri, 21 Jul 2017 08:21:38 -0400 Received: by mail-it0-f47.google.com with SMTP id v127so6505018itd.0; Fri, 21 Jul 2017 05:21:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=3WRDQv/D9YEDnoOeSVNG21NQJTbvcyKFvQJ0i8/CgQM=; b=TNMmm6cluYH/GREgontoYS2JRdwF0BvJ2De6MHwJtxfy8HjR6Tplc/KUsXSGVTFcSG D1WcqGosaWMdgFprXZ0Pfz07L151edAap0wBBDfgao+Qs1wBIhGmnWiK7Lx5U+B7QrZw /mACzNA53GB9G0bTo4myNUsz9teiKGx/rVsNaguNazXjvDINL/l5DJaL9gjDheE+w3ed 4t379GTX9iQTWAjsMoUZr6Yj3vr2O7xZ/3wUTe+LStBA4PPvXjJtBYD9Y68TXERWsfUR WX7Ty1nd196FCxjZyUDs6u7cUfIBusaS6Ry2fnIePIXV0b+eY09C6Eo/BsUkqi+Hh+II rnNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=3WRDQv/D9YEDnoOeSVNG21NQJTbvcyKFvQJ0i8/CgQM=; b=Mcx47eb63PXBnKdgrk5JFqeJvskBjoejojsYrQPXXlzKtzmo8PvgLgpZh1q7YkpDdb ay8eGe4lhWURhoqP1jeyQbmrIGBR8cx5Z1rmLF/G95y0V9uMinZtif5xtukYyUGjsT/2 rM7TU62MTwTSjL6fY+oloNfh1gV413f/QDUdiOroREDZGEkQEX4uRuelJNSb9K5ioAXF nFn+lcL6WxiQFi/V5b0/NAZs67kNvep6F/VioDYuEDCl1N5FXFbmWoabvdbvy7iJX8Uf xquxVcjPTydOrCiPXXJ/9Kyqv+voXJlbuQ4nWzCS4giJ8Va2DHf/zZZRIq1AIG0dTQ6p QCtw== X-Gm-Message-State: AIVw112rbupuat4xFgUIRHtpv83JBdOUgivQuRgGpSgmcXyk04WIXEg/ dxTIahgOaBAptxaa X-Received: by 10.36.92.77 with SMTP id q74mr6897338itb.24.1500639691681; Fri, 21 Jul 2017 05:21:31 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id t131sm166972itb.0.2017.07.21.05.21.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Jul 2017 05:21:30 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87tw2dcqtz.fsf@users.sourceforge.net> Date: Fri, 21 Jul 2017 08:23:03 -0400 In-Reply-To: <87tw2dcqtz.fsf@users.sourceforge.net> (npostavs@users.sourceforge.net's message of "Sat, 15 Jul 2017 17:50:32 -0400") Message-ID: <87inim9dy0.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tags 27718 + patch quit npostavs@users.sourceforge.net writes: > ~/src/emacs$ .../emacs -Q -batch -f batch-byte-compile cl-typep-subcl= ass.el > ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.el > (cl-typep eitest-ab =E2=80=99class-a) =3D> t > ~/src/emacs$ .../emacs -Q -batch -l cl-typep-subclass.elc > (cl-typep eitest-ab =E2=80=99class-a) =3D> nil lisp/emacs-lisp/eieio.el:260: (defmacro defclass (name superclasses slots &rest options-and-doc) ... ;; When using typep, (typep OBJ 'myclass) returns t for objects = which ;; are subclasses of myclass. For our predicates, however, it is ;; important for EIEIO to be backwards compatible, where ;; myobject-p, and myobject-child-p are different. ;; "cl" uses this technique to specify symbols with specific typ= ep ;; test, so we can let typep have the CLOS documented behavior ;; while keeping our above predicate clean. (put ',name 'cl-deftype-satisfies #',testsym2) The problem is that the `put' doesn't take effect until runtime, so the compiler inlines `cl-typep' incorrectly. Using `function-put' here (and `function-get' in `cl-typep') solves it (requires also the patches for #27016[1]), although it seems a bit coincidental that `class-a' happens to be a function as well, so I'm not sure if this is the right thing. Stefan, any thoughts? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v1-0001-Fix-cl-typep-instance-ab-class-a-compilation-Bug-.patch Content-Description: patch >From 4ea34c9da04c8eabc754f2ca64ef4e2ac7c59cac Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 21 Jul 2017 07:59:21 -0400 Subject: [PATCH v1] Fix (cl-typep instance-ab 'class-a) compilation (Bug#27718) Using `function-put' instead of `put' for the `cl-deftype-satisfies' property lets the compiler know about it while compiling the file so that any calls to `cl-typep' will be inlined correctly. * lisp/emacs-lisp/eieio.el (defclass): Use `function-put' for the `cl-deftype-satisfies' property. * lisp/emacs-lisp/cl-macs.el (cl-typep): Also use `function-get' to check the 'cl-deftype-satisfies' property. --- lisp/emacs-lisp/cl-macs.el | 7 +++++-- lisp/emacs-lisp/eieio.el | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 451e6490d7..f5a4f99aad 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -2991,8 +2991,11 @@ (define-inline cl-typep (val type) ((and (pred symbolp) type (guard (get type 'cl-deftype-handler))) (inline-quote (cl-typep ,val ',(funcall (get type 'cl-deftype-handler))))) - ((and (pred symbolp) type (guard (get type 'cl-deftype-satisfies))) - (inline-quote (funcall #',(get type 'cl-deftype-satisfies) ,val))) + ((and (pred symbolp) type (guard (or (function-get type 'cl-deftype-satisfies) + (get type 'cl-deftype-satisfies)))) + (inline-quote (funcall #',(or (function-get type 'cl-deftype-satisfies) + (Get type 'cl-deftype-satisfies)) + ,val))) ((and (or 'nil 't) type) (inline-quote ',type)) ((and (pred symbolp) type) (let* ((name (symbol-name type)) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 1a7de55fce..2c333c16f4 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -246,7 +246,7 @@ (defmacro defclass (name superclasses slots &rest options-and-doc) ;; test, so we can let typep have the CLOS documented behavior ;; while keeping our above predicate clean. - (put ',name 'cl-deftype-satisfies #',testsym2) + (function-put ',name 'cl-deftype-satisfies #',testsym2) (eieio-defclass-internal ',name ',superclasses ',slots ',options-and-doc) -- 2.11.1 --=-=-= Content-Type: text/plain > You can see that tests 23 and 24 will fail when you do 'make > eieio-tests TEST_LOAD_EL=no'. This actually isn't true until the patch for #24402[2] is applied. [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27016#140 [2]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24402#71 --=-=-=-- From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2017 13:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150064320824005 (code B ref 27718); Fri, 21 Jul 2017 13:21:02 +0000 Received: (at 27718) by debbugs.gnu.org; 21 Jul 2017 13:20:08 +0000 Received: from localhost ([127.0.0.1]:50477 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYXqh-0006F7-WB for submit@debbugs.gnu.org; Fri, 21 Jul 2017 09:20:08 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:37861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYXqf-0006EQ-3K for 27718@debbugs.gnu.org; Fri, 21 Jul 2017 09:20:06 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DZDwCi/nFZ/9vnr2xcHAEBBAEBCgEBg1pkgRSDKIVXhgCQcywBR4c7j2cshRUEAgKDfkQUAQIBAQEBAQEBayhCEAGERQEBAQECAVYjBQsLEQMBAh0SFA0LDRYhihcDDQgQsGSHOw2DWwEBAQEBAQEDAQEBAQEeBYMohS6CcDSCV0+HOAWQXY4zPIdLh2CQEIcWjBCID4FENiGBCjEhCDCGEYFqJDYBgxqGbAEBAQ X-IPAS-Result: A0DZDwCi/nFZ/9vnr2xcHAEBBAEBCgEBg1pkgRSDKIVXhgCQcywBR4c7j2cshRUEAgKDfkQUAQIBAQEBAQEBayhCEAGERQEBAQECAVYjBQsLEQMBAh0SFA0LDRYhihcDDQgQsGSHOw2DWwEBAQEBAQEDAQEBAQEeBYMohS6CcDSCV0+HOAWQXY4zPIdLh2CQEIcWjBCID4FENiGBCjEhCDCGEYFqJDYBgxqGbAEBAQ X-IronPort-AV: E=Sophos;i="5.40,390,1496116800"; d="scan'208";a="320920884" Received: from 108-175-231-219.dsl.teksavvy.com (HELO pastel.home) ([108.175.231.219]) by smtp.teksavvy.com with ESMTP; 21 Jul 2017 09:19:58 -0400 Received: by pastel.home (Postfix, from userid 20848) id B020F641C1; Fri, 21 Jul 2017 09:19:58 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> Date: Fri, 21 Jul 2017 09:19:58 -0400 In-Reply-To: <87inim9dy0.fsf@users.sourceforge.net> (npostavs's message of "Fri, 21 Jul 2017 08:23:03 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > The problem is that the `put' doesn't take effect until runtime, so the > compiler inlines `cl-typep' incorrectly. Using `function-put' here (and > `function-get' in `cl-typep') solves it (requires also the patches for > #27016[1]), although it seems a bit coincidental that `class-a' happens > to be a function as well, so I'm not sure if this is the right thing. > Stefan, any thoughts? Hmm... I agree that using the same approach as that of bug#27016 is right, but indeed `name` doesn't refer to a function but to the name of a type (the property doesn't apply to the value stored in the symbol-function cell and shouldn't follow alias definitions). So maybe rather than hijack function-get/put in bug#27016, we should introduce a new "definitional put" with a corresponding `get`, and then use that here as well as in function-put/get. Maybe we could simply change put&get directly without introducing yet-another slightly different get/put? Stefan > From 4ea34c9da04c8eabc754f2ca64ef4e2ac7c59cac Mon Sep 17 00:00:00 2001 > From: Noam Postavsky > Date: Fri, 21 Jul 2017 07:59:21 -0400 > Subject: [PATCH v1] Fix (cl-typep instance-ab 'class-a) compilation > (Bug#27718) > Using `function-put' instead of `put' for the `cl-deftype-satisfies' > property lets the compiler know about it while compiling the file so > that any calls to `cl-typep' will be inlined correctly. > * lisp/emacs-lisp/eieio.el (defclass): Use `function-put' for the > `cl-deftype-satisfies' property. > * lisp/emacs-lisp/cl-macs.el (cl-typep): Also use `function-get' to > check the 'cl-deftype-satisfies' property. > --- > lisp/emacs-lisp/cl-macs.el | 7 +++++-- > lisp/emacs-lisp/eieio.el | 2 +- > 2 files changed, 6 insertions(+), 3 deletions(-) > diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el > index 451e6490d7..f5a4f99aad 100644 > --- a/lisp/emacs-lisp/cl-macs.el > +++ b/lisp/emacs-lisp/cl-macs.el > @@ -2991,8 +2991,11 @@ (define-inline cl-typep (val type) > ((and (pred symbolp) type (guard (get type 'cl-deftype-handler))) > (inline-quote > (cl-typep ,val ',(funcall (get type 'cl-deftype-handler))))) > - ((and (pred symbolp) type (guard (get type 'cl-deftype-satisfies))) > - (inline-quote (funcall #',(get type 'cl-deftype-satisfies) ,val))) > + ((and (pred symbolp) type (guard (or (function-get type 'cl-deftype-satisfies) > + (get type 'cl-deftype-satisfies)))) > + (inline-quote (funcall #',(or (function-get type 'cl-deftype-satisfies) > + (Get type 'cl-deftype-satisfies)) > + ,val))) > ((and (or 'nil 't) type) (inline-quote ',type)) > ((and (pred symbolp) type) > (let* ((name (symbol-name type)) > diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el > index 1a7de55fce..2c333c16f4 100644 > --- a/lisp/emacs-lisp/eieio.el > +++ b/lisp/emacs-lisp/eieio.el > @@ -246,7 +246,7 @@ (defmacro defclass (name superclasses slots &rest options-and-doc) > ;; test, so we can let typep have the CLOS documented behavior > ;; while keeping our above predicate clean. > - (put ',name 'cl-deftype-satisfies #',testsym2) > + (function-put ',name 'cl-deftype-satisfies #',testsym2) > (eieio-defclass-internal ',name ',superclasses ',slots ',options-and-doc) > -- > 2.11.1 >> You can see that tests 23 and 24 will fail when you do 'make >> eieio-tests TEST_LOAD_EL=no'. > This actually isn't true until the patch for #24402[2] is applied. > [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27016#140 > [2]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24402#71 From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Jul 2017 17:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150074579531634 (code B ref 27718); Sat, 22 Jul 2017 17:50:01 +0000 Received: (at 27718) by debbugs.gnu.org; 22 Jul 2017 17:49:55 +0000 Received: from localhost ([127.0.0.1]:52587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYyXL-0008EA-I4 for submit@debbugs.gnu.org; Sat, 22 Jul 2017 13:49:55 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:34481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYyXJ-0008Dx-EN for 27718@debbugs.gnu.org; Sat, 22 Jul 2017 13:49:54 -0400 Received: by mail-it0-f52.google.com with SMTP id v205so5977919itf.1 for <27718@debbugs.gnu.org>; Sat, 22 Jul 2017 10:49:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=vqU1eJVwmG7G35pcubb0Y5idE0o8ca1kIRwXXsObKEU=; b=Fj4QCHx24nDPrSf77P7DlmlafYHrgifZl3cMuUBTBf4Kr1zrXAOWKm7Is9AslaNOw7 U2HKeLTws3jpX0KhW8b18IRoorUkMJkD08PCl59P4hifpHsWjpkSvw7N1xr3jxGko7wM jlfpdaW6Jq25eTMCksU3gySXE9D4FP0FHAV+ru5AAebGpoVk4tj9MbNRpzlthdFJvBmz cIVTfsS4ji6DhGzTR1n/UVxg1asK69avRsc1rXk+8HEWUu6lR1LY7jw0qLlpbTJmxFFK JXMTagxOQ+DpX5kxDOqVBsjACO31p9j/QgoAOQOOm0NFdPOjvd8F3eGSPRwVMVFFyZLA O9sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=vqU1eJVwmG7G35pcubb0Y5idE0o8ca1kIRwXXsObKEU=; b=rfm4yTuOmVDwZHeTOHRIEpUNtS/lPMDcBBVKvfCw8719w0DRWCGG1MW3RkF68h17wJ YOvR36N54eSMLQqqoykPQgFMtg5wy6X3cQjxNCwig8otjNvnPrJA6ldQlSKLjt0alu6E evXZLRtbotQrRhSEHFKdosT82sDr9RdRN3qjfHda1JL4bhFBzTYFr/ehFsClaYgXODmU v2Q1u8aYc4Hncaii3F81bVUQzjrETIok9LlwR+YqHpeCRsKGTpcZfpKMyldXhutzieQi AQRmxlzyMrh4sgeT+j04+yPZE/N150jqm7IkvQ1Uwyc44KxaSX38JkDKGOGQldwnfwnq cbUw== X-Gm-Message-State: AIVw1117aEvPS8wowdfqqDXknpVhILudezxPrvCDhslMrzqhBwdU9RXy CqbRxMQVNSMnlQ== X-Received: by 10.36.92.77 with SMTP id q74mr2631057itb.24.1500745787675; Sat, 22 Jul 2017 10:49:47 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 5sm2171759iox.9.2017.07.22.10.49.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 22 Jul 2017 10:49:46 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> Date: Sat, 22 Jul 2017 13:51:22 -0400 In-Reply-To: (Stefan Monnier's message of "Fri, 21 Jul 2017 09:19:58 -0400") Message-ID: <87tw248in9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) --=-=-= Content-Type: text/plain Stefan Monnier writes: > So maybe rather than hijack function-get/put in bug#27016, we should > introduce a new "definitional put" with a corresponding `get`, and then > use that here as well as in function-put/get. > > Maybe we could simply change put&get directly without introducing > yet-another slightly different get/put? Something like this? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Let-put-take-effect-during-compilation-Bug-27718.patch Content-Description: patch >From 7645c7ff5078aa0bc937969fb1550b0f794d793e Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 22 Jul 2017 13:46:58 -0400 Subject: [PATCH] Let `put' take effect during compilation (Bug#27718) * lisp/emacs-lisp/bytecomp.el: Use `byte-compile-function-put' to handle `put' as well. * src/fns.c (Fget): Consult `byte-compile-plist-environment'. * lisp/subr.el (function-get): Let `get' take care of consuling `byte-compile-plist-environment'. --- lisp/emacs-lisp/bytecomp.el | 1 + lisp/subr.el | 7 +------ src/fns.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 4dda3bdc2b..3fead4229e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4719,6 +4719,7 @@ (defun byte-compile-form-make-variable-buffer-local (form) (byte-compile-keep-pending form 'byte-compile-normal-call)) (put 'function-put 'byte-hunk-handler 'byte-compile-function-put) +(put 'put 'byte-hunk-handler 'byte-compile-function-put) (defun byte-compile-function-put (form) (pcase form ((and `(,op ,fun ,prop ,val) diff --git a/lisp/subr.el b/lisp/subr.el index 3e4a3dedf5..42b4e1c211 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -2971,12 +2971,7 @@ (defun function-get (f prop &optional autoload) if it's an autoloaded macro." (let ((val nil)) (while (and (symbolp f) - (null (setq val (or (plist-get - (alist-get - f (bound-and-true-p - byte-compile-plist-environment)) - prop) - (get f prop)))) + (null (setq val (get f prop))) (fboundp f)) (let ((fundef (symbol-function f))) (if (and autoload (autoloadp fundef) diff --git a/src/fns.c b/src/fns.c index d849618f2b..655422aa0f 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1987,6 +1987,14 @@ DEFUN ("get", Fget, Sget, 2, 2, 0, (Lisp_Object symbol, Lisp_Object propname) { CHECK_SYMBOL (symbol); + Lisp_Object plist_env = find_symbol_value (Qbyte_compile_plist_environment); + if (CONSP (plist_env)) + { + Lisp_Object propval = Fplist_get (CDR (Fassq (symbol, plist_env)), + propname); + if (!NILP (propval)) + return propval; + } return Fplist_get (XSYMBOL (symbol)->plist, propname); } @@ -5125,6 +5133,8 @@ syms_of_fns (void) DEFSYM (Qkey_or_value, "key-or-value"); DEFSYM (Qkey_and_value, "key-and-value"); + DEFSYM (Qbyte_compile_plist_environment, "byte-compile-plist-environment"); + defsubr (&Ssxhash_eq); defsubr (&Ssxhash_eql); defsubr (&Ssxhash_equal); -- 2.11.1 --=-=-=-- From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2017 15:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150091025325682 (code B ref 27718); Mon, 24 Jul 2017 15:31:01 +0000 Received: (at 27718) by debbugs.gnu.org; 24 Jul 2017 15:30:53 +0000 Received: from localhost ([127.0.0.1]:54476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZfJs-0006g9-Qs for submit@debbugs.gnu.org; Mon, 24 Jul 2017 11:30:53 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:48500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZfJr-0006g2-H3 for 27718@debbugs.gnu.org; Mon, 24 Jul 2017 11:30:52 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v6OFUoo7021653; Mon, 24 Jul 2017 11:30:50 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 1635C660EB; Mon, 24 Jul 2017 11:30:50 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> Date: Mon, 24 Jul 2017 11:30:50 -0400 In-Reply-To: <87tw248in9.fsf@users.sourceforge.net> (npostavs's message of "Sat, 22 Jul 2017 13:51:22 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6078=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6078> : inlines <5991> : streams <1755580> : uri <2468941> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> So maybe rather than hijack function-get/put in bug#27016, we should >> introduce a new "definitional put" with a corresponding `get`, and then >> use that here as well as in function-put/get. >> Maybe we could simply change put&get directly without introducing >> yet-another slightly different get/put? > Something like this? I guess so. But: > + DEFSYM (Qbyte_compile_plist_environment, "byte-compile-plist-environment"); I find having to hardcode byte-compile-plist-environment in get rather ugly. Stefan "sorry, I couldn't make it more constructive" From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jul 2017 19:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150092550431277 (code B ref 27718); Mon, 24 Jul 2017 19:46:01 +0000 Received: (at 27718) by debbugs.gnu.org; 24 Jul 2017 19:45:04 +0000 Received: from localhost ([127.0.0.1]:54696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZjHr-00088P-Ml for submit@debbugs.gnu.org; Mon, 24 Jul 2017 15:45:03 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:39761) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dZjHo-00087i-Gs for 27718@debbugs.gnu.org; Mon, 24 Jul 2017 15:45:02 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v6OJiwc4009876; Mon, 24 Jul 2017 15:44:59 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 2192D660EB; Mon, 24 Jul 2017 15:44:58 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> Date: Mon, 24 Jul 2017 15:44:58 -0400 In-Reply-To: (Stefan Monnier's message of "Mon, 24 Jul 2017 11:30:50 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6078=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6078> : inlines <5991> : streams <1755605> : uri <2469058> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> + DEFSYM (Qbyte_compile_plist_environment, "byte-compile-plist-environment"); > I find having to hardcode byte-compile-plist-environment in get rather ugly. Hmm... I'm still not quite sure how best to deal with this, but it does occur to me that we could introduce a new `define-propval' value, which would be like `put' but for use at top-level. It could differ from `put' in that the byte-compiler could keep track of those in byte-compile-plist-environment, and that they could record themselves in load-history for unload-feature to be able to undo them. It doesn't help on the `get' side, tho. Stefan From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2017 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.15010005019315 (code B ref 27718); Tue, 25 Jul 2017 16:35:02 +0000 Received: (at 27718) by debbugs.gnu.org; 25 Jul 2017 16:35:01 +0000 Received: from localhost ([127.0.0.1]:56166 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da2nU-0002QB-S0 for submit@debbugs.gnu.org; Tue, 25 Jul 2017 12:35:01 -0400 Received: from mail-oi0-f51.google.com ([209.85.218.51]:34872) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da2nT-0002Pw-S1 for 27718@debbugs.gnu.org; Tue, 25 Jul 2017 12:35:00 -0400 Received: by mail-oi0-f51.google.com with SMTP id e124so97291962oig.2 for <27718@debbugs.gnu.org>; Tue, 25 Jul 2017 09:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+nMdv45Uiz4Q5Q3FLpX6so743NDyfxJVvXLPb001zW0=; b=DewdsnFykZOUqqHtYnLMuM9qwiBUr717LnurjbHQLmXsFy3k4s0+PazNGbtS+Zc3bw dka3iW8lB1vpoeT5e6ddsCdcU66KsvP8ztQ+1g1+4j1FzTD55MsVn/QMVYL/5z7yIK0w ahESLUzHJyweLjObdmubWGUXQ8TGMk0/1dzTLA4QC9BOMT15NKviPXvqT3olmDA/+teq gCQaMcHJPtAS39SNvle02fNZvIPlp/lHm+6wRxbgHbQXMtGNLn2F6Krg6+xJhuy2h8xJ qOff7Y28PSAOI6QTfjnvQKDQ8ZLLA3jm4HMdOlHyyK/Xic/NWr5w47MNDY+fZ4o+gst0 hs3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+nMdv45Uiz4Q5Q3FLpX6so743NDyfxJVvXLPb001zW0=; b=Ykqac1RnE59QuyQEHGzuTmROMv+C9rP2YZAUR4vGDcEfINTtTbgCZh1CUjgmo9p3lf ADdk4A8wY+idvi8/ONwLGHQ16/8AkGoLT9uCP+35TXscLIT7mq08yzFIk8L8nYe/JEUd knpZj6xExmhKpLXBK95Yqa53CIk1pgJv3gT77C+IJc5rBwKWBS9cVOLpvqU7OA4V+RM/ DX4HnCwobMdOxgmWX1a5mGe1U5ocs5OAxJWyz+XNULAAJ4qfhkQxAfjRLpiZL0o8W8Kl tMgvtFjNhuWkbIRWD0+g6wwO6K4SvdtkMwnZx6OIe2DPaIck3DjRHN/2aleeyuFu/uHx XdcQ== X-Gm-Message-State: AIVw1115TdY30GR7Xw7xVy6m2McPmifDz2lKU50eXhakq18ULti8nWQq SzhvSj+DU56tvxJp48XmY2q1GkFcxw== X-Received: by 10.202.49.134 with SMTP id x128mr554901oix.18.1501000493940; Tue, 25 Jul 2017 09:34:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.113.6 with HTTP; Tue, 25 Jul 2017 09:34:53 -0700 (PDT) In-Reply-To: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> From: Noam Postavsky Date: Tue, 25 Jul 2017 12:34:53 -0400 X-Google-Sender-Auth: uPgBOTjtbr7GC12-wfqBmsF3qsA Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) On Mon, Jul 24, 2017 at 3:44 PM, Stefan Monnier wrote: >>> + DEFSYM (Qbyte_compile_plist_environment, "byte-compile-plist-environment"); > >> I find having to hardcode byte-compile-plist-environment in get rather ugly. > > Hmm... I'm still not quite sure how best to deal with this, but it does > occur to me that we could introduce a new `define-propval' value, which > would be like `put' but for use at top-level. It could differ from > `put' in that the byte-compiler could keep track of those in > byte-compile-plist-environment, and that they could record themselves in > load-history for unload-feature to be able to undo them. > > It doesn't help on the `get' side, tho. Right. We need `get' to be aware of what the compiler has read, so it will need to have a reference to the compiler in there somewhere. We could name it differently and point the reference in the other direction, as in DEFSYM (Qalternate_plist_environment...) and have the byte compiler use that instead, which might be slightly more aesthetically pleasing. The other possibility is to introduce a different kind of `get' and use that in places that need to be aware of what the compiler has read. I don't see a third option. From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jul 2017 21:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Noam Postavsky Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150101766914344 (code B ref 27718); Tue, 25 Jul 2017 21:22:02 +0000 Received: (at 27718) by debbugs.gnu.org; 25 Jul 2017 21:21:09 +0000 Received: from localhost ([127.0.0.1]:56439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da7GP-0003jI-F7 for submit@debbugs.gnu.org; Tue, 25 Jul 2017 17:21:09 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:56151) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1da7GM-0003j6-Da for 27718@debbugs.gnu.org; Tue, 25 Jul 2017 17:21:08 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v6PLL5ZA004171; Tue, 25 Jul 2017 17:21:05 -0400 Received: by ceviche.home (Postfix, from userid 20848) id D3A9866154; Tue, 25 Jul 2017 17:21:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> Date: Tue, 25 Jul 2017 17:21:04 -0400 In-Reply-To: (Noam Postavsky's message of "Tue, 25 Jul 2017 12:34:53 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6079=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6079> : inlines <5993> : streams <1755757> : uri <2469773> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) > Right. We need `get' to be aware of what the compiler has read, so it > will need to have a reference to the compiler in there somewhere. We > could name it differently and point the reference in the other > direction, as in DEFSYM (Qalternate_plist_environment...) and have the > byte compiler use that instead, which might be slightly more > aesthetically pleasing. The other possibility is to introduce a > different kind of `get' and use that in places that need to be aware > of what the compiler has read. > I don't see a third option. Right, so we have 3 options, indeed: - `get` looks up to byte-compile-plist-environment - byte-compile manipulates `get`s overriding-plist-environment - provide a new get-like function. Either one is fine by me, Stefan From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2017 01:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150189511219805 (code B ref 27718); Sat, 05 Aug 2017 01:06:01 +0000 Received: (at 27718) by debbugs.gnu.org; 5 Aug 2017 01:05:12 +0000 Received: from localhost ([127.0.0.1]:42173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddnWh-00059N-RC for submit@debbugs.gnu.org; Fri, 04 Aug 2017 21:05:12 -0400 Received: from mail-io0-f169.google.com ([209.85.223.169]:33008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddnWf-000599-Az for 27718@debbugs.gnu.org; Fri, 04 Aug 2017 21:05:10 -0400 Received: by mail-io0-f169.google.com with SMTP id j32so11353616iod.0 for <27718@debbugs.gnu.org>; Fri, 04 Aug 2017 18:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=loojhEEdf3fjaT10IrADGB98+20vevagsEpe0BgS6RI=; b=YEEmzlmTEPNq0BkKWbZuazua7UfBPf3v/kN6WJCz+YMG2NllNvNMVszzqZ6HTR4WJF Sha/qGBLydbPfjcSYeYye21Mmp/yYgpw7qlY4TBfyqV0nYDS3Uwj/oqJ4AG6uhUdzVum /XPsjwGXDocQz1AJ91lMqSDjOeI2VjAqS3CFbU6XhCCy6WRZfrB2a9K8VEFfttccPp8P 2w6zq+7czf57QhVjTCxpb/AQ9brUYwsbc2KokcvRCDYiHLluEhACvcG7coDcoOjzhXQb 7/oQ0PdKePe/+TWLTvKKkqdjDfHR4IZ1LXbURjbTb5921cB8Yrg9ZeJPBxL+uaPqjJ66 Ot6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=loojhEEdf3fjaT10IrADGB98+20vevagsEpe0BgS6RI=; b=f2Bx0BXx+e2ppDqDROzxNY74h2UR2P3UL0TZQRk5ZW2afMFcNUYlyIAQHT7beEOrpG JHMCwDGqQTe3AQf6WlS5gd4PnEfxoDu6lyfjSTw0p1McKkpGuqPogOF8okPEcx4+4X0u LZ4jbdC+NRlXcxZJ8zTWW09k1aVP+j5cYmaEmPYL5eq8dl+c3AxctKGVZD3Q+am5z2Hh qtJ/nPHI3P4RKLocLfsNHtE2MevqRF16ZGEtVMkHryv2LqI/sv2HUDCPPji9C4xh13Vl TBzBMVoIIO6QLYjLgKk17SBPuV9gVv6rK/R+btpJT9Uobr18Fo8OWAFNr/bMuTjIg09K Q6Bw== X-Gm-Message-State: AHYfb5gIvVpZO6eCD8FbBWgUi9WufukWXJdyHer//wl/5jya02NnBge8 qzShDMafIixizg== X-Received: by 10.107.12.229 with SMTP id 98mr5047091iom.238.1501895103729; Fri, 04 Aug 2017 18:05:03 -0700 (PDT) Received: from zony ([45.2.119.48]) by smtp.googlemail.com with ESMTPSA id 189sm926581ioz.29.2017.08.04.18.05.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Aug 2017 18:05:01 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> Date: Fri, 04 Aug 2017 21:06:42 -0400 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Jul 2017 17:21:04 -0400") Message-ID: <87fud67rh9.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain Stefan Monnier writes: > Right, so we have 3 options, indeed: > - `get` looks up to byte-compile-plist-environment > - byte-compile manipulates `get`s overriding-plist-environment > - provide a new get-like function. > > Either one is fine by me, I'm thinking the 2nd looks best. Is it correct to `put' `byte-compile-define-symbol-prop' as the hunk handler for both `define-symbol-prop' and `function-put'? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0001-Let-define-symbol-prop-take-effect-during-compila.patch Content-Description: patch >From 3e8759320ecba4156cd3315ef02ea902ff408ae3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 14 Jul 2017 00:32:34 -0400 Subject: [PATCH v2 1/2] Let `define-symbol-prop' take effect during compilation * src/fns.c (syms_of_fns): New variable `overriding-plist-environment'. (Fget): Consult it. * lisp/emacs-lisp/bytecomp.el (byte-compile-close-variables): Let-bind it to nil. (byte-compile-define-symbol-prop): New function, handles compilation of top-level `define-symbol-prop' and `function-put' calls by putting the symbol setting into `overriding-plist-environment'. Co-authored-by: Noam Postavsky --- lisp/emacs-lisp/bytecomp.el | 29 +++++++++++++++++++++++++++++ src/fns.c | 11 +++++++++++ test/lisp/emacs-lisp/bytecomp-tests.el | 17 +++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index fdd4276e4e..a1626c0b9d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1572,6 +1572,7 @@ (defmacro byte-compile-close-variables (&rest body) ;; macroenvironment. (copy-alist byte-compile-initial-macro-environment)) (byte-compile--outbuffer nil) + (overriding-plist-environment nil) (byte-compile-function-environment nil) (byte-compile-bound-variables nil) (byte-compile-lexical-variables nil) @@ -4712,6 +4713,34 @@ (put 'make-variable-buffer-local 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) (defun byte-compile-form-make-variable-buffer-local (form) (byte-compile-keep-pending form 'byte-compile-normal-call)) + +(put 'function-put 'byte-hunk-handler 'byte-compile-define-symbol-prop) +(put 'define-symbol-prop 'byte-hunk-handler 'byte-compile-define-symbol-prop) +(defun byte-compile-define-symbol-prop (form) + (pcase form + ((and `(,op ,fun ,prop ,val) + (guard (and (macroexp-const-p fun) + (macroexp-const-p prop) + (or (macroexp-const-p val) + ;; Also accept anonymous functions, since + ;; we're at top-level which implies they're + ;; also constants. + (pcase val (`(function (lambda . ,_)) t)))))) + (byte-compile-push-constant op) + (byte-compile-form fun) + (byte-compile-form prop) + (let* ((fun (eval fun)) + (prop (eval prop)) + (val (if (macroexp-const-p val) + (eval val) + (byte-compile-lambda (cadr val))))) + (push `(,fun + . (,prop ,val ,@(alist-get fun overriding-plist-environment))) + overriding-plist-environment) + (byte-compile-push-constant val) + (byte-compile-out 'byte-call 3))) + + (_ (byte-compile-keep-pending form)))) ;;; tags diff --git a/src/fns.c b/src/fns.c index d849618f2b..00b6ed6a28 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1987,6 +1987,10 @@ DEFUN ("get", Fget, Sget, 2, 2, 0, (Lisp_Object symbol, Lisp_Object propname) { CHECK_SYMBOL (symbol); + Lisp_Object propval = Fplist_get (CDR (Fassq (symbol, Voverriding_plist_environment)), + propname); + if (!NILP (propval)) + return propval; return Fplist_get (XSYMBOL (symbol)->plist, propname); } @@ -5163,6 +5167,13 @@ syms_of_fns (void) DEFSYM (Qcursor_in_echo_area, "cursor-in-echo-area"); DEFSYM (Qwidget_type, "widget-type"); + DEFVAR_LISP ("overriding-plist-environment", Voverriding_plist_environment, + doc: /* An alist overrides the plists of the symbols which it lists. +Used by the byte-compiler to apply `define-symbol-prop' during +compilation. */); + Voverriding_plist_environment = Qnil; + DEFSYM (Qoverriding_plist_environment, "overriding-plist-environment"); + staticpro (&string_char_byte_cache_string); string_char_byte_cache_string = Qnil; diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index d15bd8b6e6..8ef2ce7025 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -545,6 +545,23 @@ (ert-deftest bytecomp-tests--old-style-backquotes () This functionality has been obsolete for more than 10 years already and will be removed soon. See (elisp)Backquote in the manual."))))))) + +(ert-deftest bytecomp-tests-function-put () + "Check `function-put' operates during compilation." + (should (boundp 'lread--old-style-backquotes)) + (bytecomp-tests--with-temp-file source + (dolist (form '((function-put 'bytecomp-tests--foo 'foo 1) + (function-put 'bytecomp-tests--foo 'bar 2) + (defmacro bytecomp-tests--foobar () + `(cons ,(function-get 'bytecomp-tests--foo 'foo) + ,(function-get 'bytecomp-tests--foo 'bar))) + (defvar bytecomp-tests--foobar 1) + (setq bytecomp-tests--foobar (bytecomp-tests--foobar)))) + (print form (current-buffer))) + (write-region (point-min) (point-max) source nil 'silent) + (byte-compile-file source t) + (should (equal bytecomp-tests--foobar (cons 1 2))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: -- 2.11.1 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v2-0002-Let-the-cl-typep-effects-of-defclass-work-during-.patch Content-Description: patch >From 848a5eb1ed15bb975fe308464b2891b160c5a420 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 4 Aug 2017 19:50:21 -0400 Subject: [PATCH v2 2/2] Let the cl-typep effects of defclass work during compilation (Bug#27718) * lisp/emacs-lisp/eieio.el (defclass): Use `define-symbol-prop' instead of `put'. --- lisp/emacs-lisp/eieio.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index 1a7de55fce..8b92d5b7ac 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -246,7 +246,7 @@ (defmacro defclass (name superclasses slots &rest options-and-doc) ;; test, so we can let typep have the CLOS documented behavior ;; while keeping our above predicate clean. - (put ',name 'cl-deftype-satisfies #',testsym2) + (define-symbol-prop ',name 'cl-deftype-satisfies #',testsym2) (eieio-defclass-internal ',name ',superclasses ',slots ',options-and-doc) -- 2.11.1 --=-=-=-- From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2017 12:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: npostavs@users.sourceforge.net Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150193734814966 (code B ref 27718); Sat, 05 Aug 2017 12:50:01 +0000 Received: (at 27718) by debbugs.gnu.org; 5 Aug 2017 12:49:08 +0000 Received: from localhost ([127.0.0.1]:42614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyVv-0003tK-Oj for submit@debbugs.gnu.org; Sat, 05 Aug 2017 08:49:07 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:49253) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ddyVu-0003tC-AK for 27718@debbugs.gnu.org; Sat, 05 Aug 2017 08:49:06 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id v75Cn41o023117; Sat, 5 Aug 2017 08:49:04 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 62495661C0; Sat, 5 Aug 2017 08:49:04 -0400 (EDT) From: Stefan Monnier Message-ID: References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> <87fud67rh9.fsf@users.sourceforge.net> Date: Sat, 05 Aug 2017 08:49:04 -0400 In-Reply-To: <87fud67rh9.fsf@users.sourceforge.net> (npostavs's message of "Fri, 04 Aug 2017 21:06:42 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6087=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6087> : inlines <6010> : streams <1757270> : uri <2476841> X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) >> Right, so we have 3 options, indeed: >> - `get` looks up to byte-compile-plist-environment >> - byte-compile manipulates `get`s overriding-plist-environment >> - provide a new get-like function. >> Either one is fine by me, > I'm thinking the 2nd looks best. Is it correct to `put' > `byte-compile-define-symbol-prop' as the hunk handler for both > `define-symbol-prop' and `function-put'? I think so, yes. Stefan From unknown Thu Aug 14 21:56:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#27718: 26.0.50; (cl-typep instance-ab 'class-a) gives wrong answer when compiled Resent-From: npostavs@users.sourceforge.net Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Aug 2017 01:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27718 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Stefan Monnier Cc: 27718@debbugs.gnu.org, Alex Received: via spool by 27718-submit@debbugs.gnu.org id=B27718.150215487729993 (code B ref 27718); Tue, 08 Aug 2017 01:15:02 +0000 Received: (at 27718) by debbugs.gnu.org; 8 Aug 2017 01:14:37 +0000 Received: from localhost ([127.0.0.1]:50917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1det6S-0007nc-Ns for submit@debbugs.gnu.org; Mon, 07 Aug 2017 21:14:36 -0400 Received: from mail-it0-f68.google.com ([209.85.214.68]:34522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1det6Q-0007nG-ON; Mon, 07 Aug 2017 21:14:35 -0400 Received: by mail-it0-f68.google.com with SMTP id t78so1526715ita.1; Mon, 07 Aug 2017 18:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fbiNsIw1kgyri5URPpmMc5k2VOvC9yg4zgCY0uca/SE=; b=T5b+eX86DfyNsxwuLeDeix2IT3+ucjpXpaCmHVMIgbxOky024CdoXQ89hCrwgEx/NN yTetNTHYdqmCcWasPoBHkdXVySDv9RG+dCHKGu5pv03LC36X9SjQ9IjqQ7BvVxGrIj03 6s48h6rNNi9QcnUJbXM9sLTgmPjZ4Kcmc2ckD7YQYIR0wfaokYamgOp7UwUEyE5t5gVW QWENeczJSfFlU9y3FHEiteA//Pa0PTGO5Xj0vyhDxU6fXivKJn0QmVWtTuUbhLzVQU7s NfnM8mJwwrc9OoMzaw2zq/PvYg6fcdze1BqmpbZHNmyhMUvXbIDNDrZciLj/TOzK4ccL 1S8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=fbiNsIw1kgyri5URPpmMc5k2VOvC9yg4zgCY0uca/SE=; b=DtUUCO+q8JV2JQlTd0g5C5NWHw1bQbwShb+6gpl0lIGXgDv77uKutXTeKfC+Van7Fm 8mymh+88ZHGYINud/SJG0vgaO3QQLKFb4TKpRKnW3/XO5Xwrx77Ll9eJIhl90ADfbElD BK8w6Ej6QZzC3m7jeNAdfHY/8nULBaQ3lJRvO+qcuBq4o/ha1h2hk5ib7lVei1Z5yPju 8t/zy2xuBrB7ZRK4+zAWaJcangHiE619GanZRr/dm01qIkdcgREUGIGDV9Yjp+ei9Aqs YF5gKXclYfWh4wKRZX3ZursKcAeeyRcG0TbYXvnHcLmaYzSqFASN2g9meHZ+n4iTxvHN o5IQ== X-Gm-Message-State: AHYfb5j2RZNY+267vFhcrFzV3M45ppUp40CKK49LL9q9pEKavGTUVyef FOtiGzBwhYLA4y4G X-Received: by 10.36.66.16 with SMTP id i16mr2549331itb.132.1502154869332; Mon, 07 Aug 2017 18:14:29 -0700 (PDT) Received: from zony ([45.2.119.49]) by smtp.googlemail.com with ESMTPSA id v65sm198223itc.32.2017.08.07.18.14.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Aug 2017 18:14:28 -0700 (PDT) From: npostavs@users.sourceforge.net References: <87tw2dcqtz.fsf@users.sourceforge.net> <87inim9dy0.fsf@users.sourceforge.net> <87tw248in9.fsf@users.sourceforge.net> <87fud67rh9.fsf@users.sourceforge.net> Date: Mon, 07 Aug 2017 21:16:05 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 05 Aug 2017 08:49:04 -0400") Message-ID: <87bmnq506i.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) tags 27718 fixed close 27718 26.1 quit Stefan Monnier writes: >>> Right, so we have 3 options, indeed: >>> - `get` looks up to byte-compile-plist-environment >>> - byte-compile manipulates `get`s overriding-plist-environment >>> - provide a new get-like function. >>> Either one is fine by me, >> I'm thinking the 2nd looks best. Is it correct to `put' >> `byte-compile-define-symbol-prop' as the hunk handler for both >> `define-symbol-prop' and `function-put'? > > I think so, yes. Pushed to master. [1: cc30d77ecd]: 2017-08-07 18:54:49 -0400 Let `define-symbol-prop' take effect during compilation http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cc30d77ecdd1b9155ade3d0656a84a0839ee2795 [2: b5c8e9898d]: 2017-08-07 18:54:49 -0400 Let the cl-typep effects of defclass work during compilation (Bug#27718) http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=b5c8e9898d9dbd4145c40d08e8eef84a5e32008a