diff options
| author | Eli Zaretskii | 2015-01-31 20:48:53 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-01-31 20:48:53 +0200 |
| commit | a2c32b0cfc9f6d3410e2832d8ea0d4f1df576d1e (patch) | |
| tree | c2c1167bcd193c53c7293d77b5eb3210c33399ef /src/coding.c | |
| parent | 080b9b56c99cfdfa286fb6b8c3099626688dc8ae (diff) | |
| download | emacs-a2c32b0cfc9f6d3410e2832d8ea0d4f1df576d1e.tar.gz emacs-a2c32b0cfc9f6d3410e2832d8ea0d4f1df576d1e.zip | |
Avoid aborts when keyboard-coding-system is raw-text (Bug#19532)
src/coding.c (raw_text_coding_system_p): New function.
src/keyboard.c (read_decoded_event_from_main_queue): Use it when the
keyboard coding-system is 'raw-text'.
src/coding.h (raw_text_coding_system_p): Add prototype.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index a7128ee3e73..1a0e1279648 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -5979,6 +5979,15 @@ raw_text_coding_system (Lisp_Object coding_system) | |||
| 5979 | : AREF (raw_text_eol_type, 2)); | 5979 | : AREF (raw_text_eol_type, 2)); |
| 5980 | } | 5980 | } |
| 5981 | 5981 | ||
| 5982 | /* Return true if CODING corresponds to raw-text coding-system. */ | ||
| 5983 | |||
| 5984 | bool | ||
| 5985 | raw_text_coding_system_p (struct coding_system *coding) | ||
| 5986 | { | ||
| 5987 | return (coding->decoder == decode_coding_raw_text | ||
| 5988 | && coding->encoder == encode_coding_raw_text) ? true : false; | ||
| 5989 | } | ||
| 5990 | |||
| 5982 | 5991 | ||
| 5983 | /* If CODING_SYSTEM doesn't specify end-of-line format, return one of | 5992 | /* If CODING_SYSTEM doesn't specify end-of-line format, return one of |
| 5984 | the subsidiary that has the same eol-spec as PARENT (if it is not | 5993 | the subsidiary that has the same eol-spec as PARENT (if it is not |