Skip to content

electric-pair-mode is broken #3

Description

@rafoo

If electric-pair-mode is activated, typing ( to insert a pair of parenthesis in a Dedukti buffer inserts two open parentheses instead.

It seems that the way generic-mode handles the syntax table for comment starter destroys the parenthesis matching. In the syntax table, open paren is mapped to (1 (first char of a comment starter) wheras in tuareg-mode for example it is mapped to ()1n (first char of a nestable comment starter and also a delimiter matching )).

Strangely enough, this issue does not affect the smartparens package.

Possible workarounds:

  • update the syntax table, I have not tested it but adding (modify-syntax-entry ?\( "()1") in dedukti-mode-hook probably fixes the issue
  • use smartparens instead of electric-pair-mode

It is not yet clear to me if this should be fixed in dedukti-mode or repported as a bug of either generic-mode or electric-pair-mode.

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