Skip to content

Commit

Permalink
enh: optimize up-list speed
Browse files Browse the repository at this point in the history
  • Loading branch information
AmaiKinono committed Sep 8, 2021
1 parent 6c5f86b commit 7f6c422
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions puni.el
Original file line number Diff line number Diff line change
Expand Up @@ -1111,17 +1111,18 @@ return nil."
(let ((from (point))
(beg (save-excursion (or (puni-beginning-of-list-around-point)
(point))))
(backward-char-with-spaces
(backward-within-delimiter
(lambda ()
(puni--backward-syntax " ")
(condition-case _
(progn (forward-char -1) (point))
(error nil))))
(unless (bobp)
(or (puni--backward-symbol)
(forward-char -1))
(point))))
end done err)
(save-excursion
(while (and (not done) (not err))
(goto-char beg)
(setq beg (funcall backward-char-with-spaces))
(setq beg (funcall backward-within-delimiter))
(if beg
(progn
(setq end (puni-strict-forward-sexp))
Expand Down

0 comments on commit 7f6c422

Please sign in to comment.