aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey <[email protected]>2005-03-23 10:40:00 +0000
committerKaroly Lorentey <[email protected]>2005-03-23 10:40:00 +0000
commit76acbdc50490034f233bc78d14a7cd5717d9432e (patch)
tree9b46877d371dad83ff6cdad30cd69df2a050de7d /src
parent335fcf6c2f6ae8990d8c62589cfb3558c3f38bc0 (diff)
parent8725c7925ef1ce95efb1f50d48d17f437e9c46a4 (diff)
Merged from [email protected] (patch 192-203)
Patches applied: * [email protected]/emacs--cvs-trunk--0--patch-192 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-193 Use gdb-ui breakpoint faces on ttys too * [email protected]/emacs--cvs-trunk--0--patch-194 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-195 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-196 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-197 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-198 Tweak gdb-ui breakpoint faces * [email protected]/emacs--cvs-trunk--0--patch-199 Tweak gdb-ui breakpoint faces * [email protected]/emacs--cvs-trunk--0--patch-200 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-201 Tweak info/.arch-inventory to identify info/.cvsignore as source * [email protected]/emacs--cvs-trunk--0--patch-202 Update from CVS * [email protected]/emacs--cvs-trunk--0--patch-203 Update from CVS git-archimport-id: [email protected]/emacs--multi-tty--0--patch-316
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog45
-rw-r--r--src/dispextern.h2
-rw-r--r--src/frame.c27
-rw-r--r--src/fringe.c6
-rw-r--r--src/keyboard.c23
-rw-r--r--src/msdos.c8
-rw-r--r--src/s/openbsd.h7
-rw-r--r--src/textprop.c18
-rw-r--r--src/unexec.c195
-rw-r--r--src/xdisp.c3
-rw-r--r--src/xfaces.c6
-rw-r--r--src/xrdb.c6
12 files changed, 199 insertions, 147 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 92be15873c..2354e59784 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,49 @@
+2005-03-22 Kim F. Storm <[email protected]>
+
+ * xfaces.c (lookup_derived_face): Add arg SIGNAL_P.
+ * dispextern.h (lookup_derived_face): Fix prototype.
+ * msdos.c (XMenuActivate): Fix call to lookup_derived_face.
+
+ * xdisp.c (handle_single_display_spec): Derive left-fringe and
+ right-fringe face from fringe face.
+
+ * fringe.c (draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
+ Derive face from fringe face.
+
+2005-03-22 Jan Dj,Ad(Brv <[email protected]>
+
+ * xrdb.c (x_load_resources): Undo previous change (2005-03-18).
+
+2005-03-22 David Kastrup <[email protected]>
+
+ * textprop.c (Fnext_char_property_change)
+ (Fprevious_char_property_change): allow marker as limit.
+ (Fnext_single_char_property_change)
+ (Fprevious_single_char_property_change): Check that limit is a
+ number in strings.
+ (Fnext_single_char_property_change): Coerce position to integer.
+ (Fprevious_single_char_property_change): Same here.
+
+2005-03-21 Thien-Thi Nguyen <[email protected]>
+
+ * s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Define if undefined.
+
+2005-03-19 Stefan Monnier <[email protected]>
+
+ * frame.c (Fignore_event): Remove.
+ (syms_of_frame): Don't defsubr it.
+
+ * keyboard.c (keys_of_keyboard): Just use `ignore' instead of the
+ redundant `ignore-event'.
+
+2005-03-19 Eli Zaretskii <[email protected]>
+
+ * unexec.c (write_segment, unexec): Move these functions to avoid
+ forward references (which cause errors with "gcc -gcoff").
+
2005-03-18 Jan Dj,Ad(Brv <[email protected]>
- * xfns.c (x_create_tip_frame): Removed setting of Vx_resource_name so
+ * xfns.c (x_create_tip_frame): Remove setting of Vx_resource_name so
that it doesn't become "tooltip". The specbind is enough.
* xrdb.c (x_load_resources): Use different char *helv when I18N
diff --git a/src/dispextern.h b/src/dispextern.h
index 8861a9705c..fbc816865b 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2770,7 +2770,7 @@ int lookup_face P_ ((struct frame *, Lisp_Object *, int, struct face *));
int lookup_named_face P_ ((struct frame *, Lisp_Object, int, int));
int smaller_face P_ ((struct frame *, int, int));
int face_with_height P_ ((struct frame *, int, int));
-int lookup_derived_face P_ ((struct frame *, Lisp_Object, int, int));
+int lookup_derived_face P_ ((struct frame *, Lisp_Object, int, int, int));
void init_frame_faces P_ ((struct frame *));
void free_frame_faces P_ ((struct frame *));
void recompute_basic_faces P_ ((struct frame *));
diff --git a/src/frame.c b/src/frame.c
index 6c8f837bbd..40be721078 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -943,32 +943,6 @@ to that frame. */)
return do_switch_frame (event, 0, 0);
}
-DEFUN ("ignore-event", Fignore_event, Signore_event, 0, 0, "",
- doc: /* Do nothing.
-This is a suitable binding for `iconify-frame' and `make-frame-visible'. */)
- ()
-{
- /* Contrary to `handle-switch-frame', `ignore-event' is used from
- `special-event-map'. Commands from that map are run in a special
- way that automatically preserves the prefix-arg. Restoring
- the prefix arg here is not just redundant but harmful:
- - C-u C-x v =
- - current-prefix-arg is set to non-nil, prefix-arg is set to nil.
- - after the first prompt, the exit-minibuffer-hook is run which may
- iconify a frame and thus push a `iconify-frame' event.
- - after running exit-minibuffer-hook, current-prefix-arg is
- restored to the non-nil value it had before the prompt.
- - we enter the second prompt.
- current-prefix-arg is non-nil, prefix-arg is nil.
- - before running the first real event, we run the special iconify-frame
- event, but we pass the `special' arg to execute-command so
- current-prefix-arg and prefix-arg are left untouched.
- - here we foolishly copy the non-nil current-prefix-arg to prefix-arg.
- - the next key event will have a spuriously non-nil current-prefix-arg.
- current_kboard->Vprefix_arg = Vcurrent_prefix_arg; */
- return Qnil;
-}
-
DEFUN ("selected-frame", Fselected_frame, Sselected_frame, 0, 0, 0,
doc: /* Return the frame that is now selected. */)
()
@@ -4376,7 +4350,6 @@ This variable is local to the current terminal and cannot be buffer-local. */);
defsubr (&Swindow_system);
defsubr (&Smake_terminal_frame);
defsubr (&Shandle_switch_frame);
- defsubr (&Signore_event);
defsubr (&Sselect_frame);
defsubr (&Sselected_frame);
defsubr (&Swindow_frame);
diff --git a/src/fringe.c b/src/fringe.c
index 5344d58737..39479dfed2 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -552,7 +552,8 @@ draw_fringe_bitmap_1 (w, row, left_p, overlay, which)
Lisp_Object face;
if ((face = fringe_faces[which], NILP (face))
- || (face_id = lookup_named_face (f, face, 'A', 1), face_id < 0))
+ || (face_id = lookup_derived_face (f, face, 'A', FRINGE_FACE_ID, 0),
+ face_id < 0))
face_id = FRINGE_FACE_ID;
}
@@ -1366,7 +1367,8 @@ If FACE is nil, reset face to default fringe face. */)
if (!NILP (face))
{
- face_id = lookup_named_face (SELECTED_FRAME (), face, 'A', 1);
+ face_id = lookup_derived_face (SELECTED_FRAME (), face,
+ 'A', FRINGE_FACE_ID, 1);
if (face_id < 0)
error ("No such face");
}
diff --git a/src/keyboard.c b/src/keyboard.c
index 9291fd990d..f29a7676d3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11562,10 +11562,29 @@ keys_of_keyboard ()
initial_define_lispy_key (Vspecial_event_map, "delete-frame",
"handle-delete-frame");
+ /* Here we used to use `ignore-event' which would simple set prefix-arg to
+ current-prefix-arg, as is done in `handle-switch-frame'.
+ But `handle-switch-frame is not run from the special-map.
+ Commands from that map are run in a special way that automatically
+ preserves the prefix-arg. Restoring the prefix arg here is not just
+ redundant but harmful:
+ - C-u C-x v =
+ - current-prefix-arg is set to non-nil, prefix-arg is set to nil.
+ - after the first prompt, the exit-minibuffer-hook is run which may
+ iconify a frame and thus push a `iconify-frame' event.
+ - after running exit-minibuffer-hook, current-prefix-arg is
+ restored to the non-nil value it had before the prompt.
+ - we enter the second prompt.
+ current-prefix-arg is non-nil, prefix-arg is nil.
+ - before running the first real event, we run the special iconify-frame
+ event, but we pass the `special' arg to execute-command so
+ current-prefix-arg and prefix-arg are left untouched.
+ - here we foolishly copy the non-nil current-prefix-arg to prefix-arg.
+ - the next key event will have a spuriously non-nil current-prefix-arg. */
initial_define_lispy_key (Vspecial_event_map, "iconify-frame",
- "ignore-event");
+ "ignore");
initial_define_lispy_key (Vspecial_event_map, "make-frame-visible",
- "ignore-event");
+ "ignore");
/* Handling it at such a low-level causes read_key_sequence to get
* confused because it doesn't realize that the current_buffer was
* changed by read_char.
diff --git a/src/msdos.c b/src/msdos.c
index ab71b642e8..e17e79a6d1 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -3799,15 +3799,15 @@ XMenuActivate (Display *foo, XMenu *menu, int *pane, int *selidx,
screensize = screen_size * 2;
faces[0]
= lookup_derived_face (sf, intern ("msdos-menu-passive-face"),
- 0, DEFAULT_FACE_ID);
+ 0, DEFAULT_FACE_ID, 1);
faces[1]
= lookup_derived_face (sf, intern ("msdos-menu-active-face"),
- 0, DEFAULT_FACE_ID);
+ 0, DEFAULT_FACE_ID, 1);
selectface = intern ("msdos-menu-select-face");
faces[2] = lookup_derived_face (sf, selectface,
- 0, faces[0]);
+ 0, faces[0], 1);
faces[3] = lookup_derived_face (sf, selectface,
- 0, faces[1]);
+ 0, faces[1], 1);
/* Make sure the menu title is always displayed with
`msdos-menu-active-face', no matter where the mouse pointer is. */
diff --git a/src/s/openbsd.h b/src/s/openbsd.h
index d3730324ce..39e48da39a 100644
--- a/src/s/openbsd.h
+++ b/src/s/openbsd.h
@@ -3,6 +3,13 @@
/* Mostly the same as NetBSD. */
#include "netbsd.h"
+/* This very-badly named symbol is conditionally defined in netbsd.h.
+ Better would be either to not need it in the first place, or to choose
+ a more descriptive name. */
+#ifndef LD_SWITCH_SYSTEM_tmp
+#define LD_SWITCH_SYSTEM_tmp /* empty */
+#endif
+
/* David Mazieres <[email protected]> says this
is necessary. Otherwise Emacs dumps core when run -nw. */
#undef LIBS_TERMCAP
diff --git a/src/textprop.c b/src/textprop.c
index 317f8fa6aa..e6dd411dcc 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -729,7 +729,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
temp = Fnext_overlay_change (position);
if (! NILP (limit))
{
- CHECK_NUMBER (limit);
+ CHECK_NUMBER_COERCE_MARKER (limit);
if (XINT (limit) < XINT (temp))
temp = limit;
}
@@ -754,7 +754,7 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
temp = Fprevious_overlay_change (position);
if (! NILP (limit))
{
- CHECK_NUMBER (limit);
+ CHECK_NUMBER_COERCE_MARKER (limit);
if (XINT (limit) > XINT (temp))
temp = limit;
}
@@ -787,7 +787,10 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
if (NILP (limit))
position = make_number (SCHARS (object));
else
- position = limit;
+ {
+ CHECK_NUMBER (limit);
+ position = limit;
+ }
}
}
else
@@ -804,6 +807,8 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
Fset_buffer (object);
}
+ CHECK_NUMBER_COERCE_MARKER (position);
+
initial_value = Fget_char_property (position, prop, object);
if (NILP (limit))
@@ -856,7 +861,10 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
if (NILP (limit))
position = make_number (SCHARS (object));
else
- position = limit;
+ {
+ CHECK_NUMBER (limit);
+ position = limit;
+ }
}
}
else
@@ -872,6 +880,8 @@ back past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
Fset_buffer (object);
}
+ CHECK_NUMBER_COERCE_MARKER (position);
+
if (NILP (limit))
XSETFASTINT (limit, BUF_BEGV (current_buffer));
else
diff --git a/src/unexec.c b/src/unexec.c
index dadea560e0..156cad16f9 100644
--- a/src/unexec.c
+++ b/src/unexec.c
@@ -368,48 +368,6 @@ static int copy_sym ();
static void mark_x ();
/* ****************************************************************
- * unexec
- *
- * driving logic.
- */
-unexec (new_name, a_name, data_start, bss_start, entry_address)
- char *new_name, *a_name;
- unsigned data_start, bss_start, entry_address;
-{
- int new, a_out = -1;
-
- if (a_name && (a_out = open (a_name, O_RDONLY)) < 0)
- {
- PERROR (a_name);
- }
- if ((new = creat (new_name, 0666)) < 0)
- {
- PERROR (new_name);
- }
-
- if (make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) < 0
- || copy_text_and_data (new, a_out) < 0
- || copy_sym (new, a_out, a_name, new_name) < 0
-#ifdef COFF
-#ifndef COFF_BSD_SYMBOLS
- || adjust_lnnoptrs (new, a_out, new_name) < 0
-#endif
-#endif
- )
- {
- close (new);
- /* unlink (new_name); /* Failed, unlink new a.out */
- return -1;
- }
-
- close (new);
- if (a_out >= 0)
- close (a_out);
- mark_x (new_name);
- return 0;
-}
-
-/* ****************************************************************
* make_hdr
*
* Make the header in the new a.out from the header in core.
@@ -835,6 +793,61 @@ make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name)
#endif /* not COFF */
}
+write_segment (new, ptr, end)
+ int new;
+ register char *ptr, *end;
+{
+ register int i, nwrite, ret;
+ char buf[80];
+#ifndef USE_CRT_DLL
+ extern int errno;
+#endif
+ /* This is the normal amount to write at once.
+ It is the size of block that NFS uses. */
+ int writesize = 1 << 13;
+ int pagesize = getpagesize ();
+ char zeros[1 << 13];
+
+ bzero (zeros, sizeof (zeros));
+
+ for (i = 0; ptr < end;)
+ {
+ /* Distance to next multiple of writesize. */
+ nwrite = (((int) ptr + writesize) & -writesize) - (int) ptr;
+ /* But not beyond specified end. */
+ if (nwrite > end - ptr) nwrite = end - ptr;
+ ret = write (new, ptr, nwrite);
+ /* If write gets a page fault, it means we reached
+ a gap between the old text segment and the old data segment.
+ This gap has probably been remapped into part of the text segment.
+ So write zeros for it. */
+ if (ret == -1
+#ifdef EFAULT
+ && errno == EFAULT
+#endif
+ )
+ {
+ /* Write only a page of zeros at once,
+ so that we we don't overshoot the start
+ of the valid memory in the old data segment. */
+ if (nwrite > pagesize)
+ nwrite = pagesize;
+ write (new, zeros, nwrite);
+ }
+#if 0 /* Now that we have can ask `write' to write more than a page,
+ it is legit for write do less than the whole amount specified. */
+ else if (nwrite != ret)
+ {
+ sprintf (buf,
+ "unexec write failure: addr 0x%x, fileno %d, size 0x%x, wrote 0x%x, errno %d",
+ ptr, new, nwrite, ret, errno);
+ PERROR (buf);
+ }
+#endif
+ i += nwrite;
+ ptr += nwrite;
+ }
+}
/* ****************************************************************
* copy_text_and_data
*
@@ -1060,62 +1073,6 @@ copy_text_and_data (new, a_out)
return 0;
}
-
-write_segment (new, ptr, end)
- int new;
- register char *ptr, *end;
-{
- register int i, nwrite, ret;
- char buf[80];
-#ifndef USE_CRT_DLL
- extern int errno;
-#endif
- /* This is the normal amount to write at once.
- It is the size of block that NFS uses. */
- int writesize = 1 << 13;
- int pagesize = getpagesize ();
- char zeros[1 << 13];
-
- bzero (zeros, sizeof (zeros));
-
- for (i = 0; ptr < end;)
- {
- /* Distance to next multiple of writesize. */
- nwrite = (((int) ptr + writesize) & -writesize) - (int) ptr;
- /* But not beyond specified end. */
- if (nwrite > end - ptr) nwrite = end - ptr;
- ret = write (new, ptr, nwrite);
- /* If write gets a page fault, it means we reached
- a gap between the old text segment and the old data segment.
- This gap has probably been remapped into part of the text segment.
- So write zeros for it. */
- if (ret == -1
-#ifdef EFAULT
- && errno == EFAULT
-#endif
- )
- {
- /* Write only a page of zeros at once,
- so that we we don't overshoot the start
- of the valid memory in the old data segment. */
- if (nwrite > pagesize)
- nwrite = pagesize;
- write (new, zeros, nwrite);
- }
-#if 0 /* Now that we have can ask `write' to write more than a page,
- it is legit for write do less than the whole amount specified. */
- else if (nwrite != ret)
- {
- sprintf (buf,
- "unexec write failure: addr 0x%x, fileno %d, size 0x%x, wrote 0x%x, errno %d",
- ptr, new, nwrite, ret, errno);
- PERROR (buf);
- }
-#endif
- i += nwrite;
- ptr += nwrite;
- }
-}
/* ****************************************************************
* copy_sym
@@ -1264,6 +1221,48 @@ adjust_lnnoptrs (writedesc, readdesc, new_name)
#endif /* COFF */
+/* ****************************************************************
+ * unexec
+ *
+ * driving logic.
+ */
+unexec (new_name, a_name, data_start, bss_start, entry_address)
+ char *new_name, *a_name;
+ unsigned data_start, bss_start, entry_address;
+{
+ int new, a_out = -1;
+
+ if (a_name && (a_out = open (a_name, O_RDONLY)) < 0)
+ {
+ PERROR (a_name);
+ }
+ if ((new = creat (new_name, 0666)) < 0)
+ {
+ PERROR (new_name);
+ }
+
+ if (make_hdr (new, a_out, data_start, bss_start, entry_address, a_name, new_name) < 0
+ || copy_text_and_data (new, a_out) < 0
+ || copy_sym (new, a_out, a_name, new_name) < 0
+#ifdef COFF
+#ifndef COFF_BSD_SYMBOLS
+ || adjust_lnnoptrs (new, a_out, new_name) < 0
+#endif
+#endif
+ )
+ {
+ close (new);
+ /* unlink (new_name); /* Failed, unlink new a.out */
+ return -1;
+ }
+
+ close (new);
+ if (a_out >= 0)
+ close (a_out);
+ mark_x (new_name);
+ return 0;
+}
+
#endif /* not CANNOT_DUMP */
/* arch-tag: 62409b69-e27a-4a7c-9413-0210d6b54e7f
diff --git a/src/xdisp.c b/src/xdisp.c
index b08029b5b7..68aeae2aea 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3722,7 +3722,8 @@ handle_single_display_spec (it, spec, object, position,
if (CONSP (XCDR (XCDR (spec))))
{
Lisp_Object face_name = XCAR (XCDR (XCDR (spec)));
- int face_id2 = lookup_named_face (it->f, face_name, 'A', 0);
+ int face_id2 = lookup_derived_face (it->f, face_name,
+ 'A', FRINGE_FACE_ID, 0);
if (face_id2 >= 0)
face_id = face_id2;
}
diff --git a/src/xfaces.c b/src/xfaces.c
index f09e1f3134..f237e0630b 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -5778,7 +5778,7 @@ face_with_height (f, face_id, height)
is assumed to be already realized. */
int
-lookup_derived_face (f, symbol, c, face_id)
+lookup_derived_face (f, symbol, c, face_id, signal_p)
struct frame *f;
Lisp_Object symbol;
int c;
@@ -5791,7 +5791,7 @@ lookup_derived_face (f, symbol, c, face_id)
if (!default_face)
abort ();
- get_lface_attributes (f, symbol, symbol_attrs, 1);
+ get_lface_attributes (f, symbol, symbol_attrs, signal_p);
bcopy (default_face->lface, attrs, sizeof attrs);
merge_face_vectors (f, symbol_attrs, attrs, 0);
return lookup_face (f, attrs, c, default_face);
@@ -7740,7 +7740,7 @@ merge_faces (f, face_name, face_id, base_face_id)
if (face_id < 0 || face_id >= lface_id_to_name_size)
return base_face_id;
face_name = lface_id_to_name[face_id];
- face_id = lookup_derived_face (f, face_name, 0, base_face_id);
+ face_id = lookup_derived_face (f, face_name, 0, base_face_id, 1);
if (face_id >= 0)
return face_id;
return base_face_id;
diff --git a/src/xrdb.c b/src/xrdb.c
index e4d8b34cab..852fa2b808 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -527,11 +527,9 @@ x_load_resources (display, xrm_string, myname, myclass)
XrmDatabase rdb;
XrmDatabase db;
char line[256];
-#ifdef HAVE_X_I18N
- char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*,*";
-#else
+
char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1";
-#endif
+
#ifdef USE_MOTIF
char *courier = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1";
extern Lisp_Object Vdouble_click_time;