joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.24k stars 140 forks source link

Fix #471: Make loop keyword indentation regexps more precise #474

Closed SwiftLawnGnome closed 2 years ago

SwiftLawnGnome commented 2 years ago

the regexp in sly-cl-indent.el which matched in loop keyword clauses was mistakenly matching initially clauses, causing ugliness like

(loop for x in y
          initially
             (format t "I'm too far away!")
      ...)

now the regexps are terminated with \\_> which prevents the false positive. the old one also didn't match upfrom , downto , from and the like (author forgot to escape the group) so i used regexp-opt to avoid thinkos like that.