emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Don't know where `open-network-stream' is defined


From: Kim F. Storm
Subject: Re: Don't know where `open-network-stream' is defined
Date: 21 Apr 2003 02:05:26 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Chris Mooooore <address@hidden> writes:

> If I describe function on open-network-stream, I see this:
>    open-network-stream is a compiled Lisp function.
>    (open-network-stream NAME BUFFER HOST SERVICE)
> 
> i.e. I don't see the source file that the function was defined in.

> I can see source for the function in lisp/subr.el - why doesn't Emacs
> know that's where it came from?

In CVS head, the defun for open-network-stream is conditioned like this:

(if (featurep 'make-network-process)
    (progn
     (defun open-network-stream ...)
     ...))

Since subr.el is byte-compiled, the resulting code is something like

(byte-code "..." [featurep make-network-process open-network-stream ...])

whereas a normal, unconditioned defun is compiled into a defalias form.

The problem with this is that the load-history (which records which defuns
and defaliases are loaded from which files) is NOT maintained when the
byte code is evaluated (that's only done for the defalias).

A fix would be for the byte compiler to explicitly ensure that the
load-history (or actually current-load-list) is updated properly for
byte-compiled defuns like these.  Or we could make a new byte-code for
Fdefalias which will update the current-load-list.


> 
> On the IRC channel it was reported:
> 
> <mmc> I'm using ERC Version 3.0 $Revision: 1.509 $ with Emacs 21.3.1!
> <mmc> here:  open-network-stream is a built-in function.
> 

That's true -- but in CVS head, open-network-stream is now defined in
lisp using the more generic make-network-process function.

-- 
Kim F. Storm  http://www.cua.dk





reply via email to

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