Commit 2638320e authored by Paul Eggert's avatar Paul Eggert
Browse files

* character.h (CHAR_VALID_P): Remove unused parameter.

* fontset.c, lisp.h, xdisp.c: All uses changed.
parent 045eb8d9
2011-06-13 Paul Eggert <eggert@cs.ucla.edu>
* character.h (CHAR_VALID_P): Remove unused parameter.
* fontset.c, lisp.h, xdisp.c: All uses changed.
* editfns.c (Ftranslate_region_internal): Omit redundant test.
* fns.c (concat): Minor tuning based on overflow analysis.
......
......@@ -109,8 +109,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Nonzero iff X is a character. */
#define CHARACTERP(x) (NATNUMP (x) && XFASTINT (x) <= MAX_CHAR)
/* Nonzero iff C is valid as a character code. GENERICP is not used. */
#define CHAR_VALID_P(c, genericp) UNSIGNED_CMP (c, <=, MAX_CHAR)
/* Nonzero iff C is valid as a character code. */
#define CHAR_VALID_P(c) UNSIGNED_CMP (c, <=, MAX_CHAR)
/* Check if Lisp object X is a character or not. */
#define CHECK_CHARACTER(x) \
......
......@@ -1851,7 +1851,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
face_id = face_at_buffer_position (w, pos, -1, -1, &dummy,
pos + 100, 0, -1);
}
if (! CHAR_VALID_P (c, 0))
if (! CHAR_VALID_P (c))
return Qnil;
face_id = FACE_FOR_CHAR (f, FACE_FROM_ID (f, face_id), c, pos, Qnil);
face = FACE_FROM_ID (f, face_id);
......
......@@ -1609,7 +1609,7 @@ typedef struct {
#define SET_GLYPH(glyph, char, face) ((glyph).ch = (char), (glyph).face_id = (face))
/* Return 1 if GLYPH contains valid character code. */
#define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (GLYPH_CHAR (glyph), 1)
#define GLYPH_CHAR_VALID_P(glyph) CHAR_VALID_P (GLYPH_CHAR (glyph))
/* Glyph Code from a display vector may either be an integer which
......@@ -1623,7 +1623,7 @@ typedef struct {
(CONSP (gc) ? XINT (XCDR (gc)) : INTEGERP (gc) ? (XINT (gc) >> CHARACTERBITS) : DEFAULT_FACE_ID)
/* Return 1 if glyph code from display vector contains valid character code. */
#define GLYPH_CODE_CHAR_VALID_P(gc) CHAR_VALID_P (GLYPH_CODE_CHAR (gc), 1)
#define GLYPH_CODE_CHAR_VALID_P(gc) CHAR_VALID_P (GLYPH_CODE_CHAR (gc))
#define GLYPH_CODE_P(gc) ((CONSP (gc) && INTEGERP (XCAR (gc)) && INTEGERP (XCDR (gc))) || INTEGERP (gc))
......
......@@ -1335,7 +1335,7 @@ string_char_and_length (const unsigned char *str, int *len)
int c;
c = STRING_CHAR_AND_LENGTH (str, *len);
if (!CHAR_VALID_P (c, 1))
if (!CHAR_VALID_P (c))
/* We may not change the length here because other places in Emacs
don't use this function, i.e. they silently accept invalid
characters. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment