emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100076: Fix complementing of a co


From: Kenichi Handa
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100076: Fix complementing of a coding system
Date: Sat, 02 Oct 2010 11:53:21 +0900
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100076 [merge]
committer: Kenichi Handa <address@hidden>
branch nick: emacs-23
timestamp: Sat 2010-10-02 11:53:21 +0900
message:
  Fix complementing of a coding system
modified:
  src/ChangeLog
  src/coding.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-09-30 04:28:34 +0000
+++ b/src/ChangeLog     2010-10-02 01:44:50 +0000
@@ -1,3 +1,10 @@
+2010-10-02  Kenichi Handa  <address@hidden>
+
+       * coding.c (coding_inherit_eol_type): If parent doesn't specify
+       eol-format, inherit from the system's default.
+       (complement_process_encoding_system): Make a new coding system
+       inherit the original eol-format.
+
 2010-09-30  Kenichi Handa  <address@hidden>
 
        * coding.c (complement_process_encoding_system): New function.

=== modified file 'src/coding.c'
--- a/src/coding.c      2010-09-30 04:28:34 +0000
+++ b/src/coding.c      2010-10-02 01:44:50 +0000
@@ -6073,10 +6073,9 @@
 }
 
 
-/* If CODING_SYSTEM doesn't specify end-of-line format but PARENT
-   does, return one of the subsidiary that has the same eol-spec as
-   PARENT.  Otherwise, return CODING_SYSTEM.  If PARENT is nil,
-   inherit end-of-line format from the system's setting
+/* If CODING_SYSTEM doesn't specify end-of-line format, return one of
+   the subsidiary that has the same eol-spec as PARENT (if it is not
+   nil and specifies end-of-line format) or the system's setting
    (system_eol_type).  */
 
 Lisp_Object
@@ -6099,6 +6098,8 @@
 
          parent_spec = CODING_SYSTEM_SPEC (parent);
          parent_eol_type = AREF (parent_spec, 2);
+         if (VECTORP (parent_eol_type))
+           parent_eol_type = system_eol_type;      
        }
       else
        parent_eol_type = system_eol_type;
@@ -6132,7 +6133,7 @@
 
   if (EQ (coding_type, Qundecided))
     {
-      /* We must decide the text-conversion part.  */
+      /* We must decide the text-conversion part ar first.  */
       if (CONSP (Vdefault_process_coding_system))
        {
          coding_system = XCDR (Vdefault_process_coding_system);
@@ -6162,7 +6163,7 @@
   if (NILP (eol_type) || VECTORP (eol_type))
     {
       /* We must decide the eol-conversion part.  */      
-      coding_system = coding_inherit_eol_type (coding_system, Qnil);
+      coding_system = coding_inherit_eol_type (coding_system, coding_system);
     }
 
   return coding_system;


reply via email to

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