[Top][All Lists]

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

Re: Key binding

From: Florian Lindner
Subject: Re: Key binding
Date: Mon, 25 Nov 2002 17:18:36 +0000
User-agent: KNode/0.7.1

Kai Großjohann wrote:

> Florian Lindner <> writes:
>> (define-key pascal-mode-map "\C-c\v" '(shell-command
>> (file-name-sans-extension (buffer-file-name))))
> (defun fl-execute-current-buffer ()
>   "doc string here"
>   (interactive)
>   (shell-command (file-name-sans-extension (buffer-file-name))))
> (define-key pascal-mode-map (kbd "C-c v") 'fl-execute-current-buffer)

it's not really working.
That's how it looks like now:

(add-hook 'pascal-mode-hook
            (defun fl-execute-current-buffer ()
              "Executes the compiled file"
              (shell-command (file-name-sans-extension buffer-file-name)))
            (define-key pascal-mode-map (kbd "C-c v") 

I've I execute this it just displays in the minibuffer:

Filename: Runtime error 201 at 0x0805C0DA
(some more hex codes)

Filename is the output my program gives right before it is waiting for 
If I just execute the program in a bash shell it works ok, I can enter 
A weird problem also apperas if I try to execute the program in the shell 
mode (M-x shell), it scrolling thousands of lines with withspaces down.
Everything works on a normal shell.
Any ideas?

reply via email to

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