* configure.ac (HAVE_GOBJECT): Check for gobject-2.0.
[bpt/emacs.git] / src / ChangeLog
CommitLineData
8b339673
JD
12012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2
3 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
4
5 * frame.h: Add missing prototype for x_wm_set_size_hint.
6
a08d4ba7
PE
72012-09-02 Paul Eggert <eggert@cs.ucla.edu>
8
9 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
10 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
11 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
12 (Fsubstitute_command_keys):
13 * editfns.c (region_limit, find_field, Fconstrain_to_field)
14 (save_excursion_save, save_excursion_restore)
15 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
16 (format_time_string, general_insert_function)
17 (make_buffer_string, make_buffer_string_both)
18 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
19 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
20 (copy_text, insert_1, insert_1_both, insert_from_string)
21 (insert_from_string_before_markers, insert_from_string_1)
22 (insert_from_buffer, insert_from_buffer_1, replace_range)
23 (replace_range_2, del_range_1, del_range_byte, del_range_both)
24 (del_range_2, modify_region):
25 * intervals.c (intervals_equal, balance_possible_root_interval)
26 (adjust_intervals_for_insertion, merge_properties_sticky)
27 (graft_intervals_into_buffer, lookup_char_property)
28 (adjust_for_invis_intang, set_point_both)
29 (get_property_and_range, compare_string_intervals)
30 (set_intervals_multibyte_1, set_intervals_multibyte):
31 * keyboard.c (decode_timer):
32 Use bool for boolean.
33 * intervals.h, lisp.h, systime.h: Reflect above API changes.
34 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
35
48c948de
CY
362012-09-02 Chong Yidong <cyd@gnu.org>
37
38 * keymap.c (push_key_description): Print M-TAB as C-M-i
39 (Bug#11758).
40
6c49a40b
JB
412012-09-02 Juanma Barranquero <lekktu@gmail.com>
42
43 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
44 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
45 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
46 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
47 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
48 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
49 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
50
4dfbd238
EZ
512012-09-01 Eli Zaretskii <eliz@gnu.org>
52
7e510e28
EZ
53 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
54 more than one grapheme cluster passed to the shaper: compute the
55 offset adjustment values separately for each cluster. (Bug#11860)
56
4dfbd238
EZ
57 * image.c: Restore mistakenly removed inclusion of w32.h. Without
58 it, GCC doesn't see prototypes of w32_delayed_load, and complains
59 about implicit conversions from integer to pointer.
60
86571ae0
DC
612012-09-01 Daniel Colascione <dancol@dancol.org>
62
63 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
64 system used too early.
65
0e23ef9d
PE
662012-09-01 Paul Eggert <eggert@cs.ucla.edu>
67
68 Better seed support for (random).
69 * emacs.c (main): Call init_random.
70 * fns.c (Frandom): Set the seed from a string argument, if given.
71 Remove long-obsolete Gentzel cruft.
72 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
73 (init_random): New function.
74
17a2cbbd
DC
752012-09-01 Daniel Colascione <dancol@dancol.org>
76
77 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
78 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
79 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
80 x_wm_set_size_hint, x_query_colors, x_real_positions,
81 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
82 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
83 all of which have been moved to common code.
84
85 * xfaces.c: Include TERM_HEADER instead of listing all possible
86 window-system headers.
87
88 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
89 to match header.
90
91 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
92 directly accessing frame internals.
93
f18cbb28 94 * w32font.h: Include font.h. Define syms_of_w32font and
17a2cbbd
DC
95 globals_of_w32font.
96
97 * process.c: Include TERM_HEADER instead of listing all possible
98 window-system headers.
99
100 * nsterm.h: Remove declarations now in frame.h. Define
101 FRAME_X_SCREEN, FRAME_X_VISUAL.
102
103 * menu.c: Include TERM_HEADER instead of listing all possible
104 window-system headers.
105
106 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
107 window system.
108
109 * keyboard.c: Include TERM_HEADER instead of listing all possible
110 window-system headers.
111
112 * image.c: Include TERM_HEADER instead of listing all possible
113 window-system headers. Declare Vlibrary_cache when compiling for
114 Windows.
115
116 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
117 window system declarations.
118
119 * frame.h: Move common functions here: set_frame_menubar,
120 x_set_window_size, x_sync, x_get_focus_frame,
121 x_set_mouse_position, x_set_mouse_pixel_position,
122 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
123 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
124 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
125 x_activate_menubar, x_real_positions, x_bitmap_icon,
126 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
127 and x_query_colors.
128
129 * frame.c: Include TERM_HEADER instead of listing all possible
130 window-system headers.
131
132 * font.c: Include TERM_HEADER instead of listing all possible
133 window-system headers.
134
135 * emacs.c: Include TERM_HEADER.
136
f18cbb28
EZ
137 * dispnew.c: Include TERM_HEADER instead of listing all possible
138 window-system headers.
17a2cbbd 139
f18cbb28 140 * ccl.h: Include character.h.
17a2cbbd
DC
141
142 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
143 the current window system; include in list of objects to link into
144 Emacs.
145
c650a5de
DA
1462012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
147
148 Remove mark_ttys function and fix tty_display_info initialization.
149 * lisp.h (mark_ttys): Remove prototype.
150 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
151 to mark_ttys because all possible values of 'top_frame' slot are
152 the frames which are reachable from Vframe_list.
153 * term.c (mark_ttys): Remove.
154 (init_tty): Safely initialize 'top_frame' slot with Qnil.
155
4e0f6479
DA
1562012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
157
158 Change struct frame bitfields from unsigned char to unsigned.
159 * frame.h (struct frame): Change type of 'display_preempted',
160 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
161 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
162 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
163 bitfields from unsigned char to unsigned.
164
8b96a52c
DA
1652012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
166
167 Remove unused member of struct x_output and struct w32_output.
168 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
169 * w32term.h (struct w32_output): Likewise.
170
b4444c8a
JD
1712012-08-30 Jan Djärv <jan.h.d@swipnet.se>
172
173 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
174 does not become zero (Bug#12234).
175
b98521db
PE
1762012-08-30 Paul Eggert <eggert@cs.ucla.edu>
177
178 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
179 for GCC 4.7.1 x86-64.
180
31d02438
GM
1812012-08-30 Glenn Morris <rgm@gnu.org>
182
183 * lread.c (init_lread): For out-of-tree builds, only add the
184 source directory's site-lisp dir to the load-path if it exists,
185 consistent with in-tree builds. (Bug#12302)
186
7f8941d8
JD
1872012-08-28 Jan Djärv <jan.h.d@swipnet.se>
188
189 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
190 button_values to NULL. Call setStykeMask so dialogs get a close button.
191 (windowShouldClose:): Set window_closed.
192 (dealloc): New member, free button_values.
193 (process_dialog:): Make member function. Remove window argument,
194 replace window with self. Count buttons and allocate and store values
195 in button_values.
196 (addButton:value:row:): value is int with the name tag. Call setTag
197 with tag. Remove return self, declare return value as void.
198 (addString:row:): Remove return self, declare return value as void.
199 (addSplit): Remove return self, declare return value as void.
200 (clicked:): Remove return self, declare return value as void.
201 Set dialog_return to button_values[seltag]. Code formatting change.
202 (initFromContents:isQuestion:): Adjust call to process_dialog.
203 Code formatting change.
204 (timeout_handler:): Set timer_fired to YES.
205 (runDialogAt:): Set timer_fired to NO.
206 Handle click on close button as quit.
207
208 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
209 Add window_closed and button_values. Add void as return value for
210 add(Button|String|Split). addButton takes int instead of Lisp_Object.
211 Add process_dialog as new member.
212
eada0861 2132012-08-28 Eli Zaretskii <eliz@gnu.org>
19c17fc1 214
eada0861
GM
215 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
216 is not one of the heaps we manage. (Bug#12242)
217
2182012-08-28 Glenn Morris <rgm@gnu.org>
219
220 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
221
457294dd
MR
2222012-08-28 Martin Rudalics <rudalics@gmx.at>
223
224 * window.c (Fset_window_configuration): Remove handling of
37b9743e
MR
225 auto-buffer-name window parameter. Install revision of reverted
226 fix.
457294dd 227
4f2daf31
DA
2282012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
229
230 Do not allow to set major mode for a dead buffer.
231 * buffer.c (Fset_buffer_major_mode): Signal an error
232 if the buffer is dead.
233 (Fother_buffer, other_buffer_safely): Remove redundant
234 nested declaration.
235
66322887
DA
2362012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
237
238 Always use set_buffer_if_live to restore original buffer at unwind.
239 * buffer.h (record_unwind_current_buffer): New function.
240 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
241 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
242 * undo.c, window.c: Adjust users.
243 * buffer.c (set_buffer_if_live): Fix comment.
244
a3d794a1
DA
2452012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
246
247 Fix usage of set_buffer_internal.
248 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
249 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
250 * coding.c (decode_coding): Omit redundant test.
251 * fileio.c (decide_coding_unwind): Likewise.
252 * fns.c (secure_hash): Likewise.
253 * insdel.c (modify_region): Likewise.
254 * keyboard.c (command_loop_1): Likewise.
255 * print.c (PRINTFINISH): Likewise.
256 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
257
59ea14cd
PE
2582012-08-27 Paul Eggert <eggert@cs.ucla.edu>
259
260 * dispnew.c: Use bool for boolean.
261 (frame_garbaged, display_completed, delayed_size_change)
262 (fonts_changed_p, add_window_display_history)
263 (add_frame_display_history, verify_row_hash)
264 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
265 (row_equal_p, realloc_glyph_pool)
266 (allocate_matrices_for_frame_redisplay)
267 (showing_window_margins_p)
268 (adjust_frame_glyphs_for_frame_redisplay)
269 (build_frame_matrix_from_leaf_window, make_current)
270 (mirrored_line_dance, mirror_line_dance, update_frame)
271 (update_window_tree, update_single_window)
272 (check_current_matrix_flags, update_window, update_text_area)
273 (update_window_line, set_window_update_flags, scrolling_window)
274 (update_frame_1, scrolling, buffer_posn_from_coords)
275 (do_pending_window_change, change_frame_size)
276 (change_frame_size_1, sit_for):
277 Use bool for boolean.
278 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
279 and remove last int (actually boolean) argument, which was always 0.
280 All callers changed.
281 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
282 * dispextern.h (struct composition_it): Use bool for boolean.
283 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
284 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
285 * dired.c (file_name_completion):
286 Use bool for boolean. (This was missed in an earlier change.)
287
95072a94
MR
2882012-08-27 Martin Rudalics <rudalics@gmx.at>
289
290 * window.c (Fset_window_configuration): Revert first part of
291 last change.
292
0f19feff
JD
2932012-08-27 Jan Djärv <jan.h.d@swipnet.se>
294
295 * nsterm.h (NSPanel): New class variable dialog_return.
296
297 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
298 dialog_return.
299 (windowShouldClose:): Use stop instead of stopModalWithCode.
300 (clicked:): Ditto, and also set dialog_return (Bug#12258).
301 (timeout_handler:): Use stop instead of abortModal. Send a dummy
302 event.
303 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
304 modal loop returns.
305
f10fe38f
PE
3062012-08-27 Paul Eggert <eggert@cs.ucla.edu>
307
de1339b0
PE
308 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
309 * composite.c (find_composition, composition_gstring_p)
310 (composition_reseat_it, find_automatic_composition):
311 * data.c (let_shadows_buffer_binding_p)
312 (let_shadows_global_binding_p, set_internal, make_blv)
313 (Fmake_variable_buffer_local, Fmake_local_variable)
314 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
315 (cons_to_signed, arith_driver):
316 * dbusbind.c (xd_in_read_queued_messages):
317 * dired.c (directory_files_internal, file_name_completion):
318 Use bool for booleans.
319 * dired.c (file_name_completion):
320 * process.h (fd_callback):
321 Omit int (actually boolean) argument. It wasn't being used.
322 All uses changed.
323 * composite.h, lisp.h: Reflect above API changes.
324
f10fe38f
PE
325 * cmds.c, coding.c: Use bool for booleans.
326 * cmds.c (move_point, Fself_insert_command):
327 * coding.h (struct composition status, struct coding_system):
328 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
329 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
330 (emacs_mule_char, decode_coding_emacs_mule)
331 (encode_coding_emacs_mule, detect_coding_iso_2022)
332 (decode_coding_iso_2022, encode_invocation_designation)
333 (encode_designation_at_bol, encode_coding_iso_2022)
334 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
335 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
336 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
337 (encode_coding_raw_text, detect_coding_charset)
338 (decode_coding_charset, encode_coding_charset, detect_eol)
339 (detect_coding, get_translation_table, produce_chars)
340 (consume_chars, reused_workbuf_in_use)
341 (make_conversion_work_buffer, code_conversion_save)
342 (decode_coding_object, encode_coding_object)
343 (detect_coding_system, char_encodable_p)
344 (Funencodable_char_position, code_convert_region)
345 (code_convert_string, code_convert_string_norecord)
346 (Fset_coding_system_priority):
347 * fileio.c (Finsert_file_contents):
348 Use bool for booleans.
349 * coding.h, lisp.h: Reflect above API changes.
350 * coding.c: Remove unnecessary static function decls.
351 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
352 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
353 not a boolean 'int', since callers never look at the return value.
354 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
355 * coding.h (decoding_buffer_size, encoding_buffer_size)
356 (emacs_mule_string_char): Remove unused extern decls.
357 (struct iso_2022_spec, struct coding_system):
358 Use 'unsigned int : 1' for boolean fields, since there's more than one.
359 (struct emacs_mule_spec): Remove unused field 'full_support'.
360 All initializations removed.
361 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
362
5474c384
DA
3632012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
364
f10fe38f 365 Fix spare memory change (Bug#12286).
5474c384
DA
366 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
367 (valid_lisp_object_p): Likewise.
368
c4b6914d
MR
3692012-08-27 Martin Rudalics <rudalics@gmx.at>
370
371 * window.c (Fset_window_configuration): Record any window's old
372 buffer if it's replaced (see Bug#8789). If the new current
373 buffer doesn't appear in the selected window, go to its old
374 point (Bug#12208).
375
35aaa1ea
DA
3762012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
377
378 Special MEM_TYPE_SPARE to denote reserved memory.
379 * alloc.c (enum mem_type): New memory type.
380 (refill_memory_reserve): Use new type for spare memory.
381 This prevents live_cons_p and live_string_p from incorrect
382 detection of uninitialized objects from spare memory as live.
383
6af64513
PE
3842012-08-26 Paul Eggert <eggert@cs.ucla.edu>
385
8b2e00a3
PE
386 Spelling fixes.
387 * Makefile.in (.PHONY): versioclean -> versionclean.
388
b52d6985
PE
389 Remove unused external symbols.
390 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
391 * window.c (Qwindow_valid_p, decode_valid_window):
392 Now static, not extern.
393 * data.c (Qinterval): Remove; unused.
394 (syms_of_data): Do not define 'interval'.
395 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
396 * window.h (decode_valid_window):
397 Remove decls.
398
d5172d4f
PE
399 * character.c, charset.c, chartab.c: Use bool for booleans.
400 * character.c (lisp_string_width, string_count_byte8)
401 (string_escape_byte8):
402 * charset.c (charset_map_loaded, load_charset_map, read_hex):
403 (load_charset_map_from_file, map_charset_chars)
404 (Fdefine_charset_internal, define_charset_internal)
405 (Fdeclare_equiv_charset, find_charsets_in_text)
406 (Ffind_charset_region, char_charset, Fiso_charset):
407 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
408 (sub_char_table_set, sub_char_table_set_range)
409 (char_table_set_range, optimize_sub_char_table)
410 (map_sub_char_table):
411 Use bool for boolean.
412 * character.c (str_to_unibyte): Omit last boolean argument; it was
413 always 0. All callers changed.
414 * character.h, charset.h: Adjust to match previous changes.
415 * character.h (char_printable_p): Remove decl of nonexistent function.
416 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
417 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
418 are all boolean, so make them single-bit bitfields.
419
6af64513
PE
420 * lisp.h (ASET): Remove attempt to detect side effects.
421 It was meant to be temporary and it often doesn't work,
422 because when IDX has side effects the behavior of IDX==IDX
423 is undefined. See Stefan Monnier in
424 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
425
e1f29348
BR
4262012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
427
428 * lisp.h (functionp): New function (extracted from Ffunctionp).
429 (FUNCTIONP): Use it.
430 * eval.c (Ffunctionp): Use it.
431
17c05d74
PE
4322012-08-25 Paul Eggert <eggert@cs.ucla.edu>
433
0f46bc75
PE
434 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
435 as that's faster and simpler than static storage. Don't bother
436 with the g_main_context_query overhead if g_main_context_pending
437 says no events are pending.
438 (gfds, gfds_size): Remove these static vars.
439 (xgselect_initialize): Remove; no longer needed.
440 All uses and decls removed.
441
ee4c0f69
PE
442 * emacs.c (fatal_error_signal_hook): Remove.
443 All uses removed. This leftover from old code was always 0.
444
17c05d74
PE
445 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
446 * casefiddle.c (casify_object, casify_region):
447 * casetab.c (set_case_table):
448 * category.c, category.h (word_boundary_p):
449 * category.h (CHAR_HAS_CATEGORY):
450 Use bool for booleans, instead of int.
451
391ceac5
EZ
4522012-08-25 Eli Zaretskii <eliz@gnu.org>
453
454 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
455
2f221583
PE
4562012-08-25 Paul Eggert <eggert@cs.ucla.edu>
457
f4a681b0
PE
458 On assertion failure, print backtrace if available.
459 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
460 (die) [ENABLE_CHECKING]: Print a backtrace if available.
461 * Makefile.in (LIB_EXECINFO): New macro.
462 (LIBES): Use it.
463
2f221583
PE
464 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
465 * bytecode.c (exec_byte_code):
466 * callint.c (check_mark, Fcall_interactively):
467 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
468 (getenv_internal, sync_process_alive, call_process_exited):
469 * lisp.h (USE_SAFE_ALLOCA):
470 Use bool for booleans, instead of int.
471 * lisp.h, process.h: Adjust prototypes to match above changes.
472 * callint.c (Fcall_interactively): Don't assume the mark's
473 offset fits in 'int'.
474
37ef52bb
PE
4752012-08-24 Paul Eggert <eggert@cs.ucla.edu>
476
477 * buffer.c, buffer.h: Use bool for boolean.
478 * buffer.c (reset_buffer_local_variables)
479 (buffer_lisp_local_variables, Fset_buffer_modified_p)
480 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
481 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
482 (overlay_touches_p, overlay_strings, Foverlay_put)
483 (report_overlay_modification, call_overlay_mod_hooks):
484 (mmap_enlarge, mmap_set_vars):
485 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
486 Use bool for booleans, instead of int.
487 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
488 since the 1-or-0 return value is always ignored anyway.
489 (mmap_initialized_p):
490 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
491 * buffer.h, lisp.h: Adjust prototypes to match above changes.
492
2cc21167
PE
4932012-08-23 Paul Eggert <eggert@cs.ucla.edu>
494
495 * bidi.c: Use bool for boolean.
496 This is a bit more readable, and makes the text segment of bidi.o
497 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
498 Presumably it's faster too.
499 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
500 Now bool.
501 (bidi_cache_find_level_change, bidi_cache_iterator_state)
502 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
503 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
504 (bidi_explicit_dir_char, bidi_level_of_next_char)
505 (bidi_find_other_level_edge, bidi_move_to_visually_next):
506 Use bool for booleans, instead of int.
507 * dispextern.h (bidi_init_it, bidi_paragraph_init)
508 (bidi_unshelve_cache): Adjust decls to match code.
509
7db4ddf4
MR
5102012-08-23 Martin Rudalics <rudalics@gmx.at>
511
512 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
513 argument.
514
b1bb8011
PE
5152012-08-23 Paul Eggert <eggert@cs.ucla.edu>
516
517 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
518 * atimer.h: Include <stdbool.h>.
519
ff687885
DN
5202012-08-22 Dan Nicolaescu <dann@gnu.org>
521
522 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
523 compile time tests instead of run time tests on systems that do
524 not use them.
525 (FRAME_MAC_P): Remove leftover from deleted code.
526 * frame.c (syms_of_frame): Remove leftover from deleted code.
527
4ce7a138
JD
5282012-08-22 Jan Djärv <jan.h.d@swipnet.se>
529
530 * nsterm.m (insertText:): Don't clear modifiers if code is space.
531
d733ec6d
PE
5322012-08-22 Paul Eggert <eggert@cs.ucla.edu>
533
534 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
535 Otherwise, the compiler complains about (A?B:C) where B is void
536 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
537 (fontset_add): Return void, for FONTSET_ADD.
538
d0d2d26f
PE
5392012-08-21 Paul Eggert <eggert@cs.ucla.edu>
540
fce31d69
PE
541 * alloc.c: Use bool for booleans.
542 (gc_in_progress, abort_on_gc)
543 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
544 (dont_register_blocks) [GC_MALLOC_CHECK]:
545 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
546 (check_string_bytes, make_specified_string, memory_full)
547 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
548 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
549 (mark_stack, valid_pointer_p, make_pure_string)
550 (Fgarbage_collect, survives_gc_p, gc_sweep):
551 Use bool for booleans, instead of int.
552 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
553 Remove unused local.
554 * alloc.c (PURE_POINTER_P):
555 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
556 * editfns.c (Fformat):
557 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
558 (Fdo_auto_save):
559 * fns.c (sweep_weak_table):
560 * lisp.h (suppress_checking, push_message, survives_gc_p)
561 (make_pure_string, gc_in_progress, abort_on_gc):
562 * lread.c (readchar, read1):
563 * print.c (Fprin1_to_string):
564 * xdisp.c (push_message):
565 Use bool for booleans affected directly or indirectly by
566 alloc.c's changes.
567
d0d2d26f
PE
568 Make recently-introduced setters macros.
569 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
570 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
571 (set_fontset_default, set_fontset_fallback): Rename from their
572 upper-case counterparts, and make them functions rather than macros.
573 This is more consistent with the other recently-introduced setters.
574 These don't need to be inline, since they're local.
575
d18e2bb6
JD
5762012-08-21 Jan Djärv <jan.h.d@swipnet.se>
577
578 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
579 the loop (Bug#12247).
580
1b9d9d16
PE
5812012-08-21 Paul Eggert <eggert@cs.ucla.edu>
582
583 * lisp.h (vcopy): Use memcpy rather than our own loop.
584 This fixes a performance regression introduced by the recent
585 addition of vcopy. This means 'vcopy' will need to be modified
586 for a copying collector, but that's OK. Also, tighten the
587 checking in the assertion.
588
b2f09701
EZ
5892012-08-21 Eli Zaretskii <eliz@gnu.org>
590
591 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
592 components for RTL text (Bug#11860). Adjust X-OFFSET of each
593 non-base glyph for the width of the base character, according to
e1f29348
BR
594 what x_draw_composite_glyph_string_foreground expects.
595 Generate WADJUST value according to composition_gstring_width's
b2f09701
EZ
596 expectations, to produce correct width of the composed character.
597 Reverse the sign of the DU offset produced by ScriptPlace.
598
9b994fed
PE
5992012-08-21 Paul Eggert <eggert@cs.ucla.edu>
600
601 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
602
086ca913
DA
6032012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
604
605 Avoid direct writes to contents member of struct Lisp_Vector.
606 * lisp.h (vcopy): New function to copy data into vector.
607 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
608 * fns.c (Ffillarray): Use ASET.
609 * keyboard.c (timer_check_2): Use AREF and ASET.
610 (append_tool_bar_item, Frecent_keys): Use vcopy.
611 * lread.c (read_vector): Use ASET.
612 * msdos.c (Frecent_doskeys): Use vcopy.
613 * xface.c (Finternal_copy_lisp_face): Use vcopy.
614 (Finternal_merge_in_global_face): Use ASET and vcopy.
615 * xfont.c (xfont_list_pattern): Likewise.
616
5481664a
MR
6172012-08-21 Martin Rudalics <rudalics@gmx.at>
618
619 * window.c (Fwindow_point): For the selected window always return
620 the position of its buffer's point.
621 (Fset_window_point): For the selected window always go in its
622 buffer to the specified position.
623
6d470bdd
DA
6242012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
625
626 Setter macros for fontsets.
627 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
628 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
629 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
630 Adjust users.
631
24564fe1
GM
6322012-08-20 Glenn Morris <rgm@gnu.org>
633
634 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
635 Don't assume that `ln -f' works.
636
0a05a035
EZ
6372012-08-20 Eli Zaretskii <eliz@gnu.org>
638
639 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
640 and later about non-assignments with no effect. See discussion at
641 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
642 details.
643
e46f2325
DA
6442012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
645
646 Inline setter functions for Lisp_Objects slots of struct specbinding.
647 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
648 Adjust users.
649
734fbd86
MR
6502012-08-20 Martin Rudalics <rudalics@gmx.at>
651
652 * window.c (select_window): Always make selected window's buffer
653 current.
654
f1a95992
DA
6552012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
656
657 Use AREF and ASET for docstrings of category tables.
658 * category.h (CATEGORY_DOCSTRING): Use AREF.
659 (SET_CATEGORY_DOCSTRING): Use ASET.
660 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
661
e83064be
DA
6622012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
663
664 Inline setter functions for hash table members.
665 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
666 (set_hash_hash, set_hash_index): Rename with _slot suffix.
667 (set_hash_key_and_value, set_hash_index, set_hash_next)
668 (set_hash_hash): New functions.
669 * charset.c, fns.c: Adjust users.
670
4ce60d2e
DA
6712012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
672
673 Inline getter and setter functions for per-buffer values.
674 * buffer.h (per_buffer_default, set_per_buffer_default)
675 (per_buffer_value, set_per_buffer_value): New functions.
676 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
677 * buffer.c, data.c: Adjust users.
678
c06c9690
JB
6792012-08-20 Juanma Barranquero <lekktu@gmail.com>
680
681 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
682
32bd4250
PE
6832012-08-19 Paul Eggert <eggert@cs.ucla.edu>
684
bad03192 685 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
686 as gnulib does this if the system doesn't.
687 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
688 Remove declaration. MS-Windows declares it on stdlib.h which is
689 included by conf_post.h.
b69a6d22
PE
690 * emacs.c (environ) [DOUG_LEA_MALLOC]:
691 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
692 * vm-limit.c: Include <unistd.h>, for 'environ'.
693
22d7feb2
PE
694 * unexaix.c, unexcoff.c: Include "mem-limits.h".
695 (start_of_data): Remove decl; mem-limits.h provides it.
696
32bd4250
PE
697 * xdisp.c (handle_invisible_prop): Make it a bit faster
698 and avoid a gcc -Wmaybe-uninitialized diagnostic.
699
450809af
CY
7002012-08-19 Chong Yidong <cyd@gnu.org>
701
702 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
703 ends (Bug#3874).
704
9e677988
AS
7052012-08-19 Andreas Schwab <schwab@linux-m68k.org>
706
6b1319ce
AS
707 * .gdbinit: Use call instead of set when calling a function in the
708 inferior.
709
9e677988
AS
710 * data.c (set_internal): Don't use set_blv_found.
711 (Fkill_local_variable): Likewise.
712
d7191076
AA
7132012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
714
715 * nsfont.m (ns_ascii_average_width): Ensure the string
716 ascii_printable is initialized with a null-terminated character
717 array. Otherwise, it can contain undesired extra characters.
718
e757f1c6
PE
7192012-08-18 Paul Eggert <eggert@cs.ucla.edu>
720
721 port new setting code to Sun C 5.8 2005/10/13
722 * chartab.c, lisp.h (char_table_set, char_table_set_range):
723 Return void, not Lisp_Object. Otherwise, the compiler
724 complains about (A?B:C) where B is void and C is Lisp_Object
725 when compiling CHAR_TABLE_SET, due to the recent change to
726 the API of sub_char_table_set_contents.
727
a999ce26
CY
7282012-08-18 Chong Yidong <cyd@gnu.org>
729
730 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
731 for the string case (Bug#3874).
732
3f22b86f
PE
7332012-08-18 Paul Eggert <eggert@cs.ucla.edu>
734
39eb03f1
PE
735 * buffer.h (BSET): Remove (Bug#12215).
736 Replace all uses with calls to new setter functions.
737 (bset_bidi_paragraph_direction, bset_case_canon_table)
738 (bset_case_eqv_table, bset_directory, bset_display_count)
739 (bset_display_time, bset_downcase_table)
740 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
741 (bset_last_selected_window, bset_local_var_alist)
742 (bset_mark_active, bset_point_before_scroll, bset_read_only)
743 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
744 (bset_width_table):
745 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
746 (bset_auto_fill_function, bset_auto_save_file_format)
747 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
748 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
749 (bset_cache_long_line_scans, bset_case_fold_search)
750 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
751 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
752 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
753 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
754 (bset_header_line_format, bset_indicate_buffer_boundaries)
755 (bset_indicate_empty_lines, bset_invisibility_spec)
756 (bset_left_fringe_width, bset_major_mode, bset_mark)
757 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
758 (bset_name, bset_overwrite_mode, bset_pt_marker)
759 (bset_right_fringe_width, bset_save_length)
760 (bset_scroll_bar_width, bset_scroll_down_aggressively)
761 (bset_scroll_up_aggressively, bset_selective_display)
762 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
763 (bset_word_wrap, bset_zv_marker):
764 * category.c (bset_category_table):
765 * syntax.c (bset_syntax_table):
766 New setter functions.
767
6a09a33b
PE
768 * process.h (PSET): Remove (Bug#12215).
769 Replace all uses with calls to new setter functions.
770 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
771 (PROCESS_INLINE): New macro.
772 (pset_childp): New setter function.
773 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
774 * process.c (PROCESS_INLINE):
775 Define to EXTERN_INLINE, so that the corresponding functions
776 are compiled into code.
777 (pset_buffer, pset_command, pset_decode_coding_system)
778 (pset_decoding_buf, pset_encode_coding_system)
779 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
780 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
781 (pset_type, pset_write_queue): New setter functions.
782
e8c17b81
PE
783 * window.h (WSET): Remove (Bug#12215).
784 Replace all uses with calls to new setter functions.
785 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
786 (WINDOW_INLINE): New macro.
787 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
788 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
789 (wset_total_lines, wset_vertical_scroll_bar)
790 (wset_window_end_pos, wset_window_end_valid)
791 (wset_window_end_vpos): New setter functions.
792 * window.c (WINDOW_INLINE):
793 Define to EXTERN_INLINE, so that the corresponding functions
794 are compiled into code.
795 (wset_combination_limit, wset_dedicated, wset_display_table)
796 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
797 (wset_new_normal, wset_new_total, wset_next_buffers)
798 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
799 (wset_prev_buffers, wset_right_fringe_width)
800 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
801 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
802 (wset_window_parameters):
803 * xdisp.c (wset_base_line_number, wset_base_line_pos)
804 (wset_column_number_displayed, wset_region_showing):
805 New setter functions.
806
3f22b86f
PE
807 * termhooks.h (TSET): Remove (Bug#12215).
808 Replace all uses with calls to new setter functions.
809 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
810 (TERMHOOKS_INLINE): New macro.
811 (tset_charset_list, tset_selection_alist): New setter functions.
812 * terminal.c (TERMHOOKS_INLINE):
813 Define to EXTERN_INLINE, so that the corresponding functions
814 are compiled into code.
815 (tset_param_alist): New setter function.
816
742af32f
PE
8172012-08-17 Paul Eggert <eggert@cs.ucla.edu>
818
15dbb4d6
PE
819 * keyboard.h (KSET): Remove (Bug#12215).
820 Replace all uses with calls to new setter functions.
821 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
822 (KEYBOARD_INLINE): New macro.
823 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
824 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
825 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
826 New setter functions.
827 * keyboard.c (KEYBOARD_INLINE):
828 Define to EXTERN_INLINE, so that the corresponding functions
829 are compiled into code.
830 (kset_echo_string, kset_kbd_queue)
831 (kset_keyboard_translate_table, kset_last_prefix_arg)
832 (kset_last_repeatable_command, kset_local_function_key_map)
833 (kset_overriding_terminal_local_map, kset_real_last_command)
834 (kset_system_key_syms): New setter functions.
835
f00af5b1
PE
836 * frame.h (FSET): Remove (Bug#12215).
837 Replace all uses with calls to new setter functions.
838 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
839 (FRAME_INLINE): New macro.
840 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
841 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
842 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
843 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
844 (fset_param_alist, fset_root_window, fset_scroll_bars)
845 (fset_selected_window, fset_title, fset_tool_bar_items)
846 (fset_tool_bar_position, fset_tool_bar_window): New functions.
847 * frame.c (FRAME_INLINE):
848 Define to EXTERN_INLINE, so that the corresponding functions
849 are compiled into code.
850 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
851
0c94c8d6
PE
852 A few more naming-convention fixes for getters and setters.
853 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
854 and rename from buffer_overlays_set_before.
855 (set_buffer_overlays_after): Move here from buffer.h, and rename
856 from buffer_overlays_set_after.
857 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
858 All uses changed.
859 (set_buffer_intervals): Rename from buffer_set_intervals.
860 * intervals.c (set_interval_object): Move here from intervals.h,
861 and rename from interval_set_object.
862 (set_interval_left): Move here from intervals.h, and rename from
863 interval_set_left.
864 (set_interval_right): Move here from intervals.h, and rename from
865 interval_set_right.
866 (copy_interval_parent): Move here from intervals.h, and rename from
867 interval_copy_parent.
868 * intervals.h (set_interval_parent): Rename from interval_set_parent.
869 (set_interval_plist): Rename from interval_set_plist.
870 Return void, not Lisp_Object, since no caller uses the result.
871 * lisp.h (string_intervals): Rename from string_get_intervals.
872 (set_string_intervals): Rename from string_set_intervals.
873
34dabdb7
PE
874 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
875 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 876 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
877 All uses changed. See the end of
878 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
879
742af32f
PE
880 * lisp.h (CSET): Remove (Bug#12215).
881 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
882 (set_char_table_purpose): New functions,
883 replacing CSET. All uses changed. For example, replace
884 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 885 "set_char_table_parent (char_table, parent);".
742af32f
PE
886 The old version was confusing because it used the same name
887 'parent' for two different things.
888
a04e2c62
DA
8892012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
890
891 Functions to get and set Lisp_Object fields of buffer-local variables.
892 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
893 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
894 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
895 * data.c, eval.c, frame.c: Adjust users.
896
383dcbf9
CY
8972012-08-17 Chong Yidong <cyd@gnu.org>
898
899 * xfaces.c (merge_face_vectors): If the target font specfies a
900 font spec, make the font's attributes take precedence over
901 directly-specified attributes.
902 (merge_face_ref): Recognize :font.
903
44386687
DA
9042012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
905
906 Do not use memcpy for copying intervals.
907 * intervals.c (reproduce_interval): New function.
908 (reproduce_tree, reproduce_tree_obj): Use it.
909 (reproduce_tree_obj): Remove prototype.
910
927c7216
PE
9112012-08-17 Paul Eggert <eggert@cs.ucla.edu>
912
913 * lisp.h (duration_to_sec_usec): Remove unused decl.
914
93044f7b
AA
9152012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
916
917 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
918 to an allocated instance of NSString, not to the class itself.
919
9851e4a5
JB
9202012-08-17 Juanma Barranquero <lekktu@gmail.com>
921
922 * makefile.w32-in (C_CTYPE_H): New macro.
923 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
924 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
925 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
926
620f13b0
PE
9272012-08-16 Paul Eggert <eggert@cs.ucla.edu>
928
929 Use ASCII tests for character types.
930 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
931 * xfns.c, xterm.c:
932 Don't include <ctype.h>; was not needed.
933 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
934 * sysdep.c, xfaces.c:
935 Include <c-ctype.h> instead of <ctype.h>.
936 * nsterm.m: Include <c-ctype.h>.
937 * charset.c (read_hex):
938 * doc.c (Fsnarf_documentation):
939 * fileio.c (IS_DRIVE) [WINDOWSNT]:
940 (DRIVE_LETTER) [DOS_NT]:
941 (Ffile_name_directory, Fexpand_file_name)
942 (Fsubstitute_in_file_name):
943 * font.c (font_parse_xlfd, font_parse_fcname):
944 * frame.c (x_set_font_backend):
945 * gtkutil.c (xg_get_font):
946 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
947 * nsimage.m (hexchar):
948 * nsterm.m (ns_xlfd_to_fontname):
949 * sysdep.c (system_process_attributes):
950 * xfaces.c (hash_string_case_insensitive):
951 Use C-locale tests instead of locale-specific tests for character
952 types, since we want the ASCII interpretation here, not the
953 interpretation suitable for whatever happens to be the current locale.
954
52162052
MR
9552012-08-16 Martin Rudalics <rudalics@gmx.at>
956
957 Consistently check windows for validity/liveness
958 (Bug#11984, Bug#12025, Bug#12026).
959 * lisp.h (CHECK_VALID_WINDOW): New macro.
960 * window.c (decode_window): Rename to decode_live_window.
961 (decode_valid_window, Fwindow_valid_p): New functions.
962 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
963 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
964 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
965 (Fwindow_prev_sibling, Fwindow_combination_limit)
966 (Fset_window_combination_limit, Fwindow_use_time)
967 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
968 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
969 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
970 (Fwindow_hscroll, Fset_window_hscroll)
971 (Fwindow_redisplay_end_trigger)
972 (Fset_window_redisplay_end_trigger, Fwindow_edges)
973 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
974 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
975 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
976 (Fwindow_end, Fset_window_point, Fset_window_start)
977 (Fpos_visible_in_window_p, Fwindow_line_height)
978 (Fwindow_dedicated_p, Fset_window_dedicated_p)
979 (Fwindow_prev_buffers, Fset_window_prev_buffers)
980 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
981 (Fset_window_parameter, Fwindow_display_table)
982 (Fset_window_display_table, Fdelete_other_windows_internal)
983 (Fset_window_buffer, Fset_window_new_total)
984 (Fset_window_new_normal, Fdelete_window_internal)
985 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
986 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
987 (Fwindow_scroll_bars): Check whether argument window is a valid or
988 live window. Update doc-strings.
989 (syms_of_window): New symbol Qwindow_valid_p.
990 * keyboard.c (Fposn_at_x_y): Check whether argument
991 frame_or_window denotes a valid window.
992
2751c80f
DA
9932012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
994
995 Fix previous char table change.
996 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
997 * chartab.c (optimize_sub_char_table): Likewise.
998
032a42c8
CY
9992012-08-16 Chong Yidong <cyd@gnu.org>
1000
a2d19368
CY
1001 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
1002
032a42c8
CY
1003 * xfont.c (xfont_open):
1004 * xftfont.c (xftfont_open): Set the font's max_width field.
1005
1006 * nsfont.m (nsfont_open): Similar to the Xft backend, set
1007 min_width to space_width and average_width to the average over
1008 printable ASCII characters.
1009 (ns_char_width): Code cleanup.
1010 (ns_ascii_average_width): New utility function.
1011
1012 * font.h (struct font): Update comments.
1013
a098c930
DA
10142012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
1015
032a42c8 1016 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
1017 * lisp.h (CSET): New macro.
1018 (char_table_set_extras, char_table_set_contents)
1019 (sub_char_table_set_contents): New function.
1020 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
1021 * syntax.c: Adjust users.
1022
8be3a09c
SM
10232012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
1024
1025 * eval.c (eval_sub): Bind lexical-binding.
1026 * lread.c (Qlexical_binding): Make non-static.
1027
ac4845a6
JD
10282012-08-15 Jan Djärv <jan.h.d@swipnet.se>
1029
ddee6515
JD
1030 * nsmenu.m (popupSession): Remove.
1031 (pop_down_menu): Remove endModalSession.
1032 (timeout_handler:): New method.
1033 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
1034 Call runModalForWindow. Check timer_fired when it returns.
1035 If not set, cancel timer and break out of loop.
1036 Otherwise loop again, with a new timeout.
1037
1038 * nsterm.m: Include fcntl.h if present.
1039 (fd_entry, t_readfds, inNsSelect): Remove.
1040 (select_writefds, select_valid, select_timeout, selfds)
1041 (select_mutex, apploopnr): Add.
1042 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
1043 Otherwise call kbd_buffer_store_event.
1044 (ns_send_appdefined): Remove release of fd_entry.
1045 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
1046 Increment and decrement apploopnr.
1047 (ns_select): If no file descriptors, just do a NSTimer.
1048 Otherwise copy read/write masks and start select thread (fd_handler).
1049 Start main loop and wait for application defined event.
1050 Inform select thread to stop selecting after main loop is exited.
1051 (ns_term_init): Create selfds pipe and set non-blocking.
1052 Initialize select_mutex. Start the select thread (fd_handler).
1053 (fd_handler:): Loop forever, wait for info from the main thread
1054 to either start or stop selecting. When select returns, send
1055 and appdefined event.
1056 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
1057 If not call kbd_buffer_store_event.
1058
1059 * nsterm.h (EmacsApp): fd_handler takes id argument.
1060 (EmacsDialogPanel): Add timer_fired and timeout_handler.
1061
ac4845a6
JD
1062 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
1063
eb424fe3
EZ
10642012-08-15 Eli Zaretskii <eliz@gnu.org>
1065
1066 * region-cache.c (move_cache_gap): Update gap_len using the actual
1067 growth of the boundaries array. Do not change cache_len.
1068 (Bug#12196)
1069
4e6a86c6
DA
10702012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1071
1072 Generalize and cleanup font subsystem checks.
1073 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
1074 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
1075 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 1076
5bf192ca
DA
10772012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1078
1079 * gtkutil.c (xg_get_font): Use pango_units_to_double.
1080
f2045622
CY
10812012-08-15 Chong Yidong <cyd@gnu.org>
1082
8be3a09c
SM
1083 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
1084 When using the new font chooser, use gtk_font_chooser_get_font_desc to
1085 extract the font descriptor instead of just the font name.
1086 In that case, return a font spec instead of a string.
f2045622
CY
1087 (x_last_font_name): Move to this file from xfns.c.
1088
1089 * xfns.c (Fx_select_font): The return value can also be a font
1090 spec. Move x_last_font_name management to gtkutil.c.
1091
1092 * xfaces.c: Make font weight and style symbols non-static.
1093
7f6feb56
SM
10942012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
1095
1096 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
1097 (bug#12117).
1098
fecbd8ff
SM
10992012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
1100
1101 * alloc.c (Fgarbage_collect): Use plural form consistently.
1102
9b8d5165
EZ
11032012-08-14 Eli Zaretskii <eliz@gnu.org>
1104
1105 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
1106 iteration through the command loop. Fixes a problem whereby mouse
1107 movements are ignored until the first mouse click.
1108
f5d9e83a
PE
11092012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1110
1111 Use bool, not int, for Lisp booleans.
1112 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
1113 makes Emacs a bit smaller and presumably a bit faster.
1114 * lisp.h: Include <stdbool.h>.
1115 (struct Lisp_Boolfwd, defvar_bool):
1116 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
1117 * regex.c [!emacs]: Include <stdbool.h>.
1118 (false, true): Remove; <stdbool.h> does this for us now.
1119
55802e4a
CY
11202012-08-14 Chong Yidong <cyd@gnu.org>
1121
4abcdac8
CY
1122 * character.c (Fcharacterp): Doc fix (Bug#12076).
1123
1124 * data.c (Findirect_variable): Doc fix (Bug#11040).
1125
55802e4a
CY
1126 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
1127
1128 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 1129 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 1130
8e99d072
BR
11312012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1132
1133 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
1134 (bug#12022).
1135
08908aca
MR
11362012-08-14 Martin Rudalics <rudalics@gmx.at>
1137
1138 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
1139 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
1140 * minibuf.c (choose_minibuf_frame, read_minibuf):
1141 * w32fns.c (x_create_tip_frame):
1142 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
1143 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
1144
56120d6f
PE
11452012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1146
1147 * intervals.c (offset_intervals): Remove obsolete comment.
1148
67b77c0b
AS
11492012-08-14 Andreas Schwab <schwab@linux-m68k.org>
1150
1151 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
1152
f48b82fd
GR
11532012-08-14 Gergely Risko <gergely@risko.hu>
1154
1155 * coding.c (decode_coding): Record buffer modification before
1156 disabling undo_list (Bug#11773).
1157
fd318b54
DA
11582012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1159
1160 Revert and cleanup some recent overlay changes.
1161 * buffer.h (enum overlay_type): Remove.
1162 (buffer_get_overlays, buffer_set_overlays): Likewise.
1163 (buffer_set_overlays_before, buffer_set_overlays_after):
1164 New function. Adjust users.
1165 (unchain_both): Add eassert.
1166
41a62dd9
DA
11672012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1168
1169 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
1170
5884c324
PE
11712012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1172
1173 * gtkutil.c (xg_mark_data): Don't assume C99.
1174
ca06f160
JD
11752012-08-13 Jan Djärv <jan.h.d@swipnet.se>
1176
1177 * gtkutil.c (xg_frame_tb_info): New struct.
1178 (TB_INFO_KEY): New define.
1179 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
1180 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
1181 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
1182 if not present.
1183 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
1184 is up to date. Otherwise store new data.
1185 (free_frame_tool_bar): Free xg_frame_tb_info if present.
1186
7864a3f7
DA
11872012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1188
1189 Use KSET for write access to Lisp_Object members of struct kboard.
1190 * keyboard.h (KSET): New macro.
1191 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
1192 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
1193 * xterm.c: Adjust users.
1194
4c31be61
DA
11952012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1196
1197 Use BSET for write access to Lisp_Object members of struct buffer.
1198 * buffer.h (BSET): New macro.
1199 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
1200 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
1201 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
1202 * window.c, xdisp.c, xfns.c: Adjust users.
1203
14ae4239
BT
12042012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
1205
1206 * lread.c (syms_of_lread): Initialize Vlexical_binding.
1207
32bcadb4
JD
12082012-08-11 Jan Djärv <jan.h.d@swipnet.se>
1209
3d29b2ce
JD
1210 * nsterm.m (not_in_argv): New function.
1211 (application:openFile, application:openTempFile:):
1212 (application:openFileWithoutUI:, application:openFiles:): Open file
1213 if not_in_argv returns non-zero (bug#12171).
1214
32bcadb4 1215 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
1216 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
1217 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
1218 (xg_get_font_name): Use those functions/macros here.
1219 Reported by Frans Oilinki <moilinki@gmail.com>.
1220
9ff9402d 12212012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
1222
1223 * unexmacosx.c (copy_data_segment): Copy initialized data in
1224 statically linked libraries from input file rather than memory.
1225
db74a5fc
YM
1226 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
1227 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
1228 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
1229
25e65510
GM
12302012-08-10 Glenn Morris <rgm@gnu.org>
1231
1232 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
1233 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
1234
7961135c
DA
12352012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1236
1237 Fix last change to allow compilation with low optimization levels.
1238 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
1239 Reported by Jan Djärv <jan.h.d@swipnet.se>.
1240
42b3a444
DA
12412012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1242
1243 Use common inline syntax in intervals.h.
1244 * intervals.h (INTERVALS_INLINE): New macro.
1245 Change all users from LISP_INLINE.
1246
9fb0c957
DA
12472012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1248
1249 Define Qnone once for all platforms.
1250 * frame.c (Qnone): Define here.
1251 (syms_of_frame): DEFSYM it.
1252 * lisp.h (Qnone): New declaration.
1253 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
1254 * xfns.c: Remove duplication. Adjust users.
1255
65e8ee52
DA
12562012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1257
1258 Remove unused macros from intervals.h.
1259 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
1260 * intervals.c: Adjust comment.
1261
9b855fd6
EZ
12622012-08-10 Eli Zaretskii <eliz@gnu.org>
1263
1264 * w32fns.c <w32_unicode_gui>: New static variable.
1265 (globals_of_w32fns): Initialize it according to os_subtype.
1266 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
1267 testing os_subtype.
1268
39cb9e56 12692012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
1270 Eli Zaretskii <eliz@gnu.org>
1271
1272 Fix bug #10299 with Unicode characters sent by customized
1273 keyboards created by MSKLC.
1274 * w32fns.c (INIT_WINDOW_CLASS): New macro.
1275 (w32_init_class): Use it to initialize the Emacs class with either
1276 ANSI or Unicode API calls.
1277 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
1278 later.
1279 (w32_wnd_proc): If the character code sent by WM_CHAR or
1280 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
1281 original message. Call DefWindowProcW on NT and later.
1282
9374581a
GM
12832012-08-10 Glenn Morris <rgm@gnu.org>
1284
4b94e8cf
GM
1285 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
1286
9374581a
GM
1287 * lisp.h (DIRECTORY_SEP): Let configure set it.
1288
a2752828
DA
12892012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
1290
1291 Use TSET for write access to Lisp_Object slots of struct terminal.
1292 * termhooks.h (TSET): New macro.
1293 * coding.c, terminal.c, xselect.c: Adjust users.
1294
cc92c454
SM
12952012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
1296
1297 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
1298 the failing expression, include them in the error message.
1299 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
1300 * lisp.h (internal_condition_case_n): Update declaration.
1301
4cb3e6b3
DA
13022012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1303
1304 Inline functions to examine and change buffer overlays.
1305 * buffer.c (unchain_both): New function.
1306 * buffer.h (buffer_get_overlays, buffer_set_overlays):
1307 (buffer_has_overlays): New function.
1308 (enum overlay_type): New enum.
1309 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
1310 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
1311
8707c1e5
DA
13122012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1313
1314 Inline functions to examine and change buffer intervals.
1315 * alloc.c (mark_interval_tree): Remove.
1316 (MARK_INTERVAL_TREE): Simplify.
1317 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
1318 * intervals.c (buffer_balance_intervals): New function.
1319 (graft_intervals_into_buffer): Adjust indentation.
1320 (set_intervals_multibyte): Simplify.
1321 * buffer.h (BUF_INTERVALS): Remove.
1322 (buffer_get_intervals, buffer_set_intervals): New function.
1323 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
1324 * intervals.c, textprop.c: Adjust users.
1325
ad8c997f
DA
13262012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1327
1328 Inline functions to examine and change string intervals.
1329 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
1330 (string_get_intervals, string_set_intervals): New function.
1331 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
1332 * lread.c, print.c, textprop.c: Adjust users.
1333
32ac3a6b
GM
13342012-08-08 Glenn Morris <rgm@gnu.org>
1335
1336 * lisp.mk (lisp): Remove language/persian.elc.
1337
77c7bcb1
DA
13382012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1339
1340 Cleanup intervals.
1341 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
1342 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
1343 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
1344 Adjust comment. Move under #if 0.
77c7bcb1
DA
1345 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
1346 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
1347
9c08a8d4
DA
13482012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1349
1350 Check total length of intervals with eassert.
1351 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
1352 * intervals.c: Change all users to eassert.
1353
26d16b35
EZ
13542012-08-07 Eli Zaretskii <eliz@gnu.org>
1355
14ae4239
BT
1356 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
1357 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
1358 INTERNAL_FIELD in Lisp_Cons.
1359
c644523b
DA
13602012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1361
1362 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
1363 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
1364 name since all xname users are fixed long time ago. Do not
1365 use INTERNAL_FIELD.
1366 (set_symbol_name, set_symbol_function, set_symbol_plist):
1367 (set_symbol_next, set_overlay_plist): New function.
1368 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
1369 (struct Lisp_Overlay): Likewise.
1370 (CVAR, MVAR, SVAR): Remove.
1371 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
1372 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
1373 * xterm.c: Adjust users.
1374 * .gdbinit: Change to use name field of struct Lisp_Symbol
1375 where appropriate.
1376
6a3d20cc
DA
13772012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1378
1379 Basic functions to set Lisp_Object and pointer slots of intervals.
1380 * intervals.h (interval_set_parent, interval_set_object):
1381 (interval_set_left, interval_set_right, interval_set_plist):
1382 (interval_copy_parent): New function.
1383 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
1384 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
1385 Adjust indentation.
6a3d20cc
DA
1386 (INTERVAL_SIZE): Remove. Adjust users.
1387 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
1388
4d2b044c
DA
13892012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1390
1391 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
1392 * process.h (PGET): Remove.
1393 (struct Lisp_Process): Do not use INTERNAL_FIELD.
1394 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
1395
d3d50620
DA
13962012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1397
1398 Drop WGET and revert read access to Lisp_Objects slots of struct window.
1399 * window.h (WGET): Remove.
1400 (struct window): Do not use INTERNAL_FIELD.
1401 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1402 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1403 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
1404 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
1405 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
1406 Adjust users.
1407
d10a51dc
CY
14082012-08-07 Chong Yidong <cyd@gnu.org>
1409
1410 * window.c (Fwindow_edges, Fwindow_pixel_edges)
1411 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
1412 (Fdelete_window_internal): Signal an error if the window is not on
1413 a live frame (Bug#12025).
1414
e69b0960
DA
14152012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1416
1417 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
1418 * frame.h (FGET): Remove.
1419 (struct frame): Do not use INTERNAL_FIELD.
1420 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
1421 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
1422 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1423 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
1424
25a20a3a
JB
14252012-08-06 Juanma Barranquero <lekktu@gmail.com>
1426
1427 * w32.c: Silence compiler warnings.
1428 (map_w32_filename): Remove unused variable `is_fat'.
1429 (chase_symlinks): Add parentheses around expression.
1430
1c6f11f4
GM
14312012-08-06 Glenn Morris <rgm@gnu.org>
1432
1db4583a
GM
1433 * sysdep.c: Respect BROKEN_GETWD.
1434
1c6f11f4
GM
1435 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
1436 Let configure handle it.
1437 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
1438
2b90362b
DA
14392012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1440
1441 Use GCALIGNMENT where appropriate.
1442 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
1443 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
1444 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
1445
5f50daf2
EZ
14462012-08-06 Eli Zaretskii <eliz@gnu.org>
1447
14ae4239
BT
1448 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
1449 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 1450
cbcc7007
SM
14512012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
1452
1453 * buffer.h (struct buffer): Revert `indirections' to a simple int;
1454 that should be sufficient for everyone.
1455
4d365fa4
JD
14562012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1457
1458 * keyboard.c (timer_check_2): Add break so timer_check returns next
1459 timeout.
1460
dd86bd82
DA
14612012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1462
1463 Fix Windows build errors introduced after converting to WGET and WSET.
1464 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
1465 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1466
054e1668
JD
14672012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1468
1469 * nsterm.m (ns_frame_rehighlight): Use FSET.
1470
1471 * nsmenu.m (ns_update_menubar): Use FSET.
1472
21238f11
DA
14732012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1474
1475 Separate read and write access to Lisp_Object slots of Lisp_Process.
1476 * process.h (PGET, PSET): New macros similar to AREF and ASET.
1477 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
1478
077288cf
DA
14792012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1480
1481 Separate read and write access to Lisp_Object slots of struct window.
1482 * window.h (WGET, WSET): New macros similar to AREF and ASET.
1483 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1484 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1485 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
1486 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
1487 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
1488 Adjust users.
1489
71688bd7
DA
14902012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1491
1492 Fix Windows build errors introduced after converting to FGET and FSET.
1493 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
1494 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
1495 (w32_judge_scroll_bars): Change to use FSET.
1496 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1497
f99bac93
DA
14982012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1499
1500 Fix replacement typo.
1501 * window.c (replace_window): Set root_window instead of
1502 selected_window. This fixes a total window subsystem
1503 malfunction reported by Bastien Guerry <bzg@gnu.org>.
1504
8c2a0f2d
GM
15052012-08-06 Glenn Morris <rgm@gnu.org>
1506
1507 * lisp.mk (lisp): Add language/persian.elc.
1508
edd74c35
DA
15092012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1510
1511 Separate read and write access to Lisp_Object slots of struct frame.
1512 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
1513 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
1514 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
1515 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1516 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
1517
8671676c
AS
15182012-08-05 Andreas Schwab <schwab@linux-m68k.org>
1519
1520 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
1521
663e2b3f
DA
15222012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
1523
1524 Generalize common compile-time constants.
1525 * lisp.h (header_size, bool_header_size, word_size): Now here.
1526 (struct Lisp_Vector): Add comment.
1527 (struct Lisp_Bool_Vector): Move up to define handy constants.
1528 (VECSIZE, PSEUDOVECSIZE): Simplify.
1529 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
1530 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
1531 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
1532 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
1533 * xfont.c, xmenu.c: Use word_size where appropriate.
1534
d32e47af
LM
15352012-08-05 Lawrence Mitchell <wence@gmx.li>
1536
1537 * search.c (Freplace_match): Treat \? in the replacement text
1538 literally (Bug#8161).
1539
e5d9c0d1
CY
15402012-08-05 Chong Yidong <cyd@gnu.org>
1541
1542 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
1543 * frame.c (Vdelete_frame_functions):
1544 * emacs.c (Vkill_emacs_hook): Doc fix.
1545
8da0576b
EZ
15462012-08-04 Eli Zaretskii <eliz@gnu.org>
1547
1548 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
1549 --with-x-toolkit=no builds.
1550 Reported by Carsten Mattner <carstenmattner@gmail.com>.
1551
02676e5d
CY
15522012-08-04 Chong Yidong <cyd@gnu.org>
1553
1554 * syntax.c (Fmodify_syntax_entry): Doc fix.
1555
97147da9
EZ
15562012-08-04 Eli Zaretskii <eliz@gnu.org>
1557
76151e2c
EZ
1558 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
1559 * w32.c (init_environment): Change the default values of many
1560 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
1561 them into environment when they were not already defined.
1562 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 1563 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
1564 (check_windows_init_file): Now external, not static.
1565 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
1566 called when Vload_path is already set up.
1567
1568 * w32.h (check_windows_init_file): Add prototype.
1569
1570 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
1571 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
1572 compatibility with Posix platforms.
1573 (main): Move the call to check_windows_init_file to here from
1574 w32.c.
1575 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
1576 any, in the DEFALT argument into the root of the Emacs build or
1577 installation tree, as appropriate.
1578
1579 * callproc.c (init_callproc_1): Call decode_env_path instead of
1580 doing its equivalent by hand.
1581 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
1582 the code that sets Vexec_path run on MS-Windows.
1583
1584 * lread.c (init_lread): Add comments to #ifdef's.
1585
97147da9
EZ
1586 * msdos.c (dos_set_window_size, IT_update_begin)
1587 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
1588 instead of direct references.
1589
185ee146
PE
15902012-08-04 Paul Eggert <eggert@cs.ucla.edu>
1591
1592 Export DEFAULT_REHASH_* to GDB.
1593 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
1594 Now constants, not macros.
1595
8834c57a
PE
15962012-08-03 Paul Eggert <eggert@cs.ucla.edu>
1597
98c6f1e3
PE
1598 Remove unnecessary casts involving pointers.
1599 These casts are no longer needed now that we assume C89 or later,
1600 since they involve casting to or from void *.
1601 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
1602 (make_pure_float, make_pure_vector):
1603 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
1604 * macros.c (Fstart_kbd_macro):
1605 * menu.c (find_and_return_menu_selection):
1606 * minibuf.c (read_minibuf_noninteractive):
1607 * sysdep.c (closedir):
1608 * xdisp.c (x_produce_glyphs):
1609 * xfaces.c (compare_fonts_by_sort_order):
1610 * xfns.c (x_real_positions, select_visual):
1611 * xselect.c (x_stop_queuing_selection_requests)
1612 (x_get_window_property, x_get_window_property_as_lisp_data):
1613 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
1614 Remove unnecessary pointer casts.
1615 * alloc.c (record_xmalloc): New function.
1616 * lisp.h (record_xmalloc): New decl.
1617 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
1618 more like a function. This is because the pointer cast is not
1619 needed. All uses changed.
1620 * print.c (print_string, print_error_message): Avoid length recalc.
1621
8834c57a
PE
1622 Improve fix for macroexp crash with debugging (Bug#12118).
1623 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
1624 ARRAY_MARK_FLAG when checking subscripts, because ASET is
1625 not supposed to be invoked from the garbage collector.
1626 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
1627 (gc_aset): New function, which is like ASET but can be
1628 used in the garbage collector.
1629 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1630 (set_hash_index): Use it instead of ASET.
1631
6dad7178
EZ
16322012-08-03 Eli Zaretskii <eliz@gnu.org>
1633
1634 Support symlinks on latest versions of MS-Windows.
1635 * w32.c: Include winioctl.h and aclapi.h.
1636 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
1637 (revert_to_self): Forward declarations of static functions.
1638 <static BOOL g_b_init_get_security_info>:
1639 <g_b_init_create_symbolic_link>: New static flags.
1640 (globals_of_w32): Initialize them to zero.
1641 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
1642 (map_w32_filename): Improve commentary. Simplify switch.
1643 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
1644 headers (most versions of MinGW w32api don't).
1645 (get_security_info, create_symbolic_link)
1646 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
1647 New functions.
1648 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
1649 in the argument file name.
1650 (sys_access): Call unc_volume_file_attributes only if
1651 GetFileAttributes fails with network-related error codes.
1652 (sys_rename): Diagnose renaming of a symlink when the user doesn't
1653 have the required privileges.
14ae4239 1654 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
1655 get_file_security_desc.
1656 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
1657 with addition of handling of symlinks and support for 'lstat'.
1658 If possible, get file's attributes and security information by
6dad7178
EZ
1659 handle, not by name. Produce S_IFLNK bit for symlinks, when
1660 called from 'lstat'.
1661 (stat, lstat): New functions, call 'stat_worker'.
1662 (symlink, readlink, careadlinkat): Rewritten to create and resolve
1663 symlinks when the underlying filesystem supports them.
1664
f162bcc3
PE
16652012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1666
79ea6c20
PE
1667 Fix macroexp crash on Windows with debugging (Bug#12118).
1668 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
1669 checking subscripts; problem introduced with the recent
1670 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
1671 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
1672 since it's used in non-static inline functions now.
1673
c0ce93fd
PE
1674 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
1675 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 1676
f162bcc3
PE
1677 Use C99-style 'extern inline' if available.
1678 * buffer.h (BUFFER_INLINE):
1679 * category.h (CATEGORY_INLINE):
1680 * character.h (CHARACTER_INLINE):
1681 * charset.h (CHARSET_INLINE):
1682 * composite.h (COMPOSITE_INLINE):
1683 * dispextern.h (DISPEXTERN_INLINE):
1684 * lisp.h (LISP_INLINE):
1685 * systime.h (SYSTIME_INLINE):
1686 New macro, replacing 'static inline' in this header.
1687 * buffer.h, category.h, character.h, charset.h, composite.h:
1688 * dispextern.h, lisp.h, systime.h:
1689 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1690 * alloc.c (LISP_INLINE):
1691 * buffer.c (BUFFER_INLINE):
1692 * category.c (CATEGORY_INLINE):
1693 * character.c (CHARACTER_INLINE):
1694 * charset.c (CHARSET_INLINE):
1695 * composite.c (COMPOSITE_INLINE):
1696 * dispnew.c (DISPEXTERN_INLINE):
1697 * sysdep.c (SYSTIME_INLINE):
1698 Define to EXTERN_INLINE, so that the corresponding functions
1699 are compiled into code.
1700 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
1701 (INLINE_HEADER_END): New macros.
1702 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
1703 since it's used in non-static inline functions now.
a8333d03 1704 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 1705
837b365b
GM
17062012-08-02 Glenn Morris <rgm@gnu.org>
1707
d66b744d
GM
1708 * s/: Remove empty directory.
1709
837b365b
GM
1710 * s/ms-w32.h: Move to ../nt/inc.
1711 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
1712 Update for new ms-w32.h location.
1713
13294f95
PE
17142012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1715
1716 Port to Solaris 8.
1717 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
1718
90df0db3
GM
17192012-08-02 Glenn Morris <rgm@gnu.org>
1720
1721 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
1722 hard-coding the path separator.
1723
4939150c
PE
17242012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1725
1726 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
1727 This how ASET and AREF are supposed to work, and makes
1728 it easier to think about future improvements. See
1729 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
1730 * charset.h (set_charset_attr): New function.
1731 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
1732 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
1733 (aref_addr): New function. All uses of &AREF(...) changed.
1734 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1735 (set_hash_index): New functions. All lvalue-style uses of
1736 HASH_KEY etc. changed.
1737 * keyboard.c (set_prop): New function. All lvalue-style uses
1738 of PROP changed.
1739
947b2afd
AA
17402012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
1741
1742 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
1743 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1744 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
1745 * nsfns.m (ns_set_name_as_filename): Likewise.
1746 * nsmenu.m (ns_update_menubar): Likewise.
1747 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
1748
4f5d0325
EZ
17492012-08-01 Eli Zaretskii <eliz@gnu.org>
1750
2008beae
EZ
1751 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
1752 Adapt to latest changes in field names of the corresponding Lisp
288479f6 1753 objects.
2008beae 1754
4f5d0325
EZ
1755 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
1756
fe3cc771
GM
17572012-08-01 Glenn Morris <rgm@gnu.org>
1758
1759 * s/msdos.h: Remove file.
1760 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
1761 * Makefile.in (S_FILE): Remove.
1762 (config_h): Remove S_FILE.
1763
c90acc54
JB
17642012-08-01 Juanma Barranquero <lekktu@gmail.com>
1765
1766 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
1767 Remove; moved to nt/config.nt.
1768
d8a05828
DA
17692012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1770
1771 Use INTERNAL_FIELD for conses and overlays.
1772 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
1773 Remove obsolete comment.
1774 (MVAR): New macro.
1775 (struct Lisp_Overlay): Use INTERNAL_FIELD.
1776 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
1777
8271d590
DA
17782012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1779
1780 Use INTERNAL_FIELD for symbols.
1781 * lisp.h (SVAR): New macro. Adjust users.
1782 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
1783 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
1784
3193acd2
DA
17852012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1786
1787 Use INTERNAL_FIELD for processes.
1788 * process.h (PVAR): New macro. Adjust style.
1789 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
1790 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
1791
3a45383a
DA
17922012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1793
1794 Use INTERNAL_FIELD for windows.
1795 * window.h (WVAR): New macro.
1796 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
1797 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1798 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1799 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
1800 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
1801 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1802
c1dbc63c
PE
18032012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1804
1805 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
1806
5c0c0e8a
GM
18072012-08-01 Glenn Morris <rgm@gnu.org>
1808
1809 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
1810 Move to configure.ac.
1811
552a99b4
JB
18122012-08-01 Juanma Barranquero <lekktu@gmail.com>
1813
1814 * makefile.w32-in (CONFIG_H): Update dependencies.
1815 (CONF_POST_H): New macro.
1816
1817 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
1818
8d8e2dfe
GM
18192012-07-31 Glenn Morris <rgm@gnu.org>
1820
bc96620a
GM
1821 * Makefile.in (S_FILE): No longer set by configure.
1822
476b1b2d
GM
1823 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
1824 is available.
1825 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
1826
b2c7a106
GM
1827 * process.h (NULL_DEVICE):
1828 * emacs.c (SEPCHAR):
1829 * editfns.c (USER_FULL_NAME): Let configure set them.
1830
d53d062a
GM
1831 * s/README, s/template.h: Remove files.
1832
4515017f
GM
1833 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
1834
8d8e2dfe
GM
1835 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
1836 Move to configure.ac.
1837
5b20b3cc
EZ
18382012-07-31 Eli Zaretskii <eliz@gnu.org>
1839
1e0afd9a
EZ
1840 * .gdbinit (xframe): Adapt to introduction of FVAR and the
1841 resulting renaming of 'struct frame' members.
1842
5b20b3cc
EZ
1843 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
1844
1845 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
1846 after introduction of FVAR.
1847
f1310128
JD
18482012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1849
79e721e0
JD
1850 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
1851
1852 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
1853 instead of compositeToPoint.
1854 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
1855
8d7c7eed 1856 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 1857
e34f7f79
DA
18582012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1859
1860 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
1861 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 1862 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
1863 (BVAR): Change to use INTERNAL_FIELD.
1864 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
1865 (KVAR): Change to use INTERNAL_FIELD.
1866 * frame.h (FVAR): New macro.
1867 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
1868 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
1869 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
1870 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
1871 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1872
c09bfb2f
DA
18732012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1874
1875 Miscellaneous fixes for non-default X toolkits.
1876 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
1877 * xterm.c (x_frame_of_widget): Remove redundant prototype.
1878 Move under #ifdef USE_LUCID.
1879 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
1880 definition and usage to avoid warnings.
1881
14c114ae
JD
18822012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1883
1884 * nsterm.m (openFiles): Fix previous checkin.
1885
3bd21e82
PE
18862012-07-31 Paul Eggert <eggert@cs.ucla.edu>
1887
1888 * indent.c (compute_motion): Remove unused local.
1889
c1529ded
GM
18902012-07-31 Glenn Morris <rgm@gnu.org>
1891
400d5621
GM
1892 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
1893
268e2432
GM
1894 * conf_post.h [USG5_4]:
1895 Move remaining contents of s/usg5-4-common.h here.
1896 * s/usg5-4-common.h: Remove file.
1897
7552f3ee
GM
1898 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
1899 * s/irix6-5.h: Remove file.
1900
6a381852
GM
1901 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
1902 * s/darwin.h: Remove file.
1903
c1529ded
GM
1904 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
1905 * s/hpux10-20.h: Remove file, which is now empty.
1906
b429a4ee
GM
19072012-07-30 Glenn Morris <rgm@gnu.org>
1908
1909 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
1910 * Makefile.in (config_h): Add conf_post.h.
1911 * makefile.w32-in (CONFIG_H): Add conf_post.h.
1912
adff3182
JD
19132012-07-30 Jan Djärv <jan.h.d@swipnet.se>
1914
1915 * nsterm.m (ns_do_open_file): New variable.
b9031d69 1916 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
1917 (openFile, openTempFile, openFileWithoutUI, openFiles):
1918 Open files only if ns_do_open_file.
adff3182 1919
c32af1e4
PE
19202012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1921
7393bcbb
PE
1922 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
1923 This no-op macro hasn't been needed for many years.
1924 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
1925
c32af1e4
PE
1926 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
1927 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
1928 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
1929 gdb_make_enums_visible.
1930 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
1931 (DIRECTORY_SEP): Now a constant, not a macro.
1932
302fc036
EZ
19332012-07-30 Eli Zaretskii <eliz@gnu.org>
1934
1935 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
1936 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
1937
1938 * w32term.c <w32_keyboard_codepage>: Renamed from
1939 keyboard_codepage and now external. All users changed.
1940
1941 * w32term.h: Add declaration of w32_keyboard_codepage.
1942
1943 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
1944 the codepage to translate keys to Unicode. If this argument is
1945 -1, use the value returned by GetConsoleCP. All callers changed.
1946
88fb40b4
PE
19472012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1948
0aee6912
PE
1949 Update .PHONY listings in makefiles.
1950 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
1951 bootstrap-clean, distclean, maintainer-clean, versioclean,
1952 extraclean, frc.
1953
88fb40b4
PE
1954 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
1955 This is a bit clearer. Fix some commentary typos.
1956
0a763bd1
GM
19572012-07-30 Glenn Morris <rgm@gnu.org>
1958
32bac6d6
GM
1959 * s/netbsd.h: Let configure include signal.h if needed.
1960 Remove file, which is now empty.
1961
b65e7c46
GM
1962 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
1963 Let configure set them.
1964 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
1965 No more need to undefine.
0a763bd1 1966
169304bd
AS
19672012-07-30 Andreas Schwab <schwab@linux-m68k.org>
1968
1969 * keymap.c (Fkey_description): Don't remove 0x80 bit from
1970 non-single-byte char when adding meta modifier. (Bug#12090)
1971
6cd7a139
DA
19722012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
1973
1974 Convert safe_call to use variable number of arguments.
1975 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
1976 (safe_call2): Fix comment.
1977 * lisp.h (safe_call): Adjust prototype.
1978 * coding.c (encode_coding_object): Change to use safe_call2.
1979 * xfaces.c (merge_face_heights): Change to use safe_call1.
1980
d34d6ffc
GM
19812012-07-30 Glenn Morris <rgm@gnu.org>
1982
7b8a48e4 1983 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 1984 does that unconditionally. Remove file, which is now empty.
7b8a48e4 1985
d34d6ffc
GM
1986 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
1987 Remove empty files.
1988
03a660a6
PE
19892012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1990
1991 Export to GDB most of lisp.h's remaining object-like macros.
1992 * lisp.h (min, max): Move earlier, because they're used earlier now.
1993 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
1994 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
1995 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
1996 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
1997 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
1998 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
1999 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
2000 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
2001 Now constants, for GDB. They need not be macros.
2002 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
2003 Now constants, for GDB, as well as macros, for static initializers.
2004 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
2005 Move to after the definition of struct Lisp_Char_Table,
2006 since the former now needs that type defined.
2007 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
2008 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
2009 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
2010 New enums, for gdb_make_enums_visible.
2011 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 2012 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
2013 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
2014 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
2015 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
2016 enum maxargs, enum MAX_ALLOCA.
2017 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
2018 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
2019 no longer needed, now that they are done in lisp.h.
2020
e499d0ee
DA
20212012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2022
2023 Cleanup string bytes checking.
2024 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
2025 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
2026 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
2027 (check_sblock, compact_small_strings): Simplify.
2028
d5040d2d
PE
20292012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2030
2031 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
2032 These macros are confusing and no longer need to be defined, as
2033 the enum values now suffice. All uses replaced with definiens.
2034 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
2035
7f259ae6
JB
20362012-07-29 Juanma Barranquero <lekktu@gmail.com>
2037
2038 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
2039 ($(BLD)/w32console.$(O)): Update dependencies.
2040
7e63e0c3
DA
20412012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2042
2043 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
2044 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
2045 time. Adjust users.
2046 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
2047
ffd817eb
JD
20482012-07-29 Jan Djärv <jan.h.d@swipnet.se>
2049
2050 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
2051 setting sitelisp (Bug#12010).
2052
417a7a0e
EZ
20532012-07-29 Eli Zaretskii <eliz@gnu.org>
2054
14ae4239 2055 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
2056
2057 * w32heap.c (cache_system_info):
2058 * w32.c (sys_rename):
2059 * w32proc.c (find_child_console, sys_kill): All users changed.
2060
387d4d92
PE
20612012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2062
2063 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
2064
55a6cca6
EZ
20652012-07-29 Eli Zaretskii <eliz@gnu.org>
2066
2067 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
2068
dbcf001c
DA
20692012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2070
2071 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
2072 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
2073 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 2074
e2688e4a
DA
20752012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2076
2077 Generalize marker debugging code under MARKER_DEBUG and use eassert.
2078 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
2079 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
2080 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
2081 (replace_range, replace_range_2, del_range_2): Change to eassert.
2082 * marker.c (byte_char_debug_check): Adjust style.
2083
b46a6a83
PE
20842012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2085
2086 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
2087 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
2088 long-ago-commented-out code that talks about "WIN32".
2089 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
2090 All uses changed.
2091
e32a5799
PE
20922012-07-28 Paul Eggert <eggert@cs.ucla.edu>
2093
2094 Use Gnulib stdalign module (Bug#9772, Bug#9960).
2095 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
2096 Simplify by using alignof.
2097 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
2098 * lisp.h: Include <stdalign.h>.
2099 (GCALIGNMENT): New macro and constant.
2100 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
2101 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
2102 (stdalign): New macro, if not already defined.
2103
df81cd29
EZ
21042012-07-28 Eli Zaretskii <eliz@gnu.org>
2105
01bd1b0d
EZ
2106 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
2107 * w32inevt.c: Include w32inevt.h.
2108 (w32_read_console_input): New inline function, calls either
2109 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
2110 w32_console_unicode_input.
2111 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
2112 (w32_kbd_patch_key, key_event): Use the codepage returned by
2113 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
2114 (key_event): use uChar.UnicodeChar only if
2115 w32_console_unicode_input is non-zero.
2116
2117 * w32console.c: Include w32heap.h.
2118 <w32_console_unicode_input>: New global variable.
2119 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
2120 family of Windows, zero otherwise.
2121
2122 * w32inevt.h: Declare w32_console_unicode_input.
2123
df81cd29
EZ
2124 * xdisp.c (init_iterator): Don't reference tip_frame in a build
2125 --without-x. (Bug#11742)
2126
c20fdd9e
PE
21272012-07-27 Paul Eggert <eggert@cs.ucla.edu>
2128
2129 Adjust GDB to reflect pvec_type changes (Bug#12036).
2130 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
2131 2012-07-04 changes to pseudovector representation.
2132 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 2133
32770973 21342012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
2135
2136 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
2137 bus address.
2138 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
2139
3438fe21
EZ
21402012-07-27 Eli Zaretskii <eliz@gnu.org>
2141
bcfbc9de
EZ
2142 * alloc.c (listn): Fix the order the arguments are consed onto the
2143 list.
2144
3438fe21
EZ
2145 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
2146 enumeration constants, as PURE and HEAP are too general, and clash
2147 with other headers and sources, such as gmalloc.c and the
2148 MS-Windows system headers. All users changed.
2149
eeaea515
DA
21502012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2151
2152 Revert last save_excursion_save and save_excursion_restore changes.
2153 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
2154 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
2155
073c88c2
DA
21562012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2157
2158 Fix recently-introduced typos in Windows port.
2159 Reported by Martin Rudalics <rudalics@gmx.at>.
2160 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 2161 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 2162
4706125e
PE
21632012-07-27 Paul Eggert <eggert@cs.ucla.edu>
2164
2165 Improve GDB symbol export (Bug#12036).
2166 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
2167 arms of an 'if', not using conditional expressions; otherwise GDB
2168 complains about the types in the unevaluated arm when the argument
2169 is an integer literal.
2170 (xgetint): Simplify expression.
2171 * alloc.c (gdb_make_enums_visible): New constant. This ports to
2172 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
2173 Zaretskii in <http://bugs.gnu.org/12036#13>.
2174 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
2175 needed now that we have gdb_make_enums_visible.
2176 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
2177 (enum enum_USE_LSB_TAG):
2178 New enum types, packaging up enums that need to be exported to GDB.
2179
694b6c97
DA
21802012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2181
2182 Utility function to make a list from specified amount of objects.
2183 * lisp.h (enum constype): New datatype.
2184 (listn): New prototype.
2185 * alloc.c (listn): New function.
2186 (Fmemory_use_count, syms_of_alloc): Use it.
2187 * buffer.c (syms_of_buffer): Likewise.
2188 * callint.c (syms_of_callint): Likewise.
2189 * charset.c (define_charset_internal): Likewise.
2190 * coding.c (syms_of_coding): Likewise.
2191 * keymap.c (syms_of_keymap): Likewise.
2192 * search.c (syms_of_search): Likewise.
2193 * syntax.c (syms_of_syntax): Likewise.
2194 * w32.c (init_environment): Likewise.
2195 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
2196 * xdisp.c (syms_of_xdisp): Likewise.
2197 * xfns.c (syms_of_xfns): Likewise.
2198
6195f384
DA
21992012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2200
2201 Fast save_excursion_save and save_excursion_restore.
2202 * lisp.h (struct Lisp_Excursion): New data type.
2203 (PVEC_EXCURSION): New pseudovector type.
2204 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
2205 to deal with it. Adjust comments.
2206 (init_marker, attach_marker): New prototype.
2207 (unchain_marker): Adjust prototype.
2208 * marker.c (attach_marker): Change to global.
2209 (init_marker): New function.
2210 * alloc.c (Fmake_marker, build_marker): Use it.
2211 (build_marker): More easserts.
2212 (mark_object): Handle struct Lisp_Excursion.
2213 * editfns.c (save_excursion_save, save_excursion_restore):
2214 Reimplement to use struct Lisp_Excursion. Add comments.
2215
5eceb8fb
PE
22162012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2217
2218 Fix export of symbols to GDB (Bug#12036).
2219 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
2220 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
2221 emacs.c, as this is a more-suitable home. Had this been done earlier
2222 the fix for 12036 would have avoided some of the problems noted in
2223 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
2224 would have been more obvious.
562157c8
PE
2225 * emacs.c: Do not include <verify.h>; no longer needed.
2226 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
2227 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
2228 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2229 Remove; now done in lisp.h.
2230 * lisp.h (PUBLISH_TO_GDB): New macro.
2231 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
2232 (DATA_SEG_BITS): Use it.
2233 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
2234 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
2235 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
2236 not be usable in #if. This simplifies things.
2237
d6749401
JB
22382012-07-26 Juanma Barranquero <lekktu@gmail.com>
2239
2240 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
2241
1781b9e9
PE
22422012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2243
d89518db 2244 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
2245 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
2246 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
2247 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
2248 Adjust to changes in lisp.h and emacs.c, by using
2249 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
2250 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
2251 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
2252 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
2253 instead of gdb_valbits.
2254 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
2255 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
2256 instead of gdb_array_mark_flag.
2257 (xboolvector): Get size from $->size, not $->header.size.
2258 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
2259 (xreload, hook-run, hookpost-run): Remove.
2260 * emacs.c: Include <verify.h>.
2261 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
2262 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
2263 Remove.
2264 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
2265 (gdb_USE_LSB_TAG): New enum constants.
2266 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2267 Also define these as enum constants, so they're visible to GDB.
2268 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
2269 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
2270 as constants, so they're visible to GDB.
2271 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
2272 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
2273 Now enum constants, not macros, so they're visible to GDB.
2274 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
2275 more convenient now. All uses changed.
2276 (VALMASK) [USE_LSB_TAG]: Also define in this case.
2277 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
2278
3628596a
DA
22792012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
2280
2281 Explicitly free restriction data that are not needed anymore.
2282 * editfns.c (save_restriction_restore): Free restriction data.
2283
7abaf5cc
SM
22842012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
2285
2286 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
2287 add argument, tune behavior, and adjust all callers.
2288
71f88e00
PE
22892012-07-25 Paul Eggert <eggert@cs.ucla.edu>
2290
2291 Use typedef for EMACS_INT, EMACS_UINT.
2292 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
2293 than macros. This simplifies debugging in the usual case, since
2294 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
2295 and it allows expressions involving EMACS_INT casts.
2296 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
2297
57ec3034
JD
22982012-07-25 Jan Djärv <jan.h.d@swipnet.se>
2299
2300 * nsterm.m (ns_read_socket): Return early if there is a modal
2301 window (Bug#12043).
2302
8137e7b3
MR
23032012-07-25 Martin Rudalics <rudalics@gmx.at>
2304
2305 * frame.c (Fredirect_frame_focus): In doc-string don't mention
2306 that FOCUS-FRAME can be omitted.
2307
04e9897c
DA
23082012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
2309
2310 Adjust buffer text indirection counters at the end of Fkill_buffer.
2311 * buffer.c (Fkill_buffer): Adjust indirection counters when the
2312 buffer is definitely dead. This should really fix an issue reported
2313 by Christoph Scholtes again. (Bug#12007).
2314 (init_buffer_once): Initialize indirection counters of
2315 buffer_defaults and buffer_local_symbols (for sanity and safety).
2316
8a0484e1
EZ
23172012-07-24 Eli Zaretskii <eliz@gnu.org>
2318
2319 * xdisp.c (init_iterator): Don't compute dimensions of truncation
2320 and continuation glyphs on tooltip frames, leave them at zero.
2321 Avoids continued lines in tooltips. (Bug#11832)
2322
fa691a83
DA
23232012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
2324
2325 Simplify copy_overlay.
04e9897c 2326 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
2327 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
2328
436bc8e0
EZ
23292012-07-23 Eli Zaretskii <eliz@gnu.org>
2330
2331 * print.c (print_object): Don't crash when a frame's name is nil
2332 or invalid. (Bug#12025)
2333
2334 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
2335 it signals an error when a tooltip frame is being created.
2336
d7a7fda3
DA
23372012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
2338
2339 Cleanup miscellaneous objects allocation and initialization.
2340 * alloc.c (allocate_misc): Change to static. Add argument to
2341 specify the subtype. Adjust comment and users.
2342 (build_overlay): New function.
2343 * buffer.c (copy_overlays, Fmake_overlay): Use it.
2344 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
2345 (allocate_misc): Remove prototype.
2346 (build_overlay): Add prototype.
2347
23482012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
2349
2350 Swap buffer text indirection counters in Fbuffer_swap_text.
2351 * buffer.c (Fbuffer_swap_text): Swap indirections too.
2352 This avoids crash reported by Christoph Scholtes at
2353 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
2354
9d7fa573
JD
23552012-07-22 Jan Djärv <jan.h.d@swipnet.se>
2356
2357 * nsmenu.m (Popdown_data): New struct.
2358 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
2359 free Popdown_data.
2360 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
2361 (initWithContentRect): Make imgView and contentView non-static
2362 and autorelease them. Also autorelease img and matrix (Bug#12005).
2363 (dealloc): Remove (Bug#12005).
2364
0dd6d66d
DA
23652012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
2366
2367 Adjust consing_since_gc when objects are explicitly freed.
2368 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
2369 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
2370 (free_cons, free_misc): Subtract object size from consing_since_gc.
2371
d36d71df
DA
23722012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
2373
2374 Simplify and cleanup markers positioning code.
2375 * marker.c (attach_marker): More useful eassert.
2376 (live_buffer, set_marker_internal): New function.
2377 (Fset_marker, set_marker_restricted): Use set_marker_internal.
2378 (set_marker_both, set_marker_restricted_both): Use live_buffer.
2379
fb9ea40f
PE
23802012-07-22 Paul Eggert <eggert@cs.ucla.edu>
2381
2382 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
2383 as it's limited by the amount of memory, not by INT_MAX.
2384
2d5c5f7d
EZ
23852012-07-21 Eli Zaretskii <eliz@gnu.org>
2386
07fb592e
EZ
2387 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
2388 in special-event-map. See the discussion at
2389 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
2390 for the reasons.
2391
37a9eac8 2392 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
2393 info.dwItemData. Fixes crashes on 64-bit Windows.
2394 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 2395
c4328746
JD
23962012-07-21 Jan Djärv <jan.h.d@swipnet.se>
2397
2398 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 2399 (conversationIdentifier): Return value is NSInteger.
784051c4 2400 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 2401
6e5d1c12
CY
24022012-07-21 Chong Yidong <cyd@gnu.org>
2403
2404 * window.c (decode_any_window): Signal an error if the window is
2405 on a dead frame (Bug#11984).
2406
9928463d
DA
24072012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2408
2409 Add indirection counting to speed up Fkill_buffer.
2410 * buffer.h (struct buffer): New member.
2411 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
2412 (Fmake_indirect_buffer): Set indirection counter to -1, increment
2413 base buffer indirection counter.
2414 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
2415 (Fkill_buffer): Adjust indirection counters as needed, don't walk
2416 through buffer list if indirection counter is 0.
2417
f8643a6b
DA
24182012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2419
2420 Extend the value returned by Fgarbage_collect with heap statistics.
2421 * alloc.c (Qheap): New symbol.
2422 (syms_of_alloc): DEFSYM it.
2423 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
2424 (Fmemory_free): Remove.
2425 (syms_of_alloc): Don't defsubr it.
2426 * buffer.c (Fcompact_buffer): Remove.
2427 (syms_of_buffer): Don't defsubr it.
2428
dac616ff
DA
24292012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2430
2431 Make maybe_gc inline.
2432 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
2433 * lisp.h (consing_since_gc, gc_relative_threshold)
2434 (memory_full_cons_threshold): Revert declaration.
2435 (maybe_gc): Remove prototype, define as inline.
2436 * alloc.c: Remove old commented-out code.
2437 (consing_since_gc, gc_relative_threshold)
2438 (memory_full_cons_threshold): Revert to global.
2439 (maybe_gc): Remove.
2440
d7ea76b4
DA
24412012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2442
2443 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
2444 * lisp.h (build_unibyte_string): New function.
2445 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
2446 * sysdep.c, w32fns.c, xfns.c: Use it.
2447 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
2448 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
2449 Adjust users accordingly.
2450 * font.h (font_open_by_name): Adjust prototype.
2451
765e61e3
DA
24522012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2453
2454 Cleanup calls to Fgarbage_collect.
2455 * lisp.h (maybe_gc): New prototype.
2456 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2457 Remove declarations.
2458 * alloc.c (maybe_gc): New function.
2459 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2460 Make them static.
2461 * bytecode.c (MAYBE_GC): Use maybe_gc.
2462 * eval.c (eval_sub, Ffuncall): Likewise.
2463 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
2464 to avoid dependency from auto-save feature.
2465
52b852c7
PE
24662012-07-19 Paul Eggert <eggert@cs.ucla.edu>
2467
2468 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
2469 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
2470 'for_each_per_buffer_object_at'.
2471 All uses changed. It's better to use upper-case for macros that
2472 cannot be implemented as functions, to give the reader a clue
2473 that they're special.
2474
5db81e33
SM
24752012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
2476
2477 * alloc.c (Fgarbage_collect): Tweak docstring.
2478
5b835e1d
DA
24792012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2480
2481 Tweak the value returned from Fgarbage_collect again.
2482 * alloc.c (Fgarbage_collect): New return value, as confirmed in
2483 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
2484 Adjust documentation.
2485 (total_vector_bytes): Rename to total_vector_slots, adjust
2486 accounting.
2487 (total_free_vector_bytes): Rename to total_free_vector_slots,
2488 adjust accounting.
2489 (Qstring_bytes, Qvector_slots): New symbols.
2490 (syms_of_alloc): DEFSYM them.
2491
9cd47b72
DA
24922012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2493
2494 Buffer compaction primitive which may be used from Lisp.
2495 * buffer.c (compact_buffer, Fcompact_buffer): New function.
2496 (syms_of_buffer): Register Fcompact_buffer.
2497 * alloc.c (Fgarbage_collect): Use compact_buffer.
2498 * buffer.h (compact_buffer): New prototype.
2499 (struct buffer_text): New member.
2500
d17337e5
DA
25012012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2502
2503 New macro to iterate over all buffers, miscellaneous cleanups.
2504 * lisp.h (all_buffers): Remove declaration.
2505 * buffer.h (all_buffers): Add declaration, with comment.
2506 (for_each_buffer): New macro.
2507 * alloc.c (Fgarbage_collect, mark_object): Use it.
2508 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
2509 (init_buffer): Likewise.
2510 * data.c (Fset_default): Likewise.
2511 * coding.c (code_conversion_restore): Remove redundant check
2512 for dead buffer.
2513 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
2514
60cfd278
AS
25152012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2516
2517 Fix bug that created negative-length intervals.
2518 * intervals.c (merge_interval_right, merge_interval_left):
2519 Do not zero out this interval if it is absorbed by its children,
2520 as this interval's total length doesn't change in that case. See
2521 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
2522
d06714cb
PE
25232012-07-18 Paul Eggert <eggert@cs.ucla.edu>
2524
83713154
PE
2525 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
2526 when invoking (make-bool-vector N t) and N is a positive
2527 multiple of 8 -- the last 8 bits were mistakenly cleared.
2528
d06714cb
PE
2529 Remove some struct layout assumptions in bool vectors.
2530 * alloc.c (bool_header_size): New constant.
2531 (header_size, word_size): Move earlier, as they're now used earlier.
2532 Use 'word_size' in a few more places, where it's appropriate.
2533 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
2534 padding before the data member of a bool vector.
2535 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
2536 than doing the check by hand with an abort ().
2537
464d5a5e
SM
25382012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
2539
5fbc0409
SM
2540 * eval.c (Fdefvar): Don't check constants since we only set the var if
2541 it's not yet defined anyway (bug#11904).
2542
464d5a5e
SM
2543 * lisp.h (last_undo_boundary): Declare new var.
2544 * keyboard.c (command_loop_1): Set it.
2545 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
2546 were auto-added by the command loop (bug#11774).
2547
8dc2e44a
AS
25482012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2549
2550 * w32font.c (Qsymbol): Remove local definition.
2551 (syms_of_w32font): Don't DEFSYM it.
2552
169925ec
DA
25532012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2554
2555 Fix sweep_vectors to handle large bool vectors correctly.
2556 * alloc.c (sweep_vectors): Account total_vector_bytes for
2557 bool vectors larger than VBLOCK_BYTES_MAX.
2558
5fbfb018
CY
25592012-07-18 Chong Yidong <cyd@gnu.org>
2560
2561 * frame.c (x_set_frame_parameters): Revert bogus change introduced
2562 in 2012-05-25 commit by Paul Eggert (Bug#11738).
2563
3ab6e069
DA
25642012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2565
2566 Return more descriptive data from Fgarbage_collect.
2567 Suggested by Stefan Monnier in
2568 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
2569 * alloc.c (bounded_number): New function.
2570 (total_buffers, total_vectors): New variable.
2571 (total_string_size): Rename to total_string_bytes, adjust users.
2572 (total_vector_size): Rename to total_vector_bytes, adjust users.
2573 (sweep_vectors): Account total_vectors and total_vector_bytes.
2574 (Fgarbage_collect): New return value. Adjust documentation.
2575 (gc_sweep): Account total_buffers.
2576 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
2577 (VECTOR_SIZE): Remove.
2578 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
2579 (Qinterval, Qmisc): New symbols.
2580 (syms_of_data): Initialize them.
2581 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
2582 (Qcons, Qbuffer): New declarations.
2583
6d02fe5b
PE
25842012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2585
2586 * alloc.c (Fmemory_free): Account for memory-free's own storage.
2587 Round up, not down. Improve doc.
2588
b7ffe040
DA
25892012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2590
2591 Restore old code in allocate_string_data to avoid Faset breakage.
2592 Reported by Julien Danjou <julien@danjou.info> in
2593 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
2594 * alloc.c (allocate_string_data): Restore old code with minor
2595 adjustments, fix comment to explain this subtle issue.
2596
4dc7c8d5
SM
25972012-07-17 Eli Zaretskii <eliz@gnu.org>
2598
2599 Remove FILE_SYSTEM_CASE.
2600 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
2601
2602 * fileio.c (FILE_SYSTEM_CASE): Don't define.
2603 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
2604 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
2605 call-process-region passes it through expand-file-name.
2606
2607 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
2608
26092012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2610
2611 Fix crash when creating indirect buffer (Bug#11917)
2612 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
2613 Don't handle unbound variables specially if non-zero.
2614 (Fbuffer_local_variables): Pass zero.
2615 (clone_per_buffer_values): Pass non-zero.
2616
26172012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2618
2619 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
2620 to make the loop interruptible.
2621
26222012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2623
2624 * gnutls.c (emacs_gnutls_handshake): Only retry if
2625 GNUTLS_E_INTERRUPTED.
2626
cce7fefc
DA
26272012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2628
2629 Cleanup and convert miscellaneous checks to eassert.
2630 * alloc.c (mark_interval): Fix comment, partially rephrase
2631 old comment from intervals.h (see below).
2632 * intervals.c (find_interval, adjust_intervals_for_insertion)
2633 (delete_interval, adjust_intervals_for_deletion)
2634 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
2635 Convert to eassert.
2636 (adjust_intervals_for_insertion, make_new_interval):
2637 Remove obsolete and unused code.
2638 * intervals.h (struct interval): Remove obsolete comment.
2639 * textprotp.c (erase_properties): Remove unused code.
2640 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
2641 (Fremove_list_of_text_properties): Convert to eassert.
2642
9ea10cc3
CY
26432012-07-17 Chong Yidong <cyd@gnu.org>
2644
2645 * editfns.c (Finsert_char): Doc fix.
2646
3900d5de
DA
26472012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2648
2649 Fix previous change to make Fmemory_free always accurate.
2650 * alloc.c (make_interval): Update total_free_intervals.
2651 (make_float): Likewise for total_free_floats.
2652 (free_cons, Fcons): Likewise for total_free_conses.
2653 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
2654 Likewise for total_free_vector_bytes.
2655 (Fmake_symbol): Likewise for total_free_symbols.
2656 (bytes_free): Remove.
2657
7098646f
DA
26582012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2659
2660 Simple free memory accounting feature.
2661 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
2662 (sweep_vectors): Accumulate size of free vectors.
2663 (Fgarbage_collect): Setup bytes_free.
2664 (Fmemory_free): New function.
2665 (syms_of_alloc): Register it.
2666
22657b40
DA
26672012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2668
2669 Cleanup overlays checking.
2670 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
2671 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
2672 eassert and OVERLAYP.
2673 (sort_overlays): Change to use OVERLAYP.
2674
ddfc8813
RK
26752012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
2676
2677 * editfns.c (Finsert_char): Make it interactive, and make the
2678 second arg optional. Copy interactive spec and docstring from
2679 ucs-insert.
2680
7c26cf3c
PE
26812012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2682
2683 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
2684 Unlike the other wrapped functions, fabs has an unspecified
2685 effect on errno.
2686
5d127af9
JD
26872012-07-16 Jan Djärv <jan.h.d@swipnet.se>
2688
2689 * nsterm.m (keyDown): Interpret flags without left/right bits
2690 as the left key (Bug#11670).
2691
6a0dd1d7
DA
26922012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2693
2694 Remove empty and useless init functions.
2695 * lisp.h (init_character_once, init_fns, init_image)
2696 (init_filelock, init_sound): Remove prototype.
2697 * character.c (init_character_once): Remove.
2698 * filelock.c (init_filelock): Likewise.
2699 * fns.c (init_fns): Likewise.
2700 * image.c (init_image): Likewise.
2701 * sound.c (init_sound): Likewise.
2702 * emacs.c (main): Adjust accordingly.
2703
7a6136fd
DA
27042012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2705
2706 * gtkutil.h: Tiny cleanups.
2707 (use_old_gtk_file_dialog): Remove useless declaration.
2708 (xg_uses_old_file_dialog): Add suggested const attribute.
2709
ce811ad9
EZ
27102012-07-15 Eli Zaretskii <eliz@gnu.org>
2711
2712 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
2713 (bidi_paragraph_init): Use it to limit search forward for a strong
2714 directional character in abnormally large paragraphs full of
2715 neutral or weak characters. (Bug#11943)
2716
c9adfeaa
SF
27172012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
2718
2719 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
2720 the toolbar (Bug#9451).
2721 (xg_make_tool_item): Give the widget event box a transparent
2722 background.
2723
fff62aa9
DA
27242012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2725
2726 Cleanup basic allocation variables and functions.
2727 * alloc.c (ignore_warnings, init_intervals, init_float)
2728 (init_cons, init_symbol, init_marker): Remove.
2729 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
2730 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
2731 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
2732 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
2733 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
2734 (staticidx, init_alloc_once, init_strings, free_ablock):
2735 Remove redundant initialization.
2736 * fns.c (init_weak_hash_tables): Remove.
2737 * lisp.h (init_weak_hash_tables): Remove prototype.
2738
9730daca
DA
27392012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2740
2741 Use zero_vector where appropriate.
2742 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
2743 accordingly.
2744 * lisp.h (zero_vector): New declaration.
2745 * font.c (null_vector): Remove.
2746 (syms_of_font): Remove initialization and staticpro.
2747 (font_list_entities, font_find_for_lface): Change to use zero_vector.
2748 * keymap.c (Faccessible_keymaps): Likewise.
2749
2e2d2a13
LL
27502012-07-15 Leo Liu <sdl.web@gmail.com>
2751
2752 * fringe.c: Fix typo in comments.
2753
cd276f6e
LL
27542012-07-14 Leo Liu <sdl.web@gmail.com>
2755
2756 * fringe.c: Add a new bitmap exclamation-mark.
2757
5a1131d9
EZ
27582012-07-14 Eli Zaretskii <eliz@gnu.org>
2759
2760 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
2761
2762 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
2763 (HAVE_MENUS): Don't define, defined by editing config.in with
2764 msdos/sed2v2.inp.
2765 (GMALLOC_INHIBIT_VALLOC): Don't define.
2766 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
2767
22e983b7
JB
27682012-07-14 Juanma Barranquero <lekktu@gmail.com>
2769
2770 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
2771
5b3f250f
GM
27722012-07-14 Glenn Morris <rgm@gnu.org>
2773
2774 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
2775 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
2776 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
2777
33d63ff4
GM
27782012-07-13 Glenn Morris <rgm@gnu.org>
2779
5b633342
GM
2780 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
2781
33d63ff4
GM
2782 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
2783 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
2784
b55b9f85
JD
27852012-07-13 Jan Djärv <jan.h.d@swipnet.se>
2786
0dc8cf50
JD
2787 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
2788 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
2789 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
2790 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
2791 where appropriate.
2792 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
2793 as boolean expression.
2794 (x_set_window_size): Remove unused variable toolbar.
2795 (ns_get_color_default, ns_mod_to_lisp): Remove.
2796 (ns_mouse_position): Remove unused variables xchar and ychar.
2797 (ns_compute_glyph_string_overhangs): Remove unused variable face.
2798 (ns_set_vertical_scroll_bar): Remove unused variable count.
2799 (ns_delete_terminal): Remove unused variable i.
2800 (ns_term_init): Remove unused variables r, g and b.
2801 (mouseDown): Remove unused variable window.
2802 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
2803 (initFrameFromEmacs): Remove unused variable vbextra.
2804 (mouseEntered): Remove unused variables p and dpyinfo.
2805 (mouseExited): Remove unused variables p and r.
2806 (ns_define_frame_cursor, ns_clear_frame_area)
2807 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
2808 (menuDown): Assign [sender tag] to variable and cast the variable.
2809
2810 * nsterm.h (menuDown): Add id as type to argument sender.
2811 (ns_display_info_for_name): Add Lisp_Object argument.
2812 (ns_term_init): Add Lisp_Object argument.
2813 (ns_map_event_to_object): Add void argument.
2814 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
2815 prototype with arguments and only declare if __OBJC__.
2816 (nxatoms_of_nsselect): Add void argument.
2817 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
2818 (ns_alloc_autorelease_pool): Add void argument.
2819 (ns_release_autorelease_pool): Add void* argument.
2820 (ns_get_defaults_value): Add const char* argument.
2821
2822 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
2823 (initFromContents): Use SSDATA where appropriate.
2824 (ns_update_menubar): Add braces to ambigous if-else.
2825 (initWithTitle): Put () around assignment in if statement.
2826 (ns_menu_show): Remove unused variables window and keymap.
2827 (update_frame_tool_bar): Remove unused variable selected_p.
2828 (initWithContentRect): Remove unused variable this_cmd_name.
2829
2830 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
2831 appropriate.
2832 (setXBMColor): Remove unused variable len.
2833 (setPixmapData): Put () around assignment in loop statement.
2834
2835 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
2836 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
2837 where appropriate.
2838 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
2839 around assignment in loop statement.
2840 (nsfont_open): Remove unused variable i.
2841 (nsfont_open): Remove unused variable len.
2842 (nsfont_draw): Remove unused variable cs.
2843
2844 * nsfns.m (x_set_icon_name, ns_set_name_internal)
2845 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
2846 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
2847 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
2848 (Fns_font_name, Fns_perform_service)
2849 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
2850 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
2851 (ns_set_name): Remove unused variable view.
2852 (x_set_menu_bar_lines): Remove unused variable olines.
2853 (x_set_tool_bar_lines): Remove unused variable root_window.
2854 (Fns_list_colors): Put () around assignment in while statement.
2855 (Fns_perform_service): Remove unused variable len.
2856 (Fns_display_usable_bounds): Remove unused variable top.
2857 (syms_of_nsfns): Remove unused variable i.
2858
b55b9f85
JD
2859 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
2860 memcpy (Bug#11907).
2861
ed9265fc 28622012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
2863
2864 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
2865 and free it with DestroyExceptionInfo (Bug#11558).
2866
ef099b57
JB
28672012-07-13 Juanma Barranquero <lekktu@gmail.com>
2868
2869 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
2870 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
2871 Set here, not in nt/config.nt.
2872
ea814a5d
EZ
28732012-07-13 Eli Zaretskii <eliz@gnu.org>
2874
2875 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
2876 cursor overflow into the last glyph on display line when the right
2877 fringe is off. (Bug#11832)
2878
1a952767
PE
28792012-07-13 Paul Eggert <eggert@cs.ucla.edu>
2880
2881 * xdisp.c (produce_special_glyphs): Now static.
2882 * dispextern.h (produce_special_glyphs): Remove decl.
2883
983188fd
GM
28842012-07-13 Glenn Morris <rgm@gnu.org>
2885
8d7c7eed 2886 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
2887 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
2888
983188fd
GM
2889 * s/usg5-4-common.h (USG, USG5):
2890 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
2891 * s/sol2-6.h (SOLARIS2):
2892 * s/irix6-5.h (IRIX6_5):
2893 * s/hpux10-20.h (USG, USG5, HPUX):
2894 * s/gnu-linux.h (USG, GNU_LINUX):
2895 * s/freebsd.h (BSD_SYSTEM):
2896 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
2897 * s/cygwin.h (CYGWIN):
2898 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
2899 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
2900
d1e68667 29012012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
2902
2903 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 2904
6de0e799
GM
29052012-07-13 Glenn Morris <rgm@gnu.org>
2906
739ae010
GM
2907 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
2908
dbee5793
GM
2909 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
2910
6de0e799
GM
2911 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
2912 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
2913
b82da769
GM
29142012-07-12 Glenn Morris <rgm@gnu.org>
2915
4fae5a7a 2916 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
2917
2918 * process.c (init_process_emacs): Rename from init_process.
2919 The old name is also the name of a Mach system call.
2920 * lisp.h, emacs.c: Update for this name change.
2921 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
2922 longer needed.
2923
5a979817
EZ
29242012-07-12 Eli Zaretskii <eliz@gnu.org>
2925
2926 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
2927 memmove call that removes glyphs covered by the left truncation
2928 glyph. Improve commentary.
2929 (display_line): Fix display of continuation glyphs on GUI frames
2930 when the right fringe is turned off and variable-size fonts are
2931 used in the window. Move the code that appends a stretch glyph to
2932 produce_special_glyphs, so that it could be used for truncation
2933 and continuation glyphs alike.
2934 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
2935 glyph of a suitably computed width, to align the special glyphs at
2936 the window margin. Code moved from display_line. (Bug#11832)
2937
3e91a053
GM
29382012-07-12 Glenn Morris <rgm@gnu.org>
2939
ba9e4b84
GM
2940 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
2941
2942 * s/gnu-linux.h, s/hpux10-20.h:
2943 Do not unconditionally define HAVE_XRMSETDATABASE.
2944
3e91a053
GM
2945 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
2946
b300b1f4
PE
29472012-07-12 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 Fix typos that broke OS X build.
2950 Reported by Randal L. Schwartz in
2951 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
2952 * nsterm.m (ns_timeout): Add missing local decl.
2953 (ns_get_color): snprintf -> sprintf, to fix typo.
2954
6e777848
GM
29552012-07-12 Glenn Morris <rgm@gnu.org>
2956
3f922c37
GM
2957 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
2958 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
2959 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
2960 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
2961
0ab7b23a
GM
2962 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
2963 Move PTY_OPEN to configure.
2964
6e777848
GM
2965 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
2966 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
2967 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
2968
4a7edc24
DA
29692012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
2970
2971 Use empty_unibyte_string where applicable.
2972 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
2973 * lread.c (read1): Likewise.
2974 * xsettings.c (syms_of_xsettings): Likewise.
2975
308aab79
GM
29762012-07-12 Glenn Morris <rgm@gnu.org>
2977
42bd1719
GM
2978 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
2979 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
2980 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
2981 * s/hpux10-20.h (RUN_TIME_REMAP):
2982 * s/bsd-common.h (TABDLY): Move to configure.
2983
2984 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
2985
2986 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
2987
ea0bbd17 2988 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 2989 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
2990
2991 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 2992
308aab79
GM
2993 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
2994 * s/template.h: Move NARROWPROTO to configure.
2995
ee1cf5cf
GM
29962012-07-11 Glenn Morris <rgm@gnu.org>
2997
30fe9bf4
GM
2998 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
2999 unused since 2011-01-17 change to systty.h.
3000
ee1cf5cf
GM
3001 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
3002 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3003 Move HAVE_PTYS and HAVE_SOCKETS to configure.
3004
63e47e07
PE
30052012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3006
3007 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
3008
c43fb4c3
GM
30092012-07-11 Glenn Morris <rgm@gnu.org>
3010
3011 * s/darwin.h, s/gnu-linux.h, s/template.h:
3012 Move INTERRUPT_INPUT to configure.
3013
e8df9267
DA
30142012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3015
3016 Minor adjustments to interning code.
3017 * lisp.h (intern, intern_c_string): Redefine as static inline
3018 wrappers for intern_1 and intern_c_string_1, respectively.
3019 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
3020 * lread.c (intern_1, intern_c_string_1, oblookup):
3021 Simplify Vobarray checking.
e8df9267
DA
3022 * font.c (font_intern_prop): Likewise. Adjust comment.
3023 * w32font.c (intern_font_name): Likewise.
3024
34348bd4
AS
30252012-07-11 Andreas Schwab <schwab@linux-m68k.org>
3026
d96a1e0c
AS
3027 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
3028
34348bd4
AS
3029 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
3030 of Fcar/Fcdr if possible.
3031 * font.c (check_otf_features): Likewise.
3032 * fontset.c (Fnew_fontset): Likewise.
3033 * gnutls.c (Fgnutls_boot): Likewise.
3034 * minibuf.c (read_minibuf): Likewise.
3035 * msdos.c (IT_set_frame_parameters): Likewise.
3036 * xmenu.c (Fx_popup_dialog): Likewise.
3037 * w32menu.c (Fx_popup_dialog): Likewise.
3038
c8add24e
GM
30392012-07-11 Glenn Morris <rgm@gnu.org>
3040
4b575b3c
GM
3041 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
3042 since nothing has defined it on these platforms.
3043
09f4e3b0
GM
3044 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
3045 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
3046
172bedef
GM
3047 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
3048 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3049 Move CLASH_DETECTION to configure.
3050
249685df
GM
3051 * s/gnu.h: Remove file, which is now empty.
3052
c8add24e
GM
3053 * s/gnu.h, s/gnu-linux.h:
3054 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
3055
b41253a3
JW
30562012-07-11 John Wiegley <johnw@newartisans.com>
3057
3058 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
3059 function attribute, so we only use it if it exists in the
3060 compiler.
3061
d923b542
DA
30622012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3063
3064 Avoid call to strlen in fast_c_string_match_ignore_case.
3065 * search.c (fast_c_string_match_ignore_case): Change to use
3066 length argument. Adjust users accordingly.
3067 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
3068
5ebbef1d
PE
30692012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3070
bb352260
PE
3071 Assume mkdir, rmdir.
3072 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
3073 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
3074
57054ddd
PE
3075 Assume rename.
3076 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
3077
b747d3f7
PE
3078 Assume perror.
3079 * s/hpux10-20.h (HAVE_PERROR): Remove.
3080 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
3081 Remove dummy definition, as this problem was obsolete long ago.
3082
5ebbef1d
PE
3083 Assume strerror.
3084 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
3085
984e7f30
DA
30862012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3087
3088 Avoid calls to strlen in font processing functions.
3089 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
3090 (font_open_by_name): Change to use length argument.
3091 Adjust users accordingly.
d923b542
DA
3092 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
3093 Adjust prototypes.
3094 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
3095 Change to return ptrdiff_t.
984e7f30
DA
3096 (xfont_list_pattern, xfont_match): Use length returned by
3097 xfont_decode_coding_xlfd.
3098 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
3099
20e94fdd
GM
31002012-07-11 Glenn Morris <rgm@gnu.org>
3101
9d596af3
GM
3102 * s/darwin.h, s/freebsd.h, s/netbsd.h:
3103 Move DONT_REOPEN_PTY to configure.
3104
20e94fdd
GM
3105 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
3106 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
3107
e99a530f
PE
31082012-07-10 Paul Eggert <eggert@cs.ucla.edu>
3109
22ffb973
PE
3110 Remove "#define unix" that is no longer needed (Bug#11905).
3111 * s/aix4-2.h (unix): Remove; no longer needed.
3112
e9a9ae03
PE
3113 EMACS_TIME simplification (Bug#11875).
3114 This replaces macros (which typically do not work in GDB)
3115 with functions, typedefs and enums, making the code easier to debug.
3116 The functional style also makes code easier to read and maintain.
3117 * systime.h: Include <sys/time.h> on all hosts, not just if
3118 WINDOWSNT, since 'struct timeval' is needed in general.
3119 (EMACS_TIME): Now a typedef, not a macro.
3120 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
3121 not macros.
3122 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
3123 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
3124 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
3125 (EMACS_TIME_LE): Now functions, not macros.
3126 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
3127 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
3128 which are not functions. All uses rewritten to use:
3129 (make_emacs_time): New function.
3130 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
3131 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
3132 not functions. All uses rewritten to use the following, respectively:
3133 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
3134 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 3135 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
3136 * fileio.c (Fcopy_file):
3137 * xterm.c (XTflash): Get the current time closer to when it's used.
3138 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
3139
ffacb126
PE
3140 * bytecode.c (targets): Suppress -Woverride-init warnings.
3141
e99a530f
PE
3142 Simplify by avoiding confusing use of strncpy etc.
3143 * doc.c (Fsnarf_documentation):
3144 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
3145 * frame.c (Fmake_terminal_frame):
3146 * gtkutil.c (get_utf8_string):
3147 * lread.c (openp):
3148 * nsmenu.m (ns_update_menubar):
3149 * regex.c (regerror):
3150 Prefer memcpy to strncpy and strncat when either will do.
3151 * fileio.c (Fsubstitute_in_file_name):
3152 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
3153 (menu_separator_name_p):
3154 * nsmenu.m (ns_update_menubar):
3155 Prefer memcmp to strncmp when either will do.
3156 * nsterm.m: Include <ftoastr.h>.
3157 (ns_get_color):
3158 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
3159 Prefer snprintf to strncpy.
3160 * nsterm.m (ns_term_init):
3161 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
3162 * nsterm.m (ns_term_init):
3163 Avoid the need for strncpy, by using build_string or
3164 make_unibyte_string directly. Use dtoastr, not snprintf.
3165 * process.c (Fmake_network_process): Diagnose service names that
3166 are too long, rather than silently truncating them or creating
3167 non-null-terminated names.
3168 (Fnetwork_interface_info): Likewise, for interface names.
3169 * sysdep.c (system_process_attributes) [GNU_LINUX]:
3170 Prefer sprintf to strncat.
3171 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
3172 Prefer vsnprintf to vsprintf + strncpy.
3173
c59592b3
GM
31742012-07-10 Glenn Morris <rgm@gnu.org>
3175
3176 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
3177 Clarify fallback case.
3178
7d7bbefd
DA
31792012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3180
3181 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
3182 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
3183 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 3184 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
3185 where argument type is known to be a Lisp_Cons.
3186
3a4c8000
TT
31872012-07-10 Tom Tromey <tromey@redhat.com>
3188
3189 * bytecode.c (BYTE_CODE_THREADED): New macro.
3190 (BYTE_CODES): New macro. Replaces all old byte-code defines.
3191 (enum byte_code_op): New type.
3192 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
3193 (exec_byte_code): Use them. Use token threading when applicable.
3194
2a0213a6
DA
31952012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3196
3197 Optimize pure C strings initialization.
3198 * lisp.h (make_pure_string): Fix prototype.
3199 (build_pure_c_string): New function, defined as static inline. This
3200 provides a better opportunity to optimize away calls to strlen when
3201 the function is called with compile-time constant argument.
3202 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
3203 argument, adjust users accordingly. Use build_pure_c_string where
3204 appropriate.
3205 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
3206 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
3207 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
3208
cb1caeaf
DA
32092012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3210
3211 Avoid calls to strlen in miscellaneous functions.
3212 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
3213 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
3214 * lread.c (openp): Likewise.
3215
c293e30c
DA
32162012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3217
3218 Avoid calls to strlen in path processing functions.
3219 * fileio.c (file_name_as_directory): Add comment. Change to add
3220 srclen argument and return the length of result. Adjust users
3221 accordingly.
3222 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
3223 swap 1st and 2nd arguments to obey the common convention.
3224 Adjust users accordingly.
c293e30c
DA
3225 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
3226
9e059e3f
GM
32272012-07-10 Glenn Morris <rgm@gnu.org>
3228
d02eb359
GM
3229 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
3230 Move PENDING_OUTPUT_COUNT definition to configure.
3231
882cf227
GM
3232 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
3233 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
3234 * s/gnu.h (DATA_START): Move definitions to configure.
3235
af6e839f
GM
3236 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
3237 We include usg5-4-common.h, which defines them both.
3238
40289a12
GM
3239 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
3240 O_RDONLY already includes it).
3241
9e059e3f
GM
3242 Stop ns builds setting the EMACSLOADPATH environment variable.
3243 * nsterm.m (ns_load_path): Rename from ns_init_paths.
3244 Now it does not set EMACSLOADPATH, just returns the load-path string.
3245 * nsterm.h: Update accordingly.
3246 * lread.c [HAVE_NS]: Include nsterm.h.
3247 (init_lread) [HAVE_NS]: Use ns_load_path.
3248 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
3249
7c4e8ec0
GM
32502012-07-09 Glenn Morris <rgm@gnu.org>
3251
d4f600ff
GM
3252 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
3253 since the included bsd-common.h does so.
3254
cbb31951
GM
3255 Stop ns builds setting the EMACSPATH environment variable.
3256 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
3257 (ns_init_paths): Do not set EMACSPATH.
3258 * nsterm.h (ns_exec_path): Add it.
3259 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
3260 Use ns_exec_path.
3261
7c4e8ec0
GM
3262 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
3263
26bccfae
PE
32642012-07-09 Paul Eggert <eggert@cs.ucla.edu>
3265
a0bee46f
PE
3266 * process.c (wait_reading_process_output): 'waitchannels' was unset
3267 when read_kbd || !NILP (wait_for_cell); fix this.
3268
5994c183
PE
3269 Add GCC-style 'const' attribute to functions that can use it.
3270 * character.h (char_resolve_modifier_mask):
3271 * keyboard.h (make_ctrl_char):
3272 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
3273 (init_character_once, next_almost_prime, init_fns, init_image)
3274 (flush_pending_output, init_sound):
3275 * mem-limits.h (start_of_data):
3276 * menu.h (finish_menu_items):
3277 Add ATTRIBUTE_CONST.
3278 * emacs.c (DEFINE_DUMMY_FUNCTION):
3279 Declare the dummy function with ATTRIBUTE_CONST.
3280 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
3281 Add decls with ATTRIBUTE_CONST.
3282
26bccfae
PE
3283 Minor improvements to make_formatted_string.
3284 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
3285 where int is good enough, as vsprintf returns an int.
3286 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
3287
a8290ec3
DA
32882012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3289
3290 Use make_formatted_string to avoid double length calculation.
3291 * lisp.h (make_formatted_string): New prototype.
3292 * alloc.c (make_formatted_string): New function.
3293 * buffer.c (Fgenerate_new_buffer_name): Use it.
3294 * dbus.c (syms_of_dbusbind): Likewise.
3295 * editfns.c (Fcurrent_time_zone): Likewise.
3296 * filelock.c (get_boot_time): Likewise.
3297 * frame.c (make_terminal_frame, set_term_frame_name)
3298 (x_report_frame_params): Likewise.
3299 * image.c (gs_load): Likewise.
3300 * minibuf.c (get_minibuffer): Likewise.
3301 * msdos.c (dos_set_window_size): Likewise.
3302 * process.c (make_process): Likewise.
3303 * xdisp.c (ensure_echo_area_buffers): Likewise.
3304 * xsettings.c (apply_xft_settings): Likewise.
3305
d01ba2f1
GM
33062012-07-09 Glenn Morris <rgm@gnu.org>
3307
3308 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
3309 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
3310 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
3311 * nsterm.h (ns_etc_directory): Add it.
3312 * callproc.c [HAVE_NS]: Include nsterm.h.
3313 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
3314
f1f924b6
DA
33152012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3316
3317 Move marker debugging code under MARKER_DEBUG.
3318 * marker.c (MARKER_DEBUG): Move marker debugging code under
3319 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
3320 for bootstrap with --enable-checking (~3x slowdown reported
3321 by Juanma Barranquero <lekktu@gmail.com>).
3322 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
3323
ab531b66
PE
33242012-07-08 Paul Eggert <eggert@cs.ucla.edu>
3325
3326 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
3327 See <http://bugs.gnu.org/11825#29>.
3328
c4b3bc8a
EZ
33292012-07-08 Eli Zaretskii <eliz@gnu.org>
3330
3331 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
3332 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
3333 (display_line): Add commentary about displaying truncation glyphs
3334 on GUI frames.
3335 (produce_special_glyphs): Move here from term.c.
3336
3337 * term.c (produce_special_glyphs): Move to xdisp.c.
3338
3339 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
3340 section.
c4b3bc8a 3341
b676b881
AS
33422012-07-07 Andreas Schwab <schwab@linux-m68k.org>
3343
f17c5273
AS
3344 * xdisp.c (display_line): Avoid warning about implicit declaration
3345 of FRAME_FONT.
3346
298819b9
AS
3347 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
3348
b676b881
AS
3349 * lisp.h: Remove empty conditional.
3350
6045c4fd
PE
33512012-07-07 Paul Eggert <eggert@cs.ucla.edu>
3352
b3350bf9
PE
3353 * lread.c (load_path_check): Now static.
3354
6045c4fd
PE
3355 Fix some minor --with-ns problems found by static checking.
3356 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
3357 (x_set_font) [!HAVE_X_WINDOWS]:
3358 * image.c (xpm_load_image) [HAVE_NS]:
3359 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
3360 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
3361 Remove unused local.
3362 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
3363 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
3364 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
3365 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
3366 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
3367 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
3368 Fix pointer signedness problem.
3369 * xfaces.c (FRAME_X_FONT_TABLE):
3370 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
3371
929e7845
GM
33722012-07-07 Glenn Morris <rgm@gnu.org>
3373
3374 * lread.c (load_path_check): New function, split from init_lread.
3375 (init_lread): Reorganize. Motivation:
3376 If EMACSLOADPATH is set, check/warn about that rather than the
3377 defaults, which we are not going to use. Hence we can remove
3378 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
3379 Don't warn if site-lisp directories are missing.
3380 If not installed, start from a blank load-path, since
3381 PATH_LOADSEARCH refers to the eventual installation directories.
3382
58dd0aa4
EZ
33832012-07-07 Eli Zaretskii <eliz@gnu.org>
3384
3385 Support truncation and continuation glyphs on GUI frames, when
3386 fringes are disabled. (Bug#11832)
3387 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
3388 continuation glyphs even if on GUI frames.
3389 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
3390 or both, are absent.
3391 (start_display, move_it_in_display_line_to): Handle the case of a
3392 GUI frame without a fringe to display continuation or truncation
3393 glyphs.
3394 (insert_left_trunc_glyphs): Support GUI frames: make sure
3395 truncation glyphs overwrite enough glyphs from the current line to
3396 have sufficient space in pixels.
3397 (display_line): Support truncation and continuation glyphs on GUI
3398 frames. If some spare pixels are left on the line after inserting
3399 the truncation glyphs, fill that space with a stretch glyph of a
3400 suitably computed width.
3401
3402 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
3403 produce_glyphs, to support GUI sessions.
3404
31571fd7
PE
34052012-07-07 Paul Eggert <eggert@cs.ucla.edu>
3406
5a16b9bc
PE
3407 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
3408
f3047c75
PE
3409 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
3410
31571fd7
PE
3411 Do not require float-time's arg to fit in time_t (Bug#11825).
3412 This works better on hosts where time_t is unsigned, and where
3413 float-time is applied to the (negative) difference between two times.
3414 * editfns.c (decode_time_components): Last arg is now double *,
3415 not int *, and means to store all the result as a double, without
3416 worrying about whether the seconds part fits in time_t.
3417 All callers changed.
3418 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
3419 All callers changed.
3420 (Ffloat_time): Do not fail merely because the specified time falls
3421 outside of time_t range.
3422
4516fbef
GM
34232012-07-07 Glenn Morris <rgm@gnu.org>
3424
3425 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
3426 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
3427 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
3428
07adc2c6
JB
34292012-07-07 Juanma Barranquero <lekktu@gmail.com>
3430
3431 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
3432 Update dependencies.
3433
3434 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
3435
fd573f31
PE
34362012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3437
fee5959d
PE
3438 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
3439 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
3440 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
3441 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
3442 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
3443 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
3444
fd573f31
PE
3445 * xfont.c (compare_font_names): Redo to omit the need for casts.
3446
ddadbc0e
AS
34472012-07-06 Andreas Schwab <schwab@linux-m68k.org>
3448
fca8d6b6
AS
3449 * xfns.c (Fx_change_window_property): Doc fix.
3450 * w32fns.c (Fx_change_window_property): Doc fix.
3451
ddadbc0e
AS
3452 * w32fns.c (Fx_window_property): Accept the same arguments as the
3453 X Windows version. Doc fix.
3454 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
3455
ed9265fc 34562012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
3457 Eli Zaretskii <eliz@gnu.org>
3458
3459 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
3460 Windows-specific code from nt/config.nt moved here.
3461 Obsolete settings removed.
3462
216ee680
PE
34632012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3464
3465 * process.c: Avoid unnecessary calls to gettime.
3466 (wait_reading_process_output): Don't get the time of day
3467 when gobbling data immediately and not waiting, as there's no need
3468 for it in that case. This removes a FIXME.
3469
bdd091e4
JD
34702012-07-06 Jan Djärv <jan.h.d@swipnet.se>
3471
3472 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
3473 is defined (Bug#11768).
3474
9d44f8ce
DA
34752012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3476
3477 Fix marker debugging code.
3478 * marker.c (byte_char_debug_check): Do not perform the check
3479 if buffer is not multibyte.
090bd7cb
JB
3480 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3481 Call byte_char_debug_check with correct arguments.
9d44f8ce 3482
90fc4786
DA
34832012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3484
3485 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
3486 * marker.c (byte_char_debug_check, count_markers):
3487 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
3488 (byte_debug_flag): Remove.
3489 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3490 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
3491
7b7ae965
DA
34922012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3493
4e57b342
DA
3494 Avoid code repetition in marker-related functions.
3495 * marker.c (attach_marker): New function.
3496 (Fset_marker, set_marker_restricted, set_marker_both)
3497 (set_marker_restricted_both): Use it.
3498 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
3499 Consistently rename charno to charpos.
3500 (marker_position): Add eassert.
3501 (marker_byte_position): Convert to eassert.
3502
35032012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3504
3505 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 3506 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 3507 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 3508
657924ff
DA
35092012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3510
3511 Introduce fast path for the widely used marker operation.
3512 * alloc.c (build_marker): New function.
3513 * lisp.h (build_marker): New prototype.
3514 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
3515 * composite.c (autocmp_chars): Likewise.
3516 * editfns.c (buildmark): Remove.
3517 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
3518 (save_restriction_save): Use build_marker.
3519 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
3520 * window.c (save_window_save): Likewise.
3521
041a49a6
DA
35222012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3523
3524 Do not use Fdelete_overlay in delete_all_overlays
3525 to avoid redundant calls to unchain_overlay.
3526 * buffer.c (drop_overlay): New function.
3527 (delete_all_overlays, Fdelete_overlay): Use it.
3528 * minibuf.c (get_minibuffer): Fix comment.
3529
7dca65a4
PE
35302012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3531
3532 Port to OpenBSD 5.1 amd64.
3533 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
3534 This is needed for OpenBSD, and should be harmless on all BSD systems.
3535 Also, include <sys/sysctl.h>, as it should be available on all
3536 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
3537 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
3538 use p_pid member, not kp_proc.pid.
3539
8eb876e2
GM
35402012-07-06 Glenn Morris <rgm@gnu.org>
3541
3542 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
3543
38182d90
PE
35442012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3545
3546 More xmalloc and related cleanup.
3547 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
3548 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
3549 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
3550 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
3551 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
3552 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
3553 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
3554 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
3555 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
3556 * xterm.c:
3557 Omit needless casts involving void * pointers and allocation.
3558 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
3559 as the former is more robust if P's type is changed.
3560 Prefer xzalloc to xmalloc + memset 0.
3561 Simplify malloc-or-realloc to realloc.
3562 Don't worry about xmalloc returning a null pointer.
3563 Prefer xstrdup to xmalloc + strcpy.
3564 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
3565 growing it.
3566 * keyboard.c (apply_modifiers_uncached): Prefer local array to
3567 alloca of a constant.
3568
6dd5a677
EZ
35692012-07-05 Eli Zaretskii <eliz@gnu.org>
3570
3571 * xdisp.c (display_line): Fix horizontal pixel coordinates when
3572 hscroll is larger than the line width. Fixes long and futile
3573 looping inside extend_face_to_end_of_line (on a TTY) producing
3574 glyphs that are not needed and thrown away.
3575
6b312f0f
DA
35762012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3577
3578 * marker.c (set_marker_restricted_both): Simplify by using
3579 clip_to_bounds.
3580
f520ef9b
PE
35812012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3582
3583 * editfns.c (region_limit): Simplify by using clip_to_bounds.
3584
383b7c95
JD
35852012-07-05 Jan Djärv <jan.h.d@swipnet.se>
3586
3587 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
3588 not defined (Bug#11768).
3589 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
3590 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
3591 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
3592 followed by gtk_box_set_homogeneous (Bug#11768).
3593 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
3594 (update_theme_scrollbar_width, xg_create_scroll_bar):
3595 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
3596 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
3597 (is_box_type): New function (Bug#11768).
3598 (xg_tool_item_stale_p): Call is_box_type.
5293d758 3599 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
3600 with default display (Bug#11768).
3601
d6e7bf45
EZ
36022012-07-05 Eli Zaretskii <eliz@gnu.org>
3603
3604 * xdisp.c (window_hscroll_limited): New function.
3605 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
3606 coordinates when window's hscroll is set to insanely large
3607 values. (Bug#11857)
3608
431391ec
JB
36092012-07-05 Juanma Barranquero <lekktu@gmail.com>
3610
3611 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
3612 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
3613
23f86fce
DA
36142012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3615
3616 Cleanup xmalloc.
3617 * lisp.h (xzalloc): New prototype. Omit needless casts.
3618 * alloc.c (xzalloc): New function. Omit needless casts.
3619 * charset.c: Omit needless casts. Convert all calls to
3620 xmalloc with following memset to xzalloc.
3621 * dispnew.c: Likewise.
3622 * fringe.c: Likewise.
3623 * image.c: Likewise.
3624 * sound.c: Likewise.
3625 * term.c: Likewise.
3626 * w32fns.c: Likewise.
3627 * w32font.c: Likewise.
3628 * w32term.c: Likewise.
3629 * xfaces.c: Likewise.
3630 * xfns.c: Likewise.
3631 * xterm.c: Likewise.
3632 * atimer.c: Omit needless casts.
3633 * buffer.c: Likewise.
3634 * callproc.c: Likewise.
3635 * ccl.c: Likewise.
3636 * coding.c: Likewise.
3637 * composite.c: Likewise.
3638 * doc.c: Likewise.
3639 * doprnt.c: Likewise.
3640 * editfns.c: Likewise.
3641 * emacs.c: Likewise.
3642 * eval.c: Likewise.
3643 * filelock.c: Likewise.
3644 * fns.c: Likewise.
3645 * gtkutil.c: Likewise.
3646 * keyboard.c: Likewise.
3647 * lisp.h: Likewise.
3648 * lread.c: Likewise.
3649 * minibuf.c: Likewise.
3650 * msdos.c: Likewise.
3651 * print.c: Likewise.
3652 * process.c: Likewise.
3653 * region-cache.c: Likewise.
3654 * search.c: Likewise.
3655 * sysdep.c: Likewise.
3656 * termcap.c: Likewise.
3657 * terminal.c: Likewise.
3658 * tparam.c: Likewise.
3659 * w16select.c: Likewise.
3660 * w32.c: Likewise.
3661 * w32reg.c: Likewise.
3662 * w32select.c: Likewise.
3663 * w32uniscribe.c: Likewise.
3664 * widget.c: Likewise.
3665 * xdisp.c: Likewise.
3666 * xmenu.c: Likewise.
3667 * xrdb.c: Likewise.
3668 * xselect.c: Likewise.
3669
0497dc44
PE
36702012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3671
3672 * fileio.c (time_error_value): Check the right error number.
3673 Problem reported by Troels Nielsen in
3674 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
3675
356e7178
PE
36762012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3677
4e71fd89
PE
3678 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
3679 This should be fixed in a better way; see Eli Zaretskii in
3680 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
3681 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
3682
f0941253
PE
3683 * fileio.c (time_error_value): Rename from special_mtime.
3684 The old name's problems were noted by Eli Zaretskii in
3685 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
3686
065c9eb4
PE
3687 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
3688 This variable's comment says Emacs needs at least one GDB-visible
3689 symbol of type enum pvec_type, to work around GDB problems.
3690 The symbol's value doesn't matter.
3691
356e7178
PE
3692 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
3693 that causes compilation to fail on pre-C99 compilers.
3694
ed9265fc 36952012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
3696
3697 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
3698 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
3699
3884d954
DA
37002012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3701
d209e2fb 3702 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
3703 headers for buffer_defaults and buffer_local_symbols.
3704 Reported by Juanma Barranquero <lekktu@gmail.com>.
3705
ee28be33
SM
37062012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
3707
3708 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
3709 * lisp.h (enum pvec_type): Use fewer bits.
3710 (PSEUDOVECTOR_SIZE_BITS): New constant.
3711 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
3712 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
3713 change in pvec_type.
3714 (PSEUDOVECTOR_TYPEP): New macro.
3715 (TYPED_PSEUDOVECTORP): Use it.
3716 * fns.c (internal_equal): Adapt code to extract pvectype.
3717 * emacs.c (gdb_pvec_type): Update type.
3718 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
3719 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
3720 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
3721 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
3722 (sweep_vectors): Use it. Use local var `total_bytes' instead of
3723 abusing vector->header.next.nbytes.
3724 (live_vector_p): Use PVEC_TYPE.
3725 (mark_object): Adapt code to extract pvectype. Use switch.
3726
c7f2cd7f
PE
37272012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3728
3729 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
3730 Tighten new eassert a bit.
3731
8ce70ed2
DA
37322012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3733
3734 Fix compilation with --enable-gcc-warnings and -O1
3735 optimization level.
3736 * doprnt.c (doprnt): Change type of tem to int, initialize
3737 to avoid compiler warning. Add eassert.
3738 * search.c (simple_search): Initialize match_byte to avoid
3739 compiler warning. Add eassert.
3740
dea7f1e5
PE
37412012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3742
24a212eb
PE
3743 Avoid weird behavior with large horizontal scrolls.
3744 Without this change, for example, large hscroll values would
3745 mess up Emacs's display on Fedora 15 x86, presumably due to
3746 overflows in int calculations in the display code.
3747 Also, if buffers had long lines, Emacs would freeze.
3748 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
3749 (set_window_hscroll): New function, containing the old guts of
3750 Fset_window_hscroll. Return the clipped value.
3751 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
3752 This avoids the need to check against PTRDIFF_MAX.
3753
dea7f1e5
PE
3754 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
3755
76046526
DA
37562012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3757
3758 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
3759
39adff0d
PE
37602012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3761
63807d47
PE
3762 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
3763 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
3764 since GCC 4.4.6 issues a bogus warning for them.
3765
39adff0d
PE
3766 Fix bugs in file timestamp newness comparisons.
3767 * fileio.c (Ffile_newer_than_file_p):
3768 * lread.c (Fload): Use full timestamp resolution of files,
3769 not just the 1-second resolution, so that files that are only
3770 slightly newer still count as newer.
3771 * fileio.c (Ffile_newer_than_file_p): Don't assume file
3772 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
3773
dbeed9a6
PE
37742012-07-03 Paul Eggert <eggert@cs.ucla.edu>
3775
3776 * fileio.c: Improve handling of file time marker. (Bug#11852)
3777 (special_mtime): New function.
3778 (Finsert_file_contents, Fverify_visited_file_modtime):
3779 Use it to set special mtime values consistently.
3780
636334d6
AS
37812012-07-03 Andreas Schwab <schwab@linux-m68k.org>
3782
3783 * fileio.c (Finsert_file_contents): Properly handle st_mtime
3784 marker for non-existing file. (Bug#11852)
3785
e2017fe2
GM
37862012-07-03 Glenn Morris <rgm@gnu.org>
3787
3788 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
3789 and did not make it into globals.h).
3790
404dbd37
TT
37912012-07-03 Tom Tromey <tromey@redhat.com>
3792
3793 * window.c (Fset_window_margins, Fset_window_fringes)
3794 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
3795 * textprop.c (Fprevious_property_change): No longer static.
3796 * syntax.c (Fsyntax_table_p): No longer static.
3797 * process.c (Fget_process, Fprocess_datagram_address): No longer
3798 static.
3799 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
3800 * keyboard.c (Fcommand_execute): No longer static.
3801 Remove EXFUN.
3802 * insdel.c (Fcombine_after_change_execute): No longer static.
3803 * image.c (Finit_image_library): No longer static.
3804 * fileio.c (Fmake_symbolic_link): No longer static.
3805 * eval.c (Ffetch_bytecode): No longer static.
3806 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
3807 * doc.c (Fdocumentation_property, Fsnarf_documentation):
3808 No longer static.
404dbd37
TT
3809 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
3810 static.
3811 * dired.c (Ffile_attributes): No longer static.
3812 * composite.c (Fcomposition_get_gstring): No longer static.
3813 * callproc.c (Fgetenv_internal): No longer static.
3814
3815 * ccl.h: Remove EXFUNs.
3816 * buffer.h: Remove EXFUNs.
3817 * dispextern.h: Remove EXFUNs.
3818 * intervals.h: Remove EXFUNs.
3819 * fontset.h: Remove EXFUN.
3820 * font.h: Remove EXFUNs.
3821 * dosfns.c (system_process_attributes): Remove EXFUN.
3822 * keymap.h: Remove EXFUNs.
3823 * lisp.h: Remove EXFUNs.
3824 * w32term.h: Remove EXFUNs.
3825 * window.h: Remove EXFUNs.
3826 * xsettings.h: Remove EXFUN.
3827 * xterm.h: Remove EXFUN.
3828
8e4fd1e1
GM
38292012-07-03 Glenn Morris <rgm@gnu.org>
3830
3831 * lisp.h (Frandom): Make it visible to C.
3832 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
3833 buffer for invisible buffers. (Bug#1229)
3834
ca95b3eb
DA
38352012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3836
3837 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
3838 values which aren't power of 2.
14ae4239
BT
3839 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
3840 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
3841 accordingly.
3842
7555c33f
SM
38432012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
3844
3845 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
3846
3847 * alloc.c (mark_object): Revert part of last patch to use `switch'.
3848
d12e8f5a
DA
38492012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3850
3851 * alloc.c (allocate_vector_block): Remove redundant
3852 calls to mallopt if DOUG_LEA_MALLOC is defined.
3853 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
3854 avoid calls to mallopt if zero_vector is returned.
3855
296094c3
DA
38562012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3857
3858 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
3859 is enabled, avoid dereferencing NULL current_sblock if
3860 running undumped.
3861
36429c89
DA
38622012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3863
3864 Cleanup basic buffer management.
3865 * buffer.h (struct buffer): Change layout to use generic vector
3866 marking code. Fix some comments. Change type of 'clip_changed'
3867 to bitfield. Remove unused #ifndef old.
3868 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
3869 (GET_OVERLAYS_AT): Fix indentation.
3870 (for_each_per_buffer_object_at): New macro.
3871 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
3872 (Fbuffer_local_variables): Use it.
3873 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
3874 * alloc.c (allocate_buffer): Adjust to match new layout of
3875 struct buffer. Fix comment.
3876 (mark_overlay): New function.
3877 (mark_buffer): Use it. Use mark_vectorlike to mark normal
3878 Lisp area of struct buffer.
3879 (mark_object): Use it. Adjust marking of misc objects
3880 and related comments.
3881
3b3e4cac
PE
38822012-07-02 Paul Eggert <eggert@cs.ucla.edu>
3883
3884 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
3885 wrapper that is not needed because the wrapped code is a no-op (zero
3886 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
3887 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
3888
cf5c0175
DA
38892012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
3890
3891 * alloc.c (mark_buffer): Simplify. Remove prototype.
3892 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 3893 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
3894 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
3895 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 3896
ca26824c
GM
38972012-06-30 Glenn Morris <rgm@gnu.org>
3898
2e4c5312
GM
3899 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
3900
ca26824c
GM
3901 * epaths.in (PATH_SITELOADSEARCH): New.
3902 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
3903 This is rather than relying on --enable-locallisppath elements
3904 having "site-lisp" in their names. (Bug#10208#25, 11658)
3905
0d23c240
EZ
39062012-06-30 Eli Zaretskii <eliz@gnu.org>
3907
c9240d7a
EZ
3908 * w32proc.c (sys_select): Accept and ignore one more argument.
3909
3910 * w32.c (emacs_gnutls_pull): Call select with one more argument.
3911
0d23c240 3912 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 3913 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
3914
3915 * sysdep.c: Don't include dos.h and dosfns.h.
3916
3917 * process.c (sys_select):
3918 * msdos.c (sys_select): Accept one more argument and ignore it.
3919
3920 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
3921 adapt data types and code to that.
3922
3923 * dosfns.c:
3924 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
3925 which clashes with the gnulib function of the same name.
3926
af5a5a98
AS
39272012-06-30 Andreas Schwab <schwab@linux-m68k.org>
3928
c5e4379c
AS
3929 * font.c (font_style_to_value, font_style_symbolic)
3930 (font_prop_validate_style): Add type checks for values in
3931 font_style_table.
3932
af5a5a98
AS
3933 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
3934 argument.
3935 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
3936 uses.
3937
8d38f461
EZ
39382012-06-29 Eli Zaretskii <eliz@gnu.org>
3939
2e5a6631
EZ
3940 * xdisp.c (try_window_id): Undo last change.
3941
8d38f461
EZ
3942 * w32.c (getwd): Adjust commentary about startup_dir.
3943 (init_environment): Always call sys_access, even in non-MSVC
3944 builds. Don't chdir to the directory of the Emacs executable.
3945 This undoes code from 1997 which was justified by the need to
3946 "avoid conflicts when removing and renaming directories". But its
3947 downside was that every relative file name was being interpreted
3948 relative to the directory of the Emacs executable, which can never
3949 be TRT. In particular, it broke sys_access when called with
3950 relative file names.
3951 (sys_access): Map GetLastError to errno.
3952
2af3565e
DA
39532012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3954
3955 * window.h (struct window): Change type of 'fringes_outside_margins'
3956 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 3957 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
3958 Adjust comment.
3959 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
3960 to ptrdiff_t.
3961
c8d3a25c 39622012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 3963
c8d3a25c
GM
3964 * gnutls.c (emacs_gnutls_handshake):
3965 Add QUIT to make the loop interruptible.
57570cd3 3966
c8d3a25c 39672012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 3968
c8d3a25c
GM
3969 * charset.c (init_charset): Make lack of etc/charsets fatal.
3970
3e984ee8
DA
39712012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3972
3973 * editfns.c (region_limit): Fix type mismatch.
3974
ef884f23
DA
39752012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3976
3977 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
3978 undefined. Convert from xassert to eassert.
3979 * nsmenu.m: Convert from xassert to eassert.
3980 * nsterm.m: Likewise.
3981
7d7e0027
SM
39822012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
3983
3984 * editfns.c (region_limit): Clip to narrowing (bug#11770).
3985
aa754e6a
PE
39862012-06-28 Paul Eggert <eggert@cs.ucla.edu>
3987
3988 Avoid integer overflow on scroll-left and scroll-right.
3989 * window.c (HSCROLL_MAX): New macro.
3990 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
3991 overflow when requested scroll falls outside ptrdiff_t range.
3992
80b00b08
DA
39932012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3994
3995 * window.h (struct window): Change type of 'hscroll',
3996 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
3997 'last_modified' and 'last_overlay_modified' to EMACS_INT.
3998 Adjust users accordingly.
3999 * xdisp.c (try_cursor_movement): Replace type check with eassert.
4000 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
4001 from EMACS_INT to ptrdiff_t.
4002 (make_window): Omit redundant initialization.
4003
62b2bcf6
JB
40042012-06-28 Juanma Barranquero <lekktu@gmail.com>
4005
4006 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
4007
45942c7d
DA
40082012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4009
4010 * window.h (struct window): Change type of 'use_time' and
4011 'sequence_number' from Lisp_Object to int.
4012 * frame.c (make_frame): Adjust users accordingly.
4013 * print.c (print_object): Likewise.
4014 * window.c (select_window, Fwindow_use_time, make_parent_window)
4015 (make_window): Likewise.
4016
e509cfa6
DA
40172012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4018
4019 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
4020 enabled with --enable-checking=[all,glyphs] configure option.
4021 Fix GLYPH_DEBUG usage assuming that it may be undefined,
4022 adjust comments accordingly.
4023 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
4024 undefined, adjust comments accordingly.
4025 * image.c: Likewise.
4026 * scroll.c: Likewise.
4027 * w32fns.c: Likewise.
4028 * w32term.c: Likewise.
4029 * xdisp.c: Likewise.
4030 * xfaces.c: Likewise.
4031 * xfns.c: Likewise.
4032 * xterm.c: Likewise.
4033
a54e2c05
DA
40342012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4035
4036 Generalize run-time debugging checks.
4037 * dispextern.h (XASSERTS): Remove.
4038 * fontset.c (xassert): Remove.
4039 Convert from xassert to eassert.
4040 * alloc.c: Convert from xassert to eassert.
4041 * bidi.c: Likewise.
4042 * dispnew.c: Likewise.
4043 * fns.c: Likewise.
4044 * fringe.c: Likewise.
4045 * ftfont.c: Likewise.
4046 * gtkutil.c: Likewise.
4047 * image.c: Likewise.
4048 * keyboard.c: Likewise.
4049 * menu.c: Likewise.
4050 * process.c: Likewise.
4051 * scroll.c: Likewise.
4052 * sound.c: Likewise.
4053 * term.c: Likewise.
4054 * w32console.c: Likewise.
4055 * w32fns.c: Likewise.
4056 * w32term.c: Likewise.
4057 * window.c: Likewise.
4058 * xdisp.c: Likewise.
4059 * xfaces.c: Likewise.
4060 * xfns.c: Likewise.
4061 * xselect.c: Likewise.
4062 * xterm.c: Likewise.
4063
1ec4b7b2
SM
40642012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
4065
4066 * fns.c (maybe_resize_hash_table): Output message when growing the
4067 purify-hashtable.
4068
2014308a
DA
40692012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4070
4071 * alloc.c (allocate_string_data): Remove dead code.
4072 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
4073 avoid GCC warning about unused macro.
4074
246155eb
DA
40752012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4076
4077 * alloc.c (allocate_string): Omit intervals initialization.
4078 * alloc.c (make_uninit_multibyte_string): Initialize intervals
4079 as in make_pure_string and make_pure_c_string.
4080
43184b7b
DA
40812012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4082
d209e2fb 4083 * alloc.c (allocate_string): Fix last change.
43184b7b 4084
3fe6dd74
DA
40852012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4086
d209e2fb 4087 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
4088 to memset, add explicit initialization where appropriate.
4089
1ba6038a
GM
40902012-06-27 Glenn Morris <rgm@gnu.org>
4091
4092 * lisp.mk (lisp): Remove paths.elc.
4093
c89926a5
CY
40942012-06-27 Chong Yidong <cyd@gnu.org>
4095
4096 * doc.c (Fsubstitute_command_keys): Fix punctuation.
4097
ed6b3510
JW
40982012-06-26 John Wiegley <johnw@newartisans.com>
4099
1ec4b7b2 4100 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
4101 on Mac OS X Lion: __mod_init_func and __mod_term_func.
4102
ed6b3510
JW
4103 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
4104 when building with Clang.
4105
8edd4a2b
SM
41062012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
4107
4108 * eval.c (Fapply): Allow calling it with a single argument.
4109
f6f62d1b
EZ
41102012-06-26 Eli Zaretskii <eliz@gnu.org>
4111
4112 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
4113 _stricmp and _strnicmp.
4114 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
4115
62efea5e
DA
41162012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4117
4118 * alloc.c (allocate_window): Zero out non-Lisp part of newly
4119 allocated window.
4120 (allocate_process): Likewise for new process.
8edd4a2b 4121 (allocate_terminal): Change to use offsetof.
62efea5e
DA
4122 (allocate_frame): Likewise.
4123 * frame.c (make_frame): Omit redundant initialization.
4124 * window.c (make_parent_window): Use memset.
4125 (make_window): Omit redundant initialization.
4126 * process.c (make_process): Omit redundant initialization.
4127 * terminal.c (create_terminal): Likewise.
4128
42997f4d
DA
41292012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4130
4131 * term.c (delete_tty): Remove redundant call to memset.
4132
1130ecfc
DA
41332012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4134
4135 * alloc.c: Remove build_string.
4136 * lisp.h: Define build_string as static inline. This provides
4137 a better opportunity to optimize away calls to strlen when the
4138 function is called with compile-time constant argument.
4139 * image.c (imagemagick_error): Convert to build_string.
4140 * w32proc.c (sys_spawnve): Likewise.
4141 * xterm.c (x_term_init): Likewise.
4142
cf38a720
PE
41432012-06-26 Paul Eggert <eggert@cs.ucla.edu>
4144
99027bdd
PE
4145 Use sprintf return value instead of invoking strlen on result.
4146 In the old days this wasn't portable, since some sprintf
4147 implementations returned char *. But they died out years ago and
4148 Emacs already assumes sprintf returns int.
4149 Similarly for float_to_string.
4150 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
4151 * ccl.c (ccl_driver):
4152 * character.c (string_escape_byte8):
4153 * data.c (Fnumber_to_string):
4154 * doprnt.c (doprnt):
4155 * print.c (print_object):
4156 * xdisp.c (message_dolog):
4157 * xfns.c (syms_of_xfns):
4158 Use sprintf or float_to_string result to avoid need to call strlen.
4159 * data.c (Fnumber_to_string):
4160 Use make_unibyte_string, since the string must be ASCII.
4161 * lisp.h, print.c (float_to_string): Now returns int length.
4162 * term.c (produce_glyphless_glyph):
4163 Use sprintf result rather than recomputing it.
4164
cf38a720
PE
4165 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
4166 * Makefile.in (ALL_CFLAGS):
4167 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
4168 * gmalloc.c, regex.c: Include <config.h> unconditionally.
4169
3511c784
DA
41702012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4171
0a08eb21 4172 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
4173 strcasecmp if available.
4174 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
4175
fb7da12e
AS
41762012-06-25 Andreas Schwab <schwab@linux-m68k.org>
4177
4178 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
4179 Avoid comma operator.
4180 * menu.c (push_submenu_start, push_submenu_end)
4181 (push_left_right_boundary, push_menu_pane): Likewise.
4182 * msdos.c (dos_rawgetc): Likewise.
4183
afa2ffd8
DA
41842012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4185
4186 * xfns.c (xic_create_fontsetname): Remove redundant calls
4187 to memset.
4188
b3b4476b
PE
41892012-06-25 Paul Eggert <eggert@cs.ucla.edu>
4190
4495ff38
PE
4191 * gtkutil.c (get_utf8_string): Remove redundant assignment.
4192 sprintf already null-terminates its output.
4193
b3b4476b
PE
4194 * xfns.c (x_window): Remove redundant cast.
4195
b00876c9
DA
41962012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4197
4198 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
4199 `const char *' to `char *' to avoid compiler warning.
4200
d188e26b
PE
42012012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4202
885d1d74
PE
4203 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
4204 instead of truncating it to 63 (admittedly a generous limit).
4205
d188e26b
PE
4206 * process.c: Fix spelling and caps in comments.
4207
e2f560b1
DN
42082012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
4209
e86db54b 4210 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
4211 * sysdep.c (setpgrp): Remove definition, not used in this file.
4212
7583a3a1
JB
42132012-06-24 Juanma Barranquero <lekktu@gmail.com>
4214
4215 * makefile.w32-in: Update dependencies.
4216
696056c2
EZ
42172012-06-24 Eli Zaretskii <eliz@gnu.org>
4218
4219 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
4220 (SYSTIME_H): Add nt/inc/sys/time.h.
4221
4222 * systime.h [WINDOWSNT]: Include sys/time.h.
4223
4224 * s/ms-w32.h (struct timespec): Definition moved from
4225 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
4226
845ca893
PE
42272012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4228
4229 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
4230 * buffer.h (buffer_slot_type_mismatch):
4231 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4232 * eval.c (unwind_to_catch):
4233 * image.c (my_png_error, my_error_exit):
4234 * keyboard.c (quit_throw_to_read_char, user_error)
4235 (Fexit_recursive_edit, Fabort_recursive_edit):
4236 * lisp.h (die, args_out_of_range, args_out_of_range_3)
4237 (wrong_type_argument, buffer_overflow, __executable_start)
4238 (memory_full, buffer_memory_full, string_overflow, Fthrow)
4239 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
4240 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
4241 (fatal):
4242 (child_setup) [!DOS_NT]:
4243 * lread.c (end_of_file_error, invalid_syntax):
4244 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4245 * puresize.h (pure_write_error):
4246 * search.c (matcher_overflow):
4247 * sound.c (sound_perror, alsa_sound_perror):
4248 * sysdep.c, syssignal.h (croak):
4249 * term.c (maybe_fatal, vfatal):
4250 * textprop.c (text_read_only):
4251 * undo.c (user_error):
4252 * unexmacosx.c (unexec_error):
4253 * xterm.c (x_ins_del_lines, x_delete_glyphs):
4254 Use _Noreturn rather than NO_RETURN.
4255 No need for separate decl merely because of _Noreturn.
4256 * sound.c (sound_warning, parse_sound):
4257 Remove unnecessary forward decls.
4258
f1dd8073
PE
42592012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4260
4261 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
4262 * lisp.h (WAIT_READING_MAX): New macro.
4263 * dispnew.c (Fsleep_for, sit_for):
4264 * keyboard.c (kbd_buffer_get_event):
4265 * process.c (Faccept_process_output):
4266 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
4267 This improves on the previous patch, which introduced a bug
4268 when time_t is unsigned and as wide as intmax_t.
4269 See <http://bugs.gnu.org/9000#51>.
4270
b82c1755
EZ
42712012-06-23 Eli Zaretskii <eliz@gnu.org>
4272
4273 * dispnew.c (sit_for, Fsleep_for):
4274 * keyboard.c (kbd_buffer_get_event):
4275 * process.c (Faccept_process_output): Avoid compiler warnings when
4276 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
4277
ca300656
JB
42782012-06-23 Juanma Barranquero <lekktu@gmail.com>
4279
049ec95b
JB
4280 * makefile.w32-in: Update dependencies.
4281
ca300656
JB
4282 * w32.c (ltime): Add return type and declare static.
4283 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
4284
db7b8d06
PE
42852012-06-23 Paul Eggert <eggert@cs.ucla.edu>
4286
4287 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
4288 Privately reported by Herbert J. Skuhra.
4289 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
4290 All uses changed.
4291 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
4292 not make_lisp_timeval, when the argument is of type EMACS_TIME.
4293
0bd8297f
EZ
42942012-06-23 Eli Zaretskii <eliz@gnu.org>
4295
96512555
EZ
4296 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
4297 last argument of make_unibyte_string.
4298
0bd8297f
EZ
4299 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
4300 language ID in the event parameters.
4301
4302 * w32term.c (w32_read_socket): Put the new keyboard codepage into
4303 event.code, not the obscure "character set ID".
4304
63def6b6
CY
43052012-06-23 Chong Yidong <cyd@gnu.org>
4306
4307 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
4308
e8a02204
EZ
43092012-06-23 Eli Zaretskii <eliz@gnu.org>
4310
388cdec0
EZ
4311 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
4312 * w32.c (fdutimens): New function.
4313
4314 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
4315
4316 * s/ms-w32.h (pselect): Redirect to sys_select.
4317
4318 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
4319
e8a02204
EZ
4320 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
4321 in the logic of incrementing and decrementing the value of
4322 use_relocatable_buffers.
4323
d054f3fb
PE
43242012-06-23 Paul Eggert <eggert@cs.ucla.edu>
4325
4326 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
4327 Privately reported by Herbert J. Skuhra.
4328 [__FreeBSD__]: Remove "*/" typo after "#include".
4329 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
4330 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
4331 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
4332 Don't assume EMACS_TIME and struct timeval are the same type.
4333
d35af63c
PE
43342012-06-22 Paul Eggert <eggert@cs.ucla.edu>
4335
4336 Support higher-resolution time stamps (Bug#9000).
4337 The time stamps are only nanosecond-resolution at the C level,
4338 since that's the best that any real-world system supports now.
4339 But they are picosecond-resolution at the Lisp level, as that's
4340 easy, and leaves room for future OS improvements.
4341
4342 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
4343 (LIBES): Use it.
4344
4345 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
4346 Don't get current time unless it's needed.
4347
4348 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
4349 now provides it if it's absent.
4350 (start_atimer): Port to higher-res time stamps.
4351 Check for time stamp overflow. Don't get current time more
4352 often than is needed.
4353
4354 * buffer.h (struct buffer): Buffer modtime now has high resolution.
4355 Include systime.h, not time.h.
4356 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
4357
4358 * dired.c: Include stat-time.h.
4359 (Ffile-attributes): File times now have higher resolution.
4360
4361 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
4362 (struct image): Timestamp now has higher resolution.
4363
4364 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
4365 has at least microseconds now. All uses removed.
4366 (update_frame, update_single_window, update_window, update_frame_1)
4367 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 4368 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
4369
4370 * editfns.c (time_overflow): Now extern.
4371 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
4372 (float-time, Fformat_time_string, Fcurrent_time_string)
4373 (Fcurrent_time_zone): Accept and generate higher-resolution
4374 time stamps.
4375 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
4376 (decode_time_components, lisp_seconds_argument): New functions.
4377 (make_time): Now static.
4378 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
4379 Report an error if the time is invalid, rather than having the caller
4380 do that.
4381
4382 * fileio.c: Include <stat-time.h>
4383 (Fcopy_file): Copy higher-resolution time stamps.
4384 Prefer to set the time stamp via a file descriptor if that works.
4385 (Fset_file_times, Finsert_file_contents, Fwrite_region)
4386 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
4387 (Fvisited_file_modtime, Fset_visited_file_modtime):
4388 Support higher-resolution time stamps.
4389
4390 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
4391
4392 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
4393
4394 * image.c (prepare_image_for_display, clear_image_cache)
4395 (lookup_image): Port to higer-resolution time stamps.
4396
4397 * keyboard.c (start_polling, bind_polling_period):
4398 Check for time stamp overflow.
4399 (read_char, kbd_buffer_get_event, timer_start_idle)
4400 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
4401 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
4402 Port to higher-resolution time stamps. Do not assume time_t is signed.
4403 (decode_timer): New function. Timers are now vectors of length 9,
4404 not 8, to accommodate the picosecond component.
4405 (timer_check_2): Use it.
4406
4407 * nsterm.m (select_timeout, timeval_subtract): Remove.
4408 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
4409 as they're a bit more accurate and handle overflow better.
4410 (ns_select): Change prototype to be compatible with pselect.
4411 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
4412 * nsterm.h (ns_select): Adjust prototype.
4413
4414 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
4415 us-resolution time stamps.
4416 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
4417
4418 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
4419
4420 * lisp.h (time_overflow): New decl.
4421 (wait_reading_process_output): First arg is now intmax_t, not int,
4422 to accommodate larger waits.
4423
4424 * process.h (struct Lisp_Process.read_output_delay):
4425 Now counts nanoseconds, not microseconds.
4426 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
4427 EMACS_HAS_USECS.
4428 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
4429 (wait_reading_process_output):
4430 Port to ns-resolution time stamps.
4431 (Faccept_process_output, wait_reading_process_output):
4432 Check for time stamp overflow. Do not assume time_t is signed.
4433 (select_wrapper): Remove; we now use pselect.
4434 (Fprocess_attributes): Now generates ns-resolution time stamps.
4435
4436 * sysdep.c: Include utimens.h. Don't include utime.h
4437 or worry about struct utimbuf; gnulib does that for us now.
4438 (gettimeofday): Remove; gnulib provides a substitute.
4439 (make_timeval): New function.
4440 (set_file_times): Now sets ns-resolution time stamps.
4441 New arg FD; all uses changed.
4442 (time_from_jiffies, ltime_from_jiffies, get_up_time)
4443 (system_process_attributes):
4444 Now returns ns-resolution time stamp. All uses changed.
4445 Check for time stamp overflow.
4446
4447 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
4448 provides a substitute now.
4449
4450 * systime.h: Include timespec.h rather than sys/time.h and time.h,
4451 since it guarantees struct timespec.
4452 (EMACS_TIME): Now struct timespec, so that we can support
4453 ns-resolution time stamps.
4454 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
4455 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
4456 (EMACS_USECS): Remove.
4457 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
4458 so multiply the arg by 1000 before storing it.
4459 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
4460 New macros.
4461 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
4462 Port to ns-resolution time stamps.
4463 (EMACS_TIME_NEG_P): Remove; replaced by....
4464 (EMACS_TIME_SIGN): New macro.
4465 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
4466 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
4467 (set_file_times, make_time, lisp_time_argument): Adjust signature.
4468 (make_timeval, make_lisp_time, decode_time_components): New decls.
4469 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
4470 that it mishandled time_t overflow. You can't compare by subtracting!
4471 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
4472 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
4473
4474 * term.c: Include <sys/time.h>.
4475 (timeval_to_Time): New function, for proper overflow wraparound.
4476 (term_mouse_position, term_mouse_click): Use it.
4477
4478 * undo.c (record_first_change): Support higher-resolution time stamps
4479 in the undo buffer.
4480 (Fprimitive_undo): Use them when restoring time stamps.
4481
4482 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
4483 (w32_get_internal_run_time):
4484 Port to higher-resolution Emacs time stamps.
4485 (ltime): Now accepts single 64-bit integer, as that's more convenient
4486 for callers.
4487
4488 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
4489
4490 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
4491 for compatibility with pselect. Support ns-resolution time stamps.
4492
4493 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
4494
4495 * xselect.c (wait_for_property_change, x_get_foreign_selection):
4496 Check for time stamp overflow, and support ns-resolution time stamps.
4497
4498 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
4499 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
4500 (timeval_subtract): Remove; no longer needed.
4501 (XTflash, XTring_bell, x_wait_for_event):
4502 Port to ns-resolution time stamps. Don't assume time_t is signed.
4503
b6a92dfe
CY
45042012-06-22 Chong Yidong <cyd@gnu.org>
4505
4506 * xdisp.c (x_consider_frame_title): Revert last change.
4507
d251c37c
EZ
45082012-06-22 Eli Zaretskii <eliz@gnu.org>
4509
4510 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
4511 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
4512 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
4513 staticidx goes up to 1597 out of 1600 = 0x640.)
4514
f10deafb
PE
45152012-06-20 Paul Eggert <eggert@cs.ucla.edu>
4516
4517 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
4518 Otherwise, the umask might be mistakenly 0 while handling input signals.
4519
ec6de1e2
SM
45202012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
4521
4522 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
4523
28be1ada
DA
45242012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
4525
4526 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
4527 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
4528 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
4529 access to `contents' member of Lisp_Vector objects with AREF and ASET
4530 where appropriate.
4531
c6bf3022
CY
45322012-06-19 Chong Yidong <cyd@gnu.org>
4533
4534 * frame.c (delete_frame): When selecting a frame on a different
4535 text terminal, do not alter the terminal's top-frame.
4536
4537 * xdisp.c (format_mode_line_unwind_data): Record the target
4538 frame's selected window and its terminal's top-frame.
4539 (unwind_format_mode_line): Restore them.
4540 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
4541 Callers changed.
4542 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
4543 since tty frames can be explicitly named.
4544 (prepare_menu_bars): Likewise.
4545
4546 * term.c (Ftty_top_frame): New function.
4547
defd4196
PE
45482012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4549
4550 Port byte-code-meter to modern targets.
4551 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
4552 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 4553 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
4554 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
4555 (METER_1, METER_2): Simplify.
4556
1053a871
SM
45572012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
4558
4559 * data.c (Fdefalias): Return `symbol' (bug#11686).
4560
b7e8d081
MR
45612012-06-18 Martin Rudalics <rudalics@gmx.at>
4562
4563 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
4564 gets killed during executing of this function (Bug#11665).
4565 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
4566 (Vkill_buffer_query_functions): In doc-string say that functions
4567 run by this hook should not change the current buffer.
4568
7ea2b339
PE
45692012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4570
4571 Fix recently-introduced process.c problems found by static checking.
4572 * process.c (write_queue_push, write_queue_pop, send_process):
4573 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
4574 (write_queue_pop): Fix pointer signedness problem.
4575 (send_process): Remove unused local.
4576
96a313a1
CY
45772012-06-17 Chong Yidong <cyd@gnu.org>
4578
4579 * xdisp.c (redisplay_internal): No need to redisplay terminal
4580 frames that are not on top.
4581
20ca2e94
TN
45822012-06-17 Troels Nielsen <bn.troels@gmail.com>
4583
4584 * process.c (make_process): Initialize write_queue.
4585 (write_queue_push, write_queue_pop): New functions.
4586 (send_process): Use them to maintain correct ordering of process
4587 writes (Bug#10815).
4588
9a900ca9
PE
45892012-06-17 Paul Eggert <eggert@cs.ucla.edu>
4590
310fbfa8
PE
4591 * lisp.h (eassert): Assume C89 or later.
4592 This removes the need for CHECK.
4593 (CHECK): Remove. Its comments about always evaluating its
4594 argument were confusing, as 'eassert' typically does not evaluate
4595 its argument.
4596
27bb1ca4
PE
4597 * coding.c (produce_chars): Use ptrdiff_t, not int.
4598
9a900ca9
PE
4599 * xterm.c (x_draw_underwave): Check for integer overflow.
4600 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
4601
41b7f8bc 46022012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
4603
4604 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
4605 referenced (Bug#11583).
4606
9b0e3eba
AA
46072012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
4608
4609 Implement wave-style variant of underlining.
4610 * dispextern.h (face_underline_type): New enum.
4611 (face): Add field for underline type.
4612 * nsterm.m (ns_draw_underwave): New function.
4613 (ns_draw_text_decoration): Use it.
4614 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
4615 New functions.
4616 (x_draw_glyph_string): Use them.
4617 * xfaces.c (Qline, Qwave): New Lisp objects.
4618 (check_lface_attrs, merge_face_ref)
1053a871
SM
4619 (Finternal_set_lisp_face_attribute, realize_x_face):
4620 Handle wave-style underline face attributes.
9b0e3eba
AA
4621 * xterm.c (x_draw_underwave): New function.
4622 (x_draw_glyph_string): Use it.
4623
0fb52f11
JB
46242012-06-16 Juanma Barranquero <lekktu@gmail.com>
4625
4626 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
4627 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
4628 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
4629 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
4630 ($(BLD)/w32select.$(O)): Update dependencies.
4631
e5560ff7
AS
46322012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4633
4634 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
4635 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
4636 * character.c (_fetch_multibyte_char_p): Remove.
4637 * alloc.c: Include "character.h" before "buffer.h".
4638 * bidi.c: Likewise.
4639 * buffer.c: Likewise.
4640 * bytecode.c: Likewise.
4641 * callint.c: Likewise.
4642 * callproc.c: Likewise.
4643 * casefiddle.c: Likewise.
4644 * casetab.c: Likewise.
4645 * category.c: Likewise.
4646 * cmds.c: Likewise.
4647 * coding.c: Likewise.
4648 * composite.c: Likewise.
4649 * dired.c: Likewise.
4650 * dispnew.c: Likewise.
4651 * doc.c: Likewise.
4652 * dosfns.c: Likewise.
4653 * editfns.c: Likewise.
4654 * emacs.c: Likewise.
4655 * fileio.c: Likewise.
4656 * filelock.c: Likewise.
4657 * font.c: Likewise.
4658 * fontset.c: Likewise.
4659 * fringe.c: Likewise.
4660 * indent.c: Likewise.
4661 * insdel.c: Likewise.
4662 * intervals.c: Likewise.
4663 * keyboard.c: Likewise.
4664 * keymap.c: Likewise.
4665 * lread.c: Likewise.
4666 * macros.c: Likewise.
4667 * marker.c: Likewise.
4668 * minibuf.c: Likewise.
4669 * nsfns.m: Likewise.
4670 * nsmenu.m: Likewise.
4671 * print.c: Likewise.
4672 * process.c: Likewise.
4673 * regex.c: Likewise.
4674 * region-cache.c: Likewise.
4675 * search.c: Likewise.
4676 * syntax.c: Likewise.
4677 * term.c: Likewise.
4678 * textprop.c: Likewise.
4679 * undo.c: Likewise.
4680 * unexsol.c: Likewise.
4681 * w16select.c: Likewise.
4682 * w32fns.c: Likewise.
4683 * w32menu.c: Likewise.
4684 * window.c: Likewise.
4685 * xdisp.c: Likewise.
4686 * xfns.c: Likewise.
4687 * xmenu.c: Likewise.
4688 * xml.c: Likewise.
4689 * xselect.c: Likewise.
4690
2f07e6af
EZ
46912012-06-16 Eli Zaretskii <eliz@gnu.org>
4692
1053a871
SM
4693 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
4694 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 4695 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
4696 row.
4697 (handle_face_prop): Use chunk-relative overlay string index when
4698 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
4699 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
4700 the rightmost. (Bug#11720)
2f07e6af 4701
29b83cec
AS
47022012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4703
4704 * category.h (CHAR_HAS_CATEGORY): Define as inline.
4705 (CATEGORY_MEMBER): Enforce 1/0 value.
4706 * category.c (_temp_category_set): Remove.
4707
4c5501e9
EZ
47082012-06-16 Eli Zaretskii <eliz@gnu.org>
4709
4710 * window.c (Fdelete_other_windows_internal)
4711 (Fdelete_window_internal): Don't access frame's mouse highlight
4712 info of the initial frame. (Bug#11677)
4713
2b570124
PE
47142012-06-14 Paul Eggert <eggert@cs.ucla.edu>
4715
e93864f9
PE
4716 * .gdbinit (xgetint): Fix recently-introduced paren typo.
4717 Assume USE_2_TAGS_FOR_INTS.
4718 (xreload): Adjust $tagmask width to match recent lisp.h change.
4719
2b570124
PE
4720 Simplify lisp.h in minor ways that should not affect code.
4721 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
4722 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
4723 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
4724 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
4725 (INTTYPEBITS): New macro, for clarity.
4726 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
4727 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
4728 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
4729 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
4730 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
4731
81755f69
JB
47322012-06-13 Juanma Barranquero <lekktu@gmail.com>
4733
4734 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
4735
16192a57
GM
47362012-06-13 Glenn Morris <rgm@gnu.org>
4737
4738 * s/bsd-common.h (BSD4_3):
4739 * s/usg5-4-common.h (USG5_4): No longer define; unused.
4740
646b5f55
AS
47412012-06-13 Andreas Schwab <schwab@linux-m68k.org>
4742
4743 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
4744 instead of union.
4745 (XLI, XIL): Define.
1053a871
SM
4746 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
4747 Use them.
4748 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 4749 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 4750 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
4751 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
4752 * frame.c (delete_frame): Remove outdated comment.
4753 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
4754 USE_LISP_UNION_TYPE.
4755 (Fw32_unregister_hot_key): Likewise.
4756 (Fw32_toggle_lock_key): Likewise.
4757 * w32menu.c (add_menu_item): Likewise.
4758 (w32_menu_display_help): Use XIL instead of checking
4759 USE_LISP_UNION_TYPE.
4760 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
4761 (init_heap): Likewise.
4762 * w32term.c (w32_read_socket): Update comment.
4763
1d3823c9
GM
47642012-06-13 Glenn Morris <rgm@gnu.org>
4765
c62ff706
GM
4766 * s/usg5-4-common.h, src/s/unixware.h:
4767 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
4768
1d3823c9
GM
4769 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
4770
bfe3e0a2
PE
47712012-06-13 Paul Eggert <eggert@cs.ucla.edu>
4772
4773 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
4774 * alloc.c (make_number) [!defined make_number]:
4775 Remove, as lisp.h always defines this now.
4776 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
4777 (roundup_size): Verify that it is a power of 2.
4778 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
4779 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
4780 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
4781 -DUSE_LSB_TAG=0, to override the automatically-selected default.
4782 USE_LSB_TAG now is always defined to be either 0 or 1.
4783 All uses changed.
4784 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
4785 code works fine either way, and efficiency is not a concern here,
4786 as the union type is for debugging, not for production.
4787 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
4788 Use an inline function on all platforms when using the union type,
4789 since this is simpler and 'static inline' can be used portably
4790 within Emacs now.
4791 (LISP_INITIALLY_ZERO): New macro.
4792 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
4793 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
4794
45fa9c0f
GM
47952012-06-12 Glenn Morris <rgm@gnu.org>
4796
b4492cba
GM
4797 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
4798
4799 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 4800
45fa9c0f
GM
4801 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
4802 Move BROKEN_SIGIO to configure.
4803
4804 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
4805 Move NO_TERMIO to configure.
4806
0e25d334
CY
48072012-06-12 Chong Yidong <cyd@gnu.org>
4808
4809 * image.c (imagemagick_load_image): Use MagickFlattenImage if
4810 MagickMergeImageLayers is undefined. Use pixel pusher loop if
4811 MagickExportImagePixels is undefined.
4812
43682bb6
PE
48132012-06-12 Paul Eggert <eggert@cs.ucla.edu>
4814
4815 * image.c (imagemagick_load_image): Remove unused label.
4816
a9be7d2b
GM
48172012-06-11 Glenn Morris <rgm@gnu.org>
4818
4819 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4820 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
4821 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
4822 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
4823
3017f87f
SM
48242012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
4825
4826 * alloc.c (make_byte_code): New function.
4827 (Fmake_byte_code): Use it. Don't purify here.
4828 * lread.c (read1): Use it as well to avoid extra allocation.
4829
1b9b4cf4
CY
48302012-06-11 Chong Yidong <cyd@gnu.org>
4831
4832 * image.c (imagemagick_load_image): Implement transparency.
4833
95988fcf
AS
48342012-06-10 Andreas Schwab <schwab@linux-m68k.org>
4835
4836 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
4837 account for preceding backslashes. (Bug#11663)
4838
cd4eb164
CY
48392012-06-09 Chong Yidong <cyd@gnu.org>
4840
4841 * term.c: Support italics in capable terminals (Bug#9652).
4842 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
4843 (turn_on_face): Output using TS_enter_italic_mode if available.
4844 Don't handle unused blinking and alt-charset cases.
4845 (turn_off_face): Handle italic case; discard unused tty_blinking_p
4846 and tty_alt_charset_p cases.
4847 (tty_capable_p, init_tty): Support italics.
4848
4849 * termchar.h (struct tty_display_info): Add field for italics.
4850 Remove unused blink field.
4851
4852 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
4853 Handle slant.
4854
4855 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
4856 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
4857 tty_alt_charset_p. Add tty_italic_p.
4858
ff88beb8
MA
48592012-06-09 Michael Albinus <michael.albinus@gmx.de>
4860
4861 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
4862 dbus_type_is_basic if available.
4863 (xd_extract_signed, xd_extract_unsigned): Rename from
4864 extract_signed and extract_unsigned, respectively. Adapt callers.
4865
44286096
CY
48662012-06-09 Chong Yidong <cyd@gnu.org>
4867
1682701f
CY
4868 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
4869
44286096
CY
4870 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
4871 case (Bug#9752).
4872
d86feb17
PE
48732012-06-08 Paul Eggert <eggert@cs.ucla.edu>
4874
4875 * xdisp.c (vmessage): Treat frame message as multibyte.
4876 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
4877 would generate the diagnostic "Making \302\247 buffer-local while
4878 let-bound!".
4879
d5c20fe8
EZ
48802012-06-08 Eli Zaretskii <eliz@gnu.org>
4881
4882 * dispnew.c (showing_window_margins_p): Undo last change, which
4883 was done due to an inadvertent commit.
4884 (adjust_frame_glyphs_for_frame_redisplay): Do call
4885 showing_window_margins_p.
4886
513749ee
SM
48872012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4888
4889 * eval.c (Fmake_var_non_special): New primitive.
4890 (syms_of_eval): Defsubr it.
4891 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
4892
d4a8f5c1
JB
48932012-06-08 Juanma Barranquero <lekktu@gmail.com>
4894
4895 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
4896 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
4897
8bbbc977
EZ
48982012-06-08 Eli Zaretskii <eliz@gnu.org>
4899
4900 * alloc.c (allocate_vectorlike): Fix last change.
4901
f3372c87
DA
49022012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
4903
4904 Block-based vector allocation of small vectors.
4905 * lisp.h (struct vectorlike_header): New field `nbytes',
4906 adjust comment accordingly.
4907 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
4908 to denote vector blocks. Adjust users (live_vector_p,
4909 mark_maybe_pointer, valid_lisp_object_p) accordingly.
4910 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
4911 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
4912 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
4913 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
4914 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
4915 (roundup_size): New constant.
4916 (struct vector_block): New data type.
4917 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 4918 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
4919 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
4920 (sweep_vectors): New functions.
4921 (allocate_vectorlike): Return `zero_vector' as the only vector of
4922 0 items. Allocate new vector from block if vector size is less than
4923 or equal to VBLOCK_BYTES_MAX.
4924 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
4925 (init_alloc_once): Add call to init_vectors.
4926
4f18a4ed
SM
49272012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4928
4929 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
4930
86f158bc
PE
49312012-06-07 Paul Eggert <eggert@cs.ucla.edu>
4932
4933 * doprnt.c (doprnt): Truncate multibyte char correctly.
4934 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
4935 would mishandle a string argument "Xc" if X was a multibyte
4936 character of length 2: it would truncate after X's first byte
4937 rather than including all of X.
4938
c5cfcbe0
CY
49392012-06-06 Chong Yidong <cyd@gnu.org>
4940
4941 * buffer.c (word_wrap): Doc fix.
4942
c05cf390
PE
49432012-06-04 Paul Eggert <eggert@cs.ucla.edu>
4944
4945 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
4946
0c3461de
GM
49472012-06-03 Glenn Morris <rgm@gnu.org>
4948
4949 * xdisp.c (tool-bar-style): Doc fix.
4950
c71232db
UM
49512012-06-03 Ulrich Müller <ulm@gentoo.org>
4952
4953 * Makefile.in (PAXCTL): Define.
4954 (temacs$(EXEEXT)): Disable memory randomization for the temacs
4955 binary via PaX flags if the paxctl utility is available.
4956 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
4957 Restore PaX flags to their default. (Bug#11398)
4958
383f7350
CY
49592012-06-03 Chong Yidong <cyd@gnu.org>
4960
4961 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
4962 buffer (Bug#11226).
4963
5f2c76c6
CY
49642012-06-03 Chong Yidong <cyd@gnu.org>
4965
4966 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
4967 (note_mode_line_or_margin_highlight): If there is no help echo,
4968 use mode-line-default-help-echo. Handle the case where the mouse
4969 position is past the end of the mode line string.
4970
4971 * buffer.c (buffer_local_value_1): New function, split from
4972 Fbuffer_local_value; can return Qunbound.
4973 (Fbuffer_local_value): Use it.
4974 (Vmode_line_format): Docstring tweaks.
4975
773d47f6
PE
49762012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4977
4978 * sysdep.c (system_process_attributes): Improve comment.
4979
f2d6a3df
SM
49802012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
4981
4982 * keyboard.c: Export real-this-command to Elisp.
4983 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
4984 and DEFVAR it. Update all users.
4985
63810350
PE
49862012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4987
7bd5c1f4
PE
4988 * minibuf.c (Fassoc_string): Remove duplicate declaration.
4989
63810350
PE
4990 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
4991 Convert pctcpu and pctmem to Lisp float properly.
4992 Let the compiler fold better, as 100.0/0x8000 is exact.
4993
a2821611
AS
49942012-06-02 Andreas Schwab <schwab@linux-m68k.org>
4995
4996 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
4997 cons_block.
4998
5fceba1d
PE
49992012-06-01 Paul Eggert <eggert@cs.ucla.edu>
5000
5001 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
5002
c98ff5dd
DA
50032012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
5004
5005 For a 'struct window', replace some Lisp_Object fields to
5006 bitfields where appropriate, remove unused fields.
5007 * window.h (struct window): Remove unused 'last_mark_x' and
5008 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
5009 change it's type from Lisp_Object to bitfield.
5010 Change type of 'force_start', 'optional_new_start',
5011 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
5012 fields from Lisp_Object to bitfield. Adjust users accordingly.
5013
ca34e0be
PE
50142012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 Pacify gcc -Wdouble-precision when using Xaw.
5017 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
5018 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
5019 Use 'float' consistently, rather than 'float' in most places
5020 and 'double' in a couple of places.
5021
efc00ab1 50222012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
5023
5024 * xdisp.c (handle_stop): Detect whether we have overlay strings
5025 loaded by testing it->current.overlay_string_index to be
5026 non-negative, instead of checking whether n_overlay_strings is
5027 positive. (Bug#11587)
5028
efc00ab1 50292012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
5030
5031 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
5032
5033 * doc.c (Fsubstitute_command_keys): Doc fix.
5034
efc00ab1 50352012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
5036
5037 * search.c (search_buffer): Remove calls to
5038 r_alloc_inhibit_buffer_relocation, as it is now called by
5039 maybe_unify_char, which was the cause of relocation of buffer text
5040 in bug#11519.
5041
efc00ab1 50422012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
5043
5044 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
5045 for the duration of call to load_charset, to avoid problems with
5046 callers of maybe_unify_char that access buffer text through C
5047 pointers.
5048
5049 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
5050 decrement the inhibition flag, instead of just setting or
5051 resetting it.
5052
ba93a187
PE
50532012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 Remove obsolete '#define static' cruft.
5056 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
5057 This #undef was "temporary" in 2000; it is no longer needed
5058 now that '#define static' has gone away.
5059 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
5060 (gray_bitmap_bits): Remove; no longer needed.
5061 All uses replaced with definiens.
5062 * xterm.c: Include "bitmaps/gray.xbm".
5063
9e4bf381
PE
50642012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5065
5066 Clean up __executable_start, monstartup when --enable-profiling.
5067 The following changes affect the code only when profiling.
5068 * dispnew.c (__executable_start): Rename from safe_bcopy.
5069 Define only on platforms that need it.
5070 * emacs.c: Include <sys/gmon.h> when profiling.
5071 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
5072 (__executable_start): Remove decl, since lisp.h does it now.
5073 (safe_bcopy): Remove decl; no longer has that name.
5074 (main): Coalesce #if into single bit of code, for simplicity.
5075 Cast pointers to uintptr_t, since standard libraries want integers
5076 and not pointers.
5077 * lisp.h (__executable_start): New decl.
5078
32d72c2f
GM
50792012-05-31 Glenn Morris <rgm@gnu.org>
5080
5081 * image.c (Fimagemagick_types): Doc fix.
5082
baac5bc7
JM
50832012-05-30 Jim Meyering <meyering@redhat.com>
5084
5085 * callproc.c (Fcall_process_region): Include directory component
5086 in mkstemp error message (Bug#11586).
5087
72cb32cf
PE
50882012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5089
5090 * alloc.c, lisp.h (make_pure_vector): Now static.
5091
61b108cc
SM
50922012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
5093
5094 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
5095 Move to byte-run.el.
5096 (Fautoload): Do the hash-doc more carefully.
5097 * data.c (Fdefalias): Purify definition, except for keymaps.
5098 (Qdefun): Move from eval.c.
5099 * lisp.h (Qdefun): Remove.
5100 * lread.c (read1): Tiny simplification.
5101
471fe23d
TN
51022012-05-29 Troels Nielsen <bn.troels@gmail.com>
5103
934f3f58 5104 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
5105 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
5106 Bug#9642, but explicitly check that the buffer the overlay would
5107 be moved to is live and rearrange lines to make sure that errors
5108 will not put the overlay in an inconsistent state.
5109 (Fdelete_overlay): Cosmetics.
5110
85d0efd1
EZ
51112012-05-28 Eli Zaretskii <eliz@gnu.org>
5112
5113 * w32term.c (my_bring_window_to_top): New function.
5114 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
5115 could be different from the original one.
5116 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
5117 (Bug#11513)
5118
5119 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
5120 by calling BringWindowToTop.
5121
5122 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
5123 (WM_EMACS_END): Increase by one.
5124
da92a98c
PE
51252012-05-28 Paul Eggert <eggert@cs.ucla.edu>
5126
5127 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
5128 This avoids undefined behavior that might cause the eassert
5129 to not catch an out-of-range value.
5130
74d1f848
JB
51312012-05-28 Juanma Barranquero <lekktu@gmail.com>
5132
5133 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
5134 Update dependencies.
5135
9e1a06fc
EZ
51362012-05-27 Eli Zaretskii <eliz@gnu.org>
5137
5138 * bidi.c (bidi_mirror_char): Fix last change.
5139
f3dd7312
AS
51402012-05-27 Andreas Schwab <schwab@linux-m68k.org>
5141
5142 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
5143 when referring to sectname field in printf format.
5144
81899c91
PE
51452012-05-27 Paul Eggert <eggert@cs.ucla.edu>
5146
57b81a9f
PE
5147 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
5148 Only r_alloc_inhibit_buffer_relocation needed to be added;
5149 the others were already declared.
5150
81899c91
PE
5151 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
5152 before checking whether it's out of range. Put the check inside
5153 eassert. See
5154 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
5155
33017faf 51562012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
5157
5158 * callproc.c (Fcall_process): Restore a line that was accidentally
5159 commented out in the 2011-02-13 change (bug#11547).
5160
33017faf 51612012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
5162
5163 * lisp.h [REL_ALLOC]: Add prototypes for external functions
5164 defined on ralloc.c.
5165
5166 * buffer.c [REL_ALLOC]: Remove prototypes of
5167 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
5168 they are now on lisp.h.
5169
5170 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
5171
5172 * search.c (search_buffer): Use it to inhibit relocation of buffer
5173 text while re_search_2 is doing its job, because re_search_2 is
5174 passed C pointers to buffer text. (Bug#11519)
5175
23415acf
EZ
5176 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
5177 Update value to 24.
5178
44e27368
EZ
5179 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
5180 state after an additional call to move_it_in_display_line_to, keep
5181 the values of it->max_ascent and it->max_descent found for the
5182 entire line.
5183 (pos_visible_p): Revert the comparison against bottom_y to what it
5184 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
5185 (Bug#11464)
5186
c1892f11
PE
51872012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5188
5189 Fix coding-related core dumps with gcc -ftrapv.
5190 The code was computing A - B, where A and B are pointers, and B is
5191 random garbage. This can lead to core dumps on platforms that
5192 have special pointer registers, and it also leads to core dumps on
5193 x86-64 when compiled with gcc -ftrapv. The fix is to compute
5194 A - B only when B is initialized properly.
5195 * coding.c (coding_set_source, coding_set_destination): Return void.
5196 (coding_change_source, coding_change_destinations): New functions,
5197 with the old behaviors of coding_set_source and coding_set_destination.
5198 All callers that need an offset changed to use these new functions.
5199
eb7afdad
GM
52002012-05-26 Glenn Morris <rgm@gnu.org>
5201
5202 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
5203
f12fdf02
EZ
52042012-05-26 Eli Zaretskii <eliz@gnu.org>
5205
53a63be6 5206 Extend mouse support on W32 text-mode console.
61b108cc
SM
5207 * xdisp.c (draw_row_with_mouse_face):
5208 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 5209
eb3f6f01 5210 * w32console.c: Include window.h.
61b108cc
SM
5211 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
5212 New functions.
eb3f6f01
EZ
5213 (initialize_w32_display): Initialize mouse-highlight data.
5214
53a63be6
EZ
5215 * w32inevt.c: Include termchar.h and window.h.
5216 (do_mouse_event): Support mouse-autoselect-window. When the mouse
5217 moves, call note_mouse_highlight. If help_echo changed, call
5218 gen_help_event to produce help-echo message in the echo area.
5219 Call clear_mouse_face if mouse_face_hidden is set in the mouse
5220 highlight info.
5221
4cfd81f6
PE
52222012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5223
5224 * lread.c (read1): Simplify slightly to avoid an overflow warning
5225 with GCC 4.7.0 on x86-64.
5226
4446092a
EZ
52272012-05-26 Eli Zaretskii <eliz@gnu.org>
5228
5229 * bidi.c (bidi_mirror_char): Revert last change: an int is
5230 definitely wide enough here.
5231
42b2a986 52322012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 5233
42b2a986 5234 Fix integer width and related bugs (Bug#9874).
eb106a49 5235 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
5236 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
5237 (string_bytes, check_sblock, allocate_string_data):
5238 (compact_small_strings, Fmake_bool_vector, make_string)
5239 (make_unibyte_string, make_multibyte_string)
5240 (make_string_from_bytes, make_specified_string)
5241 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
5242 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
5243 (mark_vectorlike):
5244 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5245 (allocate_pseudovector):
5246 Use int, not EMACS_INT, where int is wide enough.
5247 (inhibit_garbage_collection, Fgarbage_collect):
5248 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5249 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
5250 int might not be wide enough.
5251 (bidi_cache_search, bidi_cache_find, bidi_init_it)
5252 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
5253 (bidi_at_paragraph_end, bidi_find_paragraph_start)
5254 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
5255 (bidi_level_of_next_char, bidi_move_to_visually_next):
5256 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5257 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
5258 (Fkill_buffer, Fset_buffer_major_mode)
5259 (advance_to_char_boundary, Fbuffer_swap_text)
5260 (Fset_buffer_multibyte, overlays_at, overlays_in)
5261 (overlay_touches_p, struct sortvec, record_overlay_string)
5262 (overlay_strings, recenter_overlay_lists)
5263 (adjust_overlays_for_insert, adjust_overlays_for_delete)
5264 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
5265 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
5266 (Foverlay_recenter, last_overlay_modification_hooks_used)
5267 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
5268 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
5269 (validate_region): Omit unnecessary test for b <= e,
5270 since that's guaranteed by the previous test.
d311d28c
PE
5271 (adjust_overlays_for_delete): Avoid pos + length overflow.
5272 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
5273 (report_overlay_modification):
5274 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5275 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
5276 Omit pointer cast, which isn't needed anyway, and doesn't work
5277 after the EMACS_INT -> ptrdiff_t change.
02481186 5278 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
5279 * buffer.h: Adjust decls to match defn changes elsewhere.
5280 (struct buffer_text, struct buffer):
5281 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5282 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
5283 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
5284 not int, to avoid needless 32-bit limit on 64-bit hosts.
5285 (exec_byte_code): Use tighter memory-full test, one that checks
5286 for alloca overflow. Don't compute the address of the object just
5287 before an array, as that's not portable. Use EMACS_INT, not
5288 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
5289 * callint.c (Fcall_interactively):
5290 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5291 * callproc.c (call_process_kill, Fcall_process):
5292 Don't assume pid_t fits into an Emacs fixnum.
5293 (call_process_cleanup, Fcall_process, child_setup):
5294 Don't assume pid_t fits into int.
5295 (call_process_cleanup, Fcall_process, delete_temp_file)
5296 (Fcall_process_region):
5297 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5298 (Fcall_process): Simplify handling of volatile integers.
5299 Use int, not EMACS_INT, where int will do.
5300 * casefiddle.c (casify_object, casify_region, operate_on_word)
5301 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
5302 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5303 (casify_object): Avoid integer overflow when overallocating buffer.
5304 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 5305 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
5306 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
5307 * category.h (CATEGORYP): Don't assume arg is nonnegative.
5308 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
5309 integers are now checked earlier. All uses replaced with XINT.
5310 (ccl_driver):
5311 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5312 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
5313 (ccl_driver, Fregister_code_conversion_map):
5314 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
5315 (resolve_symbol_ccl_program): Check that vector header is in range.
5316 Always copy the vector, so that we can check its contents reliably
5317 now rather than having to recheck each instruction as it's being
5318 executed. Check that vector words fit in 'int'.
5319 (ccl_get_compiled_code, Fregister_ccl_program)
5320 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
5321 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
5322 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
5323 contents are in range.
5324 (Fccl_execute_on_string): Check that status is in range.
5325 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
5326 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
5327 Accept and return EMACS_INT, not int, because callers can pass values
5328 out of 'int' range.
5329 (c_string_width, strwidth, lisp_string_width, chars_in_text)
5330 (multibyte_chars_in_text, parse_str_as_multibyte)
5331 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
5332 (str_as_unibyte, str_to_unibyte, string_count_byte8)
5333 (string_escape_byte8, Fget_byte):
5334 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 5335 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
5336 avoid mishandling large integers.
5337 * character.h: Adjust decls to match defn changes elsewhere.
5338 * charset.c (load_charset_map_from_file, find_charsets_in_text)
5339 (Ffind_charset_region):
5340 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5341 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
5342 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 5343 Don't assume fixnum fits in int.
d311d28c
PE
5344 (load_charset_map_from_vector, Fmap_charset_chars):
5345 Remove now-unnecessary CHECK_NATNUMs.
5346 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
5347 Don't rely on undefined behavior with signed left shift overflow.
5348 Don't assume unsigned int fits into fixnum, or that fixnum fits
5349 into unsigned int. Don't require max_code to be a valid fixnum;
5350 that's not true for gb10830 4-byte on a 32-bit host. Allow
5351 invalid_code to be a cons, for the same reason. Require code_offset
5352 to be a character. Avoid int overflow if max_char is close
5353 to INT_MAX.
5354 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
5355 this is intended anyway and avoids some undefined behavior.
5356 (load_charset_map): Pass unsigned, not int, as 2nd arg of
5357 INDEX_TO_CODE_POINT, as that's what it expects.
5358 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
5359 * charset.h (DECODE_CHAR): Return int, not unsigned;
5360 this is what was intended anyway, and it avoids undefined behavior.
5361 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
5362 integer-overflow issues.
5363 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
5364 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
5365 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
5366 * chartab.c (Fmake_char_table, Fset_char_table_range)
5367 (uniprop_get_decoder, uniprop_get_encoder):
5368 Don't assume fixnum fits in int.
5369 * cmds.c (move_point): New function, that does the gist of
5370 Fforward_char and Fbackward_char, but does so while checking
5371 for integer overflow more accurately.
c96e5d6a 5372 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
5373 (Fforward_line, Fend_of_line, internal_self_insert)
5374 (internal_self_insert):
5375 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5376 Fix a FIXME, by checking for integer overflow when calculating
5377 target_clm and actual_clm.
5378 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 5379 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
5380 (ASSURE_DESTINATION, coding_alloc_by_realloc)
5381 (coding_alloc_by_making_gap, alloc_destination)
5382 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
5383 (encode_coding_utf_16, detect_coding_emacs_mule)
5384 (decode_coding_emacs_mule, encode_coding_emacs_mule)
5385 (detect_coding_iso_2022, decode_coding_iso_2022)
5386 (encode_invocation_designation, encode_designation_at_bol)
5387 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
5388 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
5389 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
5390 (encode_coding_ccl, encode_coding_raw_text)
5391 (detect_coding_charset, decode_coding_charset)
5392 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
5393 (produce_composition, produce_charset, produce_annotation)
5394 (decode_coding, handle_composition_annotation)
5395 (handle_charset_annotation, consume_chars, decode_coding_gap)
5396 (decode_coding_object, encode_coding_object, detect_coding_system)
5397 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
5398 (code_convert_region, code_convert_string)
8f50130c
PE
5399 (Fdefine_coding_system_internal)
5400 (coding_set_source, coding_set_destination):
d311d28c
PE
5401 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5402 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
5403 (Fdefine_coding_system_internal):
5404 Don't assume fixnums fit in int.
5405 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 5406 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
5407 (Funencodable_char_position, Fcheck_coding_systems_region)
5408 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 5409 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 5410 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 5411 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 5412 Don't access memory outside of the args array.
d311d28c 5413 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
5414 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
5415 result of ENCODE_CHAR.
d311d28c
PE
5416 * coding.h: Adjust decls to match defn changes elsewhere.
5417 (struct coding_system):
5418 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5419 * composite.c (get_composition_id, find_composition)
5420 (run_composition_function, update_compositions)
5421 (compose_text, composition_gstring_put_cache)
5422 (composition_gstring_p, composition_gstring_width)
5423 (fill_gstring_header, fill_gstring_body, autocmp_chars)
5424 (composition_compute_stop_pos, composition_reseat_it)
5425 (composition_update_it, struct position_record)
5426 (find_automatic_composition, composition_adjust_point)
5427 (Fcomposition_get_gstring, Ffind_composition_internal):
5428 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5429 (update_compositions):
5430 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5431 * composite.h: Adjust decls to match defn changes elsewhere.
5432 (struct composition):
5433 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5434 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
5435 Do not attempt to compute the address of the object just before a
5436 buffer; this is not portable.
5437 (Faref, Faset):
5438 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5439 (Faset): Use int, not EMACS_INT, where int is wide enough.
5440 (Fstring_to_number): Don't assume fixnums fit in int.
5441 (Frem): Don't assume arg is nonnegative.
5442 * dbusbind.c (xd_append_arg): Check for integers out of range.
5443 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 5444 (extract_signed, extract_unsigned): New functions.
243e0530
PE
5445 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
5446 (xd_get_connection_references): Return ptrdiff_t, not int.
5447 All uses changed.
5448 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
5449 (xd_read_message_1):
5450 Use int, not unsigned, where the dbus API uses int.
5451 (Fdbus_message_internal): Don't overflow mtype.
5452 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
5453 * dired.c (directory_files_internal, file_name_completion, scmp)
5454 (file_name_completion_stat):
5455 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5456 (file_name_completion): Don't overflow matchcount.
5457 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
5458 * dispextern.h: Adjust decls to match defn changes elsewhere.
5459 (struct text_pos, struct glyph, struct bidi_saved_info)
5460 (struct bidi_string_data, struct bidi_it, struct composition_it)
5461 (struct it):
5462 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5463 (struct display_pos, struct composition_it, struct it):
5464 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5465 * dispnew.c (increment_matrix_positions)
5466 (increment_row_positions, mode_line_string)
5467 (marginal_area_string):
5468 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 5469 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
5470 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5471 (duration_to_sec_usec): New function, to check for overflow better.
5472 (Fsleep_for, sit_for): Use it.
5473 * doc.c (get_doc_string, store_function_docstring):
5474 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5475 (get_doc_string, Fsnarf_documentation):
5476 Use int, not EMACS_INT, where int is wide enough.
5477 (get_doc_string):
5478 Use SAFE_ALLOCA, not alloca.
5479 Check for overflow when converting EMACS_INT to off_t.
5480 * doprnt.c (doprnt):
5481 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5482 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
5483 Don't assume uid_t fits into fixnum.
5484 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
5485 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
5486 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
5487 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
5488 (general_insert_function)
5489 (Finsert_char, make_buffer_string, make_buffer_string_both)
5490 (update_buffer_properties, Fbuffer_substring)
5491 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
5492 (Fsubst_char_in_region, check_translation)
5493 (Ftranslate_region_internal, save_restriction_restore, Fformat)
5494 (transpose_markers, Ftranspose_regions):
5495 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5496 (clip_to_bounds): Move to lisp.h as an inline function).
5497 (Fconstrain_to_field): Don't assume integers are nonnegative.
5498 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
5499 (Fsubst_char_in_region, Fsave_restriction):
5500 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5501 (Femacs_pid): Don't assume pid_t fits into fixnum.
5502 (lo_time): Use int, not EMACS_INT, when int suffices.
5503 (lisp_time_argument): Check for usec out of range.
5504 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
5505 (Fuser_login_name, Fuser_full_name): Signal an error
5506 if a uid argument is out of range, rather than relying on
5507 undefined behavior.
c8d5c857
PE
5508 (Fformat_time_string): Remove now-unnecessary check.
5509 lisp_time_argument checks for out-of-range usec now.
243e0530 5510 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
5511 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
5512 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
5513 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
5514 (init_cmdargs, Fdump_emacs):
5515 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5516 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
5517 the bottom (typically) 32 bits of the fixnum.
5518 * eval.c (specpdl_size, call_debugger):
5519 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5520 (when_entered_debugger, Fbacktrace_debug):
5521 Don't assume fixnum can fit in int.
5522 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
5523 the object just before a buffer; this is not portable.
5524 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
5525 (grow_specpdl, unbind_to):
5526 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5527 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
5528 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 5529 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
5530 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
5531 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
5532 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5533 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
5534 (a_write, e_write):
5535 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5536 (Fcopy_file, non_regular_nbytes, read_non_regular)
5537 (Finsert_file_contents):
5538 Use int, not EMACS_INT, where int is wide enough.
5539 (READ_BUF_SIZE): Verify that it fits in int.
5540 (Finsert_file_contents): Check that counts are in proper range,
5541 rather than assuming fixnums fit into ptrdiff_t etc.
5542 Don't assume fixnums fit into int.
125b3835 5543 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
5544 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
5545 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
5546 (string_char_to_byte, string_byte_to_char)
5547 (string_make_multibyte, string_to_multibyte)
5548 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
5549 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
5550 (substring_both, Fdelete, internal_equal, Ffillarray)
5551 (Fclear_string, mapcar1)
5552 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
5553 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
5554 (larger_vector, make_hash_table, maybe_resize_hash_table)
5555 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
5556 (Fmaphash, secure_hash):
5557 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5558 (concat): Check for string index and length overflow.
5559 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
5560 (Frequire):
5561 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5562 (larger_vector): New API (vec, incr_min, size_max) replaces old
5563 one (vec, new_size, init). This catches size overflow.
5564 INIT was removed because it was always Qnil.
5565 All callers changed.
5566 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
5567 the upper bound on a hash table index size.
5568 (make_hash_table, maybe_resize_hash_table): Use it.
5569 (secure_hash): Computer start_byte and end_byte only after
5570 they're known to be in ptrdiff_t range.
5571 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
5572 (Ffont_get_glyphs, Ffont_at):
5573 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5574 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
5575 (Flist_fonts, Fopen_font):
5576 Don't assume fixnum can fit in int.
5577 (check_gstring): Don't assume index can fit in int.
5578 (font_match_p): Check that fixnum is a character, not a nonnegative
5579 fixnum, since the later code needs to stuff it into an int.
5580 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
5581 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
5582 conversion overflow issues.
5583 (Fopen_font): Check for integer out of range.
5584 (Ffont_get_glyphs): Don't assume index can fit in int.
5585 * font.h: Adjust decls to match defn changes elsewhere.
5586 * fontset.c (reorder_font_vector): Redo score calculation to avoid
5587 integer overflow.
5588 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
5589 printmax_t, where ptrdiff_t is wide enough.
5590 (Finternal_char_font):
5591 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5592 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
5593 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
5594 (Fset_frame_position, x_set_frame_parameters)
5595 (x_set_line_spacing, x_set_border_width)
5596 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
5597 Check that fixnums are in proper range for system types.
5598 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
5599 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5600 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
5601 Use SAFE_ALLOCA_LISP, not alloca.
5602 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
5603 intptr_t is wide enough.
5604 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
5605 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
5606 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
5607 Check for fixnum out of range.
5608 * ftfont.c (ftfont_list): Don't assume index fits in int.
5609 Check that fixnums are in proper range for system types.
5610 (ftfont_shape_by_flt):
5611 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
5612 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
5613 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5614 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
5615 Check that fixnums are in proper range for system types.
5616 * gnutls.h: Adjust decls to match defn changes elsewhere.
5617 * gtkutil.c (xg_dialog_run):
5618 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5619 (update_frame_tool_bar):
5620 Check that fixnums are in proper range for system types.
5621 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 5622 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
5623 * indent.c (last_known_column, last_known_column_point):
5624 (current_column_bol_cache):
5625 (skip_invisible, current_column, check_display_width):
5626 (check_display_width, scan_for_column, current_column_1)
5627 (Findent_to, Fcurrent_indentation, position_indentation)
5628 (indented_beyond_p, Fmove_to_column, compute_motion):
5629 (Fcompute_motion, Fvertical_motion):
5630 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5631 (last_known_column_modified): Use EMACS_INT, not int.
5632 (check_display_width):
5633 (Fcompute_motion):
5634 Check that fixnums and floats are in proper range for system types.
5635 (compute_motion): Don't assume index or fixnum fits in int.
5636 (compute_motion, Fcompute_motion):
5637 Use int, not EMACS_INT, when it is wide enough.
5638 (vmotion): Omit local var start_hpos that is always 0; that way
5639 we don't need to worry about overflow in expressions involving it.
5640 * indent.h: Adjust decls to match defn changes elsewhere.
5641 (struct position):
5642 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5643 Use int, not EMACS_INT, where int is wide enough.
5644 Remove unused members ovstring_chars_done and tab_offset;
5645 all uses removed.
5646 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
5647 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
5648 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
5649 (make_gap, copy_text, insert, insert_and_inherit)
5650 (insert_before_markers, insert_before_markers_and_inherit)
5651 (insert_1, count_combining_before, count_combining_after)
5652 (insert_1_both, insert_from_string)
5653 (insert_from_string_before_markers, insert_from_string_1)
5654 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
5655 (adjust_after_replace, adjust_after_insert, replace_range)
5656 (replace_range_2, del_range, del_range_1, del_range_byte)
5657 (del_range_both, del_range_2, modify_region)
5658 (prepare_to_modify_buffer, signal_before_change)
5659 (signal_after_change, Fcombine_after_change_execute):
5660 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5661 * intervals.c (traverse_intervals, rotate_right, rotate_left)
5662 (balance_an_interval, split_interval_right, split_interval_left)
5663 (find_interval, next_interval, update_interval)
5664 (adjust_intervals_for_insertion, delete_node, delete_interval)
5665 (interval_deletion_adjustment, adjust_intervals_for_deletion)
5666 (static_offset_intervals, offset_intervals)
5667 (merge_interval_right, merge_interval_left, make_new_interval)
5668 (graft_intervals_into_buffer, temp_set_point_both)
5669 (temp_set_point, set_point, adjust_for_invis_intang)
5670 (set_point_both, move_if_not_intangible, get_property_and_range)
5671 (get_local_map, copy_intervals, copy_intervals_to_string)
5672 (compare_string_intervals, set_intervals_multibyte_1):
5673 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5674 * intervals.h: Adjust decls to match defn changes elsewhere.
5675 (struct interval):
5676 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5677 * keyboard.c (this_command_key_count, this_single_command_key_start)
5678 (before_command_key_count, before_command_echo_length, echo_now)
5679 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
5680 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
5681 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
5682 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
5683 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5684 (last_non_minibuf_size, last_point_position, echo_truncate)
5685 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
5686 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
5687 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
5688 (stuff_buffered_input):
5689 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5690 (last_auto_save, command_loop_1, read_char):
5691 Use EMACS_INT, not int, to avoid integer overflow.
5692 (record_char): Avoid overflow in total_keys computation.
5693 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
5694 * keyboard.h: Adjust decls to match defn changes elsewhere.
5695 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
5696 (Fkey_description, Fdescribe_vector, Flookup_key):
5697 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5698 (click_position): New function, to check that positions are in range.
5699 (Fcurrent_active_maps):
5700 (describe_command):
5701 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5702 (Faccessible_keymaps, Fkey_description):
5703 (preferred_sequence_p):
5704 Don't assume fixnum can fit into int.
5705 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
5706 Check for integer overflow in size calculations.
5707 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
5708 avoid mishandling large integers.
5709 * lisp.h: Adjust decls to match defn changes elsewhere.
5710 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
5711 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
5712 (struct Lisp_Marker):
5713 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5714 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
5715 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
5716 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
5717 All callers changed.
5718 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
5719 Assume the arg has valid form, since it always does.
5720 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
5721 unsigned integer system type.
5722 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
5723 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
5724 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5725 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
5726 (duration_to_sec_usec): New decl.
5727 * lread.c (read_from_string_index, read_from_string_index_byte)
5728 (read_from_string_limit, readchar, unreadchar, openp)
5729 (read_internal_start, read1, oblookup):
5730 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5731 (Fload, readevalloop, Feval_buffer, Feval_region):
5732 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5733 (openp): Check for out-of-range argument to 'access'.
5734 (read1): Use int, not EMACS_INT, where int is wide enough.
5735 Don't assume fixnum fits into int.
6efdadfd 5736 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
5737 (read_filtered_event): Use duration_to_sec_usec
5738 to do proper overflow checking on durations.
d311d28c
PE
5739 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
5740 in size calculation.
5741 (Fexecute_kbd_macro):
5742 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5743 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
5744 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
5745 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
5746 (set_marker_both, set_marker_restricted_both, marker_position)
5747 (marker_byte_position, Fbuffer_has_markers_at):
5748 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5749 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 5750 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
5751 It now merely ensures that the menu is large enough, without
5752 necessarily growing it, as this avoids some integer overflow issues.
5753 All callers changed.
5754 (keymap_panes, parse_single_submenu, Fx_popup_menu):
5755 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5756 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
5757 Use SAFE_ALLOCA_LISP, not alloca.
5758 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
5759 to EMACS_INT. Check that fixnums are in proper range for system types.
5760 * minibuf.c (minibuf_prompt_width, string_to_object)
5761 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
5762 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
5763 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5764 (get_minibuffer, read_minibuf_unwind):
5765 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5766 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
5767 this simplifies overflow checking. All callers changed.
5768 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
5769 (Ftest_completion):
5770 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5771 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
5772 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
5773 Check that fixnums are in proper range for system types.
5774 (Fx_create_frame, Fx_show_tip):
5775 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5776 * nsfont.m (ns_findfonts, nsfont_list_family):
5777 Don't assume fixnum fits in long.
5778 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
5779 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5780 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
5781 wide enough.
17fdb222 5782 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
5783 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5784 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
5785 (PRINTDECLARE, PRINTPREPARE):
5786 (strout, print_string):
5787 (print, print_preprocess, print_check_string_charset_prop)
5788 (print_object):
5789 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5790 (PRINTDECLARE):
5791 (temp_output_buffer_setup, Fprin1_to_string, print_object):
5792 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5793 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 5794 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 5795 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
5796 (print_error_message): Use SAFE_ALLOCA, not alloca.
5797 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
5798 (print_depth, new_backquote_output, print_number_index):
5799 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
5800 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
5801 (Fset_process_window_size, Fformat_network_address)
5802 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 5803 (sigchld_handler):
d311d28c 5804 Check that fixnums are in proper range for system types.
d44287d4 5805 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
5806 Check for process-ids out of pid_t range rather than relying on
5807 undefined behavior.
e4d81efc 5808 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
5809 (Fformat_network_address, read_process_output, send_process)
5810 (Fprocess_send_region, status_notify):
5811 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5812 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
5813 (wait_reading_process_output, read_process_output, exec_sentinel):
5814 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5815 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
5816 (Faccept_process_output): Use duration_to_sec_usec to do proper
5817 overflow checking on durations.
dde14581
PE
5818 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
5819 Don't assume pid_t fits in int.
02481186
PE
5820 * process.h (struct Lisp_Process): Members tick and update_tick
5821 are now of type EMACS_INT, not int.
b62b53e8
PE
5822 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
5823 configured --with-wide-int.
d311d28c
PE
5824 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
5825 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
5826 * search.c (looking_at_1, string_match_1):
5827 (fast_string_match, fast_c_string_match_ignore_case)
5828 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
5829 (scan_newline, find_before_next_newline, search_command)
5830 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
5831 (set_search_regs, wordify):
5832 (Freplace_match):
5833 (Fmatch_data):
5834 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5835 (string_match_1, search_buffer, set_search_regs):
5836 (Fmatch_data):
5837 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5838 (wordify): Check for overflow in size calculation.
5839 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
5840 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
5841 Check that fixnums are in proper range for system types.
5842 * sound.c (struct sound_device)
5843 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
5844 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5845 (Fplay_sound_internal):
5846 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 5847 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
5848 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
5849 (Fparse_partial_sexp):
5850 Don't assume fixnums can fit in int.
5851 (struct lisp_parse_state, find_start_pos, find_start_value)
5852 (find_start_value_byte, find_start_begv)
5853 (update_syntax_table, char_quoted, dec_bytepos)
5854 (find_defun_start, prev_char_comend_first, back_comment):
5855 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
5856 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
5857 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5858 (Finternal_describe_syntax_value): Check that match_lisp is a
5859 character, not an integer, since the code stuffs it into int.
5860 (scan_words, scan_sexps_forward):
5861 Check that fixnums are in proper range for system types.
5862 (Fforward_word):
5863 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5864 (scan_sexps_forward):
5865 Use CHARACTERP, not INTEGERP, since the value must fit into int.
5866 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
5867 * syntax.h: Adjust decls to match defn changes elsewhere.
5868 (struct gl_state_s):
5869 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
5870 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
5871 MOST_POSITIVE_FIXNUM.
d311d28c
PE
5872 * sysdep.c (wait_for_termination_1, wait_for_termination)
5873 (interruptible_wait_for_termination, mkdir):
5874 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
5875 (emacs_read, emacs_write):
5876 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
5877 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
5878 and double all fit in int.
d311d28c
PE
5879 * term.c (set_tty_color_mode):
5880 Check that fixnums are in proper range for system types.
5881 * termhooks.h (struct input_event):
5882 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5883 * textprop.c (validate_interval_range, interval_of)
5884 (Fadd_text_properties, set_text_properties_1)
5885 (Fremove_text_properties, Fremove_list_of_text_properties)
5886 (Ftext_property_any, Ftext_property_not_all)
5887 (copy_text_properties, text_property_list, extend_property_ranges)
5888 (verify_interval_modification):
5889 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5890 (Fnext_single_char_property_change)
5891 (Fprevious_single_char_property_change):
5892 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
5893 (copy_text_properties):
5894 Check for integer overflow in index calculation.
d311d28c
PE
5895 * undo.c (last_boundary_position, record_point, record_insert)
5896 (record_delete, record_marker_adjustment, record_change)
5897 (record_property_change):
5898 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5899 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
5900 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5901 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
5902 (Fx_hide_tip, Fx_file_dialog):
5903 * w32menu.c (set_frame_menubar):
5904 Use ptrdiff_t, not int, for consistency with rest of code.
5905 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
5906 (select_window, Fdelete_other_windows_internal)
5907 (window_scroll_pixel_based, window_scroll_line_based)
5908 (Frecenter, Fset_window_configuration):
5909 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5910 (Fset_window_hscroll, run_window_configuration_change_hook)
5911 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 5912 (Fscroll_other_window, Frecenter):
d311d28c
PE
5913 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5914 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
5915 Don't assume fixnum fits in int.
5916 (Fset_window_scroll_bars):
5917 Check that fixnums are in proper range for system types.
5918 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
5919 (string_pos, c_string_pos, number_of_chars, init_iterator)
5920 (in_ellipses_for_invisible_text_p, init_from_display_pos)
5921 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
5922 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
5923 (face_before_or_after_it_pos, handle_invisible_prop)
5924 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
5925 (display_prop_intangible_p, string_buffer_position_lim)
5926 (string_buffer_position, handle_composition_prop, load_overlay_strings)
5927 (get_overlay_strings_1, get_overlay_strings)
5928 (iterate_out_of_display_property, forward_to_next_line_start)
5929 (back_to_previous_visible_line_start, reseat, reseat_to_string)
5930 (get_next_display_element, set_iterator_to_next)
5931 (get_visually_first_element, compute_stop_pos_backwards)
5932 (handle_stop_backwards, next_element_from_buffer)
5933 (move_it_in_display_line_to, move_it_in_display_line)
5934 (move_it_to, move_it_vertically_backward, move_it_by_lines)
5935 (add_to_log, message_dolog, message_log_check_duplicate)
5936 (message2, message2_nolog, message3, message3_nolog
5937 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
5938 (current_message_1, truncate_echo_area, truncate_message_1)
5939 (set_message, set_message_1, store_mode_line_noprop)
5940 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
5941 (text_outside_line_unchanged_p, check_point_in_composition)
5942 (reconsider_clip_changes)
5943 (redisplay_internal, set_cursor_from_row, try_scrolling)
5944 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
5945 (redisplay_window, find_last_unchanged_at_beg_row)
5946 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
5947 (trailing_whitespace_p, find_row_edges, display_line)
5948 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
5949 (display_mode_element, store_mode_line_string)
5950 (pint2str, pint2hrstr, decode_mode_spec)
5951 (display_count_lines, display_string, draw_glyphs)
5952 (x_produce_glyphs, x_insert_glyphs)
5953 (rows_from_pos_range, mouse_face_from_buffer_pos)
5954 (fast_find_string_pos, mouse_face_from_string_pos)
5955 (note_mode_line_or_margin_highlight, note_mouse_highlight):
5956 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5957 (safe_call, init_from_display_pos, handle_fontified_prop)
5958 (handle_single_display_spec, load_overlay_strings)
5959 (with_echo_area_buffer, setup_echo_area_for_printing)
5960 (display_echo_area, echo_area_display)
5961 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
5962 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
5963 (redisplay_window, dump_glyph_row, display_mode_line)
5964 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 5965 (handle_display_spec, display_prop_string_p):
d311d28c
PE
5966 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5967 (handle_single_display_spec, build_desired_tool_bar_string)
5968 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
5969 (get_specified_cursor_type):
5970 Check that fixnums are in proper range for system types.
5971 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
5972 (Flookup_image_map):
5973 Don't assume fixnums fit in int.
5974 (compare_overlay_entries):
5975 Avoid mishandling comparisons due to subtraction overflow.
5976 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
5977 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
5978 (handle_tool_bar_click):
5979 Use int, not unsigned, since we prefer signed and the signedness
5980 doesn't matter here.
5981 (get_next_display_element, next_element_from_display_vector):
5982 Use int, not EMACS_INT, when int is wide enough.
5983 (start_hourglass): Use duration_to_sec_usec to do proper
5984 overflow checking on durations.
5985 * xfaces.c (Fbitmap_spec_p):
5986 Check that fixnums are in proper range for system types.
5987 (compare_fonts_by_sort_order):
5988 Avoid mishandling comparisons due to subtraction overflow.
5989 (Fx_family_fonts, realize_basic_faces):
5990 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5991 (Fx_family_fonts):
5992 Don't assume fixnum fits in int.
5993 Use SAFE_ALLOCA_LISP, not alloca.
5994 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
5995 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
5996 (face_at_buffer_position, face_for_overlay_string)
5997 (face_at_string_position):
5998 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5999 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
6000 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
6001 (Fx_show_tip):
6002 Check that fixnums are in proper range for system types.
6003 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
6004 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
6005 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6006 (Fx_change_window_property): Don't assume fixnums fit in int.
6007 * xfont.c (xfont_chars_supported):
6008 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6009 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
6010 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
6011 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6012 * xml.c (parse_region):
6013 * xrdb.c (magic_file_p):
6014 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6015 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
6016 (x_get_local_selection, x_reply_selection_request)
6017 (x_handle_selection_request, wait_for_property_change):
6018 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6019 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
6020 short is wide enough.
6021 (x_send_client_event): Don't assume fixnum fits in int.
6022 * xterm.c (x_x_to_emacs_modifiers):
6023 Don't assume EMACS_INT overflows nicely into int.
6024 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
6025 may come from Lisp.
6026 (handle_one_xevent): NATNUMP can eval its arg twice.
6027 (x_connection_closed):
6028 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6029 * xterm.h: Adjust decls to match defn changes elsewhere.
6030 (struct scroll_bar): Use struct vectorlike_header
6031 rather than rolling our own approximation.
6032 (SCROLL_BAR_VEC_SIZE): Remove; not used.
6033
c6574eb5
GM
60342012-05-25 Glenn Morris <rgm@gnu.org>
6035
6036 * lisp.mk (lisp): Update for more files being compiled now.
6037
e8d32c7e
SM
60382012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
6039
48def666
SM
6040 * lread.c: Remove `read_pure' which makes no difference.
6041 (read_pure): Remove var.
6042 (unreadpure): Remove function.
6043 (readevalloop): Don't call read_list with -1 flag.
6044 (read1, read_vector): Don't test read_pure any more.
6045 (read_list): Simplify.
6046
e8d32c7e
SM
6047 * fileio.c, character.h: Minor style tweaks.
6048
4b2addb7
DA
60492012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
6050
6051 * window.h (clip_changed): Remove useless declaration.
6052
584461b2
JB
60532012-05-22 Juanma Barranquero <lekktu@gmail.com>
6054
6055 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
6056 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
6057
34374650
PE
60582012-05-22 Paul Eggert <eggert@cs.ucla.edu>
6059
6060 Remove src/m/*.
6061 This directory predates autoconf and is no longer needed nowadays.
6062 Move its few remaining bits of functionality to where they're needed.
6063 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
6064 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
6065 * m/template.h: Remove.
6066 * Makefile.in (M_FILE): Remove. All uses removed.
6067 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
6068 * lisp.h (USE_LSB_TAG):
6069 * mem-limits.h (EXCEEDS_LISP_PTR):
6070 Use VAL_MAX, not VALBITS, in #if.
6071 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
6072 (EMACS_UINT): Define unconditionally now.
6073 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
6074 (BITS_PER_EMACS_INT): New constants, replacing
6075 what used to be in config.h, but not useful in #if.
6076 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
6077 define them any more.
6078 (VAL_MAX): New macro.
6079 (VALMASK): Use it.
6080 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
6081 BITS_PER_EMACS_INT, in #if.
6082 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
6083 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
6084 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
6085 * s/ms-w32.h (DATA_START):
6086 Move here from removed file m/intel386.h.
6087 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
6088 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
6089
261cb4bb
PE
60902012-05-21 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 Assume C89 or later.
6093 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
6094 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
6095 (xrealloc):
6096 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
6097 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
6098 * textprop.c, tparam.c (NULL): Remove.
6099 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
6100 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
6101 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
6102 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
6103 * xterm.c (input_signal_count): Assume volatile works.
6104
ff23cd9f
KB
61052012-05-21 Ken Brown <kbrown@cornell.edu>
6106
6107 * xgselect.c (xg_select): Fix first argument in call to 'select'
6108 (bug#11508).
6109
1b170bc6
KB
61102012-05-20 Ken Brown <kbrown@cornell.edu>
6111
6112 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 6113 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 6114
b2f4d39f
KB
61152012-05-19 Ken Brown <kbrown@cornell.edu>
6116
6117 * xfns.c (x_in_use): Remove `static' qualifier.
6118 * xterm.h (x_in_use): Declare.
6119 * xgselect.c: Include xterm.h.
6120 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
6121 and `display_arg' (bug#9754).
6122
003fdae2
PE
61232012-05-19 Paul Eggert <eggert@cs.ucla.edu>
6124
9232a6d9
PE
6125 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
6126
003fdae2
PE
6127 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
6128 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
6129
784b56e2
EZ
61302012-05-18 Eli Zaretskii <eliz@gnu.org>
6131
6132 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
6133
6134 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 6135 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
6136
6137 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
6138 reference to image_cache->refcount.
6139 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
6140
a0a79cde
JL
61412012-05-17 Juri Linkov <juri@jurta.org>
6142
6143 * search.c (Fword_search_regexp, Fword_search_backward)
6144 (Fword_search_forward, Fword_search_backward_lax)
6145 (Fword_search_forward_lax): Move functions to isearch.el
6146 (bug#10145, bug#11381).
6147
b0572523
PE
61482012-05-16 Paul Eggert <eggert@cs.ucla.edu>
6149
6150 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
6151
9660f5fc
SM
61522012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
6153
6154 * lread.c (init_obarray): Declare Qt and Qnil as special.
6155
4374de83
GM
61562012-05-14 Glenn Morris <rgm@gnu.org>
6157
6158 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 6159 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 6160
dc44c39a
PE
61612012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6162
078c97cb
PE
6163 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
6164
dc44c39a
PE
6165 * unexaix.c: Port to more-recent AIX compilers.
6166 (report_error, report_error_1, make_hdr, copy_sym)
6167 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
6168 Make arguments const char *, not char *, to avoid violations of C
6169 standard and to fix some AIX warnings reported by Gilles Pion.
6170
e18afed7 61712012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
6172
6173 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
6174 already have overlays loaded.
6175 (handle_single_display_spec): Before returning without displaying
6176 fringe bitmap, synchronize the bidi iterator with the main display
6177 iterator, by calling iterate_out_of_display_property.
6178 (iterate_out_of_display_property): Detect buffer iteration by
6179 testing that it->string is a Lisp string.
6180 (get_next_display_element): When the current object is exhausted,
6181 and there's something on it->stack, call set_iterator_to_next to
6182 proceed with what's on the stack, instead of returning zero.
6183 (set_iterator_to_next): If called at the end of a Lisp string,
6184 proceed to consider_string_end without incrementing string
6185 position. Don't increment display vector index past the end of
6186 the display vector. (Bug#11417)
c8fb9dc6
EZ
6187 (pos_visible_p): Don't report a position visible when move_it_to
6188 stopped at the last line of window, which happens to be scanned
6189 backwards by the bidi iteration. (Bug#11464)
ac268e67 6190
e18afed7 61912012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
6192
6193 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
6194 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
6195 are on a TTY, and thus unable to display on the fringes.
6196 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
6197 so we need to signal to the caller that this is a "replacing"
6198 display spec. This fixes display when the spec is invalid or we
6199 are on a TTY.
6200
e18afed7 62012012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
6202
6203 * unexaix.c (make_hdr): Fix typo in prototype.
6204 This bug broke the build on AIX. Problem reported by Gilles Pion.
6205
9d0a235a
MA
62062012-05-14 Michael Albinus <michael.albinus@gmx.de>
6207
6208 * keyboard.c (kbd_buffer_get_event): Read special events also in
6209 batch mode. (Bug#11415)
6210
9e6b06ed
GM
62112012-05-12 Glenn Morris <rgm@gnu.org>
6212
6213 * ns.mk: Update for ns_appbindir no longer having trailing "/".
6214
c1a1d7a3
EZ
62152012-05-12 Eli Zaretskii <eliz@gnu.org>
6216
6217 * lisp.mk (lisp): Add newcomment.elc.
6218
3fe7cdc8
GM
62192012-05-12 Glenn Morris <rgm@gnu.org>
6220
6221 * Makefile.in (MKDIR_P): New, set by configure.
6222 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
6223
53f7d2c0
PE
62242012-05-11 Paul Eggert <eggert@cs.ucla.edu>
6225
6226 Remove unused function hourglass_started.
6227 * dispextern.h (hourglass_started):
6228 * w32fns.c (hourglass_started):
6229 * xdisp.c (hourglass_started): Remove.
6230
75aafb17
JB
62312012-05-10 Juanma Barranquero <lekktu@gmail.com>
6232
6233 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
6234 Update dependencies.
6235
12959e8e
PE
62362012-05-10 Paul Eggert <eggert@cs.ucla.edu>
6237
97107e2e
PE
6238 * xgselect.c (xg_select): Put maxfds+1 into a var.
6239 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
6240
12959e8e
PE
6241 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
6242
836d29b3
DA
62432012-05-10 Dave Abrahams <dave@boostpro.com>
6244
6245 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
6246 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
6247
5cb67954
MA
62482012-05-09 Michael Albinus <michael.albinus@gmx.de>
6249
6250 * dbusbind.c (xd_registered_buses): New internal Lisp object.
6251 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
6252 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
6253 Initialize xd_registered_buses.
6254
3478ec45
PE
62552012-05-09 Paul Eggert <eggert@cs.ucla.edu>
6256
b263a6b0
PE
6257 Untag more efficiently if USE_LSB_TAG.
6258 This is based on a proposal by YAMAMOTO Mitsuharu in
6259 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
6260 For an admittedly artificial (nth 8000 longlist) benchmark on
6261 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
6262 Emacs's overall text size by 1%.
6263 * lisp.h (XUNTAG): New macro.
6264 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
6265 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
6266 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
6267 * eval.c (Fautoload):
6268 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
6269 * frame.h (XFRAME): Use XUNTAG.
6270
3478ec45
PE
6271 Port recent dbusbind.c changes to 32-bit --with-wide-int.
6272 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
6273 Remove unportable assumptions about print widths of types like
6274 dbus_uint32_t.
6275 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
6276 intptr_t when converting between pointer and integer, to avoid GCC
6277 warnings about wrong width.
6278
666b903b 62792012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
6280
6281 * w32proc.c (new_child): Force Windows to reserve only 64KB of
6282 stack for each reader_thread, instead of defaulting to 8MB
6283 determined by the linker. This avoids failures in creating
6284 subprocesses on Windows 7, see the discussion in this thread:
6285 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
6286
b120cc17
JC
62872012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
6288
6289 Fix up display of the *Minibuf-0* buffer in the mini window.
6290 * keyboard.c (read_char): Don't clear the echo area if there's no
6291 message to clear.
6292 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 6293 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 6294
9a4b36f8
MA
62952012-05-07 Michael Albinus <michael.albinus@gmx.de>
6296
6297 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
6298 batch mode.
6299
e5f9458f
CY
63002012-05-06 Chong Yidong <cyd@gnu.org>
6301
6302 * lisp.mk (lisp): Update.
6303
eceeb5fc 63042012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
6305
6306 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
6307
71873e2b
SM
63082012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
6309
6310 * data.c (PUT_ERROR): New macro.
6311 (syms_of_data): Use it. Add new error type `user-error'.
6312 * undo.c (user_error): New function.
6313 (Fprimitive_undo): Use it.
6314 * print.c (print_error_message): Adjust print style for `user-error'.
6315 * keyboard.c (user_error): New function.
6316 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
6317
ab0fa4e4
PE
63182012-05-03 Paul Eggert <eggert@cs.ucla.edu>
6319
6320 Do not limit current-time-string to years 1000..9999.
6321 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
6322 (Fcurrent_time_string): Support any year that is supported by the
6323 underlying localtime representation. Don't use asctime, as it
6324 has undefined behavior for years outside the range -999..9999.
6325
7ed806a7
PE
63262012-05-02 Paul Eggert <eggert@cs.ucla.edu>
6327
6328 Fix race conditions involving setenv, gmtime, localtime, asctime.
6329 Without this fix, interrupts could mess up code that uses these
6330 nonreentrant functions, since setting TZ invalidates existing
6331 tm_zone or tzname values, and since most of these functions return
6332 pointers to static storage.
6333 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
6334 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
6335 Grow the critical sections to include not just invoking
6336 localtime/gmtime, but also accessing these functions' results
6337 including their tm_zone values if any, and any related TZ setting.
6338 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
6339 so that the struct tm is saved in the critical section.
6340 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
6341 motivated by the fact that memory allocation needs to be outside
6342 the critical section.
6343
0c16dfed
DA
63442012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
6345
6346 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
6347 with RESET_INTERVAL.
6348
6349 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
6350 Remove duplicated buffer name initialization.
6351
3f83ace8
JM
63522012-05-02 Jim Meyering <jim@meyering.net>
6353
6354 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
6355
c7b8541e
JM
6356 * xfns.c (x_window): Use xstrdup (Bug#11375).
6357
90207a15 63582012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
6359
6360 * xdisp.c (pos_visible_p): If already at a newline from the
6361 display string before the 'while' loop, don't walk back the glyphs
6362 from it3.glyph_row. Solves assertion violation when the display
6363 string begins with a newline (egg.el). (Bug#11367)
6364
b593d6a9
AH
63652012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
6366
6367 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
6368 Move to simple.el.
6369
4737362e
GM
63702012-05-01 Glenn Morris <rgm@gnu.org>
6371
99cf43f9
GM
6372 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
6373 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
6374 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
6375 All were removed before 23.1.
6376
9311dcff
GM
6377 * dispnew.c: Remove HAVE_LIBNCURSES test;
6378 it is always true on relevant platforms.
6379
4d5c6349
GM
6380 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
6381 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
6382
4737362e
GM
6383 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
6384
74dd3a6b
AS
63852012-04-30 Andreas Schwab <schwab@linux-m68k.org>
6386
6387 * .gdbinit (xpr): Remove checks for no longer existing misc types.
6388 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
6389 Remove.
6390
13c379ee
PE
63912012-04-28 Paul Eggert <eggert@cs.ucla.edu>
6392
6393 Do not avoid creating empty evaporating overlays (Bug#9642).
6394 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
6395 That is, do not delete an evaporating overlay if it becomes
6396 empty after its bounds are adjusted to fit within its buffer.
6397 This fix caused other problems, and I'm reverting it until we get
6398 to the bottom of them.
6399
a8e7d6d7 64002012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
6401
6402 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
6403
a8e7d6d7 64042012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
6405
6406 * xdisp.c (pos_visible_p): If the window start position is beyond
6407 ZV, start the display from buffer beginning. Prevents assertion
6408 violation in init_iterator when the minibuffer window is scrolled
6409 via the scroll bar.
6410
6411 * window.c (window_scroll_pixel_based): Likewise.
6412
a8e7d6d7 64132012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
6414
6415 * keymap.c (where_is_internal): Doc fix (Bug#10872).
6416
a8e7d6d7 64172012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
6418
6419 * fileio.c (Fcopy_file, Fset_file_selinux_context):
6420 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
6421
a8e7d6d7 64222012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 6423
b593d6a9
AH
6424 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
6425 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 6426
1c6900d9
EZ
64272012-04-26 Eli Zaretskii <eliz@gnu.org>
6428
4c3fa1d9
EZ
6429 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
6430 display element, check also the underlying string or buffer
6431 character. (Bug#11341)
6432
1c6900d9
EZ
6433 * w32menu.c: Include w32heap.h.
6434 (add_menu_item): If the call to AppendMenuW (via
6435 unicode_append_menu) fails, disable Unicode menus only if we are
6436 running on Windows 9X/Me.
6437
42bf8205
AS
64382012-04-24 Andreas Schwab <schwab@linux-m68k.org>
6439
6440 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
6441 (xgetint): Add missing shift for LSB tags.
6442
b1bac16e
MR
64432012-04-24 Martin Rudalics <rudalics@gmx.at>
6444
6445 * keyboard.c (read_char): Don't wipe echo area for select window
6446 events: These might get delayed via `mouse-autoselect-window'
6447 (Bug#11304).
6448
d69621cc
JB
64492012-04-24 Juanma Barranquero <lekktu@gmail.com>
6450
6451 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
6452 manipulation of :loaded-from data.
6453
02fd101b
JB
64542012-04-23 Juanma Barranquero <lekktu@gmail.com>
6455
6456 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
6457 now a cons (bug#11311).
6458
888bec30
PE
64592012-04-23 Paul Eggert <eggert@cs.ucla.edu>
6460
89a438bd
PE
6461 Do not create empty overlays with the evaporate property (Bug#9642).
6462 * buffer.c (Fmove_overlay): Delete an evaporating overlay
6463 if it becomes empty after its bounds are adjusted to fit within
6464 its buffer. Without this fix, in a nonempty buffer (let ((o
6465 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
6466 yields an empty overlay that has the evaporate property, which is
6467 not supposed to happen.
6468
1068fe4d
PE
6469 Fix minor GTK3 problems found by static checking.
6470 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6471 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6472 (struct _EmacsFixedClass, emacs_fixed_get_type):
6473 Move decls here from emacsgtkfixed.h, since they needn't be public.
6474 (emacs_fixed_get_type): Now static.
6475 (emacs_fixed_class_init): Omit unused local.
6476 (emacs_fixed_child_type): Remove; unused.
6477 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6478 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6479 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
6480 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
6481 (EMACS_FIXED_GET_CLASS): Remove; unused.
6482 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
6483
888bec30
PE
6484 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
6485 Problem reported by Juanma Barranquero for Windows -Wunused-function.
6486
de85e130
PE
64872012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6488
d0baac98 6489 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 6490 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
6491 (__malloc_size_t, __malloc_ptrdiff_t):
6492 Remove. All uses removed, replaced by the definiens if needed,
6493 since we can assume C89 or better now.
6494 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
6495 (protect_malloc_state, align, get_contiguous_space)
6496 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
6497 (malloc_atfork_handler_child, malloc_enable_thread)
6498 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
6499 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
6500 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
6501 (special_realloc, _realloc_internal_nolock, _realloc_internal)
6502 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
6503 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
6504 Define using prototypes, not old style.
6505 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
6506 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
6507 (align): Don't assume that signed integer overflow wraps around.
6508 Omit unused local var.
6509 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
6510 (_free_internal_nolock, memalign, mallochook, reallochook):
6511 Omit no-longer-needed casts.
6512 (valloc): Use getpagesize, not __getpagesize.
6513 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
6514 (struct hdr): The 'magic' member is now size_t, not unsigned long.
6515
de85e130
PE
6516 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
6517
dcbf5805
MA
65182012-04-22 Michael Albinus <michael.albinus@gmx.de>
6519
6520 Move functions from C to Lisp. Make non-blocking method calls
6521 the default. Implement further D-Bus standard interfaces.
6522
6523 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
6524 (QCdbus_request_name_allow_replacement)
6525 (QCdbus_request_name_replace_existing)
6526 (QCdbus_request_name_do_not_queue)
6527 (QCdbus_request_name_reply_primary_owner)
6528 (QCdbus_request_name_reply_in_queue)
6529 (QCdbus_request_name_reply_exists)
6530 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
6531 (QCdbus_registered_serial, QCdbus_registered_method)
6532 (QCdbus_registered_signal): New Lisp objects.
6533 (XD_DEBUG_MESSAGE): Use sizeof.
6534 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
6535 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
6536 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
6537 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
6538 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
6539 (xd_signature, xd_append_arg): Allow float for integer types.
6540 (xd_get_connection_references): New function.
b593d6a9
AH
6541 (xd_get_connection_address): Rename from xd_initialize.
6542 Return cached address.
dcbf5805
MA
6543 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
6544 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
6545 level.
6546 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 6547 Return number of refcounts.
dcbf5805
MA
6548 (Fdbus_get_unique_name): Make stronger parameter check.
6549 (Fdbus_message_internal): New defun.
6550 (Fdbus_call_method, Fdbus_call_method_asynchronously)
6551 (Fdbus_method_return_internal, Fdbus_method_error_internal)
6552 (Fdbus_send_signal, Fdbus_register_service)
6553 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
6554 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
6555 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
6556 (Vdbus_compiled_version, Vdbus_runtime_version)
6557 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
6558 (Vdbus_message_type_method_return, Vdbus_message_type_error)
6559 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
6560 (Vdbus_registered_buses, Vdbus_registered_objects_table):
6561 Adapt docstring.
dcbf5805 6562
52828e02
PE
65632012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6564
da05bc4c
PE
6565 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
6566 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
6567 Do not assume ptrdiff_t is the same width as 'int'.
6568
52828e02
PE
6569 * alloc.c: Handle unusual debugging option combinations.
6570 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
6571 since the two debugging options are incompatible.
6572 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
6573 is defined.
6574 (mem_init, mem_insert, mem_insert_fixup):
6575 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
6576 (NEED_MEM_INSERT): Remove; no longer needed.
6577
f01769f9
LL
65782012-04-22 Leo Liu <sdl.web@gmail.com>
6579
6580 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
6581
5790543d
PE
65822012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6583
6584 * sysdep.c [__FreeBSD__]: Minor cleanups.
6585 (list_system_processes, system_process_attributes) [__FreeBSD__]:
6586 Use Emacs indenting style more consistently. Avoid some casts.
6587 Use 'double' consistently rather than mixing 'float' and 'double'.
6588
b91b7e4d
EW
65892012-04-21 Eduard Wiebe <usenet@pusto.de>
6590
b593d6a9
AH
6591 * sysdep.c (list_system_processes, system_process_attributes):
6592 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 6593
6114eb15
AS
65942012-04-21 Andreas Schwab <schwab@linux-m68k.org>
6595
6596 * lisp.mk (lisp): Update.
6597
2f38dff7
PE
65982012-04-20 Paul Eggert <eggert@cs.ucla.edu>
6599
6600 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
6601 It is never used otherwise.
6602
4ae29f89
SM
66032012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
6604
6605 * print.c (print_preprocess): Only check print_depth if print-circle
6606 is nil.
6607 (print_object): Check for cycles even when print-circle is nil and
6608 print-gensym is t, but only check print_depth if print-circle is nil.
6609
f30d612a
CY
66102012-04-20 Chong Yidong <cyd@gnu.org>
6611
6612 * process.c (wait_reading_process_output): If EIO occurs on a pty,
6613 set the status to "failed" and ensure that sentinel is run.
6614
c07a4c0b 66152012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
6616
6617 * process.c (Fset_process_inherit_coding_system_flag)
6618 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 6619 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 6620
c07a4c0b 66212012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
6622
6623 * xdisp.c (string_buffer_position_lim): Limit starting position to
6624 BEGV.
6625 (set_cursor_from_row): If called for a mode-line or header-line
6626 row, return zero immediately.
6627 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
6628 farther than the first row after the header line, if any.
6629 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
6630 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
6631
c07a4c0b 66322012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 6633
4ae29f89
SM
6634 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
6635 (bug#11238).
ad3a2b41 6636
c07a4c0b 66372012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 66382012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
6639
6640 configure: new option --enable-gcc-warnings (Bug#11207)
6641 * Makefile.in (C_WARNINGS_SWITCH): Remove.
6642 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6643 (ALL_CFLAGS): Use new macros rather than old.
6644 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
6645 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
6646 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
6647 -Wunused-result, -Wunused-variable. This should go away once
6648 the Emacs and Gnulib regex code is merged.
6649 (xmalloc, xrealloc): Now static.
6650
aba027e8
PE
66512012-04-17 Paul Eggert <eggert@cs.ucla.edu>
6652
6653 * dired.c (Fsystem_groups): Remove unused local.
6654
e5a36063
GM
66552012-04-17 Glenn Morris <rgm@gnu.org>
6656
6657 * dired.c (Fsystem_users): Doc fix.
6658
316411f0
DA
66592012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
6660
6661 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
6662 (syms_of_dired): Add them.
6663
9426aba4
PE
66642012-04-16 Paul Eggert <eggert@cs.ucla.edu>
6665
b62a57be
PE
6666 Fix minor alloc.c problems found by static checking.
6667 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
6668 New extern decls, to avoid calling undeclared functions.
6669 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
6670 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
6671 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
6672 (NEED_MEM_INSERT): New macro.
6673 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 6674 Remove one incorrect comment and fix another.
b62a57be 6675
3539f31f
PE
6676 Fix minor ralloc.c problems found by static checking.
6677 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6678 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
6679 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
6680 (r_alloc_sbrk): Now static.
6681
a041960a
PE
6682 Improve ralloc.c interface checking.
6683 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6684 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
6685 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
6686 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
6687 [REL_ALLOC]: ... to here, to check interface.
6688 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
6689 Remove decls. This fixes an "It stinks!".
6690
9426aba4
PE
6691 * alloc.c (which_symbols): Fix alignment issue / type clash.
6692
d55c12ed
AS
66932012-04-15 Andreas Schwab <schwab@linux-m68k.org>
6694
6695 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
6696 (struct Lisp_Misc_Any): Likewise.
6697 (struct Lisp_Free): Likewise.
6698 * alloc.c (union aligned_Lisp_Symbol): Define.
6699 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
6700 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
6701 (union aligned_Lisp_Misc): Define.
6702 (MARKER_BLOCK_SIZE, struct marker_block): Use union
6703 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 6704 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 6705
b948ce8b
PE
67062012-04-14 Paul Eggert <eggert@cs.ucla.edu>
6707
6708 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
6709 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
6710 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
6711 * s/netbsd.h, s/sol2-6.h:
6712 Remove definition of GC_MARK_STACK, since the default now works.
6713 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
6714 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
6715 no longer the default.
6716 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
6717
35dc09a1 67182012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 6719
35dc09a1
GM
6720 * lread.c (lisp_file_lexically_bound_p):
6721 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 6722
35dc09a1
GM
67232012-04-14 Eli Zaretskii <eliz@gnu.org>
6724
6725 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
6726 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
6727
67282012-04-14 Jan Djärv <jan.h.d@swipnet.se>
6729
6730 * nsterm.m (constrainFrameRect): Always constrain when there is only
6731 one screen (Bug#10962).
6732
bcd86815
KB
67332012-04-13 Ken Brown <kbrown@cornell.edu>
6734
6735 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
6736
c25df26e
RT
67372012-04-13 Reuben Thomas <rrt@sc3d.org>
6738
6739 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
6740
0fc59f1e
DC
67412012-04-11 Daniel Colascione <dancol@dancol.org>
6742
6743 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
6744 against is gone. It's better to use vfork now so that when Cygwin
6745 gains a new, working vfork, we use it automatically (bug#10398).
6746
de8c03dc
SM
67472012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6748
6749 * window.c (save_window_save): Obey window-point-insertion-type.
6750
2f097256
GM
67512012-04-11 Glenn Morris <rgm@gnu.org>
6752
6753 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
6754
453b951e
SM
67552012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6756
6757 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
6758
75f1671a 67592012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
6760
6761 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
6762 (force_quit_count): New var.
6763 (handle_interrupt): Use it.
6764
2a8ce227
JB
67652012-04-10 Juanma Barranquero <lekktu@gmail.com>
6766
6767 * w32.c (w32_delayed_load): Record the full path of the library
6768 being loaded (bug#10424).
6769
935396c0
GM
67702012-04-09 Glenn Morris <rgm@gnu.org>
6771
05920a43
GM
6772 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
6773 not just in the obarray, before snarfing them. (Bug#11036)
6774
935396c0
GM
6775 * Makefile.in ($(leimdir)/leim-list.el):
6776 Pass EMACS rather than BUILT_EMACS.
6777
a18ecafa
TZ
67782012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
6779
6780 * process.c (make_process):
6781 * process.h: Add integer `gnutls_handshakes_tried' member to
6782 process struct.
6783
6bbef4e5
JC
6784 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
6785 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
6786
6787 * gnutls.c (gnutls_log_function2i): Convenience log function.
6788 (emacs_gnutls_read): Use new log functions,
6789 `gnutls_handshakes_tried' process member, and
6790 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
6791 attempts per process (connection).
6792
b4d3bc10
CY
67932012-04-09 Chong Yidong <cyd@gnu.org>
6794
6795 * eval.c (Fuser_variable_p, user_variable_p_eh)
6796 (lisp_indirect_variable): Functions deleted.
6797 (Fdefvar): Caller changed.
6798
6799 * callint.c (Finteractive, Fcall_interactively):
6800 * minibuf.c (Fread_variable): Callers changed.
6801
70f4d973
EZ
68022012-04-09 Eli Zaretskii <eliz@gnu.org>
6803
6804 * xdisp.c (set_cursor_from_row): If the display string appears in
6805 the buffer at position that is closer to point than the position
6806 after the display string, display the cursor on the first glyph of
6807 the display string. Fixes cursor display when a 'display' text
6808 property immediately follows invisible text. (Bug#11094)
6809
cb3c2e3e
PE
68102012-04-09 Paul Eggert <eggert@cs.ucla.edu>
6811
6812 composite.c: use 'double' consistently
6813 * composite.c (get_composition_id): Use 'double' consistently
6814 instead of converting 'float' to 'double' and vice versa; this is
6815 easier to understand and avoids a GCC warning.
6816
fd06db5d
GM
68172012-04-09 Glenn Morris <rgm@gnu.org>
6818
50fe702a
GM
6819 * Makefile.in: Generate leim-list with bootstrap-emacs, in
6820 preparation for dumping it with emacs. (Bug#4789)
6821 (leimdir): New variable.
6822 ($(leimdir)/leim-list.el): New rule.
6823 (emacs$(EXEEXT)): Depend on leim-list.el.
6824
fd06db5d
GM
6825 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
6826 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
6827 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
6828
55c131ee
AS
68292012-04-08 Andreas Schwab <schwab@linux-m68k.org>
6830
6831 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
6832 proper alignment.
6833
9209588f
JB
68342012-04-07 Juanma Barranquero <lekktu@gmail.com>
6835
6836 * xml.c (init_libxml2_functions) [WINDOWSNT]:
6837 Remove unused local variable.
6838
e3fb2efb
PE
68392012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6840
6841 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
6842 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
6843 (mark_memory): Mark Lisp_Objects only if pointers might hide in
6844 objects, as mark_maybe_pointer will catch them otherwise.
6845 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
6846 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
6847
b5385551
PE
68482012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6849
6850 Fix typo that broke non-Windows builds.
6851 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
6852
9078ead6
EZ
68532012-04-07 Eli Zaretskii <eliz@gnu.org>
6854
6855 Support building on MS-Windows with libxml2.
6856
6857 * makefile.w32-in (OBJ2): Add xml.$(O).
6858 (GLOBAL_SOURCES): Add xml.c.
6859 ($(BLD)/xml.$(O)): New dependency list.
6860
6861 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
6862 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
6863 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
6864 [!WINDOWSNT]: New macros.
6865 (init_libxml2_functions, libxml2_loaded_p): New functions.
6866 (parse_region): Call fn_xmlCheckVersion instead of using the macro
6867 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
6868 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
6869 Calls xmlCleanupParser only if libxml2 was loaded (or statically
6870 linked in).
6bbef4e5
JC
6871 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
6872 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
6873 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
6874
6875 * emacs.c: Don't include libxml/parser.h.
6876 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
6877 xmlCleanupParser directly.
6878
6879 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
6880
3811fdf3
EZ
68812012-04-07 Eli Zaretskii <eliz@gnu.org>
6882
6883 * indent.c (Fvertical_motion): If there is a display string at
6884 point, use it.vpos to compute how many lines to backtrack after
6885 move_it_to point. (Bug#11133)
6886
2f8e16b2
EZ
68872012-04-06 Eli Zaretskii <eliz@gnu.org>
6888
6889 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
6890 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
6891 about subtle differences between FETCH_CHAR* and STRING_CHAR*
6892 macros related to unification of CJK characters. For the details,
6893 see the discussion following the message here:
6894 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
6895
3d439cd1
CY
68962012-04-04 Chong Yidong <cyd@gnu.org>
6897
6898 * keyboard.c (Vdelayed_warnings_list): Doc fix.
6899
8bc53d00
EZ
69002012-04-01 Eli Zaretskii <eliz@gnu.org>
6901
6902 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
6903 instead of alloca. (Bug#11138)
6904
3b0512a3
AS
69052012-04-01 Andreas Schwab <schwab@linux-m68k.org>
6906
6907 * w32menu.c (is_simple_dialog): Properly check lisp types.
6908 (Bug#11141)
6909
8427ddd2
EZ
69102012-03-31 Eli Zaretskii <eliz@gnu.org>
6911
979022ef
EZ
6912 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
6913 position we get to after a call to move_it_to fails the
6914 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
6915 only if we wind up in a string from display property. (Bug#11063)
6916
a6b1c7cc
EZ
6917 * window.c (Fdelete_other_windows_internal): Invalidate the row
6918 and column information about mouse highlight, so that redisplay
6919 restores it after reallocating the glyph matrices. (Bug#7464)
6920
8427ddd2
EZ
6921 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
6922 string comes from a `display' text property, use the buffer
6923 position of that property as if we actually saw that position in
6924 the row's glyphs.
697ba24b
EZ
6925 (move_it_by_lines): Remove the assertion that
6926 "it->current_x == 0 && it->hpos == 0" which can be legitimately
6927 violated when there's a before-string at the beginning of a line.
6928 (Bug#11063)
8427ddd2 6929
65a0a738
EZ
69302012-03-30 Eli Zaretskii <eliz@gnu.org>
6931
6932 * xdisp.c (append_space_for_newline): If the default face was
6933 remapped, use the remapped face for the appended newline.
6934 (extend_face_to_end_of_line): Use the remapped default face for
6935 extending the face to the end of the line.
6936 (display_line): Call extend_face_to_end_of_line when the default
6937 face was remapped. (Bug#11068)
6938
581355cc
EZ
69392012-03-29 Eli Zaretskii <eliz@gnu.org>
6940
6941 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
6942
e8fc049f
SM
69432012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
6944
6945 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
6946
4fb9a543
GM
69472012-03-27 Glenn Morris <rgm@gnu.org>
6948
6949 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
6950 Doc fixes.
6951
679910f1
KH
69522012-03-26 Kenichi Handa <handa@m17n.org>
6953
6954 * dispextern.h (struct glyph): Fix previous change. Change the
6955 bit length of glyphless.ch to 25 (Bug#11082).
6956
90d49b7f
CY
69572012-03-26 Chong Yidong <cyd@gnu.org>
6958
6959 * keyboard.c (Vselection_inhibit_update_commands): New variable.
6960 (command_loop_1): Use it; inhibit selection update for
6961 handle-select-window too (Bug#8996).
6962
f514f6f0
FP
69632012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
6964
e8fc049f 6965 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 6966
bf43fa51
KH
69672012-03-25 Kenichi Handa <handa@m17n.org>
6968
6969 * dispextern.h (struct glyph): Change the bit length of
6970 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
6971
8a0c01dd
EZ
69722012-03-24 Eli Zaretskii <eliz@gnu.org>
6973
6974 * s/ms-w32.h (tzname): Include time.h before redirecting to
6975 _tzname. Fixes the MSVC build. (Bug#9960)
6976
7d1c3a76
AS
69772012-03-24 Andreas Schwab <schwab@linux-m68k.org>
6978
8ed79523
AS
6979 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
6980 characters.
6981
7d1c3a76
AS
6982 * xterm.c (XTread_socket): Only modify handling_signal if
6983 !SYNC_INPUT. (Bug#11080)
6984
e99a9b8b
EZ
69852012-03-23 Eli Zaretskii <eliz@gnu.org>
6986
6987 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
6988 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
6989 when fetching a multibyte character consumes more bytes than
6990 CHAR_BYTES returns, due to unification of CJK characters in
6991 string_char. (Bug#11073)
6992
5063c0e1
TN
69932012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
6994
6995 * process.c (wait_reading_process_output): Handle pty disconnect
6996 by refraining from sending oneself a SIGCHLD (bug#10933).
6997
9f851fbd
CY
69982012-03-22 Chong Yidong <cyd@gnu.org>
6999
7000 * dispextern.h (struct it): New member string_from_prefix_prop_p.
7001
5063c0e1 7002 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
7003 Mark string as coming from a prefix property.
7004 (handle_face_prop): Use default face for prefix strings (Bug#4281).
7005 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
7006
fb5b8aca
CY
70072012-03-21 Chong Yidong <cyd@gnu.org>
7008
7009 * xfaces.c (Vface_remapping_alist): Doc fix.
7010
62356a1b
EZ
70112012-03-20 Eli Zaretskii <eliz@gnu.org>
7012
7013 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
7014 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
7015 Doc fixes.
62356a1b 7016
025de85b
CY
70172012-03-20 Chong Yidong <cyd@gnu.org>
7018
7019 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
7020 to reflect default non-nil value of redisplay-dont-pause.
7021
4827f94e
KH
70222012-03-19 Kenichi Handa <handa@m17n.org>
7023
7024 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
7025 it fit in a valid range (Bug#11003).
7026
e50a24a2
EZ
70272012-03-18 Eli Zaretskii <eliz@gnu.org>
7028
7029 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
7030 that is not from display property, accept the row as a "cursor
7031 row" if one of the string's character has a non-nil `cursor'
7032 property. Fixes cursor positioning when there are newlines in
7033 overlay strings, e.g. in icomplete.el. (Bug#11035)
7034
9af5ed87
PE
70352012-03-12 Paul Eggert <eggert@cs.ucla.edu>
7036
7037 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
7038
d1f55f16
CY
70392012-03-12 Chong Yidong <cyd@gnu.org>
7040
7041 * eval.c (inhibit_lisp_code): Rename from
7042 inhibit_window_configuration_change_hook; move from window.c.
7043
7044 * xfns.c (unwind_create_frame_1, Fx_create_frame):
7045 * window.c (run_window_configuration_change_hook)
7046 (syms_of_window): Callers changed.
7047
66c5eebd
CY
70482012-03-11 Chong Yidong <cyd@gnu.org>
7049
413df973
CY
7050 * keymap.c (Fkey_description): Doc fix (Bug#9700).
7051
66c5eebd
CY
7052 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
7053
1de11f56
CY
70542012-03-10 Chong Yidong <cyd@gnu.org>
7055
7056 * frame.c (other_visible_frames): Don't assume the selected frame
7057 is visible (Bug#10955).
7058
cae07000
SM
70592012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
7060
7061 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
7062
89c94350
JD
70632012-03-08 Jan Djärv <jan.h.d@swipnet.se>
7064
7065 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
7066 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
7067 zero (Bug#10954).
7068
999dd333
GM
70692012-03-03 Glenn Morris <rgm@gnu.org>
7070
01a6dcc8 7071 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 7072
de0100f2
EZ
70732012-03-02 Eli Zaretskii <eliz@gnu.org>
7074
7075 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
7076 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
7077 (redisplay_window, next_element_from_string): Fix typos in
7078 comments.
3e441275
EZ
7079 (redisplay_window): Pass to move_it_vertically the margin in
7080 pixels, not in screen lines.
de0100f2 7081
96a72ee9
GM
70822012-03-02 Glenn Morris <rgm@gnu.org>
7083
7084 * buffer.c (buffer-list-update-hook): Doc fix.
7085
312508d7
EZ
70862012-02-29 Eli Zaretskii <eliz@gnu.org>
7087
7088 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
7089 push_it before setting up the iterator for the first overlay
7090 string, even if we have an empty string loaded.
7091 (next_overlay_string): If there's an empty string on the iterator
7092 stack, pop the stack. (Bug#10903)
7093
27f3c637
PE
70942012-02-25 Paul Eggert <eggert@cs.ucla.edu>
7095
7096 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
7097 Suggested by Stefan Monnier in
7098 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
7099 * alloc.c (widen_to_Lisp_Object): New static function.
7100 (mark_memory): Also mark Lisp_Objects by fetching pointer words
7101 and widening them to Lisp_Objects. This would work even if
7102 USE_LSB_TAG is defined and wide integers are used, which might
7103 happen in a future version of Emacs.
7104
3c9dfce6
CY
71052012-02-25 Chong Yidong <cyd@gnu.org>
7106
fa74b241
CY
7107 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
7108 Doc fix.
7109
3c9dfce6
CY
7110 * xselect.c (Fx_selection_exists_p): Doc fix.
7111 (x_clipboard_manager_save_all): Print an informative message
7112 before saving to clipboard manager.
7113
9486df08
CY
71142012-02-24 Chong Yidong <cyd@gnu.org>
7115
7116 * keyboard.c (process_special_events): Handle all X selection
7117 requests in kbd_buffer, not just the next one (Bug#8869).
7118
f01d3321
CY
71192012-02-23 Chong Yidong <cyd@gnu.org>
7120
7121 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
7122 call when setting menu-bar-lines and tool-bar-lines parameters.
7123 (unwind_create_frame_1): New helper function.
7124
7125 * window.c (inhibit_window_configuration_change_hook): New var.
7126 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 7127 (syms_of_window): Initialize it.
f01d3321 7128
86b847b6
CY
71292012-02-22 Chong Yidong <cyd@gnu.org>
7130
7131 * xterm.c (x_draw_image_relief): Add missing type check for
7132 Vtool_bar_button_margin (Bug#10743).
7133
a59225b1
CY
71342012-02-21 Chong Yidong <cyd@gnu.org>
7135
7136 * fileio.c (Vfile_name_handler_alist): Doc fix.
7137
7138 * buffer.c (Fget_file_buffer): Protect against invalid file
7139 handler return value.
7140
310f5bd4
PE
71412012-02-20 Paul Eggert <eggert@cs.ucla.edu>
7142
cb3a28cc
PE
7143 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
7144 when computing $valmask.
7145
310f5bd4
PE
7146 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
7147 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
7148 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
7149 It's useless in that case, and it can cause problems on hosts
7150 that allocate halves of EMACS_INT values separately.
7151 Reported by Dan Horák. Diagnosed by Andreas Schwab in
7152 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
7153 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
7154 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
7155 it avoids undefined behavior on hosts where shifting right by more
7156 than the word width has undefined behavior.
7157
2375c96a
CY
71582012-02-19 Chong Yidong <cyd@gnu.org>
7159
7160 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
7161 (Funhandled_file_name_directory, Ffile_name_as_directory)
7162 (Fdirectory_file_name, Fexpand_file_name)
7163 (Fsubstitute_in_file_name): Protect against invalid file handler
7164 return values (Bug#10845).
7165
3eb49e71
EZ
71662012-02-18 Eli Zaretskii <eliz@gnu.org>
7167
7168 * .gdbinit (pitx): Fix incorrect references to fields of the
7169 iterator stack.
7170
7b926f3f
CY
71712012-02-17 Chong Yidong <cyd@gnu.org>
7172
7173 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
7174
11273115
PE
71752012-02-15 Paul Eggert <eggert@cs.ucla.edu>
7176
7177 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
7178 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
7179
c3a70e2b
CY
71802012-02-15 Chong Yidong <cyd@gnu.org>
7181
7182 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
7183 marked as special. Also, starting docstrings with * is obsolete.
7184
0ca43699
AS
71852012-02-13 Andreas Schwab <schwab@linux-m68k.org>
7186
7187 * gnutls.c (emacs_gnutls_write): Fix last change.
7188
2e8f3c56
LI
71892012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
7190
7191 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
7192 send_process.
7193
af70074f
SM
71942012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
7195
7196 * keymap.c (Fsingle_key_description): Handle char ranges.
7197
95986d52
CY
71982012-02-12 Chong Yidong <cyd@gnu.org>
7199
afd83bd1
CY
7200 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
7201 as that creates a dangerous corner case.
7202
95986d52
CY
7203 * window.c (Fdelete_window_internal): Invalidate the mouse
7204 highlight (Bug#9904).
7205
bd7da63e
GM
72062012-02-12 Glenn Morris <rgm@gnu.org>
7207
7208 * xselect.c (Fx_own_selection_internal)
7209 (Fx_get_selection_internal, Fx_disown_selection_internal)
7210 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
7211 * nsselect.m (Fx_own_selection_internal)
7212 (Fx_disown_selection_internal, Fx_selection_exists_p)
7213 (Fx_selection_owner_p, Fx_get_selection_internal):
7214 Sync docs and argument specs with the xselect.c versions.
7215
77abcbc2
LI
72162012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
7217
7218 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
7219
90b671e2
EZ
72202012-02-11 Eli Zaretskii <eliz@gnu.org>
7221
1c0ca0b7
EZ
7222 * w32select.c (Fx_selection_exists_p): Sync doc string and
7223 argument list with xselect.c. (Bug#10783)
7224
7225 * w16select.c (Fx_selection_exists_p): Sync doc string and
7226 argument list with xselect.c. (Bug#10783)
90b671e2 7227
49241268
GM
72282012-02-10 Glenn Morris <rgm@gnu.org>
7229
7230 * fns.c (Fsecure_hash): Doc fix.
7231
f998bbe7 72322012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
7233
7234 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
7235
0992bd9c
CY
72362012-02-07 Chong Yidong <cyd@gnu.org>
7237
7238 * buffer.c (Fbuffer_local_variables)
7239 (buffer_lisp_local_variables): Handle unbound vars correctly;
7240 don't let Qunbound leak into Lisp.
7241
af008560
GM
72422012-02-07 Glenn Morris <rgm@gnu.org>
7243
dd605cc4
GM
7244 * image.c (Fimagemagick_types): Doc fix.
7245
af008560
GM
7246 * image.c (imagemagick-render-type): Change it from a lisp object
7247 to an integer. Move the doc here from the lisp manual.
7248 Treat all values not equal to 0 the same.
7249
1449fa1d
CY
72502012-02-06 Chong Yidong <cyd@gnu.org>
7251
7252 * doc.c (store_function_docstring): Avoid applying docstring of
7253 alias to base function (Bug#2603).
7254
3723ec07
AS
72552012-02-04 Andreas Schwab <schwab@linux-m68k.org>
7256
7257 * .gdbinit (pp1, pv1): Remove redundant defines.
7258 (pr): Use pp.
7259
79c1cc1e
CY
72602012-02-04 Chong Yidong <cyd@gnu.org>
7261
7262 * nsterm.m: Declare a global (Bug#10694).
7263
d7f29f8e
EZ
72642012-02-04 Eli Zaretskii <eliz@gnu.org>
7265
cae07000
SM
7266 * w32.c (get_emacs_configuration_options):
7267 Include --enable-checking, if specified, in the return value.
d7f29f8e 7268
3b95a6f9
MR
72692012-02-04 Martin Rudalics <rudalics@gmx.at>
7270
7271 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
7272 after rounding frame sizes. (Bug#9723)
7273
d6fa96a6
EZ
72742012-02-04 Eli Zaretskii <eliz@gnu.org>
7275
7276 * keyboard.c (adjust_point_for_property): Don't position point
7277 before BEGV. (Bug#10696)
7278
df0b2940
PE
72792012-02-03 Paul Eggert <eggert@cs.ucla.edu>
7280
7281 Handle overflow when computing char display width (Bug#9496).
7282 * character.c (char_width): Return EMACS_INT, not int.
7283 (char_width, c_string_width): Check for overflow when
7284 computing the width; this is possible now that individual
7285 characters can have unbounded width. Problem introduced
7286 by merge from Emacs 23 on 2012-01-19.
7287
6bee44d6
MA
72882012-02-02 Michael Albinus <michael.albinus@gmx.de>
7289
7290 * dbusbind.c (Fdbus_register_method): Mention the return value
7291 :ignore in the docstring.
7292
44f92739
GM
72932012-02-02 Glenn Morris <rgm@gnu.org>
7294
1b9f60cc
GM
7295 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
7296
44f92739
GM
7297 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
7298 Unconditionally set to t. (Bug#10673)
7299 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
7300 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
7301 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
7302
c5d3843c
KH
73032012-02-02 Kenichi Handa <handa@m17n.org>
7304
7305 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
7306 0, do not call append_composite_glyph.
7307
159462d4 73082012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
7309
7310 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
7311 NULL (Bug#6988).
7312 (x_produce_glyphs): If the component of a composition is a null
7313 string, set it->pixel_width to 1 to avoid zero-width glyph.
7314
78cef877
EZ
73152012-02-01 Eli Zaretskii <eliz@gnu.org>
7316
7317 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
7318 first 2 arguments are identical. This makes inserting large
7319 output from a subprocess an order of magnitude faster on
7320 MS-Windows, where all sbrk'ed memory is always contiguous.
7321
97897668
GM
73222012-01-31 Glenn Morris <rgm@gnu.org>
7323
7324 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 7325 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
7326 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
7327
31fd3586
GM
73282012-01-29 Glenn Morris <rgm@gnu.org>
7329
7330 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
7331
0e24a8b2
CY
73322012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
7333
7334 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
7335
cc0adcb0
CY
73362012-01-28 Chong Yidong <cyd@gnu.org>
7337
7338 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
7339
acc28cb9
CY
73402012-01-26 Chong Yidong <cyd@gnu.org>
7341
9c69cfb7
CY
7342 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
7343
acc28cb9
CY
7344 * search.c (Fsearch_forward, Fsearch_backward): Document negative
7345 repeat counts (Bug#10507).
7346
48da7392
GM
73472012-01-26 Glenn Morris <rgm@gnu.org>
7348
7349 * lread.c (syms_of_lread): Doc fix.
7350
14af5f7f
CY
73512012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
7352
7353 * coding.c (encode_designation_at_bol): Change return value to
7354 EMACS_INT.
7355
0b21c100
CY
73562012-01-25 Chong Yidong <cyd@gnu.org>
7357
7358 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
7359
3c2907f7
CY
73602012-01-21 Chong Yidong <cyd@gnu.org>
7361
7362 * floatfns.c (Fcopysign): Make the second argument non-optional,
7363 since nil is not allowed anyway.
7364
959ad23f
AS
73652012-01-21 Andreas Schwab <schwab@linux-m68k.org>
7366
7367 * process.c (read_process_output): Use p instead of XPROCESS (proc).
7368 (send_process): Likewise.
7369
34a02f46
MR
73702012-01-19 Martin Rudalics <rudalics@gmx.at>
7371
7372 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
7373 (Vwindow_persistent_parameters): Do not use Qstate.
7374 Rewrite doc-strings.
34a02f46 7375
1259009a 73762012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
7377
7378 * character.c (char_width): New function.
70d4fdf6
GM
7379 (Fchar_width, c_string_width, lisp_string_width):
7380 Use char_width (Bug#9496).
25ed9e61 7381
6a6ee00d
MR
73822012-01-16 Martin Rudalics <rudalics@gmx.at>
7383
7384 * window.c (Vwindow_persistent_parameters): New variable.
7385 (Fset_window_configuration, save_window_save): Handle persistent
7386 window parameters.
7387
c85efaf7
EZ
73882012-01-14 Eli Zaretskii <eliz@gnu.org>
7389
7390 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
7391 thrashing the stack of the thread. (Bug#9087)
7392
5944709e
PE
73932012-01-12 Paul Eggert <eggert@cs.ucla.edu>
7394
7395 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
7396
e71f5d99
EZ
73972012-01-11 Eli Zaretskii <eliz@gnu.org>
7398
7399 * xdisp.c (rows_from_pos_range): Handle the case where the
7400 highlight ends on a newline. (Bug#10464)
7401 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
7402 he end column for display of highlight that ends on a newline
7403 before a R2L line.
7404
ce316182
GM
74052012-01-11 Glenn Morris <rgm@gnu.org>
7406
7407 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
7408 from load-path also when installation-directory is nil. (Bug#10208)
7409
5b43da69
GM
74102012-01-10 Glenn Morris <rgm@gnu.org>
7411
74cc8ff9
GM
7412 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
7413
7d8d6e4e
GM
7414 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
7415 Update template values to be closer to their typical values these days.
5b43da69 7416
a0db8d43
EZ
74172012-01-09 Eli Zaretskii <eliz@gnu.org>
7418
7419 * xdisp.c (rows_from_pos_range): Accept additional argument
7420 DISP_STRING, and accept any glyph in a row whose object is that
7421 string as eligible for mouse highlight. Fixes mouse highlight of
7422 display strings from overlays. (Bug#10464)
7423
9a0115ab 74242012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 7425
b9110d6a 7426 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
7427 * fileio.c (auto_saving_dir_umask): New static var.
7428 (Fmake_directory_internal): Use it.
7429 (do_auto_save_make_dir): Set it, instead of invoking chmod after
7430 creating the directory. The old code temporarily assigns
7431 too-generous permissions to the directory.
7432 (do_auto_save_eh): Clear it.
b9110d6a 7433 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
7434 that the var is always cleared.
7435
6c1bd3f3
EZ
74362012-01-07 Eli Zaretskii <eliz@gnu.org>
7437
7438 * search.c (scan_buffer): Pass character positions to
7439 know_region_cache, not byte positions. (Bug#6540)
7440
069d2b50
L
74412012-01-07 LynX <_LynX@bk.ru> (tiny change)
7442
7443 * w32.c (sys_rename): Report EXDEV when rename of a directory
7444 fails because the target is on another logical disk. (Bug#10284)
7445
75bf0d33
DB
74462012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
7447
7448 * xterm.c (x_embed_request_focus): New function.
7449
7450 * xterm.h: Add prototype.
7451
7452 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
7453
1c6e5a32
GM
74542012-01-05 Glenn Morris <rgm@gnu.org>
7455
7456 * emacs.c (emacs_copyright): Update short copyright year to 2012.
7457
651e947e
EZ
74582012-01-01 Eli Zaretskii <eliz@gnu.org>
7459
7460 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
7461 Load gnutls_transport_set_lowat only if GnuTLS version is below
7462 2.11.1.
7463 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
7464 GnuTLS versions below 2.11.1.
7465
3778cdd8
AL
74662011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
7467
7468 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
7469 to the doc string advising against its use for altering the way
7470 windows are scrolled.
7471
0e5317f7
KH
74722011-12-28 Kenichi Handa <handa@m17n.org>
7473
7474 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
7475 coding-system ASCII compatible only when it does not produce BOM
7476 on encoding (Bug#10383).
7477
93d5ca1f
JD
74782011-12-26 Jan Djärv <jan.h.d@swipnet.se>
7479
7480 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
7481 can scroll.
7482 (create_and_show_popup_menu): Always use menu_position_func for
7483 Gtk3 (Bug#10361).
7484
ca22b785
AS
74852011-12-24 Andreas Schwab <schwab@linux-m68k.org>
7486
7487 * callint.c (Fcall_interactively): Don't truncate prompt string.
7488
d048e1e6
EZ
74892011-12-23 Eli Zaretskii <eliz@gnu.org>
7490
7491 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
7492 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 7493 resumed from there (after widening). (Bug#10360)
d048e1e6 7494
5ccaba1f
JD
74952011-12-22 Jan Djärv <jan.h.d@swipnet.se>
7496
7497 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
7498
204ee57f
JD
74992011-12-21 Jan Djärv <jan.h.d@swipnet.se>
7500
b81d40f0
JB
7501 * nsterm.m (x_free_frame_resources):
7502 Release f->output_data.ns->miniimage.
204ee57f
JD
7503 (ns_index_color): Fix indentation. Do not retain
7504 color_table->colors[i].
7505
7506 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
7507 before returning.
7508
7509 * nsfns.m (x_set_background_color): Assign return value from
7510 ns_index_color to face-background instead of NSColor*.
7511 (ns_implicitly_set_icon_type): Fix indentation.
7512 Change assignment in for loop to comparison.
7513
7514 * emacs.c (ns_pool): New variable.
7515 (main): Assign ns_pool.
7516 (Fkill_emacs): Call ns_release_autorelease_pool.
7517
7518 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
7519 autorelease fdesc, release fdAttrs and tdict.
7520 (ns_get_covering_families): Release charset.
7521 (ns_findfonts): Release NSFontDescriptor created with new.
7522 (ns_uni_to_glyphs): Fix indentation.
7523 (setString): Release attrStr before assigning new value.
7524
c803b2b7
JD
75252011-12-18 Jan Djärv <jan.h.d@swipnet.se>
7526
678f4426
JD
7527 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
7528 and NS_IMPL_COCOA.
7529 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
7530 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
7531
cd394be1 75322011-12-18 David Reitter <reitter@cmu.edu>
678f4426 7533
5fecd5fc
JD
7534 * nsterm.m (ns_term_init): Subscribe for notifications
7535 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
7536 to method trackingNotification in EmacsMenu.
7537
7538 * nsmenu.m (trackingMenu): New variable.
3771cb17 7539 (trackingNotification): New method (from Aquamacs).
5fecd5fc 7540 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 7541 from Aquamacs (Bug#7030).
678f4426
JD
7542
75432011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 7544
c803b2b7
JD
7545 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
7546 (symbol_to_nsstring): Fix indentation.
7547 (ns_symbol_to_pb): New function.
cae07000
SM
7548 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
7549 (Fns_rotate_cut_buffers_internal): Remove.
7550 (Fns_store_selection_internal): Rename from
c803b2b7
JD
7551 Fns_store_cut_buffer_internal.
7552 (ns_get_foreign_selection, Fx_own_selection_internal)
7553 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
7554 (Fns_get_selection_internal, Fns_store_selection_internal):
7555 Use ns_symbol_to_pb and check if return value is nil.
7556 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
7557 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
7558 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
7559 renamed to Sns_store_selection_internal.
7560 (ns_handle_selection_request): Move code to Fx_own_selection_internal
7561 and remove this function.
7562 (ns_handle_selection_clear): Remove, never used.
7563 (Fx_own_selection_internal): Move code from ns_handle_selection_request
7564 here.
7565
e1b01a3a
KB
75662011-12-17 Ken Brown <kbrown@cornell.edu>
7567
7568 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
7569 GID is unknown (Bug#10257).
7570
2adb6e85
PE
75712011-12-17 Paul Eggert <eggert@cs.ucla.edu>
7572
7573 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
7574 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
7575 which caused a build failure on GNU/Linux IA-64. This problem was
7576 introduced by my 2011-10-07 patch.
7577
d1d7b339
JL
75782011-12-15 Juri Linkov <juri@jurta.org>
7579
7580 * image.c (imagemagick_error): New function. (Bug#10112)
7581 (imagemagick_load_image): Comment out `MagickSetResolution' call.
7582 Use `imagemagick_error' where ImageMagick functions return
7583 `MagickFalse'.
7584 (Fimagemagick_types): Add `Fnreverse' to return the list in the
7585 proper order.
7586
100d5755
KH
75872011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7588
7589 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
7590 fill background (Bug#8992).
7591
454592a6
MR
75922011-12-13 Martin Rudalics <rudalics@gmx.at>
7593
7594 * window.c (Vwindow_combination_resize)
7595 (Vwindow_combination_limit): Use t instead of non-nil in
7596 doc-strings.
61d4b438
MR
7597 (Vrecenter_redisplay): Add first sentence of doc-string on
7598 separate line.
53524d93 7599 (Frecenter): Fix doc-string typo.
454592a6 7600
3633e3aa
KH
76012011-12-11 Kenichi Handa <handa@m17n.org>
7602
7603 * coding.c (Funencodable_char_position): Pay attention to the
7604 buffer text relocation (Bug#9389).
7605
7b9d523a 76062011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 7607
7b9d523a
JD
7608 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
7609 gtk_init (Bug#10100).
7610
b73189c6
EZ
76112011-12-10 Eli Zaretskii <eliz@gnu.org>
7612
7613 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
7614 IT->string is nil. (Bug#10263)
7615
f7dfe5d6
JD
76162011-12-10 Jan Djärv <jan.h.d@swipnet.se>
7617
83faebb4
JD
7618 * nsterm.h (x_free_frame_resources): Declare.
7619
f7dfe5d6
JD
7620 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
7621 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
7622
7623 * nsterm.h (ns_get_defaults_value): Declare.
7624
7625 * nsterm.m (ns_default): Call ns_get_defaults_value.
7626
7cd4e72c
EZ
76272011-12-09 Eli Zaretskii <eliz@gnu.org>
7628
7629 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
7630 (Bug#10170)
7631
b34d7317
YM
76322011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7633
7634 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
7635 that where the value of an _OBJC_* symbol points to is in the .bss
7636 section (Bug#10240).
7637
76470ad1
KH
76382011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7639
7640 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 7641 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 7642
745fff94
KH
76432011-12-08 Kenichi Handa <handa@m17n.org>
7644
7645 * ftfont.c (get_adstyle_property): Fix previous change
7646 (Bug#10233).
7647
6e44397c
JB
76482011-12-07 Juanma Barranquero <lekktu@gmail.com>
7649
7650 * w32.c (init_environment): If no_site_lisp, remove site-lisp
7651 dirs from the default value of EMACSLOADPATH (bug#10208).
7652
7efa6272
GM
76532011-12-07 Glenn Morris <rgm@gnu.org>
7654
7655 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
7656 installation and source directories as well. (Bug#10208)
7657
f6fc4d87
CY
76582011-12-06 Chong Yidong <cyd@gnu.org>
7659
7660 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
7661
2bf26180
GM
76622011-12-06 Glenn Morris <rgm@gnu.org>
7663
7664 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
7665 as an error, not just -1. (Bug#10217)
7666
3a6ad4f0
CY
76672011-12-05 Chong Yidong <cyd@gnu.org>
7668
7669 * keyboard.c (process_special_events): New function.
7670 (swallow_events, Finput_pending_p): Use it (Bug#10195).
7671
75a3b399
PE
76722011-12-05 Paul Eggert <eggert@cs.ucla.edu>
7673
7674 * coding.c (encode_designation_at_bol): Don't use uninitialized
7675 local variable (Bug#9318).
7676
c3c9e25e
KH
76772011-12-05 Kenichi Handa <handa@m17n.org>
7678
7679 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
7680 return Qnil (Bug#8046, Bug#10193).
7681
5eb05ea3
KH
76822011-12-05 Kenichi Handa <handa@m17n.org>
7683
7684 * coding.c (encode_designation_at_bol): New args charbuf_end and
7685 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
7686 (coding_set_source): Return how many bytes coding->source was
7687 relocated.
7688 (coding_set_destination): Return how many bytes
7689 coding->destination was relocated.
7690 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 7691 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
7692
76932011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7694
7695 * coding.c (CODING_CHAR_CHARSET_P): New macro.
7696 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
7697 macro (Bug#9318).
7698
76992011-12-05 Andreas Schwab <schwab@linux-m68k.org>
7700
7701 The following changes are to fix Bug#9318.
7702
a79703f5 7703 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
7704 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
7705 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 7706 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 7707
7dbda6df
JB
77082011-12-05 Juanma Barranquero <lekktu@gmail.com>
7709
7710 * lisp.h (process_quit_flag): Fix external declaration.
7711
6d5eb5b0
SM
77122011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7713
7714 Don't macro-inline non-performance-critical code.
7715 * eval.c (process_quit_flag): New function.
7716 * lisp.h (QUIT): Use it.
7717
a0c3fad0
JD
77182011-12-04 Jan Djärv <jan.h.d@swipnet.se>
7719
7720 * nsfns.m (get_geometry_from_preferences): New function.
7721 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
7722
6c07aac2
AS
77232011-12-04 Andreas Schwab <schwab@linux-m68k.org>
7724
7725 * emacs.c (Qkill_emacs): Define.
7726 (syms_of_emacs): Initialize it.
7727 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
7728 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
7729 (quit_throw_to_read_char): Add parameter `from_signal'.
7730 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
7731 * lisp.h (QUIT): Call Fkill_emacs if requested.
7732
c052ead4
JD
77332011-12-03 Jan Djärv <jan.h.d@swipnet.se>
7734
7735 * widget.c (update_wm_hints): Return if wmshell is null.
7736 (widget_update_wm_size_hints): New function.
7737
7738 * widget.h (widget_update_wm_size_hints): Declare.
7739
7740 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
7741 widget_update_wm_size_hints (Bug#10104).
7742
9e49252b
EZ
77432011-12-03 Eli Zaretskii <eliz@gnu.org>
7744
7745 * xdisp.c (handle_invisible_prop): If the invisible text ends just
7746 before a newline, prepare the bidi iterator for consuming the
7747 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 7748 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 7749
02b16839
JL
77502011-12-02 Juri Linkov <juri@jurta.org>
7751
7752 * search.c (Fword_search_regexp): New Lisp function created from
7753 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
7754 (Fword_search_backward, Fword_search_forward)
7755 (Fword_search_backward_lax, Fword_search_forward_lax):
7756 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
7757 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
7758
0068070e
SM
77592011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
7760
7761 * fileio.c (Finsert_file_contents): Move after-change-function call
7762 to before the "handled:" label, since all "goto handled" appear in
7763 cases where the *-change-functions have already been properly called
7764 (bug#10117).
7765
3360a3fc
AS
77662011-12-01 Andreas Schwab <schwab@linux-m68k.org>
7767
7768 * keyboard.c (interrupt_signal): Don't call kill-emacs when
7769 waiting for input. (Bug#10169)
7770
73d6c093
EZ
77712011-11-30 Eli Zaretskii <eliz@gnu.org>
7772
7773 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
7774 verifies glyph row's hash code--we have just reallocated the
7775 glyphs, so their contents can be complete garbage. (Bug#10164)
7776
febe6bea
JB
77772011-11-30 Juanma Barranquero <lekktu@gmail.com>
7778
7779 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
7780
801a4313
EZ
77812011-11-30 Eli Zaretskii <eliz@gnu.org>
7782
7783 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
7784 attributes are tested _before_ calling verify_row_hash, to protect
7785 against GCC re-ordering of the tests. (Bug#10164)
7786
2b56b87e
JD
77872011-11-29 Jan Djärv <jan.h.d@swipnet.se>
7788
7789 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
7790
7791 * xterm.c (handle_one_xevent): Only set async_visible and friends
7792 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 7793 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
7794 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
7795
dbf31225
PE
77962011-11-28 Paul Eggert <eggert@cs.ucla.edu>
7797
7798 Remove GCPRO-related macros that exist only to avoid shadowing locals.
7799 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
7800 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
7801 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7802 All uses changed to use GCPRO1 etc.
7803 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
7804 Revert to old implementation (i.e., before 2011-03-11).
7805
1305621b
YM
78062011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7807
7808 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
7809 of scroll runs so as to avoid assigning disabled bogus rows and
7810 unnecessary graphics copy operations.
7811
8c9afb46
EZ
78122011-11-27 Eli Zaretskii <eliz@gnu.org>
7813
7814 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
7815 (snprintf) [_MSC_VER]: Redirect to _snprintf.
7816 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
7817 (malloc, free, realloc, calloc): Redirect to e_* only when
7818 compiling Emacs.
7819
7820 * lisp.h (GCTYPEBITS): Move before first use.
7821 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
7822 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
7823 this macro definition.
7824
7825 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
7826 _MSC_VER.
7827
54e9e3bf
JD
78282011-11-27 Jan Djärv <jan.h.d@swipnet.se>
7829
6d5eb5b0
SM
7830 * gtkutil.c (xg_create_frame_widgets):
7831 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
7832 present with Gtk+ 2.0.
7833
83aca1cb
PE
78342011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7835
7836 * fileio.c (Finsert_file_contents): Undo previous change; see
7837 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7838
5b76caa4
PE
78392011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7840
7841 Rename locals to avoid shadowing.
7842 * fileio.c (Finsert_file_contents):
7843 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
7844 * process.c (wait_reading_process_output):
7845 Rename inner 'proc' to 'p' to avoid shadowing.
7846 Indent for consistency with usual Emacs style.
7847
8c535114
EZ
78482011-11-25 Eli Zaretskii <eliz@gnu.org>
7849
7850 * xdisp.c (redisplay_window): If cursor row is not fully visible
7851 after recentering, and scroll-conservatively is set to a large
7852 number, scroll window by a few more lines to make the cursor fully
7853 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
7854 (start_display): Don't move to the next line if the display should
7855 start at a newline that is part of a display vector or an overlay
7856 string. (Bug#10119)
8c535114 7857
fa4fdb5c
JL
78582011-11-24 Juri Linkov <juri@jurta.org>
7859
7860 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
7861 after the `MagickPingImage' call. (Bug#10112)
7862
90ec88df
CY
78632011-11-23 Chong Yidong <cyd@gnu.org>
7864
7865 * window.c (Fcoordinates_in_window_p): Accept only live windows.
7866
56e2e794
MR
78672011-11-23 Martin Rudalics <rudalics@gmx.at>
7868
7869 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
7870 making another buffer current. (Bug#10114)
7871
b6e64c41
GM
78722011-11-23 Glenn Morris <rgm@gnu.org>
7873
7874 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
7875
6b21de18
CY
78762011-11-23 Chong Yidong <cyd@gnu.org>
7877
7878 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
7879 using it (Bug#5984).
7880
b12cd789
EZ
78812011-11-22 Eli Zaretskii <eliz@gnu.org>
7882
7883 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
7884 and header-lines, as they don't have one computed for them.
7885 (Bug#10098)
7886
7887 * .gdbinit (prow): Make displayed values more self-explaining.
7888 Add row's hash code.
7889
261b6fd4
LMI
78902011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
7891
7892 * process.c (wait_reading_process_output): Fix asynchrounous
7893 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 7894 (wait_reading_process_output): Add comment and URL.
261b6fd4 7895
e7cfd277
JD
78962011-11-21 Jan Djärv <jan.h.d@swipnet.se>
7897
7898 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
7899
a9b9b7f5
CY
79002011-11-21 Chong Yidong <cyd@gnu.org>
7901
7902 * window.c (Fnext_window, Fprevious_window): Doc fix.
7903
b0d15b4f
SM
79042011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7905
7906 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
7907
fe7a3057
JB
79082011-11-20 Juanma Barranquero <lekktu@gmail.com>
7909
7910 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
7911
d2999b1a
MR
79122011-11-20 Martin Rudalics <rudalics@gmx.at>
7913
7914 * window.c (Fset_window_combination_limit): Rename argument
7915 STATUS to LIMIT.
7916 (Vwindow_combination_limit): Remove "status" from doc-string.
7917
d5ff9cd0
AS
79182011-11-20 Andreas Schwab <schwab@linux-m68k.org>
7919
7920 * m/ibms390.h: Remove.
7921 * m/ibms390x.h: Don't include "ibms390.h".
7922
a5bb9bd3
SM
79232011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7924
7925 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
7926 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
7927
cd1181db
JB
79282011-11-20 Juanma Barranquero <lekktu@gmail.com>
7929
7930 * casetab.c (Fset_case_table):
7931 * charset.c (Fcharset_after): Fix typos.
7932
615a3b8d 79332011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 7934
17e845af
PE
7935 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
7936 Otherwise, valgrind does not work on some platforms.
7937 Problem reported by Andreas Schwab in
6a0bf43d
PE
7938 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
7939 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
7940 is set, removing the need for VIRT_ADDRESS_VARIES.
7941 (PURE_P): Use a more-efficient implementation that needs just one
7942 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
7943 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
7944 to 4 (xorl, subq, cmpq, setbe).
7945 * alloc.c (pure): Always extern now, since that's the
7946 VIRT_ADDR_VARIES behavior.
7947 (PURE_POINTER_P): Use a single comparison, not two, for
7948 consistency with the new puresize.h.
7949 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
7950 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
7951 Remove VIRT_ADDR_VARIES no longer needed.
7952
f8fe6f96
EZ
79532011-11-19 Eli Zaretskii <eliz@gnu.org>
7954
7955 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
7956 (erase_phys_cursor, update_window_cursor, show_mouse_face)
7957 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
7958 behave as if the cursor position were at the window margin.
7959
7960 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
7961 and the cursor position is out of bounds, behave as if the cursor
7962 position were at the window margin. (Bug#10075)
7963
df05a53c
CY
79642011-11-18 Chong Yidong <cyd@gnu.org>
7965
7966 * window.c (Fwindow_combination_limit): Make first argument
7967 non-optional, since it is meaningless for live windows like the
7968 selected window.
61ccba97 7969
2071918e
DA
79702011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
7971
7972 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
7973
b50a28de
SM
79742011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
7975
7976 * intervals.c: Fix grafting over the whole buffer (bug#10071).
7977 (graft_intervals_into_buffer): Simplify.
7978
015137db
EZ
79792011-11-18 Eli Zaretskii <eliz@gnu.org>
7980
7981 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
7982 hash values of the two rows.
7983 (copy_row_except_pointers): Preserve the used[] arrays and the
7984 hash values of the two rows. (Bug#10035)
68c95424 7985 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
7986
7987 * xdisp.c (row_hash): New function, body extracted from
7988 compute_line_metrics.
7989 (compute_line_metrics): Call row_hash, instead of computing the
7990 hash code inline.
7991
7992 * dispnew.c (verify_row_hash): Call row_hash for computing the
7993 hash code of a row, instead of duplicating code from xdisp.c.
7994
7995 * dispextern.h (row_hash): Add prototype.
7996
a2addb04
TH
79972011-11-18 Tassilo Horn <tassilo@member.fsf.org>
7998
7999 * frame.c (delete_frame): Don't delete the terminal when the last
8000 X frame is closed if emacs is built with GTK toolkit.
8001
df85d315
JB
80022011-11-17 Juanma Barranquero <lekktu@gmail.com>
8003
8004 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
8005
a0c2d0ae
MR
80062011-11-17 Martin Rudalics <rudalics@gmx.at>
8007
8008 * window.c (Vwindow_splits): Rename to
8009 Vwindow_combination_resize. Suggested by Juri Linkov.
8010 (Fsplit_window_internal): Use Vwindow_combination_resize instead
8011 of Vwindow_splits.
8012
58179cce
JB
80132011-11-16 Juanma Barranquero <lekktu@gmail.com>
8014
7877f373
JB
8015 * nsfns.m (Fns_font_name):
8016 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 8017
b6f67890
MR
80182011-11-16 Martin Rudalics <rudalics@gmx.at>
8019
8020 * window.h (window): Rename slot "nest" to "combination_limit".
8021 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
8022 (Fset_window_nest): Rename to Fset_window_combination_limit.
8023 (Vwindow_nest): Rename to Vwindow_combination_limit.
8024 (recombine_windows, make_parent_window, make_window)
8025 (Fsplit_window_internal, saved_window)
8026 (Fset_window_configuration, save_window_save): Rename all
8027 occurrences of window_nest to window_combination_limit.
8028
c7015153
JB
80292011-11-15 Juanma Barranquero <lekktu@gmail.com>
8030
8031 * image.c (imagemagick_load_image): Fix typo.
8032
322ad6ec
EZ
80332011-11-14 Eli Zaretskii <eliz@gnu.org>
8034
8035 * xdisp.c (display_line): Move the call to
8036 highlight_trailing_whitespace before the call to
8037 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
8038 faces of all the glyphs to compute ROW's hash value.
8039 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 8040
f067b8ec
JB
80412011-11-14 Juanma Barranquero <lekktu@gmail.com>
8042
8043 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
8044 just return (bug#10044).
8045
1e5b2111
EZ
80462011-11-12 Eli Zaretskii <eliz@gnu.org>
8047
7ef3cbd5
EZ
8048 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
8049 with user-defined heap size. Bump the default size of the temacs
8050 heap to 27MB, to avoid memory warning when running temacs.
8051 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
8052
1e5b2111
EZ
8053 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
8054 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
8055 (verify_row_hash) [XASSERTS]: New function.
8056 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
8057 that the hash value of glyph rows is correct.
1e5b2111 8058
89d61221
MR
80592011-11-12 Martin Rudalics <rudalics@gmx.at>
8060
8061 * window.h (window): Remove splits slot.
8062 * window.c (Fwindow_splits, Fset_window_splits): Remove.
8063 (Fdelete_other_windows_internal, make_parent_window)
8064 (make_window, Fsplit_window_internal, Fdelete_window_internal)
8065 (Fset_window_configuration, save_window_save): Don't deal with
8066 split status of windows.
8067 (saved_window): Remove splits slot.
8068 (Vwindow_splits): Rewrite doc-string.
8069
97f18cc8
JD
80702011-11-11 Jan Djärv <jan.h.d@swipnet.se>
8071
8072 * xfns.c (unwind_create_frame):
8073 * nsfns.m (unwind_create_frame):
8074 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
8075 Vframe_list (Bug#9999).
8076
22a648b4
DA
80772011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
8078
0b381c7e 8079 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 8080
659afede
KH
80812011-11-11 Kenichi Handa <handa@m17n.org>
8082
8083 * callproc.c (Fcall_process): Set the member dst_multibyte of
8084 process_coding.
8085
9ac0394b
KH
80862011-11-11 Johan Bockgård <bojohan@gnu.org>
8087
8088 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
8089 avoid a crash (bug#9496).
8090
2fbdc249
CY
80912011-11-09 Chong Yidong <cyd@gnu.org>
8092
8093 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
8094 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
8095
ac6b1f81
PE
80962011-11-08 Paul Eggert <eggert@cs.ucla.edu>
8097
8098 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
8099
09db192c
PE
81002011-11-08 Paul Eggert <eggert@cs.ucla.edu>
8101
8102 Avoid some portability problems by eschewing 'extern inline' functions.
8103 The trivial performance wins aren't worth the portability hassles; see
8104 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
8105 et seq.
8106 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
8107 (window_box_width, window_box_left, window_box_left_offset)
8108 (window_box_right, window_box_right_offset): Undo previous change,
8109 by removing the "extern"s.
8110 * intervals.c (adjust_intervals_for_insertion)
8111 (adjust_intervals_for_deletion): Undo previous change,
8112 making these static again.
8113 (offset_intervals, temp_set_point_both, temp_set_point)
8114 (copy_intervals_to_string): No longer inline.
8115 * xdisp.c (window_text_bottom_y, window_box_width)
8116 (window_box_height, window_box_left_offset)
8117 (window_box_right_offset, window_box_left, window_box_right)
8118 (window_box): No longer inline.
8119
105216ed
CY
81202011-11-08 Chong Yidong <cyd@gnu.org>
8121
8122 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
8123 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
8124 Signal an error if not a live window.
105216ed
CY
8125 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
8126 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
8127
ae9e237f
JB
81282011-11-07 Juanma Barranquero <lekktu@gmail.com>
8129
8130 * lisp.h (syms_of_abbrev): Remove declaration.
8131 Reported by CHENG Gao <chenggao@royau.me>.
8132
c7aa8333
EZ
81332011-11-07 Eli Zaretskii <eliz@gnu.org>
8134
8135 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
8136 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
8137 of temacs in GUI mode.
8138
be7f5545
MR
81392011-11-07 Martin Rudalics <rudalics@gmx.at>
8140
8141 * window.h: Declare delete_all_child_windows instead of
8142 delete_all_subwindows.
8143 * window.c (Fwindow_nest, Fset_window_nest)
8144 (Fset_window_new_total, Fset_window_new_normal)
8145 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
8146 (delete_all_subwindows): Rename to delete_all_child_windows.
8147 (Fdelete_other_windows_internal, Fset_window_configuration):
8148 Call delete_all_child_windows instead of delete_all_subwindows.
8149 * frame.c (delete_frame): Call delete_all_child_windows instead
8150 of delete_all_subwindows.
8151
ca78dc43
PE
81522011-11-07 Paul Eggert <eggert@cs.ucla.edu>
8153
8154 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
8155 This is also needed for porting to any host where GC_MARK_STACK is
8156 not GC_MAKE_GCPROS_NOOPS.
8157 (which_symbols): Use it.
8158
a0241d01
KH
81592011-11-07 Kenichi Handa <handa@m17n.org>
8160
8161 * coding.c (coding_set_destination): Check coding->src_pos only
8162 when coding->src_object is a buffer (bug#9910).
8163
8164 * process.c (send_process): Set the member src_multibyte of coding
8165 to 0 (bug#9911) when sending a unibyte text.
8166
8167 * callproc.c (Fcall_process): Set the member src_multibyte of
8168 process_coding to 0 (bug#9912).
8169
a64bfdfa 81702011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
8171
8172 * xmenu.c (cleanup_widget_value_tree): New function.
8173 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
8174 calling free_menubar_widget_value_tree directly (Bug#9830).
8175
cb41b32a
PE
81762011-11-06 Paul Eggert <eggert@cs.ucla.edu>
8177
8178 Fix some portability problems with 'inline'.
8179 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
8180 (window_box_width, window_box_left, window_box_left_offset)
8181 (window_box_right, window_box_right_offset): Declare extern.
8182 Otherwise, these inline functions do not conform to C99 and
8183 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
8184 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
8185 * intervals.c (adjust_intervals_for_insertion)
8186 (adjust_intervals_for_deletion): Now extern, because otherwise the
8187 extern inline functions 'offset_intervals' couldn't refer to it.
8188 (static_offset_intervals): Remove.
8189 (offset_intervals): Rewrite using the old contents of
8190 static_offset_intervals. The old version didn't conform to C99
8191 because an extern inline function contained a reference to an
8192 identifier with static linkage.
8193
b7041366
AS
81942011-11-06 Andreas Schwab <schwab@linux-m68k.org>
8195
8196 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
8197 GC.
8198
88a37c4d
EZ
81992011-11-06 Eli Zaretskii <eliz@gnu.org>
8200
8201 * xdisp.c (init_iterator, reseat_to_string): Don't set the
8202 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
8203 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
8204 return Qleft_to_right.
8205
49745b39
CY
82062011-11-06 Chong Yidong <cyd@gnu.org>
8207
8208 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
8209 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
8210 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
8211 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
8212 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
8213 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
8214 (Fwindow_vscroll): Doc fix.
8215 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
8216 argument, since it makes no sense to pass a live window and for
8217 consistency with window-child.
8218
1f05cd82
CS
82192011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
8220
8221 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
8222 support MSVC.
8223
22610910
JR
82242011-11-05 Jason Rumney <jasonr@gnu.org>
8225
8226 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
8227 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
8228 fonts (Bug#6029).
8229 (add_font_entity_to_list): Fix logic errors in mixed boolean and
8230 bitwise arithmetic preventing use of unicode-sip and non-truetype
8231 opentype fonts.
8232
a06776b2
EZ
82332011-11-05 Eli Zaretskii <eliz@gnu.org>
8234
3ad924ba
EZ
8235 * s/ms-w32.h (fstat, stat, utime): Move redirections to
8236 "emacs"-only part.
8237
a06776b2
EZ
8238 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
8239 initialization code to keep similarity to xfns.c after changes
8240 from 2011-11-05.
8241
c9e7db78
JD
82422011-11-05 Jan Djärv <jan.h.d@swipnet.se>
8243
a97f8f3f
JD
8244 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
8245 (unwind_create_frame): New function (Bug#9943).
8246 (Fx_create_frame): Restructure code to be more similar to the one in
8247 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
8248 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
8249 Move terminal->reference_count++ just before making the frame official
8250 (Bug#9943).
8251
8252 * nsterm.m (x_free_frame_resources): New function.
8253 (x_destroy_window): Move code to x_free_frame_resources.
8254
c9e7db78 8255 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
8256 (Fx_create_frame, x_create_tip_frame):
8257 Move terminal->reference_count++ just before making the frame
75f1671a 8258 official. Move initialization of image_cache_refcount and
c9e7db78
JD
8259 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
8260
a6fc3b5c
EZ
82612011-11-05 Eli Zaretskii <eliz@gnu.org>
8262
8263 Support MSVC build with newer versions of Visual Studio.
8264 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
8265 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
8266 nt/gmake.defs.
8267
8268 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
8269 which are not supported by MSVC.
8270 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
8271 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
8272 bitfields.
8273 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
8274 types in bitfields.
8275 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
8276
8277 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
8278
58179cce 82792011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
8280
8281 Support MSVC build with newer versions of Visual Studio.
8282 * w32.c: Don't include w32api.h for MSVC.
8283 (init_environment) [_MSC_VER]: Call sys_access, not _access.
8284
8285 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
8286 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
8287 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
8288 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
8289 e_* cousins.
8290 (alloca) [_MSC_VER]: Define to _alloca.
8291
8292 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
8293
8294 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
8295
a58c13ed
EZ
82962011-11-04 Eli Zaretskii <eliz@gnu.org>
8297
8298 * xdisp.c (note_mouse_highlight): If either of
8299 previous/next-single-property-change returns nil, treat that as
8300 the beginning or the end of the buffer. (Bug#9955)
8301
fe0b6370
JD
83022011-11-04 Jan Djärv <jan.h.d@swipnet.se>
8303
a58c13ed 8304 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
8305 label is not null (Bug#9951).
8306 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
8307 may be NULL.
8308
89bd5ee1
EZ
83092011-11-04 Eli Zaretskii <eliz@gnu.org>
8310
8311 * window.c (Fwindow_body_size): Mention in the doc string that the
8312 return value is in frame's canonical units. (Bug#9949)
8313
84c3edb9
EZ
83142011-11-03 Eli Zaretskii <eliz@gnu.org>
8315
4e2fb5c7
EZ
8316 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
8317
84c3edb9 8318 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 8319 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 8320 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 8321
bc17a887
EZ
83222011-11-01 Eli Zaretskii <eliz@gnu.org>
8323
8324 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
8325 Don't stop backward scan on the continuation glyph, even though
8326 its CHARPOS is positive.
6d5eb5b0
SM
8327 (mouse_face_from_buffer_pos, note_mouse_highlight):
8328 Rename cover_string to disp_string.
bc17a887 8329
4ee88440
MR
83302011-11-01 Martin Rudalics <rudalics@gmx.at>
8331
8332 * window.c (temp_output_buffer_show): Don't use
8333 Vtemp_buffer_show_specifiers.
8334 (Vtemp_buffer_show_specifiers): Remove unused variable.
8335
c2ff3c02
EZ
83362011-10-30 Eli Zaretskii <eliz@gnu.org>
8337
8338 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
8339 past the beginning of the current glyph matrix.
8340
58179cce 83412011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
8342
8343 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
8344 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
8345 HAVE_GTK3 (Bug#9869).
b77a6a7f 8346
3b574623
JD
8347 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
8348 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
8349
b77a6a7f
JD
8350 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
8351
8352 * xterm.c: Declare x_handle_net_wm_state to return int.
8353 (handle_one_xevent): Check if we are iconified but don't have
8354 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
8355 (get_current_wm_state): Return non-zero if not hidden,
8356 check for _NET_WM_STATE_HIDDEN (Bug#9893).
8357 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
8358 (x_handle_net_wm_state): Return what get_current_wm_state returns.
8359 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
8360
196e41e4
PE
83612011-10-29 Paul Eggert <eggert@cs.ucla.edu>
8362
8363 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
8364 so that this new function doesn't get optimized away by a
8365 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
8366
021f2e1a
AS
83672011-10-29 Andreas Schwab <schwab@linux-m68k.org>
8368
8369 * frame.h (MOUSE_HL_INFO): Remove excess parens.
8370
8b058d44
EZ
83712011-10-29 Eli Zaretskii <eliz@gnu.org>
8372
8373 Fix the `xbytecode' command.
8374 * .gdbinit (xprintbytestr): New command.
b50a28de 8375 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
8376 (xbytecode): Print the byte-code string as well.
8377
4452fb80
EZ
83782011-10-29 Kim Storm <storm@cua.dk>
8379
8b058d44
EZ
8380 * alloc.c (which_symbols): New function.
8381
21b72067
AS
83822011-10-29 Andreas Schwab <schwab@linux-m68k.org>
8383
8384 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
8385 line. (Bug#9903)
8386
83ed7b5c
GM
83872011-10-29 Glenn Morris <rgm@gnu.org>
8388
8389 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
8390 Not clear what it was for, and it causes various bugs. (Bug#9839)
8391
5a7a728b
EZ
83922011-10-28 Eli Zaretskii <eliz@gnu.org>
8393
8394 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
8395 possible random value that matches one of those tested as
8396 condition to clear the mouse face.
8397
d3d0842f
CY
83982011-10-28 Chong Yidong <cyd@gnu.org>
8399
8400 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
8401
31b39d13
DN
84022011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
8403
8404 * window.c (make_window): Initialize phys_cursor_on_p.
8405
9aba6043
SM
84062011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
8407
8408 * lisp.h (struct Lisp_Symbol): Update comments.
8409
c20992f4
JB
84102011-10-28 Juanma Barranquero <lekktu@gmail.com>
8411
8412 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
8413
db4f02f2
EZ
84142011-10-28 Eli Zaretskii <eliz@gnu.org>
8415
8416 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
8417 <oslsachem@gmail.com> for helping to debug this.
8418
8419 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
8420 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
8421 (g_b_init_get_glyph_outline_w): New static variables.
8422 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
8423 (GetGlyphOutlineW_Proc): New typedefs.
8424 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
8425 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
8426 New functions.
8427 (w32font_open_internal, compute_metrics):
8428 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
8429 instead of calling the "wide" APIs directly.
8430
8431 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
8432
8433 * w32.h (syms_of_w32font): Add prototype.
8434
87e68db4
JB
84352011-10-27 Juanma Barranquero <lekktu@gmail.com>
8436
8437 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
8438 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
8439 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
8440 (Fmove_to_window_line): Doc fix.
8441
435c1d67
CY
84422011-10-27 Chong Yidong <cyd@gnu.org>
8443
8444 * process.c (make_process): Set gnutls_state to NULL.
8445
8446 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
8447 non-NULL, regardless of GNUTLS_INITSTAGE.
8448 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
8449 an error. Set process slots as soon as we allocate them.
8450
8451 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
8452
9c6c6f49
CY
84532011-10-27 Chong Yidong <cyd@gnu.org>
8454
9aba6043
SM
8455 * gnutls.c (emacs_gnutls_deinit): New function.
8456 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
8457 (Fgnutls_deinit, Fgnutls_boot): Use it.
8458
8459 * process.c (make_process): Initialize GnuTLS credentials to NULL.
8460 (deactivate_process): Call emacs_gnutls_deinit.
8461
657d08d3
JB
84622011-10-27 Juanma Barranquero <lekktu@gmail.com>
8463
8464 * image.c (x_create_x_image_and_pixmap):
8465 * w32.c (sys_rename, w32_delayed_load):
8466 * w32font.c (fill_in_logfont):
8467 * w32reg.c (x_get_string_resource): Silence compiler warnings.
8468
5430d399
JB
84692011-10-26 Juanma Barranquero <lekktu@gmail.com>
8470
8471 * w32fns.c (w32_default_color_map): New function,
8472 extracted from Fw32_default_color_map.
a7ef684b 8473 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 8474
fe0055fa
PE
84752011-10-25 Paul Eggert <eggert@cs.ucla.edu>
8476
8477 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
8478
e6346438
SM
84792011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
8480
8481 * keyboard.c (test_undefined): New function (bug#9751).
8482 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
8483
e112cc37
ET
84842011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
8485
8486 * sysdep.c (init_sys_modes): Fix the check for the controlling
8487 terminal (Bug#6649).
8488
7b5d6677
EZ
84892011-10-20 Eli Zaretskii <eliz@gnu.org>
8490
8491 * dispextern.h (struct bidi_it): New member next_en_type.
8492
8493 * bidi.c (bidi_line_init): Initialize the next_en_type member.
8494 (bidi_resolve_explicit_1): When next_en_pos is valid for the
8495 current character, check also for next_en_type being WEAK_EN.
8496 (bidi_resolve_weak): Don't enter the expensive loop if the current
8497 position is before next_en_pos. Record the bidi type of the first
8498 non-ET, non-BN character we find, in addition to its position.
8499 (bidi_level_of_next_char): Invalidate next_en_type when
8500 next_en_pos is over-stepped.
8501
7da0b018
PE
85022011-10-20 Paul Eggert <eggert@cs.ucla.edu>
8503
8504 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
8505 * editfns.c: Rewrite current-time-zone so that it invokes
8506 the equivalent of (format-time-string "%Z") to get the time zone name.
8507 This fixes a bug when the time zone name contains characters that
8508 need converting from the system time locale to Emacs internal format.
8509 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
8510 that patch fixed format-time-string to do the conversion, but
8511 I forgot to fix current-time-zone.
8512 (format_time_string): New function, containing most of
8513 what Fformat_time_string used to contain.
8514 (Fformat_time_string): Rewrite in terms of format_time_string.
8515 This doesn't change this function's behavior.
8516 (current-time-zone): Rewrite to use format_time_string.
8517 This fixes the bug reported by Michael Schierl in
8518 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
8519 Jason Rumney's 2007-06-07 change worked around this bug, but
8520 didn't fix it.
8521 * systime.h (tzname, timezone): Remove no-longer-used declarations.
8522
8547b010
EZ
85232011-10-19 Eli Zaretskii <eliz@gnu.org>
8524
8525 * xdisp.c (start_display): If the character at POS is displayed
8526 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
8527 (try_window_reusing_current_matrix): If a line ends in a display
8528 vector or the next line starts in a display vector, continue
8529 redrawing the window even though the character position of
8530 start_row was reached.
8547b010
EZ
8531 (Bug#9771, part 2)
8532
4e948d15
CY
85332011-10-18 Chong Yidong <cyd@gnu.org>
8534
8535 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
8536 with nobreak-char-display too.
8537
4787455f
EZ
85382011-10-18 Eli Zaretskii <eliz@gnu.org>
8539
8540 Fix part 3 of bug#9771.
8541 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
8542 (bidi_resolve_neutral): Don't enter the expensive loop looking for
8543 non-neutral characters if the current character is a paragraph
8544 separator (a.k.a. Newline). This avoids running the same
8545 expensive loop twice, once when we consume the preceding newline
8546 and the other time when the line actually needs to be displayed.
8547 Avoid the loop when we see neutrals on the base embedding level
8548 following a character whose directionality is the same as the
8549 paragraph's. This avoids running the expensive loop when a line
8550 ends in a long sequence of neutrals, like control characters.
8551 Add assertion against STRONG_AL type. Slightly rearrange code
8552 that determines the type of a neutral given the first non-neutral
8553 that follows it.
8554 (bidi_level_of_next_char): Set next_en_pos to zero when
8555 invalidating its info.
8556
2c91f553
EZ
85572011-10-17 Eli Zaretskii <eliz@gnu.org>
8558
8559 * xdisp.c (push_display_prop): Determine whether to record string
8560 or buffer position by IT->string, not by IT->method. Allow
8561 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
8562 (move_it_vertically_backward): Don't look for character position
8563 immediately after the newline when in a continuation line.
8564 (Bug#9771, part 1)
2c91f553 8565
c7b08b0d
MR
85662011-10-15 Martin Rudalics <rudalics@gmx.at>
8567
8568 * window.c (coordinates_in_window): Rewrite and delabelize
8569 vertical border check. (Bug#5357) (Bug#9618)
8570
6b02f655
SM
85712011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
8572
8573 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
8574 errors in XSetWindowBorder (bug#9310).
8575
81d40c92
DA
85762011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
8577
8578 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
8579 avoid crash when xmalloc overrun checking is enabled.
8580
d4172c3b
EZ
85812011-10-13 Eli Zaretskii <eliz@gnu.org>
8582
8583 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
8584 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
8585 cursor motion with <left> and <right> arrow keys.
8586
8587 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
8588 some callers set that themselves.
8589
b00eea75
EZ
85902011-10-12 Eli Zaretskii <eliz@gnu.org>
8591
8592 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
8593 display string and the previous row comes from the same string and
8594 is empty. (Bug#9739) (Bug#9738)
8595
8fe012c4
SM
85962011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
8597
8598 * doc.c (get_doc_string): Encode file name (bug#9735).
8599
0074aef2
EZ
86002011-10-12 Eli Zaretskii <eliz@gnu.org>
8601
79beb178
EZ
8602 * bidi.c (bidi_level_of_next_char):
8603 * xdisp.c (get_visually_first_element): Remove old incorrect
8604 comments regarding the Unicode Line Separator character.
8605
0074aef2
EZ
8606 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
8607
6e4b3fbe
DA
86082011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
8609
8610 * alloc.c (Fgc_status): Do not access beyond zombies array
8611 boundary if nzombies > MAX_ZOMBIES.
8612 * alloc.c (dump_zombies): Add missing format specifier.
8613
0324f3af
PE
86142011-10-12 Paul Eggert <eggert@cs.ucla.edu>
8615
b5525cac
PE
8616 * xdisp.c (set_cursor_from_row): Simplify conditionals,
8617 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
8618
0324f3af
PE
8619 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
8620 Some packages use them to denote characters with modifiers.
8621
e9b5f888
AS
86222011-10-11 Andreas Schwab <schwab@linux-m68k.org>
8623
8624 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
8625 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
8626 matching a pp-number. Rename parameter var to var1.
8627
127827c0
SM
86282011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
8629
8630 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
8631
c8fd3bd0
GM
86322011-10-08 Glenn Morris <rgm@gnu.org>
8633
8634 * callint.c (Fcall_interactively): Give a more explicit error for the
8635 'c' case with a non-character input. (Bug#8479)
8636
352ec8ff
EZ
86372011-10-08 Eli Zaretskii <eliz@gnu.org>
8638
03669ccb
EZ
8639 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
8640 lines.
7061c986
EZ
8641 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
8642 lines that are hscrolled on the left.
03669ccb 8643
352ec8ff
EZ
8644 * dispnew.c (buffer_posn_from_coords): Account for a possible
8645 presence of header-line. (Bug#4426)
8646
a66cfb1c
SM
86472011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
8648
6b02f655
SM
8649 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
8650 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 8651
7c5ee88e
PE
86522011-10-07 Paul Eggert <eggert@cs.ucla.edu>
8653
8654 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
8655 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
8656 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
8657 this makes Emacs dump core during garbage collection on rare
8658 occasions. sizeof is obviously inferior to offsetof here, so
8659 stick with offsetof.
8660 (GC_POINTER_ALIGNMENT): New macro.
8661 (mark_memory): Omit 3rd (offset) arg; caller changed.
8662 Don't assume EMACS_INT alignment is the same as pointer alignment.
8663
df1bbe5b
SM
86642011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
8665
8666 * keyboard.c (read_key_sequence_remapped): New var.
8667 (read_key_sequence): Compute remapping in the right buffer.
8668 (command_loop_1): Use read_key_sequence's remapping directly.
8669
51553db6
SM
86702011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
8671
32c1fffd
SM
8672 * dired.c (file_name_completion): Don't expand file name.
8673 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
8674 before checking file name handler.
8675
51553db6
SM
8676 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
8677 they've been requested explicitly (bug#9591).
8678
b6bd1599 86792011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
8680
8681 * keymap.c (Fsingle_key_description): Use make_specified_string
8682 instead of build_string to build string from push_key_description.
8683 (Bug#5193)
8684
f701dc2a
PE
86852011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8686
4222c55d
PE
8687 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
8688 This fixes a Y2038 bug on 64-bit hosts.
8689 * buffer.c (reset_buffer):
8690 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
8691 (Fclear_buffer_auto_save_failure):
8692 Use 0, not -1, to represent an unset failure time, since time_t
8693 might not be signed.
8694
f701dc2a
PE
8695 Remove dependency on glibc malloc internals.
8696 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8697 Move back here from lisp.h, but with their new implementations.
8698 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8699 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
8700 * charset.c (charset_table_init): New static var.
8701 (syms_of_charset): Use it instead of xmalloc. This removes a
8702 dependency on glibc malloc internals. See Eli Zaretskii's comment in
8703 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
8704 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8705 Move back to alloc.c.
8706 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8707 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
8708
9ceebf39
JD
87092011-09-30 Jan Djärv <jan.h.d@swipnet.se>
8710
8711 * nsterm.m (windowDidResize): Call x_set_window_size only when
8712 ns_in_resize is true. Otherwise set pixelwidth/height and
8713 call change_frame_size (Bug#9628).
8714
cb993c58
PE
87152011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8716
3930c88b
PE
8717 Port --enable-checking=all to Fedora 14 x86-64.
8718 * charset.c (syms_of_charset): Also account for glibc malloc's
8719 internal overhead when calculating the initial malloc maximum.
8720
cb993c58
PE
8721 Port --enable-checking=all to Fedora 14 x86.
8722 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8723 Move to lisp.h.
8724 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
8725 (overrun_check_realloc, overrun_check_free):
8726 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
8727 That way, xmalloc returns a properly-aligned pointer even if
8728 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
8729 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
8730 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
8731 into account when calculating the initial malloc maximum.
8732 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8733 Move here from alloc.c, so that charset.c can use it too.
8734 Properly align; the old code wasn't right for common 32-bit hosts
8735 when configured with --enable-checking=all.
8736 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8737 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
8738
31bed486
EZ
87392011-09-29 Eli Zaretskii <eliz@gnu.org>
8740
04c70788 8741 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
8742 use EDOM.
8743
fbcaa2f3
EZ
87442011-09-28 Eli Zaretskii <eliz@gnu.org>
8745
8746 * xdisp.c (compute_display_string_end): If there's no display
8747 string at CHARPOS, return -1.
8748
8749 * bidi.c (bidi_fetch_char): When compute_display_string_end
8750 returns a negative value, treat the character as a normal
8751 character not covered by a display string. (Bug#9624)
8752
a239d4e9
JB
87532011-09-28 Juanma Barranquero <lekktu@gmail.com>
8754
8755 * lread.c (Fread_from_string): Fix typo in docstring.
8756
88652fd5
EZ
87572011-09-27 Eli Zaretskii <eliz@gnu.org>
8758
8759 * xdisp.c (handle_invisible_prop): If invisible text ends on a
8760 newline, reseat the iterator instead of bidi-iterating there one
8761 character at a time. (Bug#9610)
32c1fffd
SM
8762 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
8763 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 8764
ed497dd4
AS
87652011-09-27 Andreas Schwab <schwab@linux-m68k.org>
8766
8767 * lread.c (readevalloop): Use correct code for NBSP.
8768 (read1): Likewise. (Bug#9608)
8769
b2bf61aa
MA
87702011-09-25 Michael Albinus <michael.albinus@gmx.de>
8771
8772 * dbusbind.c (Fdbus_register_signal): When service is not
8773 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
8774
32bbb17c
GM
87752011-09-25 Glenn Morris <rgm@gnu.org>
8776
8777 * buffer.c (truncate-lines): Doc fix.
8778
94e0933e
CY
87792011-09-24 Chong Yidong <cyd@stupidchicken.com>
8780
8781 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
8782 (Fset_window_next_buffers): Doc fix.
8783
cddde921
GM
87842011-09-24 Glenn Morris <rgm@gnu.org>
8785
8786 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
8787
1260aef1
PE
87882011-09-24 Paul Eggert <eggert@cs.ucla.edu>
8789
25b4bfa0
PE
8790 Fix minor problems found by static checking.
8791 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
8792 * indent.c (Fvertical_motion): Fix == vs = typo.
8793
e3cbd34b
EZ
87942011-09-24 Eli Zaretskii <eliz@gnu.org>
8795
a66cfb1c
SM
8796 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
8797 Default value is now t. Doc fix.
6bf7006f 8798
e3cbd34b 8799 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 8800 logic when moving up, not only when moving down. Fix the
e3cbd34b 8801 confusing name and values of the it_overshoot_expected variable;
32c1fffd 8802 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
8803
8804 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
8805 CHARPOS is covered by a display string which includes newlines.
8806 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
8807 is covered by a display string with embedded newlines.
8808
a3de0cbd
MA
88092011-09-24 Michael Albinus <michael.albinus@gmx.de>
8810
8811 * dbusbind.c (Fdbus_register_signal): Add match rule to
8812 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
8813 (Fdbus_register_method, Vdbus_registered_objects_table):
8814 Fix docstring.
a3de0cbd 8815
b260039d
JM
88162011-09-24 Jim Meyering <meyering@redhat.com>
8817
32c1fffd 8818 do not ignore write error for any output size
b260039d
JM
8819 The previous change was incomplete.
8820 While it makes emacs --batch detect the vast majority of stdout
8821 write failures, errors were still ignored whenever the output size is
8822 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
8823 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
8824 && echo FAIL: ignored write error
8825 FAIL: ignored write error
8826 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
8827 && echo FAIL: ignored write error
8828 FAIL: ignored write error
8829 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
8830
8eca8a7c
AS
88312011-09-23 Andreas Schwab <schwab@linux-m68k.org>
8832
8833 * emacs.c (Fkill_emacs): In noninteractive mode exit
8834 non-successfully if a write error occurred on stdout. (Bug#9574)
8835
3341db62
EZ
88362011-09-21 Eli Zaretskii <eliz@gnu.org>
8837
8838 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
8839 the xassert test.
8840
8841 * dispextern.h (struct it): Update the comment documenting what
8842 can it->OBJECT be.
8843
8c203dbf
EZ
88442011-09-20 Eli Zaretskii <eliz@gnu.org>
8845
8846 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
8847 a display string, extend search for cursor position to end of row.
8848 (find_row_edges): If the row ends in a newline from a display
8849 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
8850 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
8851 (Fcurrent_bidi_paragraph_direction): Fix search for previous
8852 non-empty line. Fixes confusing cursor motion with arrow keys at
8853 the beginning of a line that starts with whitespace.
8c203dbf 8854
a4824228
LMI
88552011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
8856
8857 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
8858 (bug#9493).
8859
33ed493b
CY
88602011-09-18 Chong Yidong <cyd@stupidchicken.com>
8861
8862 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
8863 boolean (Bug#9154).
8864
56cd55c8
EZ
88652011-09-18 Eli Zaretskii <eliz@gnu.org>
8866
8867 * xdisp.c (display_line): Record maximum and minimum buffer
8868 positions even if no glyphs were produced (e.g., by a zero-width
8869 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
8870 buffer positions that will be removed from the glyph row because
8871 they don't fit.
c02dcedf
EZ
8872 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
8873 column is beyond frame width: don't subtract 1 "pixel" when
8874 computing width of the stretch.
3e62b7e0
EZ
8875 (reseat_at_next_visible_line_start): Undo the change made on
8876 2011-09-17 that saved paragraph information and restored it after
8877 the call to `reseat'. (Bug#9545)
56cd55c8 8878
5ed99d36 88792011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
8880
8881 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
8882 and turn window cursor on if cleared (Bug#9415).
8883
5ed99d36 88842011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
8885
8886 * search.c (boyer_moore): Take unibyte characters from pattern
8887 literally. (Bug#9458)
8888
9bade7b2
EZ
88892011-09-18 Eli Zaretskii <eliz@gnu.org>
8890
8891 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
8892
e5e9d610
PE
88932011-09-18 Paul Eggert <eggert@cs.ucla.edu>
8894
87e4427a
PE
8895 Fix minor problem found by static checking.
8896 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
8897 initialized, to pacify gcc -Wuninitialized.
8898
e5e9d610
PE
8899 * fileio.c: Report proper errno when syscall falls.
8900 (Finsert_file_contents): Save and restore errno,
8901 so that report_file_error outputs the correct diagnostic.
8902 (Fwrite_region) [CLASH_DETECTION]: Likewise.
8903
a1674f0b
EZ
89042011-09-18 Eli Zaretskii <eliz@gnu.org>
8905
8906 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
8907
fbfb6dd4
EZ
89082011-09-17 Eli Zaretskii <eliz@gnu.org>
8909
8910 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
8911 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
8912
bb187662
EZ
89132011-09-17 Eli Zaretskii <eliz@gnu.org>
8914
1137e8b8 8915 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 8916 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
8917
8918 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
8919 (bidi_find_paragraph_start): Search back for paragraph beginning
8920 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
8921 (bidi_move_to_visually_next): Only trigger paragraph-related
8922 computations when the last character is a newline or at EOB, not
8923 just any NEUTRAL_B. (Bug#9470)
8924
bb187662
EZ
8925 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
8926 truncated lines if point is covered by a display string. (Bug#9524)
8927
2e621251
PE
89282011-09-16 Paul Eggert <eggert@cs.ucla.edu>
8929
8930 * xselect.c: Relax test for outgoing X longs (Bug#9498).
8931 (cons_to_x_long): New function.
8932 (lisp_data_to_selection_data): Use it. Correct the test for
8933 short-versus-long data; it was negated. Break out of vector
8934 loop, for efficiency, when a long datum is discovered.
8935
91a15bc6
SM
89362011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
8937
8938 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
8939
b41c3a35
EZ
89402011-09-16 Eli Zaretskii <eliz@gnu.org>
8941
8942 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
8943 GCC PR/17406) by declaring this function with external scope.
8944
7812ba2d
PE
89452011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8946
8947 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
8948 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
8949
cf7edc2a
AS
89502011-09-15 Andreas Schwab <schwab@linux-m68k.org>
8951
8952 * editfns.c (Fformat): Correctly handle text properties on "%%".
8953
bd01620e
EZ
89542011-09-15 Eli Zaretskii <eliz@gnu.org>
8955
8956 * xterm.c (x_draw_composite_glyph_string_foreground):
8957 * w32term.c (x_draw_composite_glyph_string_foreground):
8958 * term.c (encode_terminal_code):
8959 * composite.c (composition_update_it, get_composition_id):
8960 * xdisp.c (get_next_display_element)
8961 (fill_composite_glyph_string): Add comments about special meaning
8962 of TAB characters in a composition.
8963
a02719a3
PE
89642011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8965
8966 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
8967 This occurs when processing a multibyte format.
8968 Problem reported by Wolfgang Jenker.
a02719a3 8969
72589a3c
JB
89702011-09-15 Johan Bockgård <bojohan@gnu.org>
8971
8972 * xdisp.c (try_cursor_movement): Only check for exact match if
8973 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
8974
1c14176c
PE
89752011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8976
8977 Remove unused external symbols.
8978 * dispextern.h (calc_pixel_width_or_height): Remove decl.
8979 * xdisp.c (calc_pixel_width_or_height): Now static.
8980 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
8981 * indent.c (check_display_width):
8982 * w32term.c: Fix comment to match code.
8983 * xterm.c, xterm.h (x_catching_errors): Remove.
8984
d2eea5b5
PE
89852011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8986
8987 * xselect.c: Use signed conversions more consistently (Bug#9498).
8988 (selection_data_to_lisp_data): Assume incoming selection data are
8989 signed integers, not unsigned. This is to be consistent with
8990 outgoing selection data, which was modified to use signed integers
8991 in as part of the fix to Bug#9196 in response to Jan D.'s comment
8992 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
8993 expects long, not unsigned long.
8994
46888499
EZ
89952011-09-14 Eli Zaretskii <eliz@gnu.org>
8996
8997 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
8998 computation of loop end. Reported by Johan Bockgård
8999 <bojohan@gnu.org>.
9000
ef8ef9fb
CY
90012011-09-13 Chong Yidong <cyd@stupidchicken.com>
9002
9003 * frame.c (Fother_visible_frames_p): Function deleted.
9004
fa819fed
EZ
90052011-09-12 Eli Zaretskii <eliz@gnu.org>
9006
9007 * indent.c (compute_motion): Process display vector front to back
9008 rather than the other way around. (Bug#2496)
9009
2ba8e008
SM
90102011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
9011
9012 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
9013
20f53c69
CY
90142011-09-11 Chong Yidong <cyd@stupidchicken.com>
9015
9016 * minibuf.c (Fread_from_minibuffer): Doc fix.
9017
d562d7a4
EZ
90182011-09-11 Eli Zaretskii <eliz@gnu.org>
9019
9020 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
9021 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
9022
1c4d7f3d
LMI
90232011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
9024
9025 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
9026 value for non-existent files.
9027
b885bf36
EZ
90282011-09-11 Eli Zaretskii <eliz@gnu.org>
9029
9030 * fileio.c (Finsert_file_contents): If the file cannot be opened,
9031 set its "size" to -1. This will set the modtime_size field of
9032 the corresponding buffer to -1, which is what
9033 verify-visited-file-modtime expects for files that do not exist.
9034 (Bug#9139)
9035
6612f0bf
PE
90362011-09-11 Paul Eggert <eggert@cs.ucla.edu>
9037
9038 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
9039 here ...
9040 * lisp.h: ... from here. push_key_description is no longer
9041 defined in keyboard.c, so its declaration should not be in
9042 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
9043 logically belongs with push_key_description.
9044
dfb3f755
PE
90452011-09-10 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 * buffer.h: Include <sys/types.h> instead of <time.h>.
9048 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
9049 Problem reported by Herbert J. Skuhra.
9050
3134906c
LMI
90512011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
9052
9053 * xml.c (parse_region): Make the parsing work for
9054 non-comment-starting XML files again (bug#9144).
9055
8d903f4e
AS
90562011-09-10 Andreas Schwab <schwab@linux-m68k.org>
9057
9058 * image.c (gif_load): Fix calculation of bottom and right corner.
9059 (Bug#9468)
9060
80ad64f4
EZ
90612011-09-10 Eli Zaretskii <eliz@gnu.org>
9062
9063 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
9064 redisplay in small windows.
9065
208a048d
EZ
90662011-09-09 Eli Zaretskii <eliz@gnu.org>
9067
9068 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
9069
9b1c252e
MR
90702011-09-08 Martin Rudalics <rudalics@gmx.at>
9071
9072 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
9073 Operate on live windows only.
9074
2949f33b
JB
90752011-09-08 Juanma Barranquero <lekktu@gmail.com>
9076
9077 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
9078
e08dcafd
EZ
90792011-09-07 Eli Zaretskii <eliz@gnu.org>
9080
9081 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
9082 only under bidi iteration.
9083
115b96bd
JD
90842011-09-07 Jan Djärv <jan.h.d@swipnet.se>
9085
9086 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
9087
c8199d0f
PE
90882011-09-06 Paul Eggert <eggert@cs.ucla.edu>
9089
9090 isnan: Fix porting problem to Solaris 10 with bundled gcc.
9091 Without this fix, the command to link temacs failed due to an
9092 undefined symbol __builtin_isnan. This is because
9093 /usr/include/iso/math_c99.h #defines isnan(x) to
9094 __builtin_isnan(x), but the bundled gcc, which identifies itself
9095 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
9096 a __builtin_isnan.
9097 * floatfns.c (isnan): #undef, and then #define to a clone of
9098 what's in data.c.
9099 (Fisnan): Always define, since it's always available now.
9100 (syms_of_floatfns): Always define isnan at the Lisp level.
9101
e39b275c 91022011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
9103
9104 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
9105
b2db44d9 91062011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 9107
f4af5137 9108 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
9109 The previous code assumed that file offsets (off_t values) fit in
9110 EMACS_INT variables, which is not true on typical 32-bit hosts.
9111 The code messed up by falsely reporting buffer overflow in cases
9112 such as (insert-file-contents "big" nil 1 2) into an empty buffer
9113 when "big" contains more than 2**29 bytes, even though this
9114 inserts just one byte and does not overflow the buffer.
9115 (Finsert_file_contents): Store file offsets as off_t
9116 values, not as EMACS_INT values. Check for overflow when
9117 converting between EMACS_INT and off_t. When checking for
9118 buffer overflow or for overlap, take the offsets into account.
9119 Don't use EMACS_INT for small values where int suffices.
9120 When checking for overlap, fix a typo: ZV was used where
9121 ZV_BYTE was intended.
9122 (Fwrite_region): Don't assume off_t fits into 'long'.
9123 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
9124
ecfc0a49
MA
91252011-09-05 Michael Albinus <michael.albinus@gmx.de>
9126
9127 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
9128
6511acf2 91292011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 9130
0999621a 9131 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
9132
9133 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 9134 (esprintf, exprintf, evxprintf): New functions.
62f19c19 9135 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 9136 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
9137 (modify_event_symbol): Do not assume that the length of
9138 name_alist_or_stem is safe to alloca and fits in int.
9139 (Fexecute_extended_command): Likewise for function name and binding.
9140 (Frecursion_depth): Wrap around reliably on integer overflow.
9141 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
9142 since some callers pass EMACS_INT values.
9143 (Fsingle_key_description): Don't crash if symbol name contains more
9144 than MAX_ALLOCA bytes.
9145 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
9146 (get_minibuffer): Arg is now EMACS_INT, not int.
9147 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 9148 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
9149 * window.h (command_loop_level, minibuf_level): Reflect API changes.
9150
2be7d702
PE
9151 * dbusbind.c (signature_cat): New function.
9152 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
9153 Do not overrun buffer; instead, report string overflow.
9154
9d1df220
PE
9155 * dispnew.c (add_window_display_history): Don't overrun buffer.
9156 Truncate instead; this is OK since it's just a log.
9157
33ef5c64
PE
9158 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
9159 even if the time zone offset is outlandishly large.
9160 Don't mishandle offset == INT_MIN.
9161
66c6fdd5
PE
9162 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
9163 when creating daemon; the previous buffer-overflow check was incorrect.
9164
d749b01b
PE
9165 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
9166 which has the guts of the old verror function.
9167
b5cd1905
PE
9168 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
9169 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
9170
6e1a67fb
PE
9171 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
9172 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 9173 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 9174 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
9175 length of string rather than counting it via multiple sprintfs;
9176 that's simpler and more reliable.
c21721cc
PE
9177 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
9178 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
9179 sprintf, in case result does not fit in int.
9180
c57b67fc
PE
9181 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
9182 (fontset_from_font): Print it.
9183
8a401434
PE
9184 * frame.c (tty_frame_count): Now printmax_t, not int.
9185 (make_terminal_frame, set_term_frame_name): Print it.
9186 (x_report_frame_params): In X, window IDs are unsigned long,
9187 not signed long, so print them as unsigned.
9188 (validate_x_resource_name): Check for implausibly long names,
9189 and don't assume name length fits in 'int'.
9190 (x_get_resource_string): Don't blindly alloca invocation name;
9191 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
9192 not fit in int.
9193
6e1a67fb
PE
9194 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
9195 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
9196 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
9197
0df02bf3
PE
9198 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
9199 Use esprintf, not sprintf, in case result does not fit in int.
9200
48e30793
PE
9201 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9202 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
9203 it as a large positive number.
9204 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
9205 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9206
a66ff6d8
PE
9207 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
9208 in case result does not fit in int.
9209
aca216ff
PE
9210 * print.c (float_to_string): Detect width overflow more reliably.
9211 (print_object): Make sprintf buffer a bit bigger, to avoid potential
9212 buffer overrun. Don't assume list length fits in 'int'. Treat
9213 print length of 0 as 0, not as infinity; to be consistent with other
9214 uses of print length in this function. Don't overflow print length
9215 index. Don't assume hash table size fits in 'long', or that
9216 vectorlike size fits in 'unsigned long'.
9217
31c286f7
PE
9218 * process.c (make_process): Use printmax_t, not int, to format
9219 process-name gensyms.
9220
55e5faa1
PE
9221 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
9222
80f2e268
PE
9223 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
9224 to avoid potential buffer overrun.
9225
670741ab
PE
9226 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
9227 if X resource line is longer than 512 bytes.
9228
b7163a50
PE
9229 * xfns.c (x_window): Make sprintf buffer a bit bigger
9230 to avoid potential buffer overrun.
9231
ae58ff1f
PE
9232 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
9233
c43c8a6a
PE
9234 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
9235
3f8236f4
PE
92362011-09-04 Paul Eggert <eggert@cs.ucla.edu>
9237
53e9fe90 9238 Integer overflow fixes for scrolling, etc.
6511acf2
PE
9239 Without these, Emacs silently mishandles large integers sometimes.
9240 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
9241 it were "C-u 1 M-x recenter" on a typical 64-bit host.
9242
6511acf2
PE
9243 * xdisp.c (try_window_id): Check Emacs fixnum range before
9244 converting to 'int'.
806add1d 9245
6511acf2 9246 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
9247 Check that an Emacs fixnum is in range before assigning it to 'int'.
9248 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
9249 values converted from Emacs fixnums.
9250 (Frecenter): Don't wrap around a line count if it is out of 'int'
9251 range; instead, treat it as an extreme value.
9252 (Fset_window_configuration, compare_window_configurations):
9253 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
9254
6511acf2
PE
9255 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
9256 that can exceed INT_MAX. Check that EMACS_INT value is in range
9257 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
9258 (match_limit): Don't assume that a fixnum can fit in 'int'.
9259
6511acf2 9260 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
9261 exceed INT_MAX.
9262
6511acf2 9263 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
9264 (Fvertical_motion): Don't wrap around LINES values that don't fit
9265 in 'int'. Instead, treat them as extreme values. This is good
9266 enough for windows, which can't have more than INT_MAX lines anyway.
9267
fcb901a7
LMI
92682011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
9269
0f2f6b6d
LMI
9270 * Require libxml/parser.h to avoid compilation warning.
9271
fcb901a7
LMI
9272 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
9273
9274 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
9275 since this reportedly can destroy thread storage.
9276
6e20a0d4
CY
92772011-08-30 Chong Yidong <cyd@stupidchicken.com>
9278
9279 * syntax.c (find_defun_start): Update all cache variables if
9280 exiting early (Bug#9401).
9281
148ae00e
EZ
92822011-08-30 Eli Zaretskii <eliz@gnu.org>
9283
f6cfbd8f
EZ
9284 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
9285
148ae00e
EZ
9286 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
9287 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
9288 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
9289
9290 * term.c (tty_append_glyph): New function.
9291 (produce_stretch_glyph): Static function and its prototype deleted.
9292
a66cfb1c
SM
9293 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
9294 Add prototypes.
148ae00e 9295
c4a07a4c
PE
92962011-08-29 Paul Eggert <eggert@cs.ucla.edu>
9297
9298 * image.c (parse_image_spec): Check for nonnegative, not for positive,
9299 when checking :margin (Bug#9390).
9300 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 9301 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
9302 so that the name doesn't mislead. All uses changed.
9303
6bc8cd65
JB
93042011-08-28 Johan Bockgård <bojohan@gnu.org>
9305
9306 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
9307 set_tty_hooks.
9308
dca4927e
EZ
93092011-08-27 Eli Zaretskii <eliz@gnu.org>
9310
9311 * xdisp.c (move_it_to): Don't bail out early when reaching
9312 position beyond to_charpos, if we are scanning backwards.
9313 (move_it_vertically_backward): When DY == 0, make sure we get to
9314 the first character in the line after the newline.
9315
f2cad773
PE
93162011-08-27 Paul Eggert <eggert@cs.ucla.edu>
9317
9318 * ccl.c: Improve and simplify overflow checking (Bug#9196).
9319 (ccl_driver): Do not generate an out-of-range pointer.
9320 (Fccl_execute_on_string): Remove unnecessary check for
9321 integer overflow, noted by Stefan Monnier in
9322 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
9323 Remove a FIXME that didn't need fixing.
9324 Simplify the newly-introduced buffer reallocation code.
9325
0cae2cdb
JB
93262011-08-27 Juanma Barranquero <lekktu@gmail.com>
9327
9328 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
9329
5fc295a4 93302011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 9331
70c60eb2 9332 Integer and memory overflow issues (Bug#9196).
726e0ab1 9333
d31850da
PE
9334 * doc.c (get_doc_string): Rework so that
9335 get_doc_string_buffer_size is the actual buffer size, rather than
9336 being 1 less than the actual buffer size; this makes xpalloc more
9337 convenient.
9338
a69fbedb
PE
9339 * image.c (x_allocate_bitmap_record, cache_image):
9340 * xselect.c (Fx_register_dnd_atom):
9341 Simplify previous changes by using xpalloc.
9342
fe5c5d37
PE
9343 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
9344 since either will do and ptrdiff_t is convenient with xpalloc.
9345
0065d054
PE
9346 * charset.c (charset_table_size)
9347 (struct charset_sort_data.priority): Now ptrdiff_t.
9348 (charset_compare): Don't overflow if priorities differ greatly.
9349 (Fsort_charsets): Don't assume list length fits in int.
9350 Check for size-calculation overflow when allocating sort data.
9351 (syms_of_charset): Allocate an initial charset table that is
9352 just under 64 KiB, to avoid problems with glibc malloc and mmap.
9353
9354 * cmds.c (internal_self_insert): Check for size-calculation overflow.
9355
9356 * composite.h (struct composition.glyph_len): Now int, not unsigned.
9357 The actual value is always <= INT_MAX, and leaving it unsigned made
9358 overflow checking harder.
9359
9360 * dispextern.h (struct glyph_matrix.rows_allocated)
9361 (struct face_cache.size): Now ptrdiff_t, for convenience in use
9362 with xpalloc. The values are still always <= INT_MAX.
9363
9364 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
9365
9366 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
9367 (SAFE_NALLOCA): New macro.
9368
9369 * region-cache.c (struct boundary.pos, find_cache_boundary)
9370 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
9371 (set_cache_region, invalidate_region_cache)
9372 (revalidate_region_cache, know_region_cache, region_cache_forward)
9373 (region_cache_backward, pp_cache):
9374 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
9375 so that ptrdiff_t * can be passed to xpalloc.
9376 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
9377 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
9378 (pp_cache): Don't assume cache_len fits in int.
9379 * region-cache.h: Adjust extern decls to match.
9380
9381 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
9382 EMACS_INT, since either will do, for xpalloc.
9383
9384 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
9385 (xnmalloc, xnrealloc, xpalloc): New functions.
9386
726e0ab1
PE
9387 * bidi.c (bidi_shelve_header_size): New constant.
9388 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
9389 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
9390
51f30bc5 9391 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
9392 * buffer.c (overlays_at, overlays_in, record_overlay_string)
9393 (overlay_strings):
9394 Don't update size of array until after memory allocation succeeds,
9395 because xmalloc/xrealloc may not return.
0065d054
PE
9396 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
9397 now that we have proper integer overflow checking.
9398 (record_overlay_string, overlay_strings): Catch overflows when
9399 calculating size of overlay_str_buf.
726e0ab1 9400
0065d054
PE
9401 * callproc.c (Fcall_process): Check for size overflow when
9402 calculating size of args2.
9403 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
9404 Normally we prefer signed values, but sticking with ptrdiff_t would
9405 require adding more-complicated checks.
726e0ab1
PE
9406
9407 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
9408 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
9409 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 9410 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
9411
9412 * character.c (Fstring): Check for size-calculation overflow.
9413
9414 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
9415 unnecessary integer overflow. Check for size overflow.
9416 (encode_coding_object): Don't update size until xmalloc succeeds.
9417
9418 * composite.c (get_composition_id): Check for overflow in glyph
9419 length calculations.
9420
9421 Integer and memory overflow fixes for display code.
9422 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
9423 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
9424 (scrolling_window): Check for overflow in size calculations.
9425 (line_draw_cost, realloc_glyph_pool, add_row_entry):
9426 Don't assume glyph table len fits in int.
9427 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
9428 (row_table_size): Now ptrdiff_t, not int.
9429 (scrolling_window): Avoid overflow in size calculations.
9430 Don't update size until allocation succeeds.
9431 * fns.c (concat): Check for overflow in size calculations.
9432 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
9433 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
9434 (NEXT_ALMOST_PRIME_LIMIT): New constant.
9435
9436 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
9437 (get_doc_string): Check for size calculation overflow.
9438 Don't update size until allocation succeeds.
9439 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
9440 EMACS_INT, where ptrdiff_t will do.
9441 (Fsubstitute_command_keys): Check for string overflow.
9442
9443 * editfns.c (set_time_zone_rule): Don't assume environment length
9444 fits in int.
9445 (message_length): Now ptrdiff_t, not int.
9446 (Fmessage_box): Don't update size until allocation succeeds.
9447 Don't assume message length fits in int.
9448 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
9449
0065d054
PE
9450 * emacs.c (main): Do not reallocate argv, since there is a null at
9451 the end that can be overwritten, and this way there's no need to
9452 worry about size-calculation overflow.
9453 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
9454
9455 * eval.c (init_eval_once, grow_specpdl): Don't update size until
9456 alloc succeeds.
9457 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
9458
9459 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
9460 (x_set_scroll_bar_width, x_figure_window_size):
9461 Check for integer overflow.
9462 (x_set_alpha): Do not assume XINT fits in int.
9463
9464 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
9465 This is for the members text_lines, text_cols, total_lines, total_cols,
9466 where the system imposes an 'int' limit.
9467
9468 * fringe.c (Fdefine_fringe_bitmap):
9469 Don't update size until alloc works.
9470
9471 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
9472 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
9473
9474 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
9475 Check for size-calculation overflow.
9476 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
9477 do, as we prefer signed integers.
9478 (id_to_widget.max_size, id_to_widget.used)
9479 (xg_store_widget_in_map, xg_remove_widget_from_map)
9480 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
9481 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
9482 Use and return ptrdiff_t, not int.
9483 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
9484 * gtkutil.h: Change prototypes to match the above.
9485
9486 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
9487 are duplicate now that they've been promoted to lisp.h.
9488 (x_allocate_bitmap_record, x_alloc_image_color)
9489 (make_image_cache, cache_image, xpm_load):
9490 Don't update size until alloc is done.
9491 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
9492 (x_detect_edges):
3256efce 9493 Check for size calculation overflow.
726e0ab1
PE
9494 (ct_colors_allocated_max): New constant.
9495 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
9496 overflow.
3256efce 9497
726e0ab1
PE
9498 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
9499 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
9500 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
9501 Use ptrdiff_t, not int, to count maps.
9502 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
9503 calculations. Don't update size until allocation succeeds.
9504 Redo calculations to avoid overflow.
726e0ab1
PE
9505 * keyboard.h: Change prototypes to match the above.
9506
9507 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
9508 to count maps.
9509 (current_minor_maps): Check for size calculation overflow.
9510 * keymap.h: Change prototypes to match the above.
9511
9512 * lread.c (read1, init_obarray): Don't update size until alloc done.
9513
9514 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
9515 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
9516
726e0ab1
PE
9517 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
9518 Now ptrdiff_t, not int.
9519 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
9520 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
9521
9522 * process.c (Fnetwork_interface_list): Check for overflow
9523 in size calculation.
9524
9525 * region-cache.c (move_cache_gap): Check for size calculation overflow.
9526
9527 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
9528 overflow. Don't bother calling xmalloc when xrealloc will do.
9529
9530 * search.c (Freplace_match): Check for size calculation overflow.
9531 (Fset_match_data): Don't assume list lengths fit in 'int'.
9532
9533 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
9534 for command line length. Do not attempt to address one before the
9535 beginning of an array, as that's not portable.
9536
9537 * term.c (max_frame_lines): Remove; unused.
9538 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
9539 not int.
9540 (encode_terminal_code, calculate_costs): Check for size
9541 calculation overflow.
9542 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
9543 table lengths and related sizes. Don't update size until alloc
9544 done. Redo calculations to avoid overflow.
9545 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
9546
9547 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
9548 subtracting pointers.
9549 (gobble_line): Check for overflow more carefully. Don't update size
9550 until alloc done.
9551
9552 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
9553 Don't update size until alloc done.
9554 Redo size calculations to avoid overflow.
9555 Check for size calculation overflow.
0065d054 9556 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
9557
9558 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
9559 Use ptrdiff_t, not int, for sizes.
9560 (store_mode_line_noprop_char): Don't update size until alloc done.
9561
0065d054
PE
9562 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
9563 Use ptrdiff_t, not int, for sizes.
9564 (Finternal_make_lisp_face, cache_face):
9565 Check for size calculation overflow.
9566 (cache_face): Treat size calculation overflows as if they were
9567 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
9568
9569 * xfns.c (x_encode_text, x_set_name_internal)
9570 (Fx_change_window_property): Use ptrdiff_t, not int, to count
9571 sizes, since they can exceed INT_MAX in size. Check for size
9572 calculation overflow.
9573
0065d054
PE
9574 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
9575 (xg_select): Check for size calculation overflow.
726e0ab1
PE
9576 Don't update size until alloc done.
9577
0065d054 9578 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 9579 as sprintf is limited to int lengths.
1d526e2f 9580
252c5ee1
PE
9581 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
9582 (X_LONG_MIN): New macros.
864d7ce7
PE
9583 Use them to make the following changes clearer.
9584 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
9585 This change doesn't affect the value now, but it may help remind
9586 future maintainers not to raise the value too much later.
9587 (SELECTION_QUANTUM): Remove, replacing with ...
9588 (selection_quantum): ... new function, which avoids overflow.
9589 All uses changed.
9590 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
9591 assumption that selection length fits in 'int'.
9592 (x_reply_selection_request, x_handle_selection_request)
9593 (x_get_window_property, receive_incremental_selection)
9594 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
9595 (lisp_data_to_selection_data, clean_local_selection_data):
9596 Use ptrdiff_t, not int, to record length of selection.
9597 (x_reply_selection_request, x_get_window_property)
9598 (receive_incremental_selection, x_property_data_to_lisp):
9599 Redo calculations to avoid overflow.
9600 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 9601 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
9602 something.
9603 (x_get_window_property, receive_incremental_selection)
9604 (lisp_data_to_selection_data, x_property_data_to_lisp):
9605 Check for size-calculation overflow.
9606 (x_get_window_property, receive_incremental_selection)
9607 (lisp_data_to_selection_data, Fx_register_dnd_atom):
9608 Don't store size until memory allocation succeeds.
9609 (x_get_window_property): Plug memory leak on memory exhaustion.
9610 Don't double-block input; malloc is safe here. Don't assume 2**34
9611 - 4 fits in unsigned long. Add an xassert to check
9612 XGetWindowProperty overflow. Be more careful about overflow
9613 calculations, and distinguish size from memory overflow better.
9614 (receive_incremental_selection): When tracing, don't assume
9615 unsigned int is less than INT_MAX.
9616 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
9617 harmful) conversions of unsigned short to int.
9618 (lisp_data_to_selection_data): Don't assume that integers
9619 in the range -65535 through -1 fit in an X unsigned short.
9620 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
9621 result parameters unless successful. Rely on cons_to_unsigned
9622 to report problems with elements; the old code wasn't right anyway.
9623 (x_check_property_data): Check for int overflow; we cannot use
9624 a wider type due to X limits.
9625 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
9626
726e0ab1 9627 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 9628
0065d054
PE
9629 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
9630 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
9631 (x_color_cells): Don't store size until memory allocation succeeds.
9632 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 9633 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
9634 (x_term_init): Don't assume length fits in int (sprintf is limited
9635 to int size).
bc18e09d 9636
ebfa62c0
PE
9637 Use ptrdiff_t for composition IDs.
9638 * character.c (lisp_string_width):
9639 * composite.c (composition_table_size, n_compositions)
9640 (get_composition_id, composition_gstring_from_id):
9641 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
9642 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
9643 * window.c (Frecenter):
9644 Use ptrdiff_t, not int, for composition IDs.
9645 * composite.c (get_composition_id): Check for integer overflow.
9646 * composite.h: Adjust prototypes to match the above changes.
9647
d3411f89
PE
9648 Use ptrdiff_t for hash table indexes.
9649 * category.c (hash_get_category_set):
9650 * ccl.c (ccl_driver):
9651 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
9652 * coding.c (coding_system_charset_list, detect_coding_system):
9653 * coding.h (struct coding_system.id):
9654 * composite.c (get_composition_id, gstring_lookup_cache):
9655 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
9656 * image.c (xpm_get_color_table_h):
9657 * lisp.h (hash_lookup, hash_put):
9658 * minibuf.c (Ftest_completion):
9659 Use ptrdiff_t for hash table indexes, not int (which is too
9660 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
9661 32-bit --with-wide-int hosts).
9662
e097a6fa
PE
9663 * charset.c (Fdefine_charset_internal): Check for integer overflow.
9664 Add a FIXME comment about memory leaks.
9665 (syms_of_charset): Don't assume xmalloc returns.
9666
5637687f
PE
9667 Don't assume that stated character widths fit in int.
9668 * character.c (Fchar_width, c_string_width, lisp_string_width):
9669 * character.h (CHAR_WIDTH):
9670 * indent.c (MULTIBYTE_BYTES_WIDTH):
9671 Use sanitize_char_width to avoid undefined and/or bad behavior
9672 with outlandish widths.
a66cfb1c 9673 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
9674 now that we have two such functions. All uses changed.
9675 (sanitize_char_width): New inline function.
9676
a2271ba2
PE
9677 Don't assume that tab-width fits in int.
9678 * character.h (sanitize_width): New inline function.
9679 (SANE_TAB_WIDTH): New macro.
9680 (ASCII_CHAR_WIDTH): Use it.
9681 * indent.c (sane_tab_width): Remove. All uses replaced by
9682 SANE_TAB_WIDTH (current_buffer).
9683 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
9684
18c52557
PE
9685 * fileio.c: Integer overflow issues with file modes.
9686 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
9687
caeeedc1
PE
9688 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
9689 Remove unreachable code.
9690 (read_hex, load_charset_map_from_file): Check for integer overflow.
9691
6df6ae42 9692 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
9693 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
9694 (x_send_scroll_bar_event): Likewise. Check that the size does not
9695 exceed limits imposed by XClientMessageEvent, as well as the usual
9696 ptrdiff_t and size_t limits.
9697
b13995db
PE
9698 * keyboard.c: Overflow, signedness and related fixes.
9699 (make_lispy_movement): Use same integer type in forward decl
9700 that is used in the definition.
9701 (read_key_sequence, keyremap_step):
9702 Change bufsize argument back to int, undoing my 2011-03-30 change.
9703 We prefer signed types, and int is wide enough here.
9704 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
9705 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
9706 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
9707 length, not size_t. Use ptrdiff_t for index, not int.
9708 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
9709 possibility of integer overflow.
9710
13464394
PE
9711 Overflow, signedness and related fixes for images.
9712
9713 * dispextern.h (struct it.stack[0].u.image.image_id)
9714 (struct_it.image_id, struct image.id, struct image_cache.size)
9715 (struct image_cache.used, struct image_cache.ref_count):
9716 * gtkutil.c (update_frame_tool_bar):
9717 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
9718 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
9719 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
9720 * nsmenu.m (update_frame_tool_bar):
9721 * xdisp.c (calc_pixel_width_or_height):
9722 * xfns.c (image_cache_refcount):
9723 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
9724 on typical 64-bit hosts.
9725
9726 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
9727 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
9728 Omit unnecessary casts to int.
9729 (parse_image_spec): Check that integers fall into 'int' range
9730 when the callers expect that.
9731 (image_ascent): Redo ascent calculation to avoid int overflow.
9732 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
9733 (lookup_image): Remove unnecessary tests.
9734 (xbm_image_p): Locals are now of int, not EMACS_INT,
9735 since parse_image_check makes sure they fit into int.
9736 (png_load, gif_load, svg_load_image):
9737 Prefer int to unsigned where either will do.
9738 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
9739 old tiff_error_handler and tiff_warning_handler.
9740 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
9741 stack buffer overflows. It uses only the features of vsnprintf
9742 that are common to both POSIX and native Microsoft.
9743 (tiff_error_handler, tiff_warning_handler): Use it.
9744 (tiff_load, gif_load, imagemagick_load_image):
9745 Don't assume :index value fits in 'int'.
9746 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
9747 (imagemagick_load_image): Check that crop parameters fit into
9748 the integer types that MagickCropImage accepts. Don't assume
9749 Vimagemagick_render_type has a nonnegative value. Don't assume
9750 size_t fits in 'long'.
9751 (gs_load): Use printmax_t to print the widest integers possible.
9752 Check for integer overflow when computing image height and width.
9753
c11821d4
EZ
97542011-08-26 Eli Zaretskii <eliz@gnu.org>
9755
9756 * xdisp.c (redisplay_window): Don't force window start if point
9757 will be invisible in the resulting window. (Bug#9324)
9758
0c95fcf7
EZ
97592011-08-25 Eli Zaretskii <eliz@gnu.org>
9760
9761 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
9762 the display spec is of the form `(space ...)'.
9763 (handle_display_spec): Return the value returned by
9764 handle_single_display_spec, not just 1 or zero.
9765 (handle_single_display_spec): If the display spec is of the form
9766 `(space ...)', and specifies display in the text area, return 2
9767 rather than 1.
fee65a97 9768 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
9769 accurately, and prefer exact match for point under bidi.
9770 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
9771
9772 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
9773 into disp_prop; all users changed.
9774
9775 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
9776 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
9777 for the text covered by the display property.
9778
e4ed06f1
CY
97792011-08-25 Chong Yidong <cyd@stupidchicken.com>
9780
9781 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
9782 Change return value to nil.
9783 (Frecord_buffer): Delete unused function.
9784
f67cdd7f
EZ
97852011-08-24 Eli Zaretskii <eliz@gnu.org>
9786
5980d4c6
EZ
9787 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
9788 buffers, return left-to-right.
8610fe8b
EZ
9789 (set_cursor_from_row): Consider candidate row a win if its glyph
9790 represents a newline and point is on that newline. Fixes cursor
9791 positioning on the newline at EOL of R2L text within L2R
9792 paragraph, and vice versa.
9793 (try_cursor_movement): Check continued rows, in addition to
9794 continuation rows. Fixes unwarranted scroll when point enters a
9795 continued line of R2L text within an L2R paragraph, or vice versa.
9796 (cursor_row_p): Consider the case of point being equal to
9797 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
9798 from the end of a short line to the beginning of a continued line
9799 of R2L text within L2R paragraph.
9800 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
9801 composed characters.
5980d4c6 9802
f67cdd7f
EZ
9803 * bidi.c (bidi_check_type): Use xassert.
9804 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
9805 members.
9806
bca633fb
EZ
98072011-08-23 Eli Zaretskii <eliz@gnu.org>
9808
9809 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
9810 a character.
9811
4a5885a7
CY
98122011-08-23 Chong Yidong <cyd@stupidchicken.com>
9813
9814 * nsfont.m (ns_otf_to_script): Fix typo.
9815
0902a04e
KH
98162011-08-22 Kenichi Handa <handa@m17n.org>
9817
9818 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
9819 extra slot even if the purpose is char-code-property-table.
9820
1a2e6670
EZ
98212011-08-23 Eli Zaretskii <eliz@gnu.org>
9822
8ddde651
EZ
9823 * xdisp.c (redisplay_window): When computing centering_position,
9824 account for the height of the header line. (Bug#8874)
9825
425cc014
EZ
9826 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
9827 instead of CHAR_TO_BYTE. Fixes a crash when a completion
9828 candidate is selected by the mouse, and that candidate has a
9829 composed character under the mouse.
9830
1a2e6670
EZ
9831 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
9832 coordinates reported by pos-visible-in-window-p for a composed
9833 character in column zero.
9834
8b76d6f8
SM
98352011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
9836
9837 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
9838
dac347dd
EZ
98392011-08-22 Eli Zaretskii <eliz@gnu.org>
9840
9841 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
9842 consider it a hit if to_charpos is anywhere in the range of the
9843 composed buffer positions.
9844
e013fb34
CY
98452011-08-22 Chong Yidong <cyd@stupidchicken.com>
9846
9847 * image.c (gif_load): Don't assume that each subimage has the same
9848 dimensions as the base image. Handle disposal method that is
9849 "undefined" by the gif spec (Bug#9335).
9850
bd1ba3e8
CY
98512011-08-20 Chong Yidong <cyd@stupidchicken.com>
9852
9853 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 9854 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 9855
54a1215b
EZ
98562011-08-19 Eli Zaretskii <eliz@gnu.org>
9857
823564e5
EZ
9858 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
9859 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
9860 from an Org mode buffer to a Speedbar frame.
9861
54a1215b
EZ
9862 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
9863 a composition, take its buffer position from IT->cmp_it.charpos.
9864 Fixes cursor positioning at the beginning of a line that begins
9865 with a composed character.
9866
9778ebcc
EZ
98672011-08-18 Eli Zaretskii <eliz@gnu.org>
9868
0be6ee06
EZ
9869 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
9870 character bidirectional type, use STRONG_L instead. Fixes crashes
9871 in a buffer produced by `describe-categories'.
9872
9778ebcc
EZ
9873 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
9874 members before the level stack, so they would be saved and
9875 restored when copying iterator state. Fixes incorrect reordering
9876 around TABs covered by display properties.
9877
156bffbe
AS
98782011-08-18 Andreas Schwab <schwab@linux-m68k.org>
9879
6b02f655 9880 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 9881
72ad093b
CY
98822011-08-17 Chong Yidong <cyd@stupidchicken.com>
9883
9884 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
9885 (internal_condition_case_2, internal_condition_case_n):
9886 Remove unnecessary aborts (Bug#9081).
72ad093b 9887
35774242
EZ
98882011-08-17 Eli Zaretskii <eliz@gnu.org>
9889
9890 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
9891 has no `load' handler, try opening the file locally. (Bug#9311)
9892
db76dd85
KB
98932011-08-16 Ken Brown <kbrown@cornell.edu>
9894
9895 * gmalloc.c: Expand comment.
9896
b215eee5
EZ
98972011-08-16 Eli Zaretskii <eliz@gnu.org>
9898
9899 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
9900 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
9901
a4579d33
KB
99022011-08-16 Ken Brown <kbrown@cornell.edu>
9903
9904 Fix memory allocation problems in Cygwin build (Bug#9273).
9905
9906 * unexcw.c ( __malloc_initialized): Declare external variable.
9907 (fixup_executable): Force the dumped emacs to reinitialize malloc.
9908
8b76d6f8
SM
9909 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
9910 New variables.
a4579d33
KB
9911 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
9912 dumped emacs.
9913 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
9914 in the static heap.
9915 [CYGWIN] (special_realloc): New function.
9916 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
9917 requests to realloc storage in the static heap.
9918
3ebec551
PE
99192011-08-15 Paul Eggert <eggert@cs.ucla.edu>
9920
9921 * bidi.c (bidi_initialize): Remove unused local.
9922
9fd8be00
EZ
99232011-08-15 Eli Zaretskii <eliz@gnu.org>
9924
6b02f655
SM
9925 * bidimirror.h:
9926 * biditype.h: Remove file.
9927 * makefile.w32-in ($(BLD)/bidi.$(O)):
9928 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
9929
9930 * dispextern.h: Fix a typo in the comment to bidi_type_t.
9931
9932 * chartab.c: Improve commentary for the uniprop_table API.
9933
32413314
EZ
9934 * bidi.c (bidi_paragraph_init): Support zero value of
9935 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
9936 (bidi_initialize): Use uniprop_table instead of including
9937 biditype.h and bidimirror.h.
32413314 9938
9fd8be00
EZ
9939 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
9940 coordinates of the iterator when restoring from ppos_it.
9941 (Bug#9296)
9942
5cf2b69b
KH
99432011-08-14 Kenichi Handa <handa@m17n.org>
9944
9945 * process.c (create_process): Call setup_process_coding_systems
72ad093b 9946 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 9947
daf17d00
EZ
99482011-08-14 Eli Zaretskii <eliz@gnu.org>
9949
9950 * xdisp.c (move_it_in_display_line_to): Don't invoke
9951 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
9952 ppos_it. Fixes vertical cursor motion when line beginning is
9953 covered by an image. (Bug#9296)
9954
08e3161a
JD
99552011-08-14 Jan Djärv <jan.h.d@swipnet.se>
9956
9957 * nsterm.h (ns_run_ascript): Declare.
9958 (NSAPP_DATA2_RUNASSCRIPT): Define.
9959
9960 * nsfns.m (as_script, as_result, as_status): New static variables.
9961 (ns_run_ascript): New function.
5e617bc2 9962 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
9963 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
9964 the event loop. Get status from as_status (Bug#7276).
9965
9966 * nsterm.m (sendEvent): If event is NSApplicationDefined and
9967 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
9968 the event loop (Bug#7276).
9969
a3720aa2
AS
99702011-08-14 Andreas Schwab <schwab@linux-m68k.org>
9971
9972 * gnutls.c (QCgnutls_bootprop_priority)
9973 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
9974 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
9975 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
9976 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
9977 (QCgnutls_bootprop_verify_hostname_error)
9978 (QCgnutls_bootprop_callbacks_verify): Rename from
9979 Qgnutls_bootprop_..., all uses changed.
9980
9981 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
9982 uses changed.
9983
0a0d27fb
PE
99842011-08-14 Paul Eggert <eggert@cs.ucla.edu>
9985
19d5c50c
PE
9986 * xfaces.c (Qframe_set_background_mode): Now static.
9987 * dispextern.h (Qframe_set_background_mode): Remove decl.
9988
0a0d27fb
PE
9989 * process.c (Fnetwork_interface_info): Declare local only if needed.
9990
377538cb
JD
99912011-08-13 Jan Djärv <jan.h.d@swipnet.se>
9992
9993 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
9994 (Fnetwork_interface_list): Allocate in increments of bytes instead
9995 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
9996 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
9997 sockaddr.
9998 (struct ifflag_def): notrailers is smart on OSX.
9999 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
10000 Get hardware address with getifaddrs if available.
10001
08fff70c
EZ
100022011-08-12 Eli Zaretskii <eliz@gnu.org>
10003
10004 * xdisp.c (iterate_out_of_display_property): xassert that
10005 IT->position is set to within IT->object's boundaries. Break from
10006 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
10007 when IT->position is set up wrongly due to some bug.
10008 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
10009 (push_display_prop): Allow GET_FROM_STRING as IT->method on
10010 entry. Force push_it to save on the stack the current
10011 buffer/string position, to be restored by pop_it. Fix flags in
10012 the iterator structure wrt the object coming from a display
10013 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
10014 properties. (Bug#9284)
10015
7be1c708 100162011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 10017
7be1c708
CY
10018 * fontset.c (fontset_get_font_group): Add proper type checks.
10019 (Bug#9172)
aac0c6e3 10020
7be1c708 100212011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 10022
7be1c708
CY
10023 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
10024 and LC_VERSION_MIN_MACOSX.
10025 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
10026 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 10027
97bb72a6
EZ
100282011-08-08 Eli Zaretskii <eliz@gnu.org>
10029
10030 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
10031 no-display-properties-and-no-overlays under bidi display.
10032 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 10033 properties and overlays.
97bb72a6 10034
d5617611
CY
100352011-08-08 Chong Yidong <cyd@stupidchicken.com>
10036
37e11a63
CY
10037 * editfns.c (Fset_time_zone_rule): Document relationship with the
10038 setenv function.
10039
d5617611
CY
10040 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
10041 the font entity extracted from the cache (Bug#8109).
10042
58872834
CY
100432011-08-07 Chong Yidong <cyd@stupidchicken.com>
10044
10045 * composite.c (autocmp_chars): Don't reset point. That is done by
10046 restore_point_unwind (Bug#5984).
10047
75bfc667
JL
100482011-08-07 Juri Linkov <juri@jurta.org>
10049
10050 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
10051 to show the arg `TIME' instead of `TIMEVAL'.
10052
d1410150
EZ
100532011-08-06 Eli Zaretskii <eliz@gnu.org>
10054
10055 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
10056 display property strides EOL and includes a newline, as in
10057 longlines-mode. (Bug#9254)
75b771e4
EZ
10058 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
10059 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
10060
10061 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
10062 is non-zero, even if the data buffer is NULL. Fixes a crash in
10063 vertical-motion with longlines-mode. (Bug#9254)
10064
35928349
EZ
100652011-08-05 Eli Zaretskii <eliz@gnu.org>
10066
ec7cc85b
EZ
10067 * bidi.c <bidi_cache_total_alloc>: Now static.
10068 (bidi_initialize): Initialize bidi_cache_total_alloc.
10069
8b76d6f8 10070 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
10071 cache. (Bug#9221)
10072
10073 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
10074 amount allocated this far in `bidi_cache_total_alloc'.
10075 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
10076 non-zero, only free the data buffer without restoring the cache
10077 contents. All callers changed.
10078
10079 * dispextern.h (bidi_unshelve_cache): Update prototype.
10080
10081 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
10082 (move_it_in_display_line, move_it_to)
10083 (move_it_vertically_backward, move_it_by_lines): Replace the call
10084 to xfree to an equivalent call to bidi_unshelve_cache.
10085 (move_it_in_display_line_to): Fix logic of returning
412b6358 10086 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 10087
e2e2423b
EZ
100882011-08-05 Eli Zaretskii <eliz@gnu.org>
10089
10090 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
10091 came from a string character with a `cursor' property. (Bug#9229)
10092
ae9e757a
JD
100932011-08-04 Jan Djärv <jan.h.d@swipnet.se>
10094
10095 * Makefile.in (LIB_PTHREAD): New variable.
10096 (LIBES): Add LIB_PTHREAD (Bug#9216).
10097
10098 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
10099 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
10100
213bd7f2
AS
101012011-08-04 Andreas Schwab <schwab@linux-m68k.org>
10102
6b02f655 10103 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 10104
99aaf75f
JD
101052011-08-04 Jan Djärv <jan.h.d@swipnet.se>
10106
10107 * xterm.c (x_find_topmost_parent): New function.
10108 (x_set_frame_alpha): Find topmost parent window with
10109 x_find_topmost_parent and set the property there also (bug#9181).
10110 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
10111
c74e9d86
PE
101122011-08-04 Paul Eggert <eggert@cs.ucla.edu>
10113
10114 * callproc.c (Fcall_process): Avoid vfork clobbering
10115 the local vars buffer, coding_systems, current_dir.
10116
640c8776
SM
101172011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
10118
10119 * keymap.c (Fmake_composed_keymap): Move to subr.el.
10120
f26d0e4c
PE
101212011-08-03 Paul Eggert <eggert@cs.ucla.edu>
10122
8a10d76c
PE
10123 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
10124 so that it is not optimized away.
10125
f26d0e4c
PE
10126 * xdisp.c (compute_display_string_pos): Remove unused local.
10127
55439c61
EZ
101282011-08-02 Eli Zaretskii <eliz@gnu.org>
10129
10130 Fix slow cursor motion and scrolling in large buffers with
10131 selective display, like Org Mode buffers. (Bug#9218)
10132
10133 * dispextern.h (struct bidi_it): New member disp_prop_p.
10134
10135 * xdisp.c: Remove one-slot cache of display string positions.
10136 (compute_display_string_pos): Accept an additional argument
5e617bc2 10137 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
10138 for a display string or property. If found, set DISP_PROP_P
10139 non-zero.
10140
10141 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
10142 DISP_PROP_P, and pass it to compute_display_string_pos.
10143 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
10144 non-zero. All callers of bidi_fetch_char changed.
10145
fb33fa43
SM
101462011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
10147
10148 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
10149
b099e063
DM
101502010-12-03 Don March <don@ohspite.net>
10151
10152 * keymap.c (Fdefine_key): Fix non-prefix key error message when
10153 last character M-[char] is translated to ESC [char] (bug#7541).
10154
5cc7f7af
KH
101552011-08-02 Kenichi Handa <handa@m17n.org>
10156
d0fffa3f 10157 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
10158
10159 * chartab.c (uniprop_table): Make it non-static.
10160
525d5e6e
EZ
101612011-08-01 Eli Zaretskii <eliz@gnu.org>
10162
10163 * xdisp.c (forward_to_next_line_start): Accept additional argument
10164 BIDI_IT_PREV, and store into it the state of the bidi iterator had
10165 on the newline.
10166 (reseat_at_next_visible_line_start): Use the bidi iterator state
10167 returned by forward_to_next_line_start to restore the state of
10168 it->bidi_it after backing up to previous newline. (Bug#9212)
10169
31011111
AS
101702011-07-30 Andreas Schwab <schwab@linux-m68k.org>
10171
10172 * regex.c (re_comp): Protoize.
10173 (re_exec): Fix return type.
10174 (regexec): Fix type of `ret'. (Bug#9203)
10175
476371c4
PE
101762011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10177
e5d76069
PE
10178 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
10179 This is needed if max-image-size is a floating-point number.
10180
9a79b20c
AS
101812011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10182
10183 * print.c (print_object): Print empty symbol as ##.
10184
10185 * lread.c (read1): Read ## as empty symbol.
10186
d8c2fa78
AA
101872011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
10188
10189 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
10190 setting frame foreground color (Bug#9175).
10191 (x_set_background_color): Likewise.
10192
ffe57a7a
AA
10193 * nsmenu.m (-setText): Size tooltip dimensions precisely to
10194 contents (Bug#9176).
10195 (EmacsTooltip -init): Remove bezels and add shadows to
10196 tooltip windows.
10197
bf3492a5
AA
10198 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
10199 or scroll bar (Bug#8470).
10200
d55e9c53
AA
10201 * nsfont.m (nsfont_open): Remove assignment to voffset and
10202 unnecessary vars hshink, expand, hd, full_height, min_height.
10203 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
10204
10205 * nsterm.h (nsfont_info): Remove voffset field.
10206
d8c2fa78 102072011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
10208
10209 Implement strike-through and overline on NextStep (Bug#8863).
10210
10211 * nsfont.m (nsfont_open): Use underline position provided by font,
10212 instead of hard-coded value of 2.
10213 (nsfont_draw): Call ns_draw_text_decoration instead.
10214
10215 * nsterm.h: Add declaration for ns_draw_text_decoration.
10216
10217 * nsterm.m (ns_draw_text_decoration): New function for drawing
10218 underline, overline, and strike-through.
10219 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
10220 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 10221 accommodate underlining, etc.
4843aac3 10222
4cc60b9b
EZ
102232011-07-28 Eli Zaretskii <eliz@gnu.org>
10224
bc7ece87
EZ
10225 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
10226 default.
4cc60b9b 10227
476371c4
PE
102282011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10229
66606eea
PE
10230 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
10231 Without this fix, if a signal arrives just after memory fills up,
10232 'malloc' might be invoked reentrantly.
10233
476371c4
PE
10234 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
10235 In other words, assume that every image size is allowed, on non-X
10236 hosts. This assumption is probably wrong, but it lets Emacs compile.
10237
f3fcc40d
AS
102382011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10239
10240 * regex.c (re_iswctype): Convert return values to boolean.
10241
350c992f
EZ
102422011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
10243
10244 * xdisp.c (compute_display_string_pos): Don't use cached display
10245 string position if the buffer had its restriction changed.
10246 (Bug#9184)
10247
5266b4bb
PE
102482011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10249
10250 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
10251
2573a837 102522011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 10253
41f55ccd 10254 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 10255
39e378da
PE
10256 * bidi.c: Integer size and overflow fixes.
10257 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
10258 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
10259 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10260 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
10261 (bidi_find_other_level_edge):
10262 Use ptrdiff_t instead of EMACS_INT where either will do.
10263 This works better on 32-bit hosts configured --with-wide-int.
10264 (bidi_cache_ensure_space): Check for size-calculation overflow.
10265 Use % rather than repeated addition, for better worst-case speed.
10266 Don't set bidi_cache_size until after xrealloc returns, because it
10267 might not return.
10268 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
10269 (bidi_cache_ensure_space): Also check that the bidi cache size
10270 does not exceed that of the largest Lisp string or buffer. See Eli
10271 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 10272
5e927815
PE
10273 * alloc.c (__malloc_size_t): Remove.
10274 All uses replaced by size_t. See Andreas Schwab's note
10275 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
10276
ca4aa935
PE
10277 * image.c: Improve checking for integer overflow.
10278 (check_image_size): Assume that f is nonnull, since
10279 it is always nonnull in practice. This is one less thing to
10280 worry about when checking for integer overflow later.
10281 (x_check_image_size): New function, which checks for integer
10282 overflow issues inside X.
10283 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
10284 This removes the need for a memory_full check.
10285 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
10286 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
10287 (xbm_read_bitmap_data): Change locals back to 'int', since
10288 their values must fit in 'int'.
10289 (xpm_load_image, png_load, tiff_load):
10290 Invoke x_create_x_image_and_pixmap earlier,
10291 to avoid much needless work if the image is too large.
10292 (tiff_load): Treat overly large images as if
10293 x_create_x_image_and_pixmap failed, not as malloc failures.
10294 (gs_load): Use x_check_image_size.
10295
5f8f9cc2
PE
10296 * gtkutil.c: Omit integer casts.
10297 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
10298 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
10299
5adf60bc
PE
10300 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
10301
c8907a93
PE
10302 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
10303 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
10304 would wrongly return t on a 64-bit host.
10305
e3c25c68
PE
10306 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
10307 The plain *_OVERFLOW macros run afoul of GCC bug 49705
10308 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
10309 and therefore cause GCC to emit a bogus diagnostic in some cases.
10310
3f791afe
PE
10311 * image.c: Integer signedness and overflow and related fixes.
10312 This is not an exhaustive set of fixes, but it's time to
10313 record what I've got.
10314 (lookup_pixel_color, check_image_size): Remove redundant decls.
10315 (check_image_size): Don't assume that arbitrary EMACS_INT values
10316 fit in 'int', or that arbitrary 'double' values fit in 'int'.
10317 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
10318 (tiff_load, imagemagick_load_image):
10319 Check for overflow in size calculations.
10320 (x_create_x_image_and_pixmap): Remove unnecessary test for
10321 xmalloc returning NULL; that can't happen.
10322 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
10323 (xpm_color_bucket): Use better integer hashing function.
10324 (xpm_cache_color): Don't possibly over-allocate memory.
10325 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
10326 (gif_memory_source):
10327 Use ptrdiff_t, not int or size_t, to record sizes.
10328 (png_load): Don't assume values greater than 2**31 fit in 'int'.
10329 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
10330 either works, as we prefer signed integers.
10331 (tiff_read_from_memory, tiff_write_from_memory):
10332 Return tsize_t, not size_t, since that's what the TIFF API wants.
10333 (tiff_read_from_memory): Don't fail simply because the read would
10334 go past EOF; instead, return a short read.
10335 (tiff_load): Omit no-longer-needed casts.
10336 (Fimagemagick_types): Don't assume size fits into 'int'.
10337
3cc5a532
PE
10338 Improve hashing quality when configured --with-wide-int.
10339 * fns.c (hash_string): New function, taken from sxhash_string.
10340 Do not discard information about ASCII character case; this
10341 discarding is no longer needed.
10342 (sxhash-string): Use it. Change sig to match it. Caller changed.
10343 * lisp.h: Declare it.
10344 * lread.c (hash_string): Remove, since we now use fns.c's version.
10345 The fns.c version returns a wider integer if --with-wide-int is
10346 specified, so this should help the quality of the hashing a bit.
10347
b312a492
PE
10348 * emacs.c: Integer overflow minor fix.
10349 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
10350 Define only if GNU_LINUX.
10351 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
10352
dfd153ae
PE
10353 * dispnew.c: Integer signedness and overflow fixes.
10354 Remove unnecessary forward decls, that were a maintenance hassle.
10355 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
10356 All uses changed.
10357 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
10358 (scrolling_window): Use ptrdiff_t, not int, for byte count.
10359 (prepare_desired_row, line_draw_cost):
10360 Use int, not unsigned, where either works.
10361 (save_current_matrix, restore_current_matrix):
10362 Use ptrdiff_t, not size_t, where either works.
10363 (init_display): Check for overflow more accurately, and without
10364 relying on undefined behavior.
10365
a81d11a3
PE
10366 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
10367 Remove, replacing with the new symbols in lisp.h. All uses changed.
10368 * fileio.c (make_temp_name):
10369 * filelock.c (lock_file_1, lock_file):
10370 * xdisp.c (message_dolog):
10371 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
10372 Use pMd etc. instead.
10373 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
10374 replacing the pWIDE etc. symbols removed from editfns.c.
10375
3300e6fd
PE
10376 * keyboard.h (num_input_events): Now uintmax_t.
10377 This is (very slightly) less likely to mess up due to wraparound.
10378 All uses changed.
10379
fd05c7e9
PE
10380 * buffer.c: Integer signedness fixes.
10381 (alloc_buffer_text, enlarge_buffer_text):
10382 Use ptrdiff_t rather than size_t when either will do, as we prefer
10383 signed integers.
10384
903fe15d
PE
10385 * alloc.c: Integer signedness and overflow fixes.
10386 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
10387 (__malloc_size_t): Default to size_t, not to int.
10388 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
10389 (Fgarbage_collect, mark_object_loop_halt, mark_object):
10390 Prefer ptrdiff_t to size_t when either would do, as we prefer
10391 signed integers.
10392 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
10393 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
10394 Now const. Initialize with values that are in range even if char
10395 is signed.
10396 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
10397 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
10398 These functions do the right thing with sizes > 2**32.
10399 (check_depth): Now ptrdiff_t, not int.
10400 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
10401 Adjust to new way of storing sizes. Check for size overflow bugs
10402 in rest of code.
10403 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
10404 slightly wrong anyway, as it missed one instance of
10405 XMALLOC_OVERRUN_CHECK_OVERHEAD.
10406 (refill_memory_reserve): Omit needless cast to size_t.
10407 (mark_object_loop_halt): Mark as externally visible.
10408
ac82cc6a
PE
10409 * xselect.c: Integer signedness and overflow fixes.
10410 (Fx_register_dnd_atom, x_handle_dnd_message):
10411 Use ptrdiff_t, not size_t, since we prefer signed.
10412 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
10413 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
10414 x_dnd_atoms_size and x_dnd_atoms_length.
10415
c2d1e36d
PE
10416 * doprnt.c: Prefer signed to unsigned when either works.
10417 * eval.c (verror):
10418 * doprnt.c (doprnt):
10419 * lisp.h (doprnt):
10420 * xdisp.c (vmessage):
10421 Use ptrdiff_t, not size_t, when using or implementing doprnt,
10422 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
10423 prefer signed arithmetic to avoid comparison confusion.
10424 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
10425 but is a bit tricky.
10426
0e926e56
PE
10427 Assume freestanding C89 headers, string.h, stdlib.h.
10428 * data.c, doprnt.c, floatfns.c, print.c:
10429 Include float.h unconditionally.
10430 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
10431 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
10432 * regex.c: Likewise for stddef.h, string.h.
10433 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
10434 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
10435 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
10436 (STDC_HEADERS): Remove obsolete defines.
10437 * sysdep.c: Include limits.h unconditionally.
10438
9cfdb3ec
PE
10439 Assume support for memcmp, memcpy, memmove, memset.
10440 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
10441 * regex.c (memcmp, memcpy):
10442 Remove; we assume C89 now.
10443
10444 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
10445 (__malloc_safe_bcopy): Remove; no longer needed.
10446
cf950e6b 10447 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
10448 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
10449 well either way, and we prefer signed to unsigned.
10450
dbf38e02
LMI
104512011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
10452
10453 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
10454 closes the connection while we're reading (bug#9182).
10455
d6f0886c 104562011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 10457
d6f0886c
JD
10458 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
10459 are specified (Bug#9168).
24e0f6b1 10460
2eb1f9e6
PE
104612011-07-25 Paul Eggert <eggert@cs.ucla.edu>
10462
10463 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
10464 Found by GCC static checking and --with-wide-int on a 32-bit host.
10465
22381272 104662011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
10467
10468 * xdisp.c (compute_display_string_pos): Fix logic of caching
10469 previous display string position. Initialize cached_prev_pos to
10470 -1. Fixes slow-down at the beginning of a buffer.
10471
f25e39b4
EZ
104722011-07-24 Eli Zaretskii <eliz@gnu.org>
10473
10474 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
10475 for attrs[LFACE_FONTSET_INDEX].
10476
04c4b52e
PE
104772011-07-23 Paul Eggert <eggert@cs.ucla.edu>
10478
10479 * xml.c (parse_region): Remove unused local
10480 that was recently introduced.
10481
c1734fbd
EZ
104822011-07-23 Eli Zaretskii <eliz@gnu.org>
10483
be18c5a5
EZ
10484 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
10485 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
10486
c1734fbd
EZ
10487 * xdisp.c (move_it_in_display_line_to): Record the best matching
10488 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
10489 exit if none of the characters scanned was an exact match.
10490 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
10491 when exact match is impossible due to invisible text, and the
10492 lines are truncated.
10493
a258d627
JD
104942011-07-23 Jan Djärv <jan.h.d@swipnet.se>
10495
10496 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
10497 for OSX >= 10.7.
10498
b6d5a689
EZ
104992011-07-22 Eli Zaretskii <eliz@gnu.org>
10500
0f74f785
EZ
10501 Fix a significant slow-down of cursor motion with C-n, C-p,
10502 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
10503 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 10504 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
10505 (next_element_from_buffer): Call compute_stop_pos_backwards to
10506 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
10507 base_level_stop.
10508 (reseat): Don't look for prev_stop, as that could mean a very long
10509 run.
10510 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
10511 <cached_disp_overlay_modiff>: Cache for last found display string
10512 position.
551918c1 10513 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
10514 about the same buffer in the same area of character positions, and
10515 the buffer wasn't changed since the time the display string
10516 position was cached.
551918c1 10517
b2d0c91a
EZ
105182011-07-22 Eli Zaretskii <eliz@gnu.org>
10519
10520 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
10521 is an integer, which is important for empty lines. (Bug#9149)
10522
043604ee
CY
105232011-07-22 Chong Yidong <cyd@stupidchicken.com>
10524
10525 * frame.c (Fmodify_frame_parameters): In tty case, update the
10526 default face if necessary (Bug#4238).
10527
da4adb04
CY
105282011-07-21 Chong Yidong <cyd@stupidchicken.com>
10529
10530 * editfns.c (Fstring_to_char): No need to explain what a character
10531 is in the docstring (Bug#6576).
10532
9abd0532
LMI
105332011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10534
10535 * xml.c (parse_region): Make sure we always return a tree.
10536
36881d16
HK
105372011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
10538
10539 * xml.c (parse_region): If a document contains only comments,
10540 return that, too.
10541
1e98674d
LMI
105422011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10543
10544 * xml.c (make_dom): Return comments, too.
10545
590bd467
PE
105462011-07-19 Paul Eggert <eggert@cs.ucla.edu>
10547
10548 Port to OpenBSD.
10549 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
10550 and the surrounding thread.
10551 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
10552 rather than fgets, and retry after EINTR. Otherwise, 'emacs
10553 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
10554 timer goes off.
10555 * s/openbsd.h (BROKEN_SIGIO): Define.
10556 * unexelf.c (unexec) [__OpenBSD__]:
10557 Don't update the .mdebug section of the Alpha COFF symbol table.
10558
f41628b2
LMI
105592011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
10560
10561 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
10562 (bug#8460).
10563
b59b67c5
PE
105642011-07-18 Paul Eggert <eggert@cs.ucla.edu>
10565
15e3a074
PE
10566 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
10567 This fixes some race conditions on the permissions of any newly
10568 created file.
10569
41bed37d
PE
10570 * alloc.c (valid_pointer_p): Use pipe, not open.
10571 This fixes some permissions issues when debugging.
10572
b59b67c5
PE
10573 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
10574 If fchown fails to set both uid and gid, try to set just gid,
10575 as that is sometimes allowed. Adjust the file's mode to eliminate
10576 setuid or setgid bits that are inappropriate if fchown fails.
10577
925a6be7
SM
105782011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
10579
10580 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
10581 to compare Lisp_Objects.
10582 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
10583 global_gnutls_log_level, don't mistake it for a Lisp_Object.
10584 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
10585
52968808
AS
105862011-07-17 Andreas Schwab <schwab@linux-m68k.org>
10587
0a6a104b
AS
10588 * lread.c (read_integer): Unread even EOF character.
10589 (read1): Likewise. Properly record start position of symbol.
10590
52968808
AS
10591 * lread.c (read1): Read `#:' as empty uninterned symbol if no
10592 symbol character follows.
10593
9e381cdd
PE
105942011-07-17 Paul Eggert <eggert@cs.ucla.edu>
10595
10596 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
10597 This works around a problem with the previous change to Fcopy_file.
10598 Recent glibc declares fchown with __attribute__((warn_unused_result)),
10599 and without this change, GCC might complain about discarding
10600 fchown's return value.
10601
b5641435
JB
106022011-07-16 Juanma Barranquero <lekktu@gmail.com>
10603
10604 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
10605
a8031457
PE
106062011-07-16 Paul Eggert <eggert@cs.ucla.edu>
10607
10608 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
10609
dd889327
LMI
106102011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
10611
750c33f7
LMI
10612 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
10613 it's used from the C level.
10614
dd889327
LMI
10615 * process.c: Use the same condition for POLL_FOR_INPUT in both
10616 keyboard.c and process.c (bug#1858).
10617
87e86684
LM
106182011-07-09 Lawrence Mitchell <wence@gmx.li>
10619
10620 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
10621 (Fgnutls_boot): Use it.
10622
64348f40
AS
106232011-07-15 Andreas Schwab <schwab@linux-m68k.org>
10624
10625 * doc.c (Fsubstitute_command_keys): Revert last change.
10626
1d698799
LMI
106272011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
10628
f863868c
LMI
10629 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
10630 quotes the next character, and doesn't affect other longer
10631 sequences (bug#8935).
10632
1d698799
LMI
10633 * lread.c (syms_of_lread): Clarify that is isn't only
10634 `eval-buffer' and `eval-defun' that's affected by
10635 `lexical-binding' (bug#8460).
10636
aa4b6df6
EZ
106372011-07-15 Eli Zaretskii <eliz@gnu.org>
10638
10639 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 10640 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 10641
5d856da6
PE
106422011-07-14 Paul Eggert <eggert@cs.ucla.edu>
10643
ad6042bb
PE
10644 Fix minor problems found by static checking.
10645 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
10646 (elsz): Now a signed constant, not a size_t var. We prefer signed
10647 types to unsigned, to avoid integer comparison confusion. Without
10648 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
10649 "cannot optimize loop, the loop counter may overflow", a symptom
10650 of the confusion.
f00bbb22 10651 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
10652 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
10653
6468f31c
LMI
106542011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10655
49080b10
LMI
10656 * search.c (Fre_search_backward): Mention `case-fold-search' in
10657 all the re_search_* functions (bug#8138).
10658
6468f31c
LMI
10659 * keyboard.c (Fopen_dribble_file): Document when the file is
10660 closed (bug#8056).
10661
c965adc5
EZ
106622011-07-14 Eli Zaretskii <eliz@gnu.org>
10663
df9733bf
EZ
10664 * bidi.c (bidi_dump_cached_states): Fix format of displaying
10665 bidi_cache_idx.
10666
0bb23927
EZ
10667 Support bidi reordering of display and overlay strings.
10668 * xdisp.c (compute_display_string_pos)
10669 (compute_display_string_end): Accept additional argument STRING.
10670 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
10671 (reseat_to_string): Initialize bidi_it->string.s and
10672 bidi_it->string.schars.
10673 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
10674 NULL (avoids a crash in bidi_paragraph_init).
10675 Initialize itb.string.lstring.
0bb23927
EZ
10676 (init_iterator): Call bidi_init_it only of a valid
10677 buffer position was specified. Initialize paragraph_embedding to
10678 L2R.
10679 (reseat_to_string): Initialize the bidi iterator.
10680 (display_string): If we need to ignore text properties of
10681 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
10682 original value of -1 will not work with bidi.)
10683 (compute_display_string_pos): First arg is now struct
10684 `text_pos *'; all callers changed. Support display properties on
10685 Lisp strings.
10686 (compute_display_string_end): Support display properties on Lisp
10687 strings.
10688 (init_iterator, reseat_1, reseat_to_string): Initialize the
10689 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
10690 when iterating on a string not from display properties).
640c8776
SM
10691 (compute_display_string_pos, compute_display_string_end):
10692 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
10693 arrow keys.
10694 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
10695 base_level_stop; instead, set base_level_stop to BEGV.
10696 Fixes crashes in vertical-motion.
0bb23927
EZ
10697 (next_element_from_buffer): Improve commentary for when
10698 the iterator is before prev_stop.
10699 (init_iterator): Initialize bidi_p from the default value of
10700 bidi-display-reordering, not from buffer-local value. Use the
10701 buffer-local value only if initializing for buffer iteration.
10702 (handle_invisible_prop): Support invisible properties on strings
10703 that are being bidi-reordered.
10704 (set_iterator_to_next): Support bidi reordering of C strings and
10705 Lisp strings.
10706 (next_element_from_string): Support bidi reordering of Lisp
10707 strings.
10708 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
10709 (display_string): Support display of R2L glyph rows.
10710 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
10711 (init_iterator): Don't initialize it->bidi_p for strings
10712 here.
10713 (reseat_to_string): Initialize it->bidi_p for strings here.
10714 (next_element_from_string, next_element_from_c_string)
10715 (next_element_from_buffer): Add xassert's for correspondence
10716 between IT's object being iterated and it->bidi_it.string
10717 structure.
10718 (face_before_or_after_it_pos): Support bidi iteration.
10719 (next_element_from_c_string): Handle the case of the first string
10720 character that is not the first one in the visual order.
10721 (get_visually_first_element): New function, refactored from common
10722 parts of next_element_from_buffer, next_element_from_string, and
10723 next_element_from_c_string.
10724 (tool_bar_lines_needed, redisplay_tool_bar)
10725 (display_menu_bar): Force left-to-right direction. Add a FIXME
10726 comment for making that be controlled by a user option.
10727 (push_it, pop_it): Save and restore the state of the
10728 bidi iterator. Save and restore the bidi_p flag.
10729 (pop_it): Iterate out of display property for string iteration as
10730 well.
10731 (iterate_out_of_display_property): Support iteration over strings.
10732 (handle_single_display_spec): Set up it->bidi_it for iteration
10733 over a display string, and call bidi_init_it.
10734 (handle_single_display_spec, next_overlay_string)
10735 (get_overlay_strings_1, push_display_prop): Set up the bidi
10736 iterator for displaying display or overlay strings.
10737 (forward_to_next_line_start): Don't use the shortcut if
10738 bidi-iterating.
10739 (back_to_previous_visible_line_start): If handle_display_prop
10740 pushed the iterator stack, restore the internal state of the bidi
10741 iterator by calling bidi_pop_it same number of times.
10742 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
10743 and we are bidi-iterating, don't decrement the iterator position;
10744 instead, set the first_elt flag in the bidi iterator, to produce
10745 the same effect.
10746 (reseat_1): Remove redundant setting of string_from_display_prop_p.
10747 (push_display_prop): xassert that we are iterating a buffer.
10748 (push_it, pop_it): Save and restore paragraph_embedding member.
10749 (handle_single_display_spec, next_overlay_string)
10750 (get_overlay_strings_1, reseat_1, reseat_to_string)
10751 (push_display_prop): Set up the `unibyte' member of bidi_it.string
10752 correctly. Don't assume unibyte strings are not bidi-reordered.
10753 (compute_display_string_pos)
10754 (compute_display_string_end): Fix handling the case of C string.
10755 (push_it, pop_it): Save and restore from_disp_prop_p.
10756 (handle_single_display_spec, push_display_prop): Set the
10757 from_disp_prop_p flag.
10758 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
10759 (pop_it): Call iterate_out_of_display_property only if we are
10760 popping after iteration over a string that came from a display
10761 property. Fix a typo in popping stretch info. Add an assertion
10762 for verifying that the iterator position is in sync with the bidi
10763 iterator.
10764 (handle_single_display_spec, get_overlay_strings_1)
10765 (push_display_prop): Fix initialization of paragraph direction for
10766 string when that of the parent object is not yet determined.
10767 (reseat_1): Call bidi_init_it to resync the bidi
10768 iterator with IT's position. (Bug#7616)
10769 (find_row_edges): If ROW->start.pos gives position
10770 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
10771 (handle_stop, back_to_previous_visible_line_start, reseat_1):
10772 Reset the from_disp_prop_p flag.
10773 (SAVE_IT, RESTORE_IT): New macros.
10774 (pos_visible_p, face_before_or_after_it_pos)
10775 (back_to_previous_visible_line_start)
10776 (move_it_in_display_line_to, move_it_in_display_line)
10777 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10778 (try_scrolling, redisplay_window, display_line): Use them when
10779 saving a temporary copy of the iterator and restoring it back.
10780 (back_to_previous_visible_line_start, reseat_1)
10781 (init_iterator): Empty the bidi cache "stack".
10782 (move_it_in_display_line_to): If iterator ended up at
10783 EOL, but we never saw any buffer positions smaller than
10784 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
10785 motion in bidi-reordered lines.
10786 (move_it_in_display_line_to): Record prev_method and prev_pos
10787 immediately before the call to set_iterator_to_next. Fixes cursor
10788 motion in bidi-reordered lines with stretch glyphs and strings
10789 displayed in margins. (Bug#8133) (Bug#8867)
10790 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
10791 TO_CHARPOS.
640c8776
SM
10792 (pos_visible_p): Support positions in bidi-reordered lines.
10793 Save and restore bidi cache.
0bb23927
EZ
10794
10795 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
10796 (bidi_paragraph_info): Delete unused struct.
10797 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
10798 (bidi_cache_start): New variable.
10799 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
10800 to zero.
10801 (bidi_cache_fetch_state, bidi_cache_search)
10802 (bidi_cache_find_level_change, bidi_cache_iterator_state)
10803 (bidi_cache_find, bidi_peek_at_next_level)
10804 (bidi_level_of_next_char, bidi_find_other_level_edge)
10805 (bidi_move_to_visually_next): Compare cache index with
10806 bidi_cache_start rather than with zero.
10807 (bidi_fetch_char): Accept new argument STRING; all callers
10808 changed. Support iteration over a string. Support strings with
10809 display properties. Support unibyte strings. Fix the type of
10810 `len' according to what STRING_CHAR_AND_LENGTH expects.
10811 (bidi_paragraph_init, bidi_resolve_explicit_1)
10812 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
10813 (bidi_level_of_next_char, bidi_move_to_visually_next):
10814 Support iteration over a string.
0bb23927
EZ
10815 (bidi_set_sor_type, bidi_resolve_explicit_1)
10816 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
10817 can now be zero (for strings); special values 0 and -1 were
10818 changed to -1 and -2, respectively.
10819 (bidi_char_at_pos): New function.
10820 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
10821 Call it instead of FETCH_MULTIBYTE_CHAR.
10822 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
10823 initialized to valid values.
10824 (bidi_init_it): Don't initialize charpos and bytepos with invalid
10825 values.
10826 (bidi_level_of_next_char): Allow the sentinel "position" to pass
10827 the test for valid cached positions. Fix the logic for looking up
10828 the sentinel state in the cache. GCPRO the Lisp string we are
10829 iterating.
10830 (bidi_push_it, bidi_pop_it): New functions.
10831 (bidi_initialize): Initialize the bidi cache start stack pointer.
10832 (bidi_cache_ensure_space): New function, refactored from part of
10833 bidi_cache_iterator_state. Don't assume the required size is just
10834 one BIDI_CACHE_CHUNK away.
10835 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
10836 (bidi_count_bytes, bidi_char_at_pos): New functions.
10837 (bidi_cache_search): Don't assume bidi_cache_last_idx is
10838 always valid if bidi_cache_idx is valid.
10839 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
10840 is valid if it's going to be used.
10841 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
10842 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
10843 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10844 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
10845 (bidi_find_other_level_edge, bidi_cache_start_stack):
10846 All variables related to cache indices are now EMACS_INT.
c965adc5 10847
0bb23927
EZ
10848 * dispextern.h (struct bidi_string_data): New structure.
10849 (struct bidi_it): New member `string'. Make flag members be 1-bit
10850 fields, and put them last in the struct.
640c8776
SM
10851 (compute_display_string_pos, compute_display_string_end):
10852 Update prototypes.
0bb23927
EZ
10853 (bidi_push_it, bidi_pop_it): Add prototypes.
10854 (struct iterator_stack_entry): New members bidi_p,
10855 paragraph_embedding, and from_disp_prop_p.
10856 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
10857 (bidi_shelve_cache, bidi_unshelve_cache):
10858 Declare prototypes.
0bb23927
EZ
10859
10860 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
10861 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
10862 and vector-like objects.
10863
10864 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
10865 cache around display iteration.
10866
10867 * window.c (Fwindow_end, window_scroll_pixel_based)
10868 (displayed_window_lines, Frecenter): Save and restore the bidi
10869 cache around display iteration.
10870
3bbd2265
LMI
108712011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10872
10873 * editfns.c (Fdelete_region): Clarify the use of the named
10874 parameters (bug#6788).
10875
adc47434
MR
108762011-07-14 Martin Rudalics <rudalics@gmx.at>
10877
10878 * indent.c (Fvertical_motion): Set and restore w->pointm when
10879 saving and restoring the window's buffer (Bug#9006).
10880
837c31f8
LMI
108812011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
10882
10883 * editfns.c (Fstring_to_char): Clarify just what is returned
10884 (bug#6576). Text by Eli Zaretskii.
10885
ac389d0c
JB
108862011-07-13 Juanma Barranquero <lekktu@gmail.com>
10887
10888 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
10889
0be0ce47
EZ
108902011-07-13 Eli Zaretskii <eliz@gnu.org>
10891
10892 * buffer.c (mmap_find): Fix a typo.
10893
cd18e7e3
JB
108942011-07-13 Johan Bockgård <bojohan@gnu.org>
10895
10896 Fix execution of x selection hooks.
10897 * xselect.c (Qx_lost_selection_functions)
10898 (Qx_sent_selection_functions): New vars.
10899 (syms_of_xselect): DEFSYM them.
10900 (x_handle_selection_request): Pass Qx_sent_selection_functions
10901 rather than Vx_sent_selection_functions to Frun_hook_with_args.
10902 (x_handle_selection_clear,x_clear_frame_selections):
10903 Pass Qx_lost_selection_functions rather than
10904 Vx_lost_selection_functions to Frun_hook_with_args.
10905
47ea7f44
PE
109062011-07-13 Paul Eggert <eggert@cs.ucla.edu>
10907
ac389d0c 10908 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
10909 The old code sometimes used this field without initializing it.
10910
47ea7f44
PE
10911 * alloc.c (gc_sweep): Don't read past end of array.
10912 In theory, the old code could also have corrupted Emacs internals,
10913 though it'd be very unlikely.
10914
bc985c87
AS
109152011-07-12 Andreas Schwab <schwab@linux-m68k.org>
10916
10917 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 10918 argument. (Bug#4026)
bc985c87 10919
0cf34688
LMI
109202011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
10921
b3dadd76
LMI
10922 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
10923 key" (bug#4257).
10924
0cf34688
LMI
10925 * window.c (Fset_window_start): Doc fix (bug#4199).
10926 (Fset_window_hscroll): Ditto.
10927
270768cd
PE
109282011-07-12 Paul Eggert <eggert@cs.ucla.edu>
10929
077e3dda 10930 Fix minor new problems caught by GCC 4.6.1.
270768cd 10931 * term.c (init_tty): Remove unused local.
490011a6 10932 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 10933 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 10934 not used otherwise.
270768cd 10935
b1f58454
CY
109362011-07-12 Chong Yidong <cyd@stupidchicken.com>
10937
10938 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
10939
22b9578d
LMI
109402011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
10941
6e70ab07
LMI
10942 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
10943 are the mini-buffer and the echo area (bug#3320).
10944
22b9578d
LMI
10945 * term.c (init_tty): Remove support for supdup, c10 and perq
10946 terminals, which are no longer supported (bug#1482).
10947
8974cc9f
JB
109482011-07-10 Johan Bockgård <bojohan@gnu.org>
10949
10950 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
10951
a560d974
JD
109522011-07-10 Jan Djärv <jan.h.d@swipnet.se>
10953
10954 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
10955 for non-popups (Bug#3642).
10956
1dae0f0a
AS
109572011-07-10 Andreas Schwab <schwab@linux-m68k.org>
10958
268c2c36 10959 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 10960 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
10961 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
10962 * cm.c (losecursor): Likewise.
1dae0f0a
AS
10963 * data.c (fmod): Likewise.
10964 * dispnew.c (swap_glyphs_in_rows): Likewise.
10965 * emacs.c (memory_warning_signal): Likewise.
10966 * floatfns.c (float_error): Likewise.
10967 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
10968 (otf_open, font_otf_capability, generate_otf_features)
10969 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
10970 Likewise.
10971 * image.c (pbm_read_file): Likewise.
10972 * indent.c (string_display_width): Likewise.
10973 * intervals.c (check_for_interval, search_for_interval)
10974 (inc_interval_count, count_intervals, root_interval)
10975 (adjust_intervals_for_insertion, make_new_interval): Likewise.
10976 * lread.c (defalias): Likewise.
268c2c36 10977 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
10978 * regex.c (set_image_of_range_1, set_image_of_range)
10979 (regex_grow_registers): Likewise.
10980 * sysdep.c (strerror): Likewise.
10981 * termcap.c (valid_filename_p, tprint, main): Likewise.
10982 * tparam.c (main): Likewise.
10983 * unexhp9k800.c (run_time_remap, save_data_space)
10984 (update_file_ptrs, read_header, write_header, calculate_checksum)
10985 (copy_file, copy_rest, display_header): Likewise.
10986 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
10987 Likewise.
10988 * xdisp.c (check_it): Likewise.
10989 * xfaces.c (register_color, unregister_color, unregister_colors):
10990 Likewise.
10991 * xfns.c (print_fontset_result): Likewise.
10992 * xrdb.c (member, fatal, main): Likewise.
10993
99033785
PE
109942011-07-10 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 Fix minor problems found by static checking (Bug#9031).
10997 * chartab.c (char_table_set_range, map_sub_char_table):
10998 Remove unused locals.
10999 (uniprop_table): Now static.
11000 * composite.c (_work_char): Remove unused static var.
11001
9cb2ac56
JB
110022011-07-09 Juanma Barranquero <lekktu@gmail.com>
11003
11004 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
11005
f25661f0
JD
110062011-07-09 Jan Djärv <jan.h.d@swipnet.se>
11007
11008 * gtkutil.c (qttip_cb): Remove code without function.
11009
8278c4fe
EZ
110102011-07-09 Eli Zaretskii <eliz@gnu.org>
11011
11012 * w32.c (pthread_sigmask): New stub.
11013
1692ae2d 110142011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 11015
8a6ebd58 11016 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
11017 sigprocmask is portable only for single-threaded applications, and
11018 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
11019 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
11020 (LIBES): Use it.
11021 * callproc.c (Fcall_process):
11022 * process.c (create_process):
11023 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
11024 Use pthread_sigmask, not sigprocmask.
123403e4 11025
1b854618
JD
110262011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11027
11028 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
11029 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
11030 wrong (Bug#8591).
11031
3fe4b549
JD
110322011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11033
0ce7e563
JD
11034 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
11035 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
11036 (xg_hide_tooltip): Fix comment.
11037
3fe4b549
JD
11038 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
11039 in registerServicesMenuSendTypes.
11040 (validRequestorForSendType): Don't check ns_return_types.
11041
11042 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
11043 ns_return_type.
11044
5df75e47
JR
110452011-07-08 Jason Rumney <jasonr@gnu.org>
11046
22610910
JR
11047 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
11048 SH_SHOW for hidden windows (Bug#5482).
11049
5df75e47
JR
11050 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
11051 frame struct members of non-existent frames (Bug#6284).
11052
699c10bd
JD
110532011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11054
4393663b
JD
11055 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
11056 variable firstTime not needed on OSX >= 10.6.
11057 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
11058 >= 10.5. Use setKnobProportion, setDoubleValue.
11059
11060 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
11061 (MAC_OS_X_VERSION_10_5): Define if not defined.
11062 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
11063 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
11064 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
11065
11066 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 11067 cString and lossyCString on OSX >= 10.4.
4393663b 11068
58179cce 11069 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
11070 sizeToFit on OSX >= 10.2.
11071
11072 * nsimage.m (allocInitFromFile): Don't use deprecated method
11073 bestRepresentationForDevice on OSX >= 10.6.
11074
11075 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
11076 to avoid warning.
11077
11078 * emacs.c: Declare unexec_init_emacs_zone.
11079
a63e0781
JD
11080 * nsgui.h: Fix compiler warning about gnulib redefining verify.
11081
699c10bd
JD
11082 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
11083
11084 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
11085 on svcsMenu (Bug#8842).
11086
11087 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
11088 ns_return_types.
11089 (Fns_list_services): Just return Qnil on 10.6, code not working there.
11090
11091 * nsterm.m (QUTF8_STRING): Declare.
11092 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
11093 (validRequestorForSendType): Return type is (id).
11094 Change indexOfObjectIdenticalTo to indexOfObject.
11095 Check if we have local selection before returning self (Bug#8842).
11096 (writeSelectionToPasteboard): Put local selection into paste board
11097 if we have a local selection (Bug#8842).
11098 (syms_of_nsterm): DEFSYM QUTF8_STRING.
11099
11100 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
11101 (ns_get_local_selection): Declare.
11102
54e10184
LMI
111032011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
11104
9888ff71
LMI
11105 * keymap.c (describe_map_tree): Don't insert a double newline at
11106 the end of the buffer (bug#1169) and return whether we inserted
11107 something.
11108
54e10184
LMI
11109 * callint.c (Fcall_interactively): Change "reading args" to
11110 "providing args" to try to clarify what it does (bug#1010).
11111
15fa4783
KH
111122011-07-07 Kenichi Handa <handa@m17n.org>
11113
11114 * composite.c (composition_compute_stop_pos): Ignore a static
11115 composition starting before CHARPOS (Bug#8915).
11116
11117 * xdisp.c (handle_composition_prop): Likewise.
11118
a8815b00
EZ
111192011-07-07 Eli Zaretskii <eliz@gnu.org>
11120
11121 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
11122 (Bug#9015)
11123
ef7b981d 111242011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
11125
11126 * character.h (unicode_category_t): New enum type.
11127
11128 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
11129 (Qchar_code_property_table): New variable.
11130 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
11131 (UNIPROP_COMPRESSED_FORM_P): New macros.
11132 (char_table_ascii): Uncompress the compressed values.
11133 (sub_char_table_ref): New arg is_uniprop. Callers changed.
11134 Uncompress the compressed values.
ac389d0c 11135 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
11136 (char_table_ref_and_range): Uncompress the compressed values.
11137 (sub_char_table_set): New arg is_uniprop. Callers changed.
11138 Uncompress the compressed values.
11139 (sub_char_table_set_range): Args changed. Callers changed.
11140 (char_table_set_range): Adjuted for the above change.
11141 (map_sub_char_table): Delete args default_val and parent. Add arg
11142 top. Give decoded values to a Lisp function.
640c8776 11143 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
11144 values to a Lisp function. Gcpro more variables.
11145 (uniprop_table_uncompress)
11146 (uniprop_decode_value_run_length): New functions.
11147 (uniprop_decoder, uniprop_decoder_count): New variables.
11148 (uniprop_get_decoder, uniprop_encode_value_character)
11149 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
11150 New functions.
11151 (uniprop_encoder, uniprop_encoder_count): New variables.
11152 (uniprop_get_encoder, uniprop_table)
11153 (Funicode_property_table_internal, Fget_unicode_property_internal)
11154 (Fput_unicode_property_internal): New functions.
11155 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
11156 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 11157 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
11158 char-code-property-alist.
11159
640c8776 11160 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
11161 Vunicode_category_table.
11162
640c8776 11163 * font.c (font_range): Adjust for the change of
c805dec0
KH
11164 Vunicode_category_table.
11165
76b397fb
DN
111662011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
11167
11168 * m/iris4d.h: Remove file, move contents ...
11169 * s/irix6-5.h: ... here.
11170
22b4128e
PE
111712011-07-06 Paul Eggert <eggert@cs.ucla.edu>
11172
11173 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
11174 * alloc.c (mark_buffer):
11175 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
11176 (clone_per_buffer_values): Don't assume that
22b4128e
PE
11177 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
11178 This isn't true in general, and it's particularly not true
11179 if Emacs is configured with --with-wide-int.
11180 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
11181 New macros, used in the buffer.c change.
11182
869795d6
JD
111832011-07-05 Jan Djärv <jan.h.d@swipnet.se>
11184
11185 * xsettings.c: Use both GConf and GSettings if both are available.
11186 (store_config_changed_event): Add comment.
11187 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
11188 (store_tool_bar_style_changed): New functions.
5e617bc2 11189 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
11190 (struct xsettings): Move font inside HAVE_XFT.
11191 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 11192 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 11193 Move inside HAVE_XFT.
640c8776 11194 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
11195 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
11196 also.
11197 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 11198 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 11199 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
11200 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
11201 (parse_settings): Move check for font inside HAVE_XFT.
11202 (read_settings, apply_xft_settings): Add comment.
11203 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
11204 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
11205 call store_font_name_changed.
11206 (xft_settings_event): Add comment.
11207 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
11208 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
11209 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
11210 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
11211 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
11212 (xsettings_get_system_font, xsettings_get_system_normal_font):
11213 Add comment.
869795d6 11214
d8ed26bd
PE
112152011-07-05 Paul Eggert <eggert@cs.ucla.edu>
11216
11217 Random fixes. E.g., (random) never returned negative values.
11218 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
11219 subseconds part to the entropy, as that's a bit more random.
11220 Prefer signed to unsigned, since the signedness doesn't matter and
11221 in general we prefer signed. When given a limit, use a
11222 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
11223 latter isn't right if USE_2_TAGS_FOR_INTS.
11224 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
11225 not 0..VALMASK. Don't discard "excess" bits that random () returns.
11226
cabf1cac
SM
112272011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11228
11229 * textprop.c (text_property_stickiness):
11230 Obey Vtext_property_default_nonsticky.
11231 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
11232 * w32fns.c (syms_of_w32fns):
11233 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
11234
6e9b2be9
PE
112352011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11236
11237 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
11238 This is more efficient than Ffile_directory_p and avoids a minor race.
11239
90186c68
LMI
112402011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
11241
7c301272
LMI
11242 * buffer.c (Foverlay_put): Say what the return value is
11243 (bug#7835).
11244
c4f2d8d4
LMI
11245 * fileio.c (barf_or_query_if_file_exists): Check first if the file
11246 is a directory before asking whether to use the file name
11247 (bug#7564).
ad637907
LMI
11248 (barf_or_query_if_file_exists): Make the "File is a directory"
11249 error be more correct.
c4f2d8d4 11250
90186c68
LMI
11251 * fns.c (Frequire): Remove the mention of the .gz files, since
11252 that's installation-specific, but keep the mention of
11253 `get-load-suffixes'.
11254
da64016e
PE
112552011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11256
11257 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
11258 Report string overflow if the output is too long.
11259
7d47b580
JB
112602011-07-04 Juanma Barranquero <lekktu@gmail.com>
11261
a555cb87
JB
11262 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
11263 (syms_of_gnutls): Remove duplicate DEFSYM for
11264 Qgnutls_bootprop_verify_hostname_error, an error for
11265 Qgnutls_bootprop_verify_error (which is no longer used).
11266
7d47b580
JB
11267 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
11268 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
11269 Also (re)move comments that are misplaced or no longer relevant.
11270
1e49bfab
LMI
112712011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11272
11273 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
11274
1485f4c0
CY
112752011-07-03 Chong Yidong <cyd@stupidchicken.com>
11276
11277 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
11278 and background color parameters if they have been changed.
11279
a9ab721e
LMI
112802011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11281
11282 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
11283
cf7cff57
PE
112842011-07-03 Paul Eggert <eggert@cs.ucla.edu>
11285
2e13213d
PE
11286 * xsettings.c (SYSTEM_FONT): Define only when used.
11287 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
11288
cf7cff57
PE
11289 * keymap.c (access_keymap_1): Now static.
11290
7a8e04f7
CY
112912011-07-02 Chong Yidong <cyd@stupidchicken.com>
11292
11293 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
11294 leave any prefix arg for the up event (Bug#1586).
11295
61352f62
LMI
112962011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
11297
69bb1ef7
LMI
11298 * lread.c (syms_of_lread): Mention single symbols defined by
11299 `defvar' or `defconst' (bug#7154).
11300
61352f62 11301 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 11302 (Frequire): Mention get-load-suffixes.
61352f62 11303
28545e04
MR
113042011-07-02 Martin Rudalics <rudalics@gmx.at>
11305
11306 * window.h (window): Remove clone_number slot.
11307 * window.c (Fwindow_clone_number, Fset_window_clone_number):
11308 Remove.
11309 (make_parent_window, make_window, saved_window)
11310 (Fset_window_configuration, save_window_save): Don't deal with
11311 clone numbers.
11312 * buffer.c (Qclone_number): Remove declaration.
11313 (sort_overlays, overlay_strings): Don't deal with clone numbers.
11314
3349e122
SM
113152011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
11316
11317 Add multiple inheritance to keymaps.
11318 * keymap.c (Fmake_composed_keymap): New function.
11319 (Fset_keymap_parent): Simplify.
11320 (fix_submap_inheritance): Remove.
11321 (access_keymap_1): New function extracted from access_keymap to handle
11322 embedded parents and handle lists of maps.
11323 (access_keymap): Use it.
11324 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
11325 (Fcopy_keymap): Handle embedded parents.
11326 (Fcommand_remapping, define_as_prefix): Simplify.
11327 (Fkey_binding): Simplify.
11328 (syms_of_keymap): Move minibuffer-local-completion-map,
11329 minibuffer-local-filename-completion-map,
11330 minibuffer-local-must-match-map, and
11331 minibuffer-local-filename-must-match-map to Elisp.
11332 (syms_of_keymap): Defsubr make-composed-keymap.
11333 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
11334 (parse_menu_item): Trivial simplification.
11335
3279eb87
GM
113362011-07-01 Glenn Morris <rgm@gnu.org>
11337
11338 * Makefile.in (SETTINGS_LIBS): Fix typo.
11339
39cb9e56 113402011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
11341
11342 * coding.c (Fencode_coding_string): Record the last coding system
11343 used, as the function doc string says (bug#8738).
11344
0949d2b6
JD
113452011-07-01 Jan Djärv <jan.h.d@swipnet.se>
11346
11347 * xsettings.c (store_monospaced_changed): Take new font as arg and
11348 check for change against current_mono_font.
11349 (EMACS_TYPE_SETTINGS): Remove this and related defines.
11350 (emacs_settings_constructor, emacs_settings_get_property)
11351 (emacs_settings_set_property, emacs_settings_class_init)
11352 (emacs_settings_init, gsettings_obj): Remove.
11353 (something_changedCB): New function for HAVE_GSETTINGS.
11354 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
11355 with value as argument.
11356 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
11357 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 11358 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
11359 "changed".
11360
11361 * xgselect.c: Add defined (HAVE_GSETTINGS).
11362 (xgselect_initialize): Ditto.
11363
11364 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
11365 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
11366 xg_select.
11367
bbc6b304
PE
113682011-07-01 Paul Eggert <eggert@cs.ucla.edu>
11369
11370 * eval.c (struct backtrace): Simplify and port the data structure.
11371 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
11372 signed bit field, as this assumption is not portable and it makes
11373 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
11374 "char debug_on_exit : 1" as this is not portable either; instead,
11375 use the portable "unsigned int debug_on_exit : 1". Remove unused
11376 member evalargs. Remove obsolete comments about cc bombing out.
11377
9851bfc5
JD
113782011-06-30 Jan Djärv <jan.h.d@swipnet.se>
11379
51bb811f 11380 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
11381 Let HAVE_GSETTINGS override HAVE_GCONF.
11382 (store_monospaced_changed): New function.
11383 (EMACS_SETTINGS): A new type derived from GObject to handle
11384 GSettings notifications.
11385 (emacs_settings_constructor, emacs_settings_get_property)
11386 (emacs_settings_set_property, emacs_settings_class_init):
11387 New functions.
11388 (gsettings_client, gsettings_obj): New variables.
11389 (GSETTINGS_SCHEMA): New define.
11390 (something_changedCB): Call store_monospaced_changed.
11391 (init_gsettings): New function.
11392 (xsettings_initialize): Call init_gsettings.
11393 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
11394 to NULL.
11395
640c8776 11396 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
11397 GCONF_CFLAGS/LIBS.
11398
5386012d
MR
113992011-06-29 Martin Rudalics <rudalics@gmx.at>
11400
11401 * window.c (resize_root_window, grow_mini_window)
11402 (shrink_mini_window): Rename Qresize_root_window to
11403 Qwindow_resize_root_window and Qresize_root_window_vertically to
11404 Qwindow_resize_root_window_vertically.
11405
f13e0b08
PE
114062011-06-28 Paul Eggert <eggert@cs.ucla.edu>
11407
11408 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
11409
94515237
JB
114102011-06-27 Juanma Barranquero <lekktu@gmail.com>
11411
11412 * makefile.w32-in: Redesign dependencies so they reflect more
11413 clearly which files are directly included by each source file,
11414 and not through other includes.
11415
e43b6e43
MR
114162011-06-27 Martin Rudalics <rudalics@gmx.at>
11417
11418 * buffer.c (Qclone_number): Declare static and DEFSYM it.
11419 (sort_overlays, overlay_strings): When an overlay's clone number
11420 matches the window's clone number process the overlay even if
11421 the overlay's window property doesn't match the current window.
11422
d68443dc
MR
11423 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
11424 (Fwindow_hchild): Rename to Fwindow_left_child.
11425 (Fwindow_next): Rename to Fwindow_next_sibling.
11426 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
11427 (resize_window_check): Rename to window_resize_check.
11428 (resize_window_apply): Rename to window_resize_apply.
11429 (Fresize_window_apply): Rename to Fwindow_resize_apply.
11430 (Fdelete_other_windows_internal, resize_frame_windows)
11431 (Fsplit_window_internal, Fdelete_window_internal)
11432 (grow_mini_window, shrink_mini_window)
11433 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 11434
c7e73be5
JD
114352011-06-26 Jan Djärv <jan.h.d@swipnet.se>
11436
11437 * emacsgtkfixed.h: State that this is only used with Gtk+3.
11438 (emacs_fixed_set_min_size): Remove.
11439 (emacs_fixed_new): Take frame as argument.
11440
11441 * emacsgtkfixed.c: State that this is only used with Gtk+3.
11442 (_EmacsFixedPrivate): Remove minwidth/height.
11443 Add struct frame *f.
11444 (emacs_fixed_init): Initialize priv->f.
11445 (get_parent_class, emacs_fixed_set_min_size): Remove.
11446 (emacs_fixed_new): Set priv->f to argument.
11447 (emacs_fixed_get_preferred_width)
11448 (emacs_fixed_get_preferred_height): Use min_width/height from
11449 frames size_hint to set minimum and natural (Bug#8919).
11450 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
11451 and use min_width/height from frames size_hint to set
11452 min_width/height (Bug#8919).
11453
11454 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
11455 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
11456 Fix indentation.
c7e73be5 11457
cf99dcf8
EZ
114582011-06-26 Eli Zaretskii <eliz@gnu.org>
11459
11460 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
11461 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
11462 called at ZV.
11463
029529ac
CY
114642011-06-26 Chong Yidong <cyd@stupidchicken.com>
11465
11466 * process.c (wait_reading_process_output): Bypass select if
11467 waiting for a cell while ignoring keyboard input, and input is
11468 pending. Suggested by Jan Djärv (Bug#8869).
11469
7a7ef429
PE
114702011-06-25 Paul Eggert <eggert@cs.ucla.edu>
11471
11472 Use gnulib's dup2 module instead of rolling our own.
11473 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
11474
11fdef7d 114752011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
11476
11477 * dispnew.c (scrolling_window): Before scrolling, turn off a
11478 mouse-highlight in the window being scrolled.
11479
cd3520a4
JB
114802011-06-24 Juanma Barranquero <lekktu@gmail.com>
11481
11482 Move DEFSYM to lisp.h and use everywhere.
11483
11484 * character.h (DEFSYM): Move declaration...
11485 * lisp.h (DEFSYM): ...here.
11486
11487 * gnutls.c:
11488 * minibuf.c:
11489 * w32menu.c:
11490 * w32proc.c:
11491 * w32select.c: Don't include character.h.
11492
11493 * alloc.c (syms_of_alloc):
11494 * buffer.c (syms_of_buffer):
11495 * bytecode.c (syms_of_bytecode):
11496 * callint.c (syms_of_callint):
11497 * casefiddle.c (syms_of_casefiddle):
11498 * casetab.c (init_casetab_once):
11499 * category.c (init_category_once, syms_of_category):
11500 * ccl.c (syms_of_ccl):
11501 * cmds.c (syms_of_cmds):
11502 * composite.c (syms_of_composite):
11503 * dbusbind.c (syms_of_dbusbind):
11504 * dired.c (syms_of_dired):
11505 * dispnew.c (syms_of_display):
11506 * doc.c (syms_of_doc):
11507 * editfns.c (syms_of_editfns):
11508 * emacs.c (syms_of_emacs):
11509 * eval.c (syms_of_eval):
11510 * fileio.c (syms_of_fileio):
11511 * fns.c (syms_of_fns):
11512 * frame.c (syms_of_frame):
11513 * fringe.c (syms_of_fringe):
11514 * insdel.c (syms_of_insdel):
11515 * keymap.c (syms_of_keymap):
11516 * lread.c (init_obarray, syms_of_lread):
11517 * macros.c (syms_of_macros):
11518 * msdos.c (syms_of_msdos):
11519 * print.c (syms_of_print):
11520 * process.c (syms_of_process):
11521 * search.c (syms_of_search):
11522 * sound.c (syms_of_sound):
11523 * syntax.c (init_syntax_once, syms_of_syntax):
11524 * terminal.c (syms_of_terminal):
11525 * textprop.c (syms_of_textprop):
11526 * undo.c (syms_of_undo):
11527 * w32.c (globals_of_w32):
11528 * window.c (syms_of_window):
11529 * xdisp.c (syms_of_xdisp):
11530 * xfaces.c (syms_of_xfaces):
11531 * xfns.c (syms_of_xfns):
11532 * xmenu.c (syms_of_xmenu):
11533 * xsettings.c (syms_of_xsettings):
11534 * xterm.c (syms_of_xterm): Use DEFSYM.
11535
4228cf16
TZ
115362011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
11537
cd3520a4 11538 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 11539
7fcccf1e
PE
115402011-06-23 Paul Eggert <eggert@cs.ucla.edu>
11541
7efb4e0e
PE
11542 Integer and buffer overflow fixes (Bug#8873).
11543
ff5844ad
PE
11544 * print.c (printchar, strout): Check for string overflow.
11545 (PRINTPREPARE, printchar, strout):
11546 Don't set size unless allocation succeeds.
11547
90532f02
PE
11548 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
11549 for sizes. Check for string overflow more accurately.
11550 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
11551
6d84508d
PE
11552 * macros.c: Integer and buffer overflow fixes.
11553 * keyboard.h (struct keyboard.kbd_macro_bufsize):
11554 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
11555 Use ptrdiff_t, not int, for sizes.
11556 Don't increment bufsize until after realloc succeeds.
11557 Check for size-calculation overflow.
11558 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
11559
437b2cb4
PE
11560 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
11561
8b9ac8b4
PE
11562 * lread.c: Integer overflow fixes.
11563 (read_integer): Radix is now EMACS_INT, not int,
11564 to improve quality of diagnostics for out-of-range radices.
11565 Calculate buffer size correctly for out-of-range radices.
11566 (read1): Check for integer overflow in radices, and in
11567 read-circle numbers.
82cb60d3
PE
11568 (read_escape): Avoid int overflow.
11569 (Fload, openp, read_buffer_size, read1)
11570 (substitute_object_recurse, read_vector, read_list, map_obarray):
11571 Use ptrdiff_t, not int, for sizes.
11572 (read1): Use EMACS_INT, not int, for sizes.
20270765 11573 Check for size overflow.
8b9ac8b4 11574
7fcccf1e
PE
11575 * image.c (cache_image): Check for size arithmetic overflow.
11576
bfbbd7e7
PE
11577 * lread.c: Integer overflow issues.
11578 (saved_doc_string_size, saved_doc_string_length)
11579 (prev_saved_doc_string_size, prev_saved_doc_string_length):
11580 Now ptrdiff_t, not int.
11581 (read1): Don't assume doc string length fits in int. Check for
11582 out-of-range doc string lengths.
11583 (read_list): Don't assume file position fits in int.
39019e54 11584 (read_escape): Check for hex character overflow.
bfbbd7e7 11585
4e323265
LL
115862011-06-22 Leo Liu <sdl.web@gmail.com>
11587
11588 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
11589 Move to minibuffer.el.
11590
85fece3e
PE
115912011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11592
20b84ce9 11593 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
11594 The following patches are for when GLYPH_DEBUG && !XASSERT.
11595 * dispextern.h (trace_redisplay_p, dump_glyph_string):
11596 * dispnew.c (flush_stdout):
11597 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
11598 Mark as externally visible.
11599 * dispnew.c (check_window_matrix_pointers): Now static.
11600 * dispnew.c (window_to_frame_vpos):
11601 * xfns.c (unwind_create_frame):
11602 * xterm.c (x_check_font): Remove unused local.
11603 * scroll.c (CHECK_BOUNDS):
11604 * xfaces.c (cache_fache): Rename local to avoid shadowing.
11605 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
11606 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
11607 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
11608 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
11609 Now static.
11610 (debug_method_add): Use va_list and vsprintf rather than relying
11611 on undefined behavior with wrong number of arguments.
11612 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
11613 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
11614 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
11615 since we're not interested in debugging glyphs with old libraries.
11616 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
11617 GCC 4.6.0's static checking.
11618
0766b489
PE
116192011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11620
31fd4b32
PE
11621 Integer overflow and signedness fixes (Bug#8873).
11622 A few related buffer overrun fixes, too.
11623
b79e8648
PE
11624 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
11625
0766b489
PE
11626 * dispextern.h (struct face.stipple):
11627 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
11628 (x_bitmap_mask, x_allocate_bitmap_record)
11629 (x_create_bitmap_from_data, x_create_bitmap_from_file)
11630 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
11631 (x_create_bitmap_from_xpm_data):
11632 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
11633 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
11634 (.bitmaps_last):
11635 * xfaces.c (load_pixmap):
11636 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
11637 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
11638 (.bitmaps_last, struct x_output.icon_bitmap):
11639 Use ptrdiff_t, not int, for bitmap indexes.
11640 (x_allocate_bitmap_record): Check for size overflow.
11641 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
11642
b081724f
PE
11643 Use ptrdiff_t, not int, for overlay counts.
11644 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
11645 * editfns.c (overlays_around, get_pos_property):
11646 * textprop.c (get_char_property_and_overlay):
11647 * xdisp.c (next_overlay_change, note_mouse_highlight):
11648 * xfaces.c (face_at_buffer_position):
21514da7
PE
11649 * buffer.c (OVERLAY_COUNT_MAX): New macro.
11650 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
11651 (Fnext_overlay_change, Fprevious_overlay_change)
11652 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 11653 Use ptrdiff_t, not int, for sizes.
21514da7 11654 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 11655
3de73e5e
PE
11656 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
11657
2606c57b
PE
11658 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
11659 (x_session_initialize): Do not assume string length fits in int.
11660
aaafe47a
PE
11661 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
11662 This is unlikely, but can occur if DPI is outlandish.
11663
2674ddc8 11664 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
11665 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
11666
28154962
PE
11667 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
11668 * xrdb.c (magic_file_p, search_magic_path):
11669 Omit last arg SUFFIX; it was always 0. All callers changed.
11670 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
11671
7de51af5
PE
11672 * xfont.c (xfont_match): Avoid need for strlen.
11673
25ed6cc3
PE
11674 * xfns.c: Don't assume strlen fits in int.
11675 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
11676
4eab31dd
PE
11677 * xdisp.c (message_log_check_duplicate): Return intmax_t,
11678 not unsigned long, as we prefer signed integers. All callers changed.
11679 Detect integer overflow in repeat count.
11680 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 11681 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 11682
171e2a58
PE
11683 * termcap.c: Don't assume sizes fit in int and never overflow.
11684 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
11685 (gobble_line): Check for size-calculation overflow.
11686
ad39faca 11687 * minibuf.c (Fread_buffer):
6e5bb2dc 11688 * lread.c (intern, intern_c_string):
74ca2eb3
PE
11689 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
11690 Don't assume string length fits in int.
11691
52c61c22 11692 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
11693 * gtkutil.c (style_changed_cb): Avoid need for strlen.
11694
b5b8c9e5
PE
11695 * font.c: Don't assume string length fits in int.
11696 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
11697 Use ptrdiff_t, not int.
ccd6111c
PE
11698 (font_intern_prop): Don't assume string length fits in int.
11699 Don't assume integer property fits in fixnum.
11700 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 11701
882f0d81 11702 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 11703 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
11704 Reformulate so as not to need the command string.
11705 Invoke gzip -cd rather than gunzip, as it's more portable.
11706 (lock_info_type, lock_file_1, lock_file):
11707 Don't assume pid_t and time_t fit in unsigned long.
11708 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
11709 (current_lock_owner): Prefer signed type for sizes.
11710 Use memcpy, not strncpy, where memcpy is what is really wanted.
11711 Don't assume (via atoi) that time_t and pid_t fit in int.
11712 Check for time_t and/or pid_t out of range, e.g., via a network share.
11713 Don't alloca where an auto var works fine.
11714
93f4cf88
PE
11715 * fileio.c: Fix some integer overflow issues.
11716 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
11717 Don't assume string length fits in int.
11718 (directory_file_name): Don't assume string length fits in long.
11719 (make_temp_name): Don't assume pid fits in int, or that its print
11720 length is less than 20.
11721
f3e92b69
PE
11722 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
11723
1bfdaf10
PE
11724 * coding.c (make_subsidiaries): Don't assume string length fits in int.
11725
35016e9a
PE
11726 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
11727
3d1e65a1
PE
11728 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
11729 We prefer signed integers, even for size calculations.
11730
0b963a93
PE
11731 * emacs.c: Don't assume string length fits in 'int'.
11732 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
11733 (main): Don't invoke strlen when not needed.
11734
573f4b54
PE
11735 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
11736 (XD_DEBUG_MESSAGE): Don't waste a byte.
11737
989f33ba
PE
11738 * callproc.c (getenv_internal_1, getenv_internal)
11739 (Fgetenv_internal):
965d34eb
PE
11740 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
11741
e4d29b33
PE
11742 * lread.c (invalid_syntax): Omit length argument.
11743 All uses changed. This doesn't fix a bug, but it simplifies the
11744 code away from its former Hollerith-constant appearance, and it's
11745 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 11746 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 11747
eb49b136
PE
11748 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
11749 This didn't break anything, but it didn't help either.
11750 It's confusing to put a bogus integer in a place where the actual
11751 value does not matter.
9f62aeb1 11752 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 11753 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 11754
15375a22
PE
11755 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
11756 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
11757 implementation.
b61cc01c
PE
11758 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
11759 We prefer signed types, and the value cannot exceed the EMACS_INT
11760 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
11761 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
11762 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
11763 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 11764
53b2623d
PE
11765 * indent.c (sane_tab_width): New function.
11766 (current_column, scan_for_column, Findent_to, position_indentation)
11767 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 11768 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 11769
51cab52b 11770 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 11771
f2ed8a70
PE
11772 * lisp.h (lint_assume): New macro.
11773 * composite.c (composition_gstring_put_cache):
11774 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
11775
abe80cc6
PE
11776 * editfns.c, insdel.c:
11777 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 11778
b02c740e
PE
11779 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
11780
ebc96716
PE
11781 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
11782
b4e50fa0 11783 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 11784 Use much-faster test for byte-length change.
311d5d7c 11785 Don't assume string byte-length fits in 'int'.
a4cf38e4 11786 Check that character arg fits in 'int'.
85461888 11787 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 11788
c0c1ee9f
PE
11789 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
11790
a498d7f4
PE
11791 * fns.c (concat): Catch string overflow earlier.
11792 Do not rely on integer wraparound.
11793
51cab52b
PE
11794 * dispextern.h (struct it.overlay_strings_charpos)
11795 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
11796 * xdisp.c (forward_to_next_line_start)
11797 (back_to_previous_visible_line_start)
11798 (reseat_at_next_visible_line_start, next_element_from_buffer):
11799 Don't arbitrarily truncate the value of 'selective' to int.
11800
76031fad
PE
11801 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
11802
5eb55db9
PE
11803 * composite.c: Don't truncate sizes to 'int'.
11804 (composition_gstring_p, composition_reseat_it)
11805 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
11806 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
11807 not EMACS_UINT, for indexes.
5eb55db9 11808
0703a717
PE
11809 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
11810
d6202519
PE
11811 * buffer.c: Include <verify.h>.
11812 (struct sortvec.priority, struct sortstr.priority):
8961a454 11813 Now EMACS_INT, not int.
c20998a7 11814 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
11815 (struct sortstr.size, record_overlay_string)
11816 (struct sortstrlist.size, struct sortlist.used):
11817 Don't truncate size to int.
11818 (record_overlay_string): Check for size-calculation overflow.
d6202519 11819 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 11820
d5a19415
JM
118212011-06-22 Jim Meyering <meyering@redhat.com>
11822
029529ac 11823 Don't leak an XBM-image-sized buffer
d5a19415
JM
11824 * image.c (xbm_load): Free the image buffer after using it.
11825
a9041e6c
PE
118262011-06-21 Paul Eggert <eggert@cs.ucla.edu>
11827
11828 Port to Sun C.
11829 * composite.c (find_automatic_composition): Omit needless 'return 0;'
11830 that Sun C diagnosed.
11831 * fns.c (secure_hash): Fix pointer signedness issue.
11832 * intervals.c (static_offset_intervals): New function.
11833 (offset_intervals): Use it.
11834
7f3f739f
LL
118352011-06-21 Leo Liu <sdl.web@gmail.com>
11836
11837 * deps.mk (fns.o):
11838 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
11839 sha512.h.
11840
11841 * fns.c (secure_hash): Rename from crypto_hash_function and change
11842 the first arg to accept symbols.
5b66d427 11843 (Fsecure_hash): New primitive.
7f3f739f
LL
11844 (syms_of_fns): New symbols.
11845
76147d94
DD
118462011-06-20 Deniz Dogan <deniz@dogan.se>
11847
11848 * process.c (Fset_process_buffer): Clarify return value in
11849 docstring.
11850
7d7d0045
CY
118512011-06-18 Chong Yidong <cyd@stupidchicken.com>
11852
11853 * dispnew.c (add_window_display_history): Use BVAR.
11854
11855 * xdisp.c (debug_method_add): Use BVAR.
11856 (check_window_end, dump_glyph_matrix, dump_glyph)
11857 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
11858
11859 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
11860 Likewise.
11861
11862 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
11863 check till after the cache is created in init_frame_faces.
11864
ff2bc410
SM
118652011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
11866
11867 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
11868
28177add
PE
118692011-06-16 Paul Eggert <eggert@cs.ucla.edu>
11870
dd3482fe
PE
11871 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
11872 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
11873 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
11874
393d71f3 11875 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
11876 * fileio.c (Finsert_file_contents):
11877 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
11878 Remove the old (too-loose) buffer overflow checks.
11879 They weren't needed, since make_gap checks for buffer overflow.
11880 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
11881 The old code merely checked for Emacs fixnum overflow, and relied
11882 on undefined (wraparound) behavior. The new code avoids undefined
11883 behavior, and also checks for ptrdiff_t and/or size_t overflow.
11884
2e6813b0 11885 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
11886 Tune. Don't use wider integers than needed. Don't use alloca.
11887 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 11888
599a9e4f
PE
11889 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
11890
99561444
PE
11891 * insdel.c, lisp.h (buffer_overflow): New function.
11892 (insert_from_buffer_1, replace_range, replace_range_2):
11893 * insdel.c (make_gap_larger):
11894 * editfns.c (Finsert_char):
11895 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
11896
28177add
PE
11897 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
11898
e69dafad
PE
118992011-06-15 Paul Eggert <eggert@cs.ucla.edu>
11900
4baa020d 11901 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 11902
b1c46f02
PE
11903 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
11904 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
11905
e69dafad
PE
11906 * fileio.c: Don't assume EMACS_INT fits in off_t.
11907 (emacs_lseek): New static function.
11908 (Finsert_file_contents, Fwrite_region): Use it.
11909 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
11910
566684ea
PE
11911 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
11912
e6966cd6
PE
11913 * fns.c: Don't overflow int when computing a list length.
11914 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
11915 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
11916 truncation on 64-bit hosts. Check for QUIT every
11917 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
11918 faster and is responsive enough.
11919 (Flength): Report an error instead of overflowing an integer.
11920 (Fsafe_length): Return a float if the value is not representable
11921 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 11922 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 11923 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 11924
dd0b0efb
PE
11925 * alloc.c: Check that resized vectors' lengths fit in fixnums.
11926 (header_size, word_size): New constants.
11927 (allocate_vectorlike): Don't check size overflow here.
11928 (allocate_vector): Check it here instead, since this is the only
11929 caller of allocate_vectorlike that could cause overflow.
11930 Check that the new vector's length is representable as a fixnum.
11931
86fe5cfe
PE
11932 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
11933 The previous code was bogus. For example, next_almost_prime (32)
11934 returned 39, which is undesirable as it is a multiple of 3; and
11935 next_almost_prime (24) returned 25, which is a multiple of 5 so
11936 why was the code bothering to check for multiples of 7?
11937
80e88859
PE
11938 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
11939
4a2f0ad6
PE
11940 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
11941
f66c7cf8
PE
11942 Variadic C functions now count arguments with ptrdiff_t.
11943 This partly undoes my 2011-03-30 change, which replaced int with size_t.
11944 Back then I didn't know that the Emacs coding style prefers signed int.
11945 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
11946 were being counted with int, which may truncate counts on 64-bit
11947 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
11948 * lisp.h (struct Lisp_Subr.function.aMANY)
11949 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
11950 Arg counts are now ptrdiff_t, not size_t.
11951 All variadic functions and their callers changed accordingly.
11952 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
11953 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
11954 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
11955 * callint.c (Fcall_interactively): Check arg count for overflow,
11956 to avoid potential buffer overrun. Use signed char, not 'int',
11957 for 'varies' array, so that we needn't bother to check its size
11958 calculation for overflow.
11959 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
11960 * eval.c (apply_lambda):
11961 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
11962 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
11963 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
11964
a1759b76
PE
11965 * callint.c (Fcall_interactively): Don't use index var as event count.
11966
d96be9fc
PE
11967 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
11968 * mem-limits.h (SIZE): Remove; no longer used.
11969
a690a978 11970 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 11971
578c21e6
PE
11972 Remove unnecessary casts.
11973 * xterm.c (x_term_init):
11974 * xfns.c (x_set_border_pixel):
11975 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
11976 These aren't needed now that we assume ANSI C.
11977
96f53c6c
PE
11978 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
11979 It's more likely to cause problems (due to unsigned overflow)
11980 than to cure them.
11981
83c77d31
PE
11982 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
11983
ee2079f1
PE
11984 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
11985
6da65536
PE
11986 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
11987
7147c4a4
PE
11988 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
11989
193e32d9
PE
11990 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
11991
e5533da6
PE
11992 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
11993
9910e595
PE
11994 GLYPH_CODE_FACE returns EMACS_INT, not int.
11995 * dispextern.h (merge_faces):
11996 * xfaces.c (merge_faces):
01103c44
PE
11997 * xdisp.c (get_next_display_element, next_element_from_display_vector):
11998 Don't assume EMACS_INT fits in int.
9910e595 11999
2638320e
PE
12000 * character.h (CHAR_VALID_P): Remove unused parameter.
12001 * fontset.c, lisp.h, xdisp.c: All uses changed.
12002
045eb8d9
PE
12003 * editfns.c (Ftranslate_region_internal): Omit redundant test.
12004
c1f134b5
PE
12005 * fns.c (concat): Minor tuning based on overflow analysis.
12006 This doesn't fix any bugs. Use int to hold character, instead
12007 of constantly refetching from Emacs object. Use XFASTINT, not
12008 XINT, for value known to be a character. Don't bother comparing
12009 a single byte to 0400, as it's always less.
12010
395fcb93 12011 * floatfns.c (Fexpt):
327eeec8
PE
12012 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
12013
abbd3d23
PE
12014 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
12015 for characters.
12016
684a03ef
PE
12017 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
12018
0fed43f3
PE
12019 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
12020 Without this fix, on a 64-bit host (aset S 0 4294967386) would
12021 incorrectly succeed when S was a string, because 4294967386 was
12022 truncated before it was used.
12023
8fd02eb7
PE
12024 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
12025 Otherwise, an out-of-range integer could cause undefined behavior
12026 on a 64-bit host.
12027
f8c86b69
PE
12028 * composite.c: Use int, not EMACS_INT, for characters.
12029 (fill_gstring_body, composition_compute_stop_pos): Use int, not
12030 EMACS_INT, for values that are known to be in character range.
12031 This doesn't fix any bugs but is the usual style inside Emacs and
12032 may generate better code on 32-bit machines.
12033
34206dd2
PE
12034 Make sure a 64-bit char is never passed to ENCODE_CHAR.
12035 This is for reasons similar to the recent CHAR_STRING fix.
12036 * charset.c (Fencode_char): Check that character arg is actually
12037 a character. Pass an int to ENCODE_CHAR.
12038 * charset.h (ENCODE_CHAR): Verify that the character argument is no
12039 wider than 'int', as a compile-time check to prevent future regressions
12040 in this area.
12041
c5958d4c 12042 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
12043
12044 Make sure a 64-bit char is never passed to CHAR_STRING.
12045 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
12046 by silently ignoring the top 32 bits, allowing some values
12047 that were far too large to be valid characters.
12048 * character.h: Include <verify.h>.
12049 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
12050 arguments are no wider than unsigned, as a compile-time check
12051 to prevent future regressions in this area.
12052 * data.c (Faset):
01103c44 12053 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
12054 (Fsubst_char_in_region):
12055 * fns.c (concat):
12056 * xdisp.c (decode_mode_spec_coding):
12057 Adjust to CHAR_STRING's new requirement.
12058 * editfns.c (Finsert_char, Fsubst_char_in_region):
12059 * fns.c (concat): Check that character args are actually
12060 characters. Without this test, these functions did the wrong
12061 thing with wildly out-of-range values on 64-bit hosts.
12062
d37ca623
PE
12063 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
12064 These casts should not be needed on 32-bit hosts, either.
12065 * keyboard.c (read_char):
12066 * lread.c (Fload): Remove casts to unsigned.
12067
ea204efb
PE
12068 * lisp.h (UNSIGNED_CMP): New macro.
12069 This fixes comparison bugs on 64-bit hosts.
12070 (ASCII_CHAR_P): Use it.
12071 * casefiddle.c (casify_object):
01103c44 12072 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
12073 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
12074 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
12075 * dispextern.h (FACE_FROM_ID):
12076 * keyboard.c (read_char): Use UNSIGNED_CMP.
12077
41cb286c
PE
12078 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
12079 not to EMACS_INT, to avoid GCC warning.
12080
4a1b9832
PE
12081 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
12082
55daad71
PE
12083 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
12084 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
12085 isn't needed on 32-bit machines.
8f95c75c 12086
01103c44
PE
12087 * buffer.c (Fgenerate_new_buffer_name):
12088 Use EMACS_INT for count, not int.
0ceccced 12089 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
12090
12091 * data.c (Qcompiled_function): Now static.
12092
c6f072e7
PE
12093 * window.c (window_body_lines): Now static.
12094
20ce5912
PE
12095 * image.c (gif_load): Rename local to avoid shadowing.
12096
9c4c5f81
PE
12097 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
12098 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
12099 * alloc.c (make_save_value): Integer argument is now of type
12100 ptrdiff_t, not int.
12101 (mark_object): Use ptrdiff_t, not int.
12102 * lisp.h (pD): New macro.
12103 * print.c (print_object): Use it.
12104
c0c5c8ae
PE
12105 * alloc.c: Use EMACS_INT, not int, to count objects.
12106 (total_conses, total_markers, total_symbols, total_vector_size)
12107 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
12108 (total_free_floats, total_floats, total_free_intervals)
12109 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
12110 Now EMACS_INT, not int. All uses changed.
12111 (Fgarbage_collect): Compute overall total using a double, so that
12112 integer overflow is less likely to be a problem. Check for overflow
12113 when converting back to an integer.
5a25e253
PE
12114 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
12115 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
12116 These were 'int' variables that could overflow on 64-bit hosts;
12117 they were never used, so remove them instead of repairing them.
211a0b2a 12118 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
12119 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
12120 Previously, this ceilinged at INT_MAX, but that doesn't work on
12121 64-bit machines.
e46bb31a 12122 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 12123
c78baabf 12124 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 12125 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
12126 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
12127 when a (possibly-narrower) signed value would do just as well.
12128 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 12129
c9d624c6
PE
12130 * alloc.c: Catch some string size overflows that we were missing.
12131 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
12132 for convenience in STRING_BYTES_MAX.
12133 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
12134 The definition here is exact; the one in lisp.h was approximate.
12135 (allocate_string_data): Check for string overflow. This catches
12136 some instances we weren't catching before. Also, it catches
12137 size_t overflow on (unusual) hosts where SIZE_MAX <= min
12138 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
12139 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 12140
c9d624c6
PE
12141 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
12142 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 12143 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 12144
353032ce
PE
12145 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
12146
2bccce07
PE
12147 * alloc.c (Fmake_string): Check for out-of-range init.
12148
0ac30604
SM
121492011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
12150
12151 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
12152
c195f2de
JD
121532011-06-14 Jan Djärv <jan.h.d@swipnet.se>
12154
12155 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
12156 xg_get_default_scrollbar_width.
12157
12158 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
12159 (int_gtk_range_get_value): Move to the scroll bar part of the file.
12160 (style_changed_cb): Call update_theme_scrollbar_width and call
12161 x_set_scroll_bar_default_width and xg_frame_set_char_size for
12162 all frames (Bug#8505).
12163 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
12164 Call gtk_window_set_resizable if HAVE_GTK3.
12165 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
12166 and height if HAVE_GTK3 (Bug#8505).
12167 (scroll_bar_width_for_theme): New variable.
12168 (update_theme_scrollbar_width): New function.
12169 (xg_get_default_scrollbar_width): Move code to
12170 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
12171 (xg_initialize): Call update_theme_scrollbar_width.
12172
12173 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
12174
12175 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
12176
e10ac9f1
MR
121772011-06-12 Martin Rudalics <rudalics@gmx.at>
12178
12179 * frame.c (make_frame): Call other_buffer_safely instead of
12180 other_buffer.
12181
12182 * window.c (temp_output_buffer_show): Call display_buffer with
12183 second argument Vtemp_buffer_show_specifiers and reset latter
12184 immediately after the call.
12185 (Vtemp_buffer_show_specifiers): New variable.
12186 (auto_window_vscroll_p, next_screen_context_lines)
12187 (Vscroll_preserve_screen_position): Remove leading asterisks from
12188 doc-strings.
12189
2d3c217e 121902011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 12191
7b7f97e8 12192 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
12193 * buffer.c (Qclone_number): Remove for now, as it's unused.
12194 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
12195 (record_buffer): Remove unused local.
12196 * frame.c (other_visible_frames, frame_buffer_list): Now static.
12197 (set_frame_buffer_list): Remove; unused.
12198 * frame.h (other_visible_frames): Remove decl.
12199 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
12200 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
12201 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
12202 if HAVE_GPM.
12203 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
12204 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
12205 Define only if HAVE_GPM.
12206 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
12207 (update_hints_inhibit): Remove; never set. All uses removed.
12208 * widgetprv.h (emacsFrameClassRec): Remove decl.
12209 * window.c (delete_deletable_window): Now returns void, since it
12210 wasn't returning anything.
12211 (compare_window_configurations): Remove unused locals.
12212 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
12213 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
12214 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
12215 the same widths as pointers. This follows up on the 2011-05-06 patch.
12216 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
12217 * xterm.h: Likewise.
12218 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
12219
1384b89e
JB
122202011-06-12 Juanma Barranquero <lekktu@gmail.com>
12221
12222 * makefile.w32-in: Update dependencies.
12223 (LISP_H): Add lib/intprops.h.
12224
1100a63c
CY
122252011-06-11 Chong Yidong <cyd@stupidchicken.com>
12226
12227 * image.c (gif_load): Add animation frame delay to the metadata.
12228 (syms_of_image): Use DEFSYM. New symbol `delay'.
12229
6198ccd0
MR
122302011-06-11 Martin Rudalics <rudalics@gmx.at>
12231
12232 * window.c (delete_deletable_window): Re-add.
12233 (Fset_window_configuration): Rewrite to handle dead buffers and
12234 consequently deletable windows.
12235 (window_tree, Fwindow_tree): Remove. Supply functionality in
12236 window.el.
12237 (compare_window_configurations): Simplify code.
12238
b6e3633c
AS
122392011-06-11 Andreas Schwab <schwab@linux-m68k.org>
12240
1ab0dee5
AS
12241 * image.c (imagemagick_load_image): Fix type mismatch.
12242 (Fimagemagick_types): Likewise.
12243
b6e3633c
AS
12244 * window.h (replace_buffer_in_windows): Declare.
12245
9397e56f
MR
122462011-06-11 Martin Rudalics <rudalics@gmx.at>
12247
12248 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
12249 Qclone_number. Remove external declaration of Qdelete_window.
12250 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
12251 code.
640c8776
SM
12252 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
12253 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
12254 (Fother_buffer): Rewrite doc-string. Major rewrite for new
12255 buffer list implementation.
12256 (other_buffer_safely): New function.
12257 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
12258 calls to replace_buffer_in_windows and
12259 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
12260 if allowed.
12261 (record_buffer): Inhibit quitting and rewrite using quittable
12262 functions. Run Qbuffer_list_update_hook if allowed.
12263 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
12264 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
12265 Move switch-to-buffer to window.el.
9397e56f
MR
12266 (bury-buffer): Move to window.el.
12267 (Vbuffer_list_update_hook): New variable.
12268
12269 * lisp.h (other_buffer_safely): Add prototype in buffer.c
12270 section.
12271
12272 * window.h (resize_frame_windows): Move up in code.
12273 (Fwindow_frame): Remove EXFUN.
12274 (replace_buffer_in_all_windows): Remove prototype.
12275 (replace_buffer_in_windows_safely): Add prototype.
12276
12277 * window.c: Declare Qdelete_window static again. Move down
12278 declaration of select_count.
12279 (Fnext_window, Fprevious_window): Rewrite doc-strings.
12280 (Fother_window): Move to window.el.
12281 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
12282 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
12283 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
12284 window.el.
12285 (replace_buffer_in_windows): Implement by calling
12286 Qreplace_buffer_in_windows.
12287 (replace_buffer_in_all_windows): Remove with some functionality
12288 moved into replace_buffer_in_windows_safely.
12289 (replace_buffer_in_windows_safely): New function.
12290 (select_window_norecord, select_frame_norecord): Move in front
12291 of run_window_configuration_change_hook. Remove now obsolete
12292 declarations.
640c8776
SM
12293 (Fset_window_buffer): Rewrite doc-string.
12294 Call Qrecord_window_buffer.
9397e56f
MR
12295 (keys_of_window): Move binding for other-window to window.el.
12296
b50691aa
CY
122972011-06-11 Chong Yidong <cyd@stupidchicken.com>
12298
12299 * dispextern.h (struct image): Replace data member, whose int_val
12300 and ptr_val fields were not used by anything, with a single
12301 lisp_val object.
12302
12303 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
12304 (gif_clear_image, gif_load, imagemagick_load_image)
12305 (gs_clear_image, gs_load): Callers changed.
12306
3f754b86
PE
123072011-06-10 Paul Eggert <eggert@cs.ucla.edu>
12308
cca69397
PE
12309 * buffer.h: Include <time.h>, for time_t.
12310 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
12311
109e28d0
PE
12312 Fix minor problems found by static checking.
12313
60737f02
PE
12314 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
12315
4b66faf3
PE
12316 Make identifiers static if they are not used in other modules.
12317 * data.c (Qcompiled_function, Qframe, Qvector):
12318 * image.c (QimageMagick, Qsvg):
12319 * minibuf.c (Qmetadata):
12320 * window.c (resize_window_check, resize_root_window): Now static.
12321 * window.h (resize_window_check, resize_root_window): Remove decls.
12322
109e28d0
PE
12323 * window.c (window_deletion_count, delete_deletable_window):
12324 Remove; unused.
46a4ce9e
PE
12325 (window_body_lines): Now static.
12326 (Fdelete_other_windows_internal): Mark vars as initialized.
12327 Make sure 'resize_failed' is initialized.
12328 (run_window_configuration_change_hook): Rename local to avoid shadowing.
12329 (resize_window_apply): Remove unused local.
12330 * window.h (delete_deletable_window): Remove decl.
12331
109e28d0 12332 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
12333 (imagemagick_load_image): Fix pointer signedness problem by changing
12334 last arg from unsigned char * to char *. All uses changed.
12335 Also, fix a local for similar reasons.
12336 Remove unused locals. Remove locals to avoid shadowing.
12337 (fn_rsvg_handle_free): Remove; unused.
12338 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 12339 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 12340
3f754b86
PE
12341 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
12342
2547adb1
CY
123432011-06-10 Chong Yidong <cyd@stupidchicken.com>
12344
12345 * image.c (gif_load): Fix omitted cast error introduced by
12346 2011-06-06 change.
12347
2c8e37d4
MR
123482011-06-10 Martin Rudalics <rudalics@gmx.at>
12349
12350 * window.h (resize_proportionally, orig_total_lines)
12351 (orig_top_line): Remove from window structure.
12352 (set_window_height, set_window_width, change_window_heights)
12353 (Fdelete_window): Remove prototypes.
12354 (resize_frame_windows): Remove duplicate declaration.
12355
440a42e3
EZ
123562011-06-10 Eli Zaretskii <eliz@gnu.org>
12357
12358 * window.h (resize_frame_windows, resize_window_check)
12359 (delete_deletable_window, resize_root_window)
12360 (resize_frame_windows): Declare prototypes.
12361
12362 * window.c (resize_window_apply): Make definition be "static" to
12363 match the prototype.
12364
562dd5e9
MR
123652011-06-10 Martin Rudalics <rudalics@gmx.at>
12366
12367 * window.c: Remove declarations of Qwindow_size_fixed,
12368 window_min_size_1, window_min_size_2, window_min_size,
12369 size_window, window_fixed_size_p, enlarge_window, delete_window.
12370 Remove static from declaration of Qdelete_window, it's
12371 temporarily needed by Fbury_buffer.
12372 (replace_window): Don't assign orig_top_line and
12373 orig_total_lines.
12374 (Fdelete_window, delete_window): Remove. Window deletion is
12375 handled by window.el.
640c8776
SM
12376 (window_loop): Remove DELETE_OTHER_WINDOWS case.
12377 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
12378 (Fdelete_other_windows): Remove. Deleting other windows is
12379 handled by window.el.
12380 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
12381 handled in window.el.
12382 (window_min_size_2, window_min_size_1, window_min_size): Remove.
12383 Window minimum sizes are handled in window.el.
12384 (shrink_windows, size_window, set_window_height)
12385 (set_window_width, change_window_heights, window_height)
12386 (window_width, CURBEG, CURSIZE, enlarge_window)
12387 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
12388 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
12389 handled in window.el.
12390 (make_dummy_parent): Rename to make_parent_window and give it a
12391 second argument horflag.
12392 (make_window): Don't set resize_proportionally any more.
12393 (Fsplit_window): Remove. Windows are split in window.el.
12394 (save_restore_action, save_restore_orig_size)
12395 (shrink_window_lowest_first, save_restore_orig_size): Remove.
12396 Resize mini windows in window.el.
12397 (grow_mini_window, shrink_mini_window): Implement by calling
12398 Qresize_root_window_vertically, resize_window_check and
12399 resize_window_apply.
640c8776
SM
12400 (saved_window, Fset_window_configuration, save_window_save):
12401 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
12402 resize_proportionally.
12403 (window_min_height, window_min_width): Move to window.el.
12404 (keys_of_window): Move bindings for delete-other-windows,
12405 split-window, delete-window and enlarge-window to window.el.
12406
12407 * buffer.c: Temporarily extern Qdelete_window.
12408 (Fbury_buffer): Temporarily call Qdelete_window instead of
12409 Fdelete_window (Fbury_buffer will move to window.el soon).
12410
12411 * frame.c (set_menu_bar_lines_1): Remove code handling
12412 orig_top_line and orig_total_lines.
12413
12414 * dispnew.c (adjust_frame_glyphs_initially): Don't use
12415 set_window_height but set heights directly.
12416 (change_frame_size_1): Use resize_frame_windows.
12417
12418 * xdisp.c (init_xdisp): Don't use set_window_height but set
12419 heights directly.
12420
640c8776
SM
12421 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
12422 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
12423 run_window_configuration_change_hook.
12424
12425 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
12426 instead of change_window_heights and run
12427 run_window_configuration_change_hook.
12428
1a13852e
MR
124292011-06-09 Martin Rudalics <rudalics@gmx.at>
12430
12431 * window.c (replace_window): Rename second argument REPLACEMENT to
12432 NEW. New third argument SETFLAG. Rewrite.
12433 (delete_window, make_dummy_parent): Call replace_window with
12434 third argument 1.
12435 (window_list_1): Move down in code.
12436 (run_window_configuration_change_hook): Move set_buffer part
12437 before select_frame_norecord part in order to unwind correctly.
12438 Rename count1 to count.
12439 (recombine_windows, delete_deletable_window, resize_root_window)
12440 (Fdelete_other_windows_internal)
12441 (Frun_window_configuration_change_hook, make_parent_window)
12442 (resize_window_check, resize_window_apply, Fresize_window_apply)
12443 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
12444 (Fdelete_window_internal, Fresize_mini_window_internal):
12445 New functions.
1a13852e
MR
12446 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
12447
f3d1777e
MR
124482011-06-08 Martin Rudalics <rudalics@gmx.at>
12449
496e208e
MR
12450 * window.h (window): Add some new members to window structure -
12451 normal_lines, normal_cols, new_total, new_normal, clone_number,
12452 splits, nest, prev_buffers, next_buffers.
12453 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 12454 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 12455
f3d1777e
MR
12456 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
12457 Remove.
496e208e
MR
12458 (make_dummy_parent): Set new members of windows structure.
12459 (make_window): Move down in code. Handle new members of window
12460 structure.
12461 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
12462 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
12463 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
12464 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
12465 (Fset_window_next_buffers, Fset_window_clone_number):
12466 New functions.
496e208e
MR
12467 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
12468 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
12469 Doc-string fixes.
12470 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
12471 Argument WINDOW can be now internal window too.
12472 (Fwindow_use_time): Move up in code.
12473 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
12474 Rewrite doc-string.
12475 (Fset_window_configuration, saved_window)
12476 (Fcurrent_window_configuration, save_window_save): Handle new
12477 members of window structure.
b9e809c2
MR
12478 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
12479 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
12480 (syms_of_window): New Lisp objects Qrecord_window_buffer,
12481 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
12482 Qget_mru_window, Qresize_root_window,
12483 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
12484 Qauto_buffer_name; staticpro them.
f3d1777e 12485
abde8f8c
MR
124862011-06-07 Martin Rudalics <rudalics@gmx.at>
12487
12488 * window.c (Fwindow_total_size, Fwindow_left_column)
12489 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
12490 (Fwindow_list_1): New functions.
12491 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
12492 (Fwindow_width, Fscroll_left, Fscroll_right):
12493 Use window_body_cols instead of window_box_text_cols.
12494 (delete_window, Fset_window_configuration):
12495 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
12496 (delete_all_subwindows): Take a window as argument and not a
12497 structure. Rewrite.
190b47e6
MR
12498 (window_loop): Remove handling of GET_LRU_WINDOW and
12499 GET_LARGEST_WINDOW.
12500 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
12501
12502 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
12503 window_box_text_cols. delete_all_subwindows now takes a
12504 Lisp_Object as argument.
abde8f8c 12505
640c8776
SM
12506 * indent.c (compute_motion, Fcompute_motion):
12507 Use window_body_cols instead of window_box_text_cols.
abde8f8c 12508
fa8a67e6
MR
12509 * frame.c (delete_frame): Call delete_all_subwindows with root
12510 window as argument.
12511
a54e3482
DC
125122011-06-07 Daniel Colascione <dan.colascione@gmail.com>
12513
12514 * fns.c (Fputhash): Document return value.
12515
60002bf5
CY
125162011-06-06 Chong Yidong <cyd@stupidchicken.com>
12517
12518 * image.c (gif_load): Implement gif89a spec "no disposal" method.
12519
0c671da6 125202011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 12521
b862a52a 12522 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 12523
be44ca6c
PE
12524 Check for overflow when converting integer to cons and back.
12525 * charset.c (Fdefine_charset_internal, Fdecode_char):
12526 Use cons_to_unsigned to catch overflow.
12527 (Fencode_char): Use INTEGER_TO_CONS.
12528 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
12529 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
12530 * data.c (long_to_cons, cons_to_long): Remove.
12531 (cons_to_unsigned, cons_to_signed): New functions.
12532 These signal an error for invalid or out-of-range values.
12533 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
12534 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
12535 * font.c (Ffont_variation_glyphs):
12536 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
12537 * lisp.h: Include <intprops.h>.
12538 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
12539 (cons_to_signed, cons_to_unsigned): New decls.
12540 (long_to_cons, cons_to_long): Remove decls.
12541 * undo.c (record_first_change): Use INTEGER_TO_CONS.
12542 (Fprimitive_undo): Use CONS_TO_INTEGER.
12543 * xfns.c (Fx_window_property): Likewise.
12544 * xselect.c: Include <limits.h>.
12545 (x_own_selection, selection_data_to_lisp_data):
12546 Use INTEGER_TO_CONS.
12547 (x_handle_selection_request, x_handle_selection_clear)
12548 (x_get_foreign_selection, Fx_disown_selection_internal)
12549 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
12550 (lisp_data_to_selection_data): Use cons_to_unsigned.
12551 (x_fill_property_data): Use cons_to_signed.
12552 Report values out of range.
12553
d1f3d2af
PE
12554 Check for buffer and string overflow more precisely.
12555 * buffer.h (BUF_BYTES_MAX): New macro.
12556 * lisp.h (STRING_BYTES_MAX): New macro.
12557 * alloc.c (Fmake_string):
12558 * character.c (string_escape_byte8):
12559 * coding.c (coding_alloc_by_realloc):
12560 * doprnt.c (doprnt):
12561 * editfns.c (Fformat):
12562 * eval.c (verror):
12563 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
12564 since they may not be the same number.
12565 * editfns.c (Finsert_char):
12566 * fileio.c (Finsert_file_contents):
12567 Likewise for BUF_BYTES_MAX.
12568
dd52fcea
PE
12569 * image.c: Use ptrdiff_t, not int, for sizes.
12570 (slurp_file): Switch from int to ptrdiff_t.
12571 All uses changed.
12572 (slurp_file): Check that file size fits in both size_t (for
12573 malloc) and ptrdiff_t (for sanity and safety).
12574
7f9bbdbb
PE
12575 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
12576 if b->modtime has its maximal value.
12577
dfe18f82
PE
12578 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
12579
84acfcf0
PE
12580 Don't assume time_t can fit into int.
12581 * buffer.h (struct buffer.modtime): Now time_t, not int.
12582 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
12583 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
12584
ccd9a01a
PE
12585 Minor fixes for signed vs unsigned integers.
12586 * character.h (MAYBE_UNIFY_CHAR):
12587 * charset.c (maybe_unify_char):
12588 * keyboard.c (read_char, reorder_modifiers):
12589 XINT -> XFASTINT, since the integer must be nonnegative.
12590 * ftfont.c (ftfont_spec_pattern):
12591 * keymap.c (access_keymap, silly_event_symbol_error):
12592 XUINT -> XFASTINT, since the integer must be nonnegative.
12593 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
12594 since it makes no difference and we prefer signed.
12595 * keyboard.c (record_char): Use XUINT when all the neighbors do.
12596 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
12597 nonnegative.
12598
d6d100dd
SM
125992011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
12600
12601 * window.h (Fwindow_frame): Declare.
12602
2b6148e4
PE
126032011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12604
12605 * alloc.c: Simplify handling of large-request failures (Bug#8800).
12606 (SPARE_MEMORY): Always define.
12607 (LARGE_REQUEST): Remove.
12608 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
12609
f230ecc9
MR
126102011-06-06 Martin Rudalics <rudalics@gmx.at>
12611
727e958e
MR
12612 * lisp.h: Move EXFUNS for Fframe_root_window,
12613 Fframe_first_window and Fset_frame_selected_window to window.h.
12614
12615 * window.h: Move EXFUNS for Fframe_root_window,
12616 Fframe_first_window and Fset_frame_selected_window here from
12617 lisp.h.
12618
12619 * frame.c (Fwindow_frame, Fframe_first_window)
12620 (Fframe_root_window, Fframe_selected_window)
12621 (Fset_frame_selected_window): Move to window.c.
12622 (Factive_minibuffer_window): Move to minibuf.c.
12623 (Fother_visible_frames_p): New function.
12624
12625 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
12626
f230ecc9
MR
12627 * window.c (decode_window, decode_any_window): Move up in code.
12628 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
12629 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
12630 (Fwindow_buffer): Move up and rewrite doc-string.
12631 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
12632 (Fwindow_prev): New functions.
727e958e
MR
12633 (Fwindow_frame): Move here from frame.c. Accept any window as
12634 argument.
12635 (Fframe_root_window, Fframe_first_window)
12636 (Fframe_selected_window): Move here from frame.c. Accept frame
12637 or arbitrary window as argument. Update doc-strings.
12638 (Fminibuffer_window): Move up in code.
12639 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
12640 (Fset_frame_selected_window): Move here from frame.c.
12641 Marginal rewrite.
727e958e
MR
12642 (Fselected_window, select_window, Fselect_window): Move up in
12643 code. Minor doc-string fixes.
f230ecc9 12644
4d09bcf6
PE
126452011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12646
12647 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
12648 Do not assume that spare memory exists; that assumption is valid
12649 only if SYSTEM_MALLOC.
12650 (LARGE_REQUEST): New macro, so that the issue of large requests
12651 is separated from the issue of spare memory.
12652
810928a2
AS
126532011-06-05 Andreas Schwab <schwab@linux-m68k.org>
12654
172418ad
AS
12655 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
12656 format. (Bug#8806)
12657
43f862f7
AS
12658 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
12659
810928a2
AS
12660 * xfns.c (x_set_scroll_bar_default_width): Move declarations
12661 before statements.
12662
a059fe24
JD
126632011-06-05 Jan Djärv <jan.h.d@swipnet.se>
12664
12665 * gtkutil.c (xg_get_default_scrollbar_width): New function.
12666
12667 * gtkutil.h: Declare xg_get_default_scrollbar_width.
12668
12669 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
12670 min width by calling x_set_scroll_bar_default_width (Bug#8505).
12671
989bf368
JB
126722011-06-05 Juanma Barranquero <lekktu@gmail.com>
12673
12674 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
12675
4b80f674
CY
126762011-06-04 Chong Yidong <cyd@stupidchicken.com>
12677
12678 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
12679 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
12680 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
12681 New error handlers.
4b80f674
CY
12682 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
12683 Obey Vx_select_enable_clipboard_manager. Catch errors in
12684 x_clipboard_manager_save (Bug#8779).
12685 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 12686 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 12687
99a33b77 126882011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
12689
12690 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
12691
99a33b77 126922011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
12693
12694 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
12695 in the current matrix if keep_current_p is non-zero.
12696
8264569d
EZ
126972011-06-04 Eli Zaretskii <eliz@gnu.org>
12698
12699 * bidi.c (bidi_level_of_next_char): Fix last change.
12700
57f97249
EZ
127012011-06-03 Eli Zaretskii <eliz@gnu.org>
12702
fec2107c 12703 Support bidi reordering of text covered by display properties.
57f97249 12704
fec2107c
EZ
12705 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
12706 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
12707 (bidi_cache_search, bidi_cache_iterator_state)
12708 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
12709 (bidi_level_of_next_char, bidi_move_to_visually_next):
12710 Support character positions inside a run of characters covered by a
fec2107c
EZ
12711 display string.
12712 (bidi_paragraph_init, bidi_resolve_explicit_1)
12713 (bidi_level_of_next_char): Call bidi_fetch_char and
12714 bidi_fetch_char_advance instead of FETCH_CHAR and
12715 FETCH_CHAR_ADVANCE.
12716 (bidi_init_it): Initialize new members.
12717 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
12718 definitions.
12719 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
12720 instead of using explicit *_CHAR codes.
d6d100dd
SM
12721 (bidi_resolve_explicit, bidi_resolve_weak):
12722 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
12723 bidirectional text is supported only in multibyte buffers.
12724 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
12725 it to initialize the frame_window_p member of struct bidi_it.
12726 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
12727 (bidi_resolve_explicit, bidi_resolve_weak)
12728 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
12729 bidi_it->nchars is non-positive.
12730 (bidi_level_of_next_char): Don't try to lookup the cache for the
12731 next/previous character if nothing is cached there yet, or if we
12732 were just reseat()'ed to a new position.
c40e2fb2 12733
0e14fe90
EZ
12734 * xdisp.c (set_cursor_from_row): Set start and stop points
12735 according to the row's direction when priming the loop that looks
12736 for the glyph on which to display cursor.
12737 (single_display_spec_intangible_p): Function deleted.
12738 (display_prop_intangible_p): Reimplement to call
12739 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
12740 Accept 3 additional arguments needed by handle_display_spec.
12741 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
12742 values: lists, `(when COND...)' forms, etc.
12743 (single_display_spec_string_p): Support property values that are
12744 lists with the argument STRING its top-level element.
12745 (display_prop_string_p): Fix the condition for processing a
12746 property that is a list to be consistent with handle_display_spec.
fec2107c 12747 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
12748 last portion of handle_display_prop.
12749 (compute_display_string_pos): Accept additional argument
12750 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
12751 value of a `display' property is a "replacing spec".
12752 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
12753 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
12754 the display property, but just return a value indicating whether
12755 the display property will replace the characters it covers.
12756 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
12757 frame_window_p members of struct bidi_it.
d6d100dd
SM
12758 (compute_display_string_pos, compute_display_string_end):
12759 New functions.
fec2107c
EZ
12760 (push_it): Accept second argument POSITION, where pop_it should
12761 jump to continue iteration.
12762 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 12763
fec2107c
EZ
12764 * keyboard.c (adjust_point_for_property): Adjust the call to
12765 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
12766
12767 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
12768 (bidi_init_it): Update prototypes.
12769 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
12770 (compute_display_string_pos, compute_display_string_end):
12771 Declare prototypes.
fec2107c
EZ
12772 (struct bidi_it): New members nchars and disp_pos. ch_len is now
12773 EMACS_INT.
fc6f18ce 12774
40087514 127752011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 12776
57f53182
PE
12777 Malloc failure behavior now depends on size of allocation.
12778 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
12779 * lisp.h: Change signatures accordingly.
12780 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
12781 All callers changed. (Bug#8762)
12782
12783 * gnutls.c: Use Emacs's memory allocators.
12784 Without this change, the gnutls library would invoke malloc etc.
12785 directly, which causes problems on non-SYNC_INPUT hosts, and which
12786 runs afoul of improving memory_full behavior. (Bug#8761)
12787 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
12788 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
12789 xfree instead of the default malloc, realloc, free.
12790 (Fgnutls_boot): No need to check for memory allocation failure,
12791 since xmalloc does that for us.
12792
ac32cd99 12793 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
12794 * category.c (hash_get_category_set):
12795 * ccl.c (ccl_driver):
12796 * charset.c (Fdefine_charset_internal):
12797 * charset.h (struct charset.hash_index):
12798 * composite.c (get_composition_id, gstring_lookup_cache)
12799 (composition_gstring_put_cache):
12800 * composite.h (struct composition.hash_index):
12801 * dispextern.h (struct image.hash):
12802 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
12803 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
12804 (hashfn_equal, hashfn_user_defined, make_hash_table)
12805 (maybe_resize_hash_table, hash_lookup, hash_put)
12806 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
12807 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
12808 (Fsxhash, Fgethash, Fputhash, Fmaphash):
12809 * image.c (make_image, search_image_cache, lookup_image)
12810 (xpm_put_color_table_h):
12811 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 12812 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 12813 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 12814 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
12815 * alloc.c (allocate_vectorlike):
12816 Check for overflow in vector size calculations.
12817 * ccl.c (ccl_driver):
12818 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
12819 * fns.c, image.c: Remove unnecessary static decls that would otherwise
12820 need to be updated by these changes.
40087514
PE
12821 * fns.c (make_hash_table, maybe_resize_hash_table):
12822 Check for integer overflow with large hash tables.
0de4bb68
PE
12823 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
12824 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
12825 (SXHASH_REDUCE): New macro.
12826 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
12827 Use it instead of discarding useful hash info with large hash values.
12828 (sxhash_float): New function.
12829 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
12830 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
12831 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
12832 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
12833 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
12834 Adjust signatures to match updated version of code.
12835 (consing_since_gc): Now EMACS_INT, since a single hash table can
12836 use more than INT_MAX bytes.
12837
698d32e2
DN
128382011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
12839
12840 Make it possible to build with GCC-4.6+ -O2 -flto.
12841
12842 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
12843
fd6fa53f
SM
128442011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
12845
12846 * minibuf.c (get_minibuffer, read_minibuf_unwind):
12847 Call minibuffer-inactive-mode.
12848
864db017
JB
128492011-05-31 Juanma Barranquero <lekktu@gmail.com>
12850
12851 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
12852 Update dependencies.
12853
2ad0baf4
DN
128542011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12855
12856 * data.c (init_data): Remove code for UTS, this system is not
12857 supported anymore.
12858
4fcc2638
DN
128592011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12860
12861 Don't force ./temacs to start in terminal mode.
12862
12863 * frame.c (make_initial_frame): Initialize faces in all cases, not
12864 only when CANNOT_DUMP is defined.
12865 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
12866
c56e0fd5
DN
128672011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12868
12869 * dispnew.c (add_window_display_history): Use const for the string
12870 pointer. Remove declaration, not needed.
12871
333d54da 128722011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 12873
55d4c1b2 12874 Use 'inline', not 'INLINE'.
333d54da 12875 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
12876 * alloc.c, fontset.c (INLINE): Remove.
12877 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
12878 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
12879 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
12880 * gmalloc.c (register_heapinfo): Use inline unconditionally.
12881 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
12882
738db178
DN
128832011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12884
12885 Make it possible to run ./temacs.
12886
12887 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
12888 syms_of_callproc does the same thing. Remove test for
12889 "initialized", do it in the caller.
12890 * emacs.c (main): Avoid calling set_initial_environment when dumping.
12891
620c53a6
SM
128922011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
12893
12894 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
12895 (read_minibuf): Use get_minibuffer.
12896 (syms_of_minibuf): Use DEFSYM.
12897 (Qmetadata): New var.
12898 * data.c (Qbuffer): Don't make it static.
12899 (syms_of_data): Use DEFSYM.
12900
e003a292
PE
129012011-05-31 Paul Eggert <eggert@cs.ucla.edu>
12902
12903 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
12904 (CCL_CODE_MIN): New macro.
12905
ed008a6d
PE
129062011-05-30 Paul Eggert <eggert@cs.ucla.edu>
12907
3687c2ef
PE
12908 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
12909
ed008a6d
PE
12910 * eval.c (Qdebug): Now static.
12911 * lisp.h (Qdebug): Remove decl. This reverts a part of the
12912 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
12913 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
12914
d66c4c7c
CY
129152011-05-29 Chong Yidong <cyd@stupidchicken.com>
12916
12917 * image.c: Various fixes to ImageMagick code comments.
12918 (Fimagemagick_types): Doc fix.
12919
5fbc2025
PE
129202011-05-29 Paul Eggert <eggert@cs.ucla.edu>
12921
0196f88a
PE
12922 Minor fixes prompted by GCC 4.6.0 warnings.
12923
12924 * xselect.c (converted_selections, conversion_fail_tag): Now static.
12925
5fbc2025
PE
12926 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
12927 (x_clipboard_manager_save_all): Move extern decl to ...
12928 * xterm.h: ... here, so that it can be checked for consistency.
12929
1dd3c2d9
CY
129302011-05-29 Chong Yidong <cyd@stupidchicken.com>
12931
12932 * xselect.c (x_clipboard_manager_save_frame)
12933 (x_clipboard_manager_save_all): New functions.
12934 (Fx_clipboard_manager_save): Lisp function deleted.
12935
12936 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
12937 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
12938
12939 * xterm.h: Update prototype.
12940
5ba6571d
WX
129412011-05-28 William Xu <william.xwl@gmail.com>
12942
12943 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
12944 exiting (Bug#8239).
12945
3eaff834
JM
129462011-05-28 Jim Meyering <meyering@redhat.com>
12947
e1900994 12948 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
12949 * fns.c (to_uchar): Define.
12950 (crypto_hash_function): Use it to convert some newly-signed
12951 variables to unsigned, to avoid sign-extension bugs. For example,
12952 without this change, (md5 "truc") would evaluate to
12953 45723a2aff78ff4fff7fff1114760e62 rather than the expected
12954 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 12955 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 12956
0f6990a7
PE
129572011-05-27 Paul Eggert <eggert@cs.ucla.edu>
12958
12959 Integer overflow fixes.
c8a9ca5a 12960
08686060
PE
12961 * dbusbind.c: Serial number integer overflow fixes.
12962 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
12963 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
12964 to hold a serial number that is too large for a fixnum.
12965 (Fdbus_method_return_internal, Fdbus_method_error_internal):
12966 Check for serial numbers out of range. Decode any serial number
59568bf0 12967 that was so large that it became a float. (Bug#8722)
08686060 12968
2d1fc3c7
PE
12969 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
12970 (Fdbus_call_method, Fdbus_call_method_asynchronously):
12971 Use XFASTINT rather than XUINT when numbers are nonnegative.
12972 (xd_append_arg, Fdbus_method_return_internal):
12973 (Fdbus_method_error_internal): Likewise. Also, for unsigned
12974 arguments, check that Lisp number is nonnegative, rather than
59568bf0 12975 silently wrapping negative numbers around. (Bug#8722)
30217ff0 12976 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 12977 (Bug#8722)
2d1fc3c7 12978
c8a9ca5a
PE
12979 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
12980
519e1d69
PE
12981 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
12982
6df6ae42 12983 ccl: Add integer overflow checks.
30569699
PE
12984 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
12985 (IN_INT_RANGE): New macros.
12986 (ccl_driver): Use them to check for integer overflow when
12987 decoding a CCL program. Many of the new checks are whether XINT (x)
12988 fits in int; it doesn't always, on 64-bit hosts. The new version
12989 doesn't catch all possible integer overflows, but it's an
847044ea 12990 improvement. (Bug#8719)
30569699 12991
c11285dc
PE
12992 * alloc.c (make_event_array): Use XINT, not XUINT.
12993 There's no need for unsigned here.
12994
fdccd48e
PE
12995 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
12996 This follows up to the 2011-05-06 change that substituted uintptr_t
12997 for EMACS_INT. This case wasn't caught back then.
12998
37910ab2
PE
12999 Rework Fformat to avoid integer overflow issues.
13000 * editfns.c: Include <float.h> unconditionally, as it's everywhere
13001 now (part of C89). Include <verify.h>.
13002 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
13003 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
13004 (Fformat): Avoid the prepass trying to compute sizes; it was only
13005 approximate and thus did not catch overflow reliably. Instead, walk
13006 through the format just once, formatting and computing sizes as we go,
13007 checking for integer overflow at every step, and allocating a larger
13008 buffer as needed. Keep track separately whether the format is
13009 multibyte. Keep only the most-recently calculated precision, rather
13010 than them all. Record whether each argument has been converted to
13011 string. Use EMACS_INT, not int, for byte and char and arg counts.
13012 Support field widths and precisions larger than INT_MAX. Avoid
13013 sprintf's undefined behavior with conversion specifications such as %#d
13014 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
13015 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
13016 formatting out-of-range floating point numbers with int
9173deec 13017 formats. (Bug#8668)
37910ab2 13018
2e6578fb
PE
13019 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
13020
0ae6bdee
PE
13021 * data.c: Avoid integer truncation in expressions involving floats.
13022 * data.c: Include <intprops.h>.
13023 (arith_driver): When there's an integer overflow in an expression
13024 involving floating point, convert the integers to floating point
13025 so that the resulting value does not suffer from catastrophic
13026 integer truncation. For example, on a 64-bit host (* 4
13027 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
13028 Do not rely on undefined behavior after integer overflow.
13029
de883a70
PE
13030 merge count_size_as_multibyte, parse_str_to_multibyte
13031 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 13032 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
13033 Check for integer overflow.
13034 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
13035 since it's now a duplicate of the other. This is more of
13036 a character than a buffer op, so better that it's in character.c.
13037 * fns.c, print.c: Adjust to above changes.
13038
2ff916cb
PE
130392011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
13040
13041 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
13042
f1b54466
PE
130432011-05-27 Paul Eggert <eggert@cs.ucla.edu>
13044
fb1ac845
PE
13045 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13046 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
13047 (x_clipboard_manager_save): Now static.
13048 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
13049
f1b54466
PE
13050 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13051 (crypto_hash_function): Now static.
13052 Fix pointer signedness problems. Avoid unnecessary initializations.
13053
a9f737ee
CY
130542011-05-27 Chong Yidong <cyd@stupidchicken.com>
13055
13056 * termhooks.h (Vselection_alist): Make it terminal-local.
13057
13058 * terminal.c (create_terminal): Initialize it.
13059
13060 * xselect.c: Support for clipboard managers.
13061 (Vselection_alist): Move to termhooks.h as terminal-local var.
13062 (LOCAL_SELECTION): New macro.
13063 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
13064 (symbol_to_x_atom): Remove gratuitous arg.
13065 (x_handle_selection_request, lisp_data_to_selection_data)
13066 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
13067 (x_own_selection, x_get_local_selection, x_convert_selection):
13068 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
13069 (some_frame_on_display): Delete unused function.
13070 (Fx_own_selection_internal, Fx_get_selection_internal)
13071 (Fx_disown_selection_internal, Fx_selection_owner_p)
13072 (Fx_selection_exists_p): New optional frame arg.
13073 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
13074 (x_handle_selection_clear): Don't treat other terminals with the
13075 same keyboard specially. Use the terminal-local Vselection_alist.
13076 (x_clear_frame_selections): Use Frun_hook_with_args.
13077
13078 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
13079
13080 * xterm.h: Add support for those atoms.
13081
e067f0c1
CY
130822011-05-26 Chong Yidong <cyd@stupidchicken.com>
13083
13084 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
13085 (converted_selections, conversion_fail_tag): New global variables.
13086 (x_selection_request_lisp_error): Free the above.
13087 (x_get_local_selection): Remove unnecessary code.
13088 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
13089 of converted selections stored in converted_selections.
13090 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
13091 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
13092 (x_convert_selection): New function.
13093 (x_handle_selection_event): Simplify.
13094 (x_get_foreign_selection): Don't ignore incoming requests while
13095 waiting for an answer; this will fail when we implement
13096 SAVE_TARGETS, and seems unnecessary anyway.
13097 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
13098 (Vx_sent_selection_functions): Doc fix.
13099
0f4aebc0
LL
131002011-05-26 Leo Liu <sdl.web@gmail.com>
13101
13102 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
13103
e61124cd
YM
131042011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13105
13106 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
13107
13108 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
13109 for fringe update if it has periodic bitmap.
ac389d0c 13110 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
13111 and fringe_bitmap_periodic_p.
13112
13113 * fringe.c (get_fringe_bitmap_data): New function.
13114 (draw_fringe_bitmap_1, update_window_fringes): Use it.
13115 (update_window_fringes): Record periodicity of fringe bitmap in glyph
13116 row. Mark glyph row for fringe update if periodicity changed.
13117
13118 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
13119 for fringe update unless it has periodic bitmap.
13120
f16d9837
KH
131212011-05-25 Kenichi Handa <handa@m17n.org>
13122
13123 * xdisp.c (get_next_display_element): Set correct it->face_id for
13124 a static composition.
13125
e1b90ef6
LL
131262011-05-24 Leo Liu <sdl.web@gmail.com>
13127
13128 * deps.mk (fns.o):
13129 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
13130
13131 * fns.c (crypto_hash_function, Fsha1): New function.
13132 (Fmd5): Use crypto_hash_function.
13133 (syms_of_fns): Add Ssha1.
13134
7400048f
PE
131352011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13136
13137 * gnutls.c: Remove unused macros.
13138 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
13139 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
13140 Remove macros that are defined and never used.
13141 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
13142
abb71cf4
CY
131432011-05-22 Chong Yidong <cyd@stupidchicken.com>
13144
13145 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
13146 (Fx_get_selection_internal): Minor cleanup.
13147 (Fx_own_selection_internal): Rename arguments for consistency with
13148 select.el.
13149
6307db39
PE
131502011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13151
13152 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
13153
f3d4e0a4
CY
131542011-05-22 Chong Yidong <cyd@stupidchicken.com>
13155
13156 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
13157
4d8ade89
YM
131582011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13159
13160 * dispnew.c (scrolling_window): Don't exclude the case that the
13161 last enabled row in the desired matrix touches the bottom boundary.
13162
32078c8d
GM
131632011-05-21 Glenn Morris <rgm@gnu.org>
13164
13165 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
13166 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
13167 and add some more files.
32078c8d 13168
7285dc67
EZ
131692011-05-20 Eli Zaretskii <eliz@gnu.org>
13170
13171 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
13172 report_file_error introduced by the change from 2011-05-07.
13173
89d1bd22
PE
131742011-05-20 Paul Eggert <eggert@cs.ucla.edu>
13175
13176 * systime.h (Time): Define only if emacs is defined.
13177 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
13178 where the include path doesn't have X11/X.h by default. See
13179 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
13180
cd394be1 131812011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
13182
13183 * composite.c (find_automatic_composition): Fix previous change.
13184
b9704ad9
GM
131852011-05-20 Glenn Morris <rgm@gnu.org>
13186
13187 * lisp.mk: New file, split from Makefile.in.
13188 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
13189 (shortlisp): Remove.
13190 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
13191
4a720484
GM
131922011-05-19 Glenn Morris <rgm@gnu.org>
13193
13194 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
13195 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
13196 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
13197 (lisp): Set the order to that of loadup.el.
13198 (shortlisp): Make it a copy of $lisp.
13199 (SOME_MACHINE_LISP): Remove.
13200 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
13201 Use just $shortlisp, not $SOME_MACHINE_LISP too.
13202
a28d4396
KH
132032011-05-18 Kenichi Handa <handa@m17n.org>
13204
13205 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
13206 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
13207 (find_automatic_composition): Mostly rewrite for efficiency.
13208
a2b1fa8e
JB
132092011-05-18 Juanma Barranquero <lekktu@gmail.com>
13210
13211 * makefile.w32-in: Update dependencies.
13212
8e1f5610
CS
132132011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
13214
13215 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 13216 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 13217
7025ee00 132182011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 13219
cdfa6eab
PE
13220 Fix some integer overflow issues, such as string length overflow.
13221
06d6db33
PE
13222 * insdel.c (count_size_as_multibyte): Check for string overflow.
13223
2b4560a8
PE
13224 * character.c (lisp_string_width): Check for string overflow.
13225 Use EMACS_INT, not int, for string indexes and lengths; in
13226 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
13227 the resulting string length overflows an EMACS_INT; instead,
13228 report a string overflow if no precision given. When checking for
13229 precision exhaustion, use a check that cannot possibly have
13230 integer overflow. (Bug#8675)
13231 * character.h (lisp_string_width): Adjust to new signature.
13232
cb93f9be
PE
13233 * alloc.c (string_overflow): New function.
13234 (Fmake_string): Use it. This doesn't change behavior, but saves
13235 a few bytes and will simplify future changes.
13236 * character.c (string_escape_byte8): Likewise.
13237 * lisp.h (string_overflow): New decl.
13238
1a1f3366
PE
13239 Fixups, following up to the user-interface timestamp change.
13240 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
13241 for UI timestamps, instead of unsigned long.
9fbd6841
PE
13242 * msdos.c (mouse_get_pos): Likewise.
13243 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
13244 * w32gui.h (Time): Define by including "systime.h" rather than by
13245 declaring it ourselves. (Bug#8664)
13246
d4e3e4d3
PE
13247 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
13248 * image.c (clear_image_cache): Likewise.
13249
f6a24d19
PE
13250 * term.c (term_mouse_position): Don't assume time_t wraparound.
13251
08dc5ae6
PE
13252 Be more systematic about user-interface timestamps.
13253 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
13254 and sometimes 'EMACS_UINT', to represent these timestamps.
13255 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
13256 This makes the code easier to follow, and makes it easier to catch
13257 integer overflow bugs such as Bug#8664.
13258 * frame.c (Fmouse_position, Fmouse_pixel_position):
13259 Use Time, not unsigned long, for user-interface timestamps.
13260 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
13261 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
13262 * keyboard.h (last_event_timestamp): Likewise.
13263 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
13264 * menu.h (xmenu_show): Likewise.
13265 * term.c (term_mouse_position): Likewise.
13266 * termhooks.h (struct input_event.timestamp): Likewise.
13267 (struct terminal.mouse_position_hook): Likewise.
13268 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
13269 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
13270 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
13271 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
13272 what it was before.
13273 * menu.h, termhooks.h: Include "systime.h", for Time.
13274
8e55734a
PE
13275 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
13276 Don't assume that the difference between two unsigned long values
13277 can fit into an integer. At this point, we know button_down_time
13278 <= event->timestamp, so the difference must be nonnegative, so
13279 there's no need to cast the result if double-click-time is
13280 nonnegative, as it should be; check that it's nonnegative, just in
13281 case. This bug is triggered when events are more than 2**31 ms
86db42d2 13282 apart (about 25 days). (Bug#8664)
8e55734a 13283
841f1b75 13284 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 13285 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 13286
3e26f69c
PE
13287 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
13288 that always fit in int. Use a sentinel instead of a counter, to
13289 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
13290 * frame.h (struct frame): Use int for menu_bar_items_used
13291 instead of EMACS_INT, since it always fits in int.
3e26f69c 13292
5cc152c0
PE
13293 * menu.c (grow_menu_items): Check for int overflow.
13294
d89eb65e
PE
13295 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
13296
5235bd3e
PE
13297 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
13298 Before, the code was not consistent. These values cannot exceed
13299 2**31 - 1 so there's no need to make them unsigned.
13300 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
13301 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
13302 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
13303 as modifiers.
13304 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
13305
bc827e23
PE
13306 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
13307 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
13308 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
13309 presumably because the widths might not match.
13310
78eb494e
PE
13311 * window.c (size_window): Avoid needless test at loop start.
13312
04f2d78b
CB
133132011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
13314
13315 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
13316
d2fc7e3d 133172011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
13318
13319 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
13320
d2fc7e3d 133212011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
13322
13323 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
13324 `width' to `bar_area_x' and `bar_area_width', respectively.
13325 (x_scroll_run): Take account of fringe background extension.
13326
04f2d78b
CB
13327 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
13328 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
13329 `bar_area_width', respectively.
13330 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
13331 background extension.
13332
79b70037
GM
133332011-05-10 Jim Meyering <meyering@redhat.com>
13334
13335 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
13336
2f142cc5
JB
133372011-05-10 Juanma Barranquero <lekktu@gmail.com>
13338
13339 * image.c (Finit_image_library): Return t for built-in image types,
13340 like pbm and xbm. (Bug#8640)
13341
57679c86
AS
133422011-05-09 Andreas Schwab <schwab@linux-m68k.org>
13343
13344 * w32menu.c (set_frame_menubar): Fix submenu allocation.
13345
888c9e86
EZ
133462011-05-07 Eli Zaretskii <eliz@gnu.org>
13347
b0512a1d
EZ
13348 * w32console.c (Fset_screen_color): Doc fix.
13349 (Fget_screen_color): New function.
13350 (syms_of_ntterm): Defsubr it.
13351
7285dc67
EZ
13352 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
13353 unlink the temporary file if Fcall_process didn't create it in the
13354 first place.
13355 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
13356 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
13357 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
13358 cue to call_process_cleanup not to close that handle.
13359
4d3fcc8e
BK
133602011-05-07 Ben Key <bkey76@gmail.com>
13361
13362 * makefile.w32-in: The bootstrap-temacs rule now makes use of
13363 one of two shell specific rules, either bootstrap-temacs-CMD or
13364 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
13365 to the previous implementation of the bootstrap-temacs rule.
13366 The bootstrap-temacs-CMD rule is similar to the previous
13367 implementation of the bootstrap-temacs rule except that it
13368 makes use of the ESC_CFLAGS variable instead of the CFLAGS
13369 variable.
13370
13371 These changes, along with some changes to nt/configure.bat,
13372 nt/gmake.defs, and nt/nmake.defs, are required to extend my
13373 earlier fix to add support for --cflags and --ldflags options
13374 that include quotes so that it works whether make uses cmd or
13375 sh as the shell.
13376
b4289b64
MA
133772011-05-06 Michael Albinus <michael.albinus@gmx.de>
13378
13379 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
13380 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
13381 is a constant.
13382 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
13383 a string. Handle both cases.
13384 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
13385 (Fdbus_register_method): Use Qinvalid_function.
13386
af4c0e28
JB
133872011-05-06 Juanma Barranquero <lekktu@gmail.com>
13388
13389 * makefile.w32-in: Update dependencies.
13390 (LISP_H): Add inttypes.h and stdin.h.
13391 (PROCESS_H): Add unistd.h.
13392
c51453d9
EZ
133932011-05-06 Eli Zaretskii <eliz@gnu.org>
13394
13395 * lread.c: Include limits.h (fixes the MS-Windows build broken by
13396 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
13397
8ff0ac3c 133982011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 13399
4c4b566b
PE
13400 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
13401
aab2b9b5
PE
13402 * term.c (vfatal): Remove stray call to va_end.
13403 It's not needed and the C Standard doesn't allow it here anyway.
13404
c378da0b
PE
13405 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
13406 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
13407
288b08c7
PE
13408 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
13409 bytes.
13410
e3601888
PE
13411 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
13412
db6c0e74
PE
13413 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13414
dd5963ea
PE
13415 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
13416
88c9450f
PE
13417 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
13418
2f9442b8
PE
13419 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
13420
c032b5f8
PE
13421 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
13422 * charset.c (Fdefine_charset_internal): Don't initialize
13423 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 13424 32-bit int (Bug#8600).
a108c10b
PE
13425
13426 * lread.c (read_integer): Be more consistent with string-to-number.
13427 Use string_to_number to do the actual conversion; this avoids
13428 rounding errors and fixes some other screwups. Without this fix,
13429 for example, #x1fffffffffffffff was misread as -2305843009213693952.
13430 (digit_to_number): Move earlier, for benefit of read_integer.
13431 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 13432 not a digit in any supported base. (Bug#8602)
a108c10b 13433
ad5f9eea
PE
13434 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
13435
aec1708a
PE
13436 * dispnew.c (scrolling_window): Return 1 if we scrolled,
13437 to match comment at start of function. This also removes a
13438 GCC warning about overflow in a 32+64-bit port.
13439
47be4ab5
PE
13440 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
13441
371cac43
PE
13442 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
13443 Reported by Stefan Monnier in
13444 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
13445 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
13446 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 13447
d01a7826
PE
13448 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
13449 (EMACS_UINTPTR): Likewise, with uintptr_t.
13450
7fd47d5c
PE
13451 * lisp.h: Prefer 64-bit EMACS_INT if available.
13452 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
13453 on 32-bit hosts that have 64-bit int, so that they can access
13454 large files.
122b0c86
PE
13455 However, temporarily disable this change unless the temporary
13456 symbol WIDE_EMACS_INT is defined.
7fd47d5c 13457
8727937b
PE
13458 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
13459
8ac068ac
PE
13460 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
13461 This removes an assumption that EMACS_INT and long are the same
13462 width as pointers. The assumption is true for Emacs porting targets
13463 now, but we want to make other targets possible.
13464 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
13465 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
13466 In the rest of the code, change types of integers that hold casted
13467 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
13468 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
13469 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
13470 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
13471 No need to cast type when ORing.
13472 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
13473 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
13474 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
13475 assume EMACS_INT is the same width as char *.
13476 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
13477 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
13478 Remove no-longer-needed casts.
13479 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
13480 (xg_tool_bar_help_callback, xg_make_tool_item):
13481 Use EMACS_INTPTR to hold an integer
13482 that will be cast to void *; this can avoid a GCC warning
13483 if EMACS_INT is not the same width as void *.
13484 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
13485 * xdisp.c (display_echo_area_1, resize_mini_window_1):
13486 (current_message_1, set_message_1):
13487 Use a local to convert to proper width without a cast.
13488 * xmenu.c (dialog_selection_callback): Likewise.
13489
ede49d71
PE
13490 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
13491 Also, don't assume VALBITS / RAND_BITS is less than 5,
13492 and don't rely on undefined behavior when shifting a 1 left into
13493 the sign bit.
13494 * lisp.h (get_random): Change signature to match.
13495
2f30ecd0
PE
13496 * lread.c (hash_string): Use size_t, not int, for hash computation.
13497 Normally we prefer signed values; but hashing is special, because
13498 it's better to use unsigned division on hash table sizes so that
13499 the remainder is nonnegative. Also, size_t is the natural width
13500 for hashing into memory. The previous code used 'int', which doesn't
13501 retain enough info to hash well into very large tables.
13502 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
13503
2a866e7b
PE
13504 * dbusbind.c: Don't possibly lose pointer info when converting.
13505 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
13506 Use XPNTR rather than XHASH, so that the high-order bits of
13507 the pointer aren't lost when converting through void *.
13508
51639eac
PE
13509 * eval.c (Fautoload): Don't double-shift a pointer.
13510
92394119
PE
13511 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
13512
dbdb9a7c
JB
135132011-05-06 Juanma Barranquero <lekktu@gmail.com>
13514
13515 * gnutls.c (DEF_GNUTLS_FN):
13516 * image.c (DEF_IMGLIB_FN): Make function pointers static.
13517
db7a0b4f
AS
135182011-05-05 Andreas Schwab <schwab@linux-m68k.org>
13519
13520 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
13521 marker. (Bug#8610)
13522
cd394be1 135232011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
13524
13525 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
13526 New version that can reserve upto 2GB of heap space.
13527
f7ff1b0f 135282011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
13529
13530 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
13531
639c109b
TZ
135322011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
13533
13534 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
13535 `gnutls_certificate_set_x509_key_file'.
13536
d2127135
JB
135372011-05-05 Juanma Barranquero <lekktu@gmail.com>
13538
13539 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
13540 Update dependencies.
13541
e968f4f3
JB
135422011-05-04 Juanma Barranquero <lekktu@gmail.com>
13543
13544 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
13545 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
13546 Remove unused parameter `fildes'.
13547 * process.c (read_process_output, send_process): Don't pass it.
13548
84d358f0
JB
135492011-05-04 Juanma Barranquero <lekktu@gmail.com>
13550
13551 Fix previous change: the library cache is defined in w32.c.
13552 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
13553 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
13554
0898ca10
JB
135552011-05-04 Juanma Barranquero <lekktu@gmail.com>
13556
13557 Implement dynamic loading of GnuTLS on Windows.
13558
13559 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
13560 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
13561 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13562 Declare.
13563
13564 * gnutls.c (Qgnutls_dll): Define.
13565 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
13566 (gnutls_*): Declare function pointers.
13567 (init_gnutls_functions): New function to initialize function pointers.
13568 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
13569 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
13570 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13571 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
13572 (emacs_gnutls_write, emacs_gnutls_read)
13573 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
13574 (Fgnutls_available_p): New function.
13575 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
13576 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
13577 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
13578
13579 * image.c: Include w32.h.
13580 (Vimage_type_cache): Delete.
13581 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
13582 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
13583 (w32_delayed_load): Move to w32.c.
13584
13585 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
13586
13587 * w32.c (QCloaded_from, Vlibrary_cache): Define.
13588 (w32_delayed_load): Move from image.c. When loading a library, record
13589 its filename in the :loaded-from property of the library id.
13590 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
13591 Initialize and staticpro them.
13592 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
13593
13594 * process.c: Include lisp.h before w32.h, not after.
13595 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
13596 instead of gnutls_record_check_pending.
13597
13598 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
13599
ff4de4aa
TZ
136002011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
13601
13602 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
13603 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
13604 as passed in.
13605
abe95abb
JD
136062011-05-03 Jan Djärv <jan.h.d@swipnet.se>
13607
13608 * xterm.c (x_set_frame_alpha): Do not set property on anything
13609 else than FRAME_X_OUTER_WINDOW (Bug#8608).
13610
e16e55d4
JB
136112011-05-02 Juanma Barranquero <lekktu@gmail.com>
13612
13613 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
13614
bafcf6a5
JB
136152011-05-02 Juanma Barranquero <lekktu@gmail.com>
13616
13617 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
13618 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
13619 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
13620 (gnutls_global_initialized, Qgnutls_bootprop_priority)
13621 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
13622 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
13623 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
13624 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
13625 (Qgnutls_bootprop_callbacks_verify): Make static.
13626
e7a6747f
AS
136272011-05-01 Andreas Schwab <schwab@linux-m68k.org>
13628
19ed11ba
AS
13629 * callproc.c: Indentation fixup.
13630
e7a6747f 13631 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
13632 (wait_for_termination, interruptible_wait_for_termination):
13633 Move after wait_for_termination_1.
e7a6747f 13634
1ef14cb4
LMI
136352011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
13636
13637 * sysdep.c (interruptible_wait_for_termination): New function
13638 which is like wait_for_termination, but allows keyboard
13639 interruptions.
13640
13641 * callproc.c (Fcall_process): Add (:file "file") as an option for
13642 the STDOUT buffer.
13643 (Fcall_process_region): Ditto.
13644
330d880c
EZ
136452011-04-30 Eli Zaretskii <eliz@gnu.org>
13646
8db90b73
EZ
13647 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
13648 rather than `XVECTOR (FOO)->size'.
13649
330d880c
EZ
13650 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
13651 inttypes.h, as a gnulib replacement is used if it not available in
13652 system headers.
13653
15cbd324
EZ
136542011-04-21 Eli Zaretskii <eliz@gnu.org>
13655
13656 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
13657 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
13658 of MOST_POSITIVE_FIXNUM. (Bug#8528)
13659
13660 * coding.c (coding_alloc_by_realloc): Error out if destination
13661 will grow beyond MOST_POSITIVE_FIXNUM.
13662 (decode_coding_emacs_mule): Abort if there isn't enough place in
13663 charbuf for the composition carryover bytes. Reserve an extra
13664 space for up to 2 characters produced in a loop.
13665 (decode_coding_iso_2022): Abort if there isn't enough place in
13666 charbuf for the composition carryover bytes.
13667
136682011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 13669
ae940cca
EZ
13670 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
13671 aborting when %lld or %lll format is passed.
13672 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
13673 %llo or %llx format is passed. (Bug#8545)
13674
03ab8921
EZ
13675 * window.c (window_scroll_line_based): Use a marker instead of
13676 simple variables to record original value of point. (Bug#7952)
13677
afda1437
EZ
13678 * doprnt.c (doprnt): Fix the case where a multibyte sequence
13679 produced by %s or %c overflows available buffer space. (Bug#8545)
13680
f76dee0c
PE
136812011-04-28 Paul Eggert <eggert@cs.ucla.edu>
13682
13683 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 13684 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 13685
fdc5744d
JB
136862011-04-28 Juanma Barranquero <lekktu@gmail.com>
13687
13688 * w32.c (init_environment): Warn about defaulting HOME to C:\.
13689
638f053a
JB
136902011-04-28 Juanma Barranquero <lekktu@gmail.com>
13691
13692 * keyboard.c (Qdelayed_warnings_hook): Define.
13693 (command_loop_1): Run `delayed-warnings-hook'
13694 if Vdelayed_warnings_list is non-nil.
13695 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
13696 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
13697
d178f871
EZ
136982011-04-28 Eli Zaretskii <eliz@gnu.org>
13699
13700 * doprnt.c (doprnt): Don't return value smaller than the buffer
13701 size if the message was truncated. (Bug#8545).
13702
b124fd93
JB
137032011-04-28 Juanma Barranquero <lekktu@gmail.com>
13704
13705 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
13706 (Fx_window_property): #if-0 the whole functions, not just the bodies.
13707
e810457d
PE
137082011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13709
13710 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
13711
ea51cceb
JB
137122011-04-27 Juanma Barranquero <lekktu@gmail.com>
13713
13714 * makefile.w32-in: Update dependencies.
13715
94dcfacf
EZ
137162011-04-27 Eli Zaretskii <eliz@gnu.org>
13717
13718 Improve `doprnt' and its usage. (Bug#8545)
13719 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
13720 `format_end'. Remove support for %l as a conversion specifier.
13721 Don't use xrealloc. Improve diagnostics when the %l size modifier
13722 is used. Update the commentary.
13723
13724 * eval.c (verror): Simplify calculation of size_t.
13725
13726 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
13727 messages.
13728
f61f41d7
PE
137292011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
13730
13731 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
13732 change.
13733
96fb4434
PE
137342011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13735
13736 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
13737 This makes this file independent of the recent pseudovector change.
13738
671875da 137392011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 13740
69e9b5a3
PE
13741 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
13742
b5f869a7 13743 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 13744 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 13745 Remove unused local.
c8926152 13746 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 13747
841a1577 13748 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
13749 GCC 4.6.0 optimizes based on type-based alias analysis.
13750 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
13751 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
13752 != &v->size, and therefore "v->size = 1; b->size = 2; return
13753 v->size;" must therefore return 1. This assumption is incorrect
13754 for Emacs, since it type-puns struct Lisp_Vector * with many other
13755 types. To fix this problem, this patch adds a new type struct
f904488f 13756 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
13757 and pseudovectors, and helps optimizing compilers not get fooled
13758 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
13759 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
13760 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
13761 the size member.
eab3844f
PE
13762 (XSETPVECTYPE): Rewrite in terms of new macro.
13763 (XSETPVECTYPESIZE): New macro, specifying both type and size.
13764 This is a bit clearer, and further avoids the possibility of
13765 undesirable aliasing.
13766 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 13767 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
13768 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
13769 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
13770 (ASIZE): Now uses header.size rather than size.
13771 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
13772 to avoid the hassle of writing XVECTOR (foo)->header.size.
13773 (struct vectorlike_header): New type.
eab3844f
PE
13774 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
13775 object, to help avoid aliasing.
13776 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
13777 (SUBRP): Likewise, since Lisp_Subr is a special case.
13778 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
13779 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
13780 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 13781 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
13782 changed to be "header.size" and "header.next".
13783 * buffer.h (struct buffer): Likewise.
13784 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
13785 * frame.h (struct frame): Likewise.
13786 * process.h (struct Lisp_Process): Likewise.
13787 * termhooks.h (struct terminal): Likewise.
13788 * window.c (struct save_window_data, struct saved_window): Likewise.
13789 * window.h (struct window): Likewise.
13790 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
13791 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
13792 * buffer.c (init_buffer_once): Likewise.
13793 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
13794 special case.
13795 * process.c (Fformat_network_address): Use local var for size,
13796 for brevity.
13797
0df1eac5
PE
13798 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
13799
847ab9d1 13800 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
13801 * data.c (atof): Remove decl; no longer used or needed.
13802 (digit_to_number): Move to lread.c.
13803 (Fstring_to_number): Use new string_to_number function, to be
13804 consistent with how the Lisp reader treats infinities and NaNs.
13805 Do not assume that floating-point numbers represent EMACS_INT
13806 without losing information; this is not true on most 64-bit hosts.
13807 Avoid double-rounding errors, by insisting on integers when
13808 parsing non-base-10 numbers, as the documentation specifies.
13809 * lisp.h (string_to_number): New decl, replacing ...
13810 (isfloat_string): Remove.
bc0a5c13 13811 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 13812 (read1): Do not accept +. and -. as integers; this
452f4150
PE
13813 appears to have been a coding error. Similarly, do not accept
13814 strings like +-1e0 as floating point numbers. Do not report
13815 overflow for integer overflows unless the base is not 10 which
13816 means we have no simple and reliable way to continue.
13817 Break out the floating-point parsing into a new
13818 function string_to_number, so that Fstring_to_number parses
13819 floating point numbers consistently with the Lisp reader.
04f2d78b 13820 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
13821 (E_CHAR, EXP_INT): Remove, replacing with ...
13822 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
13823 (string_to_number): New function, replacing isfloat_string.
13824 This function checks for valid syntax and produces the resulting
13825 Lisp float number too. Rework it so that string-to-number
bc0a5c13 13826 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
13827 so that overflow for non-base-10 numbers is reported only when
13828 there's no portable and simple way to convert to floating point.
452f4150 13829
67769ffc
PE
13830 * textprop.c (set_text_properties_1): Rewrite for clarity,
13831 and to avoid GCC warning about integer overflow.
13832
c20db43f
PE
13833 * intervals.h (struct interval): Use EMACS_INT for members
13834 where EMACS_UINT might cause problems. See
13835 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
13836 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
13837 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
13838 All uses changed.
37aa2f85
PE
13839 (offset_intervals): Tell GCC not to worry about length overflow
13840 when negating a negative length.
c20db43f 13841
2538aa2f
PE
13842 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
13843 (overrun_check_free): Likewise.
13844
f2d3008d
PE
13845 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
13846 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
13847 word size.
13848
ec8df744
PE
13849 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13850 (gnutls_make_error): Rename local to avoid shadowing.
13851 (gnutls_emacs_global_deinit): ifdef out; not used.
13852 (Fgnutls_boot): Use const for pointer to readonly storage.
13853 Comment out unused local. Fix pointer signedness problems.
13854
640ee02d
PE
13855 * lread.c (openp): Don't stuff size_t into an 'int'.
13856 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
13857 about possible signed overflow.
13858
6048fb2a
PE
13859 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13860 (GDK_KEY_g): Don't define if already defined.
13861 (xg_prepare_tooltip): Avoid pointer signedness problem.
13862 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
13863
fa3c87e1
PE
13864 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
13865 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
13866
2172544b
PE
13867 * xfns.c (Fx_window_property): Simplify a bit,
13868 to make a bit faster and to avoid GCC 4.6.0 warning.
13869 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
13870
9b821a21
PE
13871 * fns.c (internal_equal): Don't assume size_t fits in int.
13872
3c616cfa
PE
13873 * alloc.c (compact_small_strings): Tighten assertion a little.
13874
c2982e87
PE
13875 Replace pEd with more-general pI, and fix some printf arg casts.
13876 * lisp.h (pI): New macro, generalizing old pEd macro to other
13877 conversion specifiers. For example, use "...%"pI"d..." rather
13878 than "...%"pEd"...".
13879 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 13880 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
13881 * alloc.c (check_pure_size): Don't overflow by converting size to int.
13882 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
13883 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
13884 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
13885 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
13886 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
13887 64-bit hosts.
13888 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
13889 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
13890 * print.c (safe_debug_print, print_object): Likewise.
13891 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
13892 to int.
6f04d126
PE
13893 Use pI instead of if-then-else-abort. Use %p to avoid casts,
13894 avoiding the 0 flag, which is not portable.
c2982e87
PE
13895 * process.c (Fmake_network_process): Use pI to avoid cast.
13896 * region-cache.c (pp_cache): Likewise.
13897 * xdisp.c (decode_mode_spec): Likewise.
13898 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
13899 behavior on 64-bit hosts with printf arg.
6f04d126 13900 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
13901 (x_stop_queuing_selection_requests): Likewise.
13902 (x_get_window_property): Don't truncate byte count to an 'int'
13903 when tracing.
0b432f21 13904
5e073ec7
PE
13905 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
13906 here, since it parses constructs like leading '-' and spaces,
13907 which are not wanted; and it overflows with large numbers.
13908 Instead, simply match F[0-9]+, which is what is wanted anyway.
13909
36372bf9
PE
13910 * alloc.c: Remove unportable assumptions about struct layout.
13911 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
13912 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
13913 (allocate_vectorlike, make_pure_vector): Use the new macros,
13914 plus offsetof, to remove unportable assumptions about struct layout.
13915 These assumptions hold on all porting targets that I know of, but
13916 they are not guaranteed, they're easy to remove, and removing them
13917 makes further changes easier.
13918
0b432f21
PE
13919 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
13920 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
13921 (string_overrun_cookie): Now const. Use initializers that
13922 don't formally overflow signed char, to avoid warnings.
000098c1
PE
13923 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
13924 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
13925 (allocate_buffer): Don't assume sizeof (struct buffer) is a
13926 multiple of sizeof (EMACS_INT); it need not be, if
13927 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 13928 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 13929
895009e1
JB
139302011-04-26 Juanma Barranquero <lekktu@gmail.com>
13931
13932 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
13933
6a7a1b0b
TZ
139342011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
13935
13936 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 13937 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
13938 Reported by Paul Eggert <eggert@cs.ucla.edu>.
13939
841a1577 139402011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
13941
13942 * lisp.h (Qdebug): List symbol.
895009e1 13943 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
13944 * keyboard.c (debug-on-event): New variable.
13945 (handle_user_signal): Break into debugger when debug-on-event
13946 matches the current signal symbol.
13947
f2d3ba6f
DN
139482011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
13949
13950 * alloc.c (check_sblock, check_string_bytes)
13951 (check_string_free_list): Convert to standard C.
13952
42ce4c63
TZ
139532011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
13954
13955 * w32.c (emacs_gnutls_push): Fix typo.
13956
825cd63c
EZ
139572011-04-25 Eli Zaretskii <eliz@gnu.org>
13958
fb11d64d
EZ
13959 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
13960 "cast to pointer from integer of different size".
13961
825cd63c
EZ
13962 Improve doprnt and its use in verror. (Bug#8545)
13963 * doprnt.c (doprnt): Document the set of format control sequences
13964 supported by the function. Use SAFE_ALLOCA instead of always
13965 using `alloca'.
13966
13967 * eval.c (verror): Don't limit the buffer size at size_max-1, that
13968 is one byte too soon. Don't use xrealloc; instead xfree and
13969 xmalloc anew.
13970
e061a11b
TZ
139712011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
13972
13973 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
13974 callbacks stage.
13975
13976 * gnutls.c: Renamed global_initialized to
13977 gnutls_global_initialized. Added internals for the
13978 :verify-hostname-error, :verify-error, and :verify-flags
13979 parameters of `gnutls-boot' and documented those parameters in the
13980 docstring. Start callback support.
9173deec
JB
13981 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
13982 unless a fatal error occurred. Call gnutls_alert_send_appropriate
13983 on error. Return error code.
e061a11b
TZ
13984 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
13985 (emacs_gnutls_read): Likewise.
13986 (Fgnutls_boot): Return handshake error code.
13987 (emacs_gnutls_handle_error): New function.
13988 (wsaerror_to_errno): Likewise.
13989
13990 * w32.h (emacs_gnutls_pull): Add prototype.
13991 (emacs_gnutls_push): Likewise.
13992
13993 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
13994 (emacs_gnutls_push): Likewise.
13995
139962011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
13997
13998 * process.c (wait_reading_process_output): Check if GnuTLS
13999 buffered some data internally if no FDs are set for TLS
14000 connections.
14001
14002 * makefile.w32-in (OBJ2): Add gnutls.$(O).
14003 (LIBS): Link to USER_LIBS.
14004 ($(BLD)/gnutls.$(0)): New target.
14005
fa6996bc
EZ
140062011-04-24 Eli Zaretskii <eliz@gnu.org>
14007
eb35682e
EZ
14008 * xdisp.c (handle_single_display_spec): Rename the
14009 display_replaced_before_p argument into display_replaced_p, to
14010 make it consistent with the commentary. Fix typos in the
14011 commentary.
14012
e2ad650c
EZ
14013 * textprop.c (syms_of_textprop): Remove dead code.
14014 (copy_text_properties): Delete obsolete commentary about an
14015 interface that was deleted long ago. Fix typos in the description
14016 of arguments.
14017
1b2de274
EZ
14018 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
14019 to changes in oldXMenu/XMenu.h from 2011-04-16.
14020 <menu_help_message, prev_menu_help_message>: Constify.
14021 (IT_menu_make_room): menu->help_text is now `const char **';
14022 adjust.
14023
14024 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
14025 to changes in oldXMenu/XMenu.h from 2011-04-16.
14026 (struct XMenu): Declare `help_text' `const char **'.
14027
14028 * xfaces.c <Qunspecified>: Make extern again.
14029
14030 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 14031 required by POSIX.
1b2de274 14032
762b15be
EZ
14033 * doc.c (get_doc_string): Improve the format passed to `error'.
14034
14035 * doprnt.c (doprnt): Improve commentary.
14036
14037 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
14038
14039 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
14040 them with etags.
14041
f1052e5d
EZ
14042 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
14043 changes in globals.h immediately force recompilation.
762b15be
EZ
14044 (TAGS): Depend on $(CURDIR)/m/intel386.h and
14045 $(CURDIR)/s/ms-w32.h.
14046 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 14047
fa6996bc
EZ
14048 * character.c (Fchar_direction): Function deleted.
14049 (syms_of_character): Don't defsubr it.
14050 <char-direction-table>: Deleted.
14051
e6c3da20
EZ
140522011-04-23 Eli Zaretskii <eliz@gnu.org>
14053
14054 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
14055 * doprnt.c: Include limits.h.
14056 (SIZE_MAX): New macro.
04f2d78b
CB
14057 (doprnt): Return a size_t value. 2nd arg is now size_t.
14058 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
14059 Improve overflow protection. Support `l' modifier for integer
14060 conversions. Support %l conversion. Don't assume an EMACS_INT
14061 argument for integer conversions and for %c.
14062
14063 * lisp.h (doprnt): Restore prototype.
14064
14065 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
14066 $(SRC)/character.h.
14067
14068 * Makefile.in (base_obj): Add back doprnt.o.
14069
14070 * deps.mk (doprnt.o): Add back prerequisites.
14071 (callint.o): Depend on character.h.
14072
14073 * eval.c (internal_lisp_condition_case): Include the handler
14074 representation in the error message.
14075 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
14076 when breaking from the loop.
14077
14078 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
14079
14080 * callint.c (Fcall_interactively): When displaying error message
14081 about invalid control letter, pass the character's codepoint, not
14082 a pointer to its multibyte form. Improve display of the character
14083 in octal and display also its hex code.
14084
14085 * character.c (char_string): Use %x to display the (unsigned)
14086 codepoint of an invalid character, to avoid displaying a bogus
14087 negative value.
14088
14089 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
14090 `error', not SYMBOL_NAME itself.
14091
14092 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
14093 character arguments to `error'.
14094
14095 * charset.c (check_iso_charset_parameter): Fix incorrect argument
14096 to `error' in error message about FINAL_CHAR argument. Make sure
14097 FINAL_CHAR is a character, and use %c when it is passed as
14098 argument to `error'.
14099
4ffd0d6b 141002011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
14101
14102 * s/ms-w32.h (localtime): Redirect to sys_localtime.
14103
14104 * w32.c: Include <time.h>.
14105 (sys_localtime): New function.
14106
4ffd0d6b 141072011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
14108
14109 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
14110
4ffd0d6b 14111 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 14112
4ffd0d6b 141132011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 14114
4ffd0d6b
GM
14115 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
14116 zombies (Bug#8467).
aac0c6e3 14117
04c56954
EZ
141182011-04-19 Eli Zaretskii <eliz@gnu.org>
14119
14120 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
14121 gl_state.e_property when gl_state.object is Qt.
14122
14123 * insdel.c (make_gap_larger): Remove limitation of buffer size
14124 to <= INT_MAX.
14125
16a43933
CY
141262011-04-18 Chong Yidong <cyd@stupidchicken.com>
14127
14128 * xdisp.c (lookup_glyphless_char_display)
14129 (produce_glyphless_glyph): Handle cons cell entry in
14130 glyphless-char-display.
14131 (Vglyphless_char_display): Document it.
14132
14133 * term.c (produce_glyphless_glyph): Handle cons cell entry in
14134 glyphless-char-display.
14135
4581706e
CY
141362011-04-17 Chong Yidong <cyd@stupidchicken.com>
14137
14138 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
14139
14140 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
14141
14142 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
14143 definition for no-X builds.
14144
4887c6e2 141452011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 14146
fd35b6f9
PE
14147 Static checks with GCC 4.6.0 and non-default toolkits.
14148
5c1ccb01
PE
14149 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
14150
006c5daa
PE
14151 * process.c (keyboard_bit_set): Define only if SIGIO.
14152 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
14153 (send_process): Repair possible setjmp clobbering.
14154
efc736d3
PE
14155 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
14156
4e2fe2e6
PE
14157 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
14158
f97334a2
PE
14159 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
14160
4e75f29d
PE
14161 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
14162 Define only if needed.
14163
90efadd1
PE
14164 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
14165 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 14166 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 14167
3c647824
PE
14168 * dispextern.h (struct redisplay_interface): Rename param
14169 to avoid shadowing.
e264f262 14170 * termhooks.h (struct terminal): Likewise.
761383f4 14171 * xterm.c (xembed_send_message): Likewise.
3c647824 14172
b58c5c4a
PE
14173 * insdel.c (make_gap_smaller): Define only if
14174 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
14175
cad59032
PE
14176 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
14177 it.
14178
c339dc2e
PE
14179 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
14180 so that we aren't warned about unused symbols.
14181
91a3e27b
PE
14182 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
14183
399c71d3 14184 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 14185
8ffc96f5
PE
14186 * xfns.c (x_real_positions): Mark locals as initialized.
14187
eef9bc79
PE
14188 * xmenu.c (xmenu_show): Don't use uninitialized vars.
14189
098db9dd
PE
14190 * xterm.c: Fix problems found by static analysis with other toolkits.
14191 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
14192 (x_dispatch_event): Declare static if USE_GTK, and
14193 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 14194 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 14195 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
14196 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
14197 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 14198
eb18f6cc
PE
14199 * xmenu.c (menu_help_callback): Pointer type fixes.
14200 Use const pointers when pointing at readonly data. Avoid pointer
14201 signedness clashes.
14202 (FALSE): Remove unused macro.
14203 (update_frame_menubar): Remove unused decl.
14204
1fe72bf8
PE
14205 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
14206
60d9e1db
PE
14207 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
14208 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
14209 (single_menu_item): Rename local to avoid shadowing.
14210
39261c26
PE
14211 * keyboard.c (make_lispy_event): Remove unused local var.
14212
018c5e19
PE
14213 * frame.c, frame.h (x_get_resource_string): Bring this back, but
14214 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
14215
63d2b86e
PE
14216 * bitmaps: Change bitmaps from unsigned char back to the X11
14217 compatible char. Avoid the old compiler warnings about
14218 out-of-range initializers by using, for example, '\xab' rather
14219 than 0xab.
14220
aefd87e1
PE
14221 * xgselect.c (xgselect_initialize): Check vs interface
14222 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
14223
bf501fb9
PE
14224 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
14225
e9829fdf
PE
14226 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
14227 to read-only memory.
14228
1086c095
PE
14229 * fns.c (vector): Remove; this old hack is no longer needed.
14230
2baccd04 14231 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 14232 Remove unused var.
dde42981 14233 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 14234
72391843 14235 * xrdb.c (x_load_resources): Omit unused local.
3565b346 14236
436c16df 14237 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 14238 (x_window): Rename locals to avoid shadowing.
dc5ddd85 14239 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 14240
92bb796d 14241 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 14242 (x_term_init): Remove local to avoid shadowing.
92bb796d 14243
764430a3 14244 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
14245
14246 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
14247 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
14248
d1dfb56c
EZ
142492011-04-16 Eli Zaretskii <eliz@gnu.org>
14250
c4354cb4
EZ
14251 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
14252
d1dfb56c
EZ
14253 Fix regex.c, syntax.c and friends for buffers > 2GB.
14254 * syntax.h (struct gl_state_s): Declare character position members
14255 EMACS_INT.
14256
14257 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
14258
04f2d78b
CB
14259 * textprop.c (verify_interval_modification, interval_of):
14260 Declare arguments EMACS_INT.
d1dfb56c
EZ
14261
14262 * intervals.c (adjust_intervals_for_insertion): Declare arguments
14263 EMACS_INT.
14264
14265 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
14266
14267 * indent.c (Fvertical_motion): Local variable it_start is now
14268 EMACS_INT.
14269
14270 * regex.c (re_match, re_match_2, re_match_2_internal)
14271 (bcmp_translate, regcomp, regexec, print_double_string)
14272 (group_in_compile_stack, re_search, re_search_2, regex_compile)
14273 (re_compile_pattern, re_exec): Declare arguments and local
14274 variables `size_t' and `ssize_t' and return values `regoff_t', as
14275 appropriate.
14276 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
14277 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
14278 <compile_stack_type>: `size' and `avail' are now `size_t'.
14279
14280 * regex.h <regoff_t>: Use ssize_t, not int.
14281 (re_search, re_search_2, re_match, re_match_2): Arguments that
14282 specify buffer/string position and length are now ssize_t and
14283 size_t. Return type is regoff_t.
14284
613052cd
BK
142852011-04-16 Ben Key <bkey76@gmail.com>
14286
14287 * nsfont.m: Fixed bugs in ns_get_family and
14288 ns_descriptor_to_entity that were caused by using free to
14289 deallocate memory blocks that were allocated by xmalloc (via
14290 xstrdup). This caused Emacs to crash when compiled with
14291 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
14292 --enable-checking=xmallocoverrun). xfree is now used to
14293 deallocate these memory blocks.
14294
4170f62f 142952011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 14296
71b41406
PE
14297 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
14298
9587a89d
PE
14299 emacs_write: Accept and return EMACS_INT for sizes.
14300 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
14301 et seq.
14302 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
14303 Accept and return EMACS_INT.
14304 (emacs_gnutls_write): Return the number of bytes written on
14305 partial writes.
14306 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
14307 (emacs_read, emacs_write): Remove check for negative size, as the
14308 Emacs source code has been audited now.
9587a89d
PE
14309 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
14310 (emacs_read, emacs_write): Use it.
273a5f82
PE
14311 * process.c (send_process): Adjust to the new signatures of
14312 emacs_write and emacs_gnutls_write. Do not attempt to store
14313 a byte offset into an 'int'; it might overflow.
9587a89d 14314 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 14315
3e047f51
PE
14316 * sound.c: Don't assume sizes fit in 'int'.
14317 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 14318 Return EMACS_INT, not int.
3e047f51 14319 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
14320 Accept EMACS_INT, not int.
14321 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
14322 record read return values.
14323
cc39a9db
BK
143242011-04-15 Ben Key <bkey76@gmail.com>
14325
c9d0ec6d
JB
14326 * keyboard.c (Qundefined): Don't declare static since it is used
14327 in nsfns.m.
14328 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
14329 static since they are used in nsfont.m.
cc39a9db 14330
6c60eb9f
SM
143312011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
14332
14333 * process.c (Qprocessp): Don't declare static.
14334 * lisp.h (Qprocessp): Declare again.
14335
7990b61a
JB
143362011-04-15 Juanma Barranquero <lekktu@gmail.com>
14337
14338 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
14339
5d4cb038
PE
143402011-04-14 Paul Eggert <eggert@cs.ucla.edu>
14341
8bd7b830 14342 Improve C-level modularity by making more things 'static'.
cd64ea1d 14343
e3b27b31
PE
14344 Don't publish debugger-only interfaces to other modules.
14345 * lisp.h (safe_debug_print, debug_output_compilation_hack):
14346 (verify_bytepos, count_markers): Move decls to the only modules
14347 that need them.
14348 * region-cache.h (pp_cache): Likewise.
14349 * window.h (check_all_windows): Likewise.
14350 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
14351
5d4cb038
PE
14352 * sysdep.c (croak): Now static, if
14353 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
14354 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
14355
14356 * alloc.c (refill_memory_reserve): Now static if
14357 !defined REL_ALLOC || defined SYSTEM_MALLOC.
14358 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 14359
e87b6180
PE
14360 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
14361 Define only if USE_LUCID.
14362
ac64929e
PE
14363 * xrdb.c (x_customization_string, x_rm_string): Now static.
14364
6f37259d
PE
14365 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
14366 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
14367
1683e3ab
PE
14368 * xdisp.c (draw_row_with_mouse_face): Now static.
14369 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
14370
de9c2632
PE
14371 * window.h (check_all_windows): Mark externally visible.
14372
2b96acb7
PE
14373 * window.c (window_deletion_count): Now static.
14374
14375 * undo.c: Make symbols static if they're not exported.
14376 (last_undo_buffer, last_boundary_position, pending_boundary):
14377 Now static.
14378
50436f33
PE
14379 * textprop.c (interval_insert_behind_hooks): Now static.
14380 (interval_insert_in_front_hooks): Likewise.
14381
64520e5c
PE
14382 * term.c: Make symbols static if they're not exported.
14383 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
14384 (max_frame_lines, tty_set_terminal_modes):
14385 (tty_reset_terminal_modes, tty_turn_off_highlight):
14386 (get_tty_terminal): Now static.
14387 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
14388 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 14389 HAVE_WINDOW_SYSTEM.
64520e5c
PE
14390 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
14391 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
14392
1fa53021
PE
14393 * sysdep.c: Make symbols static if they're not exported.
14394 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
14395 Now static.
14396 (sigprocmask_set, full_mask): Remove; unused.
14397 (wait_debugging): Mark as visible.
14398 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
14399 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
14400
d4b43b22
PE
14401 * syntax.c (syntax_temp): Define only if !__GNUC__.
14402
b7c513d0
PE
14403 * sound.c (current_sound_device, current_sound): Now static.
14404
989b29ad
PE
14405 * search.c (searchbufs, searchbuf_head): Now static.
14406
13a55a78
PE
14407 * scroll.c (scroll_cost): Remove; unused.
14408 * dispextern.h (scroll_cost): Remove decl.
14409
de68a1fc
PE
14410 * region-cache.h (pp_cache): Mark as externally visible.
14411
40ccffa6
PE
14412 * process.c: Make symbols static if they're not exported.
14413 (process_tick, update_tick, create_process, chan_process):
14414 (Vprocess_alist, proc_buffered_char, datagram_access):
14415 (fd_callback_data, send_process_frame, process_sent_to): Now static.
14416 (deactivate_process): Mark defn as static, as well as decl.
14417 * lisp.h (create_process): Remove decl.
14418 * process.h (chan_process, Vprocess_alist): Remove decls.
14419
ad64fc97
PE
14420 * print.c: Make symbols static if they're not exported.
14421 (print_depth, new_backquote_output, being_printed, print_buffer):
14422 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
14423 (print_interval, print_number_index, initial_stderr_stream):
14424 Now static.
14425 * lisp.h (Fprinc): Remove decl.
14426 (debug_output_compilation_hack): Mark as externally visible.
14427
adddb265
PE
14428 * sysdep.c (croak): Move decl from here to syssignal.h.
14429 * syssignal.h (croak): Put it here, so the API can be checked when
14430 'croak' is called from dissociate_if_controlling_tty.
14431
1717ede2
PE
14432 * minibuf.c: Make symbols static if they're not exported.
14433 (minibuf_save_list, choose_minibuf_frame): Now static.
14434 * lisp.h (choose_minibuf_frame): Remove decl.
14435
fa5fb2bc
PE
14436 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
14437
1e3890d1
PE
14438 * lread.c: Make symbols static if they're not exported.
14439 (read_objects, initial_obarray, oblookup_last_bucket_number):
14440 Now static.
14441 (make_symbol): Remove; unused.
14442 * lisp.h (initial_obarray, make_symbol): Remove decls.
14443
8a1414fa
PE
14444 * keyboard.c: Make symbols static if they're not exported.
14445 (single_kboard, recent_keys_index, total_keys, recent_keys):
14446 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
14447 (this_single_command_key_start, echoing, last_auto_save):
14448 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
14449 (command_loop, echo_now, keyboard_init_hook, help_char_p):
14450 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
14451 (Vlispy_mouse_stem, double_click_count):
14452 Now static.
14453 (force_auto_save_soon): Define only if SIGDANGER.
14454 (ignore_mouse_drag_p): Now static if
14455 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
14456 (print_help): Remove; unused.
14457 (stop_character, last_timer_event): Mark as externally visible.
14458 * keyboard.h (ignore_mouse_drag_p): Declare only if
14459 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
14460 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
14461 * lisp.h (echoing): Remove decl.
14462 (force_auto_save_soon): Declare only if SIGDANGER.
14463 * xdisp.c (redisplay_window): Simplify code, to make it more
14464 obvious that ignore_mouse_drag_p is not accessed if !defined
14465 USE_GTK && !defined HAVE_NS.
14466
93ea6e8f
PE
14467 * intervals.c: Make symbols static if they're not exported.
14468 (merge_properties_sticky, merge_interval_right, delete_interval):
14469 Now static.
14470 * intervals.h (merge_interval_right, delete_interval): Remove decls.
14471
77382fcc
PE
14472 * insdel.c: Make symbols static if they're not exported.
14473 However, leave prepare_to_modify_buffer alone. It's never
14474 called from outside this function, but that appears to be a bug.
14475 (combine_after_change_list, combine_after_change_buffer):
4889fc82 14476 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
14477 (adjust_after_replace_noundo): Remove; unused.
14478 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 14479 (signal_before_change): Remove decls.
77382fcc 14480
9306c32e
PE
14481 * indent.c (val_compute_motion, val_vmotion): Now static.
14482
cd44d2eb
PE
14483 * image.c: Make symbols static if they're not exported.
14484 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
14485 if USE_GTK.
14486 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
14487 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
14488
ad9a7a06
PE
14489 * fringe.c (standard_bitmaps): Now static.
14490 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
14491
81626931
PE
14492 * frame.c: Make symbols static if they're not exported.
14493 (x_report_frame_params, make_terminal_frame): Now static.
14494 (get_frame_param): Now static, unless HAVE_NS.
14495 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
14496 (x_get_resource_string): Remove; not used.
14497 * frame.h (make_terminal_frame, x_report_frame_params):
14498 (x_get_resource_string); Remove decls.
14499 (x_fullscreen_adjust): Declare only if WINDOWSNT.
14500 * lisp.h (get_frame_param): Declare only if HAVE_NS.
14501
239f9db9
PE
14502 * font.c, fontset.c: Make symbols static if they're not exported.
14503 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
14504 (FACE_SUITABLE_FOR_CHAR_P): Use it.
14505 * font.c (font_close_object): Now static.
14506 * font.h (font_close_object): Remove.
14507 * fontset.c (FONTSET_OBJLIST): Remove.
14508 (free_realized_fontset) #if-0 the body, which does nothing.
14509 (face_suitable_for_char_p): #if-0, as it's never called.
14510 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
14511 * xfaces.c (face_at_string_position):
14512 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
14513 since 0 is always ASCII.
14514
dfcf3579
PE
14515 * fns.c (weak_hash_tables): Now static.
14516
5045092b
PE
14517 * fileio.c: Make symbols static if they're not exported.
14518 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
14519 (Vwrite_region_annotation_buffers): Now static.
14520
57a96f5c
PE
14521 * eval.c: Make symbols static if they're not exported.
14522 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
14523 * lisp.h (backtrace_list): Remove decl.
14524
35f08c38
PE
14525 * emacs.c: Make symbols static if they're not exported.
14526 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
14527 (fatal_error_code, fatal_error_signal_hook, standard_args):
14528 Now static.
14529 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
14530 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
14531 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
14532 * lisp.h (fatal_error_signal_hook): Remove decl.
14533 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
14534
f44bd759
PE
14535 * editfns.c: Move a (normally-unused) function to its only use.
14536 * editfns.c, lisp.h (get_operating_system_release): Remove.
14537 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
14538 worth the hassle of breaking this out.
14539
b532497d
PE
14540 * xterm.c: Make symbols static if they're not exported.
14541 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
14542 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
14543 (x_destroy_window, x_delete_display):
14544 Now static.
14545 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
14546 (x_mouse_leave): Remove; unused.
14547 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
14548 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
14549 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
14550 Remove decls.
14551 (x_mouse_leave): Declare only if WINDOWSNT.
14552 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
14553 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
14554 USE_X_TOOLKIT.
14555
1675728f
PE
14556 * ftxfont.c: Make symbols static if they're not exported.
14557 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
14558 HAVE_FREETYPE.
14559 * font.h (ftxfont_driver): Likewise.
14560
e4cebfca
PE
14561 * xfns.c: Make symbols static if they're not exported.
14562 (x_last_font_name, x_display_info_for_name):
14563 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
14564 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
14565 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
14566 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
14567 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
14568 (last_show_tip_args): Now static.
14569 (xic_defaut_fontset, xic_create_fontsetname): Define only if
14570 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
14571 (x_screen_planes): Remove; unused.
14572 * dispextern.h (x_screen_planes): Remove decl.
14573
5bf46f05
PE
14574 * dispnew.c: Make symbols static if they're not exported.
14575 * dispextern.h (redraw_garbaged_frames, scrolling):
14576 (increment_row_positions): Remove.
14577 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
14578 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
14579 Now static.
14580 (redraw_garbaged_frames): Remove; unused.
14581
435f4c28
PE
14582 * xfaces.c: Make symbols static if they're not exported.
14583 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
14584 Remove decls.
14585 * xterm.h (defined_color): Remove decls.
14586 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
14587 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
14588 (menu_face_changed_default, defined_color, free_realized_face):
14589 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
14590 (ascii_face_of_lisp_face): Remove; unused.
14591
8524aef3
PE
14592 * xdisp.c: Make symbols static if they're not exported.
14593 * dispextern.h (scratch_glyph_row, window_box_edges):
14594 (glyph_to_pixel_coords, set_cursor_from_row):
14595 (get_next_display_element, set_iterator_to_next):
14596 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
14597 (show_mouse_face): Remove decls
14598 * frame.h (message_buf_print): Likewise.
14599 * lisp.h (pop_message, set_message, check_point_in_composition):
14600 Likewise.
14601 * xterm.h (set_vertical_scroll_bar): Likewise.
14602 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
14603 (message_buf_print, scratch_glyph_row, displayed_buffer):
14604 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
14605 (get_next_display_element, show_mouse_face, window_box_edges):
14606 (frame_to_window_pixel_xy, check_point_in_composition):
14607 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
14608 (glyph_to_pixel_coords): Remove; unused.
14609
16390cd2
PE
14610 * dired.c (file_name_completion): Now static.
14611
14612 * dbusbind.c (xd_in_read_queued_messages): Now static.
14613
a25f4dfa
PE
14614 * lisp.h (circular_list_error, FOREACH): Remove; unused.
14615 * data.c (circular_list_error): Remove.
14616
14a9c8df
PE
14617 * commands.h (last_point_position, last_point_position_buffer):
14618 (last_point_position_window): Remove decls.
14619 * keyboard.c: Make these variables static.
14620
04f2d78b
CB
14621 * coding.h (coding, code_convert_region, encode_coding_gap):
14622 Remove decls.
74ab6df5
PE
14623 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
14624 (iso_code_class, detect_coding, code_convert_region): Now static.
14625 (encode_coding_gap): Remove; unused.
14626
38dfbee1
PE
14627 * chartab.c (chartab_chars, chartab_bits): Now static.
14628
a2cb4e63
PE
14629 * charset.h (charset_iso_8859_1): Remove decl.
14630 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
14631 Now static.
14632
127198fd
PE
14633 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
14634 * ccl.c (Vccl_program_table): Now static.
14635 (check_ccl_update): Remove; unused.
14636
d85b608f
PE
14637 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
14638 * category.h: ... from here.
14639 * category.c (check_category_table, set_category_set): Now static.
14640
31cd66f3
PE
14641 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
14642 * lisp.h: Remove these decls.
14643
c358e587
PE
14644 * buffer.c (buffer_count): Remove unused var.
14645
e78aecca
PE
14646 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
14647 so that it's not optimized away.
14648 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
14649 * dispextern.h (bidi_dump_cached_states): Remove, since it's
14650 exported only to the debugger.
14651
e192d7d3 14652 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 14653 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 14654
92470028
PE
14655 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
14656 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
14657 was inaccessible from Lisp.
14658 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
14659 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
14660
244ed907
PE
14661 alloc.c: Import and export fewer symbols, and remove unused items.
14662 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
14663 is defined.
14664 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
14665 it's not optimized away by whole-program optimization.
14666 (message_enable_multibyte, free_misc): Remove.
14667 (catchlist, handlerlist, mark_backtrace):
14668 Declare only if BYTE_MARK_STACK.
14669 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
14670 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
14671 (message_enable_multibyte): Remove decl.
14672 (free_misc, interval_free_list, float_block, float_block_index):
14673 (n_float_blocks, float_free_list, cons_block, cons_block_index):
14674 (cons_free_list, last_marked_index):
14675 Now static.
14676 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
14677 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
14678 (mark_backtrace): Define only if BYTE_MARK_STACK.
14679 * xdisp.c (message_enable_multibyte): Now static.
14680
61c2b50e 14681 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
14682 This makes it easier for human readers (and static analyzers)
14683 to see whether these variables are used from other modules.
14684 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
14685 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
14686 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
14687 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
14688 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
14689 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
14690 * xmenu.c, xselect.c:
14691 Declare Q* vars static if they are not used in other modules.
14692 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
14693 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
14694 Remove decls of unexported vars.
14695 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
14696
95c82688
PE
14697 * lisp.h (DEFINE_FUNC): Make sname 'static'.
14698
16a97296
PE
14699 Make Emacs functions such as Fatom 'static' by default.
14700 This makes it easier for human readers (and static analyzers)
14701 to see whether these functions can be called from other modules.
14702 DEFUN now defines a static function. To make the function external
14703 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
14704 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
14705 (Finit_image_library):
16a97296
PE
14706 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
14707 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
14708 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
14709 Remove decls, since these functions are now static.
14710 (Funintern, Fget_internal_run_time): New decls, since these functions
14711 were already external.
95c82688 14712
16a97296
PE
14713 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
14714 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
14715 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
14716 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
14717 * keyboard.c, keymap.c, lread.c:
14718 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
14719 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
14720 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
14721 Mark functions with DEFUE instead of DEFUN,
14722 if they are used in other modules.
14723 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
14724 decls for now-static functions.
14725 * buffer.h (Fdelete_overlay): Remove decl.
14726 * callproc.c (Fgetenv_internal): Mark as internal.
14727 * composite.c (Fremove_list_of_text_properties): Remove decl.
14728 (Fcomposition_get_gstring): New forward static decl.
14729 * composite.h (Fcomposite_get_gstring): Remove decl.
14730 * dired.c (Ffile_attributes): New forward static decl.
14731 * doc.c (Fdocumntation_property): New forward static decl.
14732 * eval.c (Ffetch_bytecode): New forward static decl.
14733 (Funintern): Remove extern decl; now in .h file where it belongs.
14734 * fileio.c (Fmake_symbolic_link): New forward static decl.
14735 * image.c (Finit_image_library): New forward static decl.
14736 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
14737 * intervals.h (Fprevious_property_change):
14738 (Fremove_list_of_text_properties): Remove decls.
14739 * keyboard.c (Fthis_command_keys): Remove decl.
14740 (Fcommand_execute): New forward static decl.
14741 * keymap.c (Flookup_key): New forward static decl.
14742 (Fcopy_keymap): Now static.
14743 * keymap.h (Flookup_key): Remove decl.
14744 * process.c (Fget_process): New forward static decl.
14745 (Fprocess_datagram_address): Mark as internal.
14746 * syntax.c (Fsyntax_table_p): New forward static decl.
14747 (skip_chars): Remove duplicate decl.
14748 * textprop.c (Fprevious_property_change): New forward static decl.
14749 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
14750 Now internal.
14751 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
14752 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
14753
785bbd42
PE
14754 * editfns.c (Fformat): Remove unreachable code.
14755
8b913b57
AS
147562011-04-14 Andreas Schwab <schwab@linux-m68k.org>
14757
14758 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
14759 change. (Bug#8496)
14760
a6744a35
EZ
147612011-04-13 Eli Zaretskii <eliz@gnu.org>
14762
14763 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
14764 when at ZV. (Bug#8487)
14765
e7974947
AS
147662011-04-12 Andreas Schwab <schwab@linux-m68k.org>
14767
baad03f0
AS
14768 * charset.c (Fclear_charset_maps): Use xfree instead of free.
14769 (Bug#8437)
14770 * keyboard.c (parse_tool_bar_item): Likewise.
14771 * sound.c (sound_cleanup, alsa_close): Likewise.
14772 * termcap.c (tgetent): Likewise.
14773 * xfns.c (x_default_font_parameter): Likewise.
14774 * xsettings.c (read_and_apply_settings): Likewise.
14775
e7974947
AS
14776 * alloc.c (overrun_check_malloc, overrun_check_realloc)
14777 (overrun_check_free): Protoize.
14778
28272684
PE
147792011-04-12 Paul Eggert <eggert@cs.ucla.edu>
14780
14781 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
14782 since callers should never pass a negative size.
14783 Change the signature to match that of plain 'read' and 'write'; see
14784 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
14785 * lisp.h: Update prototypes of emacs_write and emacs_read.
14786
11997c76
EZ
147872011-04-11 Eli Zaretskii <eliz@gnu.org>
14788
14789 * xdisp.c (redisplay_window): Don't try to determine the character
14790 position of the scroll margin if the window start point w->startp
e896f03c 14791 is outside the buffer's accessible region. (Bug#8468)
11997c76 14792
8a2cbd72
EZ
147932011-04-10 Eli Zaretskii <eliz@gnu.org>
14794
14795 Fix write-region and its subroutines for buffers > 2GB.
14796 * fileio.c (a_write, e_write): Modify declaration of arguments and
14797 local variables to support buffers larger than 2GB.
14798 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
14799
14800 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
14801 argument, local variables, and return value.
14802
14803 * lisp.h: Update prototypes of emacs_write and emacs_read.
14804
14805 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
14806
4073e537 148072011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 14808
1ebfdcb6
PE
14809 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
14810
b2ded58d
PE
14811 Fix more problems found by GCC 4.6.0's static checks.
14812
7d66342c
PE
14813 * xdisp.c (vmessage): Use a better test for character truncation.
14814
bbf47d44
PE
14815 * charset.c (load_charset_map): <, not <=, for optimization,
14816 and to avoid potential problems with integer overflow.
9248994d 14817 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 14818 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 14819 * editfns.c (Fformat): Likewise.
1e69125e 14820 * syntax.c (skip_chars): Likewise.
3befa583 14821
e3019616
PE
14822 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
14823 This also lets GCC 4.6.0 generate slightly better loop code.
14824
becfa255
PE
14825 * callint.c (Fcall_interactively): <, not <=, for optimization.
14826 (Fcall_interactively): Count the number of arguments produced,
14827 not the number of arguments given. This is simpler and lets GCC
14828 4.6.0 generate slightly better code.
14829
dae0cd48
PE
14830 * ftfont.c: Distingish more carefully between FcChar8 and char.
14831 The previous code passed unsigned char * to a functions like
14832 strlen and xstrcasecmp that expect char *, which does not
14833 conform to the C standard.
14834 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
14835 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
14836 char * when the C standard requires it.
14837
76032d70
PE
14838 * keyboard.c (read_char): Remove unused var.
14839
eb3f1cc8
PE
14840 * eval.c: Port to Windows vsnprintf (Bug#8435).
14841 Include <limits.h>.
14842 (SIZE_MAX): Define if the headers do not.
14843 (verror): Do not give up if vsnprintf returns a negative count.
14844 Instead, grow the buffer. This ports to Windows vsnprintf, which
14845 does not conform to C99. Problem reported by Eli Zaretskii.
14846 Also, simplify the allocation scheme, by avoiding the need for
14847 calling realloc, and removing the ALLOCATED variable.
14848
70476b54
PE
14849 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
14850
12020a9e
PE
14851 Remove invocations of doprnt, as Emacs now uses vsnprintf.
14852 But keep the doprint source code for now, as we might revamp it
14853 and use it again (Bug#8435).
ea6c7ae6
PE
14854 * lisp.h (doprnt): Remove.
14855 * Makefile.in (base_obj): Remove doprnt.o.
14856 * deps.mk (doprnt.o): Remove.
14857
5fdb398c
PE
14858 error: Print 32- and 64-bit integers portably (Bug#8435).
14859 Without this change, on typical 64-bit hosts error ("...%d...", N)
14860 was used to print both 32- and 64-bit integers N, which relied on
14861 undefined behavior.
61bdb816 14862 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
14863 * lisp.h (error, verror): Mark as printf-like functions.
14864 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
14865 Report overflow in size calculations when allocating printf buffer.
14866 Do not truncate output string at its first null byte.
14867 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
14868 Truncate the output at a character boundary, since vsnprintf does not
14869 do that.
14870 * charset.c (check_iso_charset_parameter): Convert internal
14871 character to string before calling 'error', since %c now has the
14872 printf meaning.
14873 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
14874 overflow when computing char to be passed to 'error'. Do not
14875 pass Lisp_Object to 'error'; pass the integer instead.
14876 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
14877 formatted with plain %d.
14878
b189fa66
PE
14879 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
14880
bff87ef0
PE
14881 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
14882
7e2cac20
PE
14883 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
14884
ce4d90b5
PE
14885 * xterm.c (x_catch_errors): Remove duplicate declaration.
14886
266c9547
PE
14887 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
14888
79c49ad2
PE
14889 * xdisp.c, lisp.h (message_nolog): Remove; unused.
14890
368f4090
JM
148912011-04-10 Jim Meyering <meyering@redhat.com>
14892
14893 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
14894 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
14895 return ssize_t not "int", and use size_t as the buffer length.
14896 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
14897 * gnutls.h: Update declarations.
14898 * process.c (read_process_output): Use ssize_t, to match.
14899 (send_process): Likewise.
14900
a32d4040
CY
149012011-04-09 Chong Yidong <cyd@stupidchicken.com>
14902
14903 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
14904
8546720e 149052011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 14906
04f2d78b
CB
14907 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
14908 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 14909
8546720e
GM
14910 * xterm.c (handle_one_xevent):
14911 * xmenu.c (create_and_show_popup_menu):
14912 * xselect.c (x_decline_selection_request)
14913 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 14914
0a2f5c1a 149152011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
14916
14917 Fix some uses of `int' instead of EMACS_INT.
14918 * search.c (string_match_1, fast_string_match)
14919 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
14920 (scan_buffer, find_next_newline_no_quit)
14921 (find_before_next_newline, search_command, Freplace_match)
14922 (Fmatch_data): Make some `int' variables be EMACS_INT.
14923
14924 * xdisp.c (display_count_lines): 3rd argument and return value now
14925 EMACS_INT. All callers changed.
14926 (pint2hrstr): Last argument is now EMACS_INT.
14927
14928 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
14929 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
14930 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
14931 (decode_coding_utf_16, decode_coding_emacs_mule)
14932 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
14933 (decode_coding_ccl, decode_coding_charset)
14934 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
14935 (decode_coding_iso_2022, decode_coding_emacs_mule)
14936 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
14937 <char_offset, last_offset>: Declare EMACS_INT.
14938 (encode_coding_utf_8, encode_coding_utf_16)
14939 (encode_coding_emacs_mule, encode_invocation_designation)
14940 (encode_designation_at_bol, encode_coding_iso_2022)
14941 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
14942 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
14943 Declare EMACS_INT.
14944 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
14945 (encode_invocation_designation): Last argument P_NCHARS is now
14946 EMACS_INT.
14947 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
14948 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
14949
14950 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
14951 All users changed.
14952
14953 * ccl.c (Fccl_execute_on_string): Declare some variables
14954 EMACS_INT.
14955
8546720e 149562011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
14957
14958 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
14959
4e19a977
CS
149602011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
14961
14962 * process.c (Fformat_network_address): Doc fix.
14963
87302331
R
149642011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
14965
ee7683eb 14966 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 14967
cbb59342
CY
149682011-04-08 Chong Yidong <cyd@stupidchicken.com>
14969
14970 * keyboard.c (read_char): Call Lisp function help-form-show,
14971 instead of using internal_with_output_to_temp_buffer.
14972 (Qhelp_form_show): New var.
e0d38eeb 14973 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
14974
14975 * print.c (internal_with_output_to_temp_buffer): Function deleted.
14976
14977 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
14978
e67a13ab
CY
149792011-04-06 Chong Yidong <cyd@stupidchicken.com>
14980
04f2d78b
CB
14981 * process.c (Flist_processes): Remove to Lisp.
14982 (list_processes_1): Delete.
e67a13ab 14983
973f782d
EZ
149842011-04-06 Eli Zaretskii <eliz@gnu.org>
14985
7c106b1e
EZ
14986 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
14987
973f782d
EZ
14988 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
14989
41cf7d1a 149902011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 14991
ca23cc88
PE
14992 Fix more problems found by GCC 4.6.0's static checks.
14993
f390e2d5
PE
14994 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
14995
42eea0d0
PE
14996 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
14997
b69769da 14998 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 14999
f9541e84
PE
15000 * xdisp.c (vmessage): Mark as a printf-like function.
15001
13841b55
PE
15002 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
15003
c136c10f
PE
15004 * sound.c (sound_warning): Don't crash if arg contains a printf format.
15005
5e2d4a30
PE
15006 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
15007 printf-like functions.
15008 (tiff_load): Add casts to remove these marks before passing them
15009 to system-supplied API.
15010
583f48b9
PE
15011 * eval.c (Fsignal): Remove excess argument to 'fatal'.
15012
b25d760e
PE
15013 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
15014 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
15015 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
15016 directly, rather than having caller test rule sign. This avoids
15017 some unnecessary tests.
15018 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
15019 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
15020 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 15021
bc7b6697 15022 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 15023 (xfont_open): Avoid unnecessary tests.
bc7b6697 15024
27ccc379
PE
15025 * composite.c (composition_gstring_put_cache): Use unsigned integer.
15026
dcd5c89a
PE
15027 * composite.h, composite.c (composition_gstring_put_cache):
15028 Use EMACS_INT, not int, for length.
15029
b13a45c6
PE
15030 * composite.h (COMPOSITION_DECODE_REFS): New macro,
15031 breaking out part of COMPOSITION_DECODE_RULE.
15032 (COMPOSITION_DECODE_RULE): Use it.
15033 * composite.c (get_composition_id): Remove unused local vars,
15034 by using the new macro.
15035
1e792e4d
PE
15036 * textprop.c (set_text_properties_1): Change while to do-while,
15037 since the condition is always true at first.
15038
dc6c6455 15039 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
15040 (interval_deletion_adjustment): Return unsigned value.
15041 All uses changed.
dc6c6455 15042
aba7731a
PE
15043 * process.c (list_processes_1, create_pty, read_process_output):
15044 (exec_sentinel): Remove vars that were set but not used.
afd4052b 15045 (create_pty): Remove unnecessary "volatile"s.
bc57d757 15046 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 15047 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 15048 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 15049
fdfc4bf3
PE
15050 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
15051
fca8fe46 15052 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 15053 (update_syntax_table): Use unsigned instead of int.
fca8fe46 15054
06a0259a 15055 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 15056 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 15057 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 15058
e7b9e80f
PE
15059 * print.c (print_error_message): Avoid int overflow.
15060
56201685
PE
15061 * font.c (font_list_entities): Redo for clarity,
15062 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
15063
78834453 15064 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 15065 (font_score): Avoid potential overflow in diff calculation.
78834453 15066
0bc0b309 15067 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 15068 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 15069
e610eaca
PE
15070 * eval.c (funcall_lambda): Rename local to avoid shadowing.
15071
b895abce
PE
15072 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
15073 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
15074 can always succeed if overflow has undefined behavior.
15075
1f1d9321 15076 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 15077 (wordify): Omit three unnecessary tests.
1f1d9321 15078
c59478bc
PE
15079 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
15080 All callers changed. This avoids the need for an unused var.
15081
79b73827
PE
15082 * casefiddle.c (casify_region): Remove var that is set but not used.
15083
a4db5dfe
PE
15084 * dired.c (file_name_completion): Remove var that is set but not used.
15085
43aae36e
PE
15086 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
15087
2a47c44d 15088 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 15089 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 15090
a37c69bf
PE
15091 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
15092 Check for integer overflow on size calculations.
15093
328ab8e7
PE
15094 * buffer.c (Fprevious_overlay_change): Remove var that is set
15095 but not used.
15096
e5a2a5cb
PE
15097 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
15098 Remove vars that are set but not used.
8d84a6eb 15099 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 15100 (timer_check_2): Mark vars as initialized.
e5a2a5cb 15101
a60e5f68
PE
15102 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
15103
f661cb61 15104 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 15105 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 15106
f0397f5a
PE
15107 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
15108 that are set but not used.
15109
8664db06 15110 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 15111 if XCreateBitmapFromData fails (Bug#8410).
8664db06 15112
6abdaa4a
PE
15113 * xselect.c (x_get_local_selection, x_handle_property_notify):
15114 Remove vars that are set but not used.
15115
0ce7538d 15116 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 15117 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 15118
9ae848fc
PE
15119 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
15120 Remove var that is set but not used.
0b918413
PE
15121 (scroll_bar_windows_size): Now size_t, not int.
15122 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
15123 Check for overflow.
9ae848fc 15124
a5a62657
PE
15125 * xfaces.c (realize_named_face): Remove vars that are set but not used.
15126 (map_tty_color) [!defined MSDOS]: Likewise.
15127
5c5cdd39
PE
15128 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
15129
66ebf983
PE
15130 * coding.c: Remove vars that are set but not used.
15131 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
15132 All callers changed.
15133 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
15134 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
15135 (decode_coding_charset): Remove vars that are set but not used.
15136
1be4d761
PE
15137 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
15138 that is set but not used.
15139
47553fa8
PE
15140 * print.c (print_object): Remove var that is set but not used.
15141
1f7196bf 15142 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
15143 The gnulib version avoids calling malloc in the usual case,
15144 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
15145 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
15146 * filelock.c (current_lock_owner): Likewise.
15147 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
15148 * sysdep.c: Include allocator.h, careadlinkat.h.
15149 (emacs_no_realloc_allocator): New static constant.
15150 (emacs_readlink): New function.
fdb61804
PE
15151 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
15152 ../lib/careadlinkat.h.
d1fdcab7 15153
f84c17c7
SM
151542011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
15155
15156 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
15157 first non-nil return value).
15158
ef3862ad
JD
151592011-04-03 Jan Djärv <jan.h.d@swipnet.se>
15160
15161 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
15162 if not defined (Bug#8403).
15163
376a7006
JB
151642011-04-02 Juanma Barranquero <lekktu@gmail.com>
15165
15166 * xdisp.c (display_count_lines): Remove parameter `start',
15167 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
15168 (get_char_face_and_encoding): Remove parameter `multibyte_p',
15169 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15170 (fill_stretch_glyph_string): Remove parameters `row' and `area',
15171 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
15172 and thereabouts. All callers changed.
15173 (get_per_char_metric): Remove parameter `f', unused since
15174 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15175
6ca3801d
JM
151762011-04-02 Jim Meyering <meyering@redhat.com>
15177
15178 do not dereference NULL upon failed strdup
15179 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
15180 (ns_get_family): Likewise.
15181
d8e2b5ba
JB
151822011-04-02 Juanma Barranquero <lekktu@gmail.com>
15183
15184 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
15185
8c74fcbd
JD
151862011-04-02 Jan Djärv <jan.h.d@swipnet.se>
15187
15188 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
15189 later (Bug#8403).
15190
7200d79c
SM
151912011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
15192
03408648 15193 Add lexical binding.
7200d79c 15194
03408648
SM
15195 * window.c (Ftemp_output_buffer_show): New fun.
15196 (Fsave_window_excursion):
15197 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
15198
15199 * lread.c (lisp_file_lexically_bound_p): New function.
15200 (Fload): Bind Qlexical_binding.
15201 (readevalloop): Remove `evalfun' arg.
15202 Bind Qinternal_interpreter_environment.
15203 (Feval_buffer): Bind Qlexical_binding.
15204 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
15205 Mark as dynamic.
15206 (syms_of_lread): Declare `lexical-binding'.
15207
15208 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
15209
15210 * keyboard.c (eval_dyn): New fun.
15211 (menu_item_eval_property): Use it.
ca105506
SM
15212
15213 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 15214
03408648
SM
15215 * fns.c (concat, mapcar1): Accept byte-code-functions.
15216
15217 * eval.c (Fsetq): Handle lexical vars.
15218 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
15219 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
15220 (FletX, Flet): Obey lexical binding.
15221 (Fcommandp): Handle closures.
15222 (Feval): New `lexical' arg.
15223 (eval_sub): New function extracted from Feval. Use it almost
15224 everywhere where Feval was used. Look up vars in lexical env.
15225 Handle closures.
15226 (Ffunctionp): Move from subr.el.
15227 (Ffuncall): Handle closures.
15228 (apply_lambda): Remove `eval_flags'.
15229 (funcall_lambda): Handle closures and new byte-code-functions.
15230 (Fspecial_variable_p): New function.
15231 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
15232 but without exporting it to Lisp.
23aba0ea 15233
23aba0ea 15234 * doc.c (Fdocumentation, store_function_docstring):
03408648 15235 * data.c (Finteractive_form): Handle closures.
23aba0ea 15236
03408648
SM
15237 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
15238 interactive spec.
ba83908c 15239
04f2d78b
CB
15240 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
15241 New byte-codes.
03408648
SM
15242 (exec_byte_code): New function extracted from Fbyte_code to handle new
15243 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 15244
03408648 15245 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 15246
03408648 15247 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 15248
e2abce01
JB
152492011-03-31 Juanma Barranquero <lekktu@gmail.com>
15250
15251 * xdisp.c (redisplay_internal): Fix prototype.
15252
63696a73 152532011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 15254
63696a73 15255 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
15256 (try_scrolling): Use it when setting scroll_limit.
15257 Limit scrolling to 100 screen lines.
63696a73
EZ
15258 (redisplay_window): Even when falling back on "recentering",
15259 position point in the window according to scroll-conservatively,
15260 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
15261
15262 (try_scrolling): When point is above the window, allow searching
15263 as far as scroll_max, or one screenful, to compute vertical
15264 distance from PT to the scroll margin position. This prevents
15265 try_scrolling from unnecessarily failing when
15266 scroll-conservatively is set to a value slightly larger than the
15267 window height. Clean up the case of PT below the margin at bottom
15268 of window: scroll_max can no longer be INT_MAX. When aggressive
15269 scrolling is in use, don't let point enter the opposite scroll
15270 margin as result of the scroll.
15271 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
15272 threshold of 100 lines for never-recentering scrolling.
15273
e4cc2dfc
JB
152742011-03-31 Juanma Barranquero <lekktu@gmail.com>
15275
15276 * dispextern.h (move_it_by_lines):
15277 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
15278 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
15279 (message_log_check_duplicate): Remove parameters `prev_bol' and
15280 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
15281 (redisplay_internal): Remove parameter `preserve_echo_area',
15282 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
15283
15284 * indent.c (Fvertical_motion):
15285 * window.c (window_scroll_pixel_based, Frecenter):
15286 Don't pass `need_y_p' to `move_it_by_lines'.
15287
1c470562
SM
152882011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
15289
44f230aa
SM
15290 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
15291 steal a few bits to be more compact.
15292 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
15293 Remove unneeded casts.
15294
1c470562
SM
15295 * bytecode.c (Fbyte_code): CAR and CDR can GC.
15296
888adce9
ZK
152972011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
15298
15299 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
15300 binding" message (bug#7967).
15301
f838ed7b
PE
153022011-03-30 Paul Eggert <eggert@cs.ucla.edu>
15303
77861b95
PE
15304 Fix more problems found by GCC 4.6.0's static checks.
15305
de6dbc14
PE
15306 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
15307 Remove unused local var.
15308
f838ed7b
PE
15309 * editfns.c (Fmessage_box): Remove unused local var.
15310
792c7b2b
PE
15311 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
15312 (note_mode_line_or_margin_highlight, note_mouse_highlight):
15313 Omit unused local vars.
c499e557 15314 * window.c (shrink_windows): Omit unused local var.
b01a1c29 15315 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
15316 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
15317 Omit unused local var.
15318
ba0165e1
PE
15319 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
15320 Don't assume string length fits in int.
32ad8845 15321 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 15322 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 15323
3c59b4c9
PE
15324 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
15325 instead of alloca (Bug#8344).
15326
a3eed478 15327 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 15328 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 15329
eb4d412d
PE
15330 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
15331
1658b401
PE
15332 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
15333 concerns.
15334
15335 * term.c (produce_glyphless_glyph): Remove unnecessary test.
15336
15337 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 15338
9a2c6e05
PE
15339 * keyboard.c (syms_of_keyboard): Use the same style as later
15340 in this function when indexing through an array. This also
15341 works around GCC bug 48267.
15342
03d0a109
PE
15343 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
15344
44f730c8
PE
15345 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
15346
fe75f926
PE
15347 * chartab.c (sub_char_table_ref_and_range): Redo for slight
15348 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
15349
ffa8c828
PE
15350 * keyboard.c, keyboard.h (num_input_events): Now size_t.
15351 This avoids undefined behavior on integer overflow, and is a bit
15352 more convenient anyway since it is compared to a size_t variable.
15353
c5101a77
PE
15354 Variadic C functions now count arguments with size_t, not int.
15355 This avoids an unnecessary limitation on 64-bit machines, which
15356 caused (substring ...) to crash on large vectors (Bug#8344).
15357 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
15358 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 15359 All variadic functions and their callers changed accordingly.
c5101a77
PE
15360 (struct gcpro.nvars): Now size_t, not int. All uses changed.
15361 * data.c (arith_driver, float_arith_driver): Likewise.
15362 * editfns.c (general_insert_function): Likewise.
15363 * eval.c (struct backtrace.nargs, interactive_p)
15364 (internal_condition_case_n, run_hook_with_args, apply_lambda)
15365 (funcall_lambda, mark_backtrace): Likewise.
15366 * fns.c (concat): Likewise.
15367 * frame.c (x_set_frame_parameters): Likewise.
15368 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
15369 0 if not found, not -1. All callers changed.
15370
dd3f25f7
PE
15371 * alloc.c (garbage_collect): Don't assume stack size fits in int.
15372 (stack_copy_size): Now size_t, not int.
15373 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
15374
461c2ab9
JB
153752011-03-28 Juanma Barranquero <lekktu@gmail.com>
15376
15377 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
15378 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
15379 All callers changed.
15380
15381 * lisp.h (multibyte_char_to_unibyte):
15382 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
15383 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
15384 * character.h (CHAR_TO_BYTE8):
15385 * cmds.c (internal_self_insert):
15386 * editfns.c (general_insert_function):
15387 * keymap.c (push_key_description):
15388 * search.c (Freplace_match):
15389 * xdisp.c (message_dolog, set_message_1): All callers changed.
15390
f6d62986
SM
153912011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
15392
15393 * keyboard.c (safe_run_hook_funcall): New function.
15394 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
15395 don't set the hook to nil, but remove the offending function instead.
15396 (Qcommand_hook_internal): Remove, unused.
15397 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
15398 Vcommand_hook_internal.
15399
15400 * eval.c (enum run_hooks_condition): Remove.
15401 (funcall_nil, funcall_not): New functions.
15402 (run_hook_with_args): Call each function through a `funcall' argument.
15403 Remove `cond' argument, now redundant.
15404 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
15405 (Frun_hook_with_args_until_failure): Adjust accordingly.
15406 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
15407
1db5b1ad
JB
154082011-03-28 Juanma Barranquero <lekktu@gmail.com>
15409
15410 * dispextern.h (string_buffer_position): Remove declaration.
15411
15412 * print.c (strout): Remove parameter `multibyte', unused since
15413 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
15414
15415 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
15416 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
15417 All callers changed.
15418
15419 * w32.c (_wsa_errlist): Use braces for struct initializers.
15420
15421 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
15422 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
15423 All callers changed.
15424 (string_buffer_position): Likewise. Also, make static (it's never
15425 used outside xdisp.c).
15426 (cursor_row_p): Remove parameter `w', unused since
15427 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
15428 (decode_mode_spec): Remove parameter `precision', introduced during
15429 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
15430 All callers changed.
15431
5ffb62aa
JD
154322011-03-27 Jan Djärv <jan.h.d@swipnet.se>
15433
15434 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
15435
461c2ab9 154362011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
15437
15438 * nsterm.m (ns_menu_bar_is_hidden): New variable.
15439 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
15440 (ns_update_auto_hide_menu_bar): New functions.
15441 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
15442 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
15443 ns_constrain_all_frames.
15444 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
15445 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
15446
5c380ffb
JD
154472011-03-27 Jan Djärv <jan.h.d@swipnet.se>
15448
15449 * nsmenu.m (runDialogAt): Remove argument to timer_check.
15450
9af30bdf
GM
154512011-03-27 Glenn Morris <rgm@gnu.org>
15452
15453 * syssignal.h: Replace RETSIGTYPE with void.
15454 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
15455 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
15456 Replace SIGTYPE with void everywhere.
15457 * s/usg5-4-common.h (SIGTYPE): Remove definition.
15458 * s/template.h (SIGTYPE): Remove commented out definition.
15459
e2abce01
JB
154602011-03-26 Eli Zaretskii <eliz@gnu.org>
15461
15462 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
15463 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
15464
f868cd8a
JB
154652011-03-26 Juanma Barranquero <lekktu@gmail.com>
15466
59eb0929
JB
15467 * w32.c (read_unc_volume): Use parameter `henum', instead of
15468 global variable `wget_enum_handle'.
15469
15470 * keymap.c (describe_vector): Remove parameters `indices' and
15471 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
15472 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
15473
f868cd8a
JB
15474 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
15475
15476 * keyboard.c (timer_check): Remove parameter `do_it_now',
15477 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
15478 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
15479 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
15480
15481 * keyboard.c (read_char):
15482 * w32menu.c (w32_menu_display_help):
15483 * xmenu.c (show_help_event, menu_help_callback):
15484 Adjust calls to `show_help_echo'.
15485
15486 * gtkutil.c (xg_maybe_add_timer):
15487 * keyboard.c (readable_events):
15488 * process.c (wait_reading_process_output):
15489 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
15490
15491 * insdel.c (adjust_markers_gap_motion):
15492 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
15493 (gap_left, gap_right): Don't call it.
15494
2ecf6fdb
CY
154952011-03-25 Chong Yidong <cyd@stupidchicken.com>
15496
15497 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
15498 incurred during fontification.
15499
6b1f9ba4
JB
155002011-03-25 Juanma Barranquero <lekktu@gmail.com>
15501
15502 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
15503 (DEFVAR_PER_BUFFER): Don't pass it.
15504
15505 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
15506 (scrolling_window): Don't pass it.
15507
0f4a96b5
JB
155082011-03-25 Juanma Barranquero <lekktu@gmail.com>
15509
15510 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
15511
15512 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
15513 and `suffix'.
15514 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
15515 of variables specific to SELinux and computation of `encoded_absname'.
15516
15517 * image.c (XPutPixel): Remove unused variable `height'.
15518
15519 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
15520
15521 * unexw32.c (get_section_info): Remove unused variable `section'.
15522
15523 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
15524 (system_process_attributes): Remove unused variable `sess'.
15525 (sys_read): Remove unused variable `err'.
15526
15527 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
15528 (w32_wnd_proc): Remove unused variable `isdead'.
15529 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
15530 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
15531 (x_create_tip_frame): Remove unused variable `tem'.
15532
15533 * w32inevt.c (w32_console_read_socket):
15534 Remove unused variable `no_events'.
15535
15536 * w32term.c (x_draw_composite_glyph_string_foreground):
15537 Remove unused variable `width'.
15538
1149507c
JB
155392011-03-24 Juanma Barranquero <lekktu@gmail.com>
15540
15541 * w32term.c (x_set_glyph_string_clipping):
15542 Don't pass uninitialized region to CombineRgn.
15543
9c88f339
JB
155442011-03-23 Juanma Barranquero <lekktu@gmail.com>
15545
15546 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
15547 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
15548 (Fx_close_connection): Remove unused variable `i'.
15549
15550 * w32font.c (w32font_draw): Return number of glyphs.
15551 (w32font_open_internal): Remove unused variable `i'.
15552 (w32font_driver): Add missing initializer.
15553
15554 * w32menu.c (utf8to16): Remove unused variable `utf16'.
15555 (fill_in_menu): Remove unused variable `items_added'.
15556
15557 * w32term.c (last_mouse_press_frame): Remove static global variable.
15558 (w32_clip_to_row): Remove unused variable `f'.
15559 (x_delete_terminal): Remove unused variable `i'.
15560
15561 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
15562 (NOTHING): Remove unused static global variable.
15563 (uniscribe_check_otf): Remove unused variable `table'.
15564 (uniscribe_font_driver): Add missing initializers.
15565
dee091a3
JD
155662011-03-23 Julien Danjou <julien@danjou.info>
15567
15568 * term.c (Fsuspend_tty, Fresume_tty):
15569 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
15570 * window.c (temp_output_buffer_show):
15571 * insdel.c (signal_before_change):
15572 * frame.c (Fhandle_switch_frame):
15573 * fileio.c (Fdo_auto_save):
15574 * emacs.c (Fkill_emacs):
15575 * editfns.c (save_excursion_restore):
15576 * cmds.c (internal_self_insert):
15577 * callint.c (Fcall_interactively):
15578 * buffer.c (Fkill_all_local_variables):
15579 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
15580 Use Frun_hooks.
0f4a96b5 15581 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 15582 unconditionally since it does the check itself.
dee091a3 15583
2c520ab5 155842011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 15585
c9c49752
PE
15586 Fix more problems found by GCC 4.5.2's static checks.
15587
8abc3f12
PE
15588 * coding.c (encode_coding_raw_text): Avoid unnecessary test
15589 the first time through the loop, since we know p0 < p1 then.
15590 This also avoids a gcc -Wstrict-overflow warning.
15591
a2d26660
PE
15592 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
15593 leading to a memory leak, possible in functions like
15594 load_charset_map_from_file that can allocate an unbounded number
b12ef411 15595 of objects (Bug#8318).
a2d26660 15596
916c72e9
PE
15597 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
15598 that could (at least in theory) be that large.
15599
19ab8a18
PE
15600 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
15601 This is less likely to overflow, and avoids undefined behavior if
15602 overflow does occur. All callers changed. Use strtoul to scan
15603 for the unsigned long integer.
b7cbbd6f
PE
15604 (pint2hrstr): Simplify and tune code slightly.
15605 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 15606
f0641eff
PE
15607 * scroll.c (do_scrolling): Work around GCC bug 48228.
15608 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
15609
7f650bb9
PE
15610 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
15611 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
15612 (validate_x_resource_name): Simplify count usage.
15613 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 15614
37dd57d1
PE
15615 * fileio.c (Fcopy_file): Report error if fchown or fchmod
15616 fail (Bug#8306).
81e56e61 15617
699979fc 15618 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 15619
401bf9b4
PE
15620 * process.c (Fmake_network_process): Use socklen_t, not int,
15621 where POSIX says socklen_t is required in portable programs.
15622 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 15623 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
15624 (Fmake_network_process, server_accept_connection):
15625 (wait_reading_process_output, read_process_output):
15626 Likewise.
15627
b93aacde
PE
15628 * process.c: Rename or move locals to avoid shadowing.
15629 (list_processes_1, Fmake_network_process):
15630 (read_process_output_error_handler, exec_sentinel_error_handler):
15631 Rename or move locals.
4dc343ee 15632 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 15633 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 15634 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 15635 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 15636 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 15637
af8a867c 15638 Make tparam.h and terminfo.c consistent.
44f230aa
SM
15639 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
15640 Include tparam.h instead, since it declares them.
af8a867c
PE
15641 * cm.h (PC): Remove extern decl; tparam.h now does this.
15642 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
15643 * terminfo.c: Include tparam.h, to check interfaces.
15644 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
15645 (tparam): Adjust signature to match interface in tparam.h;
15646 this removes some undefined behavior. Check that outstring and len
15647 are zero, which they always are with Emacs.
15648 * tparam.h (PC, BC, UP): New extern decls.
15649
0248044d 15650 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 15651 (xftfont_open): Rename locals to avoid shadowing.
0248044d 15652
8ff096c1 15653 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
15654 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
15655 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 15656 (ftfont_list): Remove unused local.
49eaafba
PE
15657 (get_adstyle_property, ftfont_pattern_entity):
15658 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
15659 Rename locals to avoid shadowing.
8ff096c1 15660
e2be39f6
PE
15661 * xfont.c (xfont_list_family): Mark var as initialized.
15662
c9735e30
PE
15663 * xml.c (make_dom): Now static.
15664
8f5201ae
PE
15665 * composite.c (composition_compute_stop_pos): Rename local to
15666 avoid shadowing.
b246f932
PE
15667 (composition_reseat_it): Remove unused locals.
15668 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 15669 (composition_update_it): Mark var as initialized.
11b61122
PE
15670 (find_automatic_composition): Mark vars as initialized,
15671 with a FIXME (Bug#8290).
8f5201ae 15672
760fbc2c
PE
15673 character.h: Rename locals to avoid shadowing.
15674 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
15675 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
15676 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
15677 (BUF_DEC_POS): Be more systematic about renaming local temporaries
15678 to avoid shadowing.
15679
ff08eb85
PE
15680 * textprop.c (property_change_between_p): Remove; unused.
15681
fc7bf025
PE
15682 * intervals.c (interval_start_pos): Now static.
15683
235d7abc
PE
15684 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
15685
44f230aa
SM
15686 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
15687 Rename locals to avoid shadowing.
3e7d6594 15688
50060332
PE
15689 * sound.c (wav_play, au_play, Fplay_sound_internal):
15690 Fix pointer signedness.
d01f234b 15691 (alsa_choose_format): Remove unused local var.
c83b8872
PE
15692 (wav_play): Initialize a variable to 0, to prevent undefined
15693 behavior (Bug#8278).
50060332 15694
c4fc4e30
PE
15695 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
15696
918436ed
PE
15697 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
15698
c939f91b
PE
15699 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
15700 clobbering (Bug#8298).
b9c7f648
PE
15701 * sysdep.c (sys_subshell): Likewise.
15702 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 15703
6bd8c144
PE
15704 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
15705 This should get cleaned up, so that child_setup has the
15706 same signature on all platforms.
15707
7710357c 15708 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 15709 (relocate_fd): Rename locals to avoid shadowing.
7710357c 15710
c59da222
CY
157112011-03-22 Chong Yidong <cyd@stupidchicken.com>
15712
15713 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
15714 not to be necessary, and produces flickering.
15715
66b87493
GM
157162011-03-20 Glenn Morris <rgm@gnu.org>
15717
15718 * config.in: Remove file.
15719
45b6f6d5
JB
157202011-03-20 Juanma Barranquero <lekktu@gmail.com>
15721
15722 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
15723 are now in src/globals.h.
15724 (syms_of_minibuf): Remove spurious & from previous change.
15725
cd394be1 157262011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
15727
15728 * minibuf.c (completing-read-function): New variable.
15729 (completing-read-default): Rename from completing-read.
15730 (completing-read): Call completing-read-function.
15731
b14e3e21
CY
157322011-03-19 Juanma Barranquero <lekktu@gmail.com>
15733
15734 * xfaces.c (Fx_load_color_file):
15735 Read color file from absolute filename (bug#8250).
15736
f2b726e6
JB
157372011-03-19 Juanma Barranquero <lekktu@gmail.com>
15738
15739 * makefile.w32-in: Update dependencies.
15740
09f6ff02
EZ
157412011-03-17 Eli Zaretskii <eliz@gnu.org>
15742
15743 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
15744
29a6015a
PE
157452011-03-17 Paul Eggert <eggert@cs.ucla.edu>
15746
a3a6c54e
PE
15747 Fix more problems found by GCC 4.5.2's static checks.
15748
b766f867
PE
15749 * process.c (make_serial_process_unwind, send_process_trap):
15750 (sigchld_handler): Now static.
15751
be02381c
PE
15752 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
15753 That way, the code declares only the vars that it needs.
15754 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
15755 * s/cygwin.h (PTY_ITERATION): Likewise.
15756 * s/darwin.h (PTY_ITERATION): Likewise.
15757 * s/gnu-linux.h (PTY_ITERATION): Likewise.
15758
57048744
PE
15759 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
15760 * process.c (allocate_pty): Don't declare stb unless it's needed.
15761
7914961c 15762 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
15763 (CONSTANTLIM): Remove; unused.
15764 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
15765 Define only if needed.
7914961c 15766
b3967b18
PE
15767 * unexelf.c (unexec): Name an expression,
15768 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
15769 Use a different way to cause a compilation error if anyone uses
15770 n rather than nn, a way that does not involve shadowing.
73366a00 15771 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 15772
29a6015a
PE
15773 * deps.mk (unexalpha.o): Remove; unused.
15774
43cfc33e 15775 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 15776 * unexec.h: New file.
ce701a33
PE
15777 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
15778 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
15779 Depend on unexec.h.
15780 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
15781 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
15782 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 15783 Change as necessary to match prototype in unexec.h.
ce701a33 15784
01f44d5a
PE
15785 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
15786 shadowing.
4f63c6bb 15787 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 15788
a6670b0b
PE
15789 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
15790 Rename locals to avoid shadowing.
15791
cef2010d 15792 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 15793 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 15794
d4d7173a
PE
15795 * print.c (Fredirect_debugging_output): Fix pointer signedess.
15796
f08b802a
PE
15797 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
15798 warning when compiling print.c.
15799
3ddb0639
PE
15800 * font.c (font_unparse_fcname): Abort in an "impossible" situation
15801 instead of using an uninitialized var.
5ad03b97 15802 (font_sort_entities): Mark var as initialized.
3ddb0639 15803
170a2692
PE
15804 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
15805
e663c700
PE
15806 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
15807 pointers to constants.
89bc529a 15808 (font_parse_fcname): Remove unused vars.
7b81e2d0 15809 (font_delete_unmatched): Now static.
ea838e10 15810 (font_get_spec): Remove; unused.
13a547c6
PE
15811 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
15812 (font_update_drivers, Ffont_get_glyphs, font_add_log):
15813 Rename or move locals to avoid shadowing.
e663c700 15814
2a80c887 15815 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 15816 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 15817
1384fa33 15818 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 15819 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 15820
8b2c52e9
PE
15821 * alloc.c (mark_backtrace): Move decl from here ...
15822 * lisp.h: ... to here, so that it can be checked.
15823
475545b5 15824 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 15825 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
15826 (lisp_indirect_variable): Name an expression,
15827 to avoid gcc -Wbad-function-cast warning.
1faed8ae 15828 (Fdefvar): Rename locals to avoid shadowing.
475545b5 15829
b1349114 15830 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 15831 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 15832 Use const pointer when appropriate.
b1349114 15833
a2928364
PE
15834 * lisp.h (get_system_name, get_operating_system_release):
15835 Move decls here, to check interfaces.
15836 * process.c (get_operating_system_release): Move decl to lisp.h.
15837 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
15838 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
15839 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
15840 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
15841 (Fformat_time_string, Fencode_time, Finsert_char):
15842 (Ftranslate_region_internal, Fformat):
15843 Rename or remove local vars to avoid shadowing.
9710023e 15844 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 15845
a415e694
PE
15846 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
15847 avoid shadowing.
15848
8ef4622d
PE
15849 * lisp.h (eassert): Check that the argument compiles, even if
15850 ENABLE_CHECKING is not defined.
15851
946f9a5b
PE
15852 * data.c (Findirect_variable): Name an expression, to avoid
15853 gcc -Wbad-function-cast warning.
112396d6 15854 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 15855 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
15856 (Fmake_variable_buffer_local, Fmake_local_variable):
15857 Mark variables as initialized.
52746918 15858 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 15859
e5aab7e7 15860 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
15861 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
15862 Rename locals to avoid shadowing.
dff45157
PE
15863 (mark_stack): Move local variables into the #ifdef region where
15864 they're used.
7bc26fdb
PE
15865 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
15866 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
15867 needed otherwise.
15868 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
15869 (GC_STRING_CHARS): Remove; not used.
d40d4be1 15870 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 15871
e5aab7e7
PE
15872 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
15873 avoids undefined behavior in theory.
15874
4da60324
PE
15875 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
15876
88043301
PE
15877 Use functions, not macros, for up- and down-casing (Bug#8254).
15878 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15879 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
15880 to use the following functions instead of these macros.
15881 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
15882 EMACS_INT, since callers assume the returned value fits in int.
15883 (upcase1): Likewise, for UPCASE_TABLE.
15884 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 15885 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 15886 the race-condition problem in the old DOWNCASE.
88043301 15887
19ed5445
PE
15888 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
15889 Rename locals to avoid shadowing.
15890 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
15891 (regex_compile, re_search_2, re_match_2_internal):
15892 Remove unused local vars.
952db0d7
PE
15893 (FREE_VAR): Rewrite so as not to use empty "else",
15894 which gcc can warn about.
da053e48 15895 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
15896 (RETALLOC_IF): Define only if needed.
15897 (WORDCHAR_P): Likewise. This one is never needed, but is used
15898 only in a comment talking about a compiler bug, so put inside
15899 the #if 0 of that comment.
15900 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
15901 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
15902 Remove; unused.
19ed5445 15903
1f3561e4 15904 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
15905 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
15906 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 15907
ded6f8f7
PE
15908 * search.c (simple_search): Remove unused var.
15909
dbd37a95
PE
15910 * dired.c (compile_pattern): Move decl from here ...
15911 * lisp.h: ... to here, so that it can be checked.
15912 (struct re_registers): New forward decl.
15913
7e47afad
PE
15914 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
15915
85f24f61
PE
15916 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
15917 All uses changed.
15918 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
15919 Rename locals to avoid shadowing.
5671df8f 15920 (Fvertical_motion): Mark locals as initialized.
85f24f61 15921
181aa2be 15922 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 15923 (casify_region): Mark local as initialized.
181aa2be 15924
930d429c
PE
15925 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
15926
7082eac6
PE
15927 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
15928 New macros, so that the caller can use some names other than
15929 gcpro1, gcpro2, etc.
15930 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
15931 of the new macros.
15932 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
15933 argument, for consistency with GCPRO2_VAR, etc: it is now the
15934 prefix of the variable, not the variable itself. All uses
15935 changed.
38b2c076
PE
15936 * dired.c (directory_files_internal, file_name_completion):
15937 Rename locals to avoid shadowing.
15938
15206ed9
PE
15939 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
15940 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
15941 dired.c's scmp function, had undefined behavior.
15942 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15943 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
15944 * buffer.h: ... to here, because these macros use current_buffer,
15945 and the new implementation with inline functions needs to have
15946 current_buffer in scope now, rather than later when the macros
15947 are used.
15948 (downcase, upcase1): New static inline functions.
15949 (DOWNCASE, UPCASE1): Reimplement using these functions.
15950 This avoids undefined behavior in expressions like
15951 DOWNCASE (x) == DOWNCASE (y), which previously suffered
15952 from race conditions in accessing the global variables
15953 case_temp1 and case_temp2.
15954 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
15955 * lisp.h (case_temp1, case_temp2): Remove their decls.
15956 * character.h (ASCII_CHAR_P): Move from here ...
15957 * lisp.h: ... to here, so that the inline functions mentioned
15958 above can use them.
15959
4a6bea26
PE
15960 * dired.c (directory_files_internal_unwind): Now static.
15961
f14b7e14
PE
15962 * fileio.c (file_name_as_directory, directory_file_name):
15963 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
15964 Now static.
2893f146
PE
15965 (file_name_as_directory): Use const pointers when appropriate.
15966 (Fexpand_file_name): Likewise. In particular, newdir might
15967 point at constant storage, so make it a const pointer.
fd4ead52 15968 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
15969 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
15970 signedness issues.
f839df0c
PE
15971 (Fset_file_times, Finsert_file_contents, auto_save_error):
15972 Rename locals to avoid shadowing.
f14b7e14 15973
5716756e 15974 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
15975 (Ftry_completion, Fall_completions): Rename or remove locals
15976 to avoid shadowing.
5716756e 15977
b4c3046a
PE
15978 * marker.c (bytepos_to_charpos): Remove; unused.
15979
b45db522
PE
15980 * lisp.h (verify_bytepos, count_markers): New decls,
15981 so that gcc does not warn that these functions aren't declared.
15982
85876d07
PE
15983 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
15984 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 15985 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 15986 (copy_text): Remove unused local var.
85876d07 15987
03d78a21 15988 * filelock.c (within_one_second): Now static.
b3dd38ab 15989 (lock_file_1): Rename local to avoid shadowing.
03d78a21 15990
5df8f01b
PE
15991 * buffer.c (fix_overlays_before): Mark locals as initialized.
15992 (fix_start_end_in_overlays): Likewise. This function should be
15993 simplified by using pointers-to-pointers, but that's a different
15994 matter.
b1d876f1 15995 (switch_to_buffer_1): Now static.
8f54f30a
PE
15996 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
15997 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 15998
a70072c9 15999 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 16000 Fix pointer signedness issue.
edced198
PE
16001 (sys_subshell): Mark local as volatile if checking for lint,
16002 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 16003 (MAXPATHLEN): Define only if needed.
a70072c9 16004
a0977c44
PE
16005 * process.c (serial_open, serial_configure): Move decls from here ...
16006 * systty.h: ... to here, so that they can be checked.
16007
a884fdcc
PE
16008 * fns.c (get_random, seed_random): Move extern decls from here ...
16009 * lisp.h: ... to here, so that they can be checked.
16010
604efe86 16011 * sysdep.c (reset_io): Now static.
b8950c94 16012 (wait_for_termination_signal): Remove; unused.
604efe86 16013
38fc62d9
PE
16014 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
16015 (copy_keymap_item, append_key, push_text_char_description):
16016 Now static.
1004a21a 16017 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 16018 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
16019 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
16020 (describe_map_tree):
16021 Rename locals to avoid shadowing.
38fc62d9 16022
2f2650da
PE
16023 * keyboard.c: Declare functions static if they are not used elsewhere.
16024 (echo_char, echo_dash, cmd_error, top_level_2):
16025 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
16026 (read_char, kbd_buffer_get_event, make_lispy_position):
16027 (make_lispy_event, make_lispy_movement, apply_modifiers):
16028 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
16029 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
16030 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 16031 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 16032 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 16033
a053e86c 16034 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
16035 (mark_kboards): Move decl here ...
16036 * alloc.c (mark_kboards): ... from here.
a053e86c 16037
4752793e
PE
16038 * lisp.h (force_auto_save_soon): New decl.
16039
74f10ca7 16040 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
16041 (DEFINE_DUMMY_FUNCTION): New macro.
16042 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
16043 Use it.
c03cd23f
PE
16044 (main): Add casts to avoid warnings
16045 if GCC considers string literals to be constants.
74f10ca7 16046
022e70d4
PE
16047 * lisp.h (fatal_error_signal): Add decl, since it's exported.
16048
59d6fe83
PE
16049 * dbusbind.c: Pointer signedness fixes.
16050 (xd_signature, xd_append_arg, xd_initialize):
16051 (Fdbus_call_method, Fdbus_call_method_asynchronously):
16052 (Fdbus_method_return_internal, Fdbus_method_error_internal):
16053 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
16054 (Fdbus_register_signal): Use SSDATA when the context wants char *.
16055
78320123
PE
16056 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
16057 if GCC considers string literals to be constants.
49cebcca 16058 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 16059
35ac2a97
SM
160602011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
16061
fb103ca9
SM
16062 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
16063 (print_preprocess, print_object): New macro to fix last change.
16064
35ac2a97
SM
16065 * print.c (print_preprocess): Don't forget font objects.
16066
62973b41
JB
160672011-03-16 Juanma Barranquero <lekktu@gmail.com>
16068
16069 * emacs.c (USAGE3): Doc fixes.
16070
0e48bb22
AS
160712011-03-15 Andreas Schwab <schwab@linux-m68k.org>
16072
16073 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
16074 structure.
16075
7684e57b
JB
160762011-03-14 Juanma Barranquero <lekktu@gmail.com>
16077
16078 * lisp.h (VWindow_system, Qfile_name_history):
16079 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
16080 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
16081 (w32_system_caret_x, w32_system_caret_y): Declare extern.
16082
16083 * w32select.c: Don't #include "keyboard.h".
c96bbc66 16084 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
16085
16086 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
16087 * w32console.c (detect_input_pending, read_input_pending)
16088 (encode_terminal_code):
16089 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
16090 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
16091 (w32_system_caret_y, Qfile_name_history):
16092 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
16093 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
16094 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
16095 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
16096 * w32proc.c (Qlocal, report_file_error):
16097 * w32term.c (Vwindow_system, updating_frame):
16098 * w32uniscribe.c (initialized, uniscribe_font_driver):
16099 Remove unneeded extern declarations.
16100
2aa46d6c
CY
161012011-03-14 Chong Yidong <cyd@stupidchicken.com>
16102
c96bbc66 16103 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 16104
cffc6f3b
CY
161052011-03-13 Chong Yidong <cyd@stupidchicken.com>
16106
16107 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
16108 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
16109 These macros can no longer be used for assignment.
16110
44f230aa
SM
16111 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
16112 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
16113 (record_buffer_markers, fetch_buffer_markers): New functions for
16114 recording and fetching special buffer markers.
16115 (set_buffer_internal_1, set_buffer_temp): Use them.
16116
16117 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
16118
16119 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
16120
16121 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
16122 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
16123
16124 * xdisp.c (hscroll_window_tree):
16125 (reconsider_clip_changes): Use PT instead of BUF_PT.
16126
d251f04b
EZ
161272011-03-13 Eli Zaretskii <eliz@gnu.org>
16128
16129 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
16130 $(EMACS_ROOT)/lib/intprops.h.
16131
f0c77cd1
PE
161322011-03-13 Paul Eggert <eggert@cs.ucla.edu>
16133
3eca4629
PE
16134 Fix more problems found by GCC 4.5.2's static checks.
16135
7c86ee98
PE
16136 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
16137 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
16138 (xg_free_frame_widgets): Make it clear that a local variable is
16139 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
16140 (gdk_window_get_screen): Make it clear that this macro is needed
16141 only if USE_GTK_TOOLTIP.
1e5524e7
PE
16142 (int_gtk_range_get_value): New function, which avoids a diagnostic
16143 from gcc -Wbad-function-cast.
16144 (xg_set_toolkit_scroll_bar_thumb): Use it.
16145 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
16146 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
16147 (get_utf8_string, xg_get_file_with_chooser):
16148 Rename locals to avoid shadowing.
16149 (create_dialog): Move locals to avoid shadowing.
7c86ee98 16150
41729b81
PE
16151 * xgselect.c (xg_select): Remove unused var.
16152
f0c77cd1
PE
16153 * image.c (four_corners_best): Mark locals as initialized.
16154 (gif_load): Initialize transparent_p to zero (Bug#8238).
16155 Mark another local as initialized.
ec6cf4c6 16156 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 16157
ce0ad53d 16158 * image.c (clear_image_cache): Now static.
d5d5a617 16159 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 16160 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
16161 (x_edge_detection): Remove unnecessary cast that
16162 gcc -Wbad-function-cast diagnoses.
2037898d 16163 (gif_load): Fix pointer signedness.
6ae141d6
PE
16164 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
16165 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 16166
33383987 161672011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 16168
d32df629
PE
16169 Improve quality of tests for time stamp overflow.
16170 For example, without this patch (encode-time 0 0 0 1 1
16171 1152921504606846976) returns the obviously-bogus value (-948597
16172 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
16173 reports time overflow. See
16174 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
16175 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
16176 * editfns.c: Include limits.h and intprops.h.
16177 (TIME_T_MIN, TIME_T_MAX): New macros.
16178 (time_overflow): Move earlier, to before first use.
16179 (hi_time, lo_time): New functions, for an accurate test for
16180 out-of-range times.
16181 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
16182 (Fget_internal_run_time): Don't assume time_t fits in int.
16183 (make_time): Use list2 instead of Fcons twice.
16184 (Fdecode_time): More accurate test for out-of-range times.
16185 (check_tm_member): New function.
16186 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
16187 (lisp_time_argument): Don't rely on undefined left-shift and
16188 right-shift behavior when checking for time stamp overflow.
8be6f318 16189
fe31d94c
PE
16190 * editfns.c (time_overflow): New function, refactoring common code.
16191 (Fformat_time_string, Fdecode_time, Fencode_time):
16192 (Fcurrent_time_string): Use it.
16193
8be6f318
PE
16194 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
16195 * dired.c (make_time): Move to ...
16196 * editfns.c (make_time): ... here.
16197 * systime.h: Note the move.
16198
09d9db2c 161992011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 16200
126bc0dc
YM
16201 * fringe.c (update_window_fringes): Remove unused variables.
16202
c47cbdfd
YM
16203 * unexmacosx.c (copy_data_segment): Also copy __got section.
16204 (Bug#8223)
16205
7ac80be9
EZ
162062011-03-12 Eli Zaretskii <eliz@gnu.org>
16207
c96bbc66 16208 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
16209 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
16210 Constify `char *' arguments and their references according to
16211 prototypes in tparam.h.
16212
ecb0f94d 16213 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 16214
7ac80be9
EZ
16215 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
16216 Adapt all references accordingly.
16217
16218 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
16219
ef1fd07e
TT
162202011-03-11 Tom Tromey <tromey@redhat.com>
16221
16222 * buffer.c (syms_of_buffer): Remove obsolete comment.
16223
7ef4b50c
EZ
162242011-03-11 Eli Zaretskii <eliz@gnu.org>
16225
16226 * termhooks.h (encode_terminal_code): Declare prototype.
16227
16228 * msdos.c (encode_terminal_code): Don't declare prototype.
16229
16230 * term.c (encode_terminal_code): Now external again, used by
16231 w32console.c and msdos.c.
16232
44f230aa
SM
16233 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
16234 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 16235
4b1ec863 162362011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 16237
1714f52b 16238 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 16239
4b1ec863
PE
16240 * fringe.c (update_window_fringes): Mark locals as initialized
16241 (Bug#8227).
16242 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 16243
524c7aa6
PE
16244 * alloc.c (mark_fringe_data): Move decl from here ...
16245 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
16246 to check its interface.
16247 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
16248
a5c0af81 16249 * fontset.c (free_realized_fontset): Now static.
7519b8cd 16250 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 16251 (fontset_font): Mark local as initialized.
a9a06e0b 16252 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 16253
b4716021
PE
16254 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
16255
811e9bac 16256 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 16257 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
16258 (x_own_selection, Fx_disown_selection_internal): Rename locals
16259 to avoid shadowing.
16260 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 16261
7e3ab302
PE
16262 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
16263 so that the caller can use some name other than gcpro1.
16264 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
16265 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
16266 (Fx_backspace_delete_keys_p):
16267 Use them to avoid shadowing, and rename vars to avoid shadowing.
16268 (x_decode_color, x_set_name, x_window): Now static.
6b437900 16269 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 16270 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
16271 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
16272 Remove unused locals.
7e3ab302
PE
16273 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
16274 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
16275 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
16276 macros.
f78faa98 16277
e2b13473
PE
16278 * xterm.h (x_mouse_leave): New decl.
16279
77f23912
PE
16280 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
16281 Remove unused functions.
cdf4ba58
PE
16282 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
16283 (x_calc_absolute_position): Now static.
7411c686 16284 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 16285 Don't declare local "event" unless it's used.
ed7bf3a5
PE
16286 (x_iconify_frame, x_free_frame_resources): Don't declare locals
16287 unless they are used.
38d0b34a
PE
16288 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
16289 (x_fatal_error_signal): Remove; not used.
a6067996
PE
16290 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
16291 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
16292 (x_error_catcher, x_connection_closed, x_error_handler):
16293 (x_error_quitter, xembed_send_message, x_iconify_frame):
16294 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 16295 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 16296 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 16297
44f230aa
SM
16298 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
16299 Rename or move locals to avoid shadowing.
6b463e58 16300 (tty_defined_color, merge_face_heights): Now static.
5967d051 16301 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
16302 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
16303 does not deduce is never used uninitialized.
73719eba
PE
16304 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
16305 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 16306
426994c3 16307 * terminal.c (store_terminal_param): Now static.
5489860b 16308
032f1620 16309 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 16310 (set_frame_menubar): Remove unused local.
d4323972 16311 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
16312 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
16313 since they might point to immutable storage.
281585b0
PE
16314 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
16315 since it's unused otherwise.
032f1620 16316
367c19e5 16317 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 16318 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
16319 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
16320 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 16321 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
16322 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
16323 does not deduce are never used uninitialized.
70739cbe 16324
07b48fa9
PE
16325 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
16326
8868a238 16327 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
16328 * window.c (window_loop, size_window):
16329 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 16330
7e5cf297 16331 * window.c (display_buffer): Now static.
d6550a9f
PE
16332 (size_window): Mark variables that gcc -Wuninitialized
16333 does not deduce are never used uninitialized.
a586633d
PE
16334 * window.h (check_all_windows): New decl, to forestall
16335 gcc -Wmissing-prototypes diagnostic.
5b555da1 16336 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 16337
f6095868
PE
16338 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
16339 shadowing.
16340 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
16341 Include <limits.h>.
16342 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
16343 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
16344 (load_charset_map): Mark variables that gcc -Wuninitialized
16345 does not deduce are never used uninitialized.
53df7c11 16346 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 16347
f38b440c
PE
16348 * coding.c (coding_set_source, coding_set_destination):
16349 Use "else { /* comment */ }" rather than "else /* comment */;"
16350 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
16351 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
16352 a block, when the outer 'i' will do.
16353 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
16354 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
16355 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
16356 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
16357 (Fdecode_sjis_char, Fdefine_coding_system_internal):
16358 Rename locals to avoid shadowing.
16359 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
16360 * coding.c (emacs_mule_char, encode_invocation_designation):
16361 Now static, since they're not used elsewhere.
413bb2db 16362 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 16363 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
16364 (decode_coding_emacs_mule): Mark variables that gcc
16365 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
16366 (detect_coding_iso_2022): Initialize a local variable that might
16367 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 16368 this initialization is needed. (Bug#8211)
5f58e762
PE
16369 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
16370 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
16371 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
16372 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
16373 Remove unused macros.
f38b440c 16374
232b38b9 16375 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 16376 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 16377 * character.c (string_count_byte8): Likewise.
232b38b9 16378
fb90da1b
PE
16379 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
16380 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
16381
fb93dbc2
PE
16382 * chartab.c (copy_sub_char_table): Now static, since it's not used
16383 elsewhere.
5c156ace
PE
16384 (sub_char_table_ref_and_range, char_table_ref_and_range):
16385 Rename locals to avoid shadowing.
bbcd0949 16386 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 16387
7d3b3862 16388 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 16389 (BIDI_BOB): Remove unused macro.
7d3b3862 16390
6be7d3da
PE
16391 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
16392 deduce are never used uninitialized.
c2ed9c8b 16393 * term.c (encode_terminal_code): Likewise.
6be7d3da 16394
75f8807f 16395 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 16396
50938595
PE
16397 * tparam.h: New file.
16398 * term.c, tparam.h: Include it.
16399 * deps.mk (term.o, tparam.o): Depend on tparam.h.
16400 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
16401 Move these decls to tparam.h, and make them agree with what
16402 is actually in tparam.c. The previous trick of using incompatible
16403 decls in different modules does not conform to the C standard.
16404 All callers of tparam changed to use tparam's actual API.
16405 * tparam.c (tparam1, tparam, tgoto):
16406 Use const pointers where appropriate.
16407
fbceeba2
PE
16408 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
16409 * cm.h (struct cm): Likewise.
16410 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
16411 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
16412 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
16413 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
16414 (turn_on_face, init_tty): Likewise.
16415 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 16416
7f3f1250
PE
16417 * term.c (term_mouse_position): Rename local to avoid shadowing.
16418
e6ca6543
PE
16419 * alloc.c (mark_ttys): Move decl from here ...
16420 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
16421
c40f8d15
AS
164222011-03-11 Andreas Schwab <schwab@linux-m68k.org>
16423
16424 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
16425
cfe0661d
JB
164262011-03-09 Juanma Barranquero <lekktu@gmail.com>
16427
16428 * search.c (compile_pattern_1): Remove argument regp, unused since
16429 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
16430 (compile_pattern): Don't pass it.
16431
0afb4571
J
164322011-03-08 Jan Djärv <jan.h.d@swipnet.se>
16433
16434 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
16435 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
16436 for ! HAVE_GTK3.
16437 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
16438
16439 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
16440
16441 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
16442 gdk_window_get_screen, gdk_window_get_geometry,
16443 gdk_x11_window_lookup_for_display and GDK_KEY_g.
16444 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
16445 (xg_get_pixbuf_from_pixmap): New function.
16446 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
16447 to Pixmap, take frame as parameter, remove GdkColormap parameter.
16448 Call xg_get_pixbuf_from_pixmap instead of
16449 gdk_pixbuf_get_from_drawable.
16450 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
16451 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
16452 (xg_check_special_colors): Use GtkStyleContext and its functions
16453 for HAVE_GTK3.
16454 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
16455 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
16456 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
16457 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
16458 Call gtk_widget_get_preferred_size.
0afb4571
J
16459 (xg_frame_resized): gdk_window_get_geometry only takes 5
16460 parameters.
44f230aa
SM
16461 (xg_win_to_widget, xg_event_is_for_menubar):
16462 Call gdk_x11_window_lookup_for_display.
0afb4571
J
16463 (xg_set_widget_bg): New function.
16464 (delete_cb): New function.
895009e1 16465 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 16466 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
16467 (xg_set_background_color): Call xg_set_widget_bg.
16468 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
16469 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
16470 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
16471 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
16472 if ! HAVE_GTK3.
16473 (update_frame_tool_bar): Call gtk_widget_hide.
16474 (xg_initialize): Use GDK_KEY_g.
16475
16476 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
16477 if ! HAVE_GTK3
16478 (x_session_initialize): Call gdk_x11_set_sm_client_id.
16479
16480 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
16481 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
16482 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
16483
1c2cc4ef
JB
164842011-03-08 Juanma Barranquero <lekktu@gmail.com>
16485
16486 * w32xfns.c (select_palette): Check success of RealizePalette against
16487 GDI_ERROR, not zero.
16488
33383987 16489See ChangeLog.11 for earlier changes.
aac0c6e3
MR
16490
16491;; Local Variables:
16492;; coding: utf-8
aac0c6e3
MR
16493;; End:
16494
2f097256 16495 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
16496
16497 This file is part of GNU Emacs.
16498
16499 GNU Emacs is free software: you can redistribute it and/or modify
16500 it under the terms of the GNU General Public License as published by
16501 the Free Software Foundation, either version 3 of the License, or
16502 (at your option) any later version.
16503
16504 GNU Emacs is distributed in the hope that it will be useful,
16505 but WITHOUT ANY WARRANTY; without even the implied warranty of
16506 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16507 GNU General Public License for more details.
16508
16509 You should have received a copy of the GNU General Public License
16510 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.