emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 64dbbde3b77: Fix visiting HTML files encoded in iso-2022 varian


From: Eli Zaretskii
Subject: emacs-29 64dbbde3b77: Fix visiting HTML files encoded in iso-2022 variants
Date: Mon, 22 May 2023 14:24:26 -0400 (EDT)

branch: emacs-29
commit 64dbbde3b77c3d81445cd0faa2237fe0997ed741
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix visiting HTML files encoded in iso-2022 variants
    
    * lisp/international/mule.el (sgml-xml-auto-coding-function)
    (sgml-html-meta-auto-coding-function): Handle coding-systems whose
    coding-system-type is iso-2022.  (Bug#63644)
---
 lisp/international/mule.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 25b90b49c8f..2b44a2e0645 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -2484,10 +2484,12 @@ This function is intended to be added to 
`auto-coding-functions'."
                     ;; called as part of visiting a file, as opposed
                     ;; to when saving a buffer to a file.
                     (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.
+                             ;; 'charset' and 'iso-2022' will signal
+                             ;; an error in coding-system-equal, since
+                             ;; they aren't coding-systems.  So test
+                             ;; that up front.
                              (not (equal sym-type 'charset))
+                             (not (equal sym-type 'iso-2022))
                              (coding-system-equal 'utf-8 sym-type)
                              (coding-system-equal 'utf-8 bfcs-type))
                         buffer-file-coding-system
@@ -2540,11 +2542,13 @@ 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.
+                       ;; 'charset' and 'iso-2022' will signal an error
+                       ;; in coding-system-equal, since they aren't
+                       ;; coding-systems.  So test that up front.
                        (not (equal sym-type 'charset))
                        (not (equal bfcs-type 'charset))
+                       (not (equal sym-type 'iso-2022))
+                       (not (equal bfcs-type 'iso-2022))
                        (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]