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

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

auto complile the C program in the current buffer


From: GVK
Subject: auto complile the C program in the current buffer
Date: Mon, 14 Feb 2005 00:21:30 +0530
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Hello,
        I have the following lines in my .emacs for python mode

(add-hook 'python-mode-hook
          '(lambda()
             (define-key py-mode-map "\C-c\C-c" 'py-execute-prog)
             (define-key py-mode-map "\C-c\C-g" 'py-call-pdb)
             (define-key py-mode-map "\C-c\C-w" 'py-checker)))
(load "py-mode-ext.el")


When I type C-c C-c in python mode, the python program in the current buffer will be interepreted. How can I do the same with C? I have the following lines for C mode

(define-key c-mode-map "\C-c\C-c" 'compile)
(setq compile-command "gcc ")

But when I type C-c C-c, all I get in minibuffer is the line

gcc

How can I make C-c C-c compile the C prog in the current buffer?

Regards,
GVK

reply via email to

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