(record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
(record_buffer): Remove unused local.
* frame.c (other_visible_frames, frame_buffer_list): Now static.
(set_frame_buffer_list): Remove; unused.
* frame.h (other_visible_frames): Remove decl.
* keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
* lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
(add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
if HAVE_GPM.
* menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
* process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
Define only if HAVE_GPM.
* widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
(update_hints_inhibit): Remove; never set. All uses removed.
* widgetprv.h (emacsFrameClassRec): Remove decl.
* window.c (delete_deletable_window): Now returns void, since it
wasn't returning anything.
(compare_window_configurations): Remove unused locals.
* xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
* xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is
implied by USE_GTK || USE_MOTIF.
(dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
the same widths as pointers. This follows up on the 2011-05-06 patch.
* xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
* xterm.h: Likewise.
(x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
+2011-06-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * buffer.c (Qclone_number): Remove for now, as it's unused.
+ (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
+ (record_buffer): Remove unused local.
+ * frame.c (other_visible_frames, frame_buffer_list): Now static.
+ (set_frame_buffer_list): Remove; unused.
+ * frame.h (other_visible_frames): Remove decl.
+ * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
+ * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
+ (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
+ if HAVE_GPM.
+ * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
+ * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
+ Define only if HAVE_GPM.
+ * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
+ (update_hints_inhibit): Remove; never set. All uses removed.
+ * widgetprv.h (emacsFrameClassRec): Remove decl.
+ * window.c (delete_deletable_window): Now returns void, since it
+ wasn't returning anything.
+ (compare_window_configurations): Remove unused locals.
+ * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
+ * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
+ Omit no-longer-needed #ifdef USE_X_TOOLKIT, since USE_X_TOOLKIT is
+ implied by USE_GTK || USE_MOTIF.
+ (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
+ the same widths as pointers. This follows up on the 2011-05-06 patch.
+ * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
+ * xterm.h: Likewise.
+ (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
+
2011-06-11 Martin Rudalics <rudalics@gmx.at>
* window.c (delete_deletable_window): Re-add.
Lisp_Object Qpriority, Qbefore_string, Qafter_string;
-static Lisp_Object Qclone_number, Qevaporate;
+static Lisp_Object Qevaporate;
Lisp_Object Qmodification_hooks;
Lisp_Object Qinsert_in_front_hooks;
void
record_buffer (Lisp_Object buffer)
{
- Lisp_Object aelt, link, tem;
+ Lisp_Object aelt, aelt_cons, tem;
register struct frame *f = XFRAME (selected_frame);
- register struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f));
CHECK_BUFFER (buffer);
tem = Vinhibit_quit;
Vinhibit_quit = Qt;
aelt = Frassq (buffer, Vbuffer_alist);
- link = Fmemq (aelt, Vbuffer_alist);
+ aelt_cons = Fmemq (aelt, Vbuffer_alist);
Vbuffer_alist = Fdelq (aelt, Vbuffer_alist);
- XSETCDR (link, Vbuffer_alist);
- Vbuffer_alist = link;
+ XSETCDR (aelt_cons, Vbuffer_alist);
+ Vbuffer_alist = aelt_cons;
Vinhibit_quit = tem;
/* Update buffer list of selected frame. */
Return BUFFER. */)
(Lisp_Object buffer)
{
- Lisp_Object aelt, link, tem;
+ Lisp_Object aelt, aelt_cons, tem;
register struct frame *f = XFRAME (selected_frame);
CHECK_BUFFER (buffer);
tem = Vinhibit_quit;
Vinhibit_quit = Qt;
aelt = Frassq (buffer, Vbuffer_alist);
- link = Fmemq (aelt, Vbuffer_alist);
+ aelt_cons = Fmemq (aelt, Vbuffer_alist);
Vbuffer_alist = Fdelq (aelt, Vbuffer_alist);
- XSETCDR (link, Qnil);
- Vbuffer_alist = nconc2 (Vbuffer_alist, link);
+ XSETCDR (aelt_cons, Qnil);
+ Vbuffer_alist = nconc2 (Vbuffer_alist, aelt_cons);
Vinhibit_quit = tem;
/* Update buffer lists of selected frame. */
0 if all frames aside from F are invisible.
(Exception: if F is the terminal frame, and we are using X, return 1.) */
-int
+static int
other_visible_frames (FRAME_PTR f)
{
/* We know the selected frame is visible,
/* Return the buffer-list of the selected frame. */
-Lisp_Object
+static Lisp_Object
frame_buffer_list (Lisp_Object frame)
{
return XFRAME (frame)->buffer_list;
}
-/* Set the buffer-list of the selected frame. */
-
-void
-set_frame_buffer_list (Lisp_Object frame, Lisp_Object list)
-{
- XFRAME (frame)->buffer_list = list;
-}
-
/* Discard BUFFER from the buffer-list and buried-buffer-list of each frame. */
void
struct kboard *,
Lisp_Object);
#endif /* HAVE_WINDOW_SYSTEM */
-extern int other_visible_frames (struct frame *);
extern void frame_make_pointer_invisible (void);
extern void frame_make_pointer_visible (void);
extern Lisp_Object delete_frame (Lisp_Object, Lisp_Object);
/* If non-nil, means that the global vars defined here are already in use.
Used to detect cases where we try to re-enter this non-reentrant code. */
+#if defined USE_GTK || defined USE_MOTIF
extern Lisp_Object menu_items_inuse;
+#endif
/* Number of slots currently allocated in menu_items. */
extern int menu_items_allocated;
EXFUN (Fmodify_frame_parameters, 2);
EXFUN (Fraise_frame, 1);
EXFUN (Fredirect_frame_focus, 2);
-extern Lisp_Object frame_buffer_list (Lisp_Object);
extern void frames_discard_buffer (Lisp_Object);
-extern void set_frame_buffer_list (Lisp_Object, Lisp_Object);
extern void syms_of_frame (void);
/* Defined in emacs.c */
int);
extern void add_keyboard_wait_descriptor (int);
extern void delete_keyboard_wait_descriptor (int);
+#ifdef HAVE_GPM
extern void add_gpm_wait_descriptor (int);
extern void delete_gpm_wait_descriptor (int);
+#endif
extern void close_process_descs (void);
extern void init_process (void);
extern void syms_of_process (void);
/* If non-nil, means that the global vars defined here are already in use.
Used to detect cases where we try to re-enter this non-reentrant code. */
+#if ! (defined USE_GTK || defined USE_MOTIF)
+static
+#endif
Lisp_Object menu_items_inuse;
/* Number of slots currently allocated in menu_items. */
\f
+# ifdef HAVE_GPM
+
void
add_gpm_wait_descriptor (int desc)
{
delete_keyboard_wait_descriptor (desc);
}
+# endif
+
# ifdef SIGIO
/* Return nonzero if *MASK has a bit set
static void EmacsFrameInitialize (Widget request, Widget new, ArgList dum1, Cardinal *dum2);
static void EmacsFrameDestroy (Widget widget);
static void EmacsFrameRealize (Widget widget, XtValueMask *mask, XSetWindowAttributes *attrs);
-void EmacsFrameResize (Widget widget);
+static void EmacsFrameResize (Widget widget);
static Boolean EmacsFrameSetValues (Widget cur_widget, Widget req_widget, Widget new_widget, ArgList dum1, Cardinal *dum2);
static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
";
*/
-EmacsFrameClassRec emacsFrameClassRec = {
+static EmacsFrameClassRec emacsFrameClassRec = {
{ /* core fields */
/* superclass */ &widgetClassRec,
/* class_name */ "EmacsFrame",
}
}
-/* Nonzero tells update_wm_hints not to do anything
- (the caller should call update_wm_hints explicitly later.) */
-int update_hints_inhibit;
-
static void
update_wm_hints (EmacsFrame ew)
{
int base_height;
int min_rows = 0, min_cols = 0;
- if (update_hints_inhibit)
- return;
-
#if 0
check_frame_size (ew->emacs_frame.frame, &min_rows, &min_cols);
#endif
UNBLOCK_INPUT;
}
-void
+static void
EmacsFrameResize (Widget widget)
{
EmacsFrame ew = (EmacsFrame)widget;
EmacsFrameClassPart emacs_frame_class;
} EmacsFrameClassRec;
-extern EmacsFrameClassRec emacsFrameClassRec; /* class pointer */
-
-
-
#endif /* _EmacsFrameP_h */
-
}
/* If WINDOW can be deleted, delete it. */
-static Lisp_Object
+static void
delete_deletable_window (Lisp_Object window)
{
if (!NILP (call1 (Qwindow_deletable_p, window)))
for (i = 0; i < sws1->header.size; i++)
{
struct saved_window *sw1, *sw2;
- int w1_is_current, w2_is_current;
sw1 = SAVED_WINDOW_N (sws1, i);
sw2 = SAVED_WINDOW_N (sws2, i);
x_set_scroll_bar_default_width (struct frame *f)
{
int wid = FRAME_COLUMN_WIDTH (f);
- int minw = 16;
- int width;
#ifdef USE_TOOLKIT_SCROLL_BARS
#ifdef USE_GTK
- minw = xg_get_default_scrollbar_width (f);
+ int minw = xg_get_default_scrollbar_width (f);
+#else
+ int minw = 16;
#endif
/* A minimum width of 14 doesn't look good for toolkit scroll bars. */
- width = minw + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
+ int width = minw + 2 * VERTICAL_SCROLL_BAR_WIDTH_TRIM;
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (width + wid - 1) / wid;
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = width;
#else
#ifndef MSDOS
+#if defined USE_GTK || defined USE_MOTIF
+
/* Set menu_items_inuse so no other popup menu or dialog is created. */
void
{
menu_items_inuse = in_use ? Qt : Qnil;
popup_activated_flag = in_use;
-#ifdef USE_X_TOOLKIT
if (popup_activated_flag)
x_activate_timeout_atimer ();
-#endif
}
+#endif
+
/* Wait for an X event to arrive or for a timer to expire. */
#ifndef USE_MOTIF
static void
dialog_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data)
{
- /* The EMACS_INT cast avoids a warning. There's no problem
+ /* Treat the pointer as an integer. There's no problem
as long as pointers have enough bits to hold small integers. */
- if ((int) (EMACS_INT) client_data != -1)
+ if ((intptr_t) client_data != -1)
menu_item_selection = (Lisp_Object *) client_data;
BLOCK_INPUT;
}
+#ifdef USE_LUCID
+
/* Allocate a color which is lighter or darker than *PIXEL by FACTOR
or DELTA. Try a color with RGB values multiplied by FACTOR first.
If this produces the same color as PIXEL, try a color where all RGB
return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
}
+#endif
+
/* Structure specifying which arguments should be passed by Xt to
cvt_string_to_pixel. We want the widget's screen and colormap. */
extern unsigned long x_copy_color (struct frame *, unsigned long);
#ifdef USE_X_TOOLKIT
extern XtAppContext Xt_app_con;
+extern void x_activate_timeout_atimer (void);
+#endif
+#ifdef USE_LUCID
extern int x_alloc_lighter_color_for_widget (Widget, Display *, Colormap,
unsigned long *,
double, int);
-extern void x_activate_timeout_atimer (void);
#endif
extern int x_alloc_nearest_color (struct frame *, Colormap, XColor *);
extern void x_query_colors (struct frame *f, XColor *, int);
/* Defined in xmenu.c */
+#if defined USE_GTK || defined USE_MOTIF
extern void x_menu_set_in_use (int);
+#endif
#ifdef USE_MOTIF
extern void x_menu_wait_for_event (void *data);
#endif