At 06:34 PM 3/24/00 +0100, you wrote:
>Hi!
>
>The documentation for jde-bug-key-bindings says
>
>"The value of this variable is an association list. The car of
>each element specifies a key sequence. The cdr specifies 
>an interactive command that the key sequence executes. To enter
>a key with a modifier, type C-q followed by the desired modified
>keystroke. For example, to enter C-s (Control s) as the key to be
>bound, type C-q C-s in the key field in the customization buffer.
>You can use the notation [f1], [f2], etc., to specify function keys."
>
>As I have already bound the function keys to other very important things
>in CDE like switching between virtual workspaces, I think I would like
>to bind step-into, step-over, ... to C-F5 through C-F8.
>
>The configure code associated with jde-bug-keybindings uses the
>following match
>
>(if (string-match "\\[\\(f[1-9][0-9]*\\)]" key)
>
>thus, there is currently no way for specifying C-Fn keys (or Alt-Fn
>keys, etc.).
>
>The actual code looks like this
>
>(lambda (sym val)
> (if (boundp 'jde-mode-map)
>     (mapc (lambda (binding)
>            (let ((key (car binding))
>                  (fcn (cdr binding)))
>              (if (string-match "\\[\\(f[1-9][0-9]*\\)]" key)
>                  (progn
>                   (define-key   ;;1
>                    jde-mode-map 
>                    (substring key 
>                               (match-beginning 1) 
>                               (match-end 1))
>                    fcn)
>                   (setq key (car (read-from-string key))))) ;;2
>              (define-key jde-mode-map key fcn))) ;;3
>           val))
> (set-default sym val)))
>
>I have one question regarding this. It was a while since I coded in
>LISP, so I might be wrong here, but won't the line marked with ;;3
>always be executed regardles of if ;;1 and ;;2 has executed or not?
>
>I.e. the parentheses at the end of the line marked with ;;2 should be
>moved to the end of the line marked with ;;3. As it is now, if you
>define a function key, there would be two calls to define-key with
>slightly different arguments...
>

The code is a hack. When I first wrote the code, I was puzzled that the
function keys did not show up on the corresponding menu items. I thought
Emacs was broken with respect to function keys. So the code there is a
hack. The first defind key is designed to get fn on the menu item; the
other to do the actual binding. As it turns out, this "hack" makes f a
prefix key, which is not what you want. I have since discovered that
keybindings are additive. Defining a new keybinding does not remove the old
one. Further the old key binding contines to appear on the menu. You have
to explicitly remove the old keybinding to get the new one to appear on the
menu. That is what the upcoming release does. Further, with the help of
another JDE user, I have added support for key modifiers.

>
>On the other hand, should one really be able to edit in the editor
>buffer while debugging a program? Also, I think it would be nice if some
>minor-mode (or whatever is apropriate) were set in the editor buffer
>while debugging and this mode contained nice, simple, easy-to-use
>keybindings for the debug operations.
>
>Don't get me wrong here, but C-c C-z C-s is quite cumbersome to use, and
>almost all one-stroke key-bindings are already occupied with other
>things. :|
>

I don't think you can use minor modes to control keybindings.

- Paul

------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

JDE website: http:/sunsite.auc.dk/jde/

JDE mailing list archive: 
http://www.mail-archive.com/[email protected]/maillist.html

Please use JDE->Help->Submit Problem Report when reporting a bug or seeking
help. This will insure that you include all information that may be
required to solve your problem.

Reply via email to