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

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

Re: "push" creating circular objects


From: xraysmalevich
Subject: Re: "push" creating circular objects
Date: Thu, 21 Aug 2008 07:25:14 -0700 (PDT)
User-agent: G2/1.0

On Aug 21, 10:12 am, Charles Sebold <address@hidden> wrote:
> On Aug 20, 4:50 pm, weber <address@hidden> 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

To check if you've rebound a function, try running emacs without the
init file (emacs -q) and see if that changes this behavior.


reply via email to

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