diff options
| author | Stefan Kangas | 2021-11-06 20:59:28 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2021-11-06 20:59:28 +0100 |
| commit | d85cf33e494f4e9ada2a9359247e88775e92e7c0 (patch) | |
| tree | aa4dfb6436469fc883f7727fdd7e504dc66c0f05 | |
| parent | 6243a43ac2b575435efb65d9bdbb15980ea14d78 (diff) | |
| download | emacs-d85cf33e494f4e9ada2a9359247e88775e92e7c0.tar.gz emacs-d85cf33e494f4e9ada2a9359247e88775e92e7c0.zip | |
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)
| -rw-r--r-- | lisp/progmodes/flymake.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index bcb43c1faf1..403925c8557 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." | |||
| 266 | (warning-type-format | 266 | (warning-type-format |
| 267 | (format " [%s %s]" | 267 | (format " [%s %s]" |
| 268 | (or sublog 'flymake) | 268 | (or sublog 'flymake) |
| 269 | (current-buffer)))) | 269 | ;; Handle file names with "%" correctly. (Bug#51549) |
| 270 | (string-replace "%" "%%" | ||
| 271 | (buffer-name (current-buffer)))))) | ||
| 270 | (display-warning (list 'flymake sublog) | 272 | (display-warning (list 'flymake sublog) |
| 271 | (apply #'format-message msg args) | 273 | (apply #'format-message msg args) |
| 272 | (if (numberp level) | 274 | (if (numberp level) |