[Top][All Lists]

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

Re: M-x compile for different file extensions

From: Stefan Monnier
Subject: Re: M-x compile for different file extensions
Date: Sun, 20 Oct 2002 15:51:38 -0400

> On Sun, 20 Oct 2002 12:59:39 -0400, Richard Stallman <address@hidden> wrote:
> > 
> > The debugging feature could make sense, but why isn't `make -k' a good
> > default regardless of the kind of file?  In other words, why isn't
> > "You should write a proper makefile" a good solution for this?
> 1. There are many independent (small) programs which are
>    not part of a big project and so there is no need for make file.
> 2. We use the compile command on many type of files which are not
>    real "programs" - shell scripts (run with arguments), sql queries,
>    reports (printed by the `compile') and many, many others.
> 3. This makes it more easy to have a standard policy regarding saving
>    places for "compilation" output. For example we have some local
>    tool that work on *.pns files, our tool convert it to <name>.pnl
>    our defined 

Note that compile-command can hold an expression rather than a string,
so I think the best way to take care of some of those cases is with
something like

        (add-hook 'pns-mode-hook
                  (lambda ()
                    (set (make-local-variable 'compile-command)
                         '(format "pnsrun %s" buffer-file-name))))

-- Stefan

reply via email to

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