[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: studying emacs internals
From: |
Scott Lanning |
Subject: |
Re: studying emacs internals |
Date: |
Sat, 1 Dec 2001 23:46:18 -0500 |
On Sat, 1 Dec 2001, I wrote:
>Mostly I have it done. But, now I found I want to deallocate
>the structure. Here is some elisp that uses the DEFUNs that
>I made:
>
> ;; Allocate the struct
> (setq mystruct (create-mystruct))
[....]
> ;; Nicely free the memory of the struct
> (delete-mystruct mystruct)
>
>The problem is the final call, I would like the
>variable mystruct to be void (I think, maybe not?),
>like before it was created with setq. I tried calling
>Fset(mystruct, Qunbound), but mystruct isn't a symbol.
To followup, Stefan Monnier helped me by private messages to
realize that I didn't in fact want to make the variable `mystruct'
(that was returned from (create-mystruct)) to be void after
delete-mystruct was called. For one thing, he made the analogy
with kill-buffer and delete-window that they are always called in
void context without modifying anything like that. Instead they
would give the lisp user functions like buffer-live-p or
window-live-p to test if the buffer or window was still valid.