]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finsert_file_contents): Don't make CCL program to
authorKenichi Handa <handa@m17n.org>
Mon, 10 Mar 2008 12:21:09 +0000 (12:21 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 10 Mar 2008 12:21:09 +0000 (12:21 +0000)
append "CCL: Quitted" when the decoding is quitted, but just
signal `quit'.

src/ChangeLog
src/fileio.c

index b00ca9a32a8e24960e2d4e83ec6eda357ebab984..2a9fec1ef2c930e7b42e94b20194b510ef6fe1ec 100644 (file)
@@ -1,3 +1,15 @@
+2008-03-10  Kenichi Handa  <handa@ni.aist.go.jp>
+
+       * fileio.c (Finsert_file_contents): Don't make CCL program to
+       append "CCL: Quitted" when the decoding is quitted, but just
+       signal `quit'.
+
+       * ccl.c (ccl_driver): If ccl->quit_silently is nonzero, don't
+       append "CCL: Quitted" when the CCL program is quitted.
+       (setup_ccl_program): Initialize ccl->quit_silently to zero.
+
+       * ccl.h (struct ccl_program): New member quit_silently.
+
 2008-03-08  Andreas Schwab  <schwab@suse.de>
 
        * process.h (struct Lisp_Process): Declare bit field as unsigned.
index 769a719191eb528b371d42eba3b9857ac4b85446..124e107ac746f61bc96209a194a9bd115f3f9af9 100644 (file)
@@ -4632,8 +4632,19 @@ actually used.  */)
     {
       if (CODING_MAY_REQUIRE_DECODING (&coding))
        {
+         if (coding.type == coding_type_ccl)
+           coding.spec.ccl.decoder.quit_silently = 1;
          code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted,
                               &coding, 0, 0);
+         if (coding.type == coding_type_ccl)
+           coding.spec.ccl.decoder.quit_silently = 0;
+         if (coding.result == CODING_FINISH_INTERRUPT)
+           {
+             /* Fixme: It is better that we report that the decoding
+                was interruppted by the user, and the current buffer
+                contents doesn't reflect the file correctly.  */
+             Fsignal (Qquit, Qnil);
+           }
          inserted = coding.produced_char;
        }
       else