From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: python.el -- support for the with statement Date: Mon, 07 May 2007 23:18:57 -0400 Message-ID: References: <86d5228gr4.fsf@rakim.cfhp.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1178594347 11574 80.91.229.12 (8 May 2007 03:19:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 May 2007 03:19:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: Edward O'Connor Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 08 05:19:06 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HlGED-0007aJ-Vp for ged-emacs-devel@m.gmane.org; Tue, 08 May 2007 05:19:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlGLF-00015G-Os for ged-emacs-devel@m.gmane.org; Mon, 07 May 2007 23:26:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HlGLB-00011E-M0 for emacs-devel@gnu.org; Mon, 07 May 2007 23:26:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HlGLA-00010F-EY for emacs-devel@gnu.org; Mon, 07 May 2007 23:26:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HlGLA-00010C-B4 for emacs-devel@gnu.org; Mon, 07 May 2007 23:26:16 -0400 Original-Received: from tomts16.bellnexxia.net ([209.226.175.4] helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HlGE7-0004pn-AW for emacs-devel@gnu.org; Mon, 07 May 2007 23:18:59 -0400 Original-Received: from ceviche.home ([74.12.211.172]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20070508031858.PEXS1673.tomts16-srv.bellnexxia.net@ceviche.home> for ; Mon, 7 May 2007 23:18:58 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id CA56DB411C; Mon, 7 May 2007 23:18:57 -0400 (EDT) In-Reply-To: <86d5228gr4.fsf@rakim.cfhp.org> (Edward O'Connor's message of "Wed\, 18 Apr 2007 00\:10\:23 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Solaris 8 (1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:70650 Archived-At: > Attached is a patch for progmodes/python.el to support the with > statement (new in Python 2.5). It's been only lightly tested, but Works > For Me and is a pretty minimal patch besides. It'd be nice to slip this > in before the release if possible. :) This looks good, but I'm not sure I can install it as-is: I see you have signed an assignment for all the code related to ERC, but not to Emacs. We already have some tiny changes of yours installed (some of it installed into viper but not marked as tiny, presumably because they have to do with ERC). Richard, can you check this situation? If the viper stuff is indeed covered by his ERC assignment, then this python.el change can definitely go in as a "tiny change", but otherwise I'm not so sure. Maybe we'd be better off asking for an assignment for the whole of Emacs and be done with it. Stefan > -- > Edward O'Connor > hober0@gmail.com > Index: python.el > =================================================================== > RCS file: /cvsroot/emacs/emacs/lisp/progmodes/python.el,v > retrieving revision 1.57 > diff -u -r1.57 python.el > --- python.el 28 Mar 2007 01:21:46 -0000 1.57 > +++ python.el 18 Apr 2007 04:07:21 -0000 > @@ -96,7 +96,7 @@ > "import" "in" "is" "lambda" "not" "or" "pass" "print" > "raise" "return" "try" "while" "yield" > ;; Future keywords > - "as" "None" > + "as" "None" "with" > ;; Not real keywords, but close enough to be fontified as such > "self" "True" "False") > symbol-end) > @@ -374,7 +374,7 @@ > (save-excursion > (unless bos (python-beginning-of-statement)) > (looking-at (rx (and (or "if" "else" "elif" "while" "for" "def" > - "class" "try" "except" "finally") > + "class" "try" "except" "finally" "with") > symbol-end))))) > (defun python-close-block-statement-p (&optional bos) > @@ -2236,7 +2236,7 @@ > #'python-current-defun) > (set (make-local-variable 'outline-regexp) > (rx (* space) (or "class" "def" "elif" "else" "except" "finally" > - "for" "if" "try" "while") > + "for" "if" "try" "while" "with") > symbol-end)) > (set (make-local-variable 'outline-heading-end-regexp) ":\\s-*\n") > (set (make-local-variable 'outline-level) #'python-outline-level) > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel