aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2005-04-19 13:33:31 +0000
committerKaroly Lorentey <[email protected]>2005-04-19 13:33:31 +0000
commit8d6f9bce72ee94ed6c297b79a181eac3f5beca74 (patch)
tree36cf3b6a5923171e371f9236eab36ad7de742b48 /src
parent774a8da14bb2520b6adad223ab13f0b64f002872 (diff)
parentcd01ded928a8d082b9dbed6e9747c3d31b337b71 (diff)
Merged from [email protected] (patch 66, 266-268)
Patches applied: * [email protected]/emacs--cvs-trunk--0--patch-266 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-267 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-268 Merge from gnus--rel--5.10 * [email protected]/gnus--rel--5.10--patch-66 Update from CVS git-archimport-id: [email protected]/emacs--multi-tty--0--patch-330
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog53
-rw-r--r--src/dispextern.h8
-rw-r--r--src/dispnew.c6
-rw-r--r--src/fns.c4
-rw-r--r--src/fringe.c16
-rw-r--r--src/lread.c6
-rw-r--r--src/macterm.c6
-rw-r--r--src/window.c1
-rw-r--r--src/window.h3
-rw-r--r--src/xdisp.c52
-rw-r--r--src/xfaces.c5
-rw-r--r--src/xmenu.c10
12 files changed, 110 insertions, 60 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3483a2c590..ac7d5fb07f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,55 @@
+2005-04-18 Kim F. Storm <[email protected]>
+
+ * dispextern.h (struct glyph_row): New member overlay_arrow_bitmap.
+ It replaces the corresponding member from struct window, as a
+ window may now show multiple overlay arrows.
+ Remove member overlay_arrow_p, superseeded by overlay_arrow_bitmap.
+
+ * dispnew.c (row_equal_p, update_window_line, scrolling_window):
+ Compare overlay_arrow_bitmap than overlay_arrow_p members.
+
+ * fringe.c (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
+ rather than from window.
+ (update_window_fringes): Compare overlay_arrow_bitmap rather than
+ overlay_arrow_p members.
+ (Ffringe_bitmaps_at_pos): Return fringe overlay_arrow_bitmap name
+ if not default.
+
+ * window.h (struct window): Remove member overlay_arrow_bitmap.
+
+ * window.c (make_window): Don't initialize overlay_arrow_bitmap.
+
+ * xdisp.c (overlay_arrow_string_or_property): Remove PBITMAP arg.
+ Calls changed. Don't check for overlay-arrow-bitmap property here.
+ (overlay_arrow_at_row): Remove PBITMAP arg. Instead, if left
+ fringe is present, return Lisp integer for bitmap (or -1 for default).
+ Fix value of overlay-arrow-bitmap property to be a symbol, use
+ lookup_fringe_bitmap to parse it.
+ (display_line): Change call to overlay_arrow_at_row. Store integer
+ return value as overlay bitmap in row rather than window.
+ Only show overlay arrow if row displays text, or if no other overlay
+ arrow is seen in window (if overlay marker is at point-max).
+
+2005-04-18 Thien-Thi Nguyen <[email protected]>
+
+ * xfaces.c (realize_x_face) [!HAVE_WINDOW_SYSTEM]: Return NULL.
+
+2005-04-18 Lute Kamstra <[email protected]>
+
+ * lread.c (Vloads_in_progress): Static.
+ * fns.c (Vloads_in_progress): Remove extern.
+ (load_in_progress): Add extern.
+ (Frequire): Use load_in_progress instead of Vloads_in_progress.
+
+2005-04-18 Thien-Thi Nguyen <[email protected]>
+
+ * xmenu.c (Fx_popup_menu): Initialize error_name to NULL.
+
+2005-04-18 YAMAMOTO Mitsuharu <[email protected]>
+
+ * macterm.c (XTread_socket): Don't beep on keyboard input even if
+ no frame is visible.
+
2005-04-16 Dan Nicolaescu <[email protected]>
* term.c (struct keys): Add support for shifted keys.
@@ -110,7 +162,6 @@
into "(any string)".
* lread.c (Vloads_in_progress): Not static.
-
* fns.c (Vloads_in_progress): Add extern.
(Frequire): Don't do LOADHIST_ATTACH if Vloads_in_progress is nil.
diff --git a/src/dispextern.h b/src/dispextern.h
index fbc816865b..abcda4fc73 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -726,6 +726,11 @@ struct glyph_row
position of the next row. */
struct display_pos end;
+ /* Non-zero means the overlay arrow bitmap is on this line.
+ -1 means use default overlay arrow bitmap, else
+ it specifies actual fringe bitmap number. */
+ int overlay_arrow_bitmap;
+
/* Left fringe bitmap number (enum fringe_bitmap_type). */
unsigned left_user_fringe_bitmap : FRINGE_ID_BITS;
@@ -764,9 +769,6 @@ struct glyph_row
unsigned truncated_on_left_p : 1;
unsigned truncated_on_right_p : 1;
- /* 1 means the overlay arrow is on this line. */
- unsigned overlay_arrow_p : 1;
-
/* 1 means that this row displays a continued line, i.e. it has a
continuation mark at the right side. */
unsigned continued_p : 1;
diff --git a/src/dispnew.c b/src/dispnew.c
index f549a8dde9..d7b5590c53 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1506,7 +1506,7 @@ row_equal_p (w, a, b, mouse_face_p)
|| a->left_fringe_face_id != b->left_fringe_face_id
|| a->right_fringe_bitmap != b->right_fringe_bitmap
|| a->right_fringe_face_id != b->right_fringe_face_id
- || a->overlay_arrow_p != b->overlay_arrow_p
+ || a->overlay_arrow_bitmap != b->overlay_arrow_bitmap
|| a->exact_window_width_line_p != b->exact_window_width_line_p
|| a->overlapped_p != b->overlapped_p
|| (MATRIX_ROW_CONTINUATION_LINE_P (a)
@@ -4539,7 +4539,7 @@ update_window_line (w, vpos, mouse_face_overwritten_p)
|| desired_row->y != current_row->y
|| desired_row->visible_height != current_row->visible_height
|| desired_row->cursor_in_fringe_p != current_row->cursor_in_fringe_p
- || desired_row->overlay_arrow_p != current_row->overlay_arrow_p
+ || desired_row->overlay_arrow_bitmap != current_row->overlay_arrow_bitmap
|| current_row->redraw_fringe_bitmaps_p
|| desired_row->mode_line_p != current_row->mode_line_p
|| desired_row->exact_window_width_line_p != current_row->exact_window_width_line_p
@@ -5051,7 +5051,7 @@ scrolling_window (w, header_line_p)
|| to->right_fringe_bitmap != from->right_fringe_bitmap
|| to->left_fringe_face_id != from->left_fringe_face_id
|| to->right_fringe_face_id != from->right_fringe_face_id
- || to->overlay_arrow_p != from->overlay_arrow_p))
+ || to->overlay_arrow_bitmap != from->overlay_arrow_bitmap))
from->redraw_fringe_bitmaps_p = 1;
assign_row (to, from);
to->enabled_p = 1, from->enabled_p = 0;
diff --git a/src/fns.c b/src/fns.c
index e921579f79..daa9e10c46 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -66,7 +66,7 @@ int use_file_dialog;
extern int minibuffer_auto_raise;
extern Lisp_Object minibuf_window;
extern Lisp_Object Vlocale_coding_system;
-extern Lisp_Object Vloads_in_progress;
+extern int load_in_progress;
Lisp_Object Qstring_lessp, Qprovide, Qrequire;
Lisp_Object Qyes_or_no_p_history;
@@ -3460,7 +3460,7 @@ The normal messages at start and end of loading FILENAME are suppressed. */)
even if the feature specified is already loaded.
But not more than once in any file,
and not when we aren't loading a file. */
- if (! NILP (Vloads_in_progress))
+ if (load_in_progress)
{
tem = Fcons (Qrequire, feature);
if (NILP (Fmember (tem, Vcurrent_load_list)))
diff --git a/src/fringe.c b/src/fringe.c
index 39479dfed2..19e6e60d11 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -700,11 +700,11 @@ draw_fringe_bitmap (w, row, left_p)
draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP);
- if (left_p && row->overlay_arrow_p)
+ if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
draw_fringe_bitmap_1 (w, row, 1, 1,
- (w->overlay_arrow_bitmap
- ? w->overlay_arrow_bitmap
- : OVERLAY_ARROW_BITMAP));
+ (row->overlay_arrow_bitmap < 0
+ ? OVERLAY_ARROW_BITMAP
+ : row->overlay_arrow_bitmap));
}
@@ -960,10 +960,10 @@ update_window_fringes (w, force_p)
cur->right_fringe_face_id = right_face_id;
}
- if (row->overlay_arrow_p != cur->overlay_arrow_p)
+ if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
{
redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
- cur->overlay_arrow_p = row->overlay_arrow_p;
+ cur->overlay_arrow_bitmap = row->overlay_arrow_bitmap;
}
row->left_fringe_bitmap = left;
@@ -1414,7 +1414,9 @@ Return nil if POS is not visible in WINDOW. */)
if (row)
return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap),
get_fringe_bitmap_name (row->right_fringe_bitmap),
- (row->overlay_arrow_p ? Qt : Qnil));
+ (row->overlay_arrow_bitmap == 0 ? Qnil
+ : row->overlay_arrow_bitmap < 0 ? Qt
+ : get_fringe_bitmap_name (row->overlay_arrow_bitmap)));
else
return Qnil;
}
diff --git a/src/lread.c b/src/lread.c
index d36d45c8c7..869e95a00e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1,6 +1,6 @@
/* Lisp parsing and input streams.
Copyright (C) 1985, 1986, 1987, 1988, 1989, 1993, 1994, 1995, 1997, 1998,
- 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -90,7 +90,7 @@ Lisp_Object Qinhibit_file_name_operation;
extern Lisp_Object Qevent_symbol_element_mask;
extern Lisp_Object Qfile_exists_p;
-/* non-zero if inside `load' */
+/* non-zero iff inside `load' */
int load_in_progress;
/* Directory in which the sources were found. */
@@ -194,7 +194,7 @@ static int new_backquote_flag;
/* A list of file names for files being loaded in Fload. Used to
check for recursive loads. */
-Lisp_Object Vloads_in_progress;
+static Lisp_Object Vloads_in_progress;
/* Non-zero means load dangerous compiled Lisp files. */
diff --git a/src/macterm.c b/src/macterm.c
index 5aab6ec536..7bef378b59 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -8590,13 +8590,15 @@ XTread_socket (sd, expected, hold_quit)
struct frame *f = mac_focus_frame (dpyinfo);
WindowPtr window_ptr;
- if (!f)
+#if 0
+ if (dpyinfo->x_focus_frame == NULL)
{
/* Beep if wheel move occurs when all the frames
are invisible. */
SysBeep(1);
break;
}
+#endif
GetEventParameter(eventRef, kEventParamMouseWheelDelta,
typeSInt32, NULL, sizeof (SInt32),
@@ -9011,6 +9013,7 @@ XTread_socket (sd, expected, hold_quit)
break;
#endif
+#if 0
if (dpyinfo->x_focus_frame == NULL)
{
/* Beep if keyboard input occurs when all the frames
@@ -9018,6 +9021,7 @@ XTread_socket (sd, expected, hold_quit)
SysBeep (1);
break;
}
+#endif
{
static SInt16 last_key_script = -1;
diff --git a/src/window.c b/src/window.c
index a1b3c879bb..86c16ff571 100644
--- a/src/window.c
+++ b/src/window.c
@@ -288,7 +288,6 @@ make_window ()
p->fringes_outside_margins = Qnil;
p->scroll_bar_width = Qnil;
p->vertical_scroll_bar_type = Qt;
- p->overlay_arrow_bitmap = 0;
Vwindow_list = Qnil;
return val;
diff --git a/src/window.h b/src/window.h
index 8df0b6bb3e..493b5aa948 100644
--- a/src/window.h
+++ b/src/window.h
@@ -259,9 +259,6 @@ struct window
/* This is handy for undrawing the cursor. */
int phys_cursor_ascent, phys_cursor_height;
- /* Alternate overlay-arrow-bitmap in this window. */
- int overlay_arrow_bitmap;
-
/* Non-zero means the cursor is currently displayed. This can be
set to zero by functions overpainting the cursor image. */
unsigned phys_cursor_on_p : 1;
diff --git a/src/xdisp.c b/src/xdisp.c
index c832f1fa5e..12ee4fef7d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9638,22 +9638,14 @@ redisplay ()
static Lisp_Object
-overlay_arrow_string_or_property (var, pbitmap)
+overlay_arrow_string_or_property (var)
Lisp_Object var;
- int *pbitmap;
{
- Lisp_Object pstr = Fget (var, Qoverlay_arrow_string);
- Lisp_Object bitmap;
+ Lisp_Object val;
- if (pbitmap)
- {
- *pbitmap = 0;
- if (bitmap = Fget (var, Qoverlay_arrow_bitmap), INTEGERP (bitmap))
- *pbitmap = XINT (bitmap);
- }
+ if (val = Fget (var, Qoverlay_arrow_string), STRINGP (val))
+ return val;
- if (!NILP (pstr))
- return pstr;
return Voverlay_arrow_string;
}
@@ -9703,7 +9695,7 @@ overlay_arrows_changed_p ()
continue;
if (! EQ (COERCE_MARKER (val),
Fget (var, Qlast_arrow_position))
- || ! (pstr = overlay_arrow_string_or_property (var, 0),
+ || ! (pstr = overlay_arrow_string_or_property (var),
EQ (pstr, Fget (var, Qlast_arrow_string))))
return 1;
}
@@ -9733,7 +9725,7 @@ update_overlay_arrows (up_to_date)
Fput (var, Qlast_arrow_position,
COERCE_MARKER (val));
Fput (var, Qlast_arrow_string,
- overlay_arrow_string_or_property (var, 0));
+ overlay_arrow_string_or_property (var));
}
else if (up_to_date < 0
|| !NILP (Fget (var, Qlast_arrow_position)))
@@ -9746,14 +9738,13 @@ update_overlay_arrows (up_to_date)
/* Return overlay arrow string to display at row.
- Return t if display as bitmap in left fringe.
+ Return integer (bitmap number) for arrow bitmap in left fringe.
Return nil if no overlay arrow. */
static Lisp_Object
-overlay_arrow_at_row (it, row, pbitmap)
+overlay_arrow_at_row (it, row)
struct it *it;
struct glyph_row *row;
- int *pbitmap;
{
Lisp_Object vlist;
@@ -9773,17 +9764,21 @@ overlay_arrow_at_row (it, row, pbitmap)
&& current_buffer == XMARKER (val)->buffer
&& (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
{
- val = overlay_arrow_string_or_property (var, pbitmap);
if (FRAME_WINDOW_P (it->f)
&& WINDOW_LEFT_FRINGE_WIDTH (it->w) > 0)
- return Qt;
- if (STRINGP (val))
- return val;
- break;
+ {
+ if (val = Fget (var, Qoverlay_arrow_bitmap), SYMBOLP (val))
+ {
+ int fringe_bitmap;
+ if ((fringe_bitmap = lookup_fringe_bitmap (val)) != 0)
+ return make_number (fringe_bitmap);
+ }
+ return make_number (-1); /* Use default arrow bitmap */
+ }
+ return overlay_arrow_string_or_property (var);
}
}
- *pbitmap = 0;
return Qnil;
}
@@ -14847,7 +14842,6 @@ display_line (it)
struct it *it;
{
struct glyph_row *row = it->glyph_row;
- int overlay_arrow_bitmap;
Lisp_Object overlay_arrow_string;
/* We always start displaying at hpos zero even if hscrolled. */
@@ -15255,9 +15249,9 @@ display_line (it)
mark this glyph row as the one containing the overlay arrow.
This is clearly a mess with variable size fonts. It would be
better to let it be displayed like cursors under X. */
- if ((overlay_arrow_string
- = overlay_arrow_at_row (it, row, &overlay_arrow_bitmap),
- !NILP (overlay_arrow_string)))
+ if ((row->displays_text_p || !overlay_arrow_seen)
+ && (overlay_arrow_string = overlay_arrow_at_row (it, row),
+ !NILP (overlay_arrow_string)))
{
/* Overlay arrow in window redisplay is a fringe bitmap. */
if (STRINGP (overlay_arrow_string))
@@ -15287,8 +15281,8 @@ display_line (it)
}
else
{
- it->w->overlay_arrow_bitmap = overlay_arrow_bitmap;
- row->overlay_arrow_p = 1;
+ xassert (INTEGERP (overlay_arrow_string));
+ row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
}
overlay_arrow_seen = 1;
}
diff --git a/src/xfaces.c b/src/xfaces.c
index 51dcfb144d..89267c8f7f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -7115,8 +7115,9 @@ realize_x_face (cache, attrs, c, base_face)
int c;
struct face *base_face;
{
+ struct face *face = NULL;
#ifdef HAVE_WINDOW_SYSTEM
- struct face *face, *default_face;
+ struct face *default_face;
struct frame *f;
Lisp_Object stipple, overline, strike_through, box;
@@ -7312,8 +7313,8 @@ realize_x_face (cache, attrs, c, base_face)
face->stipple = load_pixmap (f, stipple, &face->pixmap_w, &face->pixmap_h);
xassert (FACE_SUITABLE_FOR_CHAR_P (face, c));
- return face;
#endif /* HAVE_WINDOW_SYSTEM */
+ return face;
}
diff --git a/src/xmenu.c b/src/xmenu.c
index b29b74b6e4..f32074c2f6 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -771,7 +771,7 @@ cached information about equivalent key sequences. */)
Lisp_Object keymap, tem;
int xpos = 0, ypos = 0;
Lisp_Object title;
- char *error_name;
+ char *error_name = NULL;
Lisp_Object selection;
FRAME_PTR f = NULL;
Lisp_Object x, y, window;
@@ -2483,7 +2483,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
break;
}
-
+
/* Display the menu. */
gtk_widget_show_all (menu);
gtk_menu_popup (GTK_MENU (menu), 0, 0, pos_func, &popup_x_y, i, 0);
@@ -2601,7 +2601,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
/* Display the menu. */
lw_popup_menu (menu, (XEvent *) &dummy);
popup_activated_flag = 1;
-
+
{
int fact = 4 * sizeof (LWLIB_ID);
int specpdl_count = SPECPDL_INDEX ();
@@ -3225,7 +3225,7 @@ pop_down_menu (arg)
{
struct Lisp_Save_Value *p1 = XSAVE_VALUE (Fcar (arg));
struct Lisp_Save_Value *p2 = XSAVE_VALUE (Fcdr (arg));
-
+
FRAME_PTR f = p1->pointer;
XMenu *menu = p2->pointer;
@@ -3459,7 +3459,7 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
#ifndef MSDOS
XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f));
#endif
-
+
record_unwind_protect (pop_down_menu,
Fcons (make_save_value (f, 0),
make_save_value (menu, 0)));