diff options
| author | Miles Bader | 2004-12-14 07:34:55 +0000 |
|---|---|---|
| committer | Miles Bader | 2004-12-14 07:34:55 +0000 |
| commit | dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5 (patch) | |
| tree | c3da6c32ac0401833eb29b6a4be9cf93febf248e /src | |
| parent | 56cc8ca9b68886dc4aae4c8ef44ad5e62b59db49 (diff) | |
| parent | 734c576596678065b39591128d88609bc6fc5aad (diff) | |
| download | emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.tar.gz emacs-dce59e79ab8a6ecc869ceda44d579b8b1e8e10d5.zip | |
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/ChangeLog | 75 | ||||
| -rw-r--r-- | src/emacs.c | 4 | ||||
| -rw-r--r-- | src/eval.c | 6 | ||||
| -rw-r--r-- | src/image.c | 14 | ||||
| -rw-r--r-- | src/indent.c | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 52 | ||||
| -rw-r--r-- | src/lisp.h | 8 | ||||
| -rw-r--r-- | src/minibuf.c | 30 | ||||
| -rw-r--r-- | src/syntax.c | 6 | ||||
| -rw-r--r-- | src/w32term.c | 30 | ||||
| -rw-r--r-- | src/xdisp.c | 43 | ||||
| -rw-r--r-- | src/xterm.c | 25 |
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 @@ | |||
| 1 | 2004-12-13 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * eval.c (syms_of_eval) <quit-flag>: Doc fix. | ||
| 4 | |||
| 5 | * keyboard.c (Vthrow_on_input): New variable. | ||
| 6 | (syms_of_keyboard): Defvar and initialize it. | ||
| 7 | (kbd_buffer_store_event_hold): Handle Vthrow_on_input. | ||
| 8 | |||
| 9 | * lisp.h (QUIT): Check for Vthrow_on_input. | ||
| 10 | (Vthrow_on_input): Declare it. | ||
| 11 | |||
| 12 | 2004-12-13 Kim F. Storm <storm@cua.dk> | ||
| 13 | |||
| 14 | * xdisp.c (set_iterator_to_next): Reset stop_charpos after display | ||
| 15 | vector. | ||
| 16 | |||
| 17 | 2004-12-12 Richard M. Stallman <rms@gnu.org> | ||
| 18 | |||
| 19 | * indent.c (Fvertical_motion): Call move_it_by_lines even if LINES = 0. | ||
| 20 | |||
| 21 | * minibuf.c (Fall_completions): Add var `zero' and use it in loop. | ||
| 22 | (Ftry_completion): Really use outer `zero'; eliminate inner one. | ||
| 23 | |||
| 24 | 2004-12-12 Kenichi Handa <handa@m17n.org> | ||
| 25 | |||
| 26 | * term.c (encode_terminal_code): Fix previous change. | ||
| 27 | |||
| 28 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 29 | |||
| 30 | * keyboard.c (handle_async_input): Remove pthread mutex handling. | ||
| 31 | (input_available_signal): Move pthread thingy to !SYNC_INPUT branch. | ||
| 32 | |||
| 33 | * syntax.c (Fforward_word): Avoid non-idempotent side-effects | ||
| 34 | in macro arguments. | ||
| 35 | |||
| 36 | * minibuf.c (Ftry_completion, Fall_completions): Don't use | ||
| 37 | XFASTINT blindly. | ||
| 38 | |||
| 39 | * emacs.c (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT. | ||
| 40 | |||
| 41 | 2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 42 | |||
| 43 | * w32term.c (x_calc_absolute_position): Remove calculation of | ||
| 44 | difference between inner and outer window. Don't subtract difference | ||
| 45 | for left and top calculations. | ||
| 46 | |||
| 47 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff | ||
| 48 | for left and top calculations. Remove call to x_real_positions. | ||
| 49 | [Bug report by Drew Adams in November] | ||
| 50 | (x_check_expected_move): Do not set change_gravity to 1 when calling | ||
| 51 | x_set_offset. | ||
| 52 | |||
| 53 | 2004-12-08 Richard M. Stallman <rms@gnu.org> | ||
| 54 | |||
| 55 | * xdisp.c (get_next_display_element): Use `escape-glyph' for | ||
| 56 | control chars and escaped octal codes. | ||
| 57 | (Qescape_glyph): New variable. | ||
| 58 | (syms_of_xdisp): Initialize it. | ||
| 59 | (escape_glyph_face): New variable. | ||
| 60 | (redisplay_window): Initialize it. | ||
| 61 | |||
| 62 | 2004-12-07 Paul Eggert <eggert@cs.ucla.edu> | ||
| 63 | |||
| 64 | * image.c (our_fill_input_buffer, jpeg_load, CHECK_LIB_AVAILABLE) | ||
| 65 | (init_image): Use 1 rather than TRUE. TRUE's not always defined. | ||
| 66 | |||
| 1 | 2004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 67 | 2004-12-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 68 | ||
| 3 | * emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around | 69 | * emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around |
| 4 | reset_malloc_hooks. | 70 | reset_malloc_hooks. |
| 5 | 71 | ||
| 6 | * keyboard.c (handle_async_input, input_available_signal): Add | 72 | * keyboard.c (handle_async_input, input_available_signal): |
| 7 | ! defined (SYSTEM_MALLOC) around thread code. | 73 | Add ! defined (SYSTEM_MALLOC) around thread code. |
| 8 | 74 | ||
| 9 | * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC. | 75 | * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC. |
| 10 | 76 | ||
| @@ -42,12 +108,11 @@ | |||
| 42 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. | 108 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. |
| 43 | 109 | ||
| 44 | * keyboard.c: Conditionally include pthread.h | 110 | * keyboard.c: Conditionally include pthread.h |
| 45 | (handle_async_inpu, input_available_signalt): If not in the main | 111 | (handle_async_input, input_available_signalt): If not in the main |
| 46 | thread, block signal, send signal to main thread and return. | 112 | thread, block signal, send signal to main thread and return. |
| 47 | 113 | ||
| 48 | * gtkutil.c (xg_get_file_with_chooser): Handle local files only. | 114 | * gtkutil.c (xg_get_file_with_chooser): Handle local files only. |
| 49 | Set current folder in file chooser if default_filename is a | 115 | Set current folder in file chooser if default_filename is a directory. |
| 50 | directory. | ||
| 51 | 116 | ||
| 52 | 2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca> | 117 | 2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 53 | 118 | ||
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 | |||
| 1023 | Also call realloc and free for consistency. */ | 1023 | Also call realloc and free for consistency. */ |
| 1024 | free (realloc (malloc (4), 4)); | 1024 | free (realloc (malloc (4), 4)); |
| 1025 | 1025 | ||
| 1026 | # ifndef SYNC_INPUT | ||
| 1026 | /* Arrange to disable interrupt input inside malloc etc. */ | 1027 | /* Arrange to disable interrupt input inside malloc etc. */ |
| 1027 | uninterrupt_malloc (); | 1028 | uninterrupt_malloc (); |
| 1029 | # endif /* not SYNC_INPUT */ | ||
| 1028 | #endif /* not SYSTEM_MALLOC */ | 1030 | #endif /* not SYSTEM_MALLOC */ |
| 1029 | 1031 | ||
| 1030 | #if defined (MSDOS) || defined (WINDOWSNT) | 1032 | #if defined (MSDOS) || defined (WINDOWSNT) |
| @@ -2246,7 +2248,7 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2246 | memory_warnings (my_edata, malloc_warning); | 2248 | memory_warnings (my_edata, malloc_warning); |
| 2247 | #endif /* not WINDOWSNT */ | 2249 | #endif /* not WINDOWSNT */ |
| 2248 | #endif | 2250 | #endif |
| 2249 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | 2251 | #if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT |
| 2250 | /* Pthread may call malloc before main, and then we will get an endless | 2252 | /* Pthread may call malloc before main, and then we will get an endless |
| 2251 | loop, because pthread_self (see alloc.c) calls malloc the first time | 2253 | loop, because pthread_self (see alloc.c) calls malloc the first time |
| 2252 | it is called on some systems. */ | 2254 | 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. */); | |||
| 3331 | 3331 | ||
| 3332 | DEFVAR_LISP ("quit-flag", &Vquit_flag, | 3332 | DEFVAR_LISP ("quit-flag", &Vquit_flag, |
| 3333 | doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. | 3333 | doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. |
| 3334 | Typing C-g sets `quit-flag' non-nil, regardless of `inhibit-quit'. */); | 3334 | If the value is t, that means do an ordinary quit. |
| 3335 | If the value equals `throw-on-input', that means quit by throwing | ||
| 3336 | to the tag specified in `throw-on-input'; it's for handling `while-no-input'. | ||
| 3337 | Typing C-g sets `quit-flag' to t, regardless of `inhibit-quit', | ||
| 3338 | but `inhibit-quit' non-nil prevents anything from taking notice of that. */); | ||
| 3335 | Vquit_flag = Qnil; | 3339 | Vquit_flag = Qnil; |
| 3336 | 3340 | ||
| 3337 | DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit, | 3341 | 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) | |||
| 6378 | 6378 | ||
| 6379 | src->next_input_byte = buffer; | 6379 | src->next_input_byte = buffer; |
| 6380 | src->bytes_in_buffer = 2; | 6380 | src->bytes_in_buffer = 2; |
| 6381 | return TRUE; | 6381 | return 1; |
| 6382 | } | 6382 | } |
| 6383 | 6383 | ||
| 6384 | 6384 | ||
| @@ -6533,11 +6533,11 @@ jpeg_load (f, img) | |||
| 6533 | jpeg_memory_src (&cinfo, SDATA (specified_data), | 6533 | jpeg_memory_src (&cinfo, SDATA (specified_data), |
| 6534 | SBYTES (specified_data)); | 6534 | SBYTES (specified_data)); |
| 6535 | 6535 | ||
| 6536 | fn_jpeg_read_header (&cinfo, TRUE); | 6536 | fn_jpeg_read_header (&cinfo, 1); |
| 6537 | 6537 | ||
| 6538 | /* Customize decompression so that color quantization will be used. | 6538 | /* Customize decompression so that color quantization will be used. |
| 6539 | Start decompression. */ | 6539 | Start decompression. */ |
| 6540 | cinfo.quantize_colors = TRUE; | 6540 | cinfo.quantize_colors = 1; |
| 6541 | fn_jpeg_start_decompress (&cinfo); | 6541 | fn_jpeg_start_decompress (&cinfo); |
| 6542 | width = img->width = cinfo.output_width; | 6542 | width = img->width = cinfo.output_width; |
| 6543 | height = img->height = cinfo.output_height; | 6543 | height = img->height = cinfo.output_height; |
| @@ -7552,7 +7552,7 @@ gif_load (f, img) | |||
| 7552 | bg_color.blue = color.blue; | 7552 | bg_color.blue = color.blue; |
| 7553 | RGBBackColor (&bg_color); | 7553 | RGBBackColor (&bg_color); |
| 7554 | SetGWorld (old_port, old_gdh); | 7554 | SetGWorld (old_port, old_gdh); |
| 7555 | SetMovieActive (movie, TRUE); | 7555 | SetMovieActive (movie, 1); |
| 7556 | SetMovieGWorld (movie, ximg, NULL); | 7556 | SetMovieGWorld (movie, ximg, NULL); |
| 7557 | SampleNumToMediaTime (media, ino + 1, &time, NULL); | 7557 | SampleNumToMediaTime (media, ino + 1, &time, NULL); |
| 7558 | SetMovieTimeValue (movie, time); | 7558 | SetMovieTimeValue (movie, time); |
| @@ -7930,7 +7930,7 @@ DEFUN ("lookup-image", Flookup_image, Slookup_image, 1, 1, 0, "") | |||
| 7930 | define_image_type (image_type, init_lib_fn (libraries)) | 7930 | define_image_type (image_type, init_lib_fn (libraries)) |
| 7931 | #else | 7931 | #else |
| 7932 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ | 7932 | #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \ |
| 7933 | define_image_type (image_type, TRUE) | 7933 | define_image_type (image_type, 1) |
| 7934 | #endif /* HAVE_NTGUI */ | 7934 | #endif /* HAVE_NTGUI */ |
| 7935 | 7935 | ||
| 7936 | DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, | 7936 | DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0, |
| @@ -8114,8 +8114,8 @@ init_image () | |||
| 8114 | { | 8114 | { |
| 8115 | image_types = NULL; | 8115 | image_types = NULL; |
| 8116 | 8116 | ||
| 8117 | define_image_type (&xbm_type, TRUE); | 8117 | define_image_type (&xbm_type, 1); |
| 8118 | define_image_type (&pbm_type, TRUE); | 8118 | define_image_type (&pbm_type, 1); |
| 8119 | 8119 | ||
| 8120 | #ifdef MAC_OS | 8120 | #ifdef MAC_OS |
| 8121 | /* Animated gifs use QuickTime Movie Toolbox. So initialize it here. */ | 8121 | /* 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. */) | |||
| 2092 | move_it_by_lines (&it, -1, 0); | 2092 | move_it_by_lines (&it, -1, 0); |
| 2093 | 2093 | ||
| 2094 | it.vpos = 0; | 2094 | it.vpos = 0; |
| 2095 | if (XINT (lines) != 0) | 2095 | /* Do this even if LINES is 0, so that we move back |
| 2096 | move_it_by_lines (&it, XINT (lines), 0); | 2096 | to the beginning of the current line as we ought. */ |
| 2097 | move_it_by_lines (&it, XINT (lines), 0); | ||
| 2097 | 2098 | ||
| 2098 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 2099 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
| 2099 | } | 2100 | } |
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 () | |||
| 6779 | #ifdef BSD4_1 | 6779 | #ifdef BSD4_1 |
| 6780 | extern int select_alarmed; | 6780 | extern int select_alarmed; |
| 6781 | #endif | 6781 | #endif |
| 6782 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | ||
| 6783 | extern pthread_t main_thread; | ||
| 6784 | if (pthread_self () != main_thread) | ||
| 6785 | { | ||
| 6786 | /* POSIX says any thread can receive the signal. On GNU/Linux that is | ||
| 6787 | not true, but for other systems (FreeBSD at least) it is. So direct | ||
| 6788 | the signal to the correct thread and block it from this thread. */ | ||
| 6789 | #ifdef SIGIO | ||
| 6790 | sigset_t new_mask; | ||
| 6791 | |||
| 6792 | sigemptyset (&new_mask); | ||
| 6793 | sigaddset (&new_mask, SIGIO); | ||
| 6794 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); | ||
| 6795 | pthread_kill (main_thread, SIGIO); | ||
| 6796 | #endif | ||
| 6797 | return; | ||
| 6798 | } | ||
| 6799 | #endif | ||
| 6800 | 6782 | ||
| 6801 | interrupt_input_pending = 0; | 6783 | interrupt_input_pending = 0; |
| 6802 | 6784 | ||
| @@ -6825,22 +6807,6 @@ input_available_signal (signo) | |||
| 6825 | { | 6807 | { |
| 6826 | /* Must preserve main program's value of errno. */ | 6808 | /* Must preserve main program's value of errno. */ |
| 6827 | int old_errno = errno; | 6809 | int old_errno = errno; |
| 6828 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | ||
| 6829 | extern pthread_t main_thread; | ||
| 6830 | if (pthread_self () != main_thread) | ||
| 6831 | { | ||
| 6832 | /* POSIX says any thread can receive the signal. On GNU/Linux that is | ||
| 6833 | not true, but for other systems (FreeBSD at least) it is. So direct | ||
| 6834 | the signal to the correct thread and block it from this thread. */ | ||
| 6835 | sigset_t new_mask; | ||
| 6836 | |||
| 6837 | sigemptyset (&new_mask); | ||
| 6838 | sigaddset (&new_mask, SIGIO); | ||
| 6839 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); | ||
| 6840 | pthread_kill (main_thread, SIGIO); | ||
| 6841 | return; | ||
| 6842 | } | ||
| 6843 | #endif /* HAVE_GTK_AND_PTHREAD */ | ||
| 6844 | #if defined (USG) && !defined (POSIX_SIGNALS) | 6810 | #if defined (USG) && !defined (POSIX_SIGNALS) |
| 6845 | /* USG systems forget handlers when they are used; | 6811 | /* USG systems forget handlers when they are used; |
| 6846 | must reestablish each time */ | 6812 | must reestablish each time */ |
| @@ -6857,6 +6823,24 @@ input_available_signal (signo) | |||
| 6857 | #ifdef SYNC_INPUT | 6823 | #ifdef SYNC_INPUT |
| 6858 | interrupt_input_pending = 1; | 6824 | interrupt_input_pending = 1; |
| 6859 | #else | 6825 | #else |
| 6826 | |||
| 6827 | # if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | ||
| 6828 | extern pthread_t main_thread; | ||
| 6829 | if (pthread_self () != main_thread) | ||
| 6830 | { | ||
| 6831 | /* POSIX says any thread can receive the signal. On GNU/Linux that is | ||
| 6832 | not true, but for other systems (FreeBSD at least) it is. So direct | ||
| 6833 | the signal to the correct thread and block it from this thread. */ | ||
| 6834 | sigset_t new_mask; | ||
| 6835 | |||
| 6836 | sigemptyset (&new_mask); | ||
| 6837 | sigaddset (&new_mask, SIGIO); | ||
| 6838 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); | ||
| 6839 | pthread_kill (main_thread, SIGIO); | ||
| 6840 | return; | ||
| 6841 | } | ||
| 6842 | # endif /* HAVE_GTK_AND_PTHREAD */ | ||
| 6843 | |||
| 6860 | handle_async_input (); | 6844 | handle_async_input (); |
| 6861 | #endif | 6845 | #endif |
| 6862 | 6846 | ||
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; | |||
| 1786 | #ifdef SYNC_INPUT | 1786 | #ifdef SYNC_INPUT |
| 1787 | extern void handle_async_input P_ ((void)); | 1787 | extern void handle_async_input P_ ((void)); |
| 1788 | extern int interrupt_input_pending; | 1788 | extern int interrupt_input_pending; |
| 1789 | |||
| 1789 | #define QUIT \ | 1790 | #define QUIT \ |
| 1790 | do { \ | 1791 | do { \ |
| 1791 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 1792 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 1792 | { \ | 1793 | { \ |
| 1794 | Lisp_Object flag = Vquit_flag; \ | ||
| 1793 | Vquit_flag = Qnil; \ | 1795 | Vquit_flag = Qnil; \ |
| 1796 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 1797 | Fthrow (Vthrow_on_input, Qnil); \ | ||
| 1794 | Fsignal (Qquit, Qnil); \ | 1798 | Fsignal (Qquit, Qnil); \ |
| 1795 | } \ | 1799 | } \ |
| 1796 | else if (interrupt_input_pending) \ | 1800 | else if (interrupt_input_pending) \ |
| @@ -1803,7 +1807,10 @@ extern int interrupt_input_pending; | |||
| 1803 | do { \ | 1807 | do { \ |
| 1804 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 1808 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 1805 | { \ | 1809 | { \ |
| 1810 | Lisp_Object flag = Vquit_flag; \ | ||
| 1806 | Vquit_flag = Qnil; \ | 1811 | Vquit_flag = Qnil; \ |
| 1812 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 1813 | Fthrow (Vthrow_on_input, Qnil); \ | ||
| 1807 | Fsignal (Qquit, Qnil); \ | 1814 | Fsignal (Qquit, Qnil); \ |
| 1808 | } \ | 1815 | } \ |
| 1809 | } while (0) | 1816 | } while (0) |
| @@ -2917,6 +2924,7 @@ extern struct kboard *echo_kboard; | |||
| 2917 | extern void cancel_echoing P_ ((void)); | 2924 | extern void cancel_echoing P_ ((void)); |
| 2918 | extern Lisp_Object Qdisabled, QCfilter; | 2925 | extern Lisp_Object Qdisabled, QCfilter; |
| 2919 | extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level; | 2926 | extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level; |
| 2927 | extern Lisp_Object Vthrow_on_input; | ||
| 2920 | extern int input_pending; | 2928 | extern int input_pending; |
| 2921 | EXFUN (Fdiscard_input, 0); | 2929 | EXFUN (Fdiscard_input, 0); |
| 2922 | EXFUN (Frecursive_edit, 0); | 2930 | 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. */) | |||
| 1227 | return call3 (alist, string, predicate, Qnil); | 1227 | return call3 (alist, string, predicate, Qnil); |
| 1228 | 1228 | ||
| 1229 | bestmatch = bucket = Qnil; | 1229 | bestmatch = bucket = Qnil; |
| 1230 | zero = make_number (0); | ||
| 1230 | 1231 | ||
| 1231 | /* If ALIST is not a list, set TAIL just for gc pro. */ | 1232 | /* If ALIST is not a list, set TAIL just for gc pro. */ |
| 1232 | tail = alist; | 1233 | tail = alist; |
| @@ -1253,7 +1254,7 @@ is used to further constrain the set of candidates. */) | |||
| 1253 | } | 1254 | } |
| 1254 | else if (type == 2) | 1255 | else if (type == 2) |
| 1255 | { | 1256 | { |
| 1256 | if (XFASTINT (bucket) != 0) | 1257 | if (!EQ (bucket, zero)) |
| 1257 | { | 1258 | { |
| 1258 | elt = bucket; | 1259 | elt = bucket; |
| 1259 | eltstring = Fsymbol_name (elt); | 1260 | eltstring = Fsymbol_name (elt); |
| @@ -1285,16 +1286,14 @@ is used to further constrain the set of candidates. */) | |||
| 1285 | 1286 | ||
| 1286 | if (STRINGP (eltstring) | 1287 | if (STRINGP (eltstring) |
| 1287 | && SCHARS (string) <= SCHARS (eltstring) | 1288 | && SCHARS (string) <= SCHARS (eltstring) |
| 1288 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1289 | && (tem = Fcompare_strings (eltstring, zero, |
| 1289 | make_number (SCHARS (string)), | 1290 | make_number (SCHARS (string)), |
| 1290 | string, make_number (0), Qnil, | 1291 | string, zero, Qnil, |
| 1291 | completion_ignore_case ? Qt : Qnil), | 1292 | completion_ignore_case ? Qt : Qnil), |
| 1292 | EQ (Qt, tem))) | 1293 | EQ (Qt, tem))) |
| 1293 | { | 1294 | { |
| 1294 | /* Yes. */ | 1295 | /* Yes. */ |
| 1295 | Lisp_Object regexps; | 1296 | Lisp_Object regexps; |
| 1296 | Lisp_Object zero; | ||
| 1297 | XSETFASTINT (zero, 0); | ||
| 1298 | 1297 | ||
| 1299 | /* Ignore this element if it fails to match all the regexps. */ | 1298 | /* Ignore this element if it fails to match all the regexps. */ |
| 1300 | { | 1299 | { |
| @@ -1348,9 +1347,9 @@ is used to further constrain the set of candidates. */) | |||
| 1348 | else | 1347 | else |
| 1349 | { | 1348 | { |
| 1350 | compare = min (bestmatchsize, SCHARS (eltstring)); | 1349 | compare = min (bestmatchsize, SCHARS (eltstring)); |
| 1351 | tem = Fcompare_strings (bestmatch, make_number (0), | 1350 | tem = Fcompare_strings (bestmatch, zero, |
| 1352 | make_number (compare), | 1351 | make_number (compare), |
| 1353 | eltstring, make_number (0), | 1352 | eltstring, zero, |
| 1354 | make_number (compare), | 1353 | make_number (compare), |
| 1355 | completion_ignore_case ? Qt : Qnil); | 1354 | completion_ignore_case ? Qt : Qnil); |
| 1356 | if (EQ (tem, Qt)) | 1355 | if (EQ (tem, Qt)) |
| @@ -1381,15 +1380,15 @@ is used to further constrain the set of candidates. */) | |||
| 1381 | ((matchsize == SCHARS (eltstring)) | 1380 | ((matchsize == SCHARS (eltstring)) |
| 1382 | == | 1381 | == |
| 1383 | (matchsize == SCHARS (bestmatch)) | 1382 | (matchsize == SCHARS (bestmatch)) |
| 1384 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1383 | && (tem = Fcompare_strings (eltstring, zero, |
| 1385 | make_number (SCHARS (string)), | 1384 | make_number (SCHARS (string)), |
| 1386 | string, make_number (0), | 1385 | string, zero, |
| 1387 | Qnil, | 1386 | Qnil, |
| 1388 | Qnil), | 1387 | Qnil), |
| 1389 | EQ (Qt, tem)) | 1388 | EQ (Qt, tem)) |
| 1390 | && (tem = Fcompare_strings (bestmatch, make_number (0), | 1389 | && (tem = Fcompare_strings (bestmatch, zero, |
| 1391 | make_number (SCHARS (string)), | 1390 | make_number (SCHARS (string)), |
| 1392 | string, make_number (0), | 1391 | string, zero, |
| 1393 | Qnil, | 1392 | Qnil, |
| 1394 | Qnil), | 1393 | Qnil), |
| 1395 | ! EQ (Qt, tem)))) | 1394 | ! EQ (Qt, tem)))) |
| @@ -1476,13 +1475,14 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1476 | || NILP (XCAR (alist)))); | 1475 | || NILP (XCAR (alist)))); |
| 1477 | int index = 0, obsize = 0; | 1476 | int index = 0, obsize = 0; |
| 1478 | int bindcount = -1; | 1477 | int bindcount = -1; |
| 1479 | Lisp_Object bucket, tem; | 1478 | Lisp_Object bucket, tem, zero; |
| 1480 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 1479 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 1481 | 1480 | ||
| 1482 | CHECK_STRING (string); | 1481 | CHECK_STRING (string); |
| 1483 | if (type == 0) | 1482 | if (type == 0) |
| 1484 | return call3 (alist, string, predicate, Qt); | 1483 | return call3 (alist, string, predicate, Qt); |
| 1485 | allmatches = bucket = Qnil; | 1484 | allmatches = bucket = Qnil; |
| 1485 | zero = make_number (0); | ||
| 1486 | 1486 | ||
| 1487 | /* If ALIST is not a list, set TAIL just for gc pro. */ | 1487 | /* If ALIST is not a list, set TAIL just for gc pro. */ |
| 1488 | tail = alist; | 1488 | tail = alist; |
| @@ -1509,7 +1509,7 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1509 | } | 1509 | } |
| 1510 | else if (type == 2) | 1510 | else if (type == 2) |
| 1511 | { | 1511 | { |
| 1512 | if (XFASTINT (bucket) != 0) | 1512 | if (!EQ (bucket, zero)) |
| 1513 | { | 1513 | { |
| 1514 | elt = bucket; | 1514 | elt = bucket; |
| 1515 | eltstring = Fsymbol_name (elt); | 1515 | eltstring = Fsymbol_name (elt); |
| @@ -1547,9 +1547,9 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1547 | && SREF (string, 0) == ' ') | 1547 | && SREF (string, 0) == ' ') |
| 1548 | || SREF (eltstring, 0) != ' ' | 1548 | || SREF (eltstring, 0) != ' ' |
| 1549 | || NILP (hide_spaces)) | 1549 | || NILP (hide_spaces)) |
| 1550 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1550 | && (tem = Fcompare_strings (eltstring, zero, |
| 1551 | make_number (SCHARS (string)), | 1551 | make_number (SCHARS (string)), |
| 1552 | string, make_number (0), | 1552 | string, zero, |
| 1553 | make_number (SCHARS (string)), | 1553 | make_number (SCHARS (string)), |
| 1554 | completion_ignore_case ? Qt : Qnil), | 1554 | completion_ignore_case ? Qt : Qnil), |
| 1555 | EQ (Qt, tem))) | 1555 | 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 | |||
| 1320 | (arg) | 1320 | (arg) |
| 1321 | Lisp_Object arg; | 1321 | Lisp_Object arg; |
| 1322 | { | 1322 | { |
| 1323 | Lisp_Object tmp; | ||
| 1323 | int orig_val, val; | 1324 | int orig_val, val; |
| 1324 | 1325 | ||
| 1325 | if (NILP (arg)) | 1326 | if (NILP (arg)) |
| @@ -1332,8 +1333,9 @@ and the function returns nil. Field boundaries are not noticed if | |||
| 1332 | val = XINT (arg) > 0 ? ZV : BEGV; | 1333 | val = XINT (arg) > 0 ? ZV : BEGV; |
| 1333 | 1334 | ||
| 1334 | /* Avoid jumping out of an input field. */ | 1335 | /* Avoid jumping out of an input field. */ |
| 1335 | val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), | 1336 | tmp = Fconstrain_to_field (make_number (val), make_number (PT), |
| 1336 | Qt, Qnil, Qnil)); | 1337 | Qt, Qnil, Qnil); |
| 1338 | val = XFASTINT (tmp); | ||
| 1337 | 1339 | ||
| 1338 | SET_PT (val); | 1340 | SET_PT (val); |
| 1339 | return val == orig_val ? Qt : Qnil; | 1341 | 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 | |||
| 5542 | x_calc_absolute_position (f) | 5542 | x_calc_absolute_position (f) |
| 5543 | struct frame *f; | 5543 | struct frame *f; |
| 5544 | { | 5544 | { |
| 5545 | POINT pt; | ||
| 5546 | int flags = f->size_hint_flags; | 5545 | int flags = f->size_hint_flags; |
| 5547 | 5546 | ||
| 5548 | pt.x = pt.y = 0; | ||
| 5549 | |||
| 5550 | /* Find the position of the outside upper-left corner of | ||
| 5551 | the inner window, with respect to the outer window. | ||
| 5552 | But do this only if we will need the results. */ | ||
| 5553 | if (f->output_data.w32->parent_desc != FRAME_W32_DISPLAY_INFO (f)->root_window) | ||
| 5554 | { | ||
| 5555 | BLOCK_INPUT; | ||
| 5556 | MapWindowPoints (FRAME_W32_WINDOW (f), | ||
| 5557 | f->output_data.w32->parent_desc, | ||
| 5558 | &pt, 1); | ||
| 5559 | UNBLOCK_INPUT; | ||
| 5560 | } | ||
| 5561 | |||
| 5562 | { | ||
| 5563 | RECT rt; | ||
| 5564 | rt.left = rt.right = rt.top = rt.bottom = 0; | ||
| 5565 | |||
| 5566 | BLOCK_INPUT; | ||
| 5567 | AdjustWindowRect(&rt, f->output_data.w32->dwStyle, | ||
| 5568 | FRAME_EXTERNAL_MENU_BAR (f)); | ||
| 5569 | UNBLOCK_INPUT; | ||
| 5570 | |||
| 5571 | pt.x += (rt.right - rt.left); | ||
| 5572 | pt.y += (rt.bottom - rt.top); | ||
| 5573 | } | ||
| 5574 | |||
| 5575 | /* Treat negative positions as relative to the leftmost bottommost | 5547 | /* Treat negative positions as relative to the leftmost bottommost |
| 5576 | position that fits on the screen. */ | 5548 | position that fits on the screen. */ |
| 5577 | if (flags & XNegative) | 5549 | if (flags & XNegative) |
| 5578 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width | 5550 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width |
| 5579 | - 2 * f->border_width - pt.x | ||
| 5580 | - FRAME_PIXEL_WIDTH (f) | 5551 | - FRAME_PIXEL_WIDTH (f) |
| 5581 | + f->left_pos); | 5552 | + f->left_pos); |
| 5582 | 5553 | ||
| 5583 | if (flags & YNegative) | 5554 | if (flags & YNegative) |
| 5584 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height | 5555 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height |
| 5585 | - 2 * f->border_width - pt.y | ||
| 5586 | - FRAME_PIXEL_HEIGHT (f) | 5556 | - FRAME_PIXEL_HEIGHT (f) |
| 5587 | + f->top_pos); | 5557 | + f->top_pos); |
| 5588 | /* The left_pos and top_pos | 5558 | /* 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; | |||
| 343 | 343 | ||
| 344 | Lisp_Object Qtrailing_whitespace; | 344 | Lisp_Object Qtrailing_whitespace; |
| 345 | 345 | ||
| 346 | /* Name and number of the face used to highlight escape glyphs. */ | ||
| 347 | |||
| 348 | Lisp_Object Qescape_glyph; | ||
| 349 | int escape_glyph_face; | ||
| 350 | |||
| 346 | /* The symbol `image' which is the car of the lists used to represent | 351 | /* The symbol `image' which is the car of the lists used to represent |
| 347 | images in Lisp. */ | 352 | images in Lisp. */ |
| 348 | 353 | ||
| @@ -5014,6 +5019,21 @@ get_next_display_element (it) | |||
| 5014 | display. Then, set IT->dpvec to these glyphs. */ | 5019 | display. Then, set IT->dpvec to these glyphs. */ |
| 5015 | GLYPH g; | 5020 | GLYPH g; |
| 5016 | int ctl_len; | 5021 | int ctl_len; |
| 5022 | int face_id = escape_glyph_face; | ||
| 5023 | |||
| 5024 | /* Find the face id if `escape-glyph' unless we recently did. */ | ||
| 5025 | if (face_id < 0) | ||
| 5026 | { | ||
| 5027 | Lisp_Object tem = Fget (Qescape_glyph, Qface); | ||
| 5028 | if (INTEGERP (tem)) | ||
| 5029 | face_id = XINT (tem); | ||
| 5030 | else | ||
| 5031 | face_id = 0; | ||
| 5032 | /* If there's overflow, use 0 instead. */ | ||
| 5033 | if (FAST_GLYPH_FACE (FAST_MAKE_GLYPH (0, face_id)) != face_id) | ||
| 5034 | face_id = 0; | ||
| 5035 | escape_glyph_face = face_id; | ||
| 5036 | } | ||
| 5017 | 5037 | ||
| 5018 | if (it->c < 128 && it->ctl_arrow_p) | 5038 | if (it->c < 128 && it->ctl_arrow_p) |
| 5019 | { | 5039 | { |
| @@ -5023,10 +5043,10 @@ get_next_display_element (it) | |||
| 5023 | && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp)))) | 5043 | && GLYPH_CHAR_VALID_P (XINT (DISP_CTRL_GLYPH (it->dp)))) |
| 5024 | g = XINT (DISP_CTRL_GLYPH (it->dp)); | 5044 | g = XINT (DISP_CTRL_GLYPH (it->dp)); |
| 5025 | else | 5045 | else |
| 5026 | g = FAST_MAKE_GLYPH ('^', 0); | 5046 | g = FAST_MAKE_GLYPH ('^', face_id); |
| 5027 | XSETINT (it->ctl_chars[0], g); | 5047 | XSETINT (it->ctl_chars[0], g); |
| 5028 | 5048 | ||
| 5029 | g = FAST_MAKE_GLYPH (it->c ^ 0100, 0); | 5049 | g = FAST_MAKE_GLYPH (it->c ^ 0100, face_id); |
| 5030 | XSETINT (it->ctl_chars[1], g); | 5050 | XSETINT (it->ctl_chars[1], g); |
| 5031 | ctl_len = 2; | 5051 | ctl_len = 2; |
| 5032 | } | 5052 | } |
| @@ -5043,7 +5063,7 @@ get_next_display_element (it) | |||
| 5043 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) | 5063 | && GLYPH_CHAR_VALID_P (XFASTINT (DISP_ESCAPE_GLYPH (it->dp)))) |
| 5044 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); | 5064 | escape_glyph = XFASTINT (DISP_ESCAPE_GLYPH (it->dp)); |
| 5045 | else | 5065 | else |
| 5046 | escape_glyph = FAST_MAKE_GLYPH ('\\', 0); | 5066 | escape_glyph = FAST_MAKE_GLYPH ('\\', face_id); |
| 5047 | 5067 | ||
| 5048 | if (CHAR_BYTE8_P (it->c)) | 5068 | if (CHAR_BYTE8_P (it->c)) |
| 5049 | { | 5069 | { |
| @@ -5074,11 +5094,14 @@ get_next_display_element (it) | |||
| 5074 | XSETINT (it->ctl_chars[i * 4], escape_glyph); | 5094 | XSETINT (it->ctl_chars[i * 4], escape_glyph); |
| 5075 | /* Insert three more glyphs into IT->ctl_chars for | 5095 | /* Insert three more glyphs into IT->ctl_chars for |
| 5076 | the octal display of the character. */ | 5096 | the octal display of the character. */ |
| 5077 | g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0', 0); | 5097 | g = FAST_MAKE_GLYPH (((str[i] >> 6) & 7) + '0', |
| 5098 | face_id); | ||
| 5078 | XSETINT (it->ctl_chars[i * 4 + 1], g); | 5099 | XSETINT (it->ctl_chars[i * 4 + 1], g); |
| 5079 | g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0', 0); | 5100 | g = FAST_MAKE_GLYPH (((str[i] >> 3) & 7) + '0', |
| 5101 | face_id); | ||
| 5080 | XSETINT (it->ctl_chars[i * 4 + 2], g); | 5102 | XSETINT (it->ctl_chars[i * 4 + 2], g); |
| 5081 | g = FAST_MAKE_GLYPH ((str[i] & 7) + '0', 0); | 5103 | g = FAST_MAKE_GLYPH ((str[i] & 7) + '0', |
| 5104 | face_id); | ||
| 5082 | XSETINT (it->ctl_chars[i * 4 + 3], g); | 5105 | XSETINT (it->ctl_chars[i * 4 + 3], g); |
| 5083 | } | 5106 | } |
| 5084 | ctl_len = len * 4; | 5107 | ctl_len = len * 4; |
| @@ -5217,6 +5240,9 @@ set_iterator_to_next (it, reseat_p) | |||
| 5217 | it->dpvec = NULL; | 5240 | it->dpvec = NULL; |
| 5218 | it->current.dpvec_index = -1; | 5241 | it->current.dpvec_index = -1; |
| 5219 | 5242 | ||
| 5243 | /* Recheck faces after display vector */ | ||
| 5244 | it->stop_charpos = 0; | ||
| 5245 | |||
| 5220 | /* Skip over characters which were displayed via IT->dpvec. */ | 5246 | /* Skip over characters which were displayed via IT->dpvec. */ |
| 5221 | if (it->dpvec_char_len < 0) | 5247 | if (it->dpvec_char_len < 0) |
| 5222 | reseat_at_next_visible_line_start (it, 1); | 5248 | reseat_at_next_visible_line_start (it, 1); |
| @@ -11679,6 +11705,9 @@ redisplay_window (window, just_this_one_p) | |||
| 11679 | *w->desired_matrix->method = 0; | 11705 | *w->desired_matrix->method = 0; |
| 11680 | #endif | 11706 | #endif |
| 11681 | 11707 | ||
| 11708 | /* Force this to be looked up again for each redisp of each window. */ | ||
| 11709 | escape_glyph_face = -1; | ||
| 11710 | |||
| 11682 | specbind (Qinhibit_point_motion_hooks, Qt); | 11711 | specbind (Qinhibit_point_motion_hooks, Qt); |
| 11683 | 11712 | ||
| 11684 | reconsider_clip_changes (w, buffer); | 11713 | reconsider_clip_changes (w, buffer); |
| @@ -22292,6 +22321,8 @@ syms_of_xdisp () | |||
| 22292 | staticpro (&Qfontification_functions); | 22321 | staticpro (&Qfontification_functions); |
| 22293 | Qtrailing_whitespace = intern ("trailing-whitespace"); | 22322 | Qtrailing_whitespace = intern ("trailing-whitespace"); |
| 22294 | staticpro (&Qtrailing_whitespace); | 22323 | staticpro (&Qtrailing_whitespace); |
| 22324 | Qescape_glyph = intern ("escape-glyph"); | ||
| 22325 | staticpro (&Qescape_glyph); | ||
| 22295 | Qimage = intern ("image"); | 22326 | Qimage = intern ("image"); |
| 22296 | staticpro (&Qimage); | 22327 | staticpro (&Qimage); |
| 22297 | QCmap = intern (":map"); | 22328 | 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) | |||
| 8171 | if (! ((flags & XNegative) || (flags & YNegative))) | 8171 | if (! ((flags & XNegative) || (flags & YNegative))) |
| 8172 | return; | 8172 | return; |
| 8173 | 8173 | ||
| 8174 | /* Find the offsets of the outside upper-left corner of | ||
| 8175 | the inner window, with respect to the outer window. | ||
| 8176 | But do this only if we will need the results. */ | ||
| 8177 | if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) | ||
| 8178 | /* This is to get *_pixels_outer_diff. */ | ||
| 8179 | x_real_positions (f, &win_x, &win_y); | ||
| 8180 | |||
| 8181 | /* Treat negative positions as relative to the leftmost bottommost | 8174 | /* Treat negative positions as relative to the leftmost bottommost |
| 8182 | position that fits on the screen. */ | 8175 | position that fits on the screen. */ |
| 8183 | if (flags & XNegative) | 8176 | if (flags & XNegative) |
| 8184 | f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width | 8177 | f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width |
| 8185 | - 2 * FRAME_X_OUTPUT (f)->x_pixels_outer_diff | 8178 | - FRAME_PIXEL_WIDTH (f) + f->left_pos); |
| 8186 | - FRAME_PIXEL_WIDTH (f) | ||
| 8187 | + f->left_pos); | ||
| 8188 | 8179 | ||
| 8189 | { | 8180 | { |
| 8190 | int height = FRAME_PIXEL_HEIGHT (f); | 8181 | int height = FRAME_PIXEL_HEIGHT (f); |
| @@ -8206,15 +8197,7 @@ x_calc_absolute_position (f) | |||
| 8206 | #endif | 8197 | #endif |
| 8207 | 8198 | ||
| 8208 | if (flags & YNegative) | 8199 | if (flags & YNegative) |
| 8209 | f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height | 8200 | f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - height + f->top_pos); |
| 8210 | - FRAME_X_OUTPUT (f)->y_pixels_outer_diff | ||
| 8211 | |||
| 8212 | /* Assume the window manager decorations are the same size on | ||
| 8213 | three sides, i.e. left, right and bottom. This is to | ||
| 8214 | compensate for the bottom part. */ | ||
| 8215 | - FRAME_X_OUTPUT (f)->x_pixels_outer_diff | ||
| 8216 | - height | ||
| 8217 | + f->top_pos); | ||
| 8218 | } | 8201 | } |
| 8219 | 8202 | ||
| 8220 | /* The left_pos and top_pos | 8203 | /* The left_pos and top_pos |
| @@ -8330,7 +8313,9 @@ x_check_expected_move (f) | |||
| 8330 | FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; | 8313 | FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; |
| 8331 | FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; | 8314 | FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; |
| 8332 | 8315 | ||
| 8333 | x_set_offset (f, expect_left, expect_top, 1); | 8316 | f->left_pos = expect_left; |
| 8317 | f->top_pos = expect_top; | ||
| 8318 | x_set_offset (f, expect_left, expect_top, 0); | ||
| 8334 | } | 8319 | } |
| 8335 | else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) | 8320 | else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) |
| 8336 | FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; | 8321 | FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; |