diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/.gitignore | 1 | ||||
| -rw-r--r-- | src/ChangeLog | 215 | ||||
| -rw-r--r-- | src/Makefile.in | 14 | ||||
| -rw-r--r-- | src/callint.c | 15 | ||||
| -rw-r--r-- | src/data.c | 4 | ||||
| -rw-r--r-- | src/dispextern.h | 42 | ||||
| -rw-r--r-- | src/doc.c | 78 | ||||
| -rw-r--r-- | src/dosfns.c | 6 | ||||
| -rw-r--r-- | src/editfns.c | 12 | ||||
| -rw-r--r-- | src/emacs.c | 23 | ||||
| -rw-r--r-- | src/fontset.c | 41 | ||||
| -rw-r--r-- | src/fringe.c | 6 | ||||
| -rw-r--r-- | src/intervals.h | 7 | ||||
| -rw-r--r-- | src/keyboard.c | 19 | ||||
| -rw-r--r-- | src/keymap.c | 6 | ||||
| -rw-r--r-- | src/lisp.h | 7 | ||||
| -rw-r--r-- | src/lread.c | 10 | ||||
| -rw-r--r-- | src/makefile.w32-in | 3 | ||||
| -rw-r--r-- | src/msdos.c | 2 | ||||
| -rw-r--r-- | src/print.c | 2 | ||||
| -rw-r--r-- | src/process.c | 20 | ||||
| -rw-r--r-- | src/window.c | 59 | ||||
| -rw-r--r-- | src/xdisp.c | 122 | ||||
| -rw-r--r-- | src/xfaces.c | 26 | ||||
| -rw-r--r-- | src/xmenu.c | 124 | ||||
| -rw-r--r-- | src/xselect.c | 33 |
26 files changed, 684 insertions, 213 deletions
diff --git a/src/.gitignore b/src/.gitignore index 406ff7cd5e2..48c78a4f3a6 100644 --- a/src/.gitignore +++ b/src/.gitignore | |||
| @@ -17,3 +17,4 @@ obj | |||
| 17 | prefix-args | 17 | prefix-args |
| 18 | stamp-oldxmenu | 18 | stamp-oldxmenu |
| 19 | temacs | 19 | temacs |
| 20 | buildobj.lst | ||
diff --git a/src/ChangeLog b/src/ChangeLog index b65bb2d5714..cc9e71290d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,189 @@ | |||
| 1 | 2004-11-12 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * dispextern.h (struct glyph_row): New member extra_line_spacing. | ||
| 4 | (struct it): New member max_extra_line_spacing. | ||
| 5 | (MR_PARTIALLY_VISIBLE, MR_PARTIALLY_VISIBLE_AT_TOP) | ||
| 6 | (MR_PARTIALLY_VISIBLE_AT_BOTTOM): New helper macros. | ||
| 7 | (MATRIX_ROW_PARTIALLY_VISIBLE_P): Fix to return false if invisible | ||
| 8 | part of last line is only extra line spacing (so the text on the | ||
| 9 | line is fully visible). Use helper macros. | ||
| 10 | Add W arg (to use them). All callers changed. | ||
| 11 | (MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P) | ||
| 12 | (MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P): Use helper macros. | ||
| 13 | |||
| 14 | * window.c (window_scroll_pixel_based, Frecenter): Use | ||
| 15 | move_it_vertically_backward directly. | ||
| 16 | (Frecenter): Fix calculation of new start pos for negative arg. | ||
| 17 | Before, the new start pos was sometimes chosen too far back, so | ||
| 18 | the last line became only partially visible, and thus would be | ||
| 19 | either only semi-visible or automatically scrolled to the middle | ||
| 20 | of the window by redisplay. | ||
| 21 | |||
| 22 | * xdisp.c (init_iterator): Clear it.max_extra_line_spacing. | ||
| 23 | (move_it_vertically_backward): Don't recure to move further back. | ||
| 24 | (move_it_vertically): Remove superfluous condition. | ||
| 25 | (move_it_by_lines): Clear last_height when moved 0 lines. | ||
| 26 | (resize_mini_window): use it.max_extra_line_spacing. | ||
| 27 | (display_tool_bar_line): Clear row->extra_line_spacing. | ||
| 28 | (try_scrolling): Use move_it_vertically_backward directly. | ||
| 29 | (redisplay_window): Likewise. | ||
| 30 | (compute_line_metrics): Set row->extra_line_spacing. | ||
| 31 | (display_line, display_string): Likewise. | ||
| 32 | (x_produce_glyphs): Update it->max_extra_line_spacing. | ||
| 33 | |||
| 34 | * xmenu.c (pop_down_menu): Return nil. | ||
| 35 | |||
| 36 | 2004-11-12 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 37 | |||
| 38 | * xmenu.c (x_menu_wait_for_event): New function. | ||
| 39 | (popup_get_selection, popup_widget_loop): Call x_menu_wait_for_event | ||
| 40 | to handle timers. | ||
| 41 | (popup_widget_loop): Add argument do_timers. | ||
| 42 | (create_and_show_popup_menu, create_and_show_dialog): Pass 1 for | ||
| 43 | do_timers to popup_widget_loop. | ||
| 44 | (xmenu_show): Call XMenuActivateSetWaitFunction so that | ||
| 45 | x_menu_wait_for_event is called by XMenuActivate. | ||
| 46 | (create_and_show_popup_menu): Pass 1 for do_timers to | ||
| 47 | popup_get_selection. | ||
| 48 | (pop_down_menu): New function. | ||
| 49 | (popup_get_selection, popup_widget_loop): Unwind protect to | ||
| 50 | pop_down_menu. | ||
| 51 | (popup_widget_loop): Add argument widget. | ||
| 52 | (create_and_show_popup_menu, create_and_show_dialog): Pass new | ||
| 53 | argument widget to popup_widget_loop. | ||
| 54 | |||
| 55 | 2004-11-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 56 | |||
| 57 | * keymap.c (Fkeymap_prompt): Accept symbol keymaps. | ||
| 58 | |||
| 59 | 2004-11-09 Kim F. Storm <storm@cua.dk> | ||
| 60 | |||
| 61 | * xselect.c: Include <sys/types.h> and <unistd.h> (for getpid). | ||
| 62 | Fix various comments referring to XEvents instead of input events. | ||
| 63 | (x_queue_event): Fix format strings. | ||
| 64 | (x_stop_queuing_selection_requests): Likewise. | ||
| 65 | |||
| 66 | * xdisp.c (produce_image_glyph): Remove unused variable 'face_ascent'. | ||
| 67 | (pint2hrstr): Add extra braces to silence compiler. | ||
| 68 | |||
| 69 | * print.c (print_object): Fix format string. | ||
| 70 | |||
| 71 | * lread.c (read1): Fix next_char matching. | ||
| 72 | |||
| 73 | * lisp.h (Fdelete): Add EXFUN. | ||
| 74 | (replace_range_2): Add prototype. | ||
| 75 | |||
| 76 | * keyboard.c (read_avail_input): Remove unused variable 'discard'. | ||
| 77 | |||
| 78 | * intervals.h (NULL_INTERVAL_P): Add separate version when | ||
| 79 | ENABLE_CHECKING is not defined to silence compiler. | ||
| 80 | (compare_string_intervals): Add prototype. | ||
| 81 | |||
| 82 | * fringe.c (destroy_fringe_bitmap): Fix return type. | ||
| 83 | (Ffringe_bitmaps_at_pos): Remove unused var 'old_buffer'. | ||
| 84 | |||
| 85 | * emacs.c (Fdump_emacs): Fix format string. | ||
| 86 | |||
| 87 | * doc.c: Include <ctype.h>. | ||
| 88 | (Fsubstitute_command_keys): Remove unused variable 'firstkey'. | ||
| 89 | |||
| 90 | * data.c (store_symval_forwarding): Remove unused variables. | ||
| 91 | |||
| 92 | * callint.c (Fcall_interactively): Remove unused variable 'funcar'. | ||
| 93 | |||
| 94 | 2004-11-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 95 | |||
| 96 | * Makefile.in (stamp-oldxmenu): If HAVE_GTK, don't add dependencies | ||
| 97 | to ${OLDXMENU}. | ||
| 98 | |||
| 99 | 2004-11-09 Kim F. Storm <storm@cua.dk> | ||
| 100 | |||
| 101 | * process.c (Fmake_network_process): Remove kludge for interrupted | ||
| 102 | connects on BSD. If connect is interrupted, just close socket and | ||
| 103 | start over rather than sleeping and retry with same socket. | ||
| 104 | |||
| 105 | 2004-11-09 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 106 | |||
| 107 | * .cvsignore: Add buildobj.lst. | ||
| 108 | |||
| 109 | * doc.c: New variable Vbuild_files. | ||
| 110 | (Fsnarf_documentation): If Vbuild_files is nil, populate it with | ||
| 111 | file names from buildobh.lst. Only attach docstrings from files | ||
| 112 | that are in Vbuild_files. | ||
| 113 | (syms_of_doc): Defvar Vbuild_files. | ||
| 114 | |||
| 115 | * Makefile.in (SOME_MACHINE_OBJECTS): Add fringe.o, image.o | ||
| 116 | and w32*.o. | ||
| 117 | (temacs${EXEEXT}): Generate buildobj.lst when temacs is linked. | ||
| 118 | (mostlyclean): rm buildobj.lst | ||
| 119 | |||
| 120 | * makefile.w32-in ($(TEMACS)): Generate buildobj.lst when temacs | ||
| 121 | is linked. | ||
| 122 | |||
| 123 | 2004-11-09 Kim F. Storm <storm@cua.dk> | ||
| 124 | |||
| 125 | * fringe.c (update_window_fringes): Update fringe bitmaps if | ||
| 126 | cur and row ends_at_zv_p differs. If bitmaps of a row is updated, | ||
| 127 | also update previous row to get rid of misc. artifacts. | ||
| 128 | |||
| 129 | 2004-11-08 Kim F. Storm <storm@cua.dk> | ||
| 130 | |||
| 131 | * xdisp.c (fast_find_position): Fix start pos if header line present. | ||
| 132 | (note_mouse_highlight): Clear mouse face if we move out of text area. | ||
| 133 | |||
| 134 | 2004-11-08 Eli Zaretskii <eliz@gnu.org> | ||
| 135 | |||
| 136 | * editfns.c: Move #include "systime.h" before <sys/resource.h>. | ||
| 137 | Don't include <sys/time.h> explicitly. | ||
| 138 | Include <stdio.h> unconditionally, not just on MacOS. | ||
| 139 | |||
| 140 | 2004-11-08 Kenichi Handa <handa@m17n.org> | ||
| 141 | |||
| 142 | * fontset.c (fontset_pattern_regexp): Cancel my previous change; | ||
| 143 | don't pay attention to '\' before '*'. | ||
| 144 | (fontset_pattern_regexp): Change the meaning of the second arg. | ||
| 145 | (Fnew_fontset): Call fs_query_fontset, not Fquery_fontset. | ||
| 146 | (check_fontset_name): Try NAME as literal at first, and if it | ||
| 147 | failes, try NAME as pattern. | ||
| 148 | |||
| 149 | 2004-11-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 150 | |||
| 151 | * emacs.c (Fdump_emacs): Only output warning on GNU/Linux. | ||
| 152 | |||
| 153 | 2004-11-07 Andreas Schwab <schwab@suse.de> | ||
| 154 | |||
| 155 | * lisp.h: Declare Fmsdos_downcase_filename. | ||
| 156 | * dired.c: Don't declare Fmsdos_downcase_filename. | ||
| 157 | * fileio.c: Likewise. | ||
| 158 | |||
| 159 | 2004-11-07 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 160 | |||
| 161 | * dosfns.c (Fdos_memget, Fdos_memput): Use integer variable offs in | ||
| 162 | comparisons with integers instead of Lisp_Object address. | ||
| 163 | (Fmsdos_set_keyboard): Declare argument allkeys. | ||
| 164 | |||
| 165 | * msdos.c (IT_set_frame_parameters): Use EQ, not ==, for Lisp_Object:s. | ||
| 166 | |||
| 167 | * dired.c: extern declare Fmsdos_downcase_filename on MSDOS to avoid | ||
| 168 | int/Lisp_Object mixup. | ||
| 169 | |||
| 170 | * fileio.c: Ditto. | ||
| 171 | |||
| 172 | 2004-11-06 Steven Tamm <steventamm@mac.com> | ||
| 173 | |||
| 174 | * editfns.c: Need to include sys/time.h before resource.h on darwin. | ||
| 175 | |||
| 176 | 2004-11-06 Richard M. Stallman <rms@gnu.org> | ||
| 177 | |||
| 178 | * callint.c (Fcall_interactively): Avoid reusing EVENT for other data. | ||
| 179 | |||
| 180 | * xfaces.c (merge_named_face): GCPRO the face_name in the | ||
| 181 | named_merge_point struct that we make. | ||
| 182 | (merge_face_heights): Eliminate GCPRO arg. All callers changed. | ||
| 183 | |||
| 184 | * keyboard.c (command_loop_1): Change Vtransient_mark_mode | ||
| 185 | before deciding whether to inactivate mark. | ||
| 186 | |||
| 1 | 2004-11-06 Lars Brinkhoff <lars@nocrew.org> | 187 | 2004-11-06 Lars Brinkhoff <lars@nocrew.org> |
| 2 | 188 | ||
| 3 | * config.in: Regenerate (add HAVE_GETRUSAGE). | 189 | * config.in: Regenerate (add HAVE_GETRUSAGE). |
| @@ -16,7 +202,6 @@ | |||
| 16 | 202 | ||
| 17 | * xmenu.c (popup_get_selection, create_and_show_popup_menu) | 203 | * xmenu.c (popup_get_selection, create_and_show_popup_menu) |
| 18 | (create_and_show_dialog): Revert change from 2004-10-31. | 204 | (create_and_show_dialog): Revert change from 2004-10-31. |
| 19 | |||
| 20 | 205 | ||
| 21 | 2004-11-05 Luc Teirlinck <teirllm@auburn.edu> | 206 | 2004-11-05 Luc Teirlinck <teirllm@auburn.edu> |
| 22 | 207 | ||
| @@ -37,8 +222,8 @@ | |||
| 37 | (x_stop_queuing_selection_requests): Add new queue for selection | 222 | (x_stop_queuing_selection_requests): Add new queue for selection |
| 38 | input events to replace previous XEvent queue in xterm.c. | 223 | input events to replace previous XEvent queue in xterm.c. |
| 39 | (queue_selection_requests_unwind): Adapt to new queue. | 224 | (queue_selection_requests_unwind): Adapt to new queue. |
| 40 | (x_reply_selection_request): Adapt to new queue. Unexpect | 225 | (x_reply_selection_request): Adapt to new queue. |
| 41 | wait_object in case of x errors (memory leak). | 226 | Unexpect wait_object in case of x errors (memory leak). |
| 42 | (x_handle_selection_request, x_handle_selection_clear): Make static. | 227 | (x_handle_selection_request, x_handle_selection_clear): Make static. |
| 43 | (x_handle_selection_event): New function. May queue selection events. | 228 | (x_handle_selection_event): New function. May queue selection events. |
| 44 | (wait_for_property_change_unwind): Use save_value instead of cons. | 229 | (wait_for_property_change_unwind): Use save_value instead of cons. |
| @@ -91,7 +276,7 @@ | |||
| 91 | * gtkutil.h: Declare use_old_gtk_file_dialog. | 276 | * gtkutil.h: Declare use_old_gtk_file_dialog. |
| 92 | 277 | ||
| 93 | * gtkutil.c: Make use_old_gtk_file_dialog non-static. | 278 | * gtkutil.c: Make use_old_gtk_file_dialog non-static. |
| 94 | (xg_initialize): Moved DEFVAR_BOOL for use_old_gtk_file_dialog ... | 279 | (xg_initialize): Move DEFVAR_BOOL for use_old_gtk_file_dialog ... |
| 95 | * xfns.c (syms_of_xfns): ... to here. | 280 | * xfns.c (syms_of_xfns): ... to here. |
| 96 | 281 | ||
| 97 | * gtkutil.c (xg_get_file_with_chooser): Expand DEFAULT_FILENAME if | 282 | * gtkutil.c (xg_get_file_with_chooser): Expand DEFAULT_FILENAME if |
| @@ -166,20 +351,20 @@ | |||
| 166 | 351 | ||
| 167 | * lisp.h: Fx_file_dialog takes 5 parameters. | 352 | * lisp.h: Fx_file_dialog takes 5 parameters. |
| 168 | 353 | ||
| 169 | * xfns.c (Fx_file_dialog): Both Motif and GTK version: Add | 354 | * xfns.c (Fx_file_dialog): Both Motif and GTK version: |
| 170 | parameter only_dir_p. | 355 | Add parameter only_dir_p. |
| 171 | In Motif version, don't put DEFAULT_FILENAME in filter part of the | 356 | In Motif version, don't put DEFAULT_FILENAME in filter part of the |
| 172 | dialog, just text field part. Do not add DEFAULT_FILENAME | 357 | dialog, just text field part. Do not add DEFAULT_FILENAME |
| 173 | to list of files if it isn't there. | 358 | to list of files if it isn't there. |
| 174 | In GTK version, pass only_dir_p parameter to xg_get_file_name. | 359 | In GTK version, pass only_dir_p parameter to xg_get_file_name. |
| 175 | 360 | ||
| 176 | * macfns.c (Fx_file_dialog): Add parameter only_dir_p. Check | 361 | * macfns.c (Fx_file_dialog): Add parameter only_dir_p. |
| 177 | only_dir_p instead of comparing prompt to "Dired". When using | 362 | Check only_dir_p instead of comparing prompt to "Dired". When using |
| 178 | a save dialog, add option kNavDontConfirmReplacement, change title | 363 | a save dialog, add option kNavDontConfirmReplacement, change title |
| 179 | to "Enter name", change text for save button to "Ok". | 364 | to "Enter name", change text for save button to "Ok". |
| 180 | 365 | ||
| 181 | * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. Check | 366 | * w32fns.c (Fx_file_dialog): Add parameter only_dir_p. |
| 182 | only_dir_p instead of comparing prompt to "Dired". | 367 | Check only_dir_p instead of comparing prompt to "Dired". |
| 183 | 368 | ||
| 184 | * gtkutil.c (xg_get_file_with_chooser) | 369 | * gtkutil.c (xg_get_file_with_chooser) |
| 185 | (xg_get_file_with_selection): New functions, only defined ifdef | 370 | (xg_get_file_with_selection): New functions, only defined ifdef |
| @@ -196,8 +381,8 @@ | |||
| 196 | 381 | ||
| 197 | 2004-11-01 Kim F. Storm <storm@cua.dk> | 382 | 2004-11-01 Kim F. Storm <storm@cua.dk> |
| 198 | 383 | ||
| 199 | * process.c (connect_wait_mask, num_pending_connects): Only | 384 | * process.c (connect_wait_mask, num_pending_connects): |
| 200 | declare and use them if NON_BLOCKING_CONNECT is defined. | 385 | Only declare and use them if NON_BLOCKING_CONNECT is defined. |
| 201 | (init_process): Initialize them if NON_BLOCKING_CONNECT defined. | 386 | (init_process): Initialize them if NON_BLOCKING_CONNECT defined. |
| 202 | (IF_NON_BLOCKING_CONNECT): New helper macro. | 387 | (IF_NON_BLOCKING_CONNECT): New helper macro. |
| 203 | (wait_reading_process_output): Only declare and use local vars | 388 | (wait_reading_process_output): Only declare and use local vars |
| @@ -212,8 +397,8 @@ | |||
| 212 | * xmenu.c: Add prototypes for forward function declarations. | 397 | * xmenu.c: Add prototypes for forward function declarations. |
| 213 | (popup_get_selection): Remove parameter do_timers, remove call to | 398 | (popup_get_selection): Remove parameter do_timers, remove call to |
| 214 | timer_check. | 399 | timer_check. |
| 215 | (create_and_show_popup_menu, create_and_show_dialog): Remove | 400 | (create_and_show_popup_menu, create_and_show_dialog): |
| 216 | parameter do_timers from call to popup_get_selection. | 401 | Remove parameter do_timers from call to popup_get_selection. |
| 217 | 402 | ||
| 218 | * xdisp.c (update_tool_bar): Pass a copy of f->tool_bar_items to | 403 | * xdisp.c (update_tool_bar): Pass a copy of f->tool_bar_items to |
| 219 | tool_bar_items and assign the result to f->tool_bar_items if | 404 | tool_bar_items and assign the result to f->tool_bar_items if |
| @@ -232,7 +417,7 @@ | |||
| 232 | * macterm.c: allow user to assign key modifiers to the Mac Option | 417 | * macterm.c: allow user to assign key modifiers to the Mac Option |
| 233 | key via a 'mac-option-modifier' variable. | 418 | key via a 'mac-option-modifier' variable. |
| 234 | 419 | ||
| 235 | 2004-10-28 Stefan <monnier@iro.umontreal.ca> | 420 | 2004-10-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| 236 | 421 | ||
| 237 | * xselect.c (Vx_lost_selection_functions, Vx_sent_selection_functions): | 422 | * xselect.c (Vx_lost_selection_functions, Vx_sent_selection_functions): |
| 238 | Rename from Vx_lost_selection_hooks and Vx_sent_selection_hooks. | 423 | Rename from Vx_lost_selection_hooks and Vx_sent_selection_hooks. |
diff --git a/src/Makefile.in b/src/Makefile.in index ebbc4f45d61..820ade11d39 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -596,8 +596,10 @@ obj= dispnew.o frame.o scroll.o xdisp.o $(XMENU_OBJ) window.o \ | |||
| 596 | These go in the DOC file on all machines | 596 | These go in the DOC file on all machines |
| 597 | in case they are needed there. */ | 597 | in case they are needed there. */ |
| 598 | SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ | 598 | SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o \ |
| 599 | xterm.o xfns.o xmenu.o xselect.o xrdb.o \ | 599 | xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o \ |
| 600 | mac.o macterm.o macfns.o macmenu.o fontset.o | 600 | mac.o macterm.o macfns.o macmenu.o fontset.o \ |
| 601 | w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o \ | ||
| 602 | w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o | ||
| 601 | 603 | ||
| 602 | 604 | ||
| 603 | #ifdef TERMINFO | 605 | #ifdef TERMINFO |
| @@ -948,6 +950,7 @@ ${libsrc}make-docfile${EXEEXT}: | |||
| 948 | #endif | 950 | #endif |
| 949 | 951 | ||
| 950 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} | 952 | temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} ${otherobj} OBJECTS_MACHINE prefix-args${EXEEXT} |
| 953 | echo "${obj} ${otherobj} " OBJECTS_MACHINE > buildobj.lst | ||
| 951 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ | 954 | $(LD) YMF_PASS_LDFLAGS (${STARTFLAGS} ${TEMACS_LDFLAGS}) $(LDFLAGS) \ |
| 952 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ | 955 | -o temacs ${STARTFILES} ${obj} ${otherobj} \ |
| 953 | OBJECTS_MACHINE ${LIBES} | 956 | OBJECTS_MACHINE ${LIBES} |
| @@ -963,7 +966,7 @@ prefix-args${EXEEXT}: prefix-args.c $(config_h) | |||
| 963 | #define OLDXMENU_OPTIONS | 966 | #define OLDXMENU_OPTIONS |
| 964 | #endif | 967 | #endif |
| 965 | 968 | ||
| 966 | #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) | 969 | #if defined (HAVE_X_WINDOWS) && defined (HAVE_X11) && defined (HAVE_MENUS) && ! defined (HAVE_GTK) |
| 967 | 970 | ||
| 968 | /* We use stamp-xmenu with these two deps | 971 | /* We use stamp-xmenu with these two deps |
| 969 | to both ensure that lwlib gets remade based on its dependencies | 972 | to both ensure that lwlib gets remade based on its dependencies |
| @@ -1019,12 +1022,12 @@ really-oldXMenu: | |||
| 1019 | @true /* make -t should not create really-oldXMenu. */ | 1022 | @true /* make -t should not create really-oldXMenu. */ |
| 1020 | .PHONY: really-oldXMenu | 1023 | .PHONY: really-oldXMenu |
| 1021 | #endif /* not USE_X_TOOLKIT */ | 1024 | #endif /* not USE_X_TOOLKIT */ |
| 1022 | #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */ | 1025 | #else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ |
| 1023 | 1026 | ||
| 1024 | /* We don\'t really need this, but satisfy the dependency. */ | 1027 | /* We don\'t really need this, but satisfy the dependency. */ |
| 1025 | stamp-oldxmenu: | 1028 | stamp-oldxmenu: |
| 1026 | touch stamp-oldxmenu | 1029 | touch stamp-oldxmenu |
| 1027 | #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS) */ | 1030 | #endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ |
| 1028 | 1031 | ||
| 1029 | ../config.status:: epaths.in | 1032 | ../config.status:: epaths.in |
| 1030 | @echo "The file epaths.h needs to be set up from epaths.in." | 1033 | @echo "The file epaths.h needs to be set up from epaths.in." |
| @@ -1279,6 +1282,7 @@ mostlyclean: | |||
| 1279 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a | 1282 | rm -f temacs${EXEEXT} prefix-args${EXEEXT} core *.core \#* *.o libXMenu11.a liblw.a |
| 1280 | rm -f ../etc/DOC | 1283 | rm -f ../etc/DOC |
| 1281 | rm -f bootstrap-emacs${EXEEXT} | 1284 | rm -f bootstrap-emacs${EXEEXT} |
| 1285 | rm -f buildobj.lst | ||
| 1282 | clean: mostlyclean | 1286 | clean: mostlyclean |
| 1283 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} | 1287 | rm -f emacs-*${EXEEXT} emacs${EXEEXT} |
| 1284 | /**/# This is used in making a distribution. | 1288 | /**/# This is used in making a distribution. |
diff --git a/src/callint.c b/src/callint.c index da88693cd78..bb71ad50f44 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -265,7 +265,6 @@ If KEYS is omitted or nil, the return value of `this-command-keys' is used. */) | |||
| 265 | Lisp_Object *args, *visargs; | 265 | Lisp_Object *args, *visargs; |
| 266 | unsigned char **argstrings; | 266 | unsigned char **argstrings; |
| 267 | Lisp_Object fun; | 267 | Lisp_Object fun; |
| 268 | Lisp_Object funcar; | ||
| 269 | Lisp_Object specs; | 268 | Lisp_Object specs; |
| 270 | Lisp_Object filter_specs; | 269 | Lisp_Object filter_specs; |
| 271 | Lisp_Object teml; | 270 | Lisp_Object teml; |
| @@ -451,25 +450,25 @@ If KEYS is omitted or nil, the return value of `this-command-keys' is used. */) | |||
| 451 | string++; | 450 | string++; |
| 452 | else if (*string == '@') | 451 | else if (*string == '@') |
| 453 | { | 452 | { |
| 454 | Lisp_Object event; | 453 | Lisp_Object event, tem; |
| 455 | 454 | ||
| 456 | event = (next_event < key_count | 455 | event = (next_event < key_count |
| 457 | ? XVECTOR (keys)->contents[next_event] | 456 | ? XVECTOR (keys)->contents[next_event] |
| 458 | : Qnil); | 457 | : Qnil); |
| 459 | if (EVENT_HAS_PARAMETERS (event) | 458 | if (EVENT_HAS_PARAMETERS (event) |
| 460 | && (event = XCDR (event), CONSP (event)) | 459 | && (tem = XCDR (event), CONSP (tem)) |
| 461 | && (event = XCAR (event), CONSP (event)) | 460 | && (tem = XCAR (tem), CONSP (tem)) |
| 462 | && (event = XCAR (event), WINDOWP (event))) | 461 | && (tem = XCAR (tem), WINDOWP (tem))) |
| 463 | { | 462 | { |
| 464 | if (MINI_WINDOW_P (XWINDOW (event)) | 463 | if (MINI_WINDOW_P (XWINDOW (tem)) |
| 465 | && ! (minibuf_level > 0 && EQ (event, minibuf_window))) | 464 | && ! (minibuf_level > 0 && EQ (tem, minibuf_window))) |
| 466 | error ("Attempt to select inactive minibuffer window"); | 465 | error ("Attempt to select inactive minibuffer window"); |
| 467 | 466 | ||
| 468 | /* If the current buffer wants to clean up, let it. */ | 467 | /* If the current buffer wants to clean up, let it. */ |
| 469 | if (!NILP (Vmouse_leave_buffer_hook)) | 468 | if (!NILP (Vmouse_leave_buffer_hook)) |
| 470 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); | 469 | call1 (Vrun_hooks, Qmouse_leave_buffer_hook); |
| 471 | 470 | ||
| 472 | Fselect_window (event, Qnil); | 471 | Fselect_window (tem, Qnil); |
| 473 | } | 472 | } |
| 474 | string++; | 473 | string++; |
| 475 | } | 474 | } |
diff --git a/src/data.c b/src/data.c index 92487f82ddb..2e3378cf319 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -908,8 +908,6 @@ store_symval_forwarding (symbol, valcontents, newval, buf) | |||
| 908 | register Lisp_Object valcontents, newval; | 908 | register Lisp_Object valcontents, newval; |
| 909 | struct buffer *buf; | 909 | struct buffer *buf; |
| 910 | { | 910 | { |
| 911 | int offset; | ||
| 912 | |||
| 913 | switch (SWITCH_ENUM_CAST (XTYPE (valcontents))) | 911 | switch (SWITCH_ENUM_CAST (XTYPE (valcontents))) |
| 914 | { | 912 | { |
| 915 | case Lisp_Misc: | 913 | case Lisp_Misc: |
| @@ -941,7 +939,7 @@ store_symval_forwarding (symbol, valcontents, newval, buf) | |||
| 941 | - (char *) &buffer_defaults); | 939 | - (char *) &buffer_defaults); |
| 942 | int idx = PER_BUFFER_IDX (offset); | 940 | int idx = PER_BUFFER_IDX (offset); |
| 943 | 941 | ||
| 944 | Lisp_Object tail, buf; | 942 | Lisp_Object tail; |
| 945 | 943 | ||
| 946 | if (idx <= 0) | 944 | if (idx <= 0) |
| 947 | break; | 945 | break; |
diff --git a/src/dispextern.h b/src/dispextern.h index 166d420d857..a179c8488dd 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -694,6 +694,10 @@ struct glyph_row | |||
| 694 | frames. It may be < 0 in case of completely invisible rows. */ | 694 | frames. It may be < 0 in case of completely invisible rows. */ |
| 695 | int visible_height; | 695 | int visible_height; |
| 696 | 696 | ||
| 697 | /* Extra line spacing added after this row. Do not consider this | ||
| 698 | in last row when checking if row is fully visible. */ | ||
| 699 | int extra_line_spacing; | ||
| 700 | |||
| 697 | /* Hash code. This hash code is available as soon as the row | 701 | /* Hash code. This hash code is available as soon as the row |
| 698 | is constructed, i.e. after a call to display_line. */ | 702 | is constructed, i.e. after a call to display_line. */ |
| 699 | unsigned hash; | 703 | unsigned hash; |
| @@ -916,22 +920,39 @@ struct glyph_row *matrix_row P_ ((struct glyph_matrix *, int)); | |||
| 916 | 920 | ||
| 917 | #define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p) | 921 | #define MATRIX_ROW_DISPLAYS_TEXT_P(ROW) ((ROW)->displays_text_p) |
| 918 | 922 | ||
| 923 | |||
| 924 | /* Helper macros */ | ||
| 925 | |||
| 926 | #define MR_PARTIALLY_VISIBLE(ROW) \ | ||
| 927 | ((ROW)->height != (ROW)->visible_height) | ||
| 928 | |||
| 929 | #define MR_PARTIALLY_VISIBLE_AT_TOP(W, ROW) \ | ||
| 930 | ((ROW)->y < WINDOW_HEADER_LINE_HEIGHT ((W))) | ||
| 931 | |||
| 932 | #define MR_PARTIALLY_VISIBLE_AT_BOTTOM(W, ROW) \ | ||
| 933 | (((ROW)->y + (ROW)->height - (ROW)->extra_line_spacing) \ | ||
| 934 | > WINDOW_BOX_HEIGHT_NO_MODE_LINE ((W))) | ||
| 935 | |||
| 919 | /* Non-zero if ROW is not completely visible in window W. */ | 936 | /* Non-zero if ROW is not completely visible in window W. */ |
| 920 | 937 | ||
| 921 | #define MATRIX_ROW_PARTIALLY_VISIBLE_P(ROW) \ | 938 | #define MATRIX_ROW_PARTIALLY_VISIBLE_P(W, ROW) \ |
| 922 | ((ROW)->height != (ROW)->visible_height) | 939 | (MR_PARTIALLY_VISIBLE ((ROW)) \ |
| 940 | && (MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW)) \ | ||
| 941 | || MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW)))) | ||
| 942 | |||
| 943 | |||
| 923 | 944 | ||
| 924 | /* Non-zero if ROW is partially visible at the top of window W. */ | 945 | /* Non-zero if ROW is partially visible at the top of window W. */ |
| 925 | 946 | ||
| 926 | #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \ | 947 | #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P(W, ROW) \ |
| 927 | (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \ | 948 | (MR_PARTIALLY_VISIBLE ((ROW)) \ |
| 928 | && (ROW)->y < WINDOW_HEADER_LINE_HEIGHT ((W))) | 949 | && MR_PARTIALLY_VISIBLE_AT_TOP ((W), (ROW))) |
| 929 | 950 | ||
| 930 | /* Non-zero if ROW is partially visible at the bottom of window W. */ | 951 | /* Non-zero if ROW is partially visible at the bottom of window W. */ |
| 931 | 952 | ||
| 932 | #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW) \ | 953 | #define MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P(W, ROW) \ |
| 933 | (MATRIX_ROW_PARTIALLY_VISIBLE_P ((ROW)) \ | 954 | (MR_PARTIALLY_VISIBLE ((ROW)) \ |
| 934 | && (ROW)->y + (ROW)->height > WINDOW_BOX_HEIGHT_NO_MODE_LINE ((W))) | 955 | && MR_PARTIALLY_VISIBLE_AT_BOTTOM ((W), (ROW))) |
| 935 | 956 | ||
| 936 | /* Return the bottom Y + 1 of ROW. */ | 957 | /* Return the bottom Y + 1 of ROW. */ |
| 937 | 958 | ||
| @@ -1986,10 +2007,13 @@ struct it | |||
| 1986 | line, if the window has one. */ | 2007 | line, if the window has one. */ |
| 1987 | int last_visible_y; | 2008 | int last_visible_y; |
| 1988 | 2009 | ||
| 1989 | /* Additional space in pixels between lines (for window systems | 2010 | /* Default amount of additional space in pixels between lines (for |
| 1990 | only.) */ | 2011 | window systems only.) */ |
| 1991 | int extra_line_spacing; | 2012 | int extra_line_spacing; |
| 1992 | 2013 | ||
| 2014 | /* Max extra line spacing added in this row. */ | ||
| 2015 | int max_extra_line_spacing; | ||
| 2016 | |||
| 1993 | /* Override font height information for this glyph. | 2017 | /* Override font height information for this glyph. |
| 1994 | Used if override_ascent >= 0. Cleared after this glyph. */ | 2018 | Used if override_ascent >= 0. Cleared after this glyph. */ |
| 1995 | int override_ascent, override_descent, override_boff; | 2019 | int override_ascent, override_descent, override_boff; |
| @@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 24 | 24 | ||
| 25 | #include <sys/types.h> | 25 | #include <sys/types.h> |
| 26 | #include <sys/file.h> /* Must be after sys/types.h for USG and BSD4_1*/ | 26 | #include <sys/file.h> /* Must be after sys/types.h for USG and BSD4_1*/ |
| 27 | #include <ctype.h> | ||
| 27 | 28 | ||
| 28 | #ifdef HAVE_FCNTL_H | 29 | #ifdef HAVE_FCNTL_H |
| 29 | #include <fcntl.h> | 30 | #include <fcntl.h> |
| @@ -51,6 +52,9 @@ Lisp_Object Vdoc_file_name; | |||
| 51 | 52 | ||
| 52 | Lisp_Object Qfunction_documentation; | 53 | Lisp_Object Qfunction_documentation; |
| 53 | 54 | ||
| 55 | /* A list of files used to build this Emacs binary. */ | ||
| 56 | static Lisp_Object Vbuild_files; | ||
| 57 | |||
| 54 | extern Lisp_Object Voverriding_local_map; | 58 | extern Lisp_Object Voverriding_local_map; |
| 55 | 59 | ||
| 56 | /* For VMS versions with limited file name syntax, | 60 | /* For VMS versions with limited file name syntax, |
| @@ -581,6 +585,7 @@ the same file name is found in the `doc-directory'. */) | |||
| 581 | register char *p, *end; | 585 | register char *p, *end; |
| 582 | Lisp_Object sym; | 586 | Lisp_Object sym; |
| 583 | char *name; | 587 | char *name; |
| 588 | int skip_file = 0; | ||
| 584 | 589 | ||
| 585 | CHECK_STRING (filename); | 590 | CHECK_STRING (filename); |
| 586 | 591 | ||
| @@ -618,6 +623,54 @@ the same file name is found in the `doc-directory'. */) | |||
| 618 | #endif /* VMS4_4 */ | 623 | #endif /* VMS4_4 */ |
| 619 | #endif /* VMS */ | 624 | #endif /* VMS */ |
| 620 | 625 | ||
| 626 | /* Vbuild_files is nil when temacs is run, and non-nil after that. */ | ||
| 627 | if (NILP (Vbuild_files)) | ||
| 628 | { | ||
| 629 | size_t cp_size = 0; | ||
| 630 | size_t to_read; | ||
| 631 | int nr_read; | ||
| 632 | char *cp = NULL; | ||
| 633 | char *beg, *end; | ||
| 634 | |||
| 635 | fd = emacs_open ("buildobj.lst", O_RDONLY, 0); | ||
| 636 | if (fd < 0) | ||
| 637 | report_file_error ("Opening file buildobj.lst", Qnil); | ||
| 638 | |||
| 639 | filled = 0; | ||
| 640 | for (;;) | ||
| 641 | { | ||
| 642 | cp_size += 1024; | ||
| 643 | to_read = cp_size - 1 - filled; | ||
| 644 | cp = xrealloc (cp, cp_size); | ||
| 645 | nr_read = emacs_read (fd, &cp[filled], to_read); | ||
| 646 | filled += nr_read; | ||
| 647 | if (nr_read < to_read) | ||
| 648 | break; | ||
| 649 | } | ||
| 650 | |||
| 651 | emacs_close (fd); | ||
| 652 | cp[filled] = 0; | ||
| 653 | |||
| 654 | for (beg = cp; *beg; beg = end) | ||
| 655 | { | ||
| 656 | int len; | ||
| 657 | |||
| 658 | while (*beg && isspace (*beg)) ++beg; | ||
| 659 | |||
| 660 | for (end = beg; *end && ! isspace (*end); ++end) | ||
| 661 | if (*end == '/') beg = end+1; /* skip directory part */ | ||
| 662 | |||
| 663 | len = end - beg; | ||
| 664 | if (len > 4 && end[-4] == '.' && end[-3] == 'o') | ||
| 665 | len -= 2; /* Just take .o if it ends in .obj */ | ||
| 666 | |||
| 667 | if (len > 0) | ||
| 668 | Vbuild_files = Fcons (make_string (beg, len), Vbuild_files); | ||
| 669 | } | ||
| 670 | |||
| 671 | xfree (cp); | ||
| 672 | } | ||
| 673 | |||
| 621 | fd = emacs_open (name, O_RDONLY, 0); | 674 | fd = emacs_open (name, O_RDONLY, 0); |
| 622 | if (fd < 0) | 675 | if (fd < 0) |
| 623 | report_file_error ("Opening doc string file", | 676 | report_file_error ("Opening doc string file", |
| @@ -640,10 +693,28 @@ the same file name is found in the `doc-directory'. */) | |||
| 640 | if (p != end) | 693 | if (p != end) |
| 641 | { | 694 | { |
| 642 | end = (char *) index (p, '\n'); | 695 | end = (char *) index (p, '\n'); |
| 696 | |||
| 697 | /* See if this is a file name, and if it is a file in build-files. */ | ||
| 698 | if (p[1] == 'S' && end - p > 4 && end[-2] == '.' | ||
| 699 | && (end[-1] == 'o' || end[-1] == 'c')) | ||
| 700 | { | ||
| 701 | int len = end - p - 2; | ||
| 702 | char *fromfile = alloca (len + 1); | ||
| 703 | strncpy (fromfile, &p[2], len); | ||
| 704 | fromfile[len] = 0; | ||
| 705 | if (fromfile[len-1] == 'c') | ||
| 706 | fromfile[len-1] = 'o'; | ||
| 707 | |||
| 708 | if (EQ (Fmember (build_string (fromfile), Vbuild_files), Qnil)) | ||
| 709 | skip_file = 1; | ||
| 710 | else | ||
| 711 | skip_file = 0; | ||
| 712 | } | ||
| 713 | |||
| 643 | sym = oblookup (Vobarray, p + 2, | 714 | sym = oblookup (Vobarray, p + 2, |
| 644 | multibyte_chars_in_text (p + 2, end - p - 2), | 715 | multibyte_chars_in_text (p + 2, end - p - 2), |
| 645 | end - p - 2); | 716 | end - p - 2); |
| 646 | if (SYMBOLP (sym)) | 717 | if (! skip_file && SYMBOLP (sym)) |
| 647 | { | 718 | { |
| 648 | /* Attach a docstring to a variable? */ | 719 | /* Attach a docstring to a variable? */ |
| 649 | if (p[1] == 'V') | 720 | if (p[1] == 'V') |
| @@ -756,7 +827,6 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int | |||
| 756 | } | 827 | } |
| 757 | else if (strp[0] == '\\' && strp[1] == '[') | 828 | else if (strp[0] == '\\' && strp[1] == '[') |
| 758 | { | 829 | { |
| 759 | Lisp_Object firstkey; | ||
| 760 | int start_idx; | 830 | int start_idx; |
| 761 | 831 | ||
| 762 | changed = 1; | 832 | changed = 1; |
| @@ -919,6 +989,10 @@ syms_of_doc () | |||
| 919 | doc: /* Name of file containing documentation strings of built-in symbols. */); | 989 | doc: /* Name of file containing documentation strings of built-in symbols. */); |
| 920 | Vdoc_file_name = Qnil; | 990 | Vdoc_file_name = Qnil; |
| 921 | 991 | ||
| 992 | DEFVAR_LISP ("build-files", &Vbuild_files, | ||
| 993 | doc: /* A list of files used to build this Emacs binary. */); | ||
| 994 | Vbuild_files = Qnil; | ||
| 995 | |||
| 922 | defsubr (&Sdocumentation); | 996 | defsubr (&Sdocumentation); |
| 923 | defsubr (&Sdocumentation_property); | 997 | defsubr (&Sdocumentation_property); |
| 924 | defsubr (&Ssnarf_documentation); | 998 | defsubr (&Ssnarf_documentation); |
diff --git a/src/dosfns.c b/src/dosfns.c index d9714693507..bd62147ad48 100644 --- a/src/dosfns.c +++ b/src/dosfns.c | |||
| @@ -110,7 +110,7 @@ Return the updated VECTOR. */) | |||
| 110 | offs = (unsigned long) XINT (address); | 110 | offs = (unsigned long) XINT (address); |
| 111 | CHECK_VECTOR (vector); | 111 | CHECK_VECTOR (vector); |
| 112 | len = XVECTOR (vector)-> size; | 112 | len = XVECTOR (vector)-> size; |
| 113 | if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) | 113 | if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) |
| 114 | return Qnil; | 114 | return Qnil; |
| 115 | buf = alloca (len); | 115 | buf = alloca (len); |
| 116 | dosmemget (offs, len, buf); | 116 | dosmemget (offs, len, buf); |
| @@ -135,7 +135,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0, | |||
| 135 | offs = (unsigned long) XINT (address); | 135 | offs = (unsigned long) XINT (address); |
| 136 | CHECK_VECTOR (vector); | 136 | CHECK_VECTOR (vector); |
| 137 | len = XVECTOR (vector)-> size; | 137 | len = XVECTOR (vector)-> size; |
| 138 | if (len < 1 || len > 2048 || address < 0 || address > 0xfffff - len) | 138 | if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) |
| 139 | return Qnil; | 139 | return Qnil; |
| 140 | buf = alloca (len); | 140 | buf = alloca (len); |
| 141 | 141 | ||
| @@ -155,7 +155,7 @@ If the optional argument ALLKEYS is non-nil, the keyboard is mapped for | |||
| 155 | all keys; otherwise it is only used when the ALT key is pressed. | 155 | all keys; otherwise it is only used when the ALT key is pressed. |
| 156 | The current keyboard layout is available in dos-keyboard-code. */) | 156 | The current keyboard layout is available in dos-keyboard-code. */) |
| 157 | (country_code, allkeys) | 157 | (country_code, allkeys) |
| 158 | Lisp_Object country_code; | 158 | Lisp_Object country_code, allkeys; |
| 159 | { | 159 | { |
| 160 | CHECK_NUMBER (country_code); | 160 | CHECK_NUMBER (country_code); |
| 161 | if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys))) | 161 | if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys))) |
diff --git a/src/editfns.c b/src/editfns.c index 2e8134d4495..45b7caa280b 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 22 | 22 | ||
| 23 | #include <config.h> | 23 | #include <config.h> |
| 24 | #include <sys/types.h> | 24 | #include <sys/types.h> |
| 25 | #include <stdio.h> | ||
| 25 | 26 | ||
| 26 | #ifdef VMS | 27 | #ifdef VMS |
| 27 | #include "vms-pwd.h" | 28 | #include "vms-pwd.h" |
| @@ -33,11 +34,10 @@ Boston, MA 02111-1307, USA. */ | |||
| 33 | #include <unistd.h> | 34 | #include <unistd.h> |
| 34 | #endif | 35 | #endif |
| 35 | 36 | ||
| 36 | /* Without this, sprintf on Mac OS Classic will produce wrong | 37 | /* systime.h includes <sys/time.h> which, on some systems, is required |
| 37 | result. */ | 38 | for <sys/resource.h>; thus systime.h must be included before |
| 38 | #ifdef MAC_OS8 | 39 | <sys/resource.h> */ |
| 39 | #include <stdio.h> | 40 | #include "systime.h" |
| 40 | #endif | ||
| 41 | 41 | ||
| 42 | #if defined HAVE_SYS_RESOURCE_H | 42 | #if defined HAVE_SYS_RESOURCE_H |
| 43 | #include <sys/resource.h> | 43 | #include <sys/resource.h> |
| @@ -53,8 +53,6 @@ Boston, MA 02111-1307, USA. */ | |||
| 53 | #include "frame.h" | 53 | #include "frame.h" |
| 54 | #include "window.h" | 54 | #include "window.h" |
| 55 | 55 | ||
| 56 | #include "systime.h" | ||
| 57 | |||
| 58 | #ifdef STDC_HEADERS | 56 | #ifdef STDC_HEADERS |
| 59 | #include <float.h> | 57 | #include <float.h> |
| 60 | #define MAX_10_EXP DBL_MAX_10_EXP | 58 | #define MAX_10_EXP DBL_MAX_10_EXP |
diff --git a/src/emacs.c b/src/emacs.c index ab60df39e27..356f74204bf 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -1621,16 +1621,14 @@ main (argc, argv | |||
| 1621 | keys_of_minibuf (); | 1621 | keys_of_minibuf (); |
| 1622 | keys_of_window (); | 1622 | keys_of_window (); |
| 1623 | } | 1623 | } |
| 1624 | else | 1624 | else |
| 1625 | { | 1625 | { |
| 1626 | /* | 1626 | /* Initialization that must be done even if the global variable |
| 1627 | Initialization that must be done even if the global variable | 1627 | initialized is non zero. */ |
| 1628 | initialized is non zero | ||
| 1629 | */ | ||
| 1630 | #ifdef HAVE_NTGUI | 1628 | #ifdef HAVE_NTGUI |
| 1631 | globals_of_w32fns (); | 1629 | globals_of_w32fns (); |
| 1632 | globals_of_w32menu (); | 1630 | globals_of_w32menu (); |
| 1633 | #endif /* end #ifdef HAVE_NTGUI */ | 1631 | #endif /* HAVE_NTGUI */ |
| 1634 | } | 1632 | } |
| 1635 | 1633 | ||
| 1636 | init_process (); /* init_display uses add_keyboard_wait_descriptor. */ | 1634 | init_process (); /* init_display uses add_keyboard_wait_descriptor. */ |
| @@ -2180,16 +2178,19 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2180 | if (! noninteractive) | 2178 | if (! noninteractive) |
| 2181 | error ("Dumping Emacs works only in batch mode"); | 2179 | error ("Dumping Emacs works only in batch mode"); |
| 2182 | 2180 | ||
| 2181 | #ifdef __linux__ | ||
| 2183 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) | 2182 | if (heap_bss_diff > MAX_HEAP_BSS_DIFF) |
| 2184 | { | 2183 | { |
| 2185 | fprintf (stderr, "**************************************************\n"); | 2184 | fprintf (stderr, "**************************************************\n"); |
| 2186 | fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); | 2185 | fprintf (stderr, "Warning: Your system has a gap between BSS and the\n"); |
| 2187 | fprintf (stderr, "heap. This usually means that exec-shield or\n"); | 2186 | fprintf (stderr, "heap (%lu byte). This usually means that exec-shield\n", |
| 2188 | fprintf (stderr, "something similar is in effect. The dump may fail\n"); | 2187 | heap_bss_diff); |
| 2189 | fprintf (stderr, "because of this. See the section about exec-shield\n"); | 2188 | fprintf (stderr, "or something similar is in effect. The dump may\n"); |
| 2190 | fprintf (stderr, "in etc/PROBLEMS for more information.\n"); | 2189 | fprintf (stderr, "fail because of this. See the section about \n"); |
| 2190 | fprintf (stderr, "exec-shield in etc/PROBLEMS for more information.\n"); | ||
| 2191 | fprintf (stderr, "**************************************************\n"); | 2191 | fprintf (stderr, "**************************************************\n"); |
| 2192 | } | 2192 | } |
| 2193 | #endif /* __linux__ */ | ||
| 2193 | 2194 | ||
| 2194 | /* Bind `command-line-processed' to nil before dumping, | 2195 | /* Bind `command-line-processed' to nil before dumping, |
| 2195 | so that the dumped Emacs will process its command line | 2196 | so that the dumped Emacs will process its command line |
| @@ -2278,7 +2279,7 @@ synchronize_locale (category, plocale, desired_locale) | |||
| 2278 | { | 2279 | { |
| 2279 | *plocale = desired_locale; | 2280 | *plocale = desired_locale; |
| 2280 | setlocale (category, (STRINGP (desired_locale) | 2281 | setlocale (category, (STRINGP (desired_locale) |
| 2281 | ? (char *)(SDATA (desired_locale)) | 2282 | ? (char *) SDATA (desired_locale) |
| 2282 | : "")); | 2283 | : "")); |
| 2283 | } | 2284 | } |
| 2284 | } | 2285 | } |
diff --git a/src/fontset.c b/src/fontset.c index f370f2ae981..7dff29f3ed8 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -797,7 +797,7 @@ fontset_pattern_regexp (pattern) | |||
| 797 | { | 797 | { |
| 798 | if (*p0 == '-') | 798 | if (*p0 == '-') |
| 799 | ndashes++; | 799 | ndashes++; |
| 800 | else if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') | 800 | else if (*p0 == '*') |
| 801 | nstars++; | 801 | nstars++; |
| 802 | } | 802 | } |
| 803 | 803 | ||
| @@ -812,7 +812,7 @@ fontset_pattern_regexp (pattern) | |||
| 812 | *p1++ = '^'; | 812 | *p1++ = '^'; |
| 813 | for (p0 = SDATA (pattern); *p0; p0++) | 813 | for (p0 = SDATA (pattern); *p0; p0++) |
| 814 | { | 814 | { |
| 815 | if (*p0 == '*' && p0 > SDATA (pattern) && p0[-1] != '\\') | 815 | if (*p0 == '*') |
| 816 | { | 816 | { |
| 817 | if (ndashes < 14) | 817 | if (ndashes < 14) |
| 818 | *p1++ = '.'; | 818 | *p1++ = '.'; |
| @@ -836,29 +836,33 @@ fontset_pattern_regexp (pattern) | |||
| 836 | } | 836 | } |
| 837 | 837 | ||
| 838 | /* Return ID of the base fontset named NAME. If there's no such | 838 | /* Return ID of the base fontset named NAME. If there's no such |
| 839 | fontset, return -1. */ | 839 | fontset, return -1. NAME_PATTERN specifies how to treat NAME as this: |
| 840 | 0: pattern containing '*' and '?' as wildcards | ||
| 841 | 1: regular expression | ||
| 842 | 2: literal fontset name | ||
| 843 | */ | ||
| 840 | 844 | ||
| 841 | int | 845 | int |
| 842 | fs_query_fontset (name, regexpp) | 846 | fs_query_fontset (name, name_pattern) |
| 843 | Lisp_Object name; | 847 | Lisp_Object name; |
| 844 | int regexpp; | 848 | int name_pattern; |
| 845 | { | 849 | { |
| 846 | Lisp_Object tem; | 850 | Lisp_Object tem; |
| 847 | int i; | 851 | int i; |
| 848 | 852 | ||
| 849 | name = Fdowncase (name); | 853 | name = Fdowncase (name); |
| 850 | if (!regexpp) | 854 | if (name_pattern != 1) |
| 851 | { | 855 | { |
| 852 | tem = Frassoc (name, Vfontset_alias_alist); | 856 | tem = Frassoc (name, Vfontset_alias_alist); |
| 853 | if (CONSP (tem) && STRINGP (XCAR (tem))) | 857 | if (CONSP (tem) && STRINGP (XCAR (tem))) |
| 854 | name = XCAR (tem); | 858 | name = XCAR (tem); |
| 855 | else | 859 | else if (name_pattern == 0) |
| 856 | { | 860 | { |
| 857 | tem = fontset_pattern_regexp (name); | 861 | tem = fontset_pattern_regexp (name); |
| 858 | if (STRINGP (tem)) | 862 | if (STRINGP (tem)) |
| 859 | { | 863 | { |
| 860 | name = tem; | 864 | name = tem; |
| 861 | regexpp = 1; | 865 | name_pattern = 1; |
| 862 | } | 866 | } |
| 863 | } | 867 | } |
| 864 | } | 868 | } |
| @@ -873,7 +877,7 @@ fs_query_fontset (name, regexpp) | |||
| 873 | continue; | 877 | continue; |
| 874 | 878 | ||
| 875 | this_name = FONTSET_NAME (fontset); | 879 | this_name = FONTSET_NAME (fontset); |
| 876 | if (regexpp | 880 | if (name_pattern == 1 |
| 877 | ? fast_string_match (name, this_name) >= 0 | 881 | ? fast_string_match (name, this_name) >= 0 |
| 878 | : !strcmp (SDATA (name), SDATA (this_name))) | 882 | : !strcmp (SDATA (name), SDATA (this_name))) |
| 879 | return i; | 883 | return i; |
| @@ -964,6 +968,7 @@ FONTLIST is an alist of charsets vs corresponding font name patterns. */) | |||
| 964 | { | 968 | { |
| 965 | Lisp_Object fontset, elements, ascii_font; | 969 | Lisp_Object fontset, elements, ascii_font; |
| 966 | Lisp_Object tem, tail, elt; | 970 | Lisp_Object tem, tail, elt; |
| 971 | int id; | ||
| 967 | 972 | ||
| 968 | (*check_window_system_func) (); | 973 | (*check_window_system_func) (); |
| 969 | 974 | ||
| @@ -971,10 +976,14 @@ FONTLIST is an alist of charsets vs corresponding font name patterns. */) | |||
| 971 | CHECK_LIST (fontlist); | 976 | CHECK_LIST (fontlist); |
| 972 | 977 | ||
| 973 | name = Fdowncase (name); | 978 | name = Fdowncase (name); |
| 974 | tem = Fquery_fontset (name, Qnil); | 979 | id = fs_query_fontset (name, 2); |
| 975 | if (!NILP (tem)) | 980 | if (id >= 0) |
| 976 | error ("Fontset `%s' matches the existing fontset `%s'", | 981 | { |
| 977 | SDATA (name), SDATA (tem)); | 982 | fontset = FONTSET_FROM_ID (id); |
| 983 | tem = FONTSET_NAME (fontset); | ||
| 984 | error ("Fontset `%s' matches the existing fontset `%s'", | ||
| 985 | SDATA (name), SDATA (tem)); | ||
| 986 | } | ||
| 978 | 987 | ||
| 979 | /* Check the validity of FONTLIST while creating a template for | 988 | /* Check the validity of FONTLIST while creating a template for |
| 980 | fontset elements. */ | 989 | fontset elements. */ |
| @@ -1049,7 +1058,11 @@ check_fontset_name (name) | |||
| 1049 | return Vdefault_fontset; | 1058 | return Vdefault_fontset; |
| 1050 | 1059 | ||
| 1051 | CHECK_STRING (name); | 1060 | CHECK_STRING (name); |
| 1052 | id = fs_query_fontset (name, 0); | 1061 | /* First try NAME as literal. */ |
| 1062 | id = fs_query_fontset (name, 2); | ||
| 1063 | if (id < 0) | ||
| 1064 | /* For backward compatibility, try again NAME as pattern. */ | ||
| 1065 | id = fs_query_fontset (name, 0); | ||
| 1053 | if (id < 0) | 1066 | if (id < 0) |
| 1054 | error ("Fontset `%s' does not exist", SDATA (name)); | 1067 | error ("Fontset `%s' does not exist", SDATA (name)); |
| 1055 | return FONTSET_FROM_ID (id); | 1068 | return FONTSET_FROM_ID (id); |
diff --git a/src/fringe.c b/src/fringe.c index e66fa4adecc..03abffab5c8 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -931,6 +931,7 @@ update_window_fringes (w, force_p) | |||
| 931 | if (force_p | 931 | if (force_p |
| 932 | || row->y != cur->y | 932 | || row->y != cur->y |
| 933 | || row->visible_height != cur->visible_height | 933 | || row->visible_height != cur->visible_height |
| 934 | || row->ends_at_zv_p != cur->ends_at_zv_p | ||
| 934 | || left != cur->left_fringe_bitmap | 935 | || left != cur->left_fringe_bitmap |
| 935 | || right != cur->right_fringe_bitmap | 936 | || right != cur->right_fringe_bitmap |
| 936 | || left_face_id != cur->left_fringe_face_id | 937 | || left_face_id != cur->left_fringe_face_id |
| @@ -954,6 +955,9 @@ update_window_fringes (w, force_p) | |||
| 954 | row->right_fringe_bitmap = right; | 955 | row->right_fringe_bitmap = right; |
| 955 | row->left_fringe_face_id = left_face_id; | 956 | row->left_fringe_face_id = left_face_id; |
| 956 | row->right_fringe_face_id = right_face_id; | 957 | row->right_fringe_face_id = right_face_id; |
| 958 | |||
| 959 | if (rn > 0 && row->redraw_fringe_bitmaps_p) | ||
| 960 | row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; | ||
| 957 | } | 961 | } |
| 958 | 962 | ||
| 959 | return redraw_p; | 963 | return redraw_p; |
| @@ -1057,7 +1061,7 @@ compute_fringe_widths (f, redraw) | |||
| 1057 | 1061 | ||
| 1058 | /* Free resources used by a user-defined bitmap. */ | 1062 | /* Free resources used by a user-defined bitmap. */ |
| 1059 | 1063 | ||
| 1060 | int | 1064 | void |
| 1061 | destroy_fringe_bitmap (n) | 1065 | destroy_fringe_bitmap (n) |
| 1062 | int n; | 1066 | int n; |
| 1063 | { | 1067 | { |
diff --git a/src/intervals.h b/src/intervals.h index 15e59537377..f3b281f4184 100644 --- a/src/intervals.h +++ b/src/intervals.h | |||
| @@ -84,9 +84,14 @@ struct interval | |||
| 84 | #define INT_LISPLIKE(i) (BUFFERP ((Lisp_Object){(EMACS_INT)(i)}) \ | 84 | #define INT_LISPLIKE(i) (BUFFERP ((Lisp_Object){(EMACS_INT)(i)}) \ |
| 85 | || STRINGP ((Lisp_Object){(EMACS_INT)(i)})) | 85 | || STRINGP ((Lisp_Object){(EMACS_INT)(i)})) |
| 86 | #endif | 86 | #endif |
| 87 | |||
| 88 | #ifdef ENABLE_CHECKING | ||
| 87 | #define NULL_INTERVAL_P(i) \ | 89 | #define NULL_INTERVAL_P(i) \ |
| 88 | ((void)CHECK (!INT_LISPLIKE (i), "non-interval"), (i) == NULL_INTERVAL) | 90 | ((void)CHECK (!INT_LISPLIKE (i), "non-interval"), (i) == NULL_INTERVAL) |
| 89 | /* old #define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL || INT_LISPLIKE (i)) */ | 91 | /* old #define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL || INT_LISPLIKE (i)) */ |
| 92 | #else | ||
| 93 | #define NULL_INTERVAL_P(i) ((i) == NULL_INTERVAL) | ||
| 94 | #endif | ||
| 90 | 95 | ||
| 91 | /* True if this interval has no right child. */ | 96 | /* True if this interval has no right child. */ |
| 92 | #define NULL_RIGHT_CHILD(i) ((i)->right == NULL_INTERVAL) | 97 | #define NULL_RIGHT_CHILD(i) ((i)->right == NULL_INTERVAL) |
| @@ -289,7 +294,7 @@ extern INTERVAL balance_intervals P_ ((INTERVAL)); | |||
| 289 | extern INLINE void copy_intervals_to_string P_ ((Lisp_Object, struct buffer *, | 294 | extern INLINE void copy_intervals_to_string P_ ((Lisp_Object, struct buffer *, |
| 290 | int, int)); | 295 | int, int)); |
| 291 | extern INTERVAL copy_intervals P_ ((INTERVAL, int, int)); | 296 | extern INTERVAL copy_intervals P_ ((INTERVAL, int, int)); |
| 292 | extern int compare_string_intervals P_ ((Lisp_Object s1, Lisp_Object s2)); | 297 | extern int compare_string_intervals P_ ((Lisp_Object, Lisp_Object)); |
| 293 | extern Lisp_Object textget P_ ((Lisp_Object, Lisp_Object)); | 298 | extern Lisp_Object textget P_ ((Lisp_Object, Lisp_Object)); |
| 294 | extern Lisp_Object lookup_char_property P_ ((Lisp_Object, Lisp_Object, int)); | 299 | extern Lisp_Object lookup_char_property P_ ((Lisp_Object, Lisp_Object, int)); |
| 295 | extern void move_if_not_intangible P_ ((int)); | 300 | extern void move_if_not_intangible P_ ((int)); |
diff --git a/src/keyboard.c b/src/keyboard.c index 35bfd1402c9..b520d655fb9 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1827,6 +1827,14 @@ command_loop_1 () | |||
| 1827 | 1827 | ||
| 1828 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) | 1828 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) |
| 1829 | { | 1829 | { |
| 1830 | /* Setting transient-mark-mode to `only' is a way of | ||
| 1831 | turning it on for just one command. */ | ||
| 1832 | |||
| 1833 | if (EQ (Vtransient_mark_mode, Qidentity)) | ||
| 1834 | Vtransient_mark_mode = Qnil; | ||
| 1835 | if (EQ (Vtransient_mark_mode, Qonly)) | ||
| 1836 | Vtransient_mark_mode = Qidentity; | ||
| 1837 | |||
| 1830 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) | 1838 | if (!NILP (Vdeactivate_mark) && !NILP (Vtransient_mark_mode)) |
| 1831 | { | 1839 | { |
| 1832 | /* We could also call `deactivate'mark'. */ | 1840 | /* We could also call `deactivate'mark'. */ |
| @@ -1842,16 +1850,6 @@ command_loop_1 () | |||
| 1842 | call1 (Vrun_hooks, intern ("activate-mark-hook")); | 1850 | call1 (Vrun_hooks, intern ("activate-mark-hook")); |
| 1843 | } | 1851 | } |
| 1844 | 1852 | ||
| 1845 | /* Setting transient-mark-mode to `only' is a way of | ||
| 1846 | turning it on for just one command. */ | ||
| 1847 | if (!NILP (current_buffer->mark_active) && !NILP (Vrun_hooks)) | ||
| 1848 | { | ||
| 1849 | if (EQ (Vtransient_mark_mode, Qidentity)) | ||
| 1850 | Vtransient_mark_mode = Qnil; | ||
| 1851 | if (EQ (Vtransient_mark_mode, Qonly)) | ||
| 1852 | Vtransient_mark_mode = Qidentity; | ||
| 1853 | } | ||
| 1854 | |||
| 1855 | finalize: | 1853 | finalize: |
| 1856 | 1854 | ||
| 1857 | if (current_buffer == prev_buffer | 1855 | if (current_buffer == prev_buffer |
| @@ -6640,7 +6638,6 @@ read_avail_input (expected) | |||
| 6640 | if (d->read_socket_hook) | 6638 | if (d->read_socket_hook) |
| 6641 | { | 6639 | { |
| 6642 | int nr; | 6640 | int nr; |
| 6643 | |||
| 6644 | struct input_event hold_quit; | 6641 | struct input_event hold_quit; |
| 6645 | 6642 | ||
| 6646 | EVENT_INIT (hold_quit); | 6643 | EVENT_INIT (hold_quit); |
diff --git a/src/keymap.c b/src/keymap.c index 256485079c1..891e41f0b58 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -214,13 +214,13 @@ when reading a key-sequence to be looked-up in this keymap. */) | |||
| 214 | (map) | 214 | (map) |
| 215 | Lisp_Object map; | 215 | Lisp_Object map; |
| 216 | { | 216 | { |
| 217 | map = get_keymap (map, 0, 0); | ||
| 217 | while (CONSP (map)) | 218 | while (CONSP (map)) |
| 218 | { | 219 | { |
| 219 | register Lisp_Object tem; | 220 | Lisp_Object tem = XCAR (map); |
| 220 | tem = Fcar (map); | ||
| 221 | if (STRINGP (tem)) | 221 | if (STRINGP (tem)) |
| 222 | return tem; | 222 | return tem; |
| 223 | map = Fcdr (map); | 223 | map = XCDR (map); |
| 224 | } | 224 | } |
| 225 | return Qnil; | 225 | return Qnil; |
| 226 | } | 226 | } |
diff --git a/src/lisp.h b/src/lisp.h index 7b9b0427da6..2c3141733bc 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -2278,6 +2278,7 @@ EXFUN (Felt, 2); | |||
| 2278 | EXFUN (Fmember, 2); | 2278 | EXFUN (Fmember, 2); |
| 2279 | EXFUN (Frassq, 2); | 2279 | EXFUN (Frassq, 2); |
| 2280 | EXFUN (Fdelq, 2); | 2280 | EXFUN (Fdelq, 2); |
| 2281 | EXFUN (Fdelete, 2); | ||
| 2281 | EXFUN (Fsort, 2); | 2282 | EXFUN (Fsort, 2); |
| 2282 | EXFUN (Freverse, 1); | 2283 | EXFUN (Freverse, 1); |
| 2283 | EXFUN (Fnreverse, 1); | 2284 | EXFUN (Fnreverse, 1); |
| @@ -2369,6 +2370,7 @@ extern void adjust_after_replace P_ ((int, int, Lisp_Object, int, int)); | |||
| 2369 | extern void adjust_after_replace_noundo P_ ((int, int, int, int, int, int)); | 2370 | extern void adjust_after_replace_noundo P_ ((int, int, int, int, int, int)); |
| 2370 | extern void adjust_after_insert P_ ((int, int, int, int, int)); | 2371 | extern void adjust_after_insert P_ ((int, int, int, int, int)); |
| 2371 | extern void replace_range P_ ((int, int, Lisp_Object, int, int, int)); | 2372 | extern void replace_range P_ ((int, int, Lisp_Object, int, int, int)); |
| 2373 | extern void replace_range_2 P_ ((int, int, int, int, char *, int, int, int)); | ||
| 2372 | extern void syms_of_insdel P_ ((void)); | 2374 | extern void syms_of_insdel P_ ((void)); |
| 2373 | 2375 | ||
| 2374 | /* Defined in dispnew.c */ | 2376 | /* Defined in dispnew.c */ |
| @@ -3137,6 +3139,11 @@ extern void syms_of_xterm P_ ((void)); | |||
| 3137 | 3139 | ||
| 3138 | /* Defined in getloadavg.c */ | 3140 | /* Defined in getloadavg.c */ |
| 3139 | extern int getloadavg P_ ((double [], int)); | 3141 | extern int getloadavg P_ ((double [], int)); |
| 3142 | |||
| 3143 | #ifdef MSDOS | ||
| 3144 | /* Defined in msdos.c */ | ||
| 3145 | EXFUN (Fmsdos_downcase_filename, 1); | ||
| 3146 | #endif | ||
| 3140 | 3147 | ||
| 3141 | /* Nonzero means Emacs has already been initialized. | 3148 | /* Nonzero means Emacs has already been initialized. |
| 3142 | Used during startup to detect startup of dumped Emacs. */ | 3149 | Used during startup to detect startup of dumped Emacs. */ |
diff --git a/src/lread.c b/src/lread.c index 46fe6cd3e51..77750eea4fa 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -2375,7 +2375,7 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2375 | c = 0; | 2375 | c = 0; |
| 2376 | else if (c == (CHAR_CTL | '?')) | 2376 | else if (c == (CHAR_CTL | '?')) |
| 2377 | c = 127; | 2377 | c = 127; |
| 2378 | 2378 | ||
| 2379 | if (c & CHAR_SHIFT) | 2379 | if (c & CHAR_SHIFT) |
| 2380 | { | 2380 | { |
| 2381 | /* Shift modifier is valid only with [A-Za-z]. */ | 2381 | /* Shift modifier is valid only with [A-Za-z]. */ |
| @@ -2460,9 +2460,9 @@ read1 (readcharfun, pch, first_in_list) | |||
| 2460 | 2460 | ||
| 2461 | if (next_char <= 040 | 2461 | if (next_char <= 040 |
| 2462 | || (next_char < 0200 | 2462 | || (next_char < 0200 |
| 2463 | && index ("\"';([#?", next_char) | 2463 | && (index ("\"';([#?", next_char) |
| 2464 | || (!first_in_list && next_char == '`') | 2464 | || (!first_in_list && next_char == '`') |
| 2465 | || (new_backquote_flag && next_char == ','))) | 2465 | || (new_backquote_flag && next_char == ',')))) |
| 2466 | { | 2466 | { |
| 2467 | *pch = c; | 2467 | *pch = c; |
| 2468 | return Qnil; | 2468 | return Qnil; |
| @@ -3682,7 +3682,7 @@ init_lread () | |||
| 3682 | /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is | 3682 | /* When Emacs is invoked over network shares on NT, PATH_LOADSEARCH is |
| 3683 | almost never correct, thereby causing a warning to be printed out that | 3683 | almost never correct, thereby causing a warning to be printed out that |
| 3684 | confuses users. Since PATH_LOADSEARCH is always overridden by the | 3684 | confuses users. Since PATH_LOADSEARCH is always overridden by the |
| 3685 | EMACSLOADPATH environment variable below, disable the warning on NT. | 3685 | EMACSLOADPATH environment variable below, disable the warning on NT. |
| 3686 | Also, when using the "self-contained" option for Carbon Emacs for MacOSX, | 3686 | Also, when using the "self-contained" option for Carbon Emacs for MacOSX, |
| 3687 | the "standard" paths may not exist and would be overridden by | 3687 | the "standard" paths may not exist and would be overridden by |
| 3688 | EMACSLOADPATH as on NT. Since this depends on how the executable | 3688 | EMACSLOADPATH as on NT. Since this depends on how the executable |
diff --git a/src/makefile.w32-in b/src/makefile.w32-in index a7efcc4cae5..5a232e28362 100644 --- a/src/makefile.w32-in +++ b/src/makefile.w32-in | |||
| @@ -168,6 +168,9 @@ temacs: $(BLD) $(TEMACS) | |||
| 168 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) | 168 | $(TEMACS): $(TLIB0) $(TLIB1) $(TLIBW32) $(TLASTLIB) $(TOBJ) $(TRES) |
| 169 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) | 169 | $(LINK) $(LINK_OUT)$(TEMACS_TMP) $(FULL_LINK_FLAGS) $(TOBJ) $(TRES) $(LIBS) |
| 170 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16 | 170 | "../nt/$(BLD)/addsection" "$(TEMACS_TMP)" "$(TEMACS)" EMHEAP 16 |
| 171 | echo $(OBJ0) > $(BLD)/buildobj.lst | ||
| 172 | echo $(OBJ1) >> $(BLD)/buildobj.lst | ||
| 173 | echo $(WIN32OBJ) >> $(BLD)/buildobj.lst | ||
| 171 | 174 | ||
| 172 | bootstrap: bootstrap-emacs | 175 | bootstrap: bootstrap-emacs |
| 173 | 176 | ||
diff --git a/src/msdos.c b/src/msdos.c index 712eb05b959..ab71b642e80 100644 --- a/src/msdos.c +++ b/src/msdos.c | |||
| @@ -2320,7 +2320,7 @@ IT_set_frame_parameters (f, alist) | |||
| 2320 | 2320 | ||
| 2321 | /* If we are creating a new frame, begin with the original screen colors | 2321 | /* If we are creating a new frame, begin with the original screen colors |
| 2322 | used for the initial frame. */ | 2322 | used for the initial frame. */ |
| 2323 | if (alist == Vdefault_frame_alist | 2323 | if (EQ (alist, Vdefault_frame_alist) |
| 2324 | && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1) | 2324 | && initial_screen_colors[0] != -1 && initial_screen_colors[1] != -1) |
| 2325 | { | 2325 | { |
| 2326 | FRAME_FOREGROUND_PIXEL (f) = initial_screen_colors[0]; | 2326 | FRAME_FOREGROUND_PIXEL (f) = initial_screen_colors[0]; |
diff --git a/src/print.c b/src/print.c index 76c648b9a2e..8bb55f21248 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -2087,7 +2087,7 @@ print_object (obj, printcharfun, escapeflag) | |||
| 2087 | 2087 | ||
| 2088 | case Lisp_Misc_Save_Value: | 2088 | case Lisp_Misc_Save_Value: |
| 2089 | strout ("#<save_value ", -1, -1, printcharfun, 0); | 2089 | strout ("#<save_value ", -1, -1, printcharfun, 0); |
| 2090 | sprintf(buf, "ptr=0x%08x int=%d", | 2090 | sprintf(buf, "ptr=0x%08lx int=%d", |
| 2091 | (unsigned long) XSAVE_VALUE (obj)->pointer, | 2091 | (unsigned long) XSAVE_VALUE (obj)->pointer, |
| 2092 | XSAVE_VALUE (obj)->integer); | 2092 | XSAVE_VALUE (obj)->integer); |
| 2093 | strout (buf, -1, -1, printcharfun, 0); | 2093 | strout (buf, -1, -1, printcharfun, 0); |
diff --git a/src/process.c b/src/process.c index db6e85c0fb3..65dec1457b0 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -2722,7 +2722,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2722 | int xerrno = 0; | 2722 | int xerrno = 0; |
| 2723 | int s = -1, outch, inch; | 2723 | int s = -1, outch, inch; |
| 2724 | struct gcpro gcpro1; | 2724 | struct gcpro gcpro1; |
| 2725 | int retry = 0; | ||
| 2726 | int count = SPECPDL_INDEX (); | 2725 | int count = SPECPDL_INDEX (); |
| 2727 | int count1; | 2726 | int count1; |
| 2728 | Lisp_Object QCaddress; /* one of QClocal or QCremote */ | 2727 | Lisp_Object QCaddress; /* one of QClocal or QCremote */ |
| @@ -3023,6 +3022,8 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3023 | { | 3022 | { |
| 3024 | int optn, optbits; | 3023 | int optn, optbits; |
| 3025 | 3024 | ||
| 3025 | retry_connect: | ||
| 3026 | |||
| 3026 | s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); | 3027 | s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); |
| 3027 | if (s < 0) | 3028 | if (s < 0) |
| 3028 | { | 3029 | { |
| @@ -3101,8 +3102,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3101 | break; | 3102 | break; |
| 3102 | } | 3103 | } |
| 3103 | 3104 | ||
| 3104 | retry_connect: | ||
| 3105 | |||
| 3106 | immediate_quit = 1; | 3105 | immediate_quit = 1; |
| 3107 | QUIT; | 3106 | QUIT; |
| 3108 | 3107 | ||
| @@ -3144,22 +3143,13 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3144 | 3143 | ||
| 3145 | immediate_quit = 0; | 3144 | immediate_quit = 0; |
| 3146 | 3145 | ||
| 3147 | if (xerrno == EINTR) | ||
| 3148 | goto retry_connect; | ||
| 3149 | if (xerrno == EADDRINUSE && retry < 20) | ||
| 3150 | { | ||
| 3151 | /* A delay here is needed on some FreeBSD systems, | ||
| 3152 | and it is harmless, since this retrying takes time anyway | ||
| 3153 | and should be infrequent. */ | ||
| 3154 | Fsleep_for (make_number (1), Qnil); | ||
| 3155 | retry++; | ||
| 3156 | goto retry_connect; | ||
| 3157 | } | ||
| 3158 | |||
| 3159 | /* Discard the unwind protect closing S. */ | 3146 | /* Discard the unwind protect closing S. */ |
| 3160 | specpdl_ptr = specpdl + count1; | 3147 | specpdl_ptr = specpdl + count1; |
| 3161 | emacs_close (s); | 3148 | emacs_close (s); |
| 3162 | s = -1; | 3149 | s = -1; |
| 3150 | |||
| 3151 | if (xerrno == EINTR) | ||
| 3152 | goto retry_connect; | ||
| 3163 | } | 3153 | } |
| 3164 | 3154 | ||
| 3165 | if (s >= 0) | 3155 | if (s >= 0) |
diff --git a/src/window.c b/src/window.c index d9ac2eb62bd..be5e9167d67 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -206,7 +206,7 @@ static int window_initialized; | |||
| 206 | Lisp_Object Qwindow_configuration_change_hook; | 206 | Lisp_Object Qwindow_configuration_change_hook; |
| 207 | Lisp_Object Vwindow_configuration_change_hook; | 207 | Lisp_Object Vwindow_configuration_change_hook; |
| 208 | 208 | ||
| 209 | /* Nonzero means scroll commands try to put point | 209 | /* Non-nil means scroll commands try to put point |
| 210 | at the same screen height as previously. */ | 210 | at the same screen height as previously. */ |
| 211 | 211 | ||
| 212 | Lisp_Object Vscroll_preserve_screen_position; | 212 | Lisp_Object Vscroll_preserve_screen_position; |
| @@ -4508,7 +4508,7 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4508 | results for variable height lines. */ | 4508 | results for variable height lines. */ |
| 4509 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); | 4509 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); |
| 4510 | it.current_y = it.last_visible_y; | 4510 | it.current_y = it.last_visible_y; |
| 4511 | move_it_vertically (&it, - window_box_height (w) / 2); | 4511 | move_it_vertically_backward (&it, window_box_height (w) / 2); |
| 4512 | 4512 | ||
| 4513 | /* The function move_iterator_vertically may move over more than | 4513 | /* The function move_iterator_vertically may move over more than |
| 4514 | the specified y-distance. If it->w is small, e.g. a | 4514 | the specified y-distance. If it->w is small, e.g. a |
| @@ -4518,14 +4518,14 @@ window_scroll_pixel_based (window, n, whole, noerror) | |||
| 4518 | if (it.current_y <= 0) | 4518 | if (it.current_y <= 0) |
| 4519 | { | 4519 | { |
| 4520 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); | 4520 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); |
| 4521 | move_it_vertically (&it, 0); | 4521 | move_it_vertically_backward (&it, 0); |
| 4522 | it.current_y = 0; | 4522 | it.current_y = 0; |
| 4523 | } | 4523 | } |
| 4524 | 4524 | ||
| 4525 | start = it.current.pos; | 4525 | start = it.current.pos; |
| 4526 | } | 4526 | } |
| 4527 | 4527 | ||
| 4528 | /* If scroll_preserve_screen_position is non-zero, we try to set | 4528 | /* If scroll_preserve_screen_position is non-nil, we try to set |
| 4529 | point in the same window line as it is now, so get that line. */ | 4529 | point in the same window line as it is now, so get that line. */ |
| 4530 | if (!NILP (Vscroll_preserve_screen_position)) | 4530 | if (!NILP (Vscroll_preserve_screen_position)) |
| 4531 | { | 4531 | { |
| @@ -5187,7 +5187,7 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5187 | 5187 | ||
| 5188 | SET_TEXT_POS (pt, PT, PT_BYTE); | 5188 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 5189 | start_display (&it, w, pt); | 5189 | start_display (&it, w, pt); |
| 5190 | move_it_vertically (&it, - window_box_height (w) / 2); | 5190 | move_it_vertically_backward (&it, window_box_height (w) / 2); |
| 5191 | charpos = IT_CHARPOS (it); | 5191 | charpos = IT_CHARPOS (it); |
| 5192 | bytepos = IT_BYTEPOS (it); | 5192 | bytepos = IT_BYTEPOS (it); |
| 5193 | } | 5193 | } |
| @@ -5195,29 +5195,62 @@ and redisplay normally--don't erase and redraw the frame. */) | |||
| 5195 | { | 5195 | { |
| 5196 | struct it it; | 5196 | struct it it; |
| 5197 | struct text_pos pt; | 5197 | struct text_pos pt; |
| 5198 | int y0, y1, h, nlines; | 5198 | int nlines = - XINT (arg); |
| 5199 | int extra_line_spacing; | ||
| 5200 | int h = window_box_height (w); | ||
| 5199 | 5201 | ||
| 5200 | SET_TEXT_POS (pt, PT, PT_BYTE); | 5202 | SET_TEXT_POS (pt, PT, PT_BYTE); |
| 5201 | start_display (&it, w, pt); | 5203 | start_display (&it, w, pt); |
| 5202 | y0 = it.current_y; | 5204 | |
| 5205 | /* Be sure we have the exact height of the full line containing PT. */ | ||
| 5206 | move_it_by_lines (&it, 0, 1); | ||
| 5203 | 5207 | ||
| 5204 | /* The amount of pixels we have to move back is the window | 5208 | /* The amount of pixels we have to move back is the window |
| 5205 | height minus what's displayed in the line containing PT, | 5209 | height minus what's displayed in the line containing PT, |
| 5206 | and the lines below. */ | 5210 | and the lines below. */ |
| 5207 | nlines = - XINT (arg) - 1; | 5211 | it.current_y = 0; |
| 5212 | it.vpos = 0; | ||
| 5208 | move_it_by_lines (&it, nlines, 1); | 5213 | move_it_by_lines (&it, nlines, 1); |
| 5209 | 5214 | ||
| 5210 | y1 = line_bottom_y (&it); | 5215 | if (it.vpos == nlines) |
| 5216 | h -= it.current_y; | ||
| 5217 | else | ||
| 5218 | { | ||
| 5219 | /* Last line has no newline */ | ||
| 5220 | h -= line_bottom_y (&it); | ||
| 5221 | it.vpos++; | ||
| 5222 | } | ||
| 5223 | |||
| 5224 | /* Don't reserve space for extra line spacing of last line. */ | ||
| 5225 | extra_line_spacing = it.max_extra_line_spacing; | ||
| 5211 | 5226 | ||
| 5212 | /* If we can't move down NLINES lines because we hit | 5227 | /* If we can't move down NLINES lines because we hit |
| 5213 | the end of the buffer, count in some empty lines. */ | 5228 | the end of the buffer, count in some empty lines. */ |
| 5214 | if (it.vpos < nlines) | 5229 | if (it.vpos < nlines) |
| 5215 | y1 += (nlines - it.vpos) * FRAME_LINE_HEIGHT (it.f); | 5230 | { |
| 5216 | 5231 | nlines -= it.vpos; | |
| 5217 | h = window_box_height (w) - (y1 - y0); | 5232 | extra_line_spacing = it.extra_line_spacing; |
| 5233 | h -= nlines * (FRAME_LINE_HEIGHT (it.f) + extra_line_spacing); | ||
| 5234 | } | ||
| 5235 | if (h <= 0) | ||
| 5236 | return Qnil; | ||
| 5218 | 5237 | ||
| 5238 | /* Now find the new top line (starting position) of the window. */ | ||
| 5219 | start_display (&it, w, pt); | 5239 | start_display (&it, w, pt); |
| 5220 | move_it_vertically (&it, - h); | 5240 | it.current_y = 0; |
| 5241 | move_it_vertically_backward (&it, h); | ||
| 5242 | |||
| 5243 | /* If extra line spacing is present, we may move too far | ||
| 5244 | back. This causes the last line to be only partially | ||
| 5245 | visible (which triggers redisplay to recenter that line | ||
| 5246 | in the middle), so move forward. | ||
| 5247 | But ignore extra line spacing on last line, as it is not | ||
| 5248 | considered to be part of the visible height of the line. | ||
| 5249 | */ | ||
| 5250 | h += extra_line_spacing; | ||
| 5251 | while (-it.current_y > h) | ||
| 5252 | move_it_by_lines (&it, 1, 1); | ||
| 5253 | |||
| 5221 | charpos = IT_CHARPOS (it); | 5254 | charpos = IT_CHARPOS (it); |
| 5222 | bytepos = IT_BYTEPOS (it); | 5255 | bytepos = IT_BYTEPOS (it); |
| 5223 | } | 5256 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 4b0865aa4f0..c3f659a85e6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -2071,6 +2071,7 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) | |||
| 2071 | * FRAME_LINE_HEIGHT (it->f)); | 2071 | * FRAME_LINE_HEIGHT (it->f)); |
| 2072 | else if (it->f->extra_line_spacing > 0) | 2072 | else if (it->f->extra_line_spacing > 0) |
| 2073 | it->extra_line_spacing = it->f->extra_line_spacing; | 2073 | it->extra_line_spacing = it->f->extra_line_spacing; |
| 2074 | it->max_extra_line_spacing = 0; | ||
| 2074 | } | 2075 | } |
| 2075 | 2076 | ||
| 2076 | /* If realized faces have been removed, e.g. because of face | 2077 | /* If realized faces have been removed, e.g. because of face |
| @@ -6066,10 +6067,13 @@ move_it_vertically_backward (it, dy) | |||
| 6066 | { | 6067 | { |
| 6067 | int nlines, h; | 6068 | int nlines, h; |
| 6068 | struct it it2, it3; | 6069 | struct it it2, it3; |
| 6069 | int start_pos = IT_CHARPOS (*it); | 6070 | int start_pos; |
| 6070 | 6071 | ||
| 6072 | move_further_back: | ||
| 6071 | xassert (dy >= 0); | 6073 | xassert (dy >= 0); |
| 6072 | 6074 | ||
| 6075 | start_pos = IT_CHARPOS (*it); | ||
| 6076 | |||
| 6073 | /* Estimate how many newlines we must move back. */ | 6077 | /* Estimate how many newlines we must move back. */ |
| 6074 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); | 6078 | nlines = max (1, dy / FRAME_LINE_HEIGHT (it->f)); |
| 6075 | 6079 | ||
| @@ -6135,13 +6139,13 @@ move_it_vertically_backward (it, dy) | |||
| 6135 | a line height of 13 pixels each, recentering with point | 6139 | a line height of 13 pixels each, recentering with point |
| 6136 | on the bottom line will try to move -39/2 = 19 pixels | 6140 | on the bottom line will try to move -39/2 = 19 pixels |
| 6137 | backward. Try to avoid moving into the first line. */ | 6141 | backward. Try to avoid moving into the first line. */ |
| 6138 | && it->current_y - target_y > line_height / 3 * 2 | 6142 | && it->current_y - target_y > line_height * 2 / 3 |
| 6139 | && IT_CHARPOS (*it) > BEGV) | 6143 | && IT_CHARPOS (*it) > BEGV) |
| 6140 | { | 6144 | { |
| 6141 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", | 6145 | TRACE_MOVE ((stderr, " not far enough -> move_vert %d\n", |
| 6142 | target_y - it->current_y)); | 6146 | target_y - it->current_y)); |
| 6143 | move_it_vertically (it, target_y - it->current_y); | 6147 | dy = it->current_y - target_y; |
| 6144 | xassert (IT_CHARPOS (*it) >= BEGV); | 6148 | goto move_further_back; |
| 6145 | } | 6149 | } |
| 6146 | else if (target_y >= it->current_y + line_height | 6150 | else if (target_y >= it->current_y + line_height |
| 6147 | && IT_CHARPOS (*it) < ZV) | 6151 | && IT_CHARPOS (*it) < ZV) |
| @@ -6182,7 +6186,7 @@ move_it_vertically (it, dy) | |||
| 6182 | { | 6186 | { |
| 6183 | if (dy <= 0) | 6187 | if (dy <= 0) |
| 6184 | move_it_vertically_backward (it, -dy); | 6188 | move_it_vertically_backward (it, -dy); |
| 6185 | else if (dy > 0) | 6189 | else |
| 6186 | { | 6190 | { |
| 6187 | TRACE_MOVE ((stderr, "move_it_v: from %d, %d\n", IT_CHARPOS (*it), dy)); | 6191 | TRACE_MOVE ((stderr, "move_it_v: from %d, %d\n", IT_CHARPOS (*it), dy)); |
| 6188 | move_it_to (it, ZV, -1, it->current_y + dy, -1, | 6192 | move_it_to (it, ZV, -1, it->current_y + dy, -1, |
| @@ -6279,6 +6283,8 @@ move_it_by_lines (it, dvpos, need_y_p) | |||
| 6279 | /* DVPOS == 0 means move to the start of the screen line. */ | 6283 | /* DVPOS == 0 means move to the start of the screen line. */ |
| 6280 | move_it_vertically_backward (it, 0); | 6284 | move_it_vertically_backward (it, 0); |
| 6281 | xassert (it->current_x == 0 && it->hpos == 0); | 6285 | xassert (it->current_x == 0 && it->hpos == 0); |
| 6286 | /* Let next call to line_bottom_y calculate real line height */ | ||
| 6287 | last_height = 0; | ||
| 6282 | } | 6288 | } |
| 6283 | else if (dvpos > 0) | 6289 | else if (dvpos > 0) |
| 6284 | move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS); | 6290 | move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS); |
| @@ -7422,7 +7428,7 @@ resize_mini_window (w, exact_p) | |||
| 7422 | height = it.current_y + last_height; | 7428 | height = it.current_y + last_height; |
| 7423 | else | 7429 | else |
| 7424 | height = it.current_y + it.max_ascent + it.max_descent; | 7430 | height = it.current_y + it.max_ascent + it.max_descent; |
| 7425 | height -= it.extra_line_spacing; | 7431 | height -= min (it.extra_line_spacing, it.max_extra_line_spacing); |
| 7426 | height = (height + unit - 1) / unit; | 7432 | height = (height + unit - 1) / unit; |
| 7427 | } | 7433 | } |
| 7428 | 7434 | ||
| @@ -8699,6 +8705,7 @@ display_tool_bar_line (it) | |||
| 8699 | { | 8705 | { |
| 8700 | row->height = row->phys_height = it->last_visible_y - row->y; | 8706 | row->height = row->phys_height = it->last_visible_y - row->y; |
| 8701 | row->ascent = row->phys_ascent = 0; | 8707 | row->ascent = row->phys_ascent = 0; |
| 8708 | row->extra_line_spacing = 0; | ||
| 8702 | } | 8709 | } |
| 8703 | 8710 | ||
| 8704 | row->full_width_p = 1; | 8711 | row->full_width_p = 1; |
| @@ -10888,7 +10895,7 @@ make_cursor_line_fully_visible (w, force_p) | |||
| 10888 | row = MATRIX_ROW (matrix, w->cursor.vpos); | 10895 | row = MATRIX_ROW (matrix, w->cursor.vpos); |
| 10889 | 10896 | ||
| 10890 | /* If the cursor row is not partially visible, there's nothing to do. */ | 10897 | /* If the cursor row is not partially visible, there's nothing to do. */ |
| 10891 | if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (row)) | 10898 | if (!MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) |
| 10892 | return 1; | 10899 | return 1; |
| 10893 | 10900 | ||
| 10894 | /* If the row the cursor is in is taller than the window's height, | 10901 | /* If the row the cursor is in is taller than the window's height, |
| @@ -11042,7 +11049,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11042 | { | 11049 | { |
| 11043 | start_display (&it, w, scroll_margin_pos); | 11050 | start_display (&it, w, scroll_margin_pos); |
| 11044 | if (this_scroll_margin) | 11051 | if (this_scroll_margin) |
| 11045 | move_it_vertically (&it, - this_scroll_margin); | 11052 | move_it_vertically_backward (&it, this_scroll_margin); |
| 11046 | if (extra_scroll_margin_lines) | 11053 | if (extra_scroll_margin_lines) |
| 11047 | move_it_by_lines (&it, - extra_scroll_margin_lines, 0); | 11054 | move_it_by_lines (&it, - extra_scroll_margin_lines, 0); |
| 11048 | scroll_margin_pos = it.current.pos; | 11055 | scroll_margin_pos = it.current.pos; |
| @@ -11162,7 +11169,7 @@ try_scrolling (window, just_this_one_p, scroll_conservatively, | |||
| 11162 | if (amount_to_scroll <= 0) | 11169 | if (amount_to_scroll <= 0) |
| 11163 | return SCROLLING_FAILED; | 11170 | return SCROLLING_FAILED; |
| 11164 | 11171 | ||
| 11165 | move_it_vertically (&it, - amount_to_scroll); | 11172 | move_it_vertically_backward (&it, amount_to_scroll); |
| 11166 | startp = it.current.pos; | 11173 | startp = it.current.pos; |
| 11167 | } | 11174 | } |
| 11168 | } | 11175 | } |
| @@ -11466,7 +11473,7 @@ try_cursor_movement (window, startp, scroll_step) | |||
| 11466 | /* if PT is not in the glyph row, give up. */ | 11473 | /* if PT is not in the glyph row, give up. */ |
| 11467 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 11474 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 11468 | } | 11475 | } |
| 11469 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (row)) | 11476 | else if (MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)) |
| 11470 | { | 11477 | { |
| 11471 | if (PT == MATRIX_ROW_END_CHARPOS (row) | 11478 | if (PT == MATRIX_ROW_END_CHARPOS (row) |
| 11472 | && !row->ends_at_zv_p | 11479 | && !row->ends_at_zv_p |
| @@ -12043,7 +12050,7 @@ redisplay_window (window, just_this_one_p) | |||
| 12043 | if (it.current_y <= 0) | 12050 | if (it.current_y <= 0) |
| 12044 | { | 12051 | { |
| 12045 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); | 12052 | init_iterator (&it, w, PT, PT_BYTE, NULL, DEFAULT_FACE_ID); |
| 12046 | move_it_vertically (&it, 0); | 12053 | move_it_vertically_backward (&it, 0); |
| 12047 | xassert (IT_CHARPOS (it) <= PT); | 12054 | xassert (IT_CHARPOS (it) <= PT); |
| 12048 | it.current_y = 0; | 12055 | it.current_y = 0; |
| 12049 | } | 12056 | } |
| @@ -12395,7 +12402,7 @@ try_window_reusing_current_matrix (w) | |||
| 12395 | /* Give up if old or new display is scrolled vertically. We could | 12402 | /* Give up if old or new display is scrolled vertically. We could |
| 12396 | make this function handle this, but right now it doesn't. */ | 12403 | make this function handle this, but right now it doesn't. */ |
| 12397 | start_row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 12404 | start_row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 12398 | if (w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (start_row)) | 12405 | if (w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row)) |
| 12399 | return 0; | 12406 | return 0; |
| 12400 | 12407 | ||
| 12401 | /* The variable new_start now holds the new window start. The old | 12408 | /* The variable new_start now holds the new window start. The old |
| @@ -12443,7 +12450,7 @@ try_window_reusing_current_matrix (w) | |||
| 12443 | start = start_row->start.pos; | 12450 | start = start_row->start.pos; |
| 12444 | /* If there are no more rows to try, or just one, give up. */ | 12451 | /* If there are no more rows to try, or just one, give up. */ |
| 12445 | if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 | 12452 | if (start_row == MATRIX_MODE_LINE_ROW (w->current_matrix) - 1 |
| 12446 | || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (start_row) | 12453 | || w->vscroll || MATRIX_ROW_PARTIALLY_VISIBLE_P (w, start_row) |
| 12447 | || CHARPOS (start) == ZV) | 12454 | || CHARPOS (start) == ZV) |
| 12448 | { | 12455 | { |
| 12449 | clear_glyph_matrix (w->desired_matrix); | 12456 | clear_glyph_matrix (w->desired_matrix); |
| @@ -14237,6 +14244,7 @@ compute_line_metrics (it) | |||
| 14237 | row->height = it->max_ascent + it->max_descent; | 14244 | row->height = it->max_ascent + it->max_descent; |
| 14238 | row->phys_ascent = it->max_phys_ascent; | 14245 | row->phys_ascent = it->max_phys_ascent; |
| 14239 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; | 14246 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; |
| 14247 | row->extra_line_spacing = it->max_extra_line_spacing; | ||
| 14240 | } | 14248 | } |
| 14241 | 14249 | ||
| 14242 | /* Compute the width of this line. */ | 14250 | /* Compute the width of this line. */ |
| @@ -14280,6 +14288,7 @@ compute_line_metrics (it) | |||
| 14280 | row->pixel_width -= it->truncation_pixel_width; | 14288 | row->pixel_width -= it->truncation_pixel_width; |
| 14281 | row->ascent = row->phys_ascent = 0; | 14289 | row->ascent = row->phys_ascent = 0; |
| 14282 | row->height = row->phys_height = row->visible_height = 1; | 14290 | row->height = row->phys_height = row->visible_height = 1; |
| 14291 | row->extra_line_spacing = 0; | ||
| 14283 | } | 14292 | } |
| 14284 | 14293 | ||
| 14285 | /* Compute a hash code for this row. */ | 14294 | /* Compute a hash code for this row. */ |
| @@ -14616,6 +14625,7 @@ display_line (it) | |||
| 14616 | row->height = it->max_ascent + it->max_descent; | 14625 | row->height = it->max_ascent + it->max_descent; |
| 14617 | row->phys_ascent = it->max_phys_ascent; | 14626 | row->phys_ascent = it->max_phys_ascent; |
| 14618 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; | 14627 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; |
| 14628 | row->extra_line_spacing = it->max_extra_line_spacing; | ||
| 14619 | 14629 | ||
| 14620 | /* Loop generating characters. The loop is left with IT on the next | 14630 | /* Loop generating characters. The loop is left with IT on the next |
| 14621 | character to display. */ | 14631 | character to display. */ |
| @@ -14681,6 +14691,8 @@ display_line (it) | |||
| 14681 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); | 14691 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); |
| 14682 | row->phys_height = max (row->phys_height, | 14692 | row->phys_height = max (row->phys_height, |
| 14683 | it->max_phys_ascent + it->max_phys_descent); | 14693 | it->max_phys_ascent + it->max_phys_descent); |
| 14694 | row->extra_line_spacing = max (row->extra_line_spacing, | ||
| 14695 | it->max_extra_line_spacing); | ||
| 14684 | set_iterator_to_next (it, 1); | 14696 | set_iterator_to_next (it, 1); |
| 14685 | continue; | 14697 | continue; |
| 14686 | } | 14698 | } |
| @@ -14709,6 +14721,8 @@ display_line (it) | |||
| 14709 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); | 14721 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); |
| 14710 | row->phys_height = max (row->phys_height, | 14722 | row->phys_height = max (row->phys_height, |
| 14711 | it->max_phys_ascent + it->max_phys_descent); | 14723 | it->max_phys_ascent + it->max_phys_descent); |
| 14724 | row->extra_line_spacing = max (row->extra_line_spacing, | ||
| 14725 | it->max_extra_line_spacing); | ||
| 14712 | if (it->current_x - it->pixel_width < it->first_visible_x) | 14726 | if (it->current_x - it->pixel_width < it->first_visible_x) |
| 14713 | row->x = x - it->first_visible_x; | 14727 | row->x = x - it->first_visible_x; |
| 14714 | } | 14728 | } |
| @@ -14860,6 +14874,8 @@ display_line (it) | |||
| 14860 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); | 14874 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); |
| 14861 | row->phys_height = max (row->phys_height, | 14875 | row->phys_height = max (row->phys_height, |
| 14862 | it->max_phys_ascent + it->max_phys_descent); | 14876 | it->max_phys_ascent + it->max_phys_descent); |
| 14877 | row->extra_line_spacing = max (row->extra_line_spacing, | ||
| 14878 | it->max_extra_line_spacing); | ||
| 14863 | 14879 | ||
| 14864 | /* End of this display line if row is continued. */ | 14880 | /* End of this display line if row is continued. */ |
| 14865 | if (row->continued_p || row->ends_at_zv_p) | 14881 | if (row->continued_p || row->ends_at_zv_p) |
| @@ -16043,27 +16059,31 @@ pint2hrstr (buf, width, d) | |||
| 16043 | { | 16059 | { |
| 16044 | tenths = remainder / 100; | 16060 | tenths = remainder / 100; |
| 16045 | if (50 <= remainder % 100) | 16061 | if (50 <= remainder % 100) |
| 16046 | if (tenths < 9) | 16062 | { |
| 16047 | tenths++; | 16063 | if (tenths < 9) |
| 16048 | else | 16064 | tenths++; |
| 16049 | { | 16065 | else |
| 16050 | quotient++; | 16066 | { |
| 16051 | if (quotient == 10) | 16067 | quotient++; |
| 16052 | tenths = -1; | 16068 | if (quotient == 10) |
| 16053 | else | 16069 | tenths = -1; |
| 16054 | tenths = 0; | 16070 | else |
| 16055 | } | 16071 | tenths = 0; |
| 16072 | } | ||
| 16073 | } | ||
| 16056 | } | 16074 | } |
| 16057 | else | 16075 | else |
| 16058 | if (500 <= remainder) | 16076 | if (500 <= remainder) |
| 16059 | if (quotient < 999) | 16077 | { |
| 16060 | quotient++; | 16078 | if (quotient < 999) |
| 16061 | else | 16079 | quotient++; |
| 16062 | { | 16080 | else |
| 16063 | quotient = 1; | 16081 | { |
| 16064 | exponent++; | 16082 | quotient = 1; |
| 16065 | tenths = 0; | 16083 | exponent++; |
| 16066 | } | 16084 | tenths = 0; |
| 16085 | } | ||
| 16086 | } | ||
| 16067 | } | 16087 | } |
| 16068 | 16088 | ||
| 16069 | /* Calculate the LENGTH of QUOTIENT.TENTHS as a string. */ | 16089 | /* Calculate the LENGTH of QUOTIENT.TENTHS as a string. */ |
| @@ -16765,6 +16785,7 @@ display_string (string, lisp_string, face_string, face_string_pos, | |||
| 16765 | row->height = it->max_ascent + it->max_descent; | 16785 | row->height = it->max_ascent + it->max_descent; |
| 16766 | row->phys_ascent = it->max_phys_ascent; | 16786 | row->phys_ascent = it->max_phys_ascent; |
| 16767 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; | 16787 | row->phys_height = it->max_phys_ascent + it->max_phys_descent; |
| 16788 | row->extra_line_spacing = it->max_extra_line_spacing; | ||
| 16768 | 16789 | ||
| 16769 | /* This condition is for the case that we are called with current_x | 16790 | /* This condition is for the case that we are called with current_x |
| 16770 | past last_visible_x. */ | 16791 | past last_visible_x. */ |
| @@ -16824,6 +16845,8 @@ display_string (string, lisp_string, face_string, face_string_pos, | |||
| 16824 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); | 16845 | row->phys_ascent = max (row->phys_ascent, it->max_phys_ascent); |
| 16825 | row->phys_height = max (row->phys_height, | 16846 | row->phys_height = max (row->phys_height, |
| 16826 | it->max_phys_ascent + it->max_phys_descent); | 16847 | it->max_phys_ascent + it->max_phys_descent); |
| 16848 | row->extra_line_spacing = max (row->extra_line_spacing, | ||
| 16849 | it->max_extra_line_spacing); | ||
| 16827 | x += glyph->pixel_width; | 16850 | x += glyph->pixel_width; |
| 16828 | ++i; | 16851 | ++i; |
| 16829 | } | 16852 | } |
| @@ -18350,7 +18373,7 @@ produce_image_glyph (it) | |||
| 18350 | { | 18373 | { |
| 18351 | struct image *img; | 18374 | struct image *img; |
| 18352 | struct face *face; | 18375 | struct face *face; |
| 18353 | int face_ascent, glyph_ascent; | 18376 | int glyph_ascent; |
| 18354 | struct glyph_slice slice; | 18377 | struct glyph_slice slice; |
| 18355 | 18378 | ||
| 18356 | xassert (it->what == IT_IMAGE); | 18379 | xassert (it->what == IT_IMAGE); |
| @@ -18433,7 +18456,7 @@ produce_image_glyph (it) | |||
| 18433 | 18456 | ||
| 18434 | #if 0 /* this breaks image tiling */ | 18457 | #if 0 /* this breaks image tiling */ |
| 18435 | /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ | 18458 | /* If this glyph is alone on the last line, adjust it.ascent to minimum row ascent. */ |
| 18436 | face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); | 18459 | int face_ascent = face->font ? FONT_BASE (face->font) : FRAME_BASELINE_OFFSET (it->f); |
| 18437 | if (face_ascent > it->ascent) | 18460 | if (face_ascent > it->ascent) |
| 18438 | it->ascent = it->phys_ascent = face_ascent; | 18461 | it->ascent = it->phys_ascent = face_ascent; |
| 18439 | #endif | 18462 | #endif |
| @@ -19446,7 +19469,11 @@ x_produce_glyphs (it) | |||
| 19446 | it->current_x += it->pixel_width; | 19469 | it->current_x += it->pixel_width; |
| 19447 | 19470 | ||
| 19448 | if (extra_line_spacing > 0) | 19471 | if (extra_line_spacing > 0) |
| 19449 | it->descent += extra_line_spacing; | 19472 | { |
| 19473 | it->descent += extra_line_spacing; | ||
| 19474 | if (extra_line_spacing > it->max_extra_line_spacing) | ||
| 19475 | it->max_extra_line_spacing = extra_line_spacing; | ||
| 19476 | } | ||
| 19450 | 19477 | ||
| 19451 | it->max_ascent = max (it->max_ascent, it->ascent); | 19478 | it->max_ascent = max (it->max_ascent, it->ascent); |
| 19452 | it->max_descent = max (it->max_descent, it->descent); | 19479 | it->max_descent = max (it->max_descent, it->descent); |
| @@ -20413,19 +20440,20 @@ fast_find_position (w, charpos, hpos, vpos, x, y, stop) | |||
| 20413 | int past_end = 0; | 20440 | int past_end = 0; |
| 20414 | 20441 | ||
| 20415 | first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 20442 | first = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 20443 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) | ||
| 20444 | { | ||
| 20445 | *x = first->x; | ||
| 20446 | *y = first->y; | ||
| 20447 | *hpos = 0; | ||
| 20448 | *vpos = MATRIX_ROW_VPOS (first, w->current_matrix); | ||
| 20449 | return 1; | ||
| 20450 | } | ||
| 20451 | |||
| 20416 | row = row_containing_pos (w, charpos, first, NULL, 0); | 20452 | row = row_containing_pos (w, charpos, first, NULL, 0); |
| 20417 | if (row == NULL) | 20453 | if (row == NULL) |
| 20418 | { | 20454 | { |
| 20419 | if (charpos < MATRIX_ROW_START_CHARPOS (first)) | 20455 | row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); |
| 20420 | { | 20456 | past_end = 1; |
| 20421 | *x = *y = *hpos = *vpos = 0; | ||
| 20422 | return 1; | ||
| 20423 | } | ||
| 20424 | else | ||
| 20425 | { | ||
| 20426 | row = MATRIX_ROW (w->current_matrix, XFASTINT (w->window_end_vpos)); | ||
| 20427 | past_end = 1; | ||
| 20428 | } | ||
| 20429 | } | 20457 | } |
| 20430 | 20458 | ||
| 20431 | *x = row->x; | 20459 | *x = row->x; |
| @@ -20970,8 +20998,10 @@ note_mouse_highlight (f, x, y) | |||
| 20970 | /* Which window is that in? */ | 20998 | /* Which window is that in? */ |
| 20971 | window = window_from_coordinates (f, x, y, &part, 0, 0, 1); | 20999 | window = window_from_coordinates (f, x, y, &part, 0, 0, 1); |
| 20972 | 21000 | ||
| 20973 | /* If we were displaying active text in another window, clear that. */ | 21001 | /* If we were displaying active text in another window, clear that. |
| 20974 | if (! EQ (window, dpyinfo->mouse_face_window)) | 21002 | Also clear if we move out of text area in same window. */ |
| 21003 | if (! EQ (window, dpyinfo->mouse_face_window) | ||
| 21004 | || (part != ON_TEXT && !NILP (dpyinfo->mouse_face_window))) | ||
| 20975 | clear_mouse_face (dpyinfo); | 21005 | clear_mouse_face (dpyinfo); |
| 20976 | 21006 | ||
| 20977 | /* Not on a window -> return. */ | 21007 | /* Not on a window -> return. */ |
diff --git a/src/xfaces.c b/src/xfaces.c index 5137ab7e721..b8b946bea47 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -3435,8 +3435,8 @@ set_lface_from_font_name (f, lface, fontname, force_p, may_fail_p) | |||
| 3435 | call into lisp. */ | 3435 | call into lisp. */ |
| 3436 | 3436 | ||
| 3437 | Lisp_Object | 3437 | Lisp_Object |
| 3438 | merge_face_heights (from, to, invalid, gcpro) | 3438 | merge_face_heights (from, to, invalid) |
| 3439 | Lisp_Object from, to, invalid, gcpro; | 3439 | Lisp_Object from, to, invalid; |
| 3440 | { | 3440 | { |
| 3441 | Lisp_Object result = invalid; | 3441 | Lisp_Object result = invalid; |
| 3442 | 3442 | ||
| @@ -3461,16 +3461,11 @@ merge_face_heights (from, to, invalid, gcpro) | |||
| 3461 | /* Call function with current height as argument. | 3461 | /* Call function with current height as argument. |
| 3462 | From is the new height. */ | 3462 | From is the new height. */ |
| 3463 | Lisp_Object args[2]; | 3463 | Lisp_Object args[2]; |
| 3464 | struct gcpro gcpro1; | ||
| 3465 | |||
| 3466 | GCPRO1 (gcpro); | ||
| 3467 | 3464 | ||
| 3468 | args[0] = from; | 3465 | args[0] = from; |
| 3469 | args[1] = to; | 3466 | args[1] = to; |
| 3470 | result = safe_call (2, args); | 3467 | result = safe_call (2, args); |
| 3471 | 3468 | ||
| 3472 | UNGCPRO; | ||
| 3473 | |||
| 3474 | /* Ensure that if TO was absolute, so is the result. */ | 3469 | /* Ensure that if TO was absolute, so is the result. */ |
| 3475 | if (INTEGERP (to) && !INTEGERP (result)) | 3470 | if (INTEGERP (to) && !INTEGERP (result)) |
| 3476 | result = invalid; | 3471 | result = invalid; |
| @@ -3523,8 +3518,7 @@ merge_face_vectors (f, from, to, named_merge_points) | |||
| 3523 | if (!UNSPECIFIEDP (from[i])) | 3518 | if (!UNSPECIFIEDP (from[i])) |
| 3524 | { | 3519 | { |
| 3525 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) | 3520 | if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) |
| 3526 | to[i] = merge_face_heights (from[i], to[i], to[i], | 3521 | to[i] = merge_face_heights (from[i], to[i], to[i]); |
| 3527 | named_merge_points); | ||
| 3528 | else | 3522 | else |
| 3529 | to[i] = from[i]; | 3523 | to[i] = from[i]; |
| 3530 | } | 3524 | } |
| @@ -3551,11 +3545,16 @@ merge_named_face (f, face_name, to, named_merge_points) | |||
| 3551 | if (push_named_merge_point (&named_merge_point, | 3545 | if (push_named_merge_point (&named_merge_point, |
| 3552 | face_name, &named_merge_points)) | 3546 | face_name, &named_merge_points)) |
| 3553 | { | 3547 | { |
| 3548 | struct gcpro gcpro1; | ||
| 3554 | Lisp_Object from[LFACE_VECTOR_SIZE]; | 3549 | Lisp_Object from[LFACE_VECTOR_SIZE]; |
| 3555 | int ok = get_lface_attributes (f, face_name, from, 0); | 3550 | int ok = get_lface_attributes (f, face_name, from, 0); |
| 3556 | 3551 | ||
| 3557 | if (ok) | 3552 | if (ok) |
| 3558 | merge_face_vectors (f, from, to, named_merge_points); | 3553 | { |
| 3554 | GCPRO1 (named_merge_point.face_name); | ||
| 3555 | merge_face_vectors (f, from, to, named_merge_points); | ||
| 3556 | UNGCPRO; | ||
| 3557 | } | ||
| 3559 | 3558 | ||
| 3560 | return ok; | 3559 | return ok; |
| 3561 | } | 3560 | } |
| @@ -3646,8 +3645,7 @@ merge_face_ref (f, face_ref, to, err_msgs, named_merge_points) | |||
| 3646 | else if (EQ (keyword, QCheight)) | 3645 | else if (EQ (keyword, QCheight)) |
| 3647 | { | 3646 | { |
| 3648 | Lisp_Object new_height = | 3647 | Lisp_Object new_height = |
| 3649 | merge_face_heights (value, to[LFACE_HEIGHT_INDEX], | 3648 | merge_face_heights (value, to[LFACE_HEIGHT_INDEX], Qnil); |
| 3650 | Qnil, Qnil); | ||
| 3651 | 3649 | ||
| 3652 | if (! NILP (new_height)) | 3650 | if (! NILP (new_height)) |
| 3653 | to[LFACE_HEIGHT_INDEX] = new_height; | 3651 | to[LFACE_HEIGHT_INDEX] = new_height; |
| @@ -4034,7 +4032,7 @@ FRAME 0 means change the face on all frames, and change the default | |||
| 4034 | /* The default face must have an absolute size, | 4032 | /* The default face must have an absolute size, |
| 4035 | otherwise, we do a test merge with a random | 4033 | otherwise, we do a test merge with a random |
| 4036 | height to see if VALUE's ok. */ | 4034 | height to see if VALUE's ok. */ |
| 4037 | : merge_face_heights (value, make_number (10), Qnil, Qnil)); | 4035 | : merge_face_heights (value, make_number (10), Qnil)); |
| 4038 | 4036 | ||
| 4039 | if (!INTEGERP (test) || XINT (test) <= 0) | 4037 | if (!INTEGERP (test) || XINT (test) <= 0) |
| 4040 | signal_error ("Invalid face height", value); | 4038 | signal_error ("Invalid face height", value); |
| @@ -4740,7 +4738,7 @@ the result will be absolute, otherwise it will be relative. */) | |||
| 4740 | if (EQ (value1, Qunspecified)) | 4738 | if (EQ (value1, Qunspecified)) |
| 4741 | return value2; | 4739 | return value2; |
| 4742 | else if (EQ (attribute, QCheight)) | 4740 | else if (EQ (attribute, QCheight)) |
| 4743 | return merge_face_heights (value1, value2, value1, Qnil); | 4741 | return merge_face_heights (value1, value2, value1); |
| 4744 | else | 4742 | else |
| 4745 | return value1; | 4743 | return value1; |
| 4746 | } | 4744 | } |
diff --git a/src/xmenu.c b/src/xmenu.c index a08f4610101..0a83266a482 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -48,6 +48,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 48 | #include "buffer.h" | 48 | #include "buffer.h" |
| 49 | #include "charset.h" | 49 | #include "charset.h" |
| 50 | #include "coding.h" | 50 | #include "coding.h" |
| 51 | #include "sysselect.h" | ||
| 51 | 52 | ||
| 52 | #ifdef MSDOS | 53 | #ifdef MSDOS |
| 53 | #include "msdos.h" | 54 | #include "msdos.h" |
| @@ -157,8 +158,6 @@ static void single_keymap_panes P_ ((Lisp_Object, Lisp_Object, Lisp_Object, | |||
| 157 | static void list_of_panes P_ ((Lisp_Object)); | 158 | static void list_of_panes P_ ((Lisp_Object)); |
| 158 | static void list_of_items P_ ((Lisp_Object)); | 159 | static void list_of_items P_ ((Lisp_Object)); |
| 159 | 160 | ||
| 160 | extern EMACS_TIME timer_check P_ ((int)); | ||
| 161 | |||
| 162 | 161 | ||
| 163 | /* This holds a Lisp vector that holds the results of decoding | 162 | /* This holds a Lisp vector that holds the results of decoding |
| 164 | the keymaps or alist-of-alists that specify a menu. | 163 | the keymaps or alist-of-alists that specify a menu. |
| @@ -525,7 +524,7 @@ single_menu_item (key, item, dummy, skp_v) | |||
| 525 | return; /* Not a menu item. */ | 524 | return; /* Not a menu item. */ |
| 526 | 525 | ||
| 527 | map = XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP]; | 526 | map = XVECTOR (item_properties)->contents[ITEM_PROPERTY_MAP]; |
| 528 | 527 | ||
| 529 | if (skp->notreal) | 528 | if (skp->notreal) |
| 530 | { | 529 | { |
| 531 | /* We don't want to make a menu, just traverse the keymaps to | 530 | /* We don't want to make a menu, just traverse the keymaps to |
| @@ -1099,7 +1098,7 @@ on the left of the dialog box and all following items on the right. | |||
| 1099 | the dialog. Also, the lesstif/motif version crashes if there are | 1098 | the dialog. Also, the lesstif/motif version crashes if there are |
| 1100 | no buttons. */ | 1099 | no buttons. */ |
| 1101 | contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); | 1100 | contents = Fcons (title, Fcons (Fcons (build_string ("Ok"), Qt), Qnil)); |
| 1102 | 1101 | ||
| 1103 | list_of_panes (Fcons (contents, Qnil)); | 1102 | list_of_panes (Fcons (contents, Qnil)); |
| 1104 | 1103 | ||
| 1105 | /* Display them in a dialog box. */ | 1104 | /* Display them in a dialog box. */ |
| @@ -1115,9 +1114,73 @@ on the left of the dialog box and all following items on the right. | |||
| 1115 | } | 1114 | } |
| 1116 | #endif | 1115 | #endif |
| 1117 | } | 1116 | } |
| 1117 | |||
| 1118 | |||
| 1119 | #ifndef MSDOS | ||
| 1120 | |||
| 1121 | /* Wait for an X event to arrive or for a timer to expire. */ | ||
| 1122 | |||
| 1123 | static void | ||
| 1124 | x_menu_wait_for_event (void *data) | ||
| 1125 | { | ||
| 1126 | extern EMACS_TIME timer_check P_ ((int)); | ||
| 1127 | |||
| 1128 | /* Another way to do this is to register a timer callback, that can be | ||
| 1129 | done in GTK and Xt. But we have to do it like this when using only X | ||
| 1130 | anyway, and with callbacks we would have three variants for timer handling | ||
| 1131 | instead of the small ifdefs below. */ | ||
| 1132 | |||
| 1133 | while ( | ||
| 1134 | #ifdef USE_X_TOOLKIT | ||
| 1135 | ! XtAppPending (Xt_app_con) | ||
| 1136 | #elif defined USE_GTK | ||
| 1137 | ! gtk_events_pending () | ||
| 1138 | #else | ||
| 1139 | ! XPending ((Display*) data) | ||
| 1140 | #endif | ||
| 1141 | ) | ||
| 1142 | { | ||
| 1143 | EMACS_TIME next_time = timer_check (1); | ||
| 1144 | long secs = EMACS_SECS (next_time); | ||
| 1145 | long usecs = EMACS_USECS (next_time); | ||
| 1146 | SELECT_TYPE read_fds; | ||
| 1147 | struct x_display_info *dpyinfo; | ||
| 1148 | int n = 0; | ||
| 1149 | |||
| 1150 | FD_ZERO (&read_fds); | ||
| 1151 | for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) | ||
| 1152 | { | ||
| 1153 | int fd = ConnectionNumber (dpyinfo->display); | ||
| 1154 | FD_SET (fd, &read_fds); | ||
| 1155 | if (fd > n) n = fd; | ||
| 1156 | } | ||
| 1157 | |||
| 1158 | if (secs < 0 || (secs == 0 && usecs == 0)) | ||
| 1159 | { | ||
| 1160 | /* Sometimes timer_check returns -1 (no timers) even if there are | ||
| 1161 | timers. So do a timeout anyway. */ | ||
| 1162 | EMACS_SET_SECS (next_time, 1); | ||
| 1163 | EMACS_SET_USECS (next_time, 0); | ||
| 1164 | } | ||
| 1165 | |||
| 1166 | select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, &next_time); | ||
| 1167 | } | ||
| 1168 | } | ||
| 1169 | #endif /* ! MSDOS */ | ||
| 1170 | |||
| 1118 | 1171 | ||
| 1119 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) | 1172 | #if defined (USE_X_TOOLKIT) || defined (USE_GTK) |
| 1120 | 1173 | ||
| 1174 | #ifdef USE_X_TOOLKIT | ||
| 1175 | |||
| 1176 | static Lisp_Object | ||
| 1177 | pop_down_menu (dummy) | ||
| 1178 | int dummy; | ||
| 1179 | { | ||
| 1180 | popup_activated_flag = 0; | ||
| 1181 | return Qnil; | ||
| 1182 | } | ||
| 1183 | |||
| 1121 | /* Loop in Xt until the menu pulldown or dialog popup has been | 1184 | /* Loop in Xt until the menu pulldown or dialog popup has been |
| 1122 | popped down (deactivated). This is used for x-popup-menu | 1185 | popped down (deactivated). This is used for x-popup-menu |
| 1123 | and x-popup-dialog; it is not used for the menu bar. | 1186 | and x-popup-dialog; it is not used for the menu bar. |
| @@ -1127,7 +1190,6 @@ on the left of the dialog box and all following items on the right. | |||
| 1127 | NOTE: All calls to popup_get_selection should be protected | 1190 | NOTE: All calls to popup_get_selection should be protected |
| 1128 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ | 1191 | with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ |
| 1129 | 1192 | ||
| 1130 | #ifdef USE_X_TOOLKIT | ||
| 1131 | static void | 1193 | static void |
| 1132 | popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | 1194 | popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) |
| 1133 | XEvent *initial_event; | 1195 | XEvent *initial_event; |
| @@ -1138,19 +1200,21 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | |||
| 1138 | { | 1200 | { |
| 1139 | XEvent event; | 1201 | XEvent event; |
| 1140 | 1202 | ||
| 1203 | int specpdl_count = SPECPDL_INDEX (); | ||
| 1204 | record_unwind_protect (pop_down_menu, Qnil); | ||
| 1205 | |||
| 1141 | while (popup_activated_flag) | 1206 | while (popup_activated_flag) |
| 1142 | { | 1207 | { |
| 1143 | /* If we have no events to run, consider timers. */ | ||
| 1144 | if (do_timers && !XtAppPending (Xt_app_con)) | ||
| 1145 | timer_check (1); | ||
| 1146 | |||
| 1147 | if (initial_event) | 1208 | if (initial_event) |
| 1148 | { | 1209 | { |
| 1149 | event = *initial_event; | 1210 | event = *initial_event; |
| 1150 | initial_event = 0; | 1211 | initial_event = 0; |
| 1151 | } | 1212 | } |
| 1152 | else | 1213 | else |
| 1153 | XtAppNextEvent (Xt_app_con, &event); | 1214 | { |
| 1215 | if (do_timers) x_menu_wait_for_event (0); | ||
| 1216 | XtAppNextEvent (Xt_app_con, &event); | ||
| 1217 | } | ||
| 1154 | 1218 | ||
| 1155 | /* Make sure we don't consider buttons grabbed after menu goes. | 1219 | /* Make sure we don't consider buttons grabbed after menu goes. |
| 1156 | And make sure to deactivate for any ButtonRelease, | 1220 | And make sure to deactivate for any ButtonRelease, |
| @@ -1188,6 +1252,8 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | |||
| 1188 | 1252 | ||
| 1189 | x_dispatch_event (&event, event.xany.display); | 1253 | x_dispatch_event (&event, event.xany.display); |
| 1190 | } | 1254 | } |
| 1255 | |||
| 1256 | unbind_to (specpdl_count, Qnil); | ||
| 1191 | } | 1257 | } |
| 1192 | 1258 | ||
| 1193 | #endif /* USE_X_TOOLKIT */ | 1259 | #endif /* USE_X_TOOLKIT */ |
| @@ -1195,16 +1261,40 @@ popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress) | |||
| 1195 | #ifdef USE_GTK | 1261 | #ifdef USE_GTK |
| 1196 | /* Loop util popup_activated_flag is set to zero in a callback. | 1262 | /* Loop util popup_activated_flag is set to zero in a callback. |
| 1197 | Used for popup menus and dialogs. */ | 1263 | Used for popup menus and dialogs. */ |
| 1264 | static GtkWidget *current_menu; | ||
| 1265 | |||
| 1266 | static Lisp_Object | ||
| 1267 | pop_down_menu (dummy) | ||
| 1268 | int dummy; | ||
| 1269 | { | ||
| 1270 | if (current_menu) | ||
| 1271 | { | ||
| 1272 | gtk_widget_unmap (current_menu); | ||
| 1273 | current_menu = 0; | ||
| 1274 | popup_activated_flag = 0; | ||
| 1275 | } | ||
| 1276 | return Qnil; | ||
| 1277 | } | ||
| 1278 | |||
| 1198 | static void | 1279 | static void |
| 1199 | popup_widget_loop () | 1280 | popup_widget_loop (do_timers, widget) |
| 1281 | int do_timers; | ||
| 1282 | GtkWidget *widget; | ||
| 1200 | { | 1283 | { |
| 1284 | int specpdl_count = SPECPDL_INDEX (); | ||
| 1285 | current_menu = widget; | ||
| 1286 | record_unwind_protect (pop_down_menu, Qnil); | ||
| 1287 | |||
| 1201 | ++popup_activated_flag; | 1288 | ++popup_activated_flag; |
| 1202 | 1289 | ||
| 1203 | /* Process events in the Gtk event loop until done. */ | 1290 | /* Process events in the Gtk event loop until done. */ |
| 1204 | while (popup_activated_flag) | 1291 | while (popup_activated_flag) |
| 1205 | { | 1292 | { |
| 1293 | if (do_timers) x_menu_wait_for_event (0); | ||
| 1206 | gtk_main_iteration (); | 1294 | gtk_main_iteration (); |
| 1207 | } | 1295 | } |
| 1296 | |||
| 1297 | unbind_to (specpdl_count, Qnil); | ||
| 1208 | } | 1298 | } |
| 1209 | #endif | 1299 | #endif |
| 1210 | 1300 | ||
| @@ -2329,7 +2419,7 @@ menu_position_func (menu, x, y, push_in, user_data) | |||
| 2329 | GtkRequisition req; | 2419 | GtkRequisition req; |
| 2330 | int disp_width = FRAME_X_DISPLAY_INFO (data->f)->width; | 2420 | int disp_width = FRAME_X_DISPLAY_INFO (data->f)->width; |
| 2331 | int disp_height = FRAME_X_DISPLAY_INFO (data->f)->height; | 2421 | int disp_height = FRAME_X_DISPLAY_INFO (data->f)->height; |
| 2332 | 2422 | ||
| 2333 | *x = data->x; | 2423 | *x = data->x; |
| 2334 | *y = data->y; | 2424 | *y = data->y; |
| 2335 | 2425 | ||
| @@ -2402,7 +2492,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) | |||
| 2402 | two. show_help_echo uses this to detect popup menus. */ | 2492 | two. show_help_echo uses this to detect popup menus. */ |
| 2403 | popup_activated_flag = 1; | 2493 | popup_activated_flag = 1; |
| 2404 | /* Process events that apply to the menu. */ | 2494 | /* Process events that apply to the menu. */ |
| 2405 | popup_widget_loop (); | 2495 | popup_widget_loop (1, 0); |
| 2406 | 2496 | ||
| 2407 | gtk_widget_destroy (menu); | 2497 | gtk_widget_destroy (menu); |
| 2408 | 2498 | ||
| @@ -2490,7 +2580,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click) | |||
| 2490 | popup_activated_flag = 1; | 2580 | popup_activated_flag = 1; |
| 2491 | 2581 | ||
| 2492 | /* Process events that apply to the menu. */ | 2582 | /* Process events that apply to the menu. */ |
| 2493 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0); | 2583 | popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1, 0); |
| 2494 | 2584 | ||
| 2495 | /* fp turned off the following statement and wrote a comment | 2585 | /* fp turned off the following statement and wrote a comment |
| 2496 | that it is unnecessary--that the menu has already disappeared. | 2586 | that it is unnecessary--that the menu has already disappeared. |
| @@ -2811,7 +2901,7 @@ create_and_show_dialog (f, first_wv) | |||
| 2811 | gtk_widget_show_all (menu); | 2901 | gtk_widget_show_all (menu); |
| 2812 | 2902 | ||
| 2813 | /* Process events that apply to the menu. */ | 2903 | /* Process events that apply to the menu. */ |
| 2814 | popup_widget_loop (); | 2904 | popup_widget_loop (1, menu); |
| 2815 | 2905 | ||
| 2816 | gtk_widget_destroy (menu); | 2906 | gtk_widget_destroy (menu); |
| 2817 | } | 2907 | } |
| @@ -3323,6 +3413,10 @@ xmenu_show (f, x, y, for_click, keymaps, title, error) | |||
| 3323 | XMenuSetFreeze (menu, TRUE); | 3413 | XMenuSetFreeze (menu, TRUE); |
| 3324 | pane = selidx = 0; | 3414 | pane = selidx = 0; |
| 3325 | 3415 | ||
| 3416 | #ifndef MSDOS | ||
| 3417 | XMenuActivateSetWaitFunction (x_menu_wait_for_event, FRAME_X_DISPLAY (f)); | ||
| 3418 | #endif | ||
| 3419 | |||
| 3326 | /* Help display under X won't work because XMenuActivate contains | 3420 | /* Help display under X won't work because XMenuActivate contains |
| 3327 | a loop that doesn't give Emacs a chance to process it. */ | 3421 | a loop that doesn't give Emacs a chance to process it. */ |
| 3328 | menu_help_frame = f; | 3422 | menu_help_frame = f; |
diff --git a/src/xselect.c b/src/xselect.c index 06f4bfbd2a1..cd059e81979 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -24,6 +24,14 @@ Boston, MA 02111-1307, USA. */ | |||
| 24 | 24 | ||
| 25 | #include <config.h> | 25 | #include <config.h> |
| 26 | #include <stdio.h> /* termhooks.h needs this */ | 26 | #include <stdio.h> /* termhooks.h needs this */ |
| 27 | |||
| 28 | #ifdef HAVE_SYS_TYPES_H | ||
| 29 | #include <sys/types.h> | ||
| 30 | #endif | ||
| 31 | #ifdef HAVE_UNISTD_H | ||
| 32 | #include <unistd.h> | ||
| 33 | #endif | ||
| 34 | |||
| 27 | #include "lisp.h" | 35 | #include "lisp.h" |
| 28 | #include "xterm.h" /* for all of the X includes */ | 36 | #include "xterm.h" /* for all of the X includes */ |
| 29 | #include "dispextern.h" /* frame.h seems to want this */ | 37 | #include "dispextern.h" /* frame.h seems to want this */ |
| @@ -174,7 +182,8 @@ static Lisp_Object x_get_window_property_as_lisp_data (); | |||
| 174 | 182 | ||
| 175 | 183 | ||
| 176 | 184 | ||
| 177 | /* Define a queue to save up SelectionRequest events for later handling. */ | 185 | /* Define a queue to save up SELECTION_REQUEST_EVENT events for later |
| 186 | handling. */ | ||
| 178 | 187 | ||
| 179 | struct selection_event_queue | 188 | struct selection_event_queue |
| 180 | { | 189 | { |
| @@ -184,11 +193,11 @@ struct selection_event_queue | |||
| 184 | 193 | ||
| 185 | static struct selection_event_queue *selection_queue; | 194 | static struct selection_event_queue *selection_queue; |
| 186 | 195 | ||
| 187 | /* Nonzero means queue up certain events--don't process them yet. */ | 196 | /* Nonzero means queue up SELECTION_REQUEST_EVENT events. */ |
| 188 | 197 | ||
| 189 | static int x_queue_selection_requests; | 198 | static int x_queue_selection_requests; |
| 190 | 199 | ||
| 191 | /* Queue up an X event *EVENT, to be processed later. */ | 200 | /* Queue up an SELECTION_REQUEST_EVENT *EVENT, to be processed later. */ |
| 192 | 201 | ||
| 193 | static void | 202 | static void |
| 194 | x_queue_event (event) | 203 | x_queue_event (event) |
| @@ -196,12 +205,14 @@ x_queue_event (event) | |||
| 196 | { | 205 | { |
| 197 | struct selection_event_queue *queue_tmp; | 206 | struct selection_event_queue *queue_tmp; |
| 198 | 207 | ||
| 199 | /* Don't queue repeated requests */ | 208 | /* Don't queue repeated requests. |
| 209 | This only happens for large requests which uses the incremental protocol. */ | ||
| 200 | for (queue_tmp = selection_queue; queue_tmp; queue_tmp = queue_tmp->next) | 210 | for (queue_tmp = selection_queue; queue_tmp; queue_tmp = queue_tmp->next) |
| 201 | { | 211 | { |
| 202 | if (!bcmp (&queue_tmp->event, event, sizeof (*event))) | 212 | if (!bcmp (&queue_tmp->event, event, sizeof (*event))) |
| 203 | { | 213 | { |
| 204 | TRACE1 ("IGNORE DUP SELECTION EVENT %08x", (unsigned long)queue_tmp); | 214 | TRACE1 ("DECLINE DUP SELECTION EVENT %08lx", (unsigned long)queue_tmp); |
| 215 | x_decline_selection_request (event); | ||
| 205 | return; | 216 | return; |
| 206 | } | 217 | } |
| 207 | } | 218 | } |
| @@ -211,14 +222,14 @@ x_queue_event (event) | |||
| 211 | 222 | ||
| 212 | if (queue_tmp != NULL) | 223 | if (queue_tmp != NULL) |
| 213 | { | 224 | { |
| 214 | TRACE1 ("QUEUE SELECTION EVENT %08x", (unsigned long)queue_tmp); | 225 | TRACE1 ("QUEUE SELECTION EVENT %08lx", (unsigned long)queue_tmp); |
| 215 | queue_tmp->event = *event; | 226 | queue_tmp->event = *event; |
| 216 | queue_tmp->next = selection_queue; | 227 | queue_tmp->next = selection_queue; |
| 217 | selection_queue = queue_tmp; | 228 | selection_queue = queue_tmp; |
| 218 | } | 229 | } |
| 219 | } | 230 | } |
| 220 | 231 | ||
| 221 | /* Start queuing SelectionRequest events. */ | 232 | /* Start queuing SELECTION_REQUEST_EVENT events. */ |
| 222 | 233 | ||
| 223 | static void | 234 | static void |
| 224 | x_start_queuing_selection_requests () | 235 | x_start_queuing_selection_requests () |
| @@ -230,7 +241,7 @@ x_start_queuing_selection_requests () | |||
| 230 | TRACE1 ("x_start_queuing_selection_requests %d", x_queue_selection_requests); | 241 | TRACE1 ("x_start_queuing_selection_requests %d", x_queue_selection_requests); |
| 231 | } | 242 | } |
| 232 | 243 | ||
| 233 | /* Stop queuing SelectionRequest events. */ | 244 | /* Stop queuing SELECTION_REQUEST_EVENT events. */ |
| 234 | 245 | ||
| 235 | static void | 246 | static void |
| 236 | x_stop_queuing_selection_requests () | 247 | x_stop_queuing_selection_requests () |
| @@ -244,7 +255,7 @@ x_stop_queuing_selection_requests () | |||
| 244 | while (selection_queue != NULL) | 255 | while (selection_queue != NULL) |
| 245 | { | 256 | { |
| 246 | struct selection_event_queue *queue_tmp = selection_queue; | 257 | struct selection_event_queue *queue_tmp = selection_queue; |
| 247 | TRACE1 ("RESTORE SELECTION EVENT %08x", (unsigned long)queue_tmp); | 258 | TRACE1 ("RESTORE SELECTION EVENT %08lx", (unsigned long)queue_tmp); |
| 248 | kbd_buffer_unget_event (&queue_tmp->event); | 259 | kbd_buffer_unget_event (&queue_tmp->event); |
| 249 | selection_queue = queue_tmp->next; | 260 | selection_queue = queue_tmp->next; |
| 250 | xfree ((char *)queue_tmp); | 261 | xfree ((char *)queue_tmp); |
| @@ -877,7 +888,9 @@ x_handle_selection_request (event) | |||
| 877 | struct x_display_info *dpyinfo | 888 | struct x_display_info *dpyinfo |
| 878 | = x_display_info_for_display (SELECTION_EVENT_DISPLAY (event)); | 889 | = x_display_info_for_display (SELECTION_EVENT_DISPLAY (event)); |
| 879 | 890 | ||
| 880 | TRACE0 ("x_handle_selection_request"); | 891 | TRACE2 ("x_handle_selection_request, from=0x%08lx time=%lu", |
| 892 | (unsigned long) SELECTION_EVENT_REQUESTOR (event), | ||
| 893 | (unsigned long) SELECTION_EVENT_TIME (event)); | ||
| 881 | 894 | ||
| 882 | local_selection_data = Qnil; | 895 | local_selection_data = Qnil; |
| 883 | target_symbol = Qnil; | 896 | target_symbol = Qnil; |