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

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

Re: compile perl file, specify current buffer, using help effectively


From: David Hansen
Subject: Re: compile perl file, specify current buffer, using help effectively
Date: Wed, 03 May 2006 12:39:36 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

On Tue, 2 May 2006 22:04:56 -0400 David Schneider wrote:

> I am trying to use emacs as an IDE for perl development.  I think it
> would be useful to have a compile command that runs perl on the
> current buffer I am editing.  The compile command defaults to make -k.
> I want to change it to perl xx where xx is the name of the current
> buffer - is there some variable or special syntax I can use to get the
> current filename?  More important then the answer, is how do I figure
> this out from the help.  I have been using C-h a to try to search the
> help.  This gives me lists of commands or variables which may be
> related - but I frequently find my questions are still unanswered.

Not tested:

(add-hook 'perl-mode-hook
          (lambda ()
            (set (make-local-variable 'compile-command)
                 (concat "perl -w " (buffer-file-name)))))

Anyway i doub't that the compile mode will recognize the
perl errors and warnings.

David





reply via email to

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