emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: python.el -- support for the with statement


From: Stefan Monnier
Subject: Re: python.el -- support for the with statement
Date: Mon, 07 May 2007 23:18:57 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

> 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
> address@hidden

> 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
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]