]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix user-error usage in sgml-mode.el
authorBasil L. Contovounesios <basil@contovou.net>
Fri, 7 Jun 2024 08:47:14 +0000 (10:47 +0200)
committerEshel Yaron <me@eshelyaron.com>
Fri, 7 Jun 2024 10:44:40 +0000 (12:44 +0200)
* lisp/textmodes/sgml-mode.el (html-mode--image-yank-handler):
Address recent byte-compiler format string warnings (bug#71379).

(cherry picked from commit 025c3eaf9cc9956ff5a10a7bf09a26f176919a28)

lisp/textmodes/sgml-mode.el

index 1f440ebf7d096fa5c30bb14b7a02ba053c614582..5c7443741282458e6cead83e9af1dbe959c47423 100644 (file)
@@ -2470,10 +2470,10 @@ To work around that, do:
 (defun html-mode--image-yank-handler (type image)
   (let ((file (read-file-name (format "Save %s image to: " type))))
     (when (file-directory-p file)
-      (user-error "%s is a directory"))
+      (user-error "%s is a directory" file))
     (when (and (file-exists-p file)
                (not (yes-or-no-p (format "%s exists; overwrite?" file))))
-      (user-error "%s exists"))
+      (user-error "%s exists" file))
     (with-temp-buffer
       (set-buffer-multibyte nil)
       (insert image)