From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MON KEY Newsgroups: gmane.emacs.devel Subject: eieio's class allocated slots don't show on in object vectors. Date: Wed, 14 Oct 2009 18:30:33 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1255559458 7668 80.91.229.12 (14 Oct 2009 22:30:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 14 Oct 2009 22:30:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 15 00:30:48 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MyCMo-00077d-Rh for ged-emacs-devel@m.gmane.org; Thu, 15 Oct 2009 00:30:47 +0200 Original-Received: from localhost ([127.0.0.1]:48110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyCMo-0008TZ-Bx for ged-emacs-devel@m.gmane.org; Wed, 14 Oct 2009 18:30:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyCMi-0008Ry-Ed for emacs-devel@gnu.org; Wed, 14 Oct 2009 18:30:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyCMe-0008Jg-40 for emacs-devel@gnu.org; Wed, 14 Oct 2009 18:30:40 -0400 Original-Received: from [199.232.76.173] (port=56362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyCMd-0008JW-RF for emacs-devel@gnu.org; Wed, 14 Oct 2009 18:30:35 -0400 Original-Received: from mail-yx0-f175.google.com ([209.85.210.175]:51944) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyCMd-00007J-IY for emacs-devel@gnu.org; Wed, 14 Oct 2009 18:30:35 -0400 Original-Received: by yxe5 with SMTP id 5so307435yxe.24 for ; Wed, 14 Oct 2009 15:30:34 -0700 (PDT) Original-Received: by 10.150.35.3 with SMTP id i3mr529268ybi.128.1255559433641; Wed, 14 Oct 2009 15:30:33 -0700 (PDT) X-Google-Sender-Auth: db630207729f3ff8 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116151 Archived-At: On "GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-10-13 on LENNART-69DE564 (patched)" |> (describe-function 'describe-class) ,---- | {...} | If CLASS is actually an object, then also display current values of that object. `---- Either the above doesn't make sense as written or `describe-class' doesn't actually do what the doc says when CLASS _is_ an object. When a slot has an :allocation :class spec evaluating objects class does not reveal the value of the class-allocated slot. |> (defclass tt-c () ((some-s :initarg :some-s :allocation :class)) "doc tt-c") |> (defvar tt-cA nil) |> (defvar tt-cB nil) |> (setq tt-cA (tt-c "this-ttcA")) |> tt-cA ;=> [object tt-c "this-ttcA"] |> (setf (slot-value tt-cA 'some-s) "slot :some-s") |> (slot-value tt-cA 'some-s) ;=> "slot :some-s" |> (setq tt-cB (tt-c "this-ttcB")) |> tt-cB ;=> [object tt-c "this-ttcB"] |> (setf (slot-value tt-cB 'some-s) "slot :some-s onB") |> tt-cB ;=> [object tt-c "this-ttcB"] |> (slot-value tt-cB 'some-s) ;=> "slot :some-s onB" |>(object-slots tt-cA) ;=>nil (object-slots tt-cB) ;=>nil |> (describe-class tt-c) ;=> Class tt-c ; Documentation: ; doc tt-c ; Instance Allocated Slots: ; Class Allocated Slots: ; Slot: some-s value = "slot :some-s onB" |> (describe-class tt-cA) ;=> not-likely, even though a object's symbol is self-quoting. |> (class-v tt-c) ; lotsa vector |> (slot-exists-p tt-c 'some-s) ;=> (some-s) |> (slot-exists-p tt-cA 'some-s) ;=> (some-s) |> (slot-exists-p tt-cB 'some-s) ;=> (some-s) |> (slot-boundp tt-cA 'some-s) ;=> t |> (slot-boundp tt-cB 'some-s) ;=> t |> (slot-makeunbound tt-cB 'some-s) ;=> unbound |> (slot-boundp tt-cB 'some-s) ;=> nil |> (slot-boundp tt-cA 'some-s) ;=> nil |> (slot-value tt-cA 'some-s) ;=> unbound