help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: compilation-error-regexp-alist syntax problems


From: Kevin Rodgers
Subject: Re: compilation-error-regexp-alist syntax problems
Date: Thu, 05 Feb 2004 12:40:19 -0700
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Stefan Monnier wrote:
>>I don't understand why it's better to evaluate the FORM immediately
>>after (provide FEATURE) or how that solves Roy's problem of augmenting a
>>list-valued variable defvar'ed in the FILE.  The advantage of late
>
> Assuming the `provide' is where the coding convention says it should be,
> then evaluating FORM right after it means that it's evaluated when the file
> has already been fully processed, just as Roy needs it.
> And since it relies on the feature name rather than ht efile name, it does
> not matter how you decided to load the file.

But then does it only work for files that provide a feature identical
to (the base of) the file name?  The implementation of eval-after-load
shouldn't depend on users/ programmers adhering to all these various
conventions, IMHO.

>>I thought it would result in those `defvar's being copied into
>>loaddefs.el, which would be dumped into the emacs executable, so they
>>could be safely referenced before the "compile" library was actually
>>loaded.  What am I misunderstanding?
>
> Look at his add-hook code: it intuitively should work.  Yet, even with your
> suggestion it won't work.  Your suggestion allows setting
> compilation-error-regexp-alist directly, but it is of no use when the var
> is set from the compilation-mode-hook.

Right, but that's because compile-internal overrides any changes to the
following variables that compilation-mode-hook might make to them:

        compilation-parse-errors-function
        compilation-error-message
        compilation-error-regexp-alist
        compilation-enter-directory-regexp-alist
        compilation-leave-directory-regexp-alist
        compilation-file-regexp-alist
        compilation-nomessage-regexp-alist
        compilation-arguments
        lazy-lock-defer-on-scrolling
        default-directory
        compilation-directory-stack

It looks like compilation-process-setup-function is the way to go:

| *Function to call to customize the compilation process.
| This functions 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.

--
Kevin Rodgers



reply via email to

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