From ba618d2cee55c8c339d46621b7e721957cc30a72 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Mon, 9 May 2022 21:04:12 +0200 Subject: [PATCH] Fix #948: Use format string instead of concat * eglot.el (eglot-handle-notification): Because diagnostics code can be integer or string, and integer fails the sequencep test, use format to create this string. --- eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eglot.el b/eglot.el index 3e3eb3c5..e8f060cd 100644 --- a/eglot.el +++ b/eglot.el @@ -1959,7 +1959,7 @@ COMMAND is a symbol naming the command." ((= sev 2) 'eglot-warning) (t 'eglot-note))) (mess (source code message) - (concat source (and code (concat " [" code "]")) ": " message))) + (concat source (and code (format " [%s]" code)) ": " message))) (if-let ((buffer (find-buffer-visiting (eglot--uri-to-path uri)))) (with-current-buffer buffer (cl-loop