* Several novice questions
@ 2002-11-21 17:14 Florian Lindner
2002-11-21 18:58 ` Kevin Rodgers
0 siblings, 1 reply; 5+ messages in thread
From: Florian Lindner @ 2002-11-21 17:14 UTC (permalink / raw)
Hi,
I'm currently learning Emacs 21.2 with pascal-mode and freepascal.
I've set the compile-command variable in my .emacs
(add-hook 'pascal-mode-hook
(lambda()
(set (make-local-variable 'compile-command)
(concat "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
buffer-file-name))))
And it's working with M-x compile. How can I bind this command to another
key comba (C-c C-v for example)?
I've tried: (define-key pascal-mode-map "\C-c\C-v" 'compile)))) but is
doesn't work. "File mode specification error: (wrong-number-of-arguments
#<subr set> 3)"
How can I made the compile command saves the current buffer withouht asking?
How can I execute a external programm in a seperat buffer?
How can I create a command which first compiles (and saves) the current
buffer and then execute the compiled program?
Thanks,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Several novice questions
2002-11-21 17:14 Several novice questions Florian Lindner
@ 2002-11-21 18:58 ` Kevin Rodgers
2002-11-21 21:48 ` Florian Lindner
2002-11-24 12:46 ` Florian Lindner
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Rodgers @ 2002-11-21 18:58 UTC (permalink / raw)
Florian Lindner wrote:
> Hi,
> I'm currently learning Emacs 21.2 with pascal-mode and freepascal.
> I've set the compile-command variable in my .emacs
>
> (add-hook 'pascal-mode-hook
> (lambda()
> (set (make-local-variable 'compile-command)
> (concat "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
> buffer-file-name))))
>
> And it's working with M-x compile. How can I bind this command to another
> key comba (C-c C-v for example)?
> I've tried: (define-key pascal-mode-map "\C-c\C-v" 'compile)))) but is
> doesn't work. "File mode specification error: (wrong-number-of-arguments
> #<subr set> 3)"
> How can I made the compile command saves the current buffer withouht asking?
> How can I execute a external programm in a seperat buffer?
> How can I create a command which first compiles (and saves) the current
> buffer and then execute the compiled program?
The problem isn't with your define-key call (although I would recommend using
a binding reserved for users, like `C-c v'), but with your hook function. I
suspect your .emacs file is different from what you have above: is there a
close parenthesis after the "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g " string?
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Several novice questions
2002-11-21 18:58 ` Kevin Rodgers
@ 2002-11-21 21:48 ` Florian Lindner
2002-11-24 12:46 ` Florian Lindner
1 sibling, 0 replies; 5+ messages in thread
From: Florian Lindner @ 2002-11-21 21:48 UTC (permalink / raw)
Kevin Rodgers wrote:
> Florian Lindner wrote:
>
>> Hi,
>> I'm currently learning Emacs 21.2 with pascal-mode and freepascal.
>> I've set the compile-command variable in my .emacs
>>
>> (add-hook 'pascal-mode-hook
>> (lambda()
>> (set (make-local-variable 'compile-command)
>> (concat "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
>> buffer-file-name))))
>>
>> And it's working with M-x compile. How can I bind this command to another
>> key comba (C-c C-v for example)?
>> I've tried: (define-key pascal-mode-map "\C-c\C-v" 'compile)))) but is
>> doesn't work. "File mode specification error: (wrong-number-of-arguments
>> #<subr set> 3)"
[..]
> The problem isn't with your define-key call (although I would recommend
> using
> a binding reserved for users, like `C-c v'), but with your hook function.
> I suspect your .emacs file is different from what you have above: is there
> a close parenthesis after the "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
> string?
(add-hook 'pascal-mode-hook
(lambda()
(set (make-local-variable 'compile-command)
(concat "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
buffer-file-name))
(define-key pascal-mode-map "\C-c\C-v" 'compile)))
Ok, you're right. It's working with that call now. There need to be 2
parens, one for the concat, the other for the set.
Thanks!
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Several novice questions
2002-11-21 18:58 ` Kevin Rodgers
2002-11-21 21:48 ` Florian Lindner
@ 2002-11-24 12:46 ` Florian Lindner
2002-11-24 14:59 ` Kai Großjohann
1 sibling, 1 reply; 5+ messages in thread
From: Florian Lindner @ 2002-11-24 12:46 UTC (permalink / raw)
Kevin Rodgers wrote:
> Florian Lindner wrote:
>
>> Hi,
>> I'm currently learning Emacs 21.2 with pascal-mode and freepascal.
>> I've set the compile-command variable in my .emacs
>>
>> (add-hook 'pascal-mode-hook
>> (lambda()
>> (set (make-local-variable 'compile-command)
>> (concat "fpc -Ci -Co -Cr -CR -Ct -So -Ss -g "
>> buffer-file-name))))
>>
>> And it's working with M-x compile. How can I bind this command to another
>> key comba (C-c C-v for example)?
>> I've tried: (define-key pascal-mode-map "\C-c\C-v" 'compile)))) but is
>> doesn't work. "File mode specification error: (wrong-number-of-arguments
>> #<subr set> 3)"
>> How can I made the compile command saves the current buffer withouht
>> asking? How can I execute a external programm in a seperat buffer?
>> How can I create a command which first compiles (and saves) the current
>> buffer and then execute the compiled program?
>
>
> The problem isn't with your define-key call (although I would recommend
> using
> a binding reserved for users, like `C-c v'), but with your hook function.
Which binding a reserved for users?
Thx,
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Several novice questions
2002-11-24 12:46 ` Florian Lindner
@ 2002-11-24 14:59 ` Kai Großjohann
0 siblings, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2002-11-24 14:59 UTC (permalink / raw)
Florian Lindner <Florian.Lindner@xgm.de> writes:
> Which binding a reserved for users?
From the manual:
/----[ (emacs)Keymaps ]
| As a user, you can redefine any key; but it is usually best to stick
| to key sequences that consist of `C-c' followed by a letter (upper or
| lower case). These keys are "reserved for users," so they won't
| conflict with any properly designed Emacs extension. The function keys
| <F5> through <F9> are also reserved for users. If you redefine some
| other key, your definition may be overridden by certain extensions or
| major modes which redefine the same key.
\----
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-11-24 14:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-21 17:14 Several novice questions Florian Lindner
2002-11-21 18:58 ` Kevin Rodgers
2002-11-21 21:48 ` Florian Lindner
2002-11-24 12:46 ` Florian Lindner
2002-11-24 14:59 ` Kai Großjohann
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.