* Invalid function error in cl.el
@ 2006-02-22 21:11 John Russell
2006-02-22 21:36 ` Pascal Bourguignon
2006-02-24 0:35 ` Kevin Rodgers
0 siblings, 2 replies; 5+ messages in thread
From: John Russell @ 2006-02-22 21:11 UTC (permalink / raw)
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.
John
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function error in cl.el
2006-02-22 21:11 Invalid function error in cl.el John Russell
@ 2006-02-22 21:36 ` Pascal Bourguignon
2006-02-22 21:53 ` John Russell
2006-02-24 0:35 ` Kevin Rodgers
1 sibling, 1 reply; 5+ messages in thread
From: Pascal Bourguignon @ 2006-02-22 21:36 UTC (permalink / raw)
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
--
__Pascal Bourguignon__ http://www.informatimago.com/
Small brave carnivores
Kill pine cones and mosquitoes
Fear vacuum cleaner
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function error in cl.el
2006-02-22 21:36 ` Pascal Bourguignon
@ 2006-02-22 21:53 ` John Russell
2006-02-23 15:57 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: John Russell @ 2006-02-22 21:53 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function error in cl.el
2006-02-22 21:53 ` John Russell
@ 2006-02-23 15:57 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2006-02-23 15:57 UTC (permalink / raw)
> This clip is in buffer-stack.el
> (incf buffer-stack-index)
> I replaced it with
> (setq buffer-stack-index (1+ buffer-stack-index))
You don't need to replace it, it was perfectly valid. But maybe the file is
missing an (eval-when-compile (require 'cl)) at its top.
> 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.
You probably recompiled buffer-stack.el and this recompilation was done when
CL was not loaded, which resulted in a broken buffer-stack.elc.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Invalid function error in cl.el
2006-02-22 21:11 Invalid function error in cl.el John Russell
2006-02-22 21:36 ` Pascal Bourguignon
@ 2006-02-24 0:35 ` Kevin Rodgers
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-02-24 0:35 UTC (permalink / raw)
John Russell wrote:
> 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.
It's because the author buffer-stack.el was not careful to make sure
it would work on Emacs: (require 'cl) or
(eval-when-compile (require 'cl))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-02-24 0:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-22 21:11 Invalid function error in cl.el John Russell
2006-02-22 21:36 ` Pascal Bourguignon
2006-02-22 21:53 ` John Russell
2006-02-23 15:57 ` Stefan Monnier
2006-02-24 0:35 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.