From: Theodor Thornhill Date: Mon, 9 May 2022 19:04:12 +0000 (+0200) Subject: Use format string instead of concat X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~45 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=50ff73d753708467621d6ce8495a5d78dc31ae63;p=emacs.git 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 --- 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