diff options
| author | Stefan Monnier | 2012-10-01 20:31:56 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-10-01 20:31:56 -0400 |
| commit | 090cf9dbb07e7ab0817c208b6d8dcd613180b7c3 (patch) | |
| tree | 7057ce7dfff1066256c5a321e3ffd5c8a79c7eb4 /src/coding.h | |
| parent | 9f7b98f812674d2824d713b460973842e6e0943b (diff) | |
| download | emacs-090cf9dbb07e7ab0817c208b6d8dcd613180b7c3.tar.gz emacs-090cf9dbb07e7ab0817c208b6d8dcd613180b7c3.zip | |
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.
Diffstat (limited to 'src/coding.h')
| -rw-r--r-- | src/coding.h | 6 |
1 files changed, 0 insertions, 6 deletions
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 | |||
| 646 | for file names, if any. */ | 646 | for file names, if any. */ |
| 647 | #define ENCODE_FILE(name) \ | 647 | #define ENCODE_FILE(name) \ |
| 648 | (! NILP (Vfile_name_coding_system) \ | 648 | (! NILP (Vfile_name_coding_system) \ |
| 649 | && !EQ (Vfile_name_coding_system, make_number (0)) \ | ||
| 650 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ | 649 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 1) \ |
| 651 | : (! NILP (Vdefault_file_name_coding_system) \ | 650 | : (! NILP (Vdefault_file_name_coding_system) \ |
| 652 | && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ | ||
| 653 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ | 651 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 1) \ |
| 654 | : name)) | 652 | : name)) |
| 655 | 653 | ||
| @@ -658,10 +656,8 @@ struct coding_system | |||
| 658 | for file names, if any. */ | 656 | for file names, if any. */ |
| 659 | #define DECODE_FILE(name) \ | 657 | #define DECODE_FILE(name) \ |
| 660 | (! NILP (Vfile_name_coding_system) \ | 658 | (! NILP (Vfile_name_coding_system) \ |
| 661 | && !EQ (Vfile_name_coding_system, make_number (0)) \ | ||
| 662 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ | 659 | ? code_convert_string_norecord (name, Vfile_name_coding_system, 0) \ |
| 663 | : (! NILP (Vdefault_file_name_coding_system) \ | 660 | : (! NILP (Vdefault_file_name_coding_system) \ |
| 664 | && !EQ (Vdefault_file_name_coding_system, make_number (0)) \ | ||
| 665 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ | 661 | ? code_convert_string_norecord (name, Vdefault_file_name_coding_system, 0) \ |
| 666 | : name)) | 662 | : name)) |
| 667 | 663 | ||
| @@ -670,7 +666,6 @@ struct coding_system | |||
| 670 | for system functions, if any. */ | 666 | for system functions, if any. */ |
| 671 | #define ENCODE_SYSTEM(str) \ | 667 | #define ENCODE_SYSTEM(str) \ |
| 672 | (! NILP (Vlocale_coding_system) \ | 668 | (! NILP (Vlocale_coding_system) \ |
| 673 | && !EQ (Vlocale_coding_system, make_number (0)) \ | ||
| 674 | ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ | 669 | ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \ |
| 675 | : str) | 670 | : str) |
| 676 | 671 | ||
| @@ -678,7 +673,6 @@ struct coding_system | |||
| 678 | for system functions, if any. */ | 673 | for system functions, if any. */ |
| 679 | #define DECODE_SYSTEM(str) \ | 674 | #define DECODE_SYSTEM(str) \ |
| 680 | (! NILP (Vlocale_coding_system) \ | 675 | (! NILP (Vlocale_coding_system) \ |
| 681 | && !EQ (Vlocale_coding_system, make_number (0)) \ | ||
| 682 | ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ | 676 | ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \ |
| 683 | : str) | 677 | : str) |
| 684 | 678 | ||