From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Decebal Newsgroups: gmane.emacs.help Subject: Re: Something like an array (list) of a class Date: Mon, 13 Apr 2009 21:44:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9d3c8d66-ab0f-410a-9f68-d9edcd2ebfae@y7g2000yqa.googlegroups.com> References: <665d0b7a-3230-4123-b9f4-2a645f44dd1c@a7g2000yqk.googlegroups.com> <9fe617de-13d8-4dbc-82f8-3cc575008e48@o18g2000vbi.googlegroups.com> <0b45eaa6-232b-4bc3-a505-d47910f6478d@37g2000yqp.googlegroups.com> <97cb2f72-c82d-4143-9842-07240924b517@f19g2000yqo.googlegroups.com> <67e696b0-bdf8-45e2-86d6-4a696bb2ecfa@r37g2000yqn.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1239687687 17169 80.91.229.12 (14 Apr 2009 05:41:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 14 Apr 2009 05:41:27 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 14 07:42:46 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LtbPx-0006tW-ST for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Apr 2009 07:42:46 +0200 Original-Received: from localhost ([127.0.0.1]:36533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LtbOZ-00085u-3X for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Apr 2009 01:41:19 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!y7g2000yqa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 84.53.123.169 Original-X-Trace: posting.google.com 1239684242 14701 127.0.0.1 (14 Apr 2009 04:44:02 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 14 Apr 2009 04:44:02 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y7g2000yqa.googlegroups.com; posting-host=84.53.123.169; posting-account=K-cdeAoAAAD_0d505kUtHXJaT5LFIu-3 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.0.8) Gecko/2009032608 Firefox/3.0.8,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:168444 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63721 Archived-At: On 14 apr, 02:52, Barry Margolin wrote: > In article > <67e696b0-bdf8-45e2-86d6-4a696bb2e...@r37g2000yqn.googlegroups.com>, > > But there are a few problems: > > - I would like to have the vector modelineArray readonly. Is this > > possible? Is this possible, or do I want to much? > The syntax of a slot specification is > > (slot-name default options...) > > In your defstruct, you specified :read-only as the default, so it's not > being taken as an option name. =A0Try: > > (type nil :read-only t) That works. > > - The vector is notfilled with ModeLine objects. When executing: > > =A0 =A0 (aref modelineArray 2) > > I get: > > =A0 =A0 (new-ModeLine "words" "Display number of words" "W" (quote buff= er- > > count-words2)) > > So I can not do something like: > > =A0 =A0 (ModeLine-type (aref modelineArray 2)) > > What is the good way to fill the vector? > > [...] is for literals, it doesn't evaluate its contents. =A0Use (vector > ...) instead. That works also. I am slowly getting there.