* Any hope of being able to redefine C-x without problems???
@ 2003-09-18 22:17 Christian Seberino
2003-09-18 22:44 ` Jesper Harder
0 siblings, 1 reply; 5+ messages in thread
From: Christian Seberino @ 2003-09-18 22:17 UTC (permalink / raw)
I made C-x run a new function of my choice. This worked great for months
but I must have started doing stuff that conflicted with C-x because it stopped
working altogether after a while.
Now I am trying to use gdb (debugger) within Emacs and it can't even start
because gdb defines it's "prefix" to be C-x.
I tried to redefine gud-key-prefix but I could not. It seems C-x is extra
touchy. Any hope of pulling this off?
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Any hope of being able to redefine C-x without problems???
2003-09-18 22:17 Any hope of being able to redefine C-x without problems??? Christian Seberino
@ 2003-09-18 22:44 ` Jesper Harder
2003-09-21 6:47 ` Christian Seberino
0 siblings, 1 reply; 5+ messages in thread
From: Jesper Harder @ 2003-09-18 22:44 UTC (permalink / raw)
seberino@spawar.navy.mil (Christian Seberino) writes:
> Now I am trying to use gdb (debugger) within Emacs and it can't even
> start because gdb defines it's "prefix" to be C-x.
>
> I tried to redefine gud-key-prefix but I could not. It seems C-x is
> extra touchy. Any hope of pulling this off?
No. Emacs reserves a number of key bindings for users, which modes
mustn't touch. They are
* `C-c LETTER' (C-c followed by any letter), and
* The function key F5-F9.
Use one of those reserved bindings to avoid conflict with major and
minor modes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Any hope of being able to redefine C-x without problems???
2003-09-18 22:44 ` Jesper Harder
@ 2003-09-21 6:47 ` Christian Seberino
2003-09-21 16:03 ` Jesper Harder
0 siblings, 1 reply; 5+ messages in thread
From: Christian Seberino @ 2003-09-21 6:47 UTC (permalink / raw)
Jesper
There is no way to write some lisp code that makes me able
to define C-x and alter gdb to not have a problem?
I thought you could do anything in elisp?
Chris
Jesper Harder <harder@myrealbox.com> wrote in message news:<m3smmt90od.fsf@defun.localdomain>...
> seberino@spawar.navy.mil (Christian Seberino) writes:
>
> > Now I am trying to use gdb (debugger) within Emacs and it can't even
> > start because gdb defines it's "prefix" to be C-x.
> >
> > I tried to redefine gud-key-prefix but I could not. It seems C-x is
> > extra touchy. Any hope of pulling this off?
>
> No. Emacs reserves a number of key bindings for users, which modes
> mustn't touch. They are
>
> * `C-c LETTER' (C-c followed by any letter), and
> * The function key F5-F9.
>
> Use one of those reserved bindings to avoid conflict with major and
> minor modes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Any hope of being able to redefine C-x without problems???
2003-09-21 6:47 ` Christian Seberino
@ 2003-09-21 16:03 ` Jesper Harder
2003-09-21 19:38 ` Jesper Harder
0 siblings, 1 reply; 5+ messages in thread
From: Jesper Harder @ 2003-09-21 16:03 UTC (permalink / raw)
seberino@spawar.navy.mil (Christian Seberino) writes:
> Jesper Harder <harder@myrealbox.com> wrote:
>
>> Use one of those reserved bindings to avoid conflict with major and
>> minor modes.
>
> There is no way to write some lisp code that makes me able to define
> C-x and alter gdb to not have a problem? I thought you could do
> anything in elisp?
It's possible. But `C-x' is used as prefix by hundreds of basic Emacs
functions -- not just gdb. You'll have redefine the bindings for all
of them.
A lot of tedious work for something which can easily be avoided by
using another key-binding which is guaranteed not to conflict with any
pre-defined Emacs bindings.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Any hope of being able to redefine C-x without problems???
2003-09-21 16:03 ` Jesper Harder
@ 2003-09-21 19:38 ` Jesper Harder
0 siblings, 0 replies; 5+ messages in thread
From: Jesper Harder @ 2003-09-21 19:38 UTC (permalink / raw)
Jesper Harder <harder@myrealbox.com> writes:
> seberino@spawar.navy.mil (Christian Seberino) writes:
>
>> There is no way to write some lisp code that makes me able to
>> define C-x and alter gdb to not have a problem? I thought you
>> could do anything in elisp?
>
> It's possible. But `C-x' is used as prefix by hundreds of basic
> Emacs functions -- not just gdb. You'll have redefine the bindings
> for all of them.
>
> A lot of tedious work for something which can easily be avoided by
> using another key-binding which is guaranteed not to conflict with any
> pre-defined Emacs bindings.
OK, it's not so tedious after all. If you want to bind a function,
say, `my-function' to `C-x' you can do this:
(keyboard-translate ?\C-x 'foo)
(global-set-key [foo] 'my-function)
If you need to call a function that's normally bound to a C-x sequence
you can redefine another key, e.g. F5, to act as C-x:
(define-key key-translation-map [f5] "\C-x")
Then you can type `F5 C-f' to call `find-file' which is bound to
`C-x C-f'.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-09-21 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-18 22:17 Any hope of being able to redefine C-x without problems??? Christian Seberino
2003-09-18 22:44 ` Jesper Harder
2003-09-21 6:47 ` Christian Seberino
2003-09-21 16:03 ` Jesper Harder
2003-09-21 19:38 ` Jesper Harder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).