comparison src/lisp.h @ 17289:83cc6a193391

(CHAR_TABLE_REF): Fix syntax error. (LOWERCASEP): Use NOCASEP instead of its expansion. (UPCASE): Use UPPERCASEP instead of its expansion.
author Karl Heuer <kwzh@gnu.org>
date Thu, 03 Apr 1997 21:34:11 +0000
parents e38cc84db8ab
children bd34aa57f3f5
comparison
equal deleted inserted replaced
17288:1ea863f636cf 17289:83cc6a193391
590 and 8-bit Europeans characters. Do not follow parent. */ 590 and 8-bit Europeans characters. Do not follow parent. */
591 #define CHAR_TABLE_REF(CT, IDX) \ 591 #define CHAR_TABLE_REF(CT, IDX) \
592 (CHAR_TABLE_P (CT) && IDX >= 0 && IDX < CHAR_TABLE_SINGLE_BYTE_SLOTS \ 592 (CHAR_TABLE_P (CT) && IDX >= 0 && IDX < CHAR_TABLE_SINGLE_BYTE_SLOTS \
593 ? (!NILP (XCHAR_TABLE (CT)->contents[IDX]) \ 593 ? (!NILP (XCHAR_TABLE (CT)->contents[IDX]) \
594 ? XCHAR_TABLE (CT)->contents[IDX] \ 594 ? XCHAR_TABLE (CT)->contents[IDX] \
595 : XCHAR_TABLE (CT)->default) \ 595 : XCHAR_TABLE (CT)->defalt) \
596 : Faref (CT, IDX)) 596 : Faref (CT, IDX))
597 597
598 /* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and 598 /* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
599 8-bit Europeans characters. */ 599 8-bit Europeans characters. */
600 #define CHAR_TABLE_SET(CT, IDX, VAL) \ 600 #define CHAR_TABLE_SET(CT, IDX, VAL) \
1288 #define UPPERCASEP(CH) \ 1288 #define UPPERCASEP(CH) \
1289 (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] != (CH)) 1289 (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] != (CH))
1290 1290
1291 /* 1 if CH is lower case. */ 1291 /* 1 if CH is lower case. */
1292 1292
1293 #define LOWERCASEP(CH) \ 1293 #define LOWERCASEP(CH) (!UPPERCASEP (CH) && !NOCASEP(CH))
1294 (!UPPERCASEP (CH) \
1295 && XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] != (CH))
1296 1294
1297 /* 1 if CH is neither upper nor lower case. */ 1295 /* 1 if CH is neither upper nor lower case. */
1298 1296
1299 #define NOCASEP(CH) \ 1297 #define NOCASEP(CH) \
1300 (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] == (CH)) 1298 (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH] == (CH))
1301 1299
1302 /* Upcase a character, or make no change if that cannot be done. */ 1300 /* Upcase a character, or make no change if that cannot be done. */
1303 1301
1304 #define UPCASE(CH) \ 1302 #define UPCASE(CH) (!UPPERCASEP (CH) ? UPCASE1 (CH) : (CH))
1305 (XCHAR_TABLE (current_buffer->downcase_table)->contents[CH] == (CH) \
1306 ? UPCASE1 (CH) : (CH))
1307 1303
1308 /* Upcase a character known to be not upper case. */ 1304 /* Upcase a character known to be not upper case. */
1309 1305
1310 #define UPCASE1(CH) (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH]) 1306 #define UPCASE1(CH) (XCHAR_TABLE (current_buffer->upcase_table)->contents[CH])
1311 1307