From debbugs-submit-bounces@debbugs.gnu.org Wed May 30 15:01:49 2018 Received: (at submit) by debbugs.gnu.org; 30 May 2018 19:01:49 +0000 Received: from localhost ([127.0.0.1]:55412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fO6M1-0002H9-4W for submit@debbugs.gnu.org; Wed, 30 May 2018 15:01:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fO6Lz-0002Gw-KL for submit@debbugs.gnu.org; Wed, 30 May 2018 15:01:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO6Lt-0006dp-K5 for submit@debbugs.gnu.org; Wed, 30 May 2018 15:01:42 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:49381) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fO6Lt-0006da-HU for submit@debbugs.gnu.org; Wed, 30 May 2018 15:01:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fO6Ls-0006uO-C7 for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 15:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fO6Ln-0006ZH-Dj for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 15:01:40 -0400 Received: from aibo.runbox.com ([91.220.196.211]:44440) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fO6Ln-0006Yi-3Y for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 15:01:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=XWYNPNRaK+Q8lln6iqygrz6bR1FQkxz0EGo+uNUZLhQ=; b=eFmBAYnxcoMH4OQpHngLb2/Un yFsl2Qo8ftVIKbGNXCIrJYZPZ7Qtj0jMWu55MYYxwC0VH1qodhnzLKyYQTv5bWJTOcQduxBRsRDAP bOGBdD8iGcykcmVRD3K+j67q70cuI3u4MPoyWl6tvqJmhr7o+DA04WFj6YQk3kLs3qhV8/CCOD4ge OAI0sBBilvzl4aGhOsTxHfps+ZqoKY/wFHkbdRdlfYTkvMD4Mz9N3KHs0dP7vSQOmK9YyA+/749gO 0xyxnKBS9g3ngXodKOQWDuKcjif6IhwW0bLvpCF41ycoSufjXLMjxSes2I3xQoKtukBYrn9p1t0ao fnebCtnuw==; Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fO6Ll-0002GR-54 for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 21:01:33 +0200 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=sockeye) by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1fO6LG-0000U6-0j for bug-gnu-emacs@gnu.org; Wed, 30 May 2018 21:01:03 +0200 From: Gemini Lasswell To: bug-gnu-emacs@gnu.org Subject: 26.1.50; EIEIO manual's Quick Start example makes Emacs unusable Date: Wed, 30 May 2018 12:00:49 -0700 Message-ID: <87wovl3r4u.fsf@runbox.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit 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: -5.1 (-----) The first example in the EIEIO manual defines a class called 'record'. Evaluating this example changes the function definition of 'record', which makes many Emacs commands produce errors, including find-file, ielm, and report-emacs-bug. To reproduce, with emacs -Q: M-x info RET Navigate to the Quick Start node in the EIEIO manual, and select the (defclass record ...) example. M-w M-x ielm RET (require 'eieio) RET C-y RET Result: *** IELM Error *** Error during pretty-printing (bug in pp) Definitely the name of the class in the examples in the manual should be changed, so that the examples work. Maybe it would also be a good idea for defclass to signal an error or at least give a warning message if it is asked to define a class with the same name as an existing function unless that function is from a previous class definition. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 02 20:23:39 2018 Received: (at 31660) by debbugs.gnu.org; 3 Jun 2018 00:23:39 +0000 Received: from localhost ([127.0.0.1]:59672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPGo7-0002H8-Gx for submit@debbugs.gnu.org; Sat, 02 Jun 2018 20:23:39 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:33163) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPGo6-0002Gu-Lt for 31660@debbugs.gnu.org; Sat, 02 Jun 2018 20:23:39 -0400 Received: by mail-io0-f195.google.com with SMTP id d185-v6so5979097ioe.0 for <31660@debbugs.gnu.org>; Sat, 02 Jun 2018 17:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7vKxbQrX1u0xyyqKif0NPB04fq/rzRW0e9VJKZKIQeA=; b=cCO1oP4SUD4fLzj21TGbourZOaXqIbnvU7q/dNwyLjycdMnBGUNUVgNfepJB7rRHH4 3DVXNRJvxiQeGuBoOAbZrlSbWzcUgUL/DQ7eUo1a2N3obZP5ATg9Gn06n0CmWrnTnecd FcLriBmmrVmBRPy11t8CVMaR+Z2f6h26l+Ov+0CRkoA3QF6vagzuUq7sLPR484vZ5wjt UaA/2yItxbcyfTpIXO1/RjXPXH1W551DgB9M/JwFhyhdxC3JgB9YGxa6wkvf4lJN2ubs 7e1rP/esQu35pI75RZaB/k5hwt8uiCiZmaV3dy2YKBWMaDObJLI3sDAZxQ6B+7XSF5yV oYLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7vKxbQrX1u0xyyqKif0NPB04fq/rzRW0e9VJKZKIQeA=; b=Sa2cNl2S6IfVd4sndtLZGFv2U2KkMqRfS9pFRoPBQ7mYv5ywz5rSxjNY4FIEJ1Ou2C vqSSJahoBxKUFlJzZWG8DxG6hqS974MYgpJZWXP/FDvhSBIoZxqwJrmUiaj7h5oNUQv4 wJ5m8jfMQZLw0FWmtu/NBoJZ1pnddAkaDCr9bqZ6FpWtNU8gY95vmybm/kKfvSyDj8g9 yvPwJIhZkL2G+nhAjaMkMGltUV31o2XFnCK4EIQ8cE/e6JhMifwSqMUhfZfDTRVRcJgk V90pu198ndrxTMiygt02d/LicXo/mJSOLqwssPbq6kjJKfwkj3Fs+FuwvzjAQZ74BgLI 202A== X-Gm-Message-State: APt69E1H3D4galJunIS+gD72AdEL3vBnl8Yex2gFWNzqCAht8uW5p+S9 l90yOhEvRsRN1+i0zu3vMXuPNw== X-Google-Smtp-Source: ADUXVKKUAZE1rgQMrzxDU9VDMalA9vJkDTyfJrs3IJd4lQIGyJRsA6m1fTCPYALnyLHFYKGBTBqYRg== X-Received: by 2002:a5e:8c15:: with SMTP id n21-v6mr11427221ioj.217.1527985413200; Sat, 02 Jun 2018 17:23:33 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id r137-v6sm2869368ita.8.2018.06.02.17.23.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Jun 2018 17:23:32 -0700 (PDT) From: Noam Postavsky To: Gemini Lasswell Subject: Re: bug#31660: 26.1.50; EIEIO manual's Quick Start example makes Emacs unusable References: <87wovl3r4u.fsf@runbox.com> Date: Sat, 02 Jun 2018 20:23:31 -0400 In-Reply-To: <87wovl3r4u.fsf@runbox.com> (Gemini Lasswell's message of "Wed, 30 May 2018 12:00:49 -0700") Message-ID: <878t7wafb0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.7 (-) X-Debbugs-Envelope-To: 31660 Cc: 31660@debbugs.gnu.org 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.7 (--) Gemini Lasswell writes: > Definitely the name of the class in the examples in the manual should be > changed, so that the examples work. Yeah. > Maybe it would also be a good idea for defclass to signal an error or > at least give a warning message if it is asked to define a class with > the same name as an existing function unless that function is from a > previous class definition. A warning would be okay I think. An error is too much: if you were developing a library and decided to change a function into a class, then you wouldn't be able to reload the new version without restarting Emacs. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 02 20:24:41 2018 Received: (at control) by debbugs.gnu.org; 3 Jun 2018 00:24:41 +0000 Received: from localhost ([127.0.0.1]:59677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPGp6-0002J7-RG for submit@debbugs.gnu.org; Sat, 02 Jun 2018 20:24:41 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:38765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fPGp5-0002Iu-6Y for control@debbugs.gnu.org; Sat, 02 Jun 2018 20:24:39 -0400 Received: by mail-it0-f42.google.com with SMTP id v83-v6so6159533itc.3 for ; Sat, 02 Jun 2018 17:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=mK6xRmABm0QZMUvoSLc0WCmr2tDyqHm4T8lX2sGxLdg=; b=B410O3sjLNye93f9HnLAQ0OZF8omO3qrsYIBnHIHCALXY4WcBCgKPrslpD6Nderr89 e63Oq0DdGjOfABjZPRlCp4O3tfcG8Ns3/nOfgcpq/HE0QCLFNEDAGCaRjh+EN4Nyd4vk CGVvtldcjGDB/Z8S4ILCVgpSJHKtO+5K/n/Wg/jt0B42mqyb/en3cPtlwtAqnUgu+u0s YykpBlsHk2bbsgw3qzhWWQ4yXhaiYwuMI+9CHVGI2UvEo0TWawA/ufdNDp2+ro0SNUX1 R+QX4mTrYB7u0qiDy0UyAetNLaHLXzGb6zd5MF8nv3HYdKtYPWMpv3CLxovNrRKOGsHe 1u7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=mK6xRmABm0QZMUvoSLc0WCmr2tDyqHm4T8lX2sGxLdg=; b=lHlshyXcYLEil4zePepFkdMOckX4umefiLhED5HhPhl0joDI+xA+qZS6skXDyxMNRy 2q+X6DqViqNam5rxzZr99mIkauL7pKsSpgwl2JDzxEsBkyY1d2HYSNW+iJxIn3FTlY45 oU9Yp9u4axf+rSJwpgiSqUkOn6WbI4fHAGJp48oHgF/XwojNLIWUgNt0l5zh9diJpePf HGwaj9XOGQ20nH9Gq8/DEF0hymo4LK6lpTEczsD/PCPDPCr1/6xuair1eWvjzL16Xh/H Oh9YA6mLCTDx2ADP6VyQZYexPEA2NU3nINUYPP+SmI8WNFfOL7VMCdmOlLaXYn1SAzfz Ffsg== X-Gm-Message-State: ALKqPwcjWmJ79/qUgY1Vb4GoQkyKEcoLfZuyItVzRAoYE72DIfdJFLes 8FrSQu19p0xzuNtXbCR2mWDKyQ== X-Google-Smtp-Source: ADUXVKIKu2ekICALe7MhHFu0X+hdzB5VGgiSN7hvBnrxA1MEHEWNCJwg7G3Arfd3EX5t8fkWCYesbA== X-Received: by 2002:a24:e9c6:: with SMTP id f189-v6mr9780464ith.12.1527985473644; Sat, 02 Jun 2018 17:24:33 -0700 (PDT) Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id d136-v6sm1257926itd.22.2018.06.02.17.24.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Jun 2018 17:24:33 -0700 (PDT) From: Noam Postavsky To: control@debbugs.gnu.org Subject: control message for bug #31660 Date: Sat, 02 Jun 2018 20:24:32 -0400 Message-ID: <877engaf9b.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control 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.0 (-) tags 31660 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 30 16:27:01 2018 Received: (at control) by debbugs.gnu.org; 30 Aug 2018 20:27:01 +0000 Received: from localhost ([127.0.0.1]:39463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fvTWv-0001dj-Gz for submit@debbugs.gnu.org; Thu, 30 Aug 2018 16:27:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43658) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fvTWt-0001dU-Ua for control@debbugs.gnu.org; Thu, 30 Aug 2018 16:27:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fvTWo-00017c-9r for control@debbugs.gnu.org; Thu, 30 Aug 2018 16:26:54 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:57385) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fvTWo-00017T-5v for control@debbugs.gnu.org; Thu, 30 Aug 2018 16:26:54 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1fvTWo-00077A-0y for control@debbugs.gnu.org; Thu, 30 Aug 2018 16:26:54 -0400 Subject: control message for bug 31660 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Thu, 30 Aug 2018 16:26:54 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control 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: -6.0 (------) forcemerge 32595 31660 From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 22 17:02:14 2018 Received: (at 31660) by debbugs.gnu.org; 22 Nov 2018 22:02:14 +0000 Received: from localhost ([127.0.0.1]:42771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPx38-00051N-0I for submit@debbugs.gnu.org; Thu, 22 Nov 2018 17:02:14 -0500 Received: from aibo.runbox.com ([91.220.196.211]:37728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gPx35-00051B-Jh for 31660@debbugs.gnu.org; Thu, 22 Nov 2018 17:02:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From; bh=kNsU+rlEnNKBnAsu8snvPv3wbEgPkBrDer3AVYAAsJg=; b=mrl61U3HvOEF6lID+DVkNw4zVY 459yiSF6PWDWQTVt+o34IM98270776/TQ4q+o8I/hSwJHOGJjtHfgappgC8Yd2QbTuUbY/fMNo70t FTU79ofiWBNM+531UPje4rxhXohxCyNehjwUy2pW2zc1qPTpAmbG/Tzmf1yANalvgJhbSQy03ZNso gORDMkYZLvxKd96Uw36hIWwsuORH2BuJ5I+cwzCXkfu4wA//RzpsDOPTpBZeQNbkfk9Lhy7hyaldm hwkbVwdfIztQo0v9L6lmXoqUroG7qpTP1JwpQWfR13XeSZ0luRoedgo/Dvf1suSpyTughWmHdXkN6 rwLu+OVQ==; Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1gPx33-0004fJ-OB; Thu, 22 Nov 2018 23:02:09 +0100 Received: by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1gPx2r-00020X-BK; Thu, 22 Nov 2018 23:01:58 +0100 From: Gemini Lasswell To: Noam Postavsky Subject: Re: bug#31660: 26.1.50; EIEIO manual's Quick Start example makes Emacs unusable In-Reply-To: <878t7wafb0.fsf@gmail.com> (Noam Postavsky's message of "Sat, 02 Jun 2018 20:23:31 -0400") References: <87wovl3r4u.fsf@runbox.com> <878t7wafb0.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) Date: Thu, 22 Nov 2018 14:01:48 -0800 Message-ID: <87a7m0rctv.fsf@runbox.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 31660 Cc: 31660@debbugs.gnu.org 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.7 (-) --=-=-= Content-Type: text/plain Noam Postavsky writes: > Gemini Lasswell writes: > >> Definitely the name of the class in the examples in the manual should be >> changed, so that the examples work. > > Yeah. Here's a patch to eieio.texi which makes the examples work, and adds a suggestion to check for name conflicts to the description of 'defclass': --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=0001-Address-name-conflicts-in-EIEIO-documentation-bug-31.patch >From 81fa42ad5ad73bb789ad3edc6e06c9d91edbc997 Mon Sep 17 00:00:00 2001 From: Gemini Lasswell Date: Thu, 22 Nov 2018 13:00:03 -0800 Subject: [PATCH] Address name conflicts in EIEIO documentation (bug#31660) * doc/misc/eieio.texi (Quick Start): Rename the class used in the example from 'record' to 'person'. (Building Classes): Advise user to check for name conflicts before naming a class. Add a missing apostrophe. (Making New Objects): Correct grammar. Rename the class used in the example from 'record' to 'my-class'. --- doc/misc/eieio.texi | 49 +++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 689ff72b72..1ad1733762 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -88,11 +88,11 @@ Quick Start use @eieio{} to create classes, methods for those classes, and instances of classes. -Here is a simple example of a class named @code{record}, containing +Here is a simple example of a class named @code{person}, containing three slots named @code{name}, @code{birthday}, and @code{phone}: @example -(defclass record () ; No superclasses +(defclass person () ; No superclasses ((name :initarg :name :initform "" :type string @@ -106,23 +106,23 @@ Quick Start (phone :initarg :phone :initform "" :documentation "Phone number.")) - "A single record for tracking people I know.") + "A class for tracking people I know.") @end example Each class can have methods, which are defined like this: @example -(cl-defmethod call-record ((rec record) &optional scriptname) - "Dial the phone for the record REC. +(cl-defmethod call-person ((pers person) &optional scriptname) + "Dial the phone for the person PERS. Execute the program SCRIPTNAME to dial the phone." - (message "Dialing the phone for %s" (oref rec name)) + (message "Dialing the phone for %s" (oref pers name)) (shell-command (concat (or scriptname "dialphone.sh") " " - (oref rec phone)))) + (oref pers phone)))) @end example @noindent -In this example, the first argument to @code{call-record} is a list, +In this example, the first argument to @code{call-person} is a list, of the form (@var{varname} @var{classname}). @var{varname} is the name of the variable used for the first argument; @var{classname} is the name of the class that is expected as the first argument for this @@ -130,17 +130,17 @@ Quick Start @eieio{} dispatches methods based on the type of the first argument. You can have multiple methods with the same name for different classes -of object. When the @code{call-record} method is called, the first +of object. When the @code{call-person} method is called, the first argument is examined to determine the class of that argument, and the method matching the input type is then executed. Once the behavior of a class is defined, you can create a new -object of type @code{record}. Objects are created by calling the +object of type @code{person}. Objects are created by calling the constructor. The constructor is a function with the same name as your class which returns a new instance of that class. Here is an example: @example -(setq rec (record :name "Eric" :birthday "June" :phone "555-5555")) +(setq pers (person :name "Eric" :birthday "June" :phone "555-5555")) @end example @noindent @@ -157,19 +157,19 @@ Quick Start method defined for it. In this example it would look like this: @example -(call-record rec) +(call-person pers) @end example @noindent or @example -(call-record rec "my-call-script") +(call-person pers "my-call-script") @end example In these examples, @eieio{} automatically examines the class of -@code{rec}, and ensures that the method defined above is called. If -@code{rec} is some other class lacking a @code{call-record} method, or +@code{pers}, and ensures that the method defined above is called. If +@code{pers} is some other class lacking a @code{call-person} method, or some other data type, Emacs signals a @code{cl-no-applicable-method} error. @ref{Signals}. @@ -270,10 +270,15 @@ Building Classes the class as a symbol property of @var{class-name} (@pxref{Symbol Components,,,elisp,GNU Emacs Lisp Reference Manual}). +When defining a class, @eieio{} overwrites any preexisting variable or +function bindings for the symbol @var{class-name}, which may lead to +undesired consequences. Before naming a new class, you should check +for name conflicts. + The @var{class-name} symbol's variable documentation string is a modified version of the doc string found in @var{options-and-doc}. Each time a method is defined, the symbol's documentation string is -updated to include the methods documentation as well. +updated to include the method's documentation as well. The parent classes for @var{class-name} is @var{superclass-list}. Each element of @var{superclass-list} must be a class. These classes @@ -625,10 +630,10 @@ Class Options @node Making New Objects @chapter Making New Objects -Suppose we have a simple class is defined, such as: +Suppose we have defined a simple class, such as: @example -(defclass record () +(defclass my-class () ( ) "Doc String") @end example @@ -636,10 +641,10 @@ Making New Objects It is now possible to create objects of that class type. Calling @code{defclass} has defined two new functions. One is the -constructor @var{record}, and the other is the predicate, -@var{record}-p. +constructor @var{my-class}, and the other is the predicate, +@var{my-class}-p. -@defun record object-name &rest slots +@defun my-class object-name &rest slots This creates and returns a new object. This object is not assigned to anything, and will be garbage collected if not saved. This object @@ -657,7 +662,7 @@ Making New Objects Example of creating an object from a class: @example -(record :value 3 :reference nil) +(my-class :value 3 :reference nil) @end example @end defun -- 2.18.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 09 19:10:32 2019 Received: (at 31660) by debbugs.gnu.org; 9 Apr 2019 23:10:32 +0000 Received: from localhost ([127.0.0.1]:52145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDzst-0001mI-JR for submit@debbugs.gnu.org; Tue, 09 Apr 2019 19:10:31 -0400 Received: from mail-qk1-f178.google.com ([209.85.222.178]:34332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hDzsr-0001lx-6U; Tue, 09 Apr 2019 19:10:29 -0400 Received: by mail-qk1-f178.google.com with SMTP id n68so106884qka.1; Tue, 09 Apr 2019 16:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4y2UKhUkvR56MH0qDihSkDxbSJiwGghSmlKSgkNtrpc=; b=trPeWibcH4c+n4mOFgSdaZl7q7Oav2hc7GqZlA8v5KI5fsdZr94H3E9tSaMsnNFx8J HwpopzlTbplWC+YtBqVHYjJBbQ0frghPvVWUT/xkjpga+av8X0GWA4TeOyx94oBRqC1O QSGrUcTusLa0H4HepnPRpVLoY01nxMgAYXrVuJWhNQQm4lzKycuDnSkm5ILWHW5HQV9T 6Efun62Dzm41+8lXNduM+yS465qXlsEZ5T1us4LpGOefVp1ZYQABg1KrbrmbYwqMQpDe k7iDvfAkT7Umw1G0yOhps6uythdPrPWCviNIjEMglOVMD4KCz+uJ5FXL4C9YAdkpxcXS qiNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4y2UKhUkvR56MH0qDihSkDxbSJiwGghSmlKSgkNtrpc=; b=TDpWSouhqeGN08nuquclkJ9TS2ZzZHUWUDETuPJ3fUCMb1P9m3UaQYo11v7sKR9wAN JIUs6QXp7/1aPCJ2FT5Fou3pmTX3ZJTNRhHHb5vvi1UkuzZf1Nkx393H8vQdTtFDipNz HW9GfA8A1nkg2Tc1LtC91ED3dezuHm/hqVA5Pqamc8EpJZH46CrbhgOjodDNPt95x/uQ vEgdk+eoISCoi3i8rMWKnDAAq53NzokhvcPXCZQwLaDHkK9yUO87ltCnCmC4sxSx2Luc ZPwmP3AWXE889amqrVWCA2lw55EWmKDeCgaYS6uvXaGldfadt1LibMP3H9kbM17OwiGq TMCw== X-Gm-Message-State: APjAAAUfObOM1hdbMPgGvmuoIUn+puqUqlZqDGXn0xlZdTDyY1FwMjPm rrdRC6SxkLLu5b0VwxgyX+pn5Jyq X-Google-Smtp-Source: APXvYqxBg9NAbLjMSNBOfxdKLlOeqfDlM88aHu4hKBjCc6jxyfOxtaPpFeZBrqW+Hdkuu2dY09nu5Q== X-Received: by 2002:a37:69c3:: with SMTP id e186mr10009975qkc.308.1554851423534; Tue, 09 Apr 2019 16:10:23 -0700 (PDT) Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id s17sm21570000qtc.15.2019.04.09.16.10.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Apr 2019 16:10:22 -0700 (PDT) From: Noam Postavsky To: Gemini Lasswell Subject: Re: bug#31660: 26.1.50; EIEIO manual's Quick Start example makes Emacs unusable References: <87wovl3r4u.fsf@runbox.com> <878t7wafb0.fsf@gmail.com> <87a7m0rctv.fsf@runbox.com> Date: Tue, 09 Apr 2019 19:10:21 -0400 In-Reply-To: <87a7m0rctv.fsf@runbox.com> (Gemini Lasswell's message of "Thu, 22 Nov 2018 14:01:48 -0800") Message-ID: <87v9zmbwrm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 31660 Cc: 31660@debbugs.gnu.org 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.0 (-) tags 31660 fixed close 31660 26.2 quit Gemini Lasswell writes: > > Here's a patch to eieio.texi which makes the examples work, and adds a > suggestion to check for name conflicts to the description of 'defclass': > +When defining a class, @eieio{} overwrites any preexisting variable or > +function bindings for the symbol @var{class-name}, which may lead to > +undesired consequences. Before naming a new class, you should check > +for name conflicts. I added another sentence here about using package prefixes, and pushed to emacs-26. 8d2f1df51a 2019-04-09T18:53:43-04:00 "Address name conflicts in EIEIO documentation (bug#31660)" From unknown Wed Sep 10 06:21:11 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 May 2019 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator