From fe56282f2782570432d9b1a707d8a37d38076628 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 10 Mar 2008 12:21:09 +0000 Subject: [PATCH] (Finsert_file_contents): Don't make CCL program to append "CCL: Quitted" when the decoding is quitted, but just signal `quit'. --- src/ChangeLog | 12 ++++++++++++ src/fileio.c | 11 +++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b00ca9a32a8..2a9fec1ef2c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,15 @@ +2008-03-10 Kenichi Handa + + * 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 * process.h (struct Lisp_Process): Declare bit field as unsigned. diff --git a/src/fileio.c b/src/fileio.c index 769a719191e..124e107ac74 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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 -- 2.39.5