Discussion:
Is this a bug in elisp
(too old to reply)
Santanu
2007-12-12 06:56:14 UTC
Permalink
Hello Everybody,

I am using GNU Emacs-22.1.50.1 (Ubuntu 7.10). I was having some
problems with the verilog-mode in this version of Emacs (although
it worked perfectly in Emacs-21.x). It seems that I found the location
of the problem. But since I don't know elisp, I am unable to
understand
the cause of the problem. So I am just inserting below what I think
is the relevant portion of the code:

-----------------------------------------------
(define-skeleton verilog-sk-prompt-msb
"Prompt for least significant bit specification."
"msb:" str & ?: & (verilog-sk-prompt-lsb) | -1 )

(define-skeleton verilog-sk-prompt-lsb
"Prompt for least significant bit specification."
"lsb:" str )
-----------------------------------------------

I just defined those functions above in the *scratch*
buffer. Then tried to evaluate (verilog-sk-prompt-msb).
Instead of the expected result, I am placed in a debug
buffer with the following content I cannot figure out:
(Doing the same in emacs-21.x does not cause any
problem)
--------------------------------------------------
Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-
eval-depth'")
skeleton-internal-1(t t nil)
skeleton-internal-1(t t nil)
skeleton-internal-1(t t nil)
....
....
skeleton-internal-1(t t nil)
skeleton-internal-1(t t nil)
skeleton-internal-1((verilog-sk-prompt-lsb) nil nil)
byte-code("Ã@Ã #‡" [skeleton recursive skeleton-internal-1
nil] 4)
skeleton-internal-list(("msb:" str & 58 & (verilog-sk-prompt-lsb) |
-1) nil)
(let nil (skeleton-internal-list skeleton str))
eval((let nil (skeleton-internal-list skeleton str)))
skeleton-insert(("msb:" str & 58 & (verilog-sk-prompt-lsb) | -1) nil
nil)
skeleton-proxy-new(("msb:" str & 58 & (verilog-sk-prompt-lsb) | -1)
nil nil)
verilog-sk-prompt-msb()
eval((verilog-sk-prompt-msb))
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
--------------------------------------------------------

I feel like I am getting into an endless recursion here. Dunno how.
It would be very helpful if anyone could suggest/provide a fix.

Thanks in advance for your help.

Regards,
Santanu Chatterjee
Tim X
2007-12-12 09:47:30 UTC
Permalink
Post by Santanu
Hello Everybody,
I am using GNU Emacs-22.1.50.1 (Ubuntu 7.10). I was having some
problems with the verilog-mode in this version of Emacs (although
it worked perfectly in Emacs-21.x). It seems that I found the location
of the problem. But since I don't know elisp, I am unable to
understand
the cause of the problem. So I am just inserting below what I think
-----------------------------------------------
(define-skeleton verilog-sk-prompt-msb
"Prompt for least significant bit specification."
"msb:" str & ?: & (verilog-sk-prompt-lsb) | -1 )
(define-skeleton verilog-sk-prompt-lsb
"Prompt for least significant bit specification."
"lsb:" str )
-----------------------------------------------
I just defined those functions above in the *scratch*
buffer. Then tried to evaluate (verilog-sk-prompt-msb).
Instead of the expected result, I am placed in a debug
(Doing the same in emacs-21.x does not cause any
problem)
--------------------------------------------------
Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-
eval-depth'")
Firstly, this question would be better sent to the gnu.emacs.help group as
it is emacs lisp specific and not a general lisp question.

There are many possible causes for the error you see. However, the most
common one I've seen for this error is when you are running elisp
which has been byte compiled for a different version of emacs to the one
you are running. In your current situation, I would suspect that you have
byte compiled the code using emacs 21 and are trying to run it in emacs
22.

Another possible explination is that changes in elisp between versions is
the problem. Check the NEWS and PROBLEMS file for emacs 22. There are often
changes/improvements/extensions in newer versions that can break some
code. In the NEWS file, there is usually sections on visible (interface)
changes and function/code changes in emacs lisp. remember that emacs lisp
is not CL and doesn't have a well defined and stable spec (though its
usually pretty good).

Tim
--
tcross (at) rapttech dot com dot au
Santanu
2007-12-12 11:46:23 UTC
Permalink
...
Post by Tim X
Firstly, this question would be better sent to the gnu.emacs.help group as
it is emacs lisp specific and not a general lisp question.
First of all, thanks for your response.
I will post this in gnu.emacs.help shortly (actually I was searching
for an elisp
group but could not find one).
Post by Tim X
...
In your current situation, I would suspect that you have
byte compiled the code using emacs 21 and are trying to run it in emacs
22.
I don't know for sure how to verify this. All I can say is that I
installed both versions using
apt-get in "ubuntu 7.10" for which the default emacs version is 22.
However, after
getting your reply, I tried the same thing on a separate Ubuntu-7.10
machine without
any emacs installed previously (so only the default emacs 22 was
installed) but I got
the same result.
Post by Tim X
Another possible explanation is that changes in elisp between versions is
the problem. Check the NEWS and PROBLEMS file for emacs 22. There are often
changes/improvements/extensions in newer versions that can break some
code. In the NEWS file, there is usually sections on visible (interface)
changes and function/code changes in emacs lisp. remember that emacs lisp
is not CL and doesn't have a well defined and stable spec (though its
usually pretty good).
Will check this out.

Thanks again.

Regards,
Santanu Chatterjee
Barry Margolin
2007-12-13 05:53:13 UTC
Permalink
In article
Post by Santanu
...
Post by Tim X
Firstly, this question would be better sent to the gnu.emacs.help group as
it is emacs lisp specific and not a general lisp question.
First of all, thanks for your response.
I will post this in gnu.emacs.help shortly (actually I was searching
for an elisp
group but could not find one).
Didn't you already do that? I remember seeing this same question posted
in an emacs group yesterday.
--
Barry Margolin, ***@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
santanu
2007-12-13 07:53:10 UTC
Permalink
Post by Barry Margolin
Post by Santanu
I will post this in gnu.emacs.help shortly (actually I was searching
for an elisp
group but could not find one).
Didn't you already do that? I remember seeing this same question posted
in an emacs group yesterday.
:-) Well, I posted in comp.lang.lisp, gnu.emacs simultaneously. Then
I
posted the same thing in gnu.emacs.help as suggested. Now I am
getting some identical responses from multiple groups. :-)

-Santanu

John Thingstad
2007-12-12 12:06:18 UTC
Permalink
Post by Tim X
Firstly, this question would be better sent to the gnu.emacs.help group as
it is emacs lisp specific and not a general lisp question.
You might want to try comp.emacs which is more elisp oriented.

--------------
John Thingstad
Loading...