aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2025-04-23 08:32:51 +0100
committerJoão Távora2025-04-23 08:35:30 +0100
commita25fc9a518dc1c4bf1ef86bb949ed2f3c995adea (patch)
tree6d249fa4fe733a6a9552c068b5ca04ecef2c1790
parent89b7e726f12f34c94c5f05f8972fa8a6a3ea56b5 (diff)
downloademacs-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.el13
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
391types') 391types')
392 392
393INFO is a description of the problem detected. It may be a string, or 393INFO is a description of the problem detected. It may be a string, or
394list of three strings (ORIGIN CODE MESSAGE) appropriately categorizing 394list (ORIGIN CODE MESSAGE) appropriately categorizing and describing the
395and describing the diagnostic. 395diagnostic. ORIGIN may be a string or nil. CODE maybe be a string, a
396number or nil. MESSAGE must be a string.
396 397
397DATA is any object that the caller wishes to attach to the created 398DATA is any object that the caller wishes to attach to the created
398diagnostic for later retrieval with `flymake-diagnostic-data'. 399diagnostic for later retrieval with `flymake-diagnostic-data'.
@@ -409,8 +410,10 @@ in the `flymake-overlay-control' property of the diagnostic's type
409symbol." 410symbol."
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