diff options
| author | Kenichi Handa | 2008-06-03 04:24:04 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2008-06-03 04:24:04 +0000 |
| commit | 8a1816bb4a523e10ad30438e38704fc584bb4854 (patch) | |
| tree | b726eb6036835bde3fae5cb185ef7f3e53de83b0 /src | |
| parent | 6459e35e905394a3b70de95f7e96ecebe88557d2 (diff) | |
| download | emacs-8a1816bb4a523e10ad30438e38704fc584bb4854.tar.gz emacs-8a1816bb4a523e10ad30438e38704fc584bb4854.zip | |
(char_charset): Return NULL if the arg charset_list is
specified and C doesn't belong to any of them.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/charset.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 66f00bcea7a..1ef32828b45 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-06-03 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * charset.c (char_charset): Return NULL if the arg charset_list is | ||
| 4 | specified and C doesn't belong to any of them. | ||
| 5 | |||
| 1 | 2008-06-02 Chip Coldwell <coldwell@redhat.com> | 6 | 2008-06-02 Chip Coldwell <coldwell@redhat.com> |
| 2 | 7 | ||
| 3 | * font.c (font_pixel_size): Don't take cdr of an integer. | 8 | * font.c (font_pixel_size): Don't take cdr of an integer. |
diff --git a/src/charset.c b/src/charset.c index 052c511f6a3..a08089d6d2c 100644 --- a/src/charset.c +++ b/src/charset.c | |||
| @@ -1813,8 +1813,12 @@ char_charset (c, charset_list, code_return) | |||
| 1813 | Lisp_Object charset_list; | 1813 | Lisp_Object charset_list; |
| 1814 | unsigned *code_return; | 1814 | unsigned *code_return; |
| 1815 | { | 1815 | { |
| 1816 | int maybe_null = 0; | ||
| 1817 | |||
| 1816 | if (NILP (charset_list)) | 1818 | if (NILP (charset_list)) |
| 1817 | charset_list = Vcharset_ordered_list; | 1819 | charset_list = Vcharset_ordered_list; |
| 1820 | else | ||
| 1821 | maybe_null = 1; | ||
| 1818 | 1822 | ||
| 1819 | while (CONSP (charset_list)) | 1823 | while (CONSP (charset_list)) |
| 1820 | { | 1824 | { |
| @@ -1832,7 +1836,8 @@ char_charset (c, charset_list, code_return) | |||
| 1832 | && EQ (charset_list, Vcharset_non_preferred_head)) | 1836 | && EQ (charset_list, Vcharset_non_preferred_head)) |
| 1833 | return CHARSET_FROM_ID (charset_unicode); | 1837 | return CHARSET_FROM_ID (charset_unicode); |
| 1834 | } | 1838 | } |
| 1835 | return (c <= MAX_5_BYTE_CHAR ? CHARSET_FROM_ID (charset_emacs) | 1839 | return (maybe_null ? NULL |
| 1840 | : c <= MAX_5_BYTE_CHAR ? CHARSET_FROM_ID (charset_emacs) | ||
| 1836 | : CHARSET_FROM_ID (charset_eight_bit)); | 1841 | : CHARSET_FROM_ID (charset_eight_bit)); |
| 1837 | } | 1842 | } |
| 1838 | 1843 | ||