qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs charset.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs charset.c
Date: Wed, 22 Mar 2017 13:13:10 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        17/03/22 13:13:10

Modified files:
        .              : charset.c 

Log message:
        charset: default to mac-roman for non utf-8 files with old style mac eol

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/charset.c?cvsroot=qemacs&r1=1.47&r2=1.48

Patches:
Index: charset.c
===================================================================
RCS file: /sources/qemacs/qemacs/charset.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- charset.c   16 Mar 2017 09:16:31 -0000      1.47
+++ charset.c   22 Mar 2017 17:13:10 -0000      1.48
@@ -1517,10 +1517,6 @@
 
     detect_eol_type(buf, size, &charset_raw, eol_typep);
 
-    if (*eol_typep == EOL_DOS || has_utf8 < 0) {
-        /* XXX: default DOS files to Latin1, should be selectable */
-        return &charset_8859_1;
-    }
 #ifndef CONFIG_TINY
     if (*eol_typep == EOL_MAC) {
         /* XXX: default MAC files to Mac_roman, should be selectable */
@@ -1528,6 +1524,10 @@
         return &charset_mac_roman;
     }
 #endif
+    if (*eol_typep == EOL_DOS || has_utf8 < 0) {
+        /* XXX: default DOS files to Latin1, should be selectable */
+        return &charset_8859_1;
+    }
     /* XXX: should use a state variable for default charset */
     return &charset_utf8;
 #endif



reply via email to

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