[Python-mode] more indentation problems (I think)

Eric S. Johansson esj at harvee.org
Sun Apr 17 07:54:07 CEST 2011


I was creating a grammar for speech commands for Emacs and while building a 
two-dimensional matrix, i.e. found indentation that wasn't right: here's the code

feature_operation_matrix = {
     "character": {
     "kill": "{ctrl+k}",
     "delete": "{esc}xdelete-backward-char",
     "copy": "{esc}xdelete-forward-char{ctr;+y}",
     "left": "{ctrl+b}",
     "right": "{ctrl+b}"},

     "word": {
     ...."kill": "{esc}d",
     ...."delete": "{esc}b",
     ...."copy": "{esc}d(ctrl+y)",
     ...."left": "{esc}b",
     ...."right": "{esc}b"},

     "line": {"kill": "", "delete": "", "copy": "", "left": "", "right": ""},

     "paragraph": {"kill": "", "delete": "", "copy": "", "left": "", "right": ""},
}

the nested dictionary isn't indenting like the way I expect.  the dictionary 
entry with key "character" is what I get from the editor the dictionary entry 
with key "word" has four dots indicating where I think indentation should be. 
otoh, It's been a year since I touched python so I may have buggered something.  
I will figure something out in the morning when I finish this grammar element 
but in the meantime, I wondered if this was the kind of indentation problem 
folks have been experiencing.


More information about the Python-mode mailing list