Flymake: more powerful flymake-make-diagnostic and rework manual
Flymake backends may now explicitly specify an origin and a code for a
diagnostic in addition to the textual description. This change lays
groundwork for richer diagnostic listings and user options for
summarizing diagnostics, addressing bug#77439 and bug#77480.
* doc/misc/flymake.texi (Flymake API): Rename from "Extending
Flymake". Rework.
(Inspecting diagnostics): New section.
* lisp/progmodes/flymake.el (flymake--diag): Add origin, code and
message. Remove text.
(flymake-make-diagnostic): Support new origin, code and message.
(flymake-diagnostic-text): Rework.
(cherry picked from commit
0fe05a920adc457d6f4adca71979059b8e2d0253)