emacs-devel
[Top][All Lists]
Advanced

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

[patch] python.el (python-open-block-statement-p)


From: Karl Chen
Subject: [patch] python.el (python-open-block-statement-p)
Date: 11 Jun 2004 16:52:52 +0200

There's a bug in `python-open-block-statement-p' that causes
indentation after a block opening containing a comment to fail,
e.g.:

if foo:  # comment
<-- doesn't indent correctly here


Patch below fixes it.


Index: python.el
===================================================================
--- python.el   (revision 6501)
+++ python.el   (working copy)
@@ -323,7 +323,8 @@
                                     line-end))
                            (save-excursion (python-end-of-statement))
                            t)
-        (not (python-in-string/comment)))))
+         (not (progn (goto-char (match-beginning 0))
+                     (python-in-string/comment))))))
 
 (defun python-close-block-statement-p (&optional bos)
   "Return non-nil if current line is a statement closing a block.


-- 
Karl 2004-06-11 16:48




reply via email to

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