From efd2d6d5619eda3374a534ea2edcc16dbe0e13c5 Mon Sep 17 00:00:00 2001 From: noctuid Date: Sun, 15 Apr 2018 18:30:21 -0400 Subject: [PATCH] Improve lispy--bounds-list - Move backward when after a closing delimiter (previously only moved forward when at an opening delimiter); use lispy-left and lispy-right for checking --- lispy.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lispy.el b/lispy.el index 6c1e9751..5e65aa6a 100644 --- a/lispy.el +++ b/lispy.el @@ -6218,12 +6218,13 @@ Otherwise return cons of current string, symbol or list bounds." pt)))))) (defun lispy--bounds-list () - "Return the bounds of smallest list that includes the point. -First, try to return `lispy--bounds-string'." + "Return the bounds of smallest list that includes the point." (save-excursion (lispy--exit-string) - (when (memq (char-after) '(?\( ?\[ ?\{)) + (when (looking-at lispy-left) (forward-char)) + (when (lispy-looking-back lispy-right) + (backward-char)) (ignore-errors (let (beg end) (up-list)