`add-log-current-defun-function' since it returns nil if point is
not inside a defun."
(let ((names '())
- (min-indent))
+ (min-indent)
+ (first-run t))
(save-restriction
(widen)
(save-excursion
(forward-comment -9999)
(setq min-indent (current-indentation))
(while (python-beginning-of-defun-function 1 t)
- (when (< (current-indentation) min-indent)
+ (when (or (< (current-indentation) min-indent)
+ first-run)
+ (setq first-run nil)
(setq min-indent (current-indentation))
(looking-at python-nav-beginning-of-defun-regexp)
(setq names (cons