Make html-mode--html-yank-handler more resilient

* lisp/textmodes/sgml-mode.el (html-mode--html-yank-handler): The
HTML may not be valid, so suppress errors.
This commit is contained in:
Lars Ingebrigtsen 2021-11-08 06:04:11 +01:00
parent 19f37afe27
commit a460f3d378

View file

@ -2435,7 +2435,8 @@ To work around that, do:
(defun html-mode--html-yank-handler (_type html)
(save-restriction
(insert html)
(sgml-pretty-print (point-min) (point-max))))
(ignore-errors
(sgml-pretty-print (point-min) (point-max)))))
(defun html-mode--image-yank-handler (type image)
(let ((file (read-file-name (format "Save %s image to: " type))))