types')
INFO is a description of the problem detected. It may be a string, or
-list of three strings (ORIGIN CODE MESSAGE) appropriately categorizing
-and describing the diagnostic.
+list (ORIGIN CODE MESSAGE) appropriately categorizing and describing the
+diagnostic. ORIGIN may be a string or nil. CODE maybe be a string, a
+number or nil. MESSAGE must be a string.
DATA is any object that the caller wishes to attach to the created
diagnostic for later retrieval with `flymake-diagnostic-data'.
performs the fix."
(when (stringp locus)
(setq locus (expand-file-name locus)))
- (when (stringp info)
- (setq info (list nil nil info)))
+ (cond ((stringp info)
+ (setq info (list nil nil info)))
+ ((numberp (cadr info))
+ (setf (cadr info) (number-to-string (cadr info)))))
(flymake--diag-make :locus locus :beg beg :end end
:type type :origin (car info) :code (cadr info)
:message (caddr info) :data data