[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Customising the menu for python-mode
From: |
Chris Withers |
Subject: |
Customising the menu for python-mode |
Date: |
Sat, 16 May 2009 17:55:17 +0100 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
Nikolaj Schumacher wrote:
Chris Withers <chris@simplistix.co.uk> wrote:
Nikolaj Schumacher wrote:
Chris Withers <chris@simplistix.co.uk> wrote:
- the comment/uncomment menu items on the python menu have vanished. How do I
get these back?
You can be defining your own menu, but maybe you just want to start
using the universal comment commands, e.g. comment-or-uncomment-region.
I should have known this was possible really ;-)
Where can I find out how to do this?
I don't use the menus, only keys, so I can't do it for you.
Check out the Emacs manual
- 22.17.1.2 Extended Menu Items
Fat lot of good that did me ;-)
I tried monkey-see-monkey-do-ing from python.el and so far have this in
my .emacs file:
;; menu items
(defvar chris-mode-map
(let ((map (make-sparse-keymap)))
(easy-menu-define python-menu map "Python Mode menu"
`("Python"
:help "Python-specific Features"
"-"
["Comment" python-shift-left :active mark-active
:help "Comment"]
["Uncomment" python-shift-right :active mark-active
:help "Uncomment"]))
map))
Which, while it doesn't error, also does nothing.
What am I doing wrong?
cheers,
Chris
--
Simplistix - Content Management, Zope & Python Consulting
- http://www.simplistix.co.uk