greghendershott / racket-mode

Emacs major and minor modes for Racket: edit, REPL, check-syntax, debug, profile, and more.

Home Page:https://www.racket-mode.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`args-out-of-range` error with `electric-pair-delete-pair` at end of buffer

greghendershott opened this issue · comments

  1. Open or create a buffer using racket-hash-lang-mode, with e.g. #lang rhombus.
  2. Enable electric-pair-local-mode.
  3. At end of buffer, type (. Result: (), with point between the parens.
  4. Type BACKSPACE or M-x electric-pair-delete-pair to delete both parens.

Result:

Error running timer ‘racket--hash-lang-on-notify’: (args-out-of-range 159 160)

Due to put-text-property being called with an end position greater than point-max.

Note: A similar recipe does not cause a problem with paredit-mode instead of electric-pair-local-mode.