emacs-devel
[Top][All Lists]
Advanced

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

Re: compilation-process-setup-function doc bug?


From: Stefan Monnier
Subject: Re: compilation-process-setup-function doc bug?
Date: Wed, 04 Nov 2009 20:57:00 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

> I believe the documentation string for the variable
> compilation-process-setup-function is wrong or less than clear.
> It says:

>   *Function to call to customize the compilation process.
>   This function is called immediately before the compilation process is
>   started.  It can be used to set any variables or functions that are
>   used while processing the output of the compilation process.  The
>   function is called with variables `compilation-buffer' and
>   `compilation-window' bound to the compilation buffer and window,
>   respectively.
[...]
> but when I do M-x compile, Emacs is not happy with the arguments.
> It is actually called with no arguments.  So next I'm thinking maybe this is
> what the documentation means:

> (defun test ()
>   (message "The args are %s %s" compilation-buffer compilation-window)
>   ...)

Yes, that's what it means.

> but Emacs complains that the variables are void, which seems reasonable.

Indeed, it appears the doc disagrees with the code.
I'm not sure when the problem appeared, but the `compilation-buffer' is
(current-buffer).  OTOH compilation-window is not
immediately available.  (get-buffer-window (curent-buffer) 0) will
usually return the right window, tho.


        Stefan




reply via email to

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