From 090cf9dbb07e7ab0817c208b6d8dcd613180b7c3 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 1 Oct 2012 20:31:56 -0400 Subject: Misc minor simplifications in C code. * src/buffer.c (Fset_buffer_multibyte): Signal an error instead of widening. (Fmake_overlay): Remove redundant tests. * src/coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special case for the special 0 coding-system. * src/frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP. --- src/coding.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/coding.h') diff --git a/src/coding.h b/src/coding.h index c45d2ef86e2..989552bf667 100644 --- a/src/coding.h +++ b/src/coding.h @@ -646,10 +646,8 @@ struct coding_system for file names, if any. */ #define ENCODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ : (! NILP (Vdefault_file_name_coding_system) \ - && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ : name)) @@ -658,10 +656,8 @@ struct coding_system for file names, if any. */ #define DECODE_FILE(name) \ (! NILP (Vfile_name_coding_system) \ - && !EQ (Vfile_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ : (! NILP (Vdefault_file_name_coding_system) \ - && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ : name)) @@ -670,7 +666,6 @@ struct coding_system for system functions, if any. */ #define ENCODE_SYSTEM(str) \ (! NILP (Vlocale_coding_system) \ - && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ : str) @@ -678,7 +673,6 @@ struct coding_system for system functions, if any. */ #define DECODE_SYSTEM(str) \ (! NILP (Vlocale_coding_system) \ - && !EQ (Vlocale_coding_system, make_number (0)) \ ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ : str) -- cgit v1.2.1