unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* invalid-function kbd on Emacs 24.2
@ 2013-02-09 16:16 Carlos López Camey
  2013-02-09 20:04 ` Eli Zaretskii
       [not found] ` <mailman.19446.1360440299.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 10+ messages in thread
From: Carlos López Camey @ 2013-02-09 16:16 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I just compiled emacs-24.2 and then went on to install haskell-mode
using the package manager. When I trigger M-x haskell-mode I'm
presented with the following error:

Debugger entered--Lisp error: (invalid-function kbd)
  kbd("C-c C-t")

If I click at "kbd" on the Debugger Mode, it goes to the definition in
subr.el.gz. If I call (kbd "<f7>" on ielm, the expression evaluates to
[f7] which makes the error above look odd. Do you happen to know how
can I fix it?

Thanks for your help,

Carlos



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: invalid-function kbd on Emacs 24.2
  2013-02-09 16:16 invalid-function kbd on Emacs 24.2 Carlos López Camey
@ 2013-02-09 20:04 ` Eli Zaretskii
       [not found] ` <mailman.19446.1360440299.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2013-02-09 20:04 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Carlos López Camey <c.lopez@kmels.net>
> Date: Sat, 9 Feb 2013 17:16:13 +0100
> 
> I just compiled emacs-24.2 and then went on to install haskell-mode
> using the package manager. When I trigger M-x haskell-mode I'm
> presented with the following error:
> 
> Debugger entered--Lisp error: (invalid-function kbd)
>   kbd("C-c C-t")

This doesn't happen to me, at least not with the latest haskell-mode
from Github.  Here's what I did:

  emacs -Q
  M-x load-file RET haskell-mode.el RET
  M-x haskell-mode RET

No error after that.

Maybe some of your other customizations are at work here.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: invalid-function kbd on Emacs 24.2
       [not found] ` <mailman.19446.1360440299.855.help-gnu-emacs@gnu.org>
@ 2013-02-09 20:32   ` Michael Heerdegen
  2013-02-09 22:02     ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Heerdegen @ 2013-02-09 20:32 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

> > From: Carlos López Camey <c.lopez@kmels.net>
> > Date: Sat, 9 Feb 2013 17:16:13 +0100
> > 
> > I just compiled emacs-24.2 and then went on to install haskell-mode
> > using the package manager. When I trigger M-x haskell-mode I'm
> > presented with the following error:
> > 
> > Debugger entered--Lisp error: (invalid-function kbd)
> >   kbd("C-c C-t")
>
> This doesn't happen to me, at least not with the latest haskell-mode
> from Github.  Here's what I did:
>
>   emacs -Q
>   M-x load-file RET haskell-mode.el RET
>   M-x haskell-mode RET
>
> No error after that.

I too can't reproduce this.

But, FWIW, I saw this kind of error several times in the past, with
different functions.  Although functions were defined, I got an
`invalid function' error.  Every time, only running compiled code was
affected.  I have no short recipe, however.


Regards,

Michael.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: invalid-function kbd on Emacs 24.2
  2013-02-09 20:32   ` Michael Heerdegen
@ 2013-02-09 22:02     ` Drew Adams
  2013-02-09 22:05       ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2013-02-09 22:02 UTC (permalink / raw)
  To: 'Michael Heerdegen', help-gnu-emacs

> > > I just compiled emacs-24.2 and then went on to install 
> > > haskell-mode using the package manager. When I trigger
> > > M-x haskell-mode I'm presented with the following error:
> > > Debugger entered--Lisp error: (invalid-function kbd)
> > >   kbd("C-c C-t")
> >
> > This doesn't happen to me, at least not with the latest haskell-mode
> > from Github.  Here's what I did:
> >
> >   emacs -Q
> >   M-x load-file RET haskell-mode.el RET
> >   M-x haskell-mode RET
> >
> > No error after that.
> 
> I too can't reproduce this.
> 
> But, FWIW, I saw this kind of error several times in the past, with
> different functions.  Although functions were defined, I got an
> `invalid function' error.  Every time, only running compiled code was
> affected.  I have no short recipe, however.

Recall that `kbd' changed recently from a macro to a function.  My guess is that
that might have something to do with this.  Just a hunch.  Maybe an old
byte-compiled file is involved somehow.  




^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: invalid-function kbd on Emacs 24.2
  2013-02-09 22:02     ` Drew Adams
@ 2013-02-09 22:05       ` Drew Adams
  2013-02-10  5:28         ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2013-02-09 22:05 UTC (permalink / raw)
  To: 'Michael Heerdegen', help-gnu-emacs

> Recall that `kbd' changed recently from a macro to a 
> function.  My guess is that
> that might have something to do with this.  Just a hunch.  
> Maybe an old byte-compiled file is involved somehow.  

But you said 24.2 - the release, which does has `kbd' only as a macro.

So maybe the problem is a more recent haskell library that expects `kbd' to be a
function, and so does not DTRT to get the macro `kbd' (loaded).  (The macro is
all that is available in 24.2, AFAIK.)




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: invalid-function kbd on Emacs 24.2
  2013-02-09 22:05       ` Drew Adams
@ 2013-02-10  5:28         ` Eli Zaretskii
  2013-02-10 17:00           ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-02-10  5:28 UTC (permalink / raw)
  To: Drew Adams; +Cc: michael_heerdegen, help-gnu-emacs

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Sat, 9 Feb 2013 14:05:10 -0800
> 
> > Recall that `kbd' changed recently from a macro to a 
> > function.  My guess is that
> > that might have something to do with this.  Just a hunch.  
> > Maybe an old byte-compiled file is involved somehow.  
> 
> But you said 24.2 - the release, which does has `kbd' only as a macro.
> 
> So maybe the problem is a more recent haskell library that expects `kbd' to be a
> function, and so does not DTRT to get the macro `kbd' (loaded).

Unlikely: I tried both with 24.2 and the current development version,
and didn't get the error either way.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: invalid-function kbd on Emacs 24.2
  2013-02-10  5:28         ` Eli Zaretskii
@ 2013-02-10 17:00           ` Drew Adams
  2013-02-10 17:38             ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2013-02-10 17:00 UTC (permalink / raw)
  To: 'Eli Zaretskii'; +Cc: michael_heerdegen, help-gnu-emacs

> > > Recall that `kbd' changed recently from a macro to a 
> > > function.  My guess is that
> > > that might have something to do with this.  Just a hunch.  
> > > Maybe an old byte-compiled file is involved somehow.  
> > 
> > But you said 24.2 - the release, which does has `kbd' only 
> > as a macro.
> > 
> > So maybe the problem is a more recent haskell library that 
> > expects `kbd' to be a function, and so does not DTRT to get
> > the macro `kbd' (loaded).
> 
> Unlikely: I tried both with 24.2 and the current development version,
> and didn't get the error either way.

Did you try with a recent Haskell library?

That was my suggestion of what to check: a (new) Haskell file that expects `kbd'
as a function (so does not try to load the file defining its macro), plus an
Emacs version (24.2) that provides it only as a macro.  Just a possibility to
check.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: invalid-function kbd on Emacs 24.2
  2013-02-10 17:00           ` Drew Adams
@ 2013-02-10 17:38             ` Eli Zaretskii
  2013-02-10 18:02               ` Drew Adams
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-02-10 17:38 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: <michael_heerdegen@web.de>, <help-gnu-emacs@gnu.org>
> Date: Sun, 10 Feb 2013 09:00:18 -0800
> 
> > > > Recall that `kbd' changed recently from a macro to a 
> > > > function.  My guess is that
> > > > that might have something to do with this.  Just a hunch.  
> > > > Maybe an old byte-compiled file is involved somehow.  
> > > 
> > > But you said 24.2 - the release, which does has `kbd' only 
> > > as a macro.
> > > 
> > > So maybe the problem is a more recent haskell library that 
> > > expects `kbd' to be a function, and so does not DTRT to get
> > > the macro `kbd' (loaded).
> > 
> > Unlikely: I tried both with 24.2 and the current development version,
> > and didn't get the error either way.
> 
> Did you try with a recent Haskell library?

I don't understand what that means.  I loaded the latest haskell-mode
and turned the mode on.  This was said to produce the error; it
didn't.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: invalid-function kbd on Emacs 24.2
  2013-02-10 17:38             ` Eli Zaretskii
@ 2013-02-10 18:02               ` Drew Adams
  2013-02-10 19:37                 ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2013-02-10 18:02 UTC (permalink / raw)
  To: 'Eli Zaretskii', help-gnu-emacs

> > > > So maybe the problem is a more recent haskell library that 
> > > > expects `kbd' to be a function, and so does not DTRT to get
> > > > the macro `kbd' (loaded).
> > > 
> > > Unlikely: I tried both with 24.2 and the current 
> > > development version, and didn't get the error either way.
> > 
> > Did you try with a recent Haskell library?
> 
> I don't understand what that means.  I loaded the latest haskell-mode
> and turned the mode on.  This was said to produce the error; it
> didn't.

I was guessing that the OP picked up recent Haskell-mode code somewhere
(official or not), and that it perhaps counted on a `kbd' function (not macro),
so it didn't do anything to load the 24.2 code that contains the `kbd' macro
definition - either at compile time or runtime.

Clearly, the error message indicates that a definition of `kbd' is being
expected at runtime, but is not available then.  I was just trying to work
backward from there.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: invalid-function kbd on Emacs 24.2
  2013-02-10 18:02               ` Drew Adams
@ 2013-02-10 19:37                 ` Eli Zaretskii
  0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2013-02-10 19:37 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Drew Adams" <drew.adams@oracle.com>
> Date: Sun, 10 Feb 2013 10:02:42 -0800
> 
> > > > > So maybe the problem is a more recent haskell library that 
> > > > > expects `kbd' to be a function, and so does not DTRT to get
> > > > > the macro `kbd' (loaded).
> > > > 
> > > > Unlikely: I tried both with 24.2 and the current 
> > > > development version, and didn't get the error either way.
> > > 
> > > Did you try with a recent Haskell library?
> > 
> > I don't understand what that means.  I loaded the latest haskell-mode
> > and turned the mode on.  This was said to produce the error; it
> > didn't.
> 
> I was guessing that the OP picked up recent Haskell-mode code somewhere
> (official or not), and that it perhaps counted on a `kbd' function (not macro),
> so it didn't do anything to load the 24.2 code that contains the `kbd' macro
> definition - either at compile time or runtime.

I used the latest haskell-mode available from their git repository,
FWIW.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-10 19:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-09 16:16 invalid-function kbd on Emacs 24.2 Carlos López Camey
2013-02-09 20:04 ` Eli Zaretskii
     [not found] ` <mailman.19446.1360440299.855.help-gnu-emacs@gnu.org>
2013-02-09 20:32   ` Michael Heerdegen
2013-02-09 22:02     ` Drew Adams
2013-02-09 22:05       ` Drew Adams
2013-02-10  5:28         ` Eli Zaretskii
2013-02-10 17:00           ` Drew Adams
2013-02-10 17:38             ` Eli Zaretskii
2013-02-10 18:02               ` Drew Adams
2013-02-10 19:37                 ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).