emacs-devel
[Top][All Lists]
Advanced

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

Re: goto-line trouble with narrowing


From: Johan Bockgård
Subject: Re: goto-line trouble with narrowing
Date: Wed, 01 Feb 2006 08:52:47 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Kevin Rodgers <address@hidden> writes:

> Johan Bockgård wrote:

>> (byte-compile (lambda () (widen)))  =>  #[nil "~\207" [] 1]
>
> Thanks Johan, but you'll have to fill me in on a few details since I
> can't read Emacs Lisp byte code.

No? Try disassemble :)

There is a special byte op-code for `widen' so the compiled function
call doesn't go through the symbol[1].

Compare it with this[2]:

    (byte-compile (lambda () (foo))) => #[nil "\300 \207" [foo] 1]

Note the `foo' here and the fact that `widen' isn't mentioned in the
right hand side above.

> Nor do I understand why your example is relevant; isn't this what
> `flet' sets `widen's symbol binding to:
>
> (byte-compile (lambda () t)) => #[nil "\300\207" [t] 1]

Indeed, but the symbol isn't involved.


[1] (disassemble #[nil "~\207" [] 1])
    byte code:
      args: nil
    0       widen     
    1       return    


[2] (disassemble #[nil "\300 \207" [foo] 1])
    byte code:
      args: nil
    0       constant  foo
    1       call      0
    2       return    


-- 
People do not write byte-code; that job is left to the byte compiler.
But we provide a disassembler to satisfy a cat-like curiosity. The
disassembler converts the byte-compiled code into humanly readable
form. -- (info "(elisp)Disassembly")





reply via email to

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