From skip at pobox.com Tue Feb 5 03:51:50 2008 From: skip at pobox.com (skip at pobox.com) Date: Mon, 4 Feb 2008 20:51:50 -0600 Subject: [Python-mode] Python 3 syntax highlighting issues Message-ID: <18343.53062.422515.940778@montanaro-dyndns-org.local> I've decided to take a look at what needs doing to python-mode to support Python 3.0 syntax highlighting. Some obvious differences: "print" and "exec" are both now builtin functions, not keywords. That should change their coloring, but how should we detect that? It might be a small point. In the default setup keywords and builtins seem to be colored identically, though they are in different classes. "as" and "with" are full-fledged keywords. I think Barry added "with" recently, but "as" is still a "crippled" keyword. "True", "False" and "None" are keywords. So, should we: * punt and do the best we can cheaply? * implement some sort of mode switch? My inclination is to keep things as simple as possible: move "print" and "exec" to the builtins section, make "as", "True", "False" and "None" true keywords. (Things are already too complex for my feeble Lisp neuron.) Skip From skip at pobox.com Tue Feb 5 05:01:39 2008 From: skip at pobox.com (skip at pobox.com) Date: Mon, 4 Feb 2008 22:01:39 -0600 Subject: [Python-mode] Python 3 syntax highlighting issues In-Reply-To: <18343.53062.422515.940778@montanaro-dyndns-org.local> References: <18343.53062.422515.940778@montanaro-dyndns-org.local> Message-ID: <18343.57251.929562.757715@montanaro-dyndns-org.local> me> I've decided to take a look at what needs doing to python-mode to me> support Python 3.0 syntax highlighting. Attached is an initial stab. Only tested insofar as it byte compiles. No switching between Python 2.x and 3.x modes. Just highlight as if everybody was already programming in Python 3.x. Skip -------------- next part -------------- A non-text attachment was scrubbed... Name: python-mode.diff Type: application/octet-stream Size: 4220 bytes Desc: not available Url : http://mail.python.org/pipermail/python-mode/attachments/20080204/1d5b402b/attachment.obj From noreply at sourceforge.net Tue Feb 12 08:09:17 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Mon, 11 Feb 2008 23:09:17 -0800 Subject: [Python-mode] [ python-mode-Patches-1891749 ] Automatically insert super calls Message-ID: Patches item #1891749, was opened at 2008-02-12 02:09 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1891749&group_id=86916 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Carl Banks (aerojockey) Assigned to: Nobody/Anonymous (nobody) Summary: Automatically insert super calls Initial Comment: One of the more annoying and superfluous Python is the new style calls to the superclass, which involves retyping both the name of the class and the function. This patch adds a new command to python-mode that inserts the empty super call with the appropriate class and function name, leaving the cursor in position to start typing arguments. I have it bound to \C-c\C-f in this patch. The patch also adds a whole new section to the mode documentation, since it's not really like any other command. Example: class hello(object): def world(slef): | Then the typing \C-c\C-f would insert "super(hello,self).world()" at the given insertion point. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=581351&aid=1891749&group_id=86916 From skip at pobox.com Fri Feb 29 18:02:06 2008 From: skip at pobox.com (skip at pobox.com) Date: Fri, 29 Feb 2008 11:02:06 -0600 Subject: [Python-mode] cython-mode.el (fwd) Message-ID: <18376.14990.468001.587384@montanaro-dyndns-org.local> Saw this on the xemacs-beta mailing list. Thought I might see if someone here knows the answer. Skip -------------- next part -------------- An embedded message was scrubbed... From: Neal Becker Subject: cython-mode.el Date: Thu, 28 Feb 2008 19:52:42 -0500 Size: 8074 Url: http://mail.python.org/pipermail/python-mode/attachments/20080229/e87f157a/attachment.eml