summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2004-12-14 07:34:55 +0000
committerMiles Bader <miles@gnu.org>2004-12-14 07:34:55 +0000
commitdce59e79ab8a6ecc869ceda44d579b8b1e8e10d5 (patch)
treec3da6c32ac0401833eb29b6a4be9cf93febf248e /src
parent56cc8ca9b68886dc4aae4c8ef44ad5e62b59db49 (diff)
parent734c576596678065b39591128d88609bc6fc5aad (diff)
downloademacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.tar.gz
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733 Update from CVS: man/calc.texi: Fix some TeX definitions. * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76 - miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77 Update from CVS
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog75
-rw-r--r--src/emacs.c4
-rw-r--r--src/eval.c6
-rw-r--r--src/image.c14
-rw-r--r--src/indent.c5
-rw-r--r--src/keyboard.c52
-rw-r--r--src/lisp.h8
-rw-r--r--src/minibuf.c30
-rw-r--r--src/syntax.c6
-rw-r--r--src/w32term.c30
-rw-r--r--src/xdisp.c43
-rw-r--r--src/xterm.c25
12 files changed, 175 insertions, 123 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 45a69442444..a2706547e77 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,10 +1,76 @@
+2004-12-13 Richard M. Stallman <rms@gnu.org>
+
+ * eval.c (syms_of_eval) <quit-flag>: Doc fix.
+
+ * keyboard.c (Vthrow_on_input): New variable.
+ (syms_of_keyboard): Defvar and initialize it.
+ (kbd_buffer_store_event_hold): Handle Vthrow_on_input.
+
+ * lisp.h (QUIT): Check for Vthrow_on_input.
+ (Vthrow_on_input): Declare it.
+
+2004-12-13 Kim F. Storm <storm@cua.dk>
+
+ * xdisp.c (set_iterator_to_next): Reset stop_charpos after display
+ vector.
+
+2004-12-12 Richard M. Stallman <rms@gnu.org>
+
+ * indent.c (Fvertical_motion): Call move_it_by_lines even if LINES = 0.
+
+ * minibuf.c (Fall_completions): Add var `zero' and use it in loop.
+ (Ftry_completion): Really use outer `zero'; eliminate inner one.
+
+2004-12-12 Kenichi Handa <handa@m17n.org>
+
+ * term.c (encode_terminal_code): Fix previous change.
+
+2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (handle_async_input): Remove pthread mutex handling.
+ (input_available_signal): Move pthread thingy to !SYNC_INPUT branch.
+
+ * syntax.c (Fforward_word): Avoid non-idempotent side-effects
+ in macro arguments.
+
+ * minibuf.c (Ftry_completion, Fall_completions): Don't use
+ XFASTINT blindly.
+
+ * emacs.c (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT.
+
+2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * w32term.c (x_calc_absolute_position): Remove calculation of
+ difference between inner and outer window. Don't subtract difference
+ for left and top calculations.
+
+ * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff
+ for left and top calculations. Remove call to x_real_positions.
+ [Bug report by Drew Adams in November]
+ (x_check_expected_move): Do not set change_gravity to 1 when calling
+ x_set_offset.
+
+2004-12-08 Richard M. Stallman <rms@gnu.org>
+
+ * xdisp.c (get_next_display_element): Use `escape-glyph' for
+ control chars and escaped octal codes.
+ (Qescape_glyph): New variable.
+ (syms_of_xdisp): Initialize it.
+ (escape_glyph_face): New variable.
+ (redisplay_window): Initialize it.
+
+2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * image.c (our_fill_input_buffer, jpeg_load, CHECK_LIB_AVAILABLE)
+ (init_image): Use 1 rather than TRUE. TRUE's not always defined.
+
2004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around
reset_malloc_hooks.
- * keyboard.c (handle_async_input, input_available_signal): Add
- ! defined (SYSTEM_MALLOC) around thread code.
+ * keyboard.c (handle_async_input, input_available_signal):
+ Add ! defined (SYSTEM_MALLOC) around thread code.
* alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC.
@@ -42,12 +108,11 @@
* emacs.c (Fdump_emacs): Call reset_malloc_hooks.
* keyboard.c: Conditionally include pthread.h
- (handle_async_inpu, input_available_signalt): If not in the main
+ (handle_async_input, input_available_signalt): If not in the main
thread, block signal, send signal to main thread and return.
* gtkutil.c (xg_get_file_with_chooser): Handle local files only.
- Set current folder in file chooser if default_filename is a
- directory.
+ Set current folder in file chooser if default_filename is a directory.
2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
diff --git a/src/emacs.c b/src/emacs.c
index 03f20b9e97b..02031fe9072 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1023,8 +1023,10 @@ main (argc, argv
Also call realloc and free for consistency. */
free (realloc (malloc (4), 4));
+# ifndef SYNC_INPUT
/* Arrange to disable interrupt input inside malloc etc. */
uninterrupt_malloc ();
+# endif /* not SYNC_INPUT */
#endif /* not SYSTEM_MALLOC */
#if defined (MSDOS) || defined (WINDOWSNT)
@@ -2246,7 +2248,7 @@ You must run Emacs in batch mode in order to dump it. */)
memory_warnings (my_edata, malloc_warning);
#endif /* not WINDOWSNT */
#endif
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
+#if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
/* Pthread may call malloc before main, and then we will get an endless
loop, because pthread_self (see alloc.c) calls malloc the first time
it is called on some systems. */
diff --git a/src/eval.c b/src/eval.c
index 0eb519fbfca..879f916aa46 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3331,7 +3331,11 @@ Emacs could overflow the real C stack, and crash. */);
DEFVAR_LISP ("quit-flag", &Vquit_flag,
doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil.
-Typing C-g sets `quit-flag' non-nil, regardless of `inhibit-quit'. */);
+If the value is t, that means do an ordinary quit.
+If the value equals `throw-on-input', that means quit by throwing
+to the tag specified in `throw-on-input'; it's for handling `while-no-input'.
+Typing C-g sets `quit-flag' to t, regardless of `inhibit-quit',
+but `inhibit-quit' non-nil prevents anything from taking notice of that. */);
Vquit_flag = Qnil;
DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit,
diff --git a/src/image.c b/src/image.c
index d1925cf36e4..18ffc2db3a4 100644
--- a/src/image.c
+++ b/src/image.c
@@ -6378,7 +6378,7 @@ our_fill_input_buffer (cinfo)
src->next_input_byte = buffer;
src->bytes_in_buffer = 2;
- return TRUE;
+ return 1;
}
@@ -6533,11 +6533,11 @@ jpeg_load (f, img)
jpeg_memory_src (&cinfo, SDATA (specified_data),
SBYTES (specified_data));
- fn_jpeg_read_header (&cinfo, TRUE);
+ fn_jpeg_read_header (&cinfo, 1);
/* Customize decompression so that color quantization will be used.
Start decompression. */
- cinfo.quantize_colors = TRUE;
+ cinfo.quantize_colors = 1;
fn_jpeg_start_decompress (&cinfo);
width = img->width = cinfo.output_width;
height = img->height = cinfo.output_height;
@@ -7552,7 +7552,7 @@ gif_load (f, img)
bg_color.blue = color.blue;
RGBBackColor (&bg_color);
SetGWorld (old_port, old_gdh);
- SetMovieActive (movie, TRUE);
+ SetMovieActive (movie, 1);
SetMovieGWorld (movie, ximg, NULL);
SampleNumToMediaTime (media, ino + 1, &time, NULL);
SetMovieTimeValue (movie, time);
@@ -7930,7 +7930,7 @@ DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "")
define_image_type (image_type, init_lib_fn (libraries))
#else
#define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \
- define_image_type (image_type, TRUE)
+ define_image_type (image_type, 1)
#endif /* HAVE_NTGUI */
DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0,
@@ -8114,8 +8114,8 @@ init_image ()
{
image_types = NULL;
- define_image_type (&xbm_type, TRUE);
- define_image_type (&pbm_type, TRUE);
+ define_image_type (&xbm_type, 1);
+ define_image_type (&pbm_type, 1);
#ifdef MAC_OS
/* Animated gifs use QuickTime Movie Toolbox. So initialize it here. */
diff --git a/src/indent.c b/src/indent.c
index b573c53e666..24645b104cf 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2092,8 +2092,9 @@ whether or not it is currently displayed in some window. */)
move_it_by_lines (&it, -1, 0);
it.vpos = 0;
- if (XINT (lines) != 0)
- move_it_by_lines (&it, XINT (lines), 0);
+ /* Do this even if LINES is 0, so that we move back
+ to the beginning of the current line as we ought. */
+ move_it_by_lines (&it, XINT (lines), 0);
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}
diff --git a/src/keyboard.c b/src/keyboard.c
index c77c53790b1..6ed15f232d1 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6779,24 +6779,6 @@ handle_async_input ()
#ifdef BSD4_1
extern int select_alarmed;
#endif
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
- extern pthread_t main_thread;
- if (pthread_self () != main_thread)
- {
- /* POSIX says any thread can receive the signal. On GNU/Linux that is
- not true, but for other systems (FreeBSD at least) it is. So direct
- the signal to the correct thread and block it from this thread. */
-#ifdef SIGIO
- sigset_t new_mask;
-
- sigemptyset (&new_mask);
- sigaddset (&new_mask, SIGIO);
- pthread_sigmask (SIG_BLOCK, &new_mask, 0);
- pthread_kill (main_thread, SIGIO);
-#endif
- return;
- }
-#endif
interrupt_input_pending = 0;
@@ -6825,22 +6807,6 @@ input_available_signal (signo)
{
/* Must preserve main program's value of errno. */
int old_errno = errno;
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
- extern pthread_t main_thread;
- if (pthread_self () != main_thread)
- {
- /* POSIX says any thread can receive the signal. On GNU/Linux that is
- not true, but for other systems (FreeBSD at least) it is. So direct
- the signal to the correct thread and block it from this thread. */
- sigset_t new_mask;
-
- sigemptyset (&new_mask);
- sigaddset (&new_mask, SIGIO);
- pthread_sigmask (SIG_BLOCK, &new_mask, 0);
- pthread_kill (main_thread, SIGIO);
- return;
- }
-#endif /* HAVE_GTK_AND_PTHREAD */
#if defined (USG) && !defined (POSIX_SIGNALS)
/* USG systems forget handlers when they are used;
must reestablish each time */
@@ -6857,6 +6823,24 @@ input_available_signal (signo)
#ifdef SYNC_INPUT
interrupt_input_pending = 1;
#else
+
+# if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
+ extern pthread_t main_thread;
+ if (pthread_self () != main_thread)
+ {
+ /* POSIX says any thread can receive the signal. On GNU/Linux that is
+ not true, but for other systems (FreeBSD at least) it is. So direct
+ the signal to the correct thread and block it from this thread. */
+ sigset_t new_mask;
+
+ sigemptyset (&new_mask);
+ sigaddset (&new_mask, SIGIO);
+ pthread_sigmask (SIG_BLOCK, &new_mask, 0);
+ pthread_kill (main_thread, SIGIO);
+ return;
+ }
+# endif /* HAVE_GTK_AND_PTHREAD */
+
handle_async_input ();
#endif
diff --git a/src/lisp.h b/src/lisp.h
index 47eb7604b41..3f49ac546cc 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1786,11 +1786,15 @@ extern char *stack_bottom;
#ifdef SYNC_INPUT
extern void handle_async_input P_ ((void));
extern int interrupt_input_pending;
+
#define QUIT \
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
{ \
+ Lisp_Object flag = Vquit_flag; \
Vquit_flag = Qnil; \
+ if (EQ (Vthrow_on_input, flag)) \
+ Fthrow (Vthrow_on_input, Qnil); \
Fsignal (Qquit, Qnil); \
} \
else if (interrupt_input_pending) \
@@ -1803,7 +1807,10 @@ extern int interrupt_input_pending;
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
{ \
+ Lisp_Object flag = Vquit_flag; \
Vquit_flag = Qnil; \
+ if (EQ (Vthrow_on_input, flag)) \
+ Fthrow (Vthrow_on_input, Qnil); \
Fsignal (Qquit, Qnil); \
} \
} while (0)
@@ -2917,6 +2924,7 @@ extern struct kboard *echo_kboard;
extern void cancel_echoing P_ ((void));
extern Lisp_Object Qdisabled, QCfilter;
extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level;
+extern Lisp_Object Vthrow_on_input;
extern int input_pending;
EXFUN (Fdiscard_input, 0);
EXFUN (Frecursive_edit, 0);
diff --git a/src/minibuf.c b/src/minibuf.c
index 109b1fc1df0..e1939339ce8 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1227,6 +1227,7 @@ is used to further constrain the set of candidates. */)
return call3 (alist, string, predicate, Qnil);
bestmatch = bucket = Qnil;
+ zero = make_number (0);
/* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist;
@@ -1253,7 +1254,7 @@ is used to further constrain the set of candidates. */)
}
else if (type == 2)
{
- if (XFASTINT (bucket) != 0)
+ if (!EQ (bucket, zero))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
@@ -1285,16 +1286,14 @@ is used to further constrain the set of candidates. */)
if (STRINGP (eltstring)
&& SCHARS (string) <= SCHARS (eltstring)
- && (tem = Fcompare_strings (eltstring, make_number (0),
+ && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS (string)),
- string, make_number (0), Qnil,
+ string, zero, Qnil,
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
{
/* Yes. */
Lisp_Object regexps;
- Lisp_Object zero;
- XSETFASTINT (zero, 0);
/* Ignore this element if it fails to match all the regexps. */
{
@@ -1348,9 +1347,9 @@ is used to further constrain the set of candidates. */)
else
{
compare = min (bestmatchsize, SCHARS (eltstring));
- tem = Fcompare_strings (bestmatch, make_number (0),
+ tem = Fcompare_strings (bestmatch, zero,
make_number (compare),
- eltstring, make_number (0),
+ eltstring, zero,
make_number (compare),
completion_ignore_case ? Qt : Qnil);
if (EQ (tem, Qt))
@@ -1381,15 +1380,15 @@ is used to further constrain the set of candidates. */)
((matchsize == SCHARS (eltstring))
==
(matchsize == SCHARS (bestmatch))
- && (tem = Fcompare_strings (eltstring, make_number (0),
+ && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS (string)),
- string, make_number (0),
+ string, zero,
Qnil,
Qnil),
EQ (Qt, tem))
- && (tem = Fcompare_strings (bestmatch, make_number (0),
+ && (tem = Fcompare_strings (bestmatch, zero,
make_number (SCHARS (string)),
- string, make_number (0),
+ string, zero,
Qnil,
Qnil),
! EQ (Qt, tem))))
@@ -1476,13 +1475,14 @@ are ignored unless STRING itself starts with a space. */)
|| NILP (XCAR (alist))));
int index = 0, obsize = 0;
int bindcount = -1;
- Lisp_Object bucket, tem;
+ Lisp_Object bucket, tem, zero;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
CHECK_STRING (string);
if (type == 0)
return call3 (alist, string, predicate, Qt);
allmatches = bucket = Qnil;
+ zero = make_number (0);
/* If ALIST is not a list, set TAIL just for gc pro. */
tail = alist;
@@ -1509,7 +1509,7 @@ are ignored unless STRING itself starts with a space. */)
}
else if (type == 2)
{
- if (XFASTINT (bucket) != 0)
+ if (!EQ (bucket, zero))
{
elt = bucket;
eltstring = Fsymbol_name (elt);
@@ -1547,9 +1547,9 @@ are ignored unless STRING itself starts with a space. */)
&& SREF (string, 0) == ' ')
|| SREF (eltstring, 0) != ' '
|| NILP (hide_spaces))
- && (tem = Fcompare_strings (eltstring, make_number (0),
+ && (tem = Fcompare_strings (eltstring, zero,
make_number (SCHARS (string)),
- string, make_number (0),
+ string, zero,
make_number (SCHARS (string)),
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
diff --git a/src/syntax.c b/src/syntax.c
index b062264ac24..3f35027bb36 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1320,6 +1320,7 @@ and the function returns nil. Field boundaries are not noticed if
(arg)
Lisp_Object arg;
{
+ Lisp_Object tmp;
int orig_val, val;
if (NILP (arg))
@@ -1332,8 +1333,9 @@ and the function returns nil. Field boundaries are not noticed if
val = XINT (arg) > 0 ? ZV : BEGV;
/* Avoid jumping out of an input field. */
- val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT),
- Qt, Qnil, Qnil));
+ tmp = Fconstrain_to_field (make_number (val), make_number (PT),
+ Qt, Qnil, Qnil);
+ val = XFASTINT (tmp);
SET_PT (val);
return val == orig_val ? Qt : Qnil;
diff --git a/src/w32term.c b/src/w32term.c
index da24d2051ea..7208a8acf7e 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5542,47 +5542,17 @@ void
x_calc_absolute_position (f)
struct frame *f;
{
- POINT pt;
int flags = f->size_hint_flags;
- pt.x = pt.y = 0;
-
- /* Find the position of the outside upper-left corner of
- the inner window, with respect to the outer window.
- But do this only if we will need the results. */
- if (f->output_data.w32->parent_desc != FRAME_W32_DISPLAY_INFO (f)->root_window)
- {
- BLOCK_INPUT;
- MapWindowPoints (FRAME_W32_WINDOW (f),
- f->output_data.w32->parent_desc,
- &pt, 1);
- UNBLOCK_INPUT;
- }
-
- {
- RECT rt;
- rt.left = rt.right = rt.top = rt.bottom = 0;
-
- BLOCK_INPUT;
- AdjustWindowRect(&rt, f->output_data.w32->dwStyle,
- FRAME_EXTERNAL_MENU_BAR (f));
- UNBLOCK_INPUT;
-
- pt.x += (rt.right - rt.left);
- pt.y += (rt.bottom - rt.top);
- }
-
/* Treat negative positions as relative to the leftmost bottommost
position that fits on the screen. */
if (flags & XNegative)
f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width
- - 2 * f->border_width - pt.x
- FRAME_PIXEL_WIDTH (f)
+ f->left_pos);
if (flags & YNegative)
f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height
- - 2 * f->border_width - pt.y
- FRAME_PIXEL_HEIGHT (f)
+ f->top_pos);
/* The left_pos and top_pos
diff --git a/src/xdisp.c b/src/xdisp.c
index c50edb98561..ba6ee253d79 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -343,6 +343,11 @@ Lisp_Object Vvoid_text_area_pointer;
Lisp_Object Qtrailing_whitespace;
+/* Name and number of the face used to highlight escape glyphs. */
+
+Lisp_Object Qescape_glyph;
+int escape_glyph_face;
+
/* The symbol `image' which is the car of the lists used to represent
images in Lisp. */
@@ -5014,6 +5019,21 @@ get_next_display_element (it)
display. Then, set IT->dpvec to these glyphs. */
GLYPH g;
int ctl_len;
+ int face_id = escape_glyph_face;
+
+ /* Find the face id if `escape-glyph' unless we recently did. */
+ if (face_id < 0)
+ {
+ Lisp_Object tem = Fget (Qescape_glyph, Qface);
+ if (INTEGERP (tem))
+ face_id = XINT (tem);
+ else
+ face_id = 0;
+ /* If there's overflow, use 0 instead. */
+ if (FAST_GLYPH_FACE (FAST_MAKE_GLYPH (0, face_id)) != face_id)
+ face_id = 0;
+ escape_glyph_face = face_id;
+ }
if (it->c < 128 && it->ctl_arrow_p)
{
@@ -5023,10 +5043,10 @@ get_next_display_element (it)
&& GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp))))
g = XINT (DISP_CTRL_GLYPH (it->dp));
else
- g = FAST_MAKE_GLYPH ('^', 0);
+ g = FAST_MAKE_GLYPH ('^', face_id);
XSETINT (it->ctl_chars[0], g);
- g = FAST_MAKE_GLYPH (it->c ^ 0100, 0);
+ g = FAST_MAKE_GLYPH (it->c ^ 0100, face_id);
XSETINT (it->ctl_chars[1], g);
ctl_len = 2;
}
@@ -5043,7 +5063,7 @@ get_next_display_element (it)
&& GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp))))
escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp));
else
- escape_glyph = FAST_MAKE_GLYPH ('\\', 0);
+ escape_glyph = FAST_MAKE_GLYPH ('\\', face_id);
if (CHAR_BYTE8_P (it->c))
{
@@ -5074,11 +5094,14 @@ get_next_display_element (it)
XSETINT (it->ctl_chars[i * 4], escape_glyph);
/* Insert three more glyphs into IT->ctl_chars for
the octal display of the character. */
- g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0', 0);
+ g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0',
+ face_id);
XSETINT (it->ctl_chars[i * 4 + 1], g);
- g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0', 0);
+ g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0',
+ face_id);
XSETINT (it->ctl_chars[i * 4 + 2], g);
- g = FAST_MAKE_GLYPH ((str[i] & 7) + '0', 0);
+ g = FAST_MAKE_GLYPH ((str[i] & 7) + '0',
+ face_id);
XSETINT (it->ctl_chars[i * 4 + 3], g);
}
ctl_len = len * 4;
@@ -5217,6 +5240,9 @@ set_iterator_to_next (it, reseat_p)
it->dpvec = NULL;
it->current.dpvec_index = -1;
+ /* Recheck faces after display vector */
+ it->stop_charpos = 0;
+
/* Skip over characters which were displayed via IT->dpvec. */
if (it->dpvec_char_len < 0)
reseat_at_next_visible_line_start (it, 1);
@@ -11679,6 +11705,9 @@ redisplay_window (window, just_this_one_p)
*w->desired_matrix->method = 0;
#endif
+ /* Force this to be looked up again for each redisp of each window. */
+ escape_glyph_face = -1;
+
specbind (Qinhibit_point_motion_hooks, Qt);
reconsider_clip_changes (w, buffer);
@@ -22292,6 +22321,8 @@ syms_of_xdisp ()
staticpro (&Qfontification_functions);
Qtrailing_whitespace = intern ("trailing-whitespace");
staticpro (&Qtrailing_whitespace);
+ Qescape_glyph = intern ("escape-glyph");
+ staticpro (&Qescape_glyph);
Qimage = intern ("image");
staticpro (&Qimage);
QCmap = intern (":map");
diff --git a/src/xterm.c b/src/xterm.c
index 1f2b54272cc..2ffe7668516 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8171,20 +8171,11 @@ x_calc_absolute_position (f)
if (! ((flags & XNegative) || (flags & YNegative)))
return;
- /* Find the offsets of the outside upper-left corner of
- the inner window, with respect to the outer window.
- But do this only if we will need the results. */
- if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window)
- /* This is to get *_pixels_outer_diff. */
- x_real_positions (f, &win_x, &win_y);
-
/* Treat negative positions as relative to the leftmost bottommost
position that fits on the screen. */
if (flags & XNegative)
f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width
- - 2 * FRAME_X_OUTPUT (f)->x_pixels_outer_diff
- - FRAME_PIXEL_WIDTH (f)
- + f->left_pos);
+ - FRAME_PIXEL_WIDTH (f) + f->left_pos);
{
int height = FRAME_PIXEL_HEIGHT (f);
@@ -8206,15 +8197,7 @@ x_calc_absolute_position (f)
#endif
if (flags & YNegative)
- f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height
- - FRAME_X_OUTPUT (f)->y_pixels_outer_diff
-
- /* Assume the window manager decorations are the same size on
- three sides, i.e. left, right and bottom. This is to
- compensate for the bottom part. */
- - FRAME_X_OUTPUT (f)->x_pixels_outer_diff
- - height
- + f->top_pos);
+ f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - height + f->top_pos);
}
/* The left_pos and top_pos
@@ -8330,7 +8313,9 @@ x_check_expected_move (f)
FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos;
FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos;
- x_set_offset (f, expect_left, expect_top, 1);
+ f->left_pos = expect_left;
+ f->top_pos = expect_top;
+ x_set_offset (f, expect_left, expect_top, 0);
}
else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN)
FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B;