gonewest818/elisp-lint

indent ignoring `declare` properties?

sellout opened this issue · 1 comments

I have code like the following:

;; Local Variables:
;; read-symbol-shorthands: (("ef-" . "extended-faces-"))
;; End:

(defmacro ef-defface (face spec doc &rest args)
  (declare (doc-string 3) (indent 2))
  `(defface ,face
     ,spec
     ,(if (eq (plist-get args :group) 'extended-faces)
          doc
        (concat doc
                "\n(Injected by the customization group ‘extended-faces’.)"))
     ,@args))

(ef-defface message ()
  "Extended face that covers all messages – errors, warnings, and successes."
  :group 'extended-faces)

and elisp-list indent complains

extended-faces.el:16:0 (indent)  !   "Extended face that covers all messages – errors, warnings, and successes."
extended-faces.el:17:0 (indent)  !   :group 'extended-faces)

But ef-defface has an indent declaration that says this indentation is correct.

Sorry, this was an issue I’ve had for a while, but had forgotten some of the context.

I had set up elisp-lint-indent-specs, but I had forgotten to have it eval-after-load, so it didn”t actually have any effect. That’s now fixed, and the linter behaves.

However, I do think that elisp-lint should be able to read the indent property for the containing form before reporting a bad indent, without needing it duplicated in a separate variable.