This is a minimal example reduced from capitaomorte/yasnippet#687. In a git checkout of lates `master` (5d583145736e9d4cf2a16613a4ae82009f3f791b) `emacs -Q -L . -l haskell-autoloads -l synprop-bug.el` causes an infinite loop. After hitting `C-g`, `*Messages*` contains `Error during redisplay: (internal--syntax-propertize 6) signaled (quit)`. `synprop-bug.el` contains: ``` elisp (switch-to-buffer "hh") (haskell-mode) (erase-buffer) (insert "{-# foo #-}") (with-syntax-table (standard-syntax-table) (scan-sexps 5 1)) ``` This doesn't happen in Emacs 24.5, so it _may_ be a bug in Emacs.