Skip to content

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

Description

@RuijieYu

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))

Activity

  1. RuijieYu commented on Apr 30, 2023

    @RuijieYu
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions