Skip to content

Auto expansion of blocks (for, while, if, function) inside string literals #135

Closed

Description

@spruceb

What

Typing a keyword such as for, if, so on automatically expands to include the respective then, do, end, etc, along with an indent. However this expansion also occurs if these keywords are typed in a string literal. This is almost certainly not intended behavior, and is annoying for purposes such as error messages and command line option help strings.

Replication

In any Lua source file with lua-mode enabled, create a string literal and write for within the quotes. Also, if, while, function. Possibly others.

Desired Behavior

No expansion occurs when typing such keywords in string literals.

Note

This does not occur inside comments.

Activity

  1. immerrr commented on Jan 5, 2018

    @immerrr
    Owner

    Hello!

    Please, accept my apologies for the late reply. I don't think there's a feature to do such expansion in lua-mode itself, please, try achieving this behaviour with emacs -Q -l lua-mode.el invocation which will only load lua-mode library. If it still persists, please let me know the exact version of Emacs & lua-mode library.

    Thank you and have a great year!

  2. spruceb commented on Jan 7, 2018

    @spruceb
    Author

    Hi, thanks for your response and great package! It was indeed a not-fully-baked Smartparens feature rather than anything added by lua-mode. That package has its tendrils in more places than I'd ever expect.

  3. immerrr commented on Jan 7, 2018

    @immerrr
    Owner

    Great. I'm closing this ticket then.

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