On Dec 11, 2009, at 8:50 AM, s...@pobox.com wrote: > > Kent> Am I misunderstanding something? > > Perhaps. There is definitely a deficiency in the Emacs syntax table stuff, > at least the way python-mode uses it. I believe the other Python mode (the > one delivered with recent versions of GNU Emacs) might handle triple-quoted > strings better.
I think python.el uses regular expressions instead of the syntax table. I also thought there were patches to python-mode.el to make it work more closely like python.el. > In many cases you can avoid the problem by using """...""" to surround > strings containing apostrophes and '''...''' to surround strings containing > quotation marks. The only problem you encounter there is the situation > where your doc strings contain both quotation marks and apostrophes. Generally, if the quotes are balanced the worse that can happen is that you'll get a little run of text in a different color. If they're not balanced though, it will mess up Emacs's syntax table logic and you'll need a little "turd" to help line things up again: def foo(): '''Some people don't like this.''' # ' <- Emacs turd It would be nice to fix this. -Barry _______________________________________________ Python-mode mailing list Python-mode@python.org http://mail.python.org/mailman/listinfo/python-mode