* 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)
(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)