Fuco1 / smartparens

Minor mode for Emacs that deals with parens pairs and tries to be smart about it.
GNU General Public License v3.0
1.82k stars 195 forks source link

sp-end-sexp and sp-beginning-sexp unexpected behavior again #860

Open richarddwang opened 6 years ago

richarddwang commented 6 years ago
(cond
 ;; case 1 (empty line / two this type text objectis just next each other (like "test-symbol|(test)") )
 ((and at-beginning at-end) (setq beginning-point (point)))
 ;; case 2 (other)
 (t
  (cond
   ((and at-end (not at-beginning)) (left-char)))
  (save-excursion
    (funcall next)
    (funcall prev)
    (setq beginning-point (point)))
  )
 )

When cursor is at anywhere on cond

Expected behavior

Go to the position between ( and cond after sp-beginning-sexp Go to the the right paren of outer cond

Actual behavior

Didn't move and display message End Buffer

Backtraces if necessary (M-x toggle-debug-on-error)

no error

Environment & version information

smartparens version: 20180204.844

Fuco1 commented 6 years ago

I can reproduce this, definitely a bug. I will have a look thanks!

richarddwang commented 6 years ago

I try something. Don't know if it will help you. https://github.com/jwiegley/use-package/issues/627

richarddwang commented 6 years ago

I use smartparens20180308.1042 now, but I still get the same issue. And I can still use the way specified by issue mentioned in my comment above, to reproduce and to avoid the issue.

Fuco1 commented 6 years ago

I had to revert the fix because it caused some severe performance issues :(