[Top][All Lists]

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

Misc. minor compile.el issues

From: Kim F. Storm
Subject: Misc. minor compile.el issues
Date: 06 Dec 2002 01:34:58 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

The doc string for compilation-process-setup-function starts with a
`*' identifying it as a user option.  Does that really make sense?

IMO, it is similar to compilation-buffer-name-function which is
not a user option.

Related to this, I would like the setup function to be able to
access the buffer and/or window for the compilation process (e.g.
to set buffer-local variables).

Currently, this can be achieved by accessing the dynamic bound
variables `outbuf' and `outwin' from the setup function, but that
seems like a gross hack.  

It would make more sense to provide `outwin' as argument to the setup
function, but that would break existing code.

Alternatively, we could dynamically bind `compilation-window' and
`compilation-buffer' around the call to the setup function (and
document this "interface" in the compilation-process-setup-function
doc string).

This is still a hack, but using well-defined names.

As a final issue, I think that although the documentation for
compilation-process-setup-function says it is run just before the
process is started, it makes more sense to swap the following two
forms, to allow the setup function to control the

        (compilation-set-window-height outwin)
        (if compilation-process-setup-function
            (funcall compilation-process-setup-function))

In any case, I don't see any ill effects of swapping them.

Kim F. Storm <address@hidden> http://www.cua.dk

reply via email to

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