Mercurial > emacs
comparison src/coding.c @ 71972:eaa3c19b94d2
(Fcheck_coding_system): Use xsignal1. Remove loop.
(Fdefine_coding_system_internal): Use xsignal1.
| author | Kim F. Storm <storm@cua.dk> |
|---|---|
| date | Tue, 18 Jul 2006 13:26:12 +0000 |
| parents | ccef92f2f7f8 |
| children | f3bc55b96df5 02e39decdc84 8a8e69664178 |
comparison
equal
deleted
inserted
replaced
| 71971:a0c56d32ce9f | 71972:eaa3c19b94d2 |
|---|---|
| 6070 if (buf == current_buffer) | 6070 if (buf == current_buffer) |
| 6071 { | 6071 { |
| 6072 /* As we are already in the work buffer, we must generate a new | 6072 /* As we are already in the work buffer, we must generate a new |
| 6073 buffer for the work. */ | 6073 buffer for the work. */ |
| 6074 Lisp_Object name; | 6074 Lisp_Object name; |
| 6075 | 6075 |
| 6076 name = Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil); | 6076 name = Fgenerate_new_buffer_name (Vcode_conversion_workbuf_name, Qnil); |
| 6077 buffer = buffer_to_kill = Fget_buffer_create (name); | 6077 buffer = buffer_to_kill = Fget_buffer_create (name); |
| 6078 buf = XBUFFER (buffer); | 6078 buf = XBUFFER (buffer); |
| 6079 } | 6079 } |
| 6080 else | 6080 else |
| 6593 Fput (coding_system, Qcoding_system_define_form, Qnil); | 6593 Fput (coding_system, Qcoding_system_define_form, Qnil); |
| 6594 safe_eval (define_form); | 6594 safe_eval (define_form); |
| 6595 } | 6595 } |
| 6596 if (!NILP (Fcoding_system_p (coding_system))) | 6596 if (!NILP (Fcoding_system_p (coding_system))) |
| 6597 return coding_system; | 6597 return coding_system; |
| 6598 while (1) | 6598 xsignal1 (Qcoding_system_error, coding_system); |
| 6599 Fsignal (Qcoding_system_error, Fcons (coding_system, Qnil)); | |
| 6600 } | 6599 } |
| 6601 | 6600 |
| 6602 Lisp_Object | 6601 Lisp_Object |
| 6603 detect_coding_system (src, src_bytes, highest, multibytep) | 6602 detect_coding_system (src, src_bytes, highest, multibytep) |
| 6604 const unsigned char *src; | 6603 const unsigned char *src; |
| 7621 Lisp_Object coding_system; | 7620 Lisp_Object coding_system; |
| 7622 { | 7621 { |
| 7623 Lisp_Object safe_chars, slot; | 7622 Lisp_Object safe_chars, slot; |
| 7624 | 7623 |
| 7625 if (NILP (Fcheck_coding_system (coding_system))) | 7624 if (NILP (Fcheck_coding_system (coding_system))) |
| 7626 Fsignal (Qcoding_system_error, Fcons (coding_system, Qnil)); | 7625 xsignal1 (Qcoding_system_error, coding_system); |
| 7626 | |
| 7627 safe_chars = coding_safe_chars (coding_system); | 7627 safe_chars = coding_safe_chars (coding_system); |
| 7628 if (! EQ (safe_chars, Qt) && ! CHAR_TABLE_P (safe_chars)) | 7628 if (! EQ (safe_chars, Qt) && ! CHAR_TABLE_P (safe_chars)) |
| 7629 error ("No valid safe-chars property for %s", | 7629 error ("No valid safe-chars property for %s", |
| 7630 SDATA (SYMBOL_NAME (coding_system))); | 7630 SDATA (SYMBOL_NAME (coding_system))); |
| 7631 | |
| 7631 if (EQ (safe_chars, Qt)) | 7632 if (EQ (safe_chars, Qt)) |
| 7632 { | 7633 { |
| 7633 if (NILP (Fmemq (coding_system, XCAR (Vcoding_system_safe_chars)))) | 7634 if (NILP (Fmemq (coding_system, XCAR (Vcoding_system_safe_chars)))) |
| 7634 XSETCAR (Vcoding_system_safe_chars, | 7635 XSETCAR (Vcoding_system_safe_chars, |
| 7635 Fcons (coding_system, XCAR (Vcoding_system_safe_chars))); | 7636 Fcons (coding_system, XCAR (Vcoding_system_safe_chars))); |
