emacs-diffs
[Top][All Lists]
Advanced

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

emacs-28 d85cf33: Escape '%' in filenames to fix flymake warnings


From: Stefan Kangas
Subject: emacs-28 d85cf33: Escape '%' in filenames to fix flymake warnings
Date: Sat, 6 Nov 2021 15:59:53 -0400 (EDT)

branch: emacs-28
commit d85cf33e494f4e9ada2a9359247e88775e92e7c0
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Escape '%' in filenames to fix flymake warnings
    
    * lisp/progmodes/flymake.el (flymake--log-1): Escape '%' in filenames
    for 'warning-type-format' so they are not interpreted as a %-sequence
    by 'format' later.  (Bug#51549)
---
 lisp/progmodes/flymake.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index bcb43c1..403925c 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -266,7 +266,9 @@ If set to nil, don't suppress any zero counters."
         (warning-type-format
          (format " [%s %s]"
                  (or sublog 'flymake)
-                 (current-buffer))))
+                 ;; Handle file names with "%" correctly.  (Bug#51549)
+                 (string-replace "%" "%%"
+                                 (buffer-name (current-buffer))))))
     (display-warning (list 'flymake sublog)
                      (apply #'format-message msg args)
                      (if (numberp level)



reply via email to

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