Remove redundant or unused things here and there.

* lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
* conf_post.h (RE_TRANSLATE): Use char_table_translate.
* editfns.c (Fcompare_buffer_substrings): Likewise.
* frame.h (struct terminal, struct font_driver_list):
Remove redundant declarations.
* window.h (Qleft, Qright): Likewise.
This commit is contained in:
Dmitry Antipov 2012-09-05 21:05:32 +04:00
parent 697e1e393c
commit e3ccf108a9
6 changed files with 13 additions and 42 deletions

View file

@ -1,3 +1,13 @@
2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
Remove redundant or unused things here and there.
* lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
* conf_post.h (RE_TRANSLATE): Use char_table_translate.
* editfns.c (Fcompare_buffer_substrings): Likewise.
* frame.h (struct terminal, struct font_driver_list):
Remove redundant declarations.
* window.h (Qleft, Qright): Likewise.
2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
Do not mark objects from deleted buffers, windows and frames.

View file

@ -167,7 +167,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
#ifdef emacs /* Don't do this for lib-src. */
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object
#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C)
#define RE_TRANSLATE(TBL, C) char_table_translate (TBL, C)
#ifdef make_number
/* If make_number is a macro, use it. */
#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))

View file

@ -2783,8 +2783,8 @@ determines whether case is significant or ignored. */)
if (!NILP (trt))
{
c1 = CHAR_TABLE_TRANSLATE (trt, c1);
c2 = CHAR_TABLE_TRANSLATE (trt, c2);
c1 = char_table_translate (trt, c1);
c2 = char_table_translate (trt, c2);
}
if (c1 < c2)
return make_number (- 1 - chars);

View file

@ -81,9 +81,6 @@ enum fullscreen_type
#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
struct terminal;
struct font_driver_list;
struct frame
{

View file

@ -909,14 +909,6 @@ enum
(ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \
: char_table_ref ((CT), (IDX)))
/* Almost equivalent to Faref (CT, IDX). However, if the result is
not a character, return IDX.
For these characters, do not check validity of CT
and do not follow parent. */
#define CHAR_TABLE_TRANSLATE(CT, IDX) \
char_table_translate (CT, IDX)
/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
8-bit European characters. Do not check validity of CT. */
#define CHAR_TABLE_SET(CT, IDX, VAL) \
@ -3556,32 +3548,6 @@ extern void init_system_name (void);
#define make_fixnum_or_float(val) \
(FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val))
/* Checks the `cycle check' variable CHECK to see if it indicates that
EL is part of a cycle; CHECK must be either Qnil or a value returned
by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
elements after which a cycle might be suspected; after that many
elements, this macro begins consing in order to keep more precise
track of elements.
Returns nil if a cycle was detected, otherwise a new value for CHECK
that includes EL.
CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
the caller should make sure that's ok. */
#define CYCLE_CHECK(check, el, suspicious) \
(NILP (check) \
? make_number (0) \
: (INTEGERP (check) \
? (XFASTINT (check) < (suspicious) \
? make_number (XFASTINT (check) + 1) \
: Fcons (el, Qnil)) \
: (!NILP (Fmemq ((el), (check))) \
? Qnil \
: Fcons ((el), (check)))))
/* SAFE_ALLOCA normally allocates memory on the stack, but if size is
larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */

View file

@ -27,8 +27,6 @@ INLINE_HEADER_BEGIN
# define WINDOW_INLINE INLINE
#endif
extern Lisp_Object Qleft, Qright;
/* Windows are allocated as if they were vectors, but then the
Lisp data type is changed to Lisp_Window. They are garbage
collected along with the vectors.