aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDmitry Antipov2012-09-05 21:05:32 +0400
committerDmitry Antipov2012-09-05 21:05:32 +0400
commite3ccf108a942456b3ce4540e8691e5d08c00b720 (patch)
treed1e8fa2932f14a1680555fca53d865c622dec47c /src
parent697e1e393c9cd70acf35da9700a25b6367b7da40 (diff)
downloademacs-e3ccf108a942456b3ce4540e8691e5d08c00b720.tar.gz
emacs-e3ccf108a942456b3ce4540e8691e5d08c00b720.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog10
-rw-r--r--src/conf_post.h2
-rw-r--r--src/editfns.c4
-rw-r--r--src/frame.h3
-rw-r--r--src/lisp.h34
-rw-r--r--src/window.h2
6 files changed, 13 insertions, 42 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a0c3f3537bb..96e3fdd5b45 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,15 @@
12012-09-05 Dmitry Antipov <dmantipov@yandex.ru> 12012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2 2
3 Remove redundant or unused things here and there.
4 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
5 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
6 * editfns.c (Fcompare_buffer_substrings): Likewise.
7 * frame.h (struct terminal, struct font_driver_list):
8 Remove redundant declarations.
9 * window.h (Qleft, Qright): Likewise.
10
112012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12
3 Do not mark objects from deleted buffers, windows and frames. 13 Do not mark objects from deleted buffers, windows and frames.
4 * alloc.c (mark_buffer): Mark just the buffer if it is dead. 14 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
5 (mark_object): Likewise for windows and frames. 15 (mark_object): Likewise for windows and frames.
diff --git a/src/conf_post.h b/src/conf_post.h
index ead7298e98d..cef55863752 100644
--- a/src/conf_post.h
+++ b/src/conf_post.h
@@ -167,7 +167,7 @@ You lose; /* Emacs for DOS must be compiled with DJGPP */
167#ifdef emacs /* Don't do this for lib-src. */ 167#ifdef emacs /* Don't do this for lib-src. */
168/* Tell regex.c to use a type compatible with Emacs. */ 168/* Tell regex.c to use a type compatible with Emacs. */
169#define RE_TRANSLATE_TYPE Lisp_Object 169#define RE_TRANSLATE_TYPE Lisp_Object
170#define RE_TRANSLATE(TBL, C) CHAR_TABLE_TRANSLATE (TBL, C) 170#define RE_TRANSLATE(TBL, C) char_table_translate (TBL, C)
171#ifdef make_number 171#ifdef make_number
172/* If make_number is a macro, use it. */ 172/* If make_number is a macro, use it. */
173#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0))) 173#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
diff --git a/src/editfns.c b/src/editfns.c
index 2d1a3cbfa0c..65baaf4e3f8 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2783,8 +2783,8 @@ determines whether case is significant or ignored. */)
2783 2783
2784 if (!NILP (trt)) 2784 if (!NILP (trt))
2785 { 2785 {
2786 c1 = CHAR_TABLE_TRANSLATE (trt, c1); 2786 c1 = char_table_translate (trt, c1);
2787 c2 = CHAR_TABLE_TRANSLATE (trt, c2); 2787 c2 = char_table_translate (trt, c2);
2788 } 2788 }
2789 if (c1 < c2) 2789 if (c1 < c2)
2790 return make_number (- 1 - chars); 2790 return make_number (- 1 - chars);
diff --git a/src/frame.h b/src/frame.h
index 94498e9efcf..661ea2ea67c 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -81,9 +81,6 @@ enum fullscreen_type
81#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel) 81#define FRAME_FOREGROUND_PIXEL(f) ((f)->foreground_pixel)
82#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel) 82#define FRAME_BACKGROUND_PIXEL(f) ((f)->background_pixel)
83 83
84struct terminal;
85
86struct font_driver_list;
87 84
88struct frame 85struct frame
89{ 86{
diff --git a/src/lisp.h b/src/lisp.h
index a8ed4b6cabc..bc622ba5212 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -909,14 +909,6 @@ enum
909 (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \ 909 (ASCII_CHAR_P (IDX) ? CHAR_TABLE_REF_ASCII ((CT), (IDX)) \
910 : char_table_ref ((CT), (IDX))) 910 : char_table_ref ((CT), (IDX)))
911 911
912/* Almost equivalent to Faref (CT, IDX). However, if the result is
913 not a character, return IDX.
914
915 For these characters, do not check validity of CT
916 and do not follow parent. */
917#define CHAR_TABLE_TRANSLATE(CT, IDX) \
918 char_table_translate (CT, IDX)
919
920/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and 912/* Equivalent to Faset (CT, IDX, VAL) with optimization for ASCII and
921 8-bit European characters. Do not check validity of CT. */ 913 8-bit European characters. Do not check validity of CT. */
922#define CHAR_TABLE_SET(CT, IDX, VAL) \ 914#define CHAR_TABLE_SET(CT, IDX, VAL) \
@@ -3556,32 +3548,6 @@ extern void init_system_name (void);
3556#define make_fixnum_or_float(val) \ 3548#define make_fixnum_or_float(val) \
3557 (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val)) 3549 (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val))
3558 3550
3559
3560/* Checks the `cycle check' variable CHECK to see if it indicates that
3561 EL is part of a cycle; CHECK must be either Qnil or a value returned
3562 by an earlier use of CYCLE_CHECK. SUSPICIOUS is the number of
3563 elements after which a cycle might be suspected; after that many
3564 elements, this macro begins consing in order to keep more precise
3565 track of elements.
3566
3567 Returns nil if a cycle was detected, otherwise a new value for CHECK
3568 that includes EL.
3569
3570 CHECK is evaluated multiple times, EL and SUSPICIOUS 0 or 1 times, so
3571 the caller should make sure that's ok. */
3572
3573#define CYCLE_CHECK(check, el, suspicious) \
3574 (NILP (check) \
3575 ? make_number (0) \
3576 : (INTEGERP (check) \
3577 ? (XFASTINT (check) < (suspicious) \
3578 ? make_number (XFASTINT (check) + 1) \
3579 : Fcons (el, Qnil)) \
3580 : (!NILP (Fmemq ((el), (check))) \
3581 ? Qnil \
3582 : Fcons ((el), (check)))))
3583
3584
3585/* SAFE_ALLOCA normally allocates memory on the stack, but if size is 3551/* SAFE_ALLOCA normally allocates memory on the stack, but if size is
3586 larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */ 3552 larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */
3587 3553
diff --git a/src/window.h b/src/window.h
index f0a3a15f442..a70bc55bac5 100644
--- a/src/window.h
+++ b/src/window.h
@@ -27,8 +27,6 @@ INLINE_HEADER_BEGIN
27# define WINDOW_INLINE INLINE 27# define WINDOW_INLINE INLINE
28#endif 28#endif
29 29
30extern Lisp_Object Qleft, Qright;
31
32/* Windows are allocated as if they were vectors, but then the 30/* Windows are allocated as if they were vectors, but then the
33Lisp data type is changed to Lisp_Window. They are garbage 31Lisp data type is changed to Lisp_Window. They are garbage
34collected along with the vectors. 32collected along with the vectors.