Closed joca-bt closed 3 years ago
I am seeing this too. From emacs -Q
, installing and enabling smartparens-global-mode
triggers the above mentioned error.
I have the same issue, but this seems to be a simple typo.
To fix it replace
[
with (
and
]
with )
on line 8386 in file smartparens.el
Line 8386 should then look like:
(-when-let ((first-item . rest-items) (sp-get-list-items))
@bymoz089 isn't when-let
already available in subr-x.el
? On my Emacs I get this:
when-let is an autoloaded Lisp macro in ‘subr-x.el’.
(when-let SPEC &rest BODY)
Probably introduced at or before Emacs version 25.1.
@manuel-uberti IMO when-let
is no drop in replacement for -when-let
. -when-let
can destructure the argument list. Here is a video which explains some aspect of this topic.
Try to eval following two code fragments in your Emacs scratch buffer.
(when-let ((first-item . rest-items) '(foo bar baz))
(message (format "%s | %s" first-item rest-items)))
(-when-let ((first-item . rest-items) '(foo bar baz))
(message (format "%s | %s" first-item rest-items)))
But I think this goes out of topic of this issue.
Thanks for the clarification.
The message disappears when I comment (require 'smartparens-config)
line within my init.el
file.
Replacing [] via () also helps https://github.com/Fuco1/smartparens/issues/1077#issuecomment-779349052.
There's a PR pending with a fix: Fix #1077 #1079
The melpa version still has this problem: Loading package smartparens... Eager macro-expansion failure: (wrong-type-argument listp [(first-item . rest-items) (sp-get-list-items)])
Getting this error when loading smartparens after pulling the latest code:
Eager macro-expansion failure: (wrong-type-argument listp [(first-item . rest-items) (sp-get-list-items)])
.