emacs

djm 2024-11-11T16:04:07.621239Z

There is an issue with smartparens where sp-wrap-round doesn't correctly wrap symbols ending in ?, so foo? becomes (foo)? (https://github.com/Fuco1/smartparens/issues/1212). This happens in clojure-mode, but not in emacs-lisp-mode. Could this actually be clojure-mode's fault (i.e. some problem with the syntax table)?

👀 1
valtteri 2024-11-12T16:01:41.133929Z

I’ve been silently suffering from this for a while

âž• 7
djm 2024-11-11T16:05:15.151819Z

It was introduced by a specific smartparens change, and doesn't happens with paredit, so I'm not sure where the problem is.

djm 2024-11-11T16:06:57.113669Z

It seems to be related to the fact that when the character after the point is ?, then (syntax-after (point)) returns '(3) in emacs-lisp-mode, but '(1048579) in clojure-mode.

djm 2024-11-11T16:12:07.139759Z

I think this is the problematic check in smartparens:

(when-let ((syntax (syntax-after p)))
      (or (= (syntax-class syntax) 6)
          (/= 0 (logand (lsh 1 20) (car syntax)))))
(syntax-class syntax) returns 3 for both elisp and clojure, whereas car is either 3 or 1048579.

Chris Clark 2024-11-26T20:35:43.366069Z

I upvoted the GitHub issue. Sometimes that helps.

djm 2025-03-24T13:28:01.689609Z

A PR with a potential fix has been raised: https://github.com/Fuco1/smartparens/pull/1229

🎉 1