summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Antipov <dmantipov@yandex.ru>2013-09-23 13:50:47 +0400
committerDmitry Antipov <dmantipov@yandex.ru>2013-09-23 13:50:47 +0400
commit5492865b797b7ce33730ea7b013d43beeaf33dc3 (patch)
tree4289b376ea0446ffb248426d7f63eb3fc1737939
parentb519df23900222df5637cbd23eba45e4bd540856 (diff)
downloademacs-5492865b797b7ce33730ea7b013d43beeaf33dc3.tar.gz
* dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
Move to... * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame): ...this file and convert the latter to static. Adjust comment. (make_initial_frame): * window.c (init_window_once): Adjust user. * frame.h (last_nonminibuf_frame): Remove declaration. * lisp.h (selected_frame): Likewise. * msdos.c (the_only_display_info): Adjust comment.
-rw-r--r--src/ChangeLog12
-rw-r--r--src/dispnew.c18
-rw-r--r--src/frame.c15
-rw-r--r--src/frame.h7
-rw-r--r--src/lisp.h1
-rw-r--r--src/msdos.c2
-rw-r--r--src/window.c1
7 files changed, 29 insertions, 27 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 5592e5b164e..c5e267437e4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
+ Move to...
+ * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
+ ...this file and convert the latter to static. Adjust comment.
+ (make_initial_frame):
+ * window.c (init_window_once): Adjust user.
+ * frame.h (last_nonminibuf_frame): Remove declaration.
+ * lisp.h (selected_frame): Likewise.
+ * msdos.c (the_only_display_info): Adjust comment.
+
2013-09-23 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
diff --git a/src/dispnew.c b/src/dispnew.c
index ed7349a4507..4ec989280ea 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -102,30 +102,12 @@ static void set_window_cursor_after_update (struct window *);
static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
static void adjust_frame_glyphs_for_frame_redisplay (struct frame *);
-/* True upon entry to redisplay means do not assume anything about
- current contents of actual terminal frame; clear and redraw it. */
-
-bool frame_garbaged;
-
/* True means last display completed. False means it was preempted. */
bool display_completed;
Lisp_Object Qdisplay_table, Qredisplay_dont_pause;
-
-/* The currently selected frame. In a single-frame version, this
- variable always equals the_only_frame. */
-
-Lisp_Object selected_frame;
-
-/* A frame which is not just a mini-buffer, or 0 if there are no such
- frames. This is usually the most recent such frame that was
- selected. In a single-frame version, this variable always holds
- the address of the_only_frame. */
-
-struct frame *last_nonminibuf_frame;
-
/* True means SIGWINCH happened when not safe. */
static bool delayed_size_change;
diff --git a/src/frame.c b/src/frame.c
index d2943211377..2e90713b6c3 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -113,6 +113,19 @@ static Lisp_Object Qdelete_frame_functions;
static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource;
+/* The currently selected frame. */
+
+Lisp_Object selected_frame;
+
+/* A frame which is not just a mini-buffer, or NULL if there are no such
+ frames. This is usually the most recent such frame that was selected. */
+
+static struct frame *last_nonminibuf_frame;
+
+/* Nonzero means there is at least one garbaged frame. */
+
+bool frame_garbaged;
+
#ifdef HAVE_WINDOW_SYSTEM
static void x_report_frame_params (struct frame *, Lisp_Object *);
#endif
@@ -546,6 +559,8 @@ make_initial_frame (void)
if (!noninteractive)
init_frame_faces (f);
+ last_nonminibuf_frame = f;
+
return f;
}
diff --git a/src/frame.h b/src/frame.h
index ffab992023a..09e4112d3a2 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -925,6 +925,7 @@ default_pixels_per_inch_y (void)
#define SET_FRAME_ICONIFIED(f, i) \
(f)->iconified = (eassert (0 <= (i) && (i) <= 1), (i))
+extern Lisp_Object selected_frame;
extern Lisp_Object Qframep, Qframe_live_p;
extern Lisp_Object Qtty, Qtty_type;
extern Lisp_Object Qtty_color_mode;
@@ -934,8 +935,6 @@ extern Lisp_Object Qnoelisp;
/* Nonzero means there is at least one garbaged frame. */
extern bool frame_garbaged;
-extern struct frame *last_nonminibuf_frame;
-
extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
extern struct frame *decode_window_system_frame (Lisp_Object);
extern struct frame *decode_live_frame (Lisp_Object);
@@ -955,10 +954,6 @@ extern void frame_make_pointer_visible (void);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
extern Lisp_Object Vframe_list;
-
-/* The currently selected frame. */
-
-extern Lisp_Object selected_frame;
/* Value is a pointer to the selected frame. If the selected frame
isn't live, abort. */
diff --git a/src/lisp.h b/src/lisp.h
index 0fffea57578..864a169da50 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3359,7 +3359,6 @@ extern void syms_of_insdel (void);
&& (defined __FreeBSD__ || defined GNU_LINUX || defined __MINGW32__))
_Noreturn void __executable_start (void);
#endif
-extern Lisp_Object selected_frame;
extern Lisp_Object Vwindow_system;
extern Lisp_Object sit_for (Lisp_Object, bool, int);
extern void init_display (void);
diff --git a/src/msdos.c b/src/msdos.c
index 3a74846f8ea..09aedf837d8 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -408,7 +408,7 @@ static int term_setup_done;
static unsigned short outside_cursor;
-/* Similar to the_only_frame. */
+/* The only display since MS-DOS does not support multiple ones. */
struct tty_display_info the_only_display_info;
/* Support for DOS/V (allows Japanese characters to be displayed on
diff --git a/src/window.c b/src/window.c
index 7e2f52e12b1..7081df7de89 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6505,7 +6505,6 @@ init_window_once (void)
Vterminal_frame = selected_frame;
minibuf_window = f->minibuffer_window;
selected_window = f->selected_window;
- last_nonminibuf_frame = f;
window_initialized = 1;
}