emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 0fb90f524db 1/2: Fix decoding HTML files from archives


From: Eli Zaretskii
Subject: emacs-29 0fb90f524db 1/2: Fix decoding HTML files from archives
Date: Sun, 22 Jan 2023 09:09:13 -0500 (EST)

branch: emacs-29
commit 0fb90f524dbacf487bc9b9c2737e0ae3db5a3818
Author: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix decoding HTML files from archives
    
    * lisp/international/mule.el (sgml-xml-auto-coding-function): Avoid
    signaling an error from coding-system-equal when the XML encoding tag
    specifies an encoding whose type is 'charset'.  (Bug#61005)
    
    This is the same fix as in #df7ed10e for
    sgml-xml-auto-coding-function.
---
 lisp/international/mule.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index eddd7b6407a..52019697ad7 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2540,6 +2540,10 @@ This function is intended to be added to 
`auto-coding-functions'."
                   (bfcs-type
                    (coding-system-type buffer-file-coding-system)))
               (if (and enable-multibyte-characters
+                       ;; 'charset' will signal an error in
+                       ;; coding-system-equal, since it isn't a
+                       ;; coding-system.  So test that up front.
+                       (not (equal sym-type 'charset))
                        (coding-system-equal 'utf-8 sym-type)
                        (coding-system-equal 'utf-8 bfcs-type))
                   buffer-file-coding-system



reply via email to

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