[Python-mode] Underscore syntax class

Barry Warsaw barry at python.org
Wed May 2 23:25:28 CEST 2007

Hash: SHA1

Hi Ian,

On May 2, 2007, at 10:57 AM, Ian Zimmerman wrote:

> Barry> A question, are you an FSF Emacs user or a XEmacs user?  I ask
> Barry> because my understanding is that FSF Emacs has its own
> Barry> python-mode these days that's different than ours.  I think  
> most
> Barry> of the devs on this list use XEmacs, though of course we  
> want it
> Barry> to be FSF Emacs compatible.  FSF Emacs python-mode maintainer
> Barry> doesn't communicate with us, AFAIK.

Ah Supercite.  A blast from the past. :)

> I see.  Indeed I am a GNU Emacs user.  I decided not to use the  
> packaged
> python mode because it seems to be inextricably twined with pymacs,
> a huge beast of full IDE that I don't have a use for.  I didn't  
> know the
> module I picked up (on the Emacs wiki, I think) had an XEmacs flavour.

I wouldn't say it has a XEmacs flavor so much as that /currently/  
AFAIK, most of the developers are XEmacs users.  I didn't know about  
the pymacs thing in the FSF version, but yeah I'm with you.  IDEs are  
for kids. :)

> Barry> My suggestion would be to try rebinding it.  It seems like you
> Barry> know enough about how to do that and what to look for in
> Barry> breakage, and probably also how to fix such breakage.  Speaking
> Barry> solely for myself, I think we would accept patches that allowed
> Barry> python-mode to work either way, perhaps keyed off a new
> Barry> configuration variable (py- historical-underscore-behavior- 
> p ?).
> I have already done this and gone through the places where it is
> necessary to locally reset the syntax table, there are a fair number
> (about ~20).  After changing those rebinding seems to have no ill  
> effects.
> Barry> If you can come up with such patches, and it works on both  
> XEmacs
> Barry> and FSF Emacs, let us know and we'd consider applying them.
> I am not going to install XEmacs for this purpose, so I hope you can
> provide these answers which will determine if this is worth trying:
> 1) Does XEmacs allow specifying syntax overrides in font-lock- 
> defaults,
> like this:
> (setq font-lock-defaults '(python-font-lock-keywords nil nil ((?_ .  
> "w"))))

Yes, it looks like it.

> 2) Does XEmacs have the with-syntax-table macro?


Feel free to post your changes to SF.  Hopefully one of us can get  
around to trying your changes out in XEmacs and if it looks good, we  
can apply it to current svn.

- -Barry

Version: GnuPG v1.4.5 (Darwin)


More information about the Python-mode mailing list