aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.h')
-rw-r--r--src/buffer.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buffer.h b/src/buffer.h
index 4a23e4fdd2e..f53212e3120 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1365,28 +1365,28 @@ downcase (int c)
1365 return NATNUMP (down) ? XFASTINT (down) : c; 1365 return NATNUMP (down) ? XFASTINT (down) : c;
1366} 1366}
1367 1367
1368/* True if C is upper case. */ 1368/* Upcase a character C, or make no change if that cannot be done. */
1369INLINE bool uppercasep (int c) { return downcase (c) != c; }
1370
1371/* Upcase a character C known to be not upper case. */
1372INLINE int 1369INLINE int
1373upcase1 (int c) 1370upcase (int c)
1374{ 1371{
1375 Lisp_Object upcase_table = BVAR (current_buffer, upcase_table); 1372 Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
1376 Lisp_Object up = CHAR_TABLE_REF (upcase_table, c); 1373 Lisp_Object up = CHAR_TABLE_REF (upcase_table, c);
1377 return NATNUMP (up) ? XFASTINT (up) : c; 1374 return NATNUMP (up) ? XFASTINT (up) : c;
1378} 1375}
1379 1376
1377/* True if C is upper case. */
1378INLINE bool uppercasep (int c)
1379{
1380 return downcase (c) != c;
1381}
1382
1380/* True if C is lower case. */ 1383/* True if C is lower case. */
1381INLINE bool 1384INLINE bool
1382lowercasep (int c) 1385lowercasep (int c)
1383{ 1386{
1384 return !uppercasep (c) && upcase1 (c) != c; 1387 return !uppercasep (c) && upcase (c) != c;
1385} 1388}
1386 1389
1387/* Upcase a character C, or make no change if that cannot be done. */
1388INLINE int upcase (int c) { return uppercasep (c) ? c : upcase1 (c); }
1389
1390INLINE_HEADER_END 1390INLINE_HEADER_END
1391 1391
1392#endif /* EMACS_BUFFER_H */ 1392#endif /* EMACS_BUFFER_H */