From 50ff73d753708467621d6ce8495a5d78dc31ae63 Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Mon, 9 May 2022 21:04:12 +0200 Subject: [PATCH] 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. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/948 --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 3e3eb3c543a..e8f060cd64e 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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 -- 2.39.5