[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Invalid function error in cl.el
From: |
John Russell |
Subject: |
Re: Invalid function error in cl.el |
Date: |
Wed, 22 Feb 2006 16:53:48 -0500 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) |
Pascal Bourguignon <usenet@informatimago.com> writes:
> John Russell <jorussel@cisco.com> writes:
>
>> I am using emacs 21.4.1 on Gentoo with buffer-stack.el. Briefly its a
>> fairly common extension that allows you to switch quickly between
>> active buffers. I have used it for years with no problems. Great,
>> you say, but why do I care?
>>
>> Recently whenever I try to call buffer-stack-up or buffer-stack-down (
>> the main entry points for buffer-stack ) I get the following error
>>
>> buffer-stack-move: Invalid function: (macro lambda (place &optional x)
>> "Increment PLACE by X (1 by default).
>> PLACE may be a symbol, or any generalized variable allowed by `setf'.
>> The return value is the incremented value of PLACE." (if (symbolp
>> place) (list (quote setq) place (if x (list (quote +) place x) (list
>> (quote 1+) place))) (list (quote callf) (quote +) place (or x 1))))
>>
>> I have tried reinstalling emacs, removing other things from my config,
>> byte compiled, not byte compiled, on an empty stomach, nothing helps.
>> The thing that kills me is that this has worked for so long and now
>> it doesn't. It has to be something I did, but I can't for the life of
>> me figure it out. Any ideas? Thanks a lot.
>
> The form:
>
> (macro lambda (place &optional x)
> "Increment PLACE by X (1 by default).
> PLACE may be a symbol, or any generalized variable allowed by `setf'.
> The return value is the incremented value of PLACE." (if (symbolp
> place) (list (quote setq) place (if x (list (quote +) place x) (list
> (quote 1+) place))) (list (quote callf) (quote +) place (or x 1))))
>
> is not a function. It looks like the body of the incf macro.
> Perhaps buffer-stack.el tries to funcall (symbol-function 'incf) ?
> It should avoid incf, since it's defined as a macro in cl-macs.el
>
This clip is in buffer-stack.el
(incf buffer-stack-index)
I replaced it with
(setq buffer-stack-index (1+ buffer-stack-index))
Everything works as expected now, which is good, but this literally
worked for 3 years. I have no idea why it would break now. Eh,
anyway, thanks for the prod in the right direction.
John