semantic-refactor
semantic-refactor copied to clipboard
Semicolons in code messes up srefactor
This sexp contains a syntax table with the perfectly cromulent symbol ?\; :
(define-derived-mode rgbds-mode
prog-mode
"RGBDS"
"Major mode for Gameboy assembly, to be assembled with rgbasm."
(setq font-lock-defaults '(rgbds-font-lock-keywords))
:syntax-table (let ((st (make-syntax-table)))
(modify-syntax-entry ?_ "w" st)
(modify-syntax-entry ?#"w" st)
(modify-syntax-entry ?. "w" st)
(modify-syntax-entry ?\; "<" st)
(modify-syntax-entry ?\n ">" st)
(modify-syntax-entry ?\t "-" st)
st))
Running srefactor-lisp-format-sexp on it produces this bogus output:
(define-derived-mode rgbds-mode
prog-mode
"RGBDS"
"Major mode for Gameboy assembly, to be assembled with rgbasm."
(setq font-lock-defaults '(rgbds-font-lock-keywords))
:syntax-table (let ((st (make-syntax-table)))
(modify-syntax-entry ?_ "w" st)
(modify-syntax-entry ?#"w" st)
(modify-syntax-entry ?. "w" st)
(modify-syntax-entry ?\
(modify-syntax-entry ?\n ">" st)
(modify-syntax-entry ?\t "-" st)
st))
Judging by the line it cut off, it's having trouble differentiating between ?\; and a comment, or some other use of the semicolon.