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

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

Re: Run Command from python-mode


From: Kevin Rodgers
Subject: Re: Run Command from python-mode
Date: Mon, 24 Jul 2006 15:49:42 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

Kevin Harriss wrote:
I am using python-mode and I would like a similar solution to mapping
f10 to compile with csharp mode.  I would like f10 mapped to the command
'cvc cook <filename>' I was wondering what variable in python-mode would
need to be modified. I currently have this in my .emacs (setq 'compile-command "cvc cook")
(local-set-key [f10] 'compile)
When I open a python file I get this error File mode specification error: (wrong-type-argument symbolp (quote
compile-command))

(setq 'compile-command ...) == (setq (quote compile-command) ...)

Either use (setq SYMBOL ...) or (set (quote SYMBOL) ...)

Try this:

(add-hook 'python-mode-hook
          (lambda ()
            (local-set-key [f10] 'compile)
            (set (make-local-variable 'compile-command)
                 (format "cvc cook %s"
                         (file-name-nondirectory buffer-file-name)))))

--
Kevin





reply via email to

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