lispyville icon indicating copy to clipboard operation
lispyville copied to clipboard

lispy-raise-some not working due to lispy-right-p

Open some-mthfka opened this issue 3 years ago • 2 comments

Hi! Awesome package! With lispy and lispyville I just found everything I was missing in lisp editing, things I didn't even know I should have had.

Now, as I understand, it's either a bug or lispy-raise-some has simply not been ported to lispyville yet (in which case this is a feature request), but here's what happens:

(progn
  (message "one")
  (message "two"[)] ;; <- cursor here
  (message "three"))

"Unexpected" is messaged here w/ lispy-raise-some, because (lispy-right-p) returns nil here. This works though:

(progn
  (message "one")
  (message "two")[ ] ;; <- cursor here
  (message "three"))

I tried redefining lispy-right-p as

(defsubst lispy-right-p ()
  "Return t if after variable `lispy-right'."
  (or (member (following-char) '(?\[ ?\] ?\) ?\} ?\]))
      (looking-back lispy-right
                    (line-beginning-position))))

but this yields:

(progn
  (message "one")
  message "two" 
  (message "three"))

(oh well, at least I tried)

PS The opening paren case works just fine:

(progn
  (message "one")
  [(]message "two") ;; <- cursor in the beginning
  (message "three"))

Checked with: emacs -Q, emacs 27.1, evil 1.14.0.

some-mthfka avatar Sep 19 '20 10:09 some-mthfka