branch : pmacs2
This commit is contained in:
moculus 2007-07-29 03:45:34 +00:00
parent 966ad5afc8
commit a0d154549a
1 changed files with 8 additions and 0 deletions

8
MODES
View File

@ -28,3 +28,11 @@ Loading a module involves the following (in Application.__init__):
The last is for detecting scripts using the "#!/usr/bin/foo" syntax. The last is for detecting scripts using the "#!/usr/bin/foo" syntax.
3. How do they work? 3. How do they work?
The one thing every mode has in common is that they map key bindings to actions
to be taken. They do this via self.bindings, a dictionary mapping action names
(i.e. 'page-down') to a tuple of key bindings (i.e. ('C-v', 'PG_DN',)).
Modes subclass mode2.Fundamental, and they call mode2.Fundamental.__init__ to
run the standard mode initialization (including building the default bindings
dictionary); they can later modify or overwrite this dictionary if they choose.