python parser any block, rm debug message, optimization -1 regexp find
This commit is contained in:
parent
f21c701cbe
commit
53da312ed6
@ -201,15 +201,16 @@ position in the CONTENT."
|
|||||||
(while (and (not last) (not last-on-buffer))
|
(while (and (not last) (not last-on-buffer))
|
||||||
(let ((beg wrap-beg) (end wrap-end) (offset 0) children)
|
(let ((beg wrap-beg) (end wrap-end) (offset 0) children)
|
||||||
(setq beg (point))
|
(setq beg (point))
|
||||||
(message "Point: %s Begin %s End %s" (point) wrap-beg wrap-end)
|
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(python-nav-forward-block) (python-nav-end-of-block) (setq end (point))
|
|
||||||
(when (>= end wrap-end) (setq last t)))
|
|
||||||
(python-nav-forward-block)
|
(python-nav-forward-block)
|
||||||
(when (= beg (point)) ;; if new beg without change after next block, it is last block on the page
|
(when (= beg (point)) ;; if new beg without change after next block, it is last block on the page
|
||||||
(setq last-on-buffer t))
|
(setq last-on-buffer t))
|
||||||
(setq beg (point))
|
(setq beg (point))
|
||||||
(save-excursion (python-nav-end-of-statement) (setq offset (- (point) beg)))
|
(save-excursion
|
||||||
|
(python-nav-end-of-statement) (setq offset (- (point) beg)))
|
||||||
|
(python-nav-end-of-block) (setq end (point))
|
||||||
|
(when (>= end wrap-end) (setq last t)))
|
||||||
|
(goto-char beg)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(python-nav-forward-block)
|
(python-nav-forward-block)
|
||||||
(if (< (point) end)
|
(if (< (point) end)
|
||||||
|
Loading…
Reference in New Issue
Block a user