comparison lisp/progmodes/python.el @ 56051:0cecb3d4d566

(python-open-block-statement-p): Fix indentation after a block opening that contains a comment.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 12 Jun 2004 10:26:37 +0000
parents 5dbde1bf6cad
children e6bf7376c962 4c90ffeb71c5
comparison
equal deleted inserted replaced
56050:a7650e060db1 56051:0cecb3d4d566
321 (optional (and (syntax comment-start) 321 (optional (and (syntax comment-start)
322 (0+ not-newline))) 322 (0+ not-newline)))
323 line-end)) 323 line-end))
324 (save-excursion (python-end-of-statement)) 324 (save-excursion (python-end-of-statement))
325 t) 325 t)
326 (not (python-in-string/comment))))) 326 (not (progn (goto-char (match-beginning 0))
327 (python-in-string/comment))))))
327 328
328 (defun python-close-block-statement-p (&optional bos) 329 (defun python-close-block-statement-p (&optional bos)
329 "Return non-nil if current line is a statement closing a block. 330 "Return non-nil if current line is a statement closing a block.
330 BOS non-nil means point is at beginning of statement. 331 BOS non-nil means point is at beginning of statement.
331 The criteria are that the line isn't a comment or in string and starts with 332 The criteria are that the line isn't a comment or in string and starts with