From: Paul Eggert Date: Mon, 13 Jun 2011 04:55:03 +0000 (-0700) Subject: * character.h (CHAR_VALID_P): Remove unused parameter. X-Git-Tag: emacs-pretest-24.0.90~104^2~548^2~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2638320e0736eb803c9a5788fe517d3346245ff8;p=emacs.git * character.h (CHAR_VALID_P): Remove unused parameter. * fontset.c, lisp.h, xdisp.c: All uses changed. --- diff --git a/src/ChangeLog b/src/ChangeLog index 22e64fb409a..f26d50f6ce9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2011-06-13 Paul Eggert + * 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. diff --git a/src/character.h b/src/character.h index de97754cfc7..a447ad40ac3 100644 --- a/src/character.h +++ b/src/character.h @@ -109,8 +109,8 @@ along with GNU Emacs. If not, see . */ /* 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) \ diff --git a/src/fontset.c b/src/fontset.c index fec3c56b036..3091f43d6e9 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -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); diff --git a/src/lisp.h b/src/lisp.h index 4dfed319490..1324440c700 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -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)) diff --git a/src/xdisp.c b/src/xdisp.c index c4956599295..b70e0dc0d0b 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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. */