4 Aug 2012 21:42
[PATCH] Fix Python parsing for triple-quoted strings
Dale Sedivec <dale <at> codefu.org>
2012-08-04 19:42:36 GMT
2012-08-04 19:42:36 GMT
Greetings, Below is a patch to correct Semantic's parsing of Python's triple-quoted strings, such as '''foo''' and """foo""". I write Python for my day job and I've been using this patch for over a year with success. I actually tried to submit this last year, but I needed to get my copyright assignment filed with the FSF. I've now got that filed. These changes were originally necessary because python.el in Emacs <= 23 used font-lock-syntactic-keywords to parse triple-quoted strings, which Semantic switches off during parsing. I figured Emacs 24 and syntax-propertize-function would have made these changes unnecessary, since Semantic _presumably_ lets syntax-propertize-function run. However, if I just run my cedet-utests.el changes in Emacs 24 with CEDET HEAD, I still get a test failure, so I guess these changes are still necessary. Patch below against what is probably CEDET HEAD (taken from https://github.com/emacsmirror/cedet). Thanks, Dale commit c9e7a2c7ca9f3a24efb7dc5d22806ac0e8e9933f Date: Fri Mar 18 16:12:00 2011 -0500 wisent-python-forward-line and -string work despite hairy strings.(Continue reading)
RSS Feed