diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gdbinit | 27 | ||||
| -rw-r--r-- | src/ChangeLog | 192 | ||||
| -rw-r--r-- | src/alloc.c | 96 | ||||
| -rw-r--r-- | src/callproc.c | 22 | ||||
| -rw-r--r-- | src/cmds.c | 23 | ||||
| -rw-r--r-- | src/data.c | 10 | ||||
| -rw-r--r-- | src/dired.c | 13 | ||||
| -rw-r--r-- | src/editfns.c | 60 | ||||
| -rw-r--r-- | src/frame.c | 17 | ||||
| -rw-r--r-- | src/keyboard.c | 16 | ||||
| -rw-r--r-- | src/keymap.c | 6 | ||||
| -rw-r--r-- | src/lread.c | 8 | ||||
| -rw-r--r-- | src/minibuf.c | 3 | ||||
| -rw-r--r-- | src/regex.c | 9 | ||||
| -rw-r--r-- | src/s/irix6-5.h | 4 | ||||
| -rw-r--r-- | src/w32.c | 18 | ||||
| -rw-r--r-- | src/xdisp.c | 45 | ||||
| -rw-r--r-- | src/xfns.c | 8 | ||||
| -rw-r--r-- | src/xterm.c | 102 |
19 files changed, 519 insertions, 160 deletions
diff --git a/src/.gdbinit b/src/.gdbinit index 1b8d17607ff..0d1f51e5d54 100644 --- a/src/.gdbinit +++ b/src/.gdbinit | |||
| @@ -766,18 +766,21 @@ show environment TERM | |||
| 766 | 766 | ||
| 767 | # People get bothered when they see messages about non-existent functions... | 767 | # People get bothered when they see messages about non-existent functions... |
| 768 | xgetptr Vsystem_type | 768 | xgetptr Vsystem_type |
| 769 | set $tem = (struct Lisp_Symbol *) $ptr | 769 | # $ptr is NULL in temacs |
| 770 | xgetptr $tem->xname | 770 | if ($ptr != 0) |
| 771 | set $tem = (struct Lisp_String *) $ptr | 771 | set $tem = (struct Lisp_Symbol *) $ptr |
| 772 | set $tem = (char *) $tem->data | 772 | xgetptr $tem->xname |
| 773 | 773 | set $tem = (struct Lisp_String *) $ptr | |
| 774 | # Don't let abort actually run, as it will make stdio stop working and | 774 | set $tem = (char *) $tem->data |
| 775 | # therefore the `pr' command above as well. | 775 | |
| 776 | if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd' | 776 | # Don't let abort actually run, as it will make stdio stop working and |
| 777 | # The windows-nt build replaces abort with its own function. | 777 | # therefore the `pr' command above as well. |
| 778 | break w32_abort | 778 | if $tem[0] == 'w' && $tem[1] == 'i' && $tem[2] == 'n' && $tem[3] == 'd' |
| 779 | else | 779 | # The windows-nt build replaces abort with its own function. |
| 780 | break abort | 780 | break w32_abort |
| 781 | else | ||
| 782 | break abort | ||
| 783 | end | ||
| 781 | end | 784 | end |
| 782 | 785 | ||
| 783 | # x_error_quitter is defined only on X. But window-system is set up | 786 | # x_error_quitter is defined only on X. But window-system is set up |
diff --git a/src/ChangeLog b/src/ChangeLog index b9bb573b326..4a48e9ac452 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,143 @@ | |||
| 1 | 2006-01-28 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * data.c (Fcar, Fcdr): Add links to Elisp manual to the docstrings. | ||
| 4 | |||
| 5 | 2006-01-27 Chong Yidong <cyd@stupidchicken.com> | ||
| 6 | |||
| 7 | * alloc.c (make_interval, allocate_string) | ||
| 8 | (allocate_string_data, make_float, Fcons, allocate_vectorlike) | ||
| 9 | (Fmake_symbol, allocate_misc): Use BLOCK_INPUT when accessing | ||
| 10 | global variables. | ||
| 11 | |||
| 12 | 2006-01-27 Eli Zaretskii <eliz@gnu.org> | ||
| 13 | |||
| 14 | * dired.c (DIRENTRY_NONEMPTY) [__CYGWIN__]: Don't use d_ino; use | ||
| 15 | the MSDOS definition. | ||
| 16 | |||
| 17 | 2006-01-26 Richard M. Stallman <rms@gnu.org> | ||
| 18 | |||
| 19 | * alloc.c (check_pure_size): Make overflow message an "error message". | ||
| 20 | |||
| 21 | * keymap.c (Fmap_keymap): Doc fix. | ||
| 22 | |||
| 23 | * xfns.c (Fx_create_frame): Put all specified parms into f->param_alist | ||
| 24 | unless they were cleared out. | ||
| 25 | |||
| 26 | * frame.c (x_get_arg): "Clear out" the parm in ALIST if found there. | ||
| 27 | |||
| 28 | 2006-01-26 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | ||
| 29 | |||
| 30 | * editfns.c (Fconstrain_to_field): Fix behaviour on field boundaries. | ||
| 31 | (find_field): Set before_field to after_field when pos is at BEGV. | ||
| 32 | (Fline_beginning_position, Fline_end_position): Clarify | ||
| 33 | confusing doc string. | ||
| 34 | |||
| 35 | * cmds.c (Fbeginning_of_line, Fend_of_line): Clarify confusing doc | ||
| 36 | string. | ||
| 37 | |||
| 38 | 2006-01-26 Kenichi Handa <handa@m17n.org> | ||
| 39 | |||
| 40 | * callproc.c (Fcall_process): GCPRO error_file. Encode infile, | ||
| 41 | current_dir, and error_file. On reporting an error, decode them | ||
| 42 | back. | ||
| 43 | |||
| 44 | 2006-01-24 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 45 | |||
| 46 | * regex.c (IMMEDIATE_QUIT_CHECK): Use it with SYNC_INPUT as well. | ||
| 47 | (re_match_2_internal) <on_failure_jump, on_failure_jump_smart>: | ||
| 48 | Don't check for quit, since any loop will go through fail or jump. | ||
| 49 | |||
| 50 | 2006-01-24 Chong Yidong <cyd@stupidchicken.com> | ||
| 51 | |||
| 52 | * alloc.c (allocate_string_data): Update next_free immediately, to | ||
| 53 | reduce risk of memory clobberage. | ||
| 54 | |||
| 55 | 2006-01-24 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu> | ||
| 56 | |||
| 57 | * xdisp.c (handle_invisible_prop): Set it->position to fix cursor | ||
| 58 | display when point moves across an ellipsis. If there are | ||
| 59 | adjacent invisible texts, don't lose the second one's ellipsis. | ||
| 60 | (x_produce_glyphs): Doc fix. | ||
| 61 | |||
| 62 | 2006-01-23 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 63 | |||
| 64 | * xterm.c (x_catch_errors_unwind): Yet another int/Lisp_Object mixup. | ||
| 65 | |||
| 66 | 2006-01-23 Kim F. Storm <storm@cua.dk> | ||
| 67 | |||
| 68 | * xdisp.c (handle_single_display_spec): Fix handling of space | ||
| 69 | property on char from string: set *position rather than | ||
| 70 | it->current.pos. | ||
| 71 | (produce_stretch_glyph): Reduce width of stretch glyphs so they | ||
| 72 | don't get wider than the window (unless truncate-lines is on). | ||
| 73 | |||
| 74 | 2006-01-22 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 75 | |||
| 76 | * xterm.c: Avoid allocating Lisp data from a signal handler. | ||
| 77 | (x_error_message): New var to replace x_error_message_string. | ||
| 78 | (x_error_catcher, x_catch_errors, x_catch_errors_unwind) | ||
| 79 | (x_check_errors, x_had_errors_p, x_clear_errors, x_error_handler) | ||
| 80 | (syms_of_xterm): Use it instead of x_error_message_string. | ||
| 81 | |||
| 82 | * alloc.c (lisp_align_free): Add an assertion. | ||
| 83 | (make_interval, allocate_string, make_float, Fcons, Fmake_symbol) | ||
| 84 | (allocate_misc): If ENABLE_CHECKING is on, check we're not called from | ||
| 85 | a signal handler. | ||
| 86 | |||
| 87 | 2006-01-21 Luc Teirlinck <teirllm@auburn.edu> | ||
| 88 | |||
| 89 | * dired.c (syms_of_dired) <completion-ignored-extensions>: Doc fix. | ||
| 90 | |||
| 91 | 2006-01-21 Romain Francoise <romain@orebokech.com> | ||
| 92 | |||
| 93 | * xdisp.c (get_window_cursor_type): Fix last change. | ||
| 94 | Update copyright year. | ||
| 95 | |||
| 96 | 2006-01-20 Eli Zaretskii <eliz@gnu.org> | ||
| 97 | |||
| 98 | * lread.c (Fload): Don't leak the file descriptor returned by | ||
| 99 | openp if we are going to signal an error. | ||
| 100 | |||
| 101 | * w32.c (sys_close): If FD is outside [0..MAXDESC) limits, pass it | ||
| 102 | directly to _close. | ||
| 103 | (sys_dup): Protect against new_fd larger than fd_info[] can handle. | ||
| 104 | (sys_read): If FD is outside [0..MAXDESC) limits, pass it directly | ||
| 105 | to _read. | ||
| 106 | (sys_write): If FD is outside [0..MAXDESC) limits, pass it | ||
| 107 | directly to _write. | ||
| 108 | |||
| 109 | * .gdbinit: Don't dereference Vsystem_type's Lisp_Symbol pointer | ||
| 110 | if it is NULL. | ||
| 111 | |||
| 112 | 2006-01-20 Kenichi Handa <handa@m17n.org> | ||
| 113 | |||
| 114 | * puresize.h (BASE_PURESIZE): Increment to 1190000. | ||
| 115 | |||
| 116 | 2006-01-19 Chong Yidong <cyd@stupidchicken.com> | ||
| 117 | |||
| 118 | * xdisp.c (get_window_cursor_type): Use cursor type specified by | ||
| 119 | the selected buffer for the echo area too. | ||
| 120 | |||
| 121 | 2006-01-19 Richard M. Stallman <rms@gnu.org> | ||
| 122 | |||
| 123 | * keymap.c (Fmap_keymap): Doc fix. | ||
| 124 | |||
| 125 | * s/irix6-5.h (GC_SETJMP_WORKS, GC_MARK_STACK): New definitions. | ||
| 126 | |||
| 127 | * keyboard.c (echo_char): Don't omit the space between first two | ||
| 128 | echoed chars. | ||
| 129 | |||
| 130 | * minibuf.c (read_minibuf): Fix previous change. | ||
| 131 | |||
| 132 | 2006-01-19 Kenichi Handa <handa@m17n.org> | ||
| 133 | |||
| 134 | * xterm.c (handle_one_xevent): Handle keysyms 0x1000000..0x10000FF. | ||
| 135 | |||
| 136 | 2006-01-17 Richard M. Stallman <rms@gnu.org> | ||
| 137 | |||
| 138 | * frame.c (x_frame_get_and_record_arg): Don't record Qunbound | ||
| 139 | value in f->param_alist. | ||
| 140 | |||
| 1 | 2006-01-15 Andreas Schwab <schwab@suse.de> | 141 | 2006-01-15 Andreas Schwab <schwab@suse.de> |
| 2 | 142 | ||
| 3 | * search.c (Freplace_match): Use UPPERCASEP instead of !NOCASEP. | 143 | * search.c (Freplace_match): Use UPPERCASEP instead of !NOCASEP. |
| @@ -562,7 +702,7 @@ | |||
| 562 | * w32fns.c (w32_abort) [__GNUC__]: Add instructions for attaching | 702 | * w32fns.c (w32_abort) [__GNUC__]: Add instructions for attaching |
| 563 | GDB to the abort dialog. | 703 | GDB to the abort dialog. |
| 564 | 704 | ||
| 565 | 2005-12-09 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change) | 705 | 2005-12-09 Kyotaro HORIGUCHI <horiguti@meadowy.org> (tiny change) |
| 566 | 706 | ||
| 567 | * indent.c (Fvertical_motion): Force move if starting on | 707 | * indent.c (Fvertical_motion): Force move if starting on |
| 568 | stretch glyph. | 708 | stretch glyph. |
| @@ -816,7 +956,7 @@ | |||
| 816 | 956 | ||
| 817 | * s/darwin.h (LIBS_CARBON) [!HAVE_CARBON]: Remove `-framework Carbon'. | 957 | * s/darwin.h (LIBS_CARBON) [!HAVE_CARBON]: Remove `-framework Carbon'. |
| 818 | 958 | ||
| 819 | 2005-11-11 David Reitter <david.reitter@gmail.com> | 959 | 2005-11-11 David Reitter <david.reitter@gmail.com> |
| 820 | 960 | ||
| 821 | * macterm.c (syms_of_macterm): Remove macCtrlKey, macShiftKey, | 961 | * macterm.c (syms_of_macterm): Remove macCtrlKey, macShiftKey, |
| 822 | macMetaKey, macAltKey. Introduce Qctrl, Qmeta, | 962 | macMetaKey, macAltKey. Introduce Qctrl, Qmeta, |
| @@ -848,7 +988,7 @@ | |||
| 848 | ignore_overlay_strings_at_pos_p if dpvec came from an overlay | 988 | ignore_overlay_strings_at_pos_p if dpvec came from an overlay |
| 849 | string, so we skip those overlay strings at current pos. | 989 | string, so we skip those overlay strings at current pos. |
| 850 | 990 | ||
| 851 | 2005-11-10 Lars Hansen <larsh@soem.dk> | 991 | 2005-11-10 Lars Hansen <larsh@soem.dk> |
| 852 | 992 | ||
| 853 | * fileio.c (file-regular-p): Doc fix. | 993 | * fileio.c (file-regular-p): Doc fix. |
| 854 | 994 | ||
| @@ -959,7 +1099,7 @@ | |||
| 959 | 1099 | ||
| 960 | * xdisp.c (display_line): Restore it->current_x and call | 1100 | * xdisp.c (display_line): Restore it->current_x and call |
| 961 | extend_face_to_end_of_line when last glyph doesn't fit on line. | 1101 | extend_face_to_end_of_line when last glyph doesn't fit on line. |
| 962 | (set_glyph_string_background_width): Remove specific tests here | 1102 | (set_glyph_string_background_width): Remove specific tests here |
| 963 | to see if face background should extend to end of line. Simplify. | 1103 | to see if face background should extend to end of line. Simplify. |
| 964 | 1104 | ||
| 965 | 2005-10-30 Richard M. Stallman <rms@gnu.org> | 1105 | 2005-10-30 Richard M. Stallman <rms@gnu.org> |
| @@ -1561,7 +1701,7 @@ | |||
| 1561 | 1701 | ||
| 1562 | * dispextern.h (fatal): Delete prototype. | 1702 | * dispextern.h (fatal): Delete prototype. |
| 1563 | 1703 | ||
| 1564 | * systime.h: (make_time): Prototype moved from ... | 1704 | * systime.h (make_time): Prototype moved from ... |
| 1565 | * editfns.c (make_time): ... here. | 1705 | * editfns.c (make_time): ... here. |
| 1566 | 1706 | ||
| 1567 | * editfns.c: Move systime.h include after lisp.h. | 1707 | * editfns.c: Move systime.h include after lisp.h. |
| @@ -1795,9 +1935,9 @@ | |||
| 1795 | get_current_dir_name. | 1935 | get_current_dir_name. |
| 1796 | (get_current_dir_name): Remove prototype. | 1936 | (get_current_dir_name): Remove prototype. |
| 1797 | 1937 | ||
| 1798 | * xsmfns.c: (get_current_dir_name): Remove prototype. | 1938 | * xsmfns.c (get_current_dir_name): Remove prototype. |
| 1799 | 1939 | ||
| 1800 | * lisp.h: (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]: | 1940 | * lisp.h (get_current_dir_name) [!HAVE_GET_CURRENT_DIR_NAME]: |
| 1801 | Add prototype. | 1941 | Add prototype. |
| 1802 | 1942 | ||
| 1803 | * sysdep.c [WINDOWSNT]: Add prototype for getwd. | 1943 | * sysdep.c [WINDOWSNT]: Add prototype for getwd. |
| @@ -2488,7 +2628,7 @@ | |||
| 2488 | 2628 | ||
| 2489 | * window.c (window_scroll_pixel_based, window_scroll_line_based): | 2629 | * window.c (window_scroll_pixel_based, window_scroll_line_based): |
| 2490 | Handle `scroll-preserve-screen-position' non-nil, non-t specially. | 2630 | Handle `scroll-preserve-screen-position' non-nil, non-t specially. |
| 2491 | (syms_of_window): <scroll-preserve-screen-position>: Doc fix. | 2631 | (syms_of_window) <scroll-preserve-screen-position>: Doc fix. |
| 2492 | 2632 | ||
| 2493 | 2005-07-02 Juri Linkov <juri@jurta.org> | 2633 | 2005-07-02 Juri Linkov <juri@jurta.org> |
| 2494 | 2634 | ||
| @@ -7116,7 +7256,7 @@ | |||
| 7116 | 7256 | ||
| 7117 | * config.in: Rebuild. | 7257 | * config.in: Rebuild. |
| 7118 | 7258 | ||
| 7119 | * Makefile.in: Run setarch i386 ./temacs if exec-shield is present. | 7259 | * Makefile.in: Run setarch i386 ./temacs if exec-shield is present. |
| 7120 | 7260 | ||
| 7121 | 2004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> | 7261 | 2004-09-18 Stefan Monnier <monnier@iro.umontreal.ca> |
| 7122 | 7262 | ||
| @@ -7696,7 +7836,7 @@ | |||
| 7696 | 7836 | ||
| 7697 | * buffer.c (Fswitch_to_buffer, Fpop_to_buffer): Doc fixes. | 7837 | * buffer.c (Fswitch_to_buffer, Fpop_to_buffer): Doc fixes. |
| 7698 | 7838 | ||
| 7699 | * window.c (Fwindow_buffer, Fother_window, Fget_lru_window) | 7839 | * window.c (Fwindow_buffer, Fother_window, Fget_lru_window) |
| 7700 | (Fget_largest_window, Fget_buffer_window, Fdelete_windows_on) | 7840 | (Fget_largest_window, Fget_buffer_window, Fdelete_windows_on) |
| 7701 | (Freplace_buffer_in_windows, Fset_window_buffer) | 7841 | (Freplace_buffer_in_windows, Fset_window_buffer) |
| 7702 | (Fselect-window, Fdisplay-buffer, Fsplit_window): Doc fixes. | 7842 | (Fselect-window, Fdisplay-buffer, Fsplit_window): Doc fixes. |
| @@ -9349,7 +9489,7 @@ | |||
| 9349 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) | 9489 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) |
| 9350 | (make_image, free_image, prepare_image_for_display, image_ascent) | 9490 | (make_image, free_image, prepare_image_for_display, image_ascent) |
| 9351 | (four_corners_best, image_background, image_background_transparent) | 9491 | (four_corners_best, image_background, image_background_transparent) |
| 9352 | (x_clear_image_1, x_clear_image, x_alloc_image_color) | 9492 | (x_clear_image_1, x_clear_image, x_alloc_image_color) |
| 9353 | (make_image_cache, free_image_cache, clear_image_cache) | 9493 | (make_image_cache, free_image_cache, clear_image_cache) |
| 9354 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) | 9494 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) |
| 9355 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) | 9495 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) |
| @@ -9387,7 +9527,7 @@ | |||
| 9387 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) | 9527 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) |
| 9388 | (make_image, free_image, prepare_image_for_display, image_ascent) | 9528 | (make_image, free_image, prepare_image_for_display, image_ascent) |
| 9389 | (four_corners_best, image_background, image_background_transparent) | 9529 | (four_corners_best, image_background, image_background_transparent) |
| 9390 | (x_clear_image_1, x_clear_image, x_alloc_image_color) | 9530 | (x_clear_image_1, x_clear_image, x_alloc_image_color) |
| 9391 | (make_image_cache, free_image_cache, clear_image_cache) | 9531 | (make_image_cache, free_image_cache, clear_image_cache) |
| 9392 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) | 9532 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) |
| 9393 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) | 9533 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) |
| @@ -9419,7 +9559,7 @@ | |||
| 9419 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) | 9559 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) |
| 9420 | (make_image, free_image, prepare_image_for_display, image_ascent) | 9560 | (make_image, free_image, prepare_image_for_display, image_ascent) |
| 9421 | (four_corners_best, image_background, image_background_transparent) | 9561 | (four_corners_best, image_background, image_background_transparent) |
| 9422 | (x_clear_image_1, x_clear_image, x_alloc_image_color) | 9562 | (x_clear_image_1, x_clear_image, x_alloc_image_color) |
| 9423 | (make_image_cache, free_image_cache, clear_image_cache) | 9563 | (make_image_cache, free_image_cache, clear_image_cache) |
| 9424 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) | 9564 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) |
| 9425 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) | 9565 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) |
| @@ -9449,7 +9589,7 @@ | |||
| 9449 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) | 9589 | (parse_image_spec, image_spec_value, Fimage_size, Fimage_mask_p) |
| 9450 | (make_image, free_image, prepare_image_for_display, image_ascent) | 9590 | (make_image, free_image, prepare_image_for_display, image_ascent) |
| 9451 | (four_corners_best, image_background, image_background_transparent) | 9591 | (four_corners_best, image_background, image_background_transparent) |
| 9452 | (x_clear_image_1, x_clear_image, x_alloc_image_color) | 9592 | (x_clear_image_1, x_clear_image, x_alloc_image_color) |
| 9453 | (make_image_cache, free_image_cache, clear_image_cache) | 9593 | (make_image_cache, free_image_cache, clear_image_cache) |
| 9454 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) | 9594 | (Fclear_image_cache, postprocess_image, lookup_image, cache_image) |
| 9455 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) | 9595 | (forall_images_in_image_cache, x_create_x_image_and_pixmap) |
| @@ -10224,7 +10364,7 @@ | |||
| 10224 | (Fx_change_window_property): Add declaration of parameters type and | 10364 | (Fx_change_window_property): Add declaration of parameters type and |
| 10225 | format. Remove unused variable cons. | 10365 | format. Remove unused variable cons. |
| 10226 | 10366 | ||
| 10227 | * xselect.c: Include stdio,h. | 10367 | * xselect.c: Include stdio.h. |
| 10228 | 10368 | ||
| 10229 | 2004-02-05 Kenichi Handa <handa@m17n.org> | 10369 | 2004-02-05 Kenichi Handa <handa@m17n.org> |
| 10230 | 10370 | ||
| @@ -11857,7 +11997,7 @@ | |||
| 11857 | 11997 | ||
| 11858 | 2003-07-13 Terje Rosten <terjeros@phys.ntnu.no> | 11998 | 2003-07-13 Terje Rosten <terjeros@phys.ntnu.no> |
| 11859 | 11999 | ||
| 11860 | * xterm.c (x_bitmap_icon,x_wm_set_icon_pixmap): Modify to add mask, | 12000 | * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap): Modify to add mask, |
| 11861 | and use the Gtk+ function gtk_window_icon_from_file if available. | 12001 | and use the Gtk+ function gtk_window_icon_from_file if available. |
| 11862 | 12002 | ||
| 11863 | * xfns.c (x_bitmap_mask, x_create_bitmap_mask): New functions to | 12003 | * xfns.c (x_bitmap_mask, x_create_bitmap_mask): New functions to |
| @@ -16436,7 +16576,7 @@ | |||
| 16436 | 2002-09-08 Kim F. Storm <storm@cua.dk> | 16576 | 2002-09-08 Kim F. Storm <storm@cua.dk> |
| 16437 | 16577 | ||
| 16438 | * macros.c (executing_macro_index): Change type to EMACS_INT. | 16578 | * macros.c (executing_macro_index): Change type to EMACS_INT. |
| 16439 | (syms_of_macros): DEFVAR_INT it (needed by kmacro). | 16579 | (syms_of_macros): DEFVAR_INT it (needed by kmacro). |
| 16440 | 16580 | ||
| 16441 | * macros.h (executing_macro_index): Change type to EMACS_INT. | 16581 | * macros.h (executing_macro_index): Change type to EMACS_INT. |
| 16442 | 16582 | ||
| @@ -18924,10 +19064,10 @@ | |||
| 18924 | Intern and staticpro QCtype and Qdatagram. | 19064 | Intern and staticpro QCtype and Qdatagram. |
| 18925 | (syms_of_process) [!subprocess]: Intern and staticpro QCtype. | 19065 | (syms_of_process) [!subprocess]: Intern and staticpro QCtype. |
| 18926 | 19066 | ||
| 18927 | * xfns.c: (QCtype): Remove duplicate declaration and | 19067 | * xfns.c (QCtype): Remove duplicate declaration and |
| 18928 | initialization (is now declared in process.c). | 19068 | initialization (is now declared in process.c). |
| 18929 | 19069 | ||
| 18930 | * w32fns.c: (QCtype): Remove duplicate declaration and | 19070 | * w32fns.c (QCtype): Remove duplicate declaration and |
| 18931 | initialization (is now declared in process.c). | 19071 | initialization (is now declared in process.c). |
| 18932 | 19072 | ||
| 18933 | 2002-03-21 Richard M. Stallman <rms@gnu.org> | 19073 | 2002-03-21 Richard M. Stallman <rms@gnu.org> |
| @@ -19042,7 +19182,7 @@ | |||
| 19042 | Doc fix: Member kill_without_query is inverse of query-on-exit flag. | 19182 | Doc fix: Member kill_without_query is inverse of query-on-exit flag. |
| 19043 | 19183 | ||
| 19044 | * process.c (Qlocal, QCname, QCbuffer, QChost, QCservice, QCfamily) | 19184 | * process.c (Qlocal, QCname, QCbuffer, QChost, QCservice, QCfamily) |
| 19045 | (QClocal, QCremote, QCserver, QCdatagram, QCnowait, QCnoquery,QCstop) | 19185 | (QClocal, QCremote, QCserver, QCdatagram, QCnowait, QCnoquery, QCstop) |
| 19046 | (QCcoding, QCoptions, QCfilter, QCsentinel, QClog, QCfeature): | 19186 | (QCcoding, QCoptions, QCfilter, QCsentinel, QClog, QCfeature): |
| 19047 | New variables. | 19187 | New variables. |
| 19048 | (NETCONN1_P): New macro. | 19188 | (NETCONN1_P): New macro. |
| @@ -19372,7 +19512,7 @@ | |||
| 19372 | 19512 | ||
| 19373 | 2002-02-28 Kim F. Storm <storm@cua.dk> | 19513 | 2002-02-28 Kim F. Storm <storm@cua.dk> |
| 19374 | 19514 | ||
| 19375 | * window.c: (minibuf_selected_window): Renamed from | 19515 | * window.c (minibuf_selected_window): Renamed from |
| 19376 | Vminibuf_selected_window. Users changed. | 19516 | Vminibuf_selected_window. Users changed. |
| 19377 | (syms_of_window): Staticpro it. | 19517 | (syms_of_window): Staticpro it. |
| 19378 | 19518 | ||
| @@ -19382,14 +19522,14 @@ | |||
| 19382 | which is similar to Vminibuf_scroll_window, but which is only set | 19522 | which is similar to Vminibuf_scroll_window, but which is only set |
| 19383 | on entry to the minibuffer (from a non-minibuffer window): | 19523 | on entry to the minibuffer (from a non-minibuffer window): |
| 19384 | 19524 | ||
| 19385 | * window.c: (Vminibuf_selected_window): New variable. | 19525 | * window.c (Vminibuf_selected_window): New variable. |
| 19386 | (struct save_window_data): New member minibuf_selected_window. | 19526 | (struct save_window_data): New member minibuf_selected_window. |
| 19387 | (Fset_window_configuration): Restore Vminibuf_selected_window. | 19527 | (Fset_window_configuration): Restore Vminibuf_selected_window. |
| 19388 | (Fcurrent_window_configuration): Save Vminibuf_selected_window. | 19528 | (Fcurrent_window_configuration): Save Vminibuf_selected_window. |
| 19389 | Set minibuf_scroll_window member to nil if minibuf_level is 0. | 19529 | Set minibuf_scroll_window member to nil if minibuf_level is 0. |
| 19390 | (compare_window_configurations): Compare minibuf_selected_window. | 19530 | (compare_window_configurations): Compare minibuf_selected_window. |
| 19391 | 19531 | ||
| 19392 | * window.h: (Vminibuf_selected_window): Declare extern. | 19532 | * window.h (Vminibuf_selected_window): Declare extern. |
| 19393 | 19533 | ||
| 19394 | * minibuf.c (read_minibuf): Set Vminibuf_selected_window on first | 19534 | * minibuf.c (read_minibuf): Set Vminibuf_selected_window on first |
| 19395 | entry to minibuffer or on entry from a non-minibuffer window. | 19535 | entry to minibuffer or on entry from a non-minibuffer window. |
| @@ -19515,7 +19655,7 @@ | |||
| 19515 | 19655 | ||
| 19516 | 2002-02-22 Eli Zaretskii <eliz@is.elta.co.il> | 19656 | 2002-02-22 Eli Zaretskii <eliz@is.elta.co.il> |
| 19517 | 19657 | ||
| 19518 | Support for ICCCM Extended Segments in X selections: | 19658 | Support for ICCCM Extended Segments in X selections: |
| 19519 | 19659 | ||
| 19520 | * xselect.c <Qcompound_text_no_extensions>: New variable. | 19660 | * xselect.c <Qcompound_text_no_extensions>: New variable. |
| 19521 | (syms_of_xselect): Intern and staticpro it. | 19661 | (syms_of_xselect): Intern and staticpro it. |
| @@ -19669,7 +19809,7 @@ | |||
| 19669 | 19809 | ||
| 19670 | 2002-02-13 Kim F. Storm <storm@cua.dk> | 19810 | 2002-02-13 Kim F. Storm <storm@cua.dk> |
| 19671 | 19811 | ||
| 19672 | * window.c: (Vmode_line_in_non_selected_windows): Removed. | 19812 | * window.c (Vmode_line_in_non_selected_windows): Removed. |
| 19673 | (mode_line_in_non_selected_windows): New variable. | 19813 | (mode_line_in_non_selected_windows): New variable. |
| 19674 | (syms_of_window): DEFVAR_BOOL it. | 19814 | (syms_of_window): DEFVAR_BOOL it. |
| 19675 | 19815 | ||
| @@ -19700,7 +19840,7 @@ | |||
| 19700 | 19840 | ||
| 19701 | 2002-02-11 Kim F. Storm <storm@cua.dk> | 19841 | 2002-02-11 Kim F. Storm <storm@cua.dk> |
| 19702 | 19842 | ||
| 19703 | * window.c: (Vmode_line_in_non_selected_windows): New variable. | 19843 | * window.c (Vmode_line_in_non_selected_windows): New variable. |
| 19704 | (syms_of_window): DEFVAR_LISP it. | 19844 | (syms_of_window): DEFVAR_LISP it. |
| 19705 | 19845 | ||
| 19706 | * dispextern.h (CURRENT_MODE_LINE_FACE_ID_3): New macro. | 19846 | * dispextern.h (CURRENT_MODE_LINE_FACE_ID_3): New macro. |
diff --git a/src/alloc.c b/src/alloc.c index cf86c80deaf..be03f4ebf7c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. | 1 | /* Storage allocation and gc for GNU Emacs Lisp interpreter. |
| 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, | 2 | Copyright (C) 1985, 1986, 1988, 1993, 1994, 1995, 1997, 1998, 1999, |
| 3 | 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1107,6 +1107,9 @@ lisp_align_free (block) | |||
| 1107 | } | 1107 | } |
| 1108 | eassert ((aligned & 1) == aligned); | 1108 | eassert ((aligned & 1) == aligned); |
| 1109 | eassert (i == (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1)); | 1109 | eassert (i == (aligned ? ABLOCKS_SIZE : ABLOCKS_SIZE - 1)); |
| 1110 | #ifdef HAVE_POSIX_MEMALIGN | ||
| 1111 | eassert ((unsigned long)ABLOCKS_BASE (abase) % BLOCK_ALIGN == 0); | ||
| 1112 | #endif | ||
| 1110 | free (ABLOCKS_BASE (abase)); | 1113 | free (ABLOCKS_BASE (abase)); |
| 1111 | } | 1114 | } |
| 1112 | UNBLOCK_INPUT; | 1115 | UNBLOCK_INPUT; |
| @@ -1421,6 +1424,12 @@ make_interval () | |||
| 1421 | { | 1424 | { |
| 1422 | INTERVAL val; | 1425 | INTERVAL val; |
| 1423 | 1426 | ||
| 1427 | /* eassert (!handling_signal); */ | ||
| 1428 | |||
| 1429 | #ifndef SYNC_INPUT | ||
| 1430 | BLOCK_INPUT; | ||
| 1431 | #endif | ||
| 1432 | |||
| 1424 | if (interval_free_list) | 1433 | if (interval_free_list) |
| 1425 | { | 1434 | { |
| 1426 | val = interval_free_list; | 1435 | val = interval_free_list; |
| @@ -1442,6 +1451,11 @@ make_interval () | |||
| 1442 | } | 1451 | } |
| 1443 | val = &interval_block->intervals[interval_block_index++]; | 1452 | val = &interval_block->intervals[interval_block_index++]; |
| 1444 | } | 1453 | } |
| 1454 | |||
| 1455 | #ifndef SYNC_INPUT | ||
| 1456 | UNBLOCK_INPUT; | ||
| 1457 | #endif | ||
| 1458 | |||
| 1445 | consing_since_gc += sizeof (struct interval); | 1459 | consing_since_gc += sizeof (struct interval); |
| 1446 | intervals_consed++; | 1460 | intervals_consed++; |
| 1447 | RESET_INTERVAL (val); | 1461 | RESET_INTERVAL (val); |
| @@ -1839,6 +1853,12 @@ allocate_string () | |||
| 1839 | { | 1853 | { |
| 1840 | struct Lisp_String *s; | 1854 | struct Lisp_String *s; |
| 1841 | 1855 | ||
| 1856 | /* eassert (!handling_signal); */ | ||
| 1857 | |||
| 1858 | #ifndef SYNC_INPUT | ||
| 1859 | BLOCK_INPUT; | ||
| 1860 | #endif | ||
| 1861 | |||
| 1842 | /* If the free-list is empty, allocate a new string_block, and | 1862 | /* If the free-list is empty, allocate a new string_block, and |
| 1843 | add all the Lisp_Strings in it to the free-list. */ | 1863 | add all the Lisp_Strings in it to the free-list. */ |
| 1844 | if (string_free_list == NULL) | 1864 | if (string_free_list == NULL) |
| @@ -1868,6 +1888,10 @@ allocate_string () | |||
| 1868 | s = string_free_list; | 1888 | s = string_free_list; |
| 1869 | string_free_list = NEXT_FREE_LISP_STRING (s); | 1889 | string_free_list = NEXT_FREE_LISP_STRING (s); |
| 1870 | 1890 | ||
| 1891 | #ifndef SYNC_INPUT | ||
| 1892 | UNBLOCK_INPUT; | ||
| 1893 | #endif | ||
| 1894 | |||
| 1871 | /* Probably not strictly necessary, but play it safe. */ | 1895 | /* Probably not strictly necessary, but play it safe. */ |
| 1872 | bzero (s, sizeof *s); | 1896 | bzero (s, sizeof *s); |
| 1873 | 1897 | ||
| @@ -1915,6 +1939,12 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1915 | /* Determine the number of bytes needed to store NBYTES bytes | 1939 | /* Determine the number of bytes needed to store NBYTES bytes |
| 1916 | of string data. */ | 1940 | of string data. */ |
| 1917 | needed = SDATA_SIZE (nbytes); | 1941 | needed = SDATA_SIZE (nbytes); |
| 1942 | old_data = s->data ? SDATA_OF_STRING (s) : NULL; | ||
| 1943 | old_nbytes = GC_STRING_BYTES (s); | ||
| 1944 | |||
| 1945 | #ifndef SYNC_INPUT | ||
| 1946 | BLOCK_INPUT; | ||
| 1947 | #endif | ||
| 1918 | 1948 | ||
| 1919 | if (nbytes > LARGE_STRING_BYTES) | 1949 | if (nbytes > LARGE_STRING_BYTES) |
| 1920 | { | 1950 | { |
| @@ -1969,10 +1999,13 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1969 | else | 1999 | else |
| 1970 | b = current_sblock; | 2000 | b = current_sblock; |
| 1971 | 2001 | ||
| 1972 | old_data = s->data ? SDATA_OF_STRING (s) : NULL; | ||
| 1973 | old_nbytes = GC_STRING_BYTES (s); | ||
| 1974 | |||
| 1975 | data = b->next_free; | 2002 | data = b->next_free; |
| 2003 | b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA); | ||
| 2004 | |||
| 2005 | #ifndef SYNC_INPUT | ||
| 2006 | UNBLOCK_INPUT; | ||
| 2007 | #endif | ||
| 2008 | |||
| 1976 | data->string = s; | 2009 | data->string = s; |
| 1977 | s->data = SDATA_DATA (data); | 2010 | s->data = SDATA_DATA (data); |
| 1978 | #ifdef GC_CHECK_STRING_BYTES | 2011 | #ifdef GC_CHECK_STRING_BYTES |
| @@ -1985,7 +2018,6 @@ allocate_string_data (s, nchars, nbytes) | |||
| 1985 | bcopy (string_overrun_cookie, (char *) data + needed, | 2018 | bcopy (string_overrun_cookie, (char *) data + needed, |
| 1986 | GC_STRING_OVERRUN_COOKIE_SIZE); | 2019 | GC_STRING_OVERRUN_COOKIE_SIZE); |
| 1987 | #endif | 2020 | #endif |
| 1988 | b->next_free = (struct sdata *) ((char *) data + needed + GC_STRING_EXTRA); | ||
| 1989 | 2021 | ||
| 1990 | /* If S had already data assigned, mark that as free by setting its | 2022 | /* If S had already data assigned, mark that as free by setting its |
| 1991 | string back-pointer to null, and recording the size of the data | 2023 | string back-pointer to null, and recording the size of the data |
| @@ -2554,6 +2586,12 @@ make_float (float_value) | |||
| 2554 | { | 2586 | { |
| 2555 | register Lisp_Object val; | 2587 | register Lisp_Object val; |
| 2556 | 2588 | ||
| 2589 | /* eassert (!handling_signal); */ | ||
| 2590 | |||
| 2591 | #ifndef SYNC_INPUT | ||
| 2592 | BLOCK_INPUT; | ||
| 2593 | #endif | ||
| 2594 | |||
| 2557 | if (float_free_list) | 2595 | if (float_free_list) |
| 2558 | { | 2596 | { |
| 2559 | /* We use the data field for chaining the free list | 2597 | /* We use the data field for chaining the free list |
| @@ -2579,6 +2617,10 @@ make_float (float_value) | |||
| 2579 | float_block_index++; | 2617 | float_block_index++; |
| 2580 | } | 2618 | } |
| 2581 | 2619 | ||
| 2620 | #ifndef SYNC_INPUT | ||
| 2621 | UNBLOCK_INPUT; | ||
| 2622 | #endif | ||
| 2623 | |||
| 2582 | XFLOAT_DATA (val) = float_value; | 2624 | XFLOAT_DATA (val) = float_value; |
| 2583 | eassert (!FLOAT_MARKED_P (XFLOAT (val))); | 2625 | eassert (!FLOAT_MARKED_P (XFLOAT (val))); |
| 2584 | consing_since_gc += sizeof (struct Lisp_Float); | 2626 | consing_since_gc += sizeof (struct Lisp_Float); |
| @@ -2673,6 +2715,12 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2673 | { | 2715 | { |
| 2674 | register Lisp_Object val; | 2716 | register Lisp_Object val; |
| 2675 | 2717 | ||
| 2718 | /* eassert (!handling_signal); */ | ||
| 2719 | |||
| 2720 | #ifndef SYNC_INPUT | ||
| 2721 | BLOCK_INPUT; | ||
| 2722 | #endif | ||
| 2723 | |||
| 2676 | if (cons_free_list) | 2724 | if (cons_free_list) |
| 2677 | { | 2725 | { |
| 2678 | /* We use the cdr for chaining the free list | 2726 | /* We use the cdr for chaining the free list |
| @@ -2697,6 +2745,10 @@ DEFUN ("cons", Fcons, Scons, 2, 2, 0, | |||
| 2697 | cons_block_index++; | 2745 | cons_block_index++; |
| 2698 | } | 2746 | } |
| 2699 | 2747 | ||
| 2748 | #ifndef SYNC_INPUT | ||
| 2749 | UNBLOCK_INPUT; | ||
| 2750 | #endif | ||
| 2751 | |||
| 2700 | XSETCAR (val, car); | 2752 | XSETCAR (val, car); |
| 2701 | XSETCDR (val, cdr); | 2753 | XSETCDR (val, cdr); |
| 2702 | eassert (!CONS_MARKED_P (XCONS (val))); | 2754 | eassert (!CONS_MARKED_P (XCONS (val))); |
| @@ -2854,6 +2906,9 @@ allocate_vectorlike (len, type) | |||
| 2854 | UNBLOCK_INPUT; | 2906 | UNBLOCK_INPUT; |
| 2855 | #endif | 2907 | #endif |
| 2856 | 2908 | ||
| 2909 | /* This gets triggered by code which I haven't bothered to fix. --Stef */ | ||
| 2910 | /* eassert (!handling_signal); */ | ||
| 2911 | |||
| 2857 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; | 2912 | nbytes = sizeof *p + (len - 1) * sizeof p->contents[0]; |
| 2858 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); | 2913 | p = (struct Lisp_Vector *) lisp_malloc (nbytes, type); |
| 2859 | 2914 | ||
| @@ -2867,8 +2922,17 @@ allocate_vectorlike (len, type) | |||
| 2867 | consing_since_gc += nbytes; | 2922 | consing_since_gc += nbytes; |
| 2868 | vector_cells_consed += len; | 2923 | vector_cells_consed += len; |
| 2869 | 2924 | ||
| 2925 | #ifndef SYNC_INPUT | ||
| 2926 | BLOCK_INPUT; | ||
| 2927 | #endif | ||
| 2928 | |||
| 2870 | p->next = all_vectors; | 2929 | p->next = all_vectors; |
| 2871 | all_vectors = p; | 2930 | all_vectors = p; |
| 2931 | |||
| 2932 | #ifndef SYNC_INPUT | ||
| 2933 | UNBLOCK_INPUT; | ||
| 2934 | #endif | ||
| 2935 | |||
| 2872 | ++n_vectors; | 2936 | ++n_vectors; |
| 2873 | return p; | 2937 | return p; |
| 2874 | } | 2938 | } |
| @@ -3147,6 +3211,12 @@ Its value and function definition are void, and its property list is nil. */) | |||
| 3147 | 3211 | ||
| 3148 | CHECK_STRING (name); | 3212 | CHECK_STRING (name); |
| 3149 | 3213 | ||
| 3214 | eassert (!handling_signal); | ||
| 3215 | |||
| 3216 | #ifndef SYNC_INPUT | ||
| 3217 | BLOCK_INPUT; | ||
| 3218 | #endif | ||
| 3219 | |||
| 3150 | if (symbol_free_list) | 3220 | if (symbol_free_list) |
| 3151 | { | 3221 | { |
| 3152 | XSETSYMBOL (val, symbol_free_list); | 3222 | XSETSYMBOL (val, symbol_free_list); |
| @@ -3168,6 +3238,10 @@ Its value and function definition are void, and its property list is nil. */) | |||
| 3168 | symbol_block_index++; | 3238 | symbol_block_index++; |
| 3169 | } | 3239 | } |
| 3170 | 3240 | ||
| 3241 | #ifndef SYNC_INPUT | ||
| 3242 | UNBLOCK_INPUT; | ||
| 3243 | #endif | ||
| 3244 | |||
| 3171 | p = XSYMBOL (val); | 3245 | p = XSYMBOL (val); |
| 3172 | p->xname = name; | 3246 | p->xname = name; |
| 3173 | p->plist = Qnil; | 3247 | p->plist = Qnil; |
| @@ -3227,6 +3301,12 @@ allocate_misc () | |||
| 3227 | { | 3301 | { |
| 3228 | Lisp_Object val; | 3302 | Lisp_Object val; |
| 3229 | 3303 | ||
| 3304 | /* eassert (!handling_signal); */ | ||
| 3305 | |||
| 3306 | #ifndef SYNC_INPUT | ||
| 3307 | BLOCK_INPUT; | ||
| 3308 | #endif | ||
| 3309 | |||
| 3230 | if (marker_free_list) | 3310 | if (marker_free_list) |
| 3231 | { | 3311 | { |
| 3232 | XSETMISC (val, marker_free_list); | 3312 | XSETMISC (val, marker_free_list); |
| @@ -3249,6 +3329,10 @@ allocate_misc () | |||
| 3249 | marker_block_index++; | 3329 | marker_block_index++; |
| 3250 | } | 3330 | } |
| 3251 | 3331 | ||
| 3332 | #ifndef SYNC_INPUT | ||
| 3333 | UNBLOCK_INPUT; | ||
| 3334 | #endif | ||
| 3335 | |||
| 3252 | --total_free_markers; | 3336 | --total_free_markers; |
| 3253 | consing_since_gc += sizeof (union Lisp_Misc); | 3337 | consing_since_gc += sizeof (union Lisp_Misc); |
| 3254 | misc_objects_consed++; | 3338 | misc_objects_consed++; |
| @@ -4642,7 +4726,7 @@ void | |||
| 4642 | check_pure_size () | 4726 | check_pure_size () |
| 4643 | { | 4727 | { |
| 4644 | if (pure_bytes_used_before_overflow) | 4728 | if (pure_bytes_used_before_overflow) |
| 4645 | message ("Pure Lisp storage overflow (approx. %d bytes needed)", | 4729 | message ("emacs:0:Pure Lisp storage overflow (approx. %d bytes needed)", |
| 4646 | (int) (pure_bytes_used + pure_bytes_used_before_overflow)); | 4730 | (int) (pure_bytes_used + pure_bytes_used_before_overflow)); |
| 4647 | } | 4731 | } |
| 4648 | 4732 | ||
diff --git a/src/callproc.c b/src/callproc.c index eebbabb2739..71071217208 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -362,11 +362,11 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 362 | protected by the caller, so all we really have to worry about is | 362 | protected by the caller, so all we really have to worry about is |
| 363 | buffer. */ | 363 | buffer. */ |
| 364 | { | 364 | { |
| 365 | struct gcpro gcpro1, gcpro2, gcpro3; | 365 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 366 | 366 | ||
| 367 | current_dir = current_buffer->directory; | 367 | current_dir = current_buffer->directory; |
| 368 | 368 | ||
| 369 | GCPRO3 (infile, buffer, current_dir); | 369 | GCPRO4 (infile, buffer, current_dir, error_file); |
| 370 | 370 | ||
| 371 | current_dir | 371 | current_dir |
| 372 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), | 372 | = expand_and_dir_to_file (Funhandled_file_name_directory (current_dir), |
| @@ -375,6 +375,12 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 375 | report_file_error ("Setting current directory", | 375 | report_file_error ("Setting current directory", |
| 376 | Fcons (current_buffer->directory, Qnil)); | 376 | Fcons (current_buffer->directory, Qnil)); |
| 377 | 377 | ||
| 378 | if (STRING_MULTIBYTE (infile)) | ||
| 379 | infile = ENCODE_FILE (infile); | ||
| 380 | if (STRING_MULTIBYTE (current_dir)) | ||
| 381 | current_dir = ENCODE_FILE (current_dir); | ||
| 382 | if (STRINGP (error_file) && STRING_MULTIBYTE (error_file)) | ||
| 383 | error_file = ENCODE_FILE (error_file); | ||
| 378 | UNGCPRO; | 384 | UNGCPRO; |
| 379 | } | 385 | } |
| 380 | 386 | ||
| @@ -383,6 +389,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 383 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); | 389 | filefd = emacs_open (SDATA (infile), O_RDONLY, 0); |
| 384 | if (filefd < 0) | 390 | if (filefd < 0) |
| 385 | { | 391 | { |
| 392 | infile = DECODE_FILE (infile); | ||
| 386 | report_file_error ("Opening process input file", Fcons (infile, Qnil)); | 393 | report_file_error ("Opening process input file", Fcons (infile, Qnil)); |
| 387 | } | 394 | } |
| 388 | /* Search for program; barf if not found. */ | 395 | /* Search for program; barf if not found. */ |
| @@ -540,14 +547,13 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS) */) | |||
| 540 | #ifdef MSDOS | 547 | #ifdef MSDOS |
| 541 | unlink (tempfile); | 548 | unlink (tempfile); |
| 542 | #endif | 549 | #endif |
| 543 | report_file_error ("Cannot redirect stderr", | 550 | if (NILP (error_file)) |
| 544 | Fcons ((NILP (error_file) | 551 | error_file = build_string (NULL_DEVICE); |
| 545 | ? build_string (NULL_DEVICE) : error_file), | 552 | else if (STRINGP (error_file)) |
| 546 | Qnil)); | 553 | error_file = DECODE_FILE (error_file); |
| 554 | report_file_error ("Cannot redirect stderr", Fcons (error_file, Qnil)); | ||
| 547 | } | 555 | } |
| 548 | 556 | ||
| 549 | current_dir = ENCODE_FILE (current_dir); | ||
| 550 | |||
| 551 | #ifdef MAC_OS8 | 557 | #ifdef MAC_OS8 |
| 552 | { | 558 | { |
| 553 | /* Call run_mac_command in sysdep.c here directly instead of doing | 559 | /* Call run_mac_command in sysdep.c here directly instead of doing |
diff --git a/src/cmds.c b/src/cmds.c index cc5bd90cca7..8f7e3bf02df 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -157,13 +157,13 @@ DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "p", | |||
| 157 | With argument N not nil or 1, move forward N - 1 lines first. | 157 | With argument N not nil or 1, move forward N - 1 lines first. |
| 158 | If point reaches the beginning or end of buffer, it stops there. | 158 | If point reaches the beginning or end of buffer, it stops there. |
| 159 | 159 | ||
| 160 | This command does not move point across a field boundary unless doing so | 160 | This function constrains point to the current field unless this moves |
| 161 | would move beyond there to a different line; If N is nil or 1, and point | 161 | point to a different line than the original, unconstrained result. If |
| 162 | starts at a field boundary, point does not move. To ignore field | 162 | N is nil or 1, and a front-sticky field starts at point, the point |
| 163 | boundaries, either bind `inhibit-field-text-motion' to t, or use the | 163 | does not move. To ignore field boundaries bind |
| 164 | `forward-line' function instead. For instance, `(forward-line 0)' does | 164 | `inhibit-field-text-motion' to t, or use the `forward-line' function |
| 165 | the same thing as `(beginning-of-line)', except that it ignores field | 165 | instead. For instance, `(forward-line 0)' does the same thing as |
| 166 | boundaries. */) | 166 | `(beginning-of-line)', except that it ignores field boundaries. */) |
| 167 | (n) | 167 | (n) |
| 168 | Lisp_Object n; | 168 | Lisp_Object n; |
| 169 | { | 169 | { |
| @@ -183,10 +183,11 @@ With argument N not nil or 1, move forward N - 1 lines first. | |||
| 183 | If point reaches the beginning or end of buffer, it stops there. | 183 | If point reaches the beginning or end of buffer, it stops there. |
| 184 | To ignore intangibility, bind `inhibit-point-motion-hooks' to t. | 184 | To ignore intangibility, bind `inhibit-point-motion-hooks' to t. |
| 185 | 185 | ||
| 186 | This command does not move point across a field boundary unless doing so | 186 | This function constrains point to the current field unless this moves |
| 187 | would move beyond there to a different line; if N is nil or 1, and | 187 | point to a different line than the original, unconstrained result. If |
| 188 | point starts at a field boundary, point does not move. To ignore field | 188 | N is nil or 1, and a rear-sticky field ends at point, the point does |
| 189 | boundaries bind `inhibit-field-text-motion' to t. */) | 189 | not move. To ignore field boundaries bind `inhibit-field-text-motion' |
| 190 | to t. */) | ||
| 190 | (n) | 191 | (n) |
| 191 | Lisp_Object n; | 192 | Lisp_Object n; |
| 192 | { | 193 | { |
diff --git a/src/data.c b/src/data.c index 0b2036395da..c70e3219eac 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -522,7 +522,10 @@ DEFUN ("floatp", Ffloatp, Sfloatp, 1, 1, 0, | |||
| 522 | 522 | ||
| 523 | DEFUN ("car", Fcar, Scar, 1, 1, 0, | 523 | DEFUN ("car", Fcar, Scar, 1, 1, 0, |
| 524 | doc: /* Return the car of LIST. If arg is nil, return nil. | 524 | doc: /* Return the car of LIST. If arg is nil, return nil. |
| 525 | Error if arg is not nil and not a cons cell. See also `car-safe'. */) | 525 | Error if arg is not nil and not a cons cell. See also `car-safe'. |
| 526 | |||
| 527 | See Info node `(elisp)Cons Cells' for a discussion of related basic | ||
| 528 | Lisp concepts such as car, cdr, cons cell and list. */) | ||
| 526 | (list) | 529 | (list) |
| 527 | register Lisp_Object list; | 530 | register Lisp_Object list; |
| 528 | { | 531 | { |
| @@ -550,7 +553,10 @@ DEFUN ("car-safe", Fcar_safe, Scar_safe, 1, 1, 0, | |||
| 550 | 553 | ||
| 551 | DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, | 554 | DEFUN ("cdr", Fcdr, Scdr, 1, 1, 0, |
| 552 | doc: /* Return the cdr of LIST. If arg is nil, return nil. | 555 | doc: /* Return the cdr of LIST. If arg is nil, return nil. |
| 553 | Error if arg is not nil and not a cons cell. See also `cdr-safe'. */) | 556 | Error if arg is not nil and not a cons cell. See also `cdr-safe'. |
| 557 | |||
| 558 | See Info node `(elisp)Cons Cells' for a discussion of related basic | ||
| 559 | Lisp concepts such as cdr, car, cons cell and list. */) | ||
| 554 | (list) | 560 | (list) |
| 555 | register Lisp_Object list; | 561 | register Lisp_Object list; |
| 556 | { | 562 | { |
diff --git a/src/dired.c b/src/dired.c index 1f20ef8d10a..474683c3c87 100644 --- a/src/dired.c +++ b/src/dired.c | |||
| @@ -85,7 +85,8 @@ extern struct direct *readdir (); | |||
| 85 | #endif /* not MSDOS */ | 85 | #endif /* not MSDOS */ |
| 86 | #endif /* not SYSV_SYSTEM_DIR */ | 86 | #endif /* not SYSV_SYSTEM_DIR */ |
| 87 | 87 | ||
| 88 | #ifdef MSDOS | 88 | /* Some versions of Cygwin don't have d_ino in `struct dirent'. */ |
| 89 | #if defined(MSDOS) || defined(__CYGWIN__) | ||
| 89 | #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) | 90 | #define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != 0) |
| 90 | #else | 91 | #else |
| 91 | #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) | 92 | #define DIRENTRY_NONEMPTY(p) ((p)->d_ino) |
| @@ -1036,11 +1037,11 @@ syms_of_dired () | |||
| 1036 | #endif /* VMS */ | 1037 | #endif /* VMS */ |
| 1037 | 1038 | ||
| 1038 | DEFVAR_LISP ("completion-ignored-extensions", &Vcompletion_ignored_extensions, | 1039 | DEFVAR_LISP ("completion-ignored-extensions", &Vcompletion_ignored_extensions, |
| 1039 | doc: /* *Completion ignores filenames ending in any string in this list. | 1040 | doc: /* Completion ignores file names ending in any string in this list. |
| 1040 | Directories are ignored if they match any string in this list which | 1041 | It does not ignore them if all possible completions end in one of |
| 1041 | ends in a slash. | 1042 | these strings or when displaying a list of completions. |
| 1042 | This variable does not affect lists of possible completions, | 1043 | It ignores directory names if they match any string in this list which |
| 1043 | but does affect the commands that actually do completions. */); | 1044 | ends in a slash. */); |
| 1044 | Vcompletion_ignored_extensions = Qnil; | 1045 | Vcompletion_ignored_extensions = Qnil; |
| 1045 | } | 1046 | } |
| 1046 | 1047 | ||
diff --git a/src/editfns.c b/src/editfns.c index 5605a25bdd2..9be9232a9c7 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -526,7 +526,9 @@ find_field (pos, merge_at_boundary, beg_limit, beg, end_limit, end) | |||
| 526 | = (XFASTINT (pos) > BEGV | 526 | = (XFASTINT (pos) > BEGV |
| 527 | ? get_char_property_and_overlay (make_number (XINT (pos) - 1), | 527 | ? get_char_property_and_overlay (make_number (XINT (pos) - 1), |
| 528 | Qfield, Qnil, NULL) | 528 | Qfield, Qnil, NULL) |
| 529 | : Qnil); | 529 | /* Using nil here would be a more obvious choice, but it would |
| 530 | fail when the buffer starts with a non-sticky field. */ | ||
| 531 | : after_field); | ||
| 530 | 532 | ||
| 531 | /* See if we need to handle the case where MERGE_AT_BOUNDARY is nil | 533 | /* See if we need to handle the case where MERGE_AT_BOUNDARY is nil |
| 532 | and POS is at beginning of a field, which can also be interpreted | 534 | and POS is at beginning of a field, which can also be interpreted |
| @@ -717,7 +719,8 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 717 | { | 719 | { |
| 718 | /* If non-zero, then the original point, before re-positioning. */ | 720 | /* If non-zero, then the original point, before re-positioning. */ |
| 719 | int orig_point = 0; | 721 | int orig_point = 0; |
| 720 | 722 | int fwd, prev_old, prev_new; | |
| 723 | |||
| 721 | if (NILP (new_pos)) | 724 | if (NILP (new_pos)) |
| 722 | /* Use the current point, and afterwards, set it. */ | 725 | /* Use the current point, and afterwards, set it. */ |
| 723 | { | 726 | { |
| @@ -725,23 +728,40 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) | |||
| 725 | XSETFASTINT (new_pos, PT); | 728 | XSETFASTINT (new_pos, PT); |
| 726 | } | 729 | } |
| 727 | 730 | ||
| 731 | CHECK_NUMBER_COERCE_MARKER (new_pos); | ||
| 732 | CHECK_NUMBER_COERCE_MARKER (old_pos); | ||
| 733 | |||
| 734 | fwd = (XFASTINT (new_pos) > XFASTINT (old_pos)); | ||
| 735 | |||
| 736 | prev_old = make_number (XFASTINT (old_pos) - 1); | ||
| 737 | prev_new = make_number (XFASTINT (new_pos) - 1); | ||
| 738 | |||
| 728 | if (NILP (Vinhibit_field_text_motion) | 739 | if (NILP (Vinhibit_field_text_motion) |
| 729 | && !EQ (new_pos, old_pos) | 740 | && !EQ (new_pos, old_pos) |
| 730 | && (!NILP (Fget_char_property (new_pos, Qfield, Qnil)) | 741 | && (!NILP (Fget_text_property (new_pos, Qfield, Qnil)) |
| 731 | || !NILP (Fget_char_property (old_pos, Qfield, Qnil))) | 742 | || !NILP (Fget_text_property (old_pos, Qfield, Qnil)) |
| 743 | /* To recognize field boundaries, we must also look at the | ||
| 744 | previous positions; we could use `get_pos_property' | ||
| 745 | instead, but in itself that would fail inside non-sticky | ||
| 746 | fields (like comint prompts). */ | ||
| 747 | || (XFASTINT (new_pos) > BEGV | ||
| 748 | && !NILP (Fget_text_property (prev_new, Qfield, Qnil))) | ||
| 749 | || (XFASTINT (old_pos) > BEGV | ||
| 750 | && !NILP (Fget_text_property (prev_old, Qfield, Qnil)))) | ||
| 732 | && (NILP (inhibit_capture_property) | 751 | && (NILP (inhibit_capture_property) |
| 733 | || NILP (Fget_char_property(old_pos, inhibit_capture_property, Qnil)))) | 752 | /* Field boundaries are again a problem; but now we must |
| 734 | /* NEW_POS is not within the same field as OLD_POS; try to | 753 | decide the case exactly, so we need to call |
| 735 | move NEW_POS so that it is. */ | 754 | `get_pos_property' as well. */ |
| 755 | || (NILP (get_pos_property (old_pos, inhibit_capture_property, Qnil)) | ||
| 756 | && (XFASTINT (old_pos) <= BEGV | ||
| 757 | || NILP (Fget_text_property (old_pos, inhibit_capture_property, Qnil)) | ||
| 758 | || NILP (Fget_text_property (prev_old, inhibit_capture_property, Qnil)))))) | ||
| 759 | /* It is possible that NEW_POS is not within the same field as | ||
| 760 | OLD_POS; try to move NEW_POS so that it is. */ | ||
| 736 | { | 761 | { |
| 737 | int fwd, shortage; | 762 | int shortage; |
| 738 | Lisp_Object field_bound; | 763 | Lisp_Object field_bound; |
| 739 | 764 | ||
| 740 | CHECK_NUMBER_COERCE_MARKER (new_pos); | ||
| 741 | CHECK_NUMBER_COERCE_MARKER (old_pos); | ||
| 742 | |||
| 743 | fwd = (XFASTINT (new_pos) > XFASTINT (old_pos)); | ||
| 744 | |||
| 745 | if (fwd) | 765 | if (fwd) |
| 746 | field_bound = Ffield_end (old_pos, escape_from_edge, new_pos); | 766 | field_bound = Ffield_end (old_pos, escape_from_edge, new_pos); |
| 747 | else | 767 | else |
| @@ -782,9 +802,10 @@ DEFUN ("line-beginning-position", | |||
| 782 | With argument N not nil or 1, move forward N - 1 lines first. | 802 | With argument N not nil or 1, move forward N - 1 lines first. |
| 783 | If scan reaches end of buffer, return that position. | 803 | If scan reaches end of buffer, return that position. |
| 784 | 804 | ||
| 785 | The scan does not cross a field boundary unless doing so would move | 805 | This function constrains the returned position to the current field |
| 786 | beyond there to a different line; if N is nil or 1, and scan starts at a | 806 | unless that would be on a different line than the original, |
| 787 | field boundary, the scan stops as soon as it starts. To ignore field | 807 | unconstrained result. If N is nil or 1, and a front-sticky field |
| 808 | starts at point, the scan stops as soon as it starts. To ignore field | ||
| 788 | boundaries bind `inhibit-field-text-motion' to t. | 809 | boundaries bind `inhibit-field-text-motion' to t. |
| 789 | 810 | ||
| 790 | This function does not move point. */) | 811 | This function does not move point. */) |
| @@ -816,9 +837,10 @@ DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, | |||
| 816 | With argument N not nil or 1, move forward N - 1 lines first. | 837 | With argument N not nil or 1, move forward N - 1 lines first. |
| 817 | If scan reaches end of buffer, return that position. | 838 | If scan reaches end of buffer, return that position. |
| 818 | 839 | ||
| 819 | The scan does not cross a field boundary unless doing so would move | 840 | This function constrains the returned position to the current field |
| 820 | beyond there to a different line; if N is nil or 1, and scan starts at a | 841 | unless that would be on a different line than the original, |
| 821 | field boundary, the scan stops as soon as it starts. To ignore field | 842 | unconstrained result. If N is nil or 1, and a rear-sticky field ends |
| 843 | at point, the scan stops as soon as it starts. To ignore field | ||
| 822 | boundaries bind `inhibit-field-text-motion' to t. | 844 | boundaries bind `inhibit-field-text-motion' to t. |
| 823 | 845 | ||
| 824 | This function does not move point. */) | 846 | This function does not move point. */) |
diff --git a/src/frame.c b/src/frame.c index 6b848ea2fef..c9061423193 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -3819,8 +3819,21 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type) | |||
| 3819 | register Lisp_Object tem; | 3819 | register Lisp_Object tem; |
| 3820 | 3820 | ||
| 3821 | tem = Fassq (param, alist); | 3821 | tem = Fassq (param, alist); |
| 3822 | if (EQ (tem, Qnil)) | 3822 | |
| 3823 | if (!NILP (tem)) | ||
| 3824 | { | ||
| 3825 | /* If we find this parm in ALIST, clear it out | ||
| 3826 | so that it won't be "left over" at the end. */ | ||
| 3827 | #ifdef HAVE_X_WINDOWS /* macfns.c and w32fns.c have not yet | ||
| 3828 | been changed to cope with this. */ | ||
| 3829 | XSETCAR (tem, Qnil); | ||
| 3830 | #endif | ||
| 3831 | } | ||
| 3832 | else | ||
| 3823 | tem = Fassq (param, Vdefault_frame_alist); | 3833 | tem = Fassq (param, Vdefault_frame_alist); |
| 3834 | |||
| 3835 | /* If it wasn't specified in ALIST or the Lisp-level defaults, | ||
| 3836 | look in the X resources. */ | ||
| 3824 | if (EQ (tem, Qnil)) | 3837 | if (EQ (tem, Qnil)) |
| 3825 | { | 3838 | { |
| 3826 | if (attribute) | 3839 | if (attribute) |
| @@ -3904,7 +3917,7 @@ x_frame_get_and_record_arg (f, alist, param, attribute, class, type) | |||
| 3904 | 3917 | ||
| 3905 | value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param, | 3918 | value = x_get_arg (FRAME_X_DISPLAY_INFO (f), alist, param, |
| 3906 | attribute, class, type); | 3919 | attribute, class, type); |
| 3907 | if (! NILP (value)) | 3920 | if (! NILP (value) && ! EQ (value, Qunbound)) |
| 3908 | store_frame_param (f, param, value); | 3921 | store_frame_param (f, param, value); |
| 3909 | 3922 | ||
| 3910 | return value; | 3923 | return value; |
diff --git a/src/keyboard.c b/src/keyboard.c index cbf0987048a..dc509ad5717 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -777,6 +777,8 @@ echo_char (c) | |||
| 777 | else | 777 | else |
| 778 | echo_string = concat2 (echo_string, build_string (" ")); | 778 | echo_string = concat2 (echo_string, build_string (" ")); |
| 779 | } | 779 | } |
| 780 | else if (STRINGP (echo_string)) | ||
| 781 | echo_string = concat2 (echo_string, build_string (" ")); | ||
| 780 | 782 | ||
| 781 | current_kboard->echo_string | 783 | current_kboard->echo_string |
| 782 | = concat2 (echo_string, make_string (buffer, ptr - buffer)); | 784 | = concat2 (echo_string, make_string (buffer, ptr - buffer)); |
| @@ -807,16 +809,16 @@ echo_dash () | |||
| 807 | /* Do nothing if we have already put a dash at the end. */ | 809 | /* Do nothing if we have already put a dash at the end. */ |
| 808 | if (SCHARS (current_kboard->echo_string) > 1) | 810 | if (SCHARS (current_kboard->echo_string) > 1) |
| 809 | { | 811 | { |
| 810 | Lisp_Object last_char, prev_char, idx; | 812 | Lisp_Object last_char, prev_char, idx; |
| 811 | 813 | ||
| 812 | idx = make_number (SCHARS (current_kboard->echo_string) - 2); | 814 | idx = make_number (SCHARS (current_kboard->echo_string) - 2); |
| 813 | prev_char = Faref (current_kboard->echo_string, idx); | 815 | prev_char = Faref (current_kboard->echo_string, idx); |
| 814 | 816 | ||
| 815 | idx = make_number (SCHARS (current_kboard->echo_string) - 1); | 817 | idx = make_number (SCHARS (current_kboard->echo_string) - 1); |
| 816 | last_char = Faref (current_kboard->echo_string, idx); | 818 | last_char = Faref (current_kboard->echo_string, idx); |
| 817 | 819 | ||
| 818 | if (XINT (last_char) == '-' && XINT (prev_char) != ' ') | 820 | if (XINT (last_char) == '-' && XINT (prev_char) != ' ') |
| 819 | return; | 821 | return; |
| 820 | } | 822 | } |
| 821 | 823 | ||
| 822 | /* Put a dash at the end of the buffer temporarily, | 824 | /* Put a dash at the end of the buffer temporarily, |
diff --git a/src/keymap.c b/src/keymap.c index b09358dbbcb..fa64e88d6e5 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -736,8 +736,10 @@ map_keymap_call (key, val, fun, dummy) | |||
| 736 | } | 736 | } |
| 737 | 737 | ||
| 738 | DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0, | 738 | DEFUN ("map-keymap", Fmap_keymap, Smap_keymap, 2, 3, 0, |
| 739 | doc: /* Call FUNCTION for every binding in KEYMAP. | 739 | doc: /* Call FUNCTION once for each event binding in KEYMAP. |
| 740 | FUNCTION is called with two arguments: the event and its binding. | 740 | FUNCTION is called with two arguments: the event that is bound, and |
| 741 | the definition it is bound to. | ||
| 742 | |||
| 741 | If KEYMAP has a parent, the parent's bindings are included as well. | 743 | If KEYMAP has a parent, the parent's bindings are included as well. |
| 742 | This works recursively: if the parent has itself a parent, then the | 744 | This works recursively: if the parent has itself a parent, then the |
| 743 | grandparent's bindings are also included and so on. | 745 | grandparent's bindings are also included and so on. |
diff --git a/src/lread.c b/src/lread.c index 345af109050..590ff65bbce 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -803,8 +803,12 @@ Return t if file exists. */) | |||
| 803 | if (!NILP (Fequal (found, XCAR (tem)))) | 803 | if (!NILP (Fequal (found, XCAR (tem)))) |
| 804 | count++; | 804 | count++; |
| 805 | if (count > 3) | 805 | if (count > 3) |
| 806 | Fsignal (Qerror, Fcons (build_string ("Recursive load"), | 806 | { |
| 807 | Fcons (found, Vloads_in_progress))); | 807 | if (fd >= 0) |
| 808 | emacs_close (fd); | ||
| 809 | Fsignal (Qerror, Fcons (build_string ("Recursive load"), | ||
| 810 | Fcons (found, Vloads_in_progress))); | ||
| 811 | } | ||
| 808 | record_unwind_protect (record_load_unwind, Vloads_in_progress); | 812 | record_unwind_protect (record_load_unwind, Vloads_in_progress); |
| 809 | Vloads_in_progress = Fcons (found, Vloads_in_progress); | 813 | Vloads_in_progress = Fcons (found, Vloads_in_progress); |
| 810 | } | 814 | } |
diff --git a/src/minibuf.c b/src/minibuf.c index b327f2d040a..b9bbaf5b186 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -655,7 +655,8 @@ read_minibuf (map, initial, prompt, backup_n, expflag, | |||
| 655 | Lisp_Object root_window = Fframe_root_window (frame); | 655 | Lisp_Object root_window = Fframe_root_window (frame); |
| 656 | Lisp_Object mini_window = XWINDOW (root_window)->next; | 656 | Lisp_Object mini_window = XWINDOW (root_window)->next; |
| 657 | 657 | ||
| 658 | if (! NILP (mini_window) && !NILP (Fwindow_minibuffer_p (mini_window))) | 658 | if (! NILP (mini_window) && ! EQ (mini_window, minibuf_window) |
| 659 | && !NILP (Fwindow_minibuffer_p (mini_window))) | ||
| 659 | Fset_window_buffer (mini_window, empty_minibuf, Qnil); | 660 | Fset_window_buffer (mini_window, empty_minibuf, Qnil); |
| 660 | } | 661 | } |
| 661 | 662 | ||
diff --git a/src/regex.c b/src/regex.c index 4f2683adfb9..60231826380 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | internationalization features.) | 3 | internationalization features.) |
| 4 | 4 | ||
| 5 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | 5 | Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
| 6 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 6 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | This program is free software; you can redistribute it and/or modify | 8 | This program is free software; you can redistribute it and/or modify |
| 9 | it under the terms of the GNU General Public License as published by | 9 | it under the terms of the GNU General Public License as published by |
| @@ -1874,8 +1874,9 @@ typedef struct | |||
| 1874 | /* The next available element. */ | 1874 | /* The next available element. */ |
| 1875 | #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) | 1875 | #define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail]) |
| 1876 | 1876 | ||
| 1877 | /* Explicit quit checking is only used on NTemacs. */ | 1877 | /* Explicit quit checking is only used on NTemacs and whenever we |
| 1878 | #if defined WINDOWSNT && defined emacs && defined QUIT | 1878 | use polling to process input events. */ |
| 1879 | #if defined emacs && (defined WINDOWSNT || defined SYNC_INPUT) && defined QUIT | ||
| 1879 | extern int immediate_quit; | 1880 | extern int immediate_quit; |
| 1880 | # define IMMEDIATE_QUIT_CHECK \ | 1881 | # define IMMEDIATE_QUIT_CHECK \ |
| 1881 | do { \ | 1882 | do { \ |
| @@ -5636,7 +5637,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | |||
| 5636 | the repetition text and either the following jump or | 5637 | the repetition text and either the following jump or |
| 5637 | pop_failure_jump back to this on_failure_jump. */ | 5638 | pop_failure_jump back to this on_failure_jump. */ |
| 5638 | case on_failure_jump: | 5639 | case on_failure_jump: |
| 5639 | IMMEDIATE_QUIT_CHECK; | ||
| 5640 | EXTRACT_NUMBER_AND_INCR (mcnt, p); | 5640 | EXTRACT_NUMBER_AND_INCR (mcnt, p); |
| 5641 | DEBUG_PRINT3 ("EXECUTING on_failure_jump %d (to %p):\n", | 5641 | DEBUG_PRINT3 ("EXECUTING on_failure_jump %d (to %p):\n", |
| 5642 | mcnt, p + mcnt); | 5642 | mcnt, p + mcnt); |
| @@ -5652,7 +5652,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | |||
| 5652 | then we can use a non-backtracking loop based on | 5652 | then we can use a non-backtracking loop based on |
| 5653 | on_failure_keep_string_jump instead of on_failure_jump. */ | 5653 | on_failure_keep_string_jump instead of on_failure_jump. */ |
| 5654 | case on_failure_jump_smart: | 5654 | case on_failure_jump_smart: |
| 5655 | IMMEDIATE_QUIT_CHECK; | ||
| 5656 | EXTRACT_NUMBER_AND_INCR (mcnt, p); | 5655 | EXTRACT_NUMBER_AND_INCR (mcnt, p); |
| 5657 | DEBUG_PRINT3 ("EXECUTING on_failure_jump_smart %d (to %p).\n", | 5656 | DEBUG_PRINT3 ("EXECUTING on_failure_jump_smart %d (to %p).\n", |
| 5658 | mcnt, p + mcnt); | 5657 | mcnt, p + mcnt); |
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h index c1cc42a8c0e..9df3e0a2ef6 100644 --- a/src/s/irix6-5.h +++ b/src/s/irix6-5.h | |||
| @@ -33,5 +33,9 @@ | |||
| 33 | 33 | ||
| 34 | #undef TIOCSIGSEND /* defined in usg5-4.h */ | 34 | #undef TIOCSIGSEND /* defined in usg5-4.h */ |
| 35 | 35 | ||
| 36 | /* Tested on Irix 6.5. SCM worked on earlier versions. */ | ||
| 37 | #define GC_SETJMP_WORKS 1 | ||
| 38 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | ||
| 39 | |||
| 36 | /* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83 | 40 | /* arch-tag: d7ad9ec2-54ad-4b2f-adf2-0070c5c63e83 |
| 37 | (do not change this comment) */ | 41 | (do not change this comment) */ |
| @@ -3426,13 +3426,13 @@ sys_close (int fd) | |||
| 3426 | { | 3426 | { |
| 3427 | int rc; | 3427 | int rc; |
| 3428 | 3428 | ||
| 3429 | if (fd < 0 || fd >= MAXDESC) | 3429 | if (fd < 0) |
| 3430 | { | 3430 | { |
| 3431 | errno = EBADF; | 3431 | errno = EBADF; |
| 3432 | return -1; | 3432 | return -1; |
| 3433 | } | 3433 | } |
| 3434 | 3434 | ||
| 3435 | if (fd_info[fd].cp) | 3435 | if (fd < MAXDESC && fd_info[fd].cp) |
| 3436 | { | 3436 | { |
| 3437 | child_process * cp = fd_info[fd].cp; | 3437 | child_process * cp = fd_info[fd].cp; |
| 3438 | 3438 | ||
| @@ -3474,7 +3474,7 @@ sys_close (int fd) | |||
| 3474 | because socket handles are fully fledged kernel handles. */ | 3474 | because socket handles are fully fledged kernel handles. */ |
| 3475 | rc = _close (fd); | 3475 | rc = _close (fd); |
| 3476 | 3476 | ||
| 3477 | if (rc == 0) | 3477 | if (rc == 0 && fd < MAXDESC) |
| 3478 | fd_info[fd].flags = 0; | 3478 | fd_info[fd].flags = 0; |
| 3479 | 3479 | ||
| 3480 | return rc; | 3480 | return rc; |
| @@ -3486,7 +3486,7 @@ sys_dup (int fd) | |||
| 3486 | int new_fd; | 3486 | int new_fd; |
| 3487 | 3487 | ||
| 3488 | new_fd = _dup (fd); | 3488 | new_fd = _dup (fd); |
| 3489 | if (new_fd >= 0) | 3489 | if (new_fd >= 0 && new_fd < MAXDESC) |
| 3490 | { | 3490 | { |
| 3491 | /* duplicate our internal info as well */ | 3491 | /* duplicate our internal info as well */ |
| 3492 | fd_info[new_fd] = fd_info[fd]; | 3492 | fd_info[new_fd] = fd_info[fd]; |
| @@ -3641,13 +3641,13 @@ sys_read (int fd, char * buffer, unsigned int count) | |||
| 3641 | DWORD waiting; | 3641 | DWORD waiting; |
| 3642 | char * orig_buffer = buffer; | 3642 | char * orig_buffer = buffer; |
| 3643 | 3643 | ||
| 3644 | if (fd < 0 || fd >= MAXDESC) | 3644 | if (fd < 0) |
| 3645 | { | 3645 | { |
| 3646 | errno = EBADF; | 3646 | errno = EBADF; |
| 3647 | return -1; | 3647 | return -1; |
| 3648 | } | 3648 | } |
| 3649 | 3649 | ||
| 3650 | if (fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET)) | 3650 | if (fd < MAXDESC && fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET)) |
| 3651 | { | 3651 | { |
| 3652 | child_process *cp = fd_info[fd].cp; | 3652 | child_process *cp = fd_info[fd].cp; |
| 3653 | 3653 | ||
| @@ -3785,13 +3785,13 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 3785 | { | 3785 | { |
| 3786 | int nchars; | 3786 | int nchars; |
| 3787 | 3787 | ||
| 3788 | if (fd < 0 || fd >= MAXDESC) | 3788 | if (fd < 0) |
| 3789 | { | 3789 | { |
| 3790 | errno = EBADF; | 3790 | errno = EBADF; |
| 3791 | return -1; | 3791 | return -1; |
| 3792 | } | 3792 | } |
| 3793 | 3793 | ||
| 3794 | if (fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET)) | 3794 | if (fd < MAXDESC && fd_info[fd].flags & (FILE_PIPE | FILE_SOCKET)) |
| 3795 | { | 3795 | { |
| 3796 | if ((fd_info[fd].flags & FILE_WRITE) == 0) | 3796 | if ((fd_info[fd].flags & FILE_WRITE) == 0) |
| 3797 | { | 3797 | { |
| @@ -3833,7 +3833,7 @@ sys_write (int fd, const void * buffer, unsigned int count) | |||
| 3833 | } | 3833 | } |
| 3834 | 3834 | ||
| 3835 | #ifdef HAVE_SOCKETS | 3835 | #ifdef HAVE_SOCKETS |
| 3836 | if (fd_info[fd].flags & FILE_SOCKET) | 3836 | if (fd < MAXDESC && fd_info[fd].flags & FILE_SOCKET) |
| 3837 | { | 3837 | { |
| 3838 | unsigned long nblock = 0; | 3838 | unsigned long nblock = 0; |
| 3839 | if (winsock_lib == NULL) abort (); | 3839 | if (winsock_lib == NULL) abort (); |
diff --git a/src/xdisp.c b/src/xdisp.c index ca6c8f793a2..70dc9bd4515 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Display generation from window structure and buffer text. | 1 | /* Display generation from window structure and buffer text. |
| 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, | 2 | Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, |
| 3 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, | 3 | 1997, 1998, 1999, 2000, 2001, 2002, 2003, |
| 4 | 2004, 2005 Free Software Foundation, Inc. | 4 | 2004, 2005, 2006 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -3605,6 +3605,11 @@ handle_invisible_prop (it) | |||
| 3605 | skip starting with next_stop. */ | 3605 | skip starting with next_stop. */ |
| 3606 | if (invis_p) | 3606 | if (invis_p) |
| 3607 | IT_CHARPOS (*it) = next_stop; | 3607 | IT_CHARPOS (*it) = next_stop; |
| 3608 | |||
| 3609 | /* If there are adjacent invisible texts, don't lose the | ||
| 3610 | second one's ellipsis. */ | ||
| 3611 | if (invis_p == 2) | ||
| 3612 | display_ellipsis_p = 1; | ||
| 3608 | } | 3613 | } |
| 3609 | while (invis_p); | 3614 | while (invis_p); |
| 3610 | 3615 | ||
| @@ -3625,7 +3630,23 @@ handle_invisible_prop (it) | |||
| 3625 | it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; | 3630 | it->stack[it->sp - 1].display_ellipsis_p = display_ellipsis_p; |
| 3626 | } | 3631 | } |
| 3627 | else if (display_ellipsis_p) | 3632 | else if (display_ellipsis_p) |
| 3628 | setup_for_ellipsis (it, 0); | 3633 | { |
| 3634 | /* Make sure that the glyphs of the ellipsis will get | ||
| 3635 | correct `charpos' values. If we would not update | ||
| 3636 | it->position here, the glyphs would belong to the | ||
| 3637 | last visible character _before_ the invisible | ||
| 3638 | text, which confuses `set_cursor_from_row'. | ||
| 3639 | |||
| 3640 | We use the last invisible position instead of the | ||
| 3641 | first because this way the cursor is always drawn on | ||
| 3642 | the first "." of the ellipsis, whenever PT is inside | ||
| 3643 | the invisible text. Otherwise the cursor would be | ||
| 3644 | placed _after_ the ellipsis when the point is after the | ||
| 3645 | first invisible character. */ | ||
| 3646 | it->position.charpos = IT_CHARPOS (*it) - 1; | ||
| 3647 | it->position.bytepos = CHAR_TO_BYTE (it->position.charpos); | ||
| 3648 | setup_for_ellipsis (it, 0); | ||
| 3649 | } | ||
| 3629 | } | 3650 | } |
| 3630 | } | 3651 | } |
| 3631 | 3652 | ||
| @@ -4138,8 +4159,7 @@ handle_single_display_spec (it, spec, object, position, | |||
| 4138 | { | 4159 | { |
| 4139 | it->method = GET_FROM_STRETCH; | 4160 | it->method = GET_FROM_STRETCH; |
| 4140 | it->object = value; | 4161 | it->object = value; |
| 4141 | it->current.pos = it->position = start_pos; | 4162 | *position = it->position = start_pos; |
| 4142 | |||
| 4143 | } | 4163 | } |
| 4144 | #ifdef HAVE_WINDOW_SYSTEM | 4164 | #ifdef HAVE_WINDOW_SYSTEM |
| 4145 | else | 4165 | else |
| @@ -19690,6 +19710,10 @@ produce_stretch_glyph (it) | |||
| 19690 | else | 19710 | else |
| 19691 | ascent = (height * FONT_BASE (font)) / FONT_HEIGHT (font); | 19711 | ascent = (height * FONT_BASE (font)) / FONT_HEIGHT (font); |
| 19692 | 19712 | ||
| 19713 | if (width > 0 && !it->truncate_lines_p | ||
| 19714 | && it->current_x + width > it->last_visible_x) | ||
| 19715 | width = it->last_visible_x - it->current_x - 1; | ||
| 19716 | |||
| 19693 | if (width > 0 && height > 0 && it->glyph_row) | 19717 | if (width > 0 && height > 0 && it->glyph_row) |
| 19694 | { | 19718 | { |
| 19695 | Lisp_Object object = it->stack[it->sp - 1].string; | 19719 | Lisp_Object object = it->stack[it->sp - 1].string; |
| @@ -19830,8 +19854,8 @@ calc_line_height_property (it, val, font, boff, override) | |||
| 19830 | 19854 | ||
| 19831 | /* RIF: | 19855 | /* RIF: |
| 19832 | Produce glyphs/get display metrics for the display element IT is | 19856 | Produce glyphs/get display metrics for the display element IT is |
| 19833 | loaded with. See the description of struct display_iterator in | 19857 | loaded with. See the description of struct it in dispextern.h |
| 19834 | dispextern.h for an overview of struct display_iterator. */ | 19858 | for an overview of struct it. */ |
| 19835 | 19859 | ||
| 19836 | void | 19860 | void |
| 19837 | x_produce_glyphs (it) | 19861 | x_produce_glyphs (it) |
| @@ -20791,8 +20815,13 @@ get_window_cursor_type (w, glyph, width, active_cursor) | |||
| 20791 | { | 20815 | { |
| 20792 | if (w == XWINDOW (echo_area_window)) | 20816 | if (w == XWINDOW (echo_area_window)) |
| 20793 | { | 20817 | { |
| 20794 | *width = FRAME_CURSOR_WIDTH (f); | 20818 | if (EQ (b->cursor_type, Qt) || NILP (b->cursor_type)) |
| 20795 | return FRAME_DESIRED_CURSOR (f); | 20819 | { |
| 20820 | *width = FRAME_CURSOR_WIDTH (f); | ||
| 20821 | return FRAME_DESIRED_CURSOR (f); | ||
| 20822 | } | ||
| 20823 | else | ||
| 20824 | return get_specified_cursor_type (b->cursor_type, width); | ||
| 20796 | } | 20825 | } |
| 20797 | 20826 | ||
| 20798 | *active_cursor = 0; | 20827 | *active_cursor = 0; |
diff --git a/src/xfns.c b/src/xfns.c index 8da2e27687d..e478bde7984 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3021,6 +3021,8 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3021 | Lisp_Object parent; | 3021 | Lisp_Object parent; |
| 3022 | struct kboard *kb; | 3022 | struct kboard *kb; |
| 3023 | 3023 | ||
| 3024 | parms = Fcopy_alist (parms); | ||
| 3025 | |||
| 3024 | /* Use this general default value to start with | 3026 | /* Use this general default value to start with |
| 3025 | until we know if this frame has a specified name. */ | 3027 | until we know if this frame has a specified name. */ |
| 3026 | Vx_resource_name = Vinvocation_name; | 3028 | Vx_resource_name = Vinvocation_name; |
| @@ -3401,6 +3403,12 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3401 | || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame)))) | 3403 | || !FRAME_LIVE_P (XFRAME (kb->Vdefault_minibuffer_frame)))) |
| 3402 | kb->Vdefault_minibuffer_frame = frame; | 3404 | kb->Vdefault_minibuffer_frame = frame; |
| 3403 | 3405 | ||
| 3406 | /* All remaining specified parameters, which have not been "used" | ||
| 3407 | by x_get_arg and friends, now go in the misc. alist of the frame. */ | ||
| 3408 | for (tem = parms; !NILP (tem); tem = XCDR (tem)) | ||
| 3409 | if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem)))) | ||
| 3410 | f->param_alist = Fcons (XCAR (tem), f->param_alist); | ||
| 3411 | |||
| 3404 | UNGCPRO; | 3412 | UNGCPRO; |
| 3405 | 3413 | ||
| 3406 | /* Make sure windows on this frame appear in calls to next-window | 3414 | /* Make sure windows on this frame appear in calls to next-window |
diff --git a/src/xterm.c b/src/xterm.c index b784b560fc4..a71ffd75e70 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* X Communication module for terminals which understand the X protocol. | 1 | /* X Communication module for terminals which understand the X protocol. |
| 2 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, | 2 | Copyright (C) 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, |
| 3 | 2002, 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -6255,23 +6255,40 @@ handle_one_xevent (dpyinfo, eventp, finish, hold_quit) | |||
| 6255 | } | 6255 | } |
| 6256 | 6256 | ||
| 6257 | /* Keysyms directly mapped to supported Unicode characters. */ | 6257 | /* Keysyms directly mapped to supported Unicode characters. */ |
| 6258 | if ((keysym >= 0x01000100 && keysym <= 0x010033ff) | 6258 | if ((keysym >= 0x01000000 && keysym <= 0x010033ff) |
| 6259 | || (keysym >= 0x0100e000 && keysym <= 0x0100ffff)) | 6259 | || (keysym >= 0x0100e000 && keysym <= 0x0100ffff)) |
| 6260 | { | 6260 | { |
| 6261 | int code, charset_id, c1, c2; | 6261 | int code = keysym & 0xFFFF, charset_id, c1, c2; |
| 6262 | 6262 | ||
| 6263 | if (keysym < 0x01002500) | 6263 | if (code < 0x80) |
| 6264 | charset_id = charset_mule_unicode_0100_24ff, | 6264 | { |
| 6265 | code = (keysym & 0xFFFF) - 0x100; | 6265 | inev.ie.kind = ASCII_KEYSTROKE_EVENT; |
| 6266 | else if (keysym < 0x0100e000) | 6266 | inev.ie.code = code; |
| 6267 | charset_id = charset_mule_unicode_2500_33ff, | 6267 | } |
| 6268 | code = (keysym & 0xFFFF) - 0x2500; | 6268 | else if (code < 0x100) |
| 6269 | { | ||
| 6270 | if (code < 0xA0) | ||
| 6271 | charset_id = CHARSET_8_BIT_CONTROL; | ||
| 6272 | else | ||
| 6273 | charset_id = charset_latin_iso8859_1; | ||
| 6274 | inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; | ||
| 6275 | inev.ie.code = MAKE_CHAR (charset_id, code, 0); | ||
| 6276 | } | ||
| 6269 | else | 6277 | else |
| 6270 | charset_id = charset_mule_unicode_e000_ffff, | 6278 | { |
| 6271 | code = (keysym & 0xFFFF) - 0xe000; | 6279 | if (code < 0x2500) |
| 6272 | c1 = (code / 96) + 32, c2 = (code % 96) + 32; | 6280 | charset_id = charset_mule_unicode_0100_24ff, |
| 6273 | inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; | 6281 | code -= 0x100; |
| 6274 | inev.ie.code = MAKE_CHAR (charset_id, c1, c2); | 6282 | else if (code < 0xE000) |
| 6283 | charset_id = charset_mule_unicode_2500_33ff, | ||
| 6284 | code -= 0x2500; | ||
| 6285 | else | ||
| 6286 | charset_id = charset_mule_unicode_e000_ffff, | ||
| 6287 | code -= 0xE000; | ||
| 6288 | c1 = (code / 96) + 32, c2 = (code % 96) + 32; | ||
| 6289 | inev.ie.kind = MULTIBYTE_CHAR_KEYSTROKE_EVENT; | ||
| 6290 | inev.ie.code = MAKE_CHAR (charset_id, c1, c2); | ||
| 6291 | } | ||
| 6275 | goto done_keysym; | 6292 | goto done_keysym; |
| 6276 | } | 6293 | } |
| 6277 | 6294 | ||
| @@ -7455,7 +7472,12 @@ x_text_icon (f, icon_name) | |||
| 7455 | /* If non-nil, this should be a string. | 7472 | /* If non-nil, this should be a string. |
| 7456 | It means catch X errors and store the error message in this string. */ | 7473 | It means catch X errors and store the error message in this string. */ |
| 7457 | 7474 | ||
| 7458 | static Lisp_Object x_error_message_string; | 7475 | struct x_error_message_stack { |
| 7476 | char string[X_ERROR_MESSAGE_SIZE]; | ||
| 7477 | Display *dpy; | ||
| 7478 | struct x_error_message_stack *prev; | ||
| 7479 | }; | ||
| 7480 | static struct x_error_message_stack *x_error_message; | ||
| 7459 | 7481 | ||
| 7460 | /* An X error handler which stores the error message in | 7482 | /* An X error handler which stores the error message in |
| 7461 | x_error_message_string. This is called from x_error_handler if | 7483 | x_error_message_string. This is called from x_error_handler if |
| @@ -7467,7 +7489,7 @@ x_error_catcher (display, error) | |||
| 7467 | XErrorEvent *error; | 7489 | XErrorEvent *error; |
| 7468 | { | 7490 | { |
| 7469 | XGetErrorText (display, error->error_code, | 7491 | XGetErrorText (display, error->error_code, |
| 7470 | SDATA (x_error_message_string), | 7492 | x_error_message->string, |
| 7471 | X_ERROR_MESSAGE_SIZE); | 7493 | X_ERROR_MESSAGE_SIZE); |
| 7472 | } | 7494 | } |
| 7473 | 7495 | ||
| @@ -7492,16 +7514,23 @@ x_catch_errors (dpy) | |||
| 7492 | Display *dpy; | 7514 | Display *dpy; |
| 7493 | { | 7515 | { |
| 7494 | int count = SPECPDL_INDEX (); | 7516 | int count = SPECPDL_INDEX (); |
| 7517 | struct x_error_message_stack *data = malloc (sizeof (*data)); | ||
| 7518 | Lisp_Object dummy; | ||
| 7519 | #ifdef ENABLE_CHECKING | ||
| 7520 | dummy = make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message); | ||
| 7521 | #else | ||
| 7522 | dummy = Qnil; | ||
| 7523 | #endif | ||
| 7495 | 7524 | ||
| 7496 | /* Make sure any errors from previous requests have been dealt with. */ | 7525 | /* Make sure any errors from previous requests have been dealt with. */ |
| 7497 | XSync (dpy, False); | 7526 | XSync (dpy, False); |
| 7498 | 7527 | ||
| 7499 | record_unwind_protect (x_catch_errors_unwind, | 7528 | data->dpy = dpy; |
| 7500 | Fcons (make_save_value (dpy, 0), | 7529 | data->string[0] = 0; |
| 7501 | x_error_message_string)); | 7530 | data->prev = x_error_message; |
| 7531 | x_error_message = data; | ||
| 7502 | 7532 | ||
| 7503 | x_error_message_string = make_uninit_string (X_ERROR_MESSAGE_SIZE); | 7533 | record_unwind_protect (x_catch_errors_unwind, dummy); |
| 7504 | SSET (x_error_message_string, 0, 0); | ||
| 7505 | 7534 | ||
| 7506 | return count; | 7535 | return count; |
| 7507 | } | 7536 | } |
| @@ -7509,11 +7538,11 @@ x_catch_errors (dpy) | |||
| 7509 | /* Unbind the binding that we made to check for X errors. */ | 7538 | /* Unbind the binding that we made to check for X errors. */ |
| 7510 | 7539 | ||
| 7511 | static Lisp_Object | 7540 | static Lisp_Object |
| 7512 | x_catch_errors_unwind (old_val) | 7541 | x_catch_errors_unwind (dummy) |
| 7513 | Lisp_Object old_val; | 7542 | Lisp_Object dummy; |
| 7514 | { | 7543 | { |
| 7515 | Lisp_Object first = XCAR (old_val); | 7544 | Display *dpy = x_error_message->dpy; |
| 7516 | Display *dpy = XSAVE_VALUE (first)->pointer; | 7545 | struct x_error_message_stack *tmp; |
| 7517 | 7546 | ||
| 7518 | /* The display may have been closed before this function is called. | 7547 | /* The display may have been closed before this function is called. |
| 7519 | Check if it is still open before calling XSync. */ | 7548 | Check if it is still open before calling XSync. */ |
| @@ -7524,7 +7553,13 @@ x_catch_errors_unwind (old_val) | |||
| 7524 | UNBLOCK_INPUT; | 7553 | UNBLOCK_INPUT; |
| 7525 | } | 7554 | } |
| 7526 | 7555 | ||
| 7527 | x_error_message_string = XCDR (old_val); | 7556 | tmp = x_error_message; |
| 7557 | x_error_message = x_error_message->prev; | ||
| 7558 | free (tmp); | ||
| 7559 | |||
| 7560 | eassert (EQ (dummy, | ||
| 7561 | make_number ((EMACS_INT)dpy + (EMACS_INT)x_error_message))); | ||
| 7562 | |||
| 7528 | return Qnil; | 7563 | return Qnil; |
| 7529 | } | 7564 | } |
| 7530 | 7565 | ||
| @@ -7540,8 +7575,8 @@ x_check_errors (dpy, format) | |||
| 7540 | /* Make sure to catch any errors incurred so far. */ | 7575 | /* Make sure to catch any errors incurred so far. */ |
| 7541 | XSync (dpy, False); | 7576 | XSync (dpy, False); |
| 7542 | 7577 | ||
| 7543 | if (SREF (x_error_message_string, 0)) | 7578 | if (x_error_message->string[0]) |
| 7544 | error (format, SDATA (x_error_message_string)); | 7579 | error (format, x_error_message->string); |
| 7545 | } | 7580 | } |
| 7546 | 7581 | ||
| 7547 | /* Nonzero if we had any X protocol errors | 7582 | /* Nonzero if we had any X protocol errors |
| @@ -7554,7 +7589,7 @@ x_had_errors_p (dpy) | |||
| 7554 | /* Make sure to catch any errors incurred so far. */ | 7589 | /* Make sure to catch any errors incurred so far. */ |
| 7555 | XSync (dpy, False); | 7590 | XSync (dpy, False); |
| 7556 | 7591 | ||
| 7557 | return SREF (x_error_message_string, 0) != 0; | 7592 | return x_error_message->string[0] != 0; |
| 7558 | } | 7593 | } |
| 7559 | 7594 | ||
| 7560 | /* Forget about any errors we have had, since we did x_catch_errors on DPY. */ | 7595 | /* Forget about any errors we have had, since we did x_catch_errors on DPY. */ |
| @@ -7563,7 +7598,7 @@ void | |||
| 7563 | x_clear_errors (dpy) | 7598 | x_clear_errors (dpy) |
| 7564 | Display *dpy; | 7599 | Display *dpy; |
| 7565 | { | 7600 | { |
| 7566 | SSET (x_error_message_string, 0, 0); | 7601 | x_error_message->string[0] = 0; |
| 7567 | } | 7602 | } |
| 7568 | 7603 | ||
| 7569 | /* Stop catching X protocol errors and let them make Emacs die. | 7604 | /* Stop catching X protocol errors and let them make Emacs die. |
| @@ -7765,7 +7800,7 @@ x_error_handler (display, error) | |||
| 7765 | Display *display; | 7800 | Display *display; |
| 7766 | XErrorEvent *error; | 7801 | XErrorEvent *error; |
| 7767 | { | 7802 | { |
| 7768 | if (! NILP (x_error_message_string)) | 7803 | if (x_error_message) |
| 7769 | x_error_catcher (display, error); | 7804 | x_error_catcher (display, error); |
| 7770 | else | 7805 | else |
| 7771 | x_error_quitter (display, error); | 7806 | x_error_quitter (display, error); |
| @@ -10923,8 +10958,7 @@ x_initialize () | |||
| 10923 | void | 10958 | void |
| 10924 | syms_of_xterm () | 10959 | syms_of_xterm () |
| 10925 | { | 10960 | { |
| 10926 | staticpro (&x_error_message_string); | 10961 | x_error_message = NULL; |
| 10927 | x_error_message_string = Qnil; | ||
| 10928 | 10962 | ||
| 10929 | staticpro (&x_display_name_list); | 10963 | staticpro (&x_display_name_list); |
| 10930 | x_display_name_list = Qnil; | 10964 | x_display_name_list = Qnil; |