GNU bug report logs -
#76498
(ert-deftest) has indentation of 13 by default
Previous Next
Full log
View this message in rfc822 format
I'm writing tests for purescript-mode package, and I stumbled upon odd
behavior: `ert-deftest` is spuriously indented to either 2 (expected)
or 13 (unexpected).
After digging into it, I found that if you `emacs -Q some-file-with-
tests.el` and try to indent the second line after `ert-deftest`, you'll
get size of 13. But if you `(require 'ert)` and try again you'll get 2.
This is because, even though `ert-deftest` keyword is declared inside
`lisp-mode.el`, but *indentation size* for it resides instead in
`ert.el`, as part of "declare" statement of `ert-deftest` macro.
This is definitely not expected. First of all, there's no reason for
user to evaluate `(require 'ert)` while working with tests — you
wouldn't want to experiment with tests in your working Emacs anyway.
Which means you get incorrect indentation and left wondering what's
happening. Second of all, `ert-deftest` as a keyword resides inside
`lisp-mode.el` anyway, so what's the point of having the indentation
set in a different place.
Could we move the indentation size to `lisp-mode.el`, please?
This bug report was last modified 105 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.