]> git.eshelyaron.com Git - emacs.git/commitdiff
(python-font-lock-keywords, python-open-block-statement-p, python-mode):
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 10 May 2007 17:39:27 +0000 (17:39 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 10 May 2007 17:39:27 +0000 (17:39 +0000)
Add support for the new "with" keyword.

lisp/ChangeLog
lisp/progmodes/python.el

index 302179843b23571e53f7027525be47833d5b366c..74870e8fe7eb02d4dac74b3fc26c4a1016444637 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-10  Edward O'Connor  <hober0@gmail.com>  (tiny change)
+
+       * progmodes/python.el (python-font-lock-keywords)
+       (python-open-block-statement-p, python-mode): Add support for the new
+       "with" keyword.
+
 2007-05-10  Richard Stallman  <rms@gnu.org>
 
        * international/iso-cvt.el (iso-cvt-read-only): Ignore arguments.
index 17d30e0d9729704f130b8e49385111d02a3bc64c..cc8c44a46764eb207390adbd6d203fdabd6da915 100644 (file)
@@ -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 @@ BOS non-nil means point is known to be at beginning of statement."
   (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)
@@ -2240,7 +2240,7 @@ with skeleton expansions for compound statement templates.
        #'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)