emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/realgud 37d424b1d1 1/2: Escape the escape characters fo


From: ELPA Syncer
Subject: [elpa] externals/realgud 37d424b1d1 1/2: Escape the escape characters for message
Date: Mon, 13 Nov 2023 15:58:28 -0500 (EST)

branch: externals/realgud
commit 37d424b1d10d9ed544e0ddcd7870aa45df903c43
Author: Benson Chu <bensonchu457@gmail.com>
Commit: GitHub <noreply@github.com>

    Escape the escape characters for message
    
    If the eval message contains the chacater "%", then the call to message 
will error, because it's expecting format-string arguments.
    
    The recommended way to escape strings passed to message (according to 
`message's docstring) is to do the following:
    
    (message %s "the-string-%")
---
 realgud/common/track.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/realgud/common/track.el b/realgud/common/track.el
index a655d9d699..c057017b9f 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -212,7 +212,7 @@ message."
 
 (defun realgud:message-eval-results(text)
   "Output the TEXT to the message area."
-  (message (realgud:truncate-eval-message (realgud:get-eval-output text))))
+  (message "%s" (realgud:truncate-eval-message (realgud:get-eval-output 
text))))
 
 (defun realgud:track-from-region(from to &optional cmd-mark opt-cmdbuf
                                      shortkey-on-tracing? no-warn-if-no-match?)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]