diff options
| author | João Távora | 2025-04-23 08:32:51 +0100 |
|---|---|---|
| committer | João Távora | 2025-04-23 08:35:30 +0100 |
| commit | a25fc9a518dc1c4bf1ef86bb949ed2f3c995adea (patch) | |
| tree | 6d249fa4fe733a6a9552c068b5ca04ecef2c1790 | |
| parent | 89b7e726f12f34c94c5f05f8972fa8a6a3ea56b5 (diff) | |
| download | emacs-a25fc9a518dc1c4bf1ef86bb949ed2f3c995adea.tar.gz emacs-a25fc9a518dc1c4bf1ef86bb949ed2f3c995adea.zip | |
Flymake: fix flymake-make-diagnostic for numeric code (bug#77856)
* lisp/progmodes/flymake.el (flymake-make-diagnostic): Tighten up
type requirements.
(Version): Bump to 1.4.1
| -rw-r--r-- | lisp/progmodes/flymake.el | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 8d63b23f2b8..26a7b67fbbc 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> | 5 | ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> |
| 6 | ;; Maintainer: Spencer Baugh <sbaugh@janestreet.com> | 6 | ;; Maintainer: Spencer Baugh <sbaugh@janestreet.com> |
| 7 | ;; Version: 1.4.0 | 7 | ;; Version: 1.4.1 |
| 8 | ;; Keywords: c languages tools | 8 | ;; Keywords: c languages tools |
| 9 | ;; Package-Requires: ((emacs "26.1") (eldoc "1.14.0") (project "0.7.1")) | 9 | ;; Package-Requires: ((emacs "26.1") (eldoc "1.14.0") (project "0.7.1")) |
| 10 | 10 | ||
| @@ -391,8 +391,9 @@ TYPE is a diagnostic symbol (see Info Node `(Flymake)Flymake error | |||
| 391 | types') | 391 | types') |
| 392 | 392 | ||
| 393 | INFO is a description of the problem detected. It may be a string, or | 393 | INFO is a description of the problem detected. It may be a string, or |
| 394 | list of three strings (ORIGIN CODE MESSAGE) appropriately categorizing | 394 | list (ORIGIN CODE MESSAGE) appropriately categorizing and describing the |
| 395 | and describing the diagnostic. | 395 | diagnostic. ORIGIN may be a string or nil. CODE maybe be a string, a |
| 396 | number or nil. MESSAGE must be a string. | ||
| 396 | 397 | ||
| 397 | DATA is any object that the caller wishes to attach to the created | 398 | DATA is any object that the caller wishes to attach to the created |
| 398 | diagnostic for later retrieval with `flymake-diagnostic-data'. | 399 | diagnostic for later retrieval with `flymake-diagnostic-data'. |
| @@ -409,8 +410,10 @@ in the `flymake-overlay-control' property of the diagnostic's type | |||
| 409 | symbol." | 410 | symbol." |
| 410 | (when (stringp locus) | 411 | (when (stringp locus) |
| 411 | (setq locus (expand-file-name locus))) | 412 | (setq locus (expand-file-name locus))) |
| 412 | (when (stringp info) | 413 | (cond ((stringp info) |
| 413 | (setq info (list nil nil info))) | 414 | (setq info (list nil nil info))) |
| 415 | ((numberp (cadr info)) | ||
| 416 | (setf (cadr info) (number-to-string (cadr info))))) | ||
| 414 | (flymake--diag-make :locus locus :beg beg :end end | 417 | (flymake--diag-make :locus locus :beg beg :end end |
| 415 | :type type :origin (car info) :code (cadr info) | 418 | :type type :origin (car info) :code (cadr info) |
| 416 | :message (caddr info) :data data | 419 | :message (caddr info) :data data |