(not (python-info-ppss-context 'comment))
(progn
(goto-char (line-end-position))
- (forward-comment -1)
+ (forward-comment -9999)
(eq ?: (char-before))))
(setq found-block t)))
(if (not found-block)
(not (eobp)))
(forward-line 1))
(forward-line 1)
- (forward-comment 1)
+ (forward-comment 9999)
(let ((indent-offset (current-indentation)))
(when (> indent-offset 0)
(setq python-indent-offset indent-offset))))))))
(let ((block-regexp (python-rx block-start))
(block-start-line-end ":[[:space:]]*$"))
(back-to-indentation)
- (while (and (forward-comment -1) (not (bobp))))
+ (while (and (forward-comment -9999) (not (bobp))))
(back-to-indentation)
(when (or (python-info-continuation-line-p)
(and (not (looking-at block-regexp))
'after-beginning-of-block)
;; After normal line
((setq start (save-excursion
- (while (and (forward-comment -1) (not (bobp))))
+ (while (and (forward-comment -9999) (not (bobp))))
(python-nav-sentence-start)
(point-marker)))
'after-line)
indentation))
('inside-paren
(or (save-excursion
- (forward-comment 1)
+ (forward-comment 9999)
(when (and (looking-at (regexp-opt '(")" "]" "}")))
(not (forward-char 1))
(not (python-info-ppss-context 'paren)))
(narrow-to-region
(line-beginning-position)
(line-end-position))
- (forward-comment 1))
+ (forward-comment 9999))
(if (looking-at "$")
(+ (current-indentation) python-indent-offset)
- (forward-comment 1)
+ (forward-comment 9999)
(current-column)))
(if (progn
(back-to-indentation)
(let ((found))
(dotimes (i (- arg) found)
(python-end-of-defun-function)
- (forward-comment 1)
+ (forward-comment 9999)
(goto-char (line-end-position))
(when (not (eobp))
(setq found
(not (eobp))
(or (not (current-word))
(> (current-indentation) beg-defun-indent))))
- (forward-comment 1)
+ (forward-comment 9999)
(goto-char (line-beginning-position))))
(defun python-nav-sentence-start ()
(with-temp-buffer
(insert output-buffer)
(goto-char (point-min))
- (forward-comment 1)
+ (forward-comment 9999)
(buffer-substring-no-properties
(or
(and (looking-at python-shell-prompt-output-regexp)
(widen)
(save-excursion
(goto-char (line-end-position))
- (forward-comment -1)
+ (forward-comment -9999)
(while (python-beginning-of-defun-function 1 t)
(when (or (not min-indent)
(< (current-indentation) min-indent))