[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "push" creating circular objects
From: |
Charles Sebold |
Subject: |
Re: "push" creating circular objects |
Date: |
Thu, 21 Aug 2008 07:12:54 -0700 (PDT) |
User-agent: |
G2/1.0 |
On Aug 20, 4:50 pm, weber <hug...@gmail.com> wrote:
> Minor variation:
>
> (defun test2 (str)
> (let (my-list)
> (with-temp-buffer
> (insert str)
> (goto-char (point-min))
> (while (not (eobp))
> (cond
> ((= (char-after) ?#)
> (push "ol" my-list))
> ((= (char-after) ?*)
> (push "ul" my-list)))
> (forward-char 1)))
> my-list))
>
> no need to bind my-list to nil too :)
Useful tip, thanks.
Astoundingly I'm still having the same problem, when I run this in the
context of the larger program. Against the string "** " it returns
the circular list (#1="ul" #1#). In the scratch buffer it works (same
as with my function earlier).
So, I must be rebinding something else in a bad way, but heck if I
know how. I'm going to try to trim the whole problem down to a bare
minimum test case and then if I can't figure it out I'll post the
whole thing and ask people to eval and see what they can come up
with. Thanks for your time.
Charlie
Re: "push" creating circular objects, John Paul Wallington, 2008/08/21