(python-mode): Skip comments when parsing.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Mar 2007 01:21:47 +0000 (01:21 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 28 Mar 2007 01:21:47 +0000 (01:21 +0000)
lisp/ChangeLog
lisp/progmodes/python.el

index 979197b..e17d73f 100644 (file)
@@ -1,5 +1,7 @@
 2007-03-28  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * progmodes/python.el (python-mode): Skip comments when parsing.
+
        * vc-arch.el (vc-with-current-file-buffer): New macro.
        (vc-arch-file-source-p): Use it to avoid infloop.
 
index 226d4bd..1709428 100644 (file)
@@ -2225,6 +2225,7 @@ with skeleton expansions for compound statement templates.
                                   ;;  . python-font-lock-syntactic-face-function)
                                   ))
   (set (make-local-variable 'parse-sexp-lookup-properties) t)
+  (set (make-local-variable 'parse-sexp-ignore-comments) t)
   (set (make-local-variable 'comment-start) "# ")
   (set (make-local-variable 'indent-line-function) #'python-indent-line)
   (set (make-local-variable 'indent-region-function) #'python-indent-region)