help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Something like an array (list) of a class


From: Decebal
Subject: Re: Something like an array (list) of a class
Date: Mon, 13 Apr 2009 07:56:07 -0700 (PDT)
User-agent: G2/1.0

On 13 apr, 13:55, Decebal <CLDWester...@gmail.com> wrote:
> I tried the following:
>     (require 'cl)
>
>     (defstruct
>       (ModeLine
>        (:constructor nil)
>        (:constructor new-ModeLine (type description display function))
>        )
>       (type        :read-only t)
>       (description :read-only t)
>       (display     :read-only t)
>       (function    :read-only t)
>       )
>
>     (setq e (new-ModeLine
>              "word"
>              "Display number of words"
>              "W"
>              'buffer-count-words
>              )
>           )

This does not do what I would expect. I can execute:
    (setf (ModeLine-type e) "dummy")
And type word is changed to dummy. What am I doing wrong?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]