aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index 54811588c6a..1a0e1279648 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -350,7 +350,8 @@ static Lisp_Object Vbig5_coding_system;
350#define CODING_ISO_BOL(coding) \ 350#define CODING_ISO_BOL(coding) \
351 ((coding)->spec.iso_2022.bol) 351 ((coding)->spec.iso_2022.bol)
352#define CODING_ISO_INVOKED_CHARSET(coding, plane) \ 352#define CODING_ISO_INVOKED_CHARSET(coding, plane) \
353 CODING_ISO_DESIGNATION ((coding), CODING_ISO_INVOCATION ((coding), (plane))) 353 (CODING_ISO_INVOCATION (coding, plane) < 0 ? -1 \
354 : CODING_ISO_DESIGNATION (coding, CODING_ISO_INVOCATION (coding, plane)))
354#define CODING_ISO_CMP_STATUS(coding) \ 355#define CODING_ISO_CMP_STATUS(coding) \
355 (&(coding)->spec.iso_2022.cmp_status) 356 (&(coding)->spec.iso_2022.cmp_status)
356#define CODING_ISO_EXTSEGMENT_LEN(coding) \ 357#define CODING_ISO_EXTSEGMENT_LEN(coding) \
@@ -5978,6 +5979,15 @@ raw_text_coding_system (Lisp_Object coding_system)
5978 : AREF (raw_text_eol_type, 2)); 5979 : AREF (raw_text_eol_type, 2));
5979} 5980}
5980 5981
5982/* Return true if CODING corresponds to raw-text coding-system. */
5983
5984bool
5985raw_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
5981 5991
5982/* 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
5983 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