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

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

Re: key map entry for shift-return?


From: Chris Withers
Subject: Re: key map entry for shift-return?
Date: Wed, 08 Jul 2009 12:51:29 +0100
User-agent: Thunderbird 2.0.0.22 (Windows/20090605)

Peter Dyballa wrote:

C-h k says translated, so it is able to distinguish in this environment. And it also tells you one possible syntax form: S-return. You can also try to interactively bind the key and then by executing C-x ESC ESC (repeat-complex-command) you can review what was executed.

So you can use:

    (global-set-key [S-return]     'some-function)

Well, I now have the following in my .emacs:

(add-hook 'python-mode-hook '(lambda () (define-key python-mode-map "\C-m" 'newline-and-indent)))

(add-hook 'python-mode-hook '(lambda () (define-key python-mode-map "S-return" 'newline)))

The first one works, the second one doesn't. What did I do wrong?

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk




reply via email to

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