Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lispy-toggle-thread-last fails with comments #660

Open
RuijieYu opened this issue Apr 30, 2023 · 1 comment
Open

lispy-toggle-thread-last fails with comments #660

RuijieYu opened this issue Apr 30, 2023 · 1 comment

Comments

@RuijieYu
Copy link
Contributor

See the following two pairs of snippets, where I press x > with point=1.

With comments (incorrect)

Before:

(expand-file-name
 ;;
 (car (ensure-list dired-directory)))

After:

(thread-last ;;
             (expand-file-name)
             (car (ensure-list dired-directory)))

Without comments (correct)

Before:

(expand-file-name
 (car (ensure-list dired-directory)))

After:

(thread-last (ensure-list dired-directory) (car)
             (expand-file-name))
@RuijieYu
Copy link
Contributor Author

In addition, when we convert thread-last form back to regular form, all comments within it are lost. Further, converting this snippet also fails:

(thread-last (ensure-list dired-directory) ;
             (car)
             (expand-file-name))

Gets to:

(ensure-list dired-directory)

Notice that the call to car is now gone because of the trailing comment. I suspect the same issue is also manifested in #657.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant