1 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
3 Better seed support for (random).
4 * emacs.c (main): Call init_random.
5 * fns.c (Frandom): Set the seed from a string argument, if given.
6 Remove long-obsolete Gentzel cruft.
7 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
8 (init_random): New function.
10 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
12 Remove mark_ttys function and fix tty_display_info initialization.
13 * lisp.h (mark_ttys): Remove prototype.
14 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
15 to mark_ttys because all possible values of 'top_frame' slot are
16 the frames which are reachable from Vframe_list.
17 * term.c (mark_ttys): Remove.
18 (init_tty): Safely initialize 'top_frame' slot with Qnil.
20 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
22 Change struct frame bitfields from unsigned char to unsigned.
23 * frame.h (struct frame): Change type of 'display_preempted',
24 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
25 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
26 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
27 bitfields from unsigned char to unsigned.
29 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
31 Remove unused member of struct x_output and struct w32_output.
32 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
33 * w32term.h (struct w32_output): Likewise.
35 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
37 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
38 does not become zero (Bug#12234).
40 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
42 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
45 2012-08-30 Glenn Morris <rgm@gnu.org>
47 * lread.c (init_lread): For out-of-tree builds, only add the
48 source directory's site-lisp dir to the load-path if it exists,
49 consistent with in-tree builds. (Bug#12302)
51 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
53 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
54 button_values to NULL. Call setStykeMask so dialogs get a close button.
55 (windowShouldClose:): Set window_closed.
56 (dealloc): New member, free button_values.
57 (process_dialog:): Make member function. Remove window argument,
58 replace window with self. Count buttons and allocate and store values
60 (addButton:value:row:): value is int with the name tag. Call setTag
61 with tag. Remove return self, declare return value as void.
62 (addString:row:): Remove return self, declare return value as void.
63 (addSplit): Remove return self, declare return value as void.
64 (clicked:): Remove return self, declare return value as void.
65 Set dialog_return to button_values[seltag]. Code formatting change.
66 (initFromContents:isQuestion:): Adjust call to process_dialog.
67 Code formatting change.
68 (timeout_handler:): Set timer_fired to YES.
69 (runDialogAt:): Set timer_fired to NO.
70 Handle click on close button as quit.
72 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
73 Add window_closed and button_values. Add void as return value for
74 add(Button|String|Split). addButton takes int instead of Lisp_Object.
75 Add process_dialog as new member.
77 2012-08-28 Eli Zaretskii <eliz@gnu.org>
79 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
80 is not one of the heaps we manage. (Bug#12242)
82 2012-08-28 Glenn Morris <rgm@gnu.org>
84 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
86 2012-08-28 Martin Rudalics <rudalics@gmx.at>
88 * window.c (Fset_window_configuration): Remove handling of
89 auto-buffer-name window parameter. Install revision of reverted
92 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
94 Do not allow to set major mode for a dead buffer.
95 * buffer.c (Fset_buffer_major_mode): Signal an error
96 if the buffer is dead.
97 (Fother_buffer, other_buffer_safely): Remove redundant
100 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
102 Always use set_buffer_if_live to restore original buffer at unwind.
103 * buffer.h (record_unwind_current_buffer): New function.
104 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
105 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
106 * undo.c, window.c: Adjust users.
107 * buffer.c (set_buffer_if_live): Fix comment.
109 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
111 Fix usage of set_buffer_internal.
112 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
113 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
114 * coding.c (decode_coding): Omit redundant test.
115 * fileio.c (decide_coding_unwind): Likewise.
116 * fns.c (secure_hash): Likewise.
117 * insdel.c (modify_region): Likewise.
118 * keyboard.c (command_loop_1): Likewise.
119 * print.c (PRINTFINISH): Likewise.
120 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
122 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
124 * dispnew.c: Use bool for boolean.
125 (frame_garbaged, display_completed, delayed_size_change)
126 (fonts_changed_p, add_window_display_history)
127 (add_frame_display_history, verify_row_hash)
128 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
129 (row_equal_p, realloc_glyph_pool)
130 (allocate_matrices_for_frame_redisplay)
131 (showing_window_margins_p)
132 (adjust_frame_glyphs_for_frame_redisplay)
133 (build_frame_matrix_from_leaf_window, make_current)
134 (mirrored_line_dance, mirror_line_dance, update_frame)
135 (update_window_tree, update_single_window)
136 (check_current_matrix_flags, update_window, update_text_area)
137 (update_window_line, set_window_update_flags, scrolling_window)
138 (update_frame_1, scrolling, buffer_posn_from_coords)
139 (do_pending_window_change, change_frame_size)
140 (change_frame_size_1, sit_for):
141 Use bool for boolean.
142 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
143 and remove last int (actually boolean) argument, which was always 0.
145 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
146 * dispextern.h (struct composition_it): Use bool for boolean.
147 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
148 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
149 * dired.c (file_name_completion):
150 Use bool for boolean. (This was missed in an earlier change.)
152 2012-08-27 Martin Rudalics <rudalics@gmx.at>
154 * window.c (Fset_window_configuration): Revert first part of
157 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
159 * nsterm.h (NSPanel): New class variable dialog_return.
161 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
163 (windowShouldClose:): Use stop instead of stopModalWithCode.
164 (clicked:): Ditto, and also set dialog_return (Bug#12258).
165 (timeout_handler:): Use stop instead of abortModal. Send a dummy
167 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
170 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
172 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
173 * composite.c (find_composition, composition_gstring_p)
174 (composition_reseat_it, find_automatic_composition):
175 * data.c (let_shadows_buffer_binding_p)
176 (let_shadows_global_binding_p, set_internal, make_blv)
177 (Fmake_variable_buffer_local, Fmake_local_variable)
178 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
179 (cons_to_signed, arith_driver):
180 * dbusbind.c (xd_in_read_queued_messages):
181 * dired.c (directory_files_internal, file_name_completion):
182 Use bool for booleans.
183 * dired.c (file_name_completion):
184 * process.h (fd_callback):
185 Omit int (actually boolean) argument. It wasn't being used.
187 * composite.h, lisp.h: Reflect above API changes.
189 * cmds.c, coding.c: Use bool for booleans.
190 * cmds.c (move_point, Fself_insert_command):
191 * coding.h (struct composition status, struct coding_system):
192 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
193 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
194 (emacs_mule_char, decode_coding_emacs_mule)
195 (encode_coding_emacs_mule, detect_coding_iso_2022)
196 (decode_coding_iso_2022, encode_invocation_designation)
197 (encode_designation_at_bol, encode_coding_iso_2022)
198 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
199 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
200 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
201 (encode_coding_raw_text, detect_coding_charset)
202 (decode_coding_charset, encode_coding_charset, detect_eol)
203 (detect_coding, get_translation_table, produce_chars)
204 (consume_chars, reused_workbuf_in_use)
205 (make_conversion_work_buffer, code_conversion_save)
206 (decode_coding_object, encode_coding_object)
207 (detect_coding_system, char_encodable_p)
208 (Funencodable_char_position, code_convert_region)
209 (code_convert_string, code_convert_string_norecord)
210 (Fset_coding_system_priority):
211 * fileio.c (Finsert_file_contents):
212 Use bool for booleans.
213 * coding.h, lisp.h: Reflect above API changes.
214 * coding.c: Remove unnecessary static function decls.
215 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
216 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
217 not a boolean 'int', since callers never look at the return value.
218 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
219 * coding.h (decoding_buffer_size, encoding_buffer_size)
220 (emacs_mule_string_char): Remove unused extern decls.
221 (struct iso_2022_spec, struct coding_system):
222 Use 'unsigned int : 1' for boolean fields, since there's more than one.
223 (struct emacs_mule_spec): Remove unused field 'full_support'.
224 All initializations removed.
225 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
227 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
229 Fix spare memory change (Bug#12286).
230 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
231 (valid_lisp_object_p): Likewise.
233 2012-08-27 Martin Rudalics <rudalics@gmx.at>
235 * window.c (Fset_window_configuration): Record any window's old
236 buffer if it's replaced (see Bug#8789). If the new current
237 buffer doesn't appear in the selected window, go to its old
240 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
242 Special MEM_TYPE_SPARE to denote reserved memory.
243 * alloc.c (enum mem_type): New memory type.
244 (refill_memory_reserve): Use new type for spare memory.
245 This prevents live_cons_p and live_string_p from incorrect
246 detection of uninitialized objects from spare memory as live.
248 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
251 * Makefile.in (.PHONY): versioclean -> versionclean.
253 Remove unused external symbols.
254 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
255 * window.c (Qwindow_valid_p, decode_valid_window):
256 Now static, not extern.
257 * data.c (Qinterval): Remove; unused.
258 (syms_of_data): Do not define 'interval'.
259 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
260 * window.h (decode_valid_window):
263 * character.c, charset.c, chartab.c: Use bool for booleans.
264 * character.c (lisp_string_width, string_count_byte8)
265 (string_escape_byte8):
266 * charset.c (charset_map_loaded, load_charset_map, read_hex):
267 (load_charset_map_from_file, map_charset_chars)
268 (Fdefine_charset_internal, define_charset_internal)
269 (Fdeclare_equiv_charset, find_charsets_in_text)
270 (Ffind_charset_region, char_charset, Fiso_charset):
271 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
272 (sub_char_table_set, sub_char_table_set_range)
273 (char_table_set_range, optimize_sub_char_table)
274 (map_sub_char_table):
275 Use bool for boolean.
276 * character.c (str_to_unibyte): Omit last boolean argument; it was
277 always 0. All callers changed.
278 * character.h, charset.h: Adjust to match previous changes.
279 * character.h (char_printable_p): Remove decl of nonexistent function.
280 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
281 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
282 are all boolean, so make them single-bit bitfields.
284 * lisp.h (ASET): Remove attempt to detect side effects.
285 It was meant to be temporary and it often doesn't work,
286 because when IDX has side effects the behavior of IDX==IDX
287 is undefined. See Stefan Monnier in
288 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
290 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
292 * lisp.h (functionp): New function (extracted from Ffunctionp).
294 * eval.c (Ffunctionp): Use it.
296 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
298 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
299 as that's faster and simpler than static storage. Don't bother
300 with the g_main_context_query overhead if g_main_context_pending
301 says no events are pending.
302 (gfds, gfds_size): Remove these static vars.
303 (xgselect_initialize): Remove; no longer needed.
304 All uses and decls removed.
306 * emacs.c (fatal_error_signal_hook): Remove.
307 All uses removed. This leftover from old code was always 0.
309 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
310 * casefiddle.c (casify_object, casify_region):
311 * casetab.c (set_case_table):
312 * category.c, category.h (word_boundary_p):
313 * category.h (CHAR_HAS_CATEGORY):
314 Use bool for booleans, instead of int.
316 2012-08-25 Eli Zaretskii <eliz@gnu.org>
318 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
320 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
322 On assertion failure, print backtrace if available.
323 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
324 (die) [ENABLE_CHECKING]: Print a backtrace if available.
325 * Makefile.in (LIB_EXECINFO): New macro.
328 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
329 * bytecode.c (exec_byte_code):
330 * callint.c (check_mark, Fcall_interactively):
331 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
332 (getenv_internal, sync_process_alive, call_process_exited):
333 * lisp.h (USE_SAFE_ALLOCA):
334 Use bool for booleans, instead of int.
335 * lisp.h, process.h: Adjust prototypes to match above changes.
336 * callint.c (Fcall_interactively): Don't assume the mark's
337 offset fits in 'int'.
339 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
341 * buffer.c, buffer.h: Use bool for boolean.
342 * buffer.c (reset_buffer_local_variables)
343 (buffer_lisp_local_variables, Fset_buffer_modified_p)
344 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
345 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
346 (overlay_touches_p, overlay_strings, Foverlay_put)
347 (report_overlay_modification, call_overlay_mod_hooks):
348 (mmap_enlarge, mmap_set_vars):
349 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
350 Use bool for booleans, instead of int.
351 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
352 since the 1-or-0 return value is always ignored anyway.
353 (mmap_initialized_p):
354 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
355 * buffer.h, lisp.h: Adjust prototypes to match above changes.
357 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
359 * bidi.c: Use bool for boolean.
360 This is a bit more readable, and makes the text segment of bidi.o
361 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
362 Presumably it's faster too.
363 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
365 (bidi_cache_find_level_change, bidi_cache_iterator_state)
366 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
367 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
368 (bidi_explicit_dir_char, bidi_level_of_next_char)
369 (bidi_find_other_level_edge, bidi_move_to_visually_next):
370 Use bool for booleans, instead of int.
371 * dispextern.h (bidi_init_it, bidi_paragraph_init)
372 (bidi_unshelve_cache): Adjust decls to match code.
374 2012-08-23 Martin Rudalics <rudalics@gmx.at>
376 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
379 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
381 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
382 * atimer.h: Include <stdbool.h>.
384 2012-08-22 Dan Nicolaescu <dann@gnu.org>
386 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
387 compile time tests instead of run time tests on systems that do
389 (FRAME_MAC_P): Remove leftover from deleted code.
390 * frame.c (syms_of_frame): Remove leftover from deleted code.
392 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
394 * nsterm.m (insertText:): Don't clear modifiers if code is space.
396 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
398 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
399 Otherwise, the compiler complains about (A?B:C) where B is void
400 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
401 (fontset_add): Return void, for FONTSET_ADD.
403 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
405 * alloc.c: Use bool for booleans.
406 (gc_in_progress, abort_on_gc)
407 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
408 (dont_register_blocks) [GC_MALLOC_CHECK]:
409 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
410 (check_string_bytes, make_specified_string, memory_full)
411 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
412 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
413 (mark_stack, valid_pointer_p, make_pure_string)
414 (Fgarbage_collect, survives_gc_p, gc_sweep):
415 Use bool for booleans, instead of int.
416 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
418 * alloc.c (PURE_POINTER_P):
419 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
420 * editfns.c (Fformat):
421 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
423 * fns.c (sweep_weak_table):
424 * lisp.h (suppress_checking, push_message, survives_gc_p)
425 (make_pure_string, gc_in_progress, abort_on_gc):
426 * lread.c (readchar, read1):
427 * print.c (Fprin1_to_string):
428 * xdisp.c (push_message):
429 Use bool for booleans affected directly or indirectly by
432 Make recently-introduced setters macros.
433 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
434 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
435 (set_fontset_default, set_fontset_fallback): Rename from their
436 upper-case counterparts, and make them functions rather than macros.
437 This is more consistent with the other recently-introduced setters.
438 These don't need to be inline, since they're local.
440 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
442 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
443 the loop (Bug#12247).
445 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
447 * lisp.h (vcopy): Use memcpy rather than our own loop.
448 This fixes a performance regression introduced by the recent
449 addition of vcopy. This means 'vcopy' will need to be modified
450 for a copying collector, but that's OK. Also, tighten the
451 checking in the assertion.
453 2012-08-21 Eli Zaretskii <eliz@gnu.org>
455 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
456 components for RTL text (Bug#11860). Adjust X-OFFSET of each
457 non-base glyph for the width of the base character, according to
458 what x_draw_composite_glyph_string_foreground expects.
459 Generate WADJUST value according to composition_gstring_width's
460 expectations, to produce correct width of the composed character.
461 Reverse the sign of the DU offset produced by ScriptPlace.
463 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
465 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
467 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
469 Avoid direct writes to contents member of struct Lisp_Vector.
470 * lisp.h (vcopy): New function to copy data into vector.
471 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
472 * fns.c (Ffillarray): Use ASET.
473 * keyboard.c (timer_check_2): Use AREF and ASET.
474 (append_tool_bar_item, Frecent_keys): Use vcopy.
475 * lread.c (read_vector): Use ASET.
476 * msdos.c (Frecent_doskeys): Use vcopy.
477 * xface.c (Finternal_copy_lisp_face): Use vcopy.
478 (Finternal_merge_in_global_face): Use ASET and vcopy.
479 * xfont.c (xfont_list_pattern): Likewise.
481 2012-08-21 Martin Rudalics <rudalics@gmx.at>
483 * window.c (Fwindow_point): For the selected window always return
484 the position of its buffer's point.
485 (Fset_window_point): For the selected window always go in its
486 buffer to the specified position.
488 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
490 Setter macros for fontsets.
491 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
492 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
493 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
496 2012-08-20 Glenn Morris <rgm@gnu.org>
498 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
499 Don't assume that `ln -f' works.
501 2012-08-20 Eli Zaretskii <eliz@gnu.org>
503 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
504 and later about non-assignments with no effect. See discussion at
505 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
508 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
510 Inline setter functions for Lisp_Objects slots of struct specbinding.
511 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
514 2012-08-20 Martin Rudalics <rudalics@gmx.at>
516 * window.c (select_window): Always make selected window's buffer
519 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
521 Use AREF and ASET for docstrings of category tables.
522 * category.h (CATEGORY_DOCSTRING): Use AREF.
523 (SET_CATEGORY_DOCSTRING): Use ASET.
524 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
526 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
528 Inline setter functions for hash table members.
529 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
530 (set_hash_hash, set_hash_index): Rename with _slot suffix.
531 (set_hash_key_and_value, set_hash_index, set_hash_next)
532 (set_hash_hash): New functions.
533 * charset.c, fns.c: Adjust users.
535 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
537 Inline getter and setter functions for per-buffer values.
538 * buffer.h (per_buffer_default, set_per_buffer_default)
539 (per_buffer_value, set_per_buffer_value): New functions.
540 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
541 * buffer.c, data.c: Adjust users.
543 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
545 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
547 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
549 Rely on <config.h> + <unistd.h> to declare 'environ',
550 as gnulib does this if the system doesn't.
551 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
552 Remove declaration. MS-Windows declares it on stdlib.h which is
553 included by conf_post.h.
554 * emacs.c (environ) [DOUG_LEA_MALLOC]:
555 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
556 * vm-limit.c: Include <unistd.h>, for 'environ'.
558 * unexaix.c, unexcoff.c: Include "mem-limits.h".
559 (start_of_data): Remove decl; mem-limits.h provides it.
561 * xdisp.c (handle_invisible_prop): Make it a bit faster
562 and avoid a gcc -Wmaybe-uninitialized diagnostic.
564 2012-08-19 Chong Yidong <cyd@gnu.org>
566 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
569 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
571 * .gdbinit: Use call instead of set when calling a function in the
574 * data.c (set_internal): Don't use set_blv_found.
575 (Fkill_local_variable): Likewise.
577 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
579 * nsfont.m (ns_ascii_average_width): Ensure the string
580 ascii_printable is initialized with a null-terminated character
581 array. Otherwise, it can contain undesired extra characters.
583 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
585 port new setting code to Sun C 5.8 2005/10/13
586 * chartab.c, lisp.h (char_table_set, char_table_set_range):
587 Return void, not Lisp_Object. Otherwise, the compiler
588 complains about (A?B:C) where B is void and C is Lisp_Object
589 when compiling CHAR_TABLE_SET, due to the recent change to
590 the API of sub_char_table_set_contents.
592 2012-08-18 Chong Yidong <cyd@gnu.org>
594 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
595 for the string case (Bug#3874).
597 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
599 * buffer.h (BSET): Remove (Bug#12215).
600 Replace all uses with calls to new setter functions.
601 (bset_bidi_paragraph_direction, bset_case_canon_table)
602 (bset_case_eqv_table, bset_directory, bset_display_count)
603 (bset_display_time, bset_downcase_table)
604 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
605 (bset_last_selected_window, bset_local_var_alist)
606 (bset_mark_active, bset_point_before_scroll, bset_read_only)
607 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
609 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
610 (bset_auto_fill_function, bset_auto_save_file_format)
611 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
612 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
613 (bset_cache_long_line_scans, bset_case_fold_search)
614 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
615 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
616 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
617 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
618 (bset_header_line_format, bset_indicate_buffer_boundaries)
619 (bset_indicate_empty_lines, bset_invisibility_spec)
620 (bset_left_fringe_width, bset_major_mode, bset_mark)
621 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
622 (bset_name, bset_overwrite_mode, bset_pt_marker)
623 (bset_right_fringe_width, bset_save_length)
624 (bset_scroll_bar_width, bset_scroll_down_aggressively)
625 (bset_scroll_up_aggressively, bset_selective_display)
626 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
627 (bset_word_wrap, bset_zv_marker):
628 * category.c (bset_category_table):
629 * syntax.c (bset_syntax_table):
630 New setter functions.
632 * process.h (PSET): Remove (Bug#12215).
633 Replace all uses with calls to new setter functions.
634 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
635 (PROCESS_INLINE): New macro.
636 (pset_childp): New setter function.
637 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
638 * process.c (PROCESS_INLINE):
639 Define to EXTERN_INLINE, so that the corresponding functions
640 are compiled into code.
641 (pset_buffer, pset_command, pset_decode_coding_system)
642 (pset_decoding_buf, pset_encode_coding_system)
643 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
644 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
645 (pset_type, pset_write_queue): New setter functions.
647 * window.h (WSET): Remove (Bug#12215).
648 Replace all uses with calls to new setter functions.
649 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
650 (WINDOW_INLINE): New macro.
651 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
652 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
653 (wset_total_lines, wset_vertical_scroll_bar)
654 (wset_window_end_pos, wset_window_end_valid)
655 (wset_window_end_vpos): New setter functions.
656 * window.c (WINDOW_INLINE):
657 Define to EXTERN_INLINE, so that the corresponding functions
658 are compiled into code.
659 (wset_combination_limit, wset_dedicated, wset_display_table)
660 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
661 (wset_new_normal, wset_new_total, wset_next_buffers)
662 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
663 (wset_prev_buffers, wset_right_fringe_width)
664 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
665 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
666 (wset_window_parameters):
667 * xdisp.c (wset_base_line_number, wset_base_line_pos)
668 (wset_column_number_displayed, wset_region_showing):
669 New setter functions.
671 * termhooks.h (TSET): Remove (Bug#12215).
672 Replace all uses with calls to new setter functions.
673 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
674 (TERMHOOKS_INLINE): New macro.
675 (tset_charset_list, tset_selection_alist): New setter functions.
676 * terminal.c (TERMHOOKS_INLINE):
677 Define to EXTERN_INLINE, so that the corresponding functions
678 are compiled into code.
679 (tset_param_alist): New setter function.
681 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
683 * keyboard.h (KSET): Remove (Bug#12215).
684 Replace all uses with calls to new setter functions.
685 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
686 (KEYBOARD_INLINE): New macro.
687 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
688 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
689 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
690 New setter functions.
691 * keyboard.c (KEYBOARD_INLINE):
692 Define to EXTERN_INLINE, so that the corresponding functions
693 are compiled into code.
694 (kset_echo_string, kset_kbd_queue)
695 (kset_keyboard_translate_table, kset_last_prefix_arg)
696 (kset_last_repeatable_command, kset_local_function_key_map)
697 (kset_overriding_terminal_local_map, kset_real_last_command)
698 (kset_system_key_syms): New setter functions.
700 * frame.h (FSET): Remove (Bug#12215).
701 Replace all uses with calls to new setter functions.
702 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
703 (FRAME_INLINE): New macro.
704 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
705 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
706 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
707 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
708 (fset_param_alist, fset_root_window, fset_scroll_bars)
709 (fset_selected_window, fset_title, fset_tool_bar_items)
710 (fset_tool_bar_position, fset_tool_bar_window): New functions.
711 * frame.c (FRAME_INLINE):
712 Define to EXTERN_INLINE, so that the corresponding functions
713 are compiled into code.
714 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
716 A few more naming-convention fixes for getters and setters.
717 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
718 and rename from buffer_overlays_set_before.
719 (set_buffer_overlays_after): Move here from buffer.h, and rename
720 from buffer_overlays_set_after.
721 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
723 (set_buffer_intervals): Rename from buffer_set_intervals.
724 * intervals.c (set_interval_object): Move here from intervals.h,
725 and rename from interval_set_object.
726 (set_interval_left): Move here from intervals.h, and rename from
728 (set_interval_right): Move here from intervals.h, and rename from
730 (copy_interval_parent): Move here from intervals.h, and rename from
731 interval_copy_parent.
732 * intervals.h (set_interval_parent): Rename from interval_set_parent.
733 (set_interval_plist): Rename from interval_set_plist.
734 Return void, not Lisp_Object, since no caller uses the result.
735 * lisp.h (string_intervals): Rename from string_get_intervals.
736 (set_string_intervals): Rename from string_set_intervals.
738 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
739 (set_char_table_contents): Rename from char_table_set_contents.
740 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
741 All uses changed. See the end of
742 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
744 * lisp.h (CSET): Remove (Bug#12215).
745 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
746 (set_char_table_purpose): New functions,
747 replacing CSET. All uses changed. For example, replace
748 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
749 "set_char_table_parent (char_table, parent);".
750 The old version was confusing because it used the same name
751 'parent' for two different things.
753 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
755 Functions to get and set Lisp_Object fields of buffer-local variables.
756 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
757 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
758 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
759 * data.c, eval.c, frame.c: Adjust users.
761 2012-08-17 Chong Yidong <cyd@gnu.org>
763 * xfaces.c (merge_face_vectors): If the target font specfies a
764 font spec, make the font's attributes take precedence over
765 directly-specified attributes.
766 (merge_face_ref): Recognize :font.
768 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
770 Do not use memcpy for copying intervals.
771 * intervals.c (reproduce_interval): New function.
772 (reproduce_tree, reproduce_tree_obj): Use it.
773 (reproduce_tree_obj): Remove prototype.
775 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
777 * lisp.h (duration_to_sec_usec): Remove unused decl.
779 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
781 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
782 to an allocated instance of NSString, not to the class itself.
784 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
786 * makefile.w32-in (C_CTYPE_H): New macro.
787 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
788 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
789 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
791 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
793 Use ASCII tests for character types.
794 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
796 Don't include <ctype.h>; was not needed.
797 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
798 * sysdep.c, xfaces.c:
799 Include <c-ctype.h> instead of <ctype.h>.
800 * nsterm.m: Include <c-ctype.h>.
801 * charset.c (read_hex):
802 * doc.c (Fsnarf_documentation):
803 * fileio.c (IS_DRIVE) [WINDOWSNT]:
804 (DRIVE_LETTER) [DOS_NT]:
805 (Ffile_name_directory, Fexpand_file_name)
806 (Fsubstitute_in_file_name):
807 * font.c (font_parse_xlfd, font_parse_fcname):
808 * frame.c (x_set_font_backend):
809 * gtkutil.c (xg_get_font):
810 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
811 * nsimage.m (hexchar):
812 * nsterm.m (ns_xlfd_to_fontname):
813 * sysdep.c (system_process_attributes):
814 * xfaces.c (hash_string_case_insensitive):
815 Use C-locale tests instead of locale-specific tests for character
816 types, since we want the ASCII interpretation here, not the
817 interpretation suitable for whatever happens to be the current locale.
819 2012-08-16 Martin Rudalics <rudalics@gmx.at>
821 Consistently check windows for validity/liveness
822 (Bug#11984, Bug#12025, Bug#12026).
823 * lisp.h (CHECK_VALID_WINDOW): New macro.
824 * window.c (decode_window): Rename to decode_live_window.
825 (decode_valid_window, Fwindow_valid_p): New functions.
826 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
827 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
828 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
829 (Fwindow_prev_sibling, Fwindow_combination_limit)
830 (Fset_window_combination_limit, Fwindow_use_time)
831 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
832 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
833 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
834 (Fwindow_hscroll, Fset_window_hscroll)
835 (Fwindow_redisplay_end_trigger)
836 (Fset_window_redisplay_end_trigger, Fwindow_edges)
837 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
838 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
839 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
840 (Fwindow_end, Fset_window_point, Fset_window_start)
841 (Fpos_visible_in_window_p, Fwindow_line_height)
842 (Fwindow_dedicated_p, Fset_window_dedicated_p)
843 (Fwindow_prev_buffers, Fset_window_prev_buffers)
844 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
845 (Fset_window_parameter, Fwindow_display_table)
846 (Fset_window_display_table, Fdelete_other_windows_internal)
847 (Fset_window_buffer, Fset_window_new_total)
848 (Fset_window_new_normal, Fdelete_window_internal)
849 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
850 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
851 (Fwindow_scroll_bars): Check whether argument window is a valid or
852 live window. Update doc-strings.
853 (syms_of_window): New symbol Qwindow_valid_p.
854 * keyboard.c (Fposn_at_x_y): Check whether argument
855 frame_or_window denotes a valid window.
857 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
859 Fix previous char table change.
860 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
861 * chartab.c (optimize_sub_char_table): Likewise.
863 2012-08-16 Chong Yidong <cyd@gnu.org>
865 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
867 * xfont.c (xfont_open):
868 * xftfont.c (xftfont_open): Set the font's max_width field.
870 * nsfont.m (nsfont_open): Similar to the Xft backend, set
871 min_width to space_width and average_width to the average over
872 printable ASCII characters.
873 (ns_char_width): Code cleanup.
874 (ns_ascii_average_width): New utility function.
876 * font.h (struct font): Update comments.
878 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
880 Simple interface to set Lisp_Object fields of character tables.
881 * lisp.h (CSET): New macro.
882 (char_table_set_extras, char_table_set_contents)
883 (sub_char_table_set_contents): New function.
884 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
885 * syntax.c: Adjust users.
887 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
889 * eval.c (eval_sub): Bind lexical-binding.
890 * lread.c (Qlexical_binding): Make non-static.
892 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
894 * nsmenu.m (popupSession): Remove.
895 (pop_down_menu): Remove endModalSession.
896 (timeout_handler:): New method.
897 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
898 Call runModalForWindow. Check timer_fired when it returns.
899 If not set, cancel timer and break out of loop.
900 Otherwise loop again, with a new timeout.
902 * nsterm.m: Include fcntl.h if present.
903 (fd_entry, t_readfds, inNsSelect): Remove.
904 (select_writefds, select_valid, select_timeout, selfds)
905 (select_mutex, apploopnr): Add.
906 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
907 Otherwise call kbd_buffer_store_event.
908 (ns_send_appdefined): Remove release of fd_entry.
909 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
910 Increment and decrement apploopnr.
911 (ns_select): If no file descriptors, just do a NSTimer.
912 Otherwise copy read/write masks and start select thread (fd_handler).
913 Start main loop and wait for application defined event.
914 Inform select thread to stop selecting after main loop is exited.
915 (ns_term_init): Create selfds pipe and set non-blocking.
916 Initialize select_mutex. Start the select thread (fd_handler).
917 (fd_handler:): Loop forever, wait for info from the main thread
918 to either start or stop selecting. When select returns, send
919 and appdefined event.
920 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
921 If not call kbd_buffer_store_event.
923 * nsterm.h (EmacsApp): fd_handler takes id argument.
924 (EmacsDialogPanel): Add timer_fired and timeout_handler.
926 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
928 2012-08-15 Eli Zaretskii <eliz@gnu.org>
930 * region-cache.c (move_cache_gap): Update gap_len using the actual
931 growth of the boundaries array. Do not change cache_len.
934 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
936 Generalize and cleanup font subsystem checks.
937 * font.h (FONT_DEBUG, font_assert): Remove.
938 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
939 Change font_assert to eassert. Use eassert where appropriate.
941 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
943 * gtkutil.c (xg_get_font): Use pango_units_to_double.
945 2012-08-15 Chong Yidong <cyd@gnu.org>
947 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
948 When using the new font chooser, use gtk_font_chooser_get_font_desc to
949 extract the font descriptor instead of just the font name.
950 In that case, return a font spec instead of a string.
951 (x_last_font_name): Move to this file from xfns.c.
953 * xfns.c (Fx_select_font): The return value can also be a font
954 spec. Move x_last_font_name management to gtkutil.c.
956 * xfaces.c: Make font weight and style symbols non-static.
958 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
960 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
963 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
965 * alloc.c (Fgarbage_collect): Use plural form consistently.
967 2012-08-14 Eli Zaretskii <eliz@gnu.org>
969 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
970 iteration through the command loop. Fixes a problem whereby mouse
971 movements are ignored until the first mouse click.
973 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
975 Use bool, not int, for Lisp booleans.
976 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
977 makes Emacs a bit smaller and presumably a bit faster.
978 * lisp.h: Include <stdbool.h>.
979 (struct Lisp_Boolfwd, defvar_bool):
980 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
981 * regex.c [!emacs]: Include <stdbool.h>.
982 (false, true): Remove; <stdbool.h> does this for us now.
984 2012-08-14 Chong Yidong <cyd@gnu.org>
986 * character.c (Fcharacterp): Doc fix (Bug#12076).
988 * data.c (Findirect_variable): Doc fix (Bug#11040).
990 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
992 * editfns.c (Fformat): Doc fix (Bug#12059).
993 (Fsave_current_buffer): Doc fix (Bug#11542).
995 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
997 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
1000 2012-08-14 Martin Rudalics <rudalics@gmx.at>
1002 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
1003 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
1004 * minibuf.c (choose_minibuf_frame, read_minibuf):
1005 * w32fns.c (x_create_tip_frame):
1006 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
1007 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
1009 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1011 * intervals.c (offset_intervals): Remove obsolete comment.
1013 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
1015 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
1017 2012-08-14 Gergely Risko <gergely@risko.hu>
1019 * coding.c (decode_coding): Record buffer modification before
1020 disabling undo_list (Bug#11773).
1022 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1024 Revert and cleanup some recent overlay changes.
1025 * buffer.h (enum overlay_type): Remove.
1026 (buffer_get_overlays, buffer_set_overlays): Likewise.
1027 (buffer_set_overlays_before, buffer_set_overlays_after):
1028 New function. Adjust users.
1029 (unchain_both): Add eassert.
1031 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1033 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
1035 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1037 * gtkutil.c (xg_mark_data): Don't assume C99.
1039 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
1041 * gtkutil.c (xg_frame_tb_info): New struct.
1042 (TB_INFO_KEY): New define.
1043 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
1044 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
1045 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
1047 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
1048 is up to date. Otherwise store new data.
1049 (free_frame_tool_bar): Free xg_frame_tb_info if present.
1051 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1053 Use KSET for write access to Lisp_Object members of struct kboard.
1054 * keyboard.h (KSET): New macro.
1055 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
1056 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
1057 * xterm.c: Adjust users.
1059 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1061 Use BSET for write access to Lisp_Object members of struct buffer.
1062 * buffer.h (BSET): New macro.
1063 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
1064 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
1065 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
1066 * window.c, xdisp.c, xfns.c: Adjust users.
1068 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
1070 * lread.c (syms_of_lread): Initialize Vlexical_binding.
1072 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
1074 * nsterm.m (not_in_argv): New function.
1075 (application:openFile, application:openTempFile:):
1076 (application:openFileWithoutUI:, application:openFiles:): Open file
1077 if not_in_argv returns non-zero (bug#12171).
1079 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
1080 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
1081 Define for Gtk+ versions less than 3.2.
1082 (xg_get_font_name): Use those functions/macros here.
1083 Reported by Frans Oilinki <moilinki@gmail.com>.
1085 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1087 * unexmacosx.c (copy_data_segment): Copy initialized data in
1088 statically linked libraries from input file rather than memory.
1090 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
1091 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
1092 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
1094 2012-08-10 Glenn Morris <rgm@gnu.org>
1096 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
1097 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
1099 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1101 Fix last change to allow compilation with low optimization levels.
1102 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
1103 Reported by Jan Djärv <jan.h.d@swipnet.se>.
1105 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1107 Use common inline syntax in intervals.h.
1108 * intervals.h (INTERVALS_INLINE): New macro.
1109 Change all users from LISP_INLINE.
1111 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1113 Define Qnone once for all platforms.
1114 * frame.c (Qnone): Define here.
1115 (syms_of_frame): DEFSYM it.
1116 * lisp.h (Qnone): New declaration.
1117 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
1118 * xfns.c: Remove duplication. Adjust users.
1120 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1122 Remove unused macros from intervals.h.
1123 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
1124 * intervals.c: Adjust comment.
1126 2012-08-10 Eli Zaretskii <eliz@gnu.org>
1128 * w32fns.c <w32_unicode_gui>: New static variable.
1129 (globals_of_w32fns): Initialize it according to os_subtype.
1130 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
1133 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
1134 Eli Zaretskii <eliz@gnu.org>
1136 Fix bug #10299 with Unicode characters sent by customized
1137 keyboards created by MSKLC.
1138 * w32fns.c (INIT_WINDOW_CLASS): New macro.
1139 (w32_init_class): Use it to initialize the Emacs class with either
1140 ANSI or Unicode API calls.
1141 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
1143 (w32_wnd_proc): If the character code sent by WM_CHAR or
1144 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
1145 original message. Call DefWindowProcW on NT and later.
1147 2012-08-10 Glenn Morris <rgm@gnu.org>
1149 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
1151 * lisp.h (DIRECTORY_SEP): Let configure set it.
1153 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
1155 Use TSET for write access to Lisp_Object slots of struct terminal.
1156 * termhooks.h (TSET): New macro.
1157 * coding.c, terminal.c, xselect.c: Adjust users.
1159 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
1161 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
1162 the failing expression, include them in the error message.
1163 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
1164 * lisp.h (internal_condition_case_n): Update declaration.
1166 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1168 Inline functions to examine and change buffer overlays.
1169 * buffer.c (unchain_both): New function.
1170 * buffer.h (buffer_get_overlays, buffer_set_overlays):
1171 (buffer_has_overlays): New function.
1172 (enum overlay_type): New enum.
1173 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
1174 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
1176 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1178 Inline functions to examine and change buffer intervals.
1179 * alloc.c (mark_interval_tree): Remove.
1180 (MARK_INTERVAL_TREE): Simplify.
1181 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
1182 * intervals.c (buffer_balance_intervals): New function.
1183 (graft_intervals_into_buffer): Adjust indentation.
1184 (set_intervals_multibyte): Simplify.
1185 * buffer.h (BUF_INTERVALS): Remove.
1186 (buffer_get_intervals, buffer_set_intervals): New function.
1187 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
1188 * intervals.c, textprop.c: Adjust users.
1190 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1192 Inline functions to examine and change string intervals.
1193 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
1194 (string_get_intervals, string_set_intervals): New function.
1195 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
1196 * lread.c, print.c, textprop.c: Adjust users.
1198 2012-08-08 Glenn Morris <rgm@gnu.org>
1200 * lisp.mk (lisp): Remove language/persian.elc.
1202 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1205 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
1206 (NULL_INTERVAL_P): Likewise. Adjust users.
1207 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
1208 Adjust comment. Move under #if 0.
1209 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
1210 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
1212 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
1214 Check total length of intervals with eassert.
1215 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
1216 * intervals.c: Change all users to eassert.
1218 2012-08-07 Eli Zaretskii <eliz@gnu.org>
1220 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
1221 Rename fields to match removal of FGET and WGET and disuse of
1222 INTERNAL_FIELD in Lisp_Cons.
1224 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1226 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
1227 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
1228 name since all xname users are fixed long time ago. Do not
1230 (set_symbol_name, set_symbol_function, set_symbol_plist):
1231 (set_symbol_next, set_overlay_plist): New function.
1232 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
1233 (struct Lisp_Overlay): Likewise.
1234 (CVAR, MVAR, SVAR): Remove.
1235 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
1236 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
1237 * xterm.c: Adjust users.
1238 * .gdbinit: Change to use name field of struct Lisp_Symbol
1241 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1243 Basic functions to set Lisp_Object and pointer slots of intervals.
1244 * intervals.h (interval_set_parent, interval_set_object):
1245 (interval_set_left, interval_set_right, interval_set_plist):
1246 (interval_copy_parent): New function.
1247 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
1248 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
1250 (INTERVAL_SIZE): Remove. Adjust users.
1251 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
1253 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1255 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
1256 * process.h (PGET): Remove.
1257 (struct Lisp_Process): Do not use INTERNAL_FIELD.
1258 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
1260 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1262 Drop WGET and revert read access to Lisp_Objects slots of struct window.
1263 * window.h (WGET): Remove.
1264 (struct window): Do not use INTERNAL_FIELD.
1265 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1266 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1267 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
1268 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
1269 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
1272 2012-08-07 Chong Yidong <cyd@gnu.org>
1274 * window.c (Fwindow_edges, Fwindow_pixel_edges)
1275 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
1276 (Fdelete_window_internal): Signal an error if the window is not on
1277 a live frame (Bug#12025).
1279 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
1281 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
1282 * frame.h (FGET): Remove.
1283 (struct frame): Do not use INTERNAL_FIELD.
1284 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
1285 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
1286 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1287 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
1289 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
1291 * w32.c: Silence compiler warnings.
1292 (map_w32_filename): Remove unused variable `is_fat'.
1293 (chase_symlinks): Add parentheses around expression.
1295 2012-08-06 Glenn Morris <rgm@gnu.org>
1297 * sysdep.c: Respect BROKEN_GETWD.
1299 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
1300 Let configure handle it.
1301 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
1303 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1305 Use GCALIGNMENT where appropriate.
1306 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
1307 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
1308 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
1310 2012-08-06 Eli Zaretskii <eliz@gnu.org>
1312 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
1313 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
1315 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
1317 * buffer.h (struct buffer): Revert `indirections' to a simple int;
1318 that should be sufficient for everyone.
1320 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1322 * keyboard.c (timer_check_2): Add break so timer_check returns next
1325 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1327 Fix Windows build errors introduced after converting to WGET and WSET.
1328 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
1329 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1331 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1333 * nsterm.m (ns_frame_rehighlight): Use FSET.
1335 * nsmenu.m (ns_update_menubar): Use FSET.
1337 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1339 Separate read and write access to Lisp_Object slots of Lisp_Process.
1340 * process.h (PGET, PSET): New macros similar to AREF and ASET.
1341 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
1343 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1345 Separate read and write access to Lisp_Object slots of struct window.
1346 * window.h (WGET, WSET): New macros similar to AREF and ASET.
1347 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1348 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1349 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
1350 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
1351 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
1354 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1356 Fix Windows build errors introduced after converting to FGET and FSET.
1357 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
1358 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
1359 (w32_judge_scroll_bars): Change to use FSET.
1360 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1362 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1364 Fix replacement typo.
1365 * window.c (replace_window): Set root_window instead of
1366 selected_window. This fixes a total window subsystem
1367 malfunction reported by Bastien Guerry <bzg@gnu.org>.
1369 2012-08-06 Glenn Morris <rgm@gnu.org>
1371 * lisp.mk (lisp): Add language/persian.elc.
1373 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1375 Separate read and write access to Lisp_Object slots of struct frame.
1376 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
1377 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
1378 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
1379 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1380 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
1382 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
1384 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
1386 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
1388 Generalize common compile-time constants.
1389 * lisp.h (header_size, bool_header_size, word_size): Now here.
1390 (struct Lisp_Vector): Add comment.
1391 (struct Lisp_Bool_Vector): Move up to define handy constants.
1392 (VECSIZE, PSEUDOVECSIZE): Simplify.
1393 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
1394 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
1395 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
1396 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
1397 * xfont.c, xmenu.c: Use word_size where appropriate.
1399 2012-08-05 Lawrence Mitchell <wence@gmx.li>
1401 * search.c (Freplace_match): Treat \? in the replacement text
1402 literally (Bug#8161).
1404 2012-08-05 Chong Yidong <cyd@gnu.org>
1406 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
1407 * frame.c (Vdelete_frame_functions):
1408 * emacs.c (Vkill_emacs_hook): Doc fix.
1410 2012-08-04 Eli Zaretskii <eliz@gnu.org>
1412 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
1413 --with-x-toolkit=no builds.
1414 Reported by Carsten Mattner <carstenmattner@gmail.com>.
1416 2012-08-04 Chong Yidong <cyd@gnu.org>
1418 * syntax.c (Fmodify_syntax_entry): Doc fix.
1420 2012-08-04 Eli Zaretskii <eliz@gnu.org>
1422 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
1423 * w32.c (init_environment): Change the default values of many
1424 environment variables in dflt_envvars[] to NULL, to avoid pushing
1425 them into environment when they were not already defined.
1426 Remove the code that deletes site-lisp subdirectories from the default
1427 value of EMACSLOADPATH, as it is no longer needed.
1428 (check_windows_init_file): Now external, not static.
1429 Use Vload_path as is, without adding anything, as this function is now
1430 called when Vload_path is already set up.
1432 * w32.h (check_windows_init_file): Add prototype.
1434 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
1435 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
1436 compatibility with Posix platforms.
1437 (main): Move the call to check_windows_init_file to here from
1439 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
1440 any, in the DEFALT argument into the root of the Emacs build or
1441 installation tree, as appropriate.
1443 * callproc.c (init_callproc_1): Call decode_env_path instead of
1444 doing its equivalent by hand.
1445 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
1446 the code that sets Vexec_path run on MS-Windows.
1448 * lread.c (init_lread): Add comments to #ifdef's.
1450 * msdos.c (dos_set_window_size, IT_update_begin)
1451 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
1452 instead of direct references.
1454 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
1456 Export DEFAULT_REHASH_* to GDB.
1457 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
1458 Now constants, not macros.
1460 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
1462 Remove unnecessary casts involving pointers.
1463 These casts are no longer needed now that we assume C89 or later,
1464 since they involve casting to or from void *.
1465 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
1466 (make_pure_float, make_pure_vector):
1467 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
1468 * macros.c (Fstart_kbd_macro):
1469 * menu.c (find_and_return_menu_selection):
1470 * minibuf.c (read_minibuf_noninteractive):
1471 * sysdep.c (closedir):
1472 * xdisp.c (x_produce_glyphs):
1473 * xfaces.c (compare_fonts_by_sort_order):
1474 * xfns.c (x_real_positions, select_visual):
1475 * xselect.c (x_stop_queuing_selection_requests)
1476 (x_get_window_property, x_get_window_property_as_lisp_data):
1477 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
1478 Remove unnecessary pointer casts.
1479 * alloc.c (record_xmalloc): New function.
1480 * lisp.h (record_xmalloc): New decl.
1481 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
1482 more like a function. This is because the pointer cast is not
1483 needed. All uses changed.
1484 * print.c (print_string, print_error_message): Avoid length recalc.
1486 Improve fix for macroexp crash with debugging (Bug#12118).
1487 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
1488 ARRAY_MARK_FLAG when checking subscripts, because ASET is
1489 not supposed to be invoked from the garbage collector.
1490 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
1491 (gc_aset): New function, which is like ASET but can be
1492 used in the garbage collector.
1493 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1494 (set_hash_index): Use it instead of ASET.
1496 2012-08-03 Eli Zaretskii <eliz@gnu.org>
1498 Support symlinks on latest versions of MS-Windows.
1499 * w32.c: Include winioctl.h and aclapi.h.
1500 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
1501 (revert_to_self): Forward declarations of static functions.
1502 <static BOOL g_b_init_get_security_info>:
1503 <g_b_init_create_symbolic_link>: New static flags.
1504 (globals_of_w32): Initialize them to zero.
1505 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
1506 (map_w32_filename): Improve commentary. Simplify switch.
1507 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
1508 headers (most versions of MinGW w32api don't).
1509 (get_security_info, create_symbolic_link)
1510 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
1512 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
1513 in the argument file name.
1514 (sys_access): Call unc_volume_file_attributes only if
1515 GetFileAttributes fails with network-related error codes.
1516 (sys_rename): Diagnose renaming of a symlink when the user doesn't
1517 have the required privileges.
1518 (get_file_security_desc_by_name): Rename from
1519 get_file_security_desc.
1520 (stat_worker): New function, with most of the guts of 'stat', and
1521 with addition of handling of symlinks and support for 'lstat'.
1522 If possible, get file's attributes and security information by
1523 handle, not by name. Produce S_IFLNK bit for symlinks, when
1524 called from 'lstat'.
1525 (stat, lstat): New functions, call 'stat_worker'.
1526 (symlink, readlink, careadlinkat): Rewritten to create and resolve
1527 symlinks when the underlying filesystem supports them.
1529 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1531 Fix macroexp crash on Windows with debugging (Bug#12118).
1532 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
1533 checking subscripts; problem introduced with the recent
1534 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
1535 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
1536 since it's used in non-static inline functions now.
1538 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
1539 Don't assume buffer size fits in 'int'. Remove unused local.
1541 Use C99-style 'extern inline' if available.
1542 * buffer.h (BUFFER_INLINE):
1543 * category.h (CATEGORY_INLINE):
1544 * character.h (CHARACTER_INLINE):
1545 * charset.h (CHARSET_INLINE):
1546 * composite.h (COMPOSITE_INLINE):
1547 * dispextern.h (DISPEXTERN_INLINE):
1548 * lisp.h (LISP_INLINE):
1549 * systime.h (SYSTIME_INLINE):
1550 New macro, replacing 'static inline' in this header.
1551 * buffer.h, category.h, character.h, charset.h, composite.h:
1552 * dispextern.h, lisp.h, systime.h:
1553 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1554 * alloc.c (LISP_INLINE):
1555 * buffer.c (BUFFER_INLINE):
1556 * category.c (CATEGORY_INLINE):
1557 * character.c (CHARACTER_INLINE):
1558 * charset.c (CHARSET_INLINE):
1559 * composite.c (COMPOSITE_INLINE):
1560 * dispnew.c (DISPEXTERN_INLINE):
1561 * sysdep.c (SYSTIME_INLINE):
1562 Define to EXTERN_INLINE, so that the corresponding functions
1563 are compiled into code.
1564 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
1565 (INLINE_HEADER_END): New macros.
1566 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
1567 since it's used in non-static inline functions now.
1568 (VALMASK) [!USE_LSB_TAG]: Likewise.
1570 2012-08-02 Glenn Morris <rgm@gnu.org>
1572 * s/: Remove empty directory.
1574 * s/ms-w32.h: Move to ../nt/inc.
1575 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
1576 Update for new ms-w32.h location.
1578 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1581 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
1583 2012-08-02 Glenn Morris <rgm@gnu.org>
1585 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
1586 hard-coding the path separator.
1588 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1590 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
1591 This how ASET and AREF are supposed to work, and makes
1592 it easier to think about future improvements. See
1593 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
1594 * charset.h (set_charset_attr): New function.
1595 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
1596 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
1597 (aref_addr): New function. All uses of &AREF(...) changed.
1598 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1599 (set_hash_index): New functions. All lvalue-style uses of
1600 HASH_KEY etc. changed.
1601 * keyboard.c (set_prop): New function. All lvalue-style uses
1604 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
1606 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
1607 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1608 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
1609 * nsfns.m (ns_set_name_as_filename): Likewise.
1610 * nsmenu.m (ns_update_menubar): Likewise.
1611 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
1613 2012-08-01 Eli Zaretskii <eliz@gnu.org>
1615 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
1616 Adapt to latest changes in field names of the corresponding Lisp
1619 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
1621 2012-08-01 Glenn Morris <rgm@gnu.org>
1623 * s/msdos.h: Remove file.
1624 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
1625 * Makefile.in (S_FILE): Remove.
1626 (config_h): Remove S_FILE.
1628 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
1630 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
1631 Remove; moved to nt/config.nt.
1633 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1635 Use INTERNAL_FIELD for conses and overlays.
1636 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
1637 Remove obsolete comment.
1639 (struct Lisp_Overlay): Use INTERNAL_FIELD.
1640 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
1642 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1644 Use INTERNAL_FIELD for symbols.
1645 * lisp.h (SVAR): New macro. Adjust users.
1646 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
1647 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
1649 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1651 Use INTERNAL_FIELD for processes.
1652 * process.h (PVAR): New macro. Adjust style.
1653 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
1654 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
1656 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1658 Use INTERNAL_FIELD for windows.
1659 * window.h (WVAR): New macro.
1660 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
1661 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1662 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1663 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
1664 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
1665 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1667 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1669 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
1671 2012-08-01 Glenn Morris <rgm@gnu.org>
1673 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
1674 Move to configure.ac.
1676 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
1678 * makefile.w32-in (CONFIG_H): Update dependencies.
1679 (CONF_POST_H): New macro.
1681 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
1683 2012-07-31 Glenn Morris <rgm@gnu.org>
1685 * Makefile.in (S_FILE): No longer set by configure.
1687 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
1689 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
1691 * process.h (NULL_DEVICE):
1692 * emacs.c (SEPCHAR):
1693 * editfns.c (USER_FULL_NAME): Let configure set them.
1695 * s/README, s/template.h: Remove files.
1697 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
1699 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
1700 Move to configure.ac.
1702 2012-07-31 Eli Zaretskii <eliz@gnu.org>
1704 * .gdbinit (xframe): Adapt to introduction of FVAR and the
1705 resulting renaming of 'struct frame' members.
1707 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
1709 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
1710 after introduction of FVAR.
1712 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1714 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
1716 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
1717 instead of compositeToPoint.
1718 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
1720 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
1722 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1724 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
1725 * lisp.h (INTERNAL_FIELD): New macro.
1726 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
1727 (BVAR): Change to use INTERNAL_FIELD.
1728 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
1729 (KVAR): Change to use INTERNAL_FIELD.
1730 * frame.h (FVAR): New macro.
1731 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
1732 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
1733 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
1734 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1735 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1737 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1739 Miscellaneous fixes for non-default X toolkits.
1740 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
1741 * xterm.c (x_frame_of_widget): Remove redundant prototype.
1742 Move under #ifdef USE_LUCID.
1743 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
1744 definition and usage to avoid warnings.
1746 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1748 * nsterm.m (openFiles): Fix previous checkin.
1750 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
1752 * indent.c (compute_motion): Remove unused local.
1754 2012-07-31 Glenn Morris <rgm@gnu.org>
1756 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
1758 * conf_post.h [USG5_4]:
1759 Move remaining contents of s/usg5-4-common.h here.
1760 * s/usg5-4-common.h: Remove file.
1762 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
1763 * s/irix6-5.h: Remove file.
1765 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
1766 * s/darwin.h: Remove file.
1768 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
1769 * s/hpux10-20.h: Remove file, which is now empty.
1771 2012-07-30 Glenn Morris <rgm@gnu.org>
1773 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
1774 * Makefile.in (config_h): Add conf_post.h.
1775 * makefile.w32-in (CONFIG_H): Add conf_post.h.
1777 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
1779 * nsterm.m (ns_do_open_file): New variable.
1780 (ns_term_init): Set ns_do_open_file to YES after run returns.
1781 (openFile, openTempFile, openFileWithoutUI, openFiles):
1782 Open files only if ns_do_open_file.
1784 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1786 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
1787 This no-op macro hasn't been needed for many years.
1788 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
1790 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
1791 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
1792 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
1793 gdb_make_enums_visible.
1794 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
1795 (DIRECTORY_SEP): Now a constant, not a macro.
1797 2012-07-30 Eli Zaretskii <eliz@gnu.org>
1799 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
1800 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
1802 * w32term.c <w32_keyboard_codepage>: Renamed from
1803 keyboard_codepage and now external. All users changed.
1805 * w32term.h: Add declaration of w32_keyboard_codepage.
1807 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
1808 the codepage to translate keys to Unicode. If this argument is
1809 -1, use the value returned by GetConsoleCP. All callers changed.
1811 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1813 Update .PHONY listings in makefiles.
1814 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
1815 bootstrap-clean, distclean, maintainer-clean, versioclean,
1818 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
1819 This is a bit clearer. Fix some commentary typos.
1821 2012-07-30 Glenn Morris <rgm@gnu.org>
1823 * s/netbsd.h: Let configure include signal.h if needed.
1824 Remove file, which is now empty.
1826 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
1827 Let configure set them.
1828 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
1829 No more need to undefine.
1831 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
1833 * keymap.c (Fkey_description): Don't remove 0x80 bit from
1834 non-single-byte char when adding meta modifier. (Bug#12090)
1836 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
1838 Convert safe_call to use variable number of arguments.
1839 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
1840 (safe_call2): Fix comment.
1841 * lisp.h (safe_call): Adjust prototype.
1842 * coding.c (encode_coding_object): Change to use safe_call2.
1843 * xfaces.c (merge_face_heights): Change to use safe_call1.
1845 2012-07-30 Glenn Morris <rgm@gnu.org>
1847 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
1848 does that unconditionally. Remove file, which is now empty.
1850 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
1853 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1855 Export to GDB most of lisp.h's remaining object-like macros.
1856 * lisp.h (min, max): Move earlier, because they're used earlier now.
1857 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
1858 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
1859 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
1860 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
1861 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
1862 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
1863 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
1864 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
1865 Now constants, for GDB. They need not be macros.
1866 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
1867 Now constants, for GDB, as well as macros, for static initializers.
1868 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
1869 Move to after the definition of struct Lisp_Char_Table,
1870 since the former now needs that type defined.
1871 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
1872 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
1873 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
1874 New enums, for gdb_make_enums_visible.
1875 (GLYPH_MODE_LINE_FACE): Remove; unused.
1876 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
1877 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
1878 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
1879 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
1880 enum maxargs, enum MAX_ALLOCA.
1881 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
1882 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
1883 no longer needed, now that they are done in lisp.h.
1885 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
1887 Cleanup string bytes checking.
1888 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
1889 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
1890 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
1891 (check_sblock, compact_small_strings): Simplify.
1893 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1895 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
1896 These macros are confusing and no longer need to be defined, as
1897 the enum values now suffice. All uses replaced with definiens.
1898 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
1900 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
1902 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
1903 ($(BLD)/w32console.$(O)): Update dependencies.
1905 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1907 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
1908 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
1910 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
1912 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
1914 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
1915 setting sitelisp (Bug#12010).
1917 2012-07-29 Eli Zaretskii <eliz@gnu.org>
1919 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
1921 * w32heap.c (cache_system_info):
1922 * w32.c (sys_rename):
1923 * w32proc.c (find_child_console, sys_kill): All users changed.
1925 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1927 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
1929 2012-07-29 Eli Zaretskii <eliz@gnu.org>
1931 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
1933 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1935 Cleanup statistics calculation in Fgarbage_collect.
1936 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
1937 Fix zombies percentage calculation. Simplify elapsed time calculation.
1939 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1941 Generalize marker debugging code under MARKER_DEBUG and use eassert.
1942 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
1943 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
1944 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
1945 (replace_range, replace_range_2, del_range_2): Change to eassert.
1946 * marker.c (byte_char_debug_check): Adjust style.
1948 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1950 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
1951 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
1952 long-ago-commented-out code that talks about "WIN32".
1953 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
1956 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
1958 Use Gnulib stdalign module (Bug#9772, Bug#9960).
1959 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
1960 Simplify by using alignof.
1961 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
1962 * lisp.h: Include <stdalign.h>.
1963 (GCALIGNMENT): New macro and constant.
1964 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
1965 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
1966 (stdalign): New macro, if not already defined.
1968 2012-07-28 Eli Zaretskii <eliz@gnu.org>
1970 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
1971 * w32inevt.c: Include w32inevt.h.
1972 (w32_read_console_input): New inline function, calls either
1973 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
1974 w32_console_unicode_input.
1975 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
1976 (w32_kbd_patch_key, key_event): Use the codepage returned by
1977 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
1978 (key_event): use uChar.UnicodeChar only if
1979 w32_console_unicode_input is non-zero.
1981 * w32console.c: Include w32heap.h.
1982 <w32_console_unicode_input>: New global variable.
1983 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
1984 family of Windows, zero otherwise.
1986 * w32inevt.h: Declare w32_console_unicode_input.
1988 * xdisp.c (init_iterator): Don't reference tip_frame in a build
1989 --without-x. (Bug#11742)
1991 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
1993 Adjust GDB to reflect pvec_type changes (Bug#12036).
1994 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
1995 2012-07-04 changes to pseudovector representation.
1996 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
1998 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
2000 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
2002 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
2004 2012-07-27 Eli Zaretskii <eliz@gnu.org>
2006 * alloc.c (listn): Fix the order the arguments are consed onto the
2009 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
2010 enumeration constants, as PURE and HEAP are too general, and clash
2011 with other headers and sources, such as gmalloc.c and the
2012 MS-Windows system headers. All users changed.
2014 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2016 Revert last save_excursion_save and save_excursion_restore changes.
2017 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
2018 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
2020 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2022 Fix recently-introduced typos in Windows port.
2023 Reported by Martin Rudalics <rudalics@gmx.at>.
2024 * w32.c (init_environment): Replace comma with semicolon.
2025 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
2027 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
2029 Improve GDB symbol export (Bug#12036).
2030 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
2031 arms of an 'if', not using conditional expressions; otherwise GDB
2032 complains about the types in the unevaluated arm when the argument
2033 is an integer literal.
2034 (xgetint): Simplify expression.
2035 * alloc.c (gdb_make_enums_visible): New constant. This ports to
2036 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
2037 Zaretskii in <http://bugs.gnu.org/12036#13>.
2038 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
2039 needed now that we have gdb_make_enums_visible.
2040 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
2041 (enum enum_USE_LSB_TAG):
2042 New enum types, packaging up enums that need to be exported to GDB.
2044 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2046 Utility function to make a list from specified amount of objects.
2047 * lisp.h (enum constype): New datatype.
2048 (listn): New prototype.
2049 * alloc.c (listn): New function.
2050 (Fmemory_use_count, syms_of_alloc): Use it.
2051 * buffer.c (syms_of_buffer): Likewise.
2052 * callint.c (syms_of_callint): Likewise.
2053 * charset.c (define_charset_internal): Likewise.
2054 * coding.c (syms_of_coding): Likewise.
2055 * keymap.c (syms_of_keymap): Likewise.
2056 * search.c (syms_of_search): Likewise.
2057 * syntax.c (syms_of_syntax): Likewise.
2058 * w32.c (init_environment): Likewise.
2059 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
2060 * xdisp.c (syms_of_xdisp): Likewise.
2061 * xfns.c (syms_of_xfns): Likewise.
2063 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2065 Fast save_excursion_save and save_excursion_restore.
2066 * lisp.h (struct Lisp_Excursion): New data type.
2067 (PVEC_EXCURSION): New pseudovector type.
2068 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
2069 to deal with it. Adjust comments.
2070 (init_marker, attach_marker): New prototype.
2071 (unchain_marker): Adjust prototype.
2072 * marker.c (attach_marker): Change to global.
2073 (init_marker): New function.
2074 * alloc.c (Fmake_marker, build_marker): Use it.
2075 (build_marker): More easserts.
2076 (mark_object): Handle struct Lisp_Excursion.
2077 * editfns.c (save_excursion_save, save_excursion_restore):
2078 Reimplement to use struct Lisp_Excursion. Add comments.
2080 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2082 Fix export of symbols to GDB (Bug#12036).
2083 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
2084 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
2085 emacs.c, as this is a more-suitable home. Had this been done earlier
2086 the fix for 12036 would have avoided some of the problems noted in
2087 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
2088 would have been more obvious.
2089 * emacs.c: Do not include <verify.h>; no longer needed.
2090 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
2091 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
2092 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2093 Remove; now done in lisp.h.
2094 * lisp.h (PUBLISH_TO_GDB): New macro.
2095 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
2096 (DATA_SEG_BITS): Use it.
2097 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
2098 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
2099 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
2100 not be usable in #if. This simplifies things.
2102 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
2104 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
2106 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2108 Simplify export of symbols to GDB (Bug#12036).
2109 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
2110 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
2111 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
2112 Adjust to changes in lisp.h and emacs.c, by using
2113 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
2114 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
2115 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
2116 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
2117 instead of gdb_valbits.
2118 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
2119 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
2120 instead of gdb_array_mark_flag.
2121 (xboolvector): Get size from $->size, not $->header.size.
2122 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
2123 (xreload, hook-run, hookpost-run): Remove.
2124 * emacs.c: Include <verify.h>.
2125 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
2126 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
2128 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
2129 (gdb_USE_LSB_TAG): New enum constants.
2130 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2131 Also define these as enum constants, so they're visible to GDB.
2132 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
2133 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
2134 as constants, so they're visible to GDB.
2135 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
2136 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
2137 Now enum constants, not macros, so they're visible to GDB.
2138 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
2139 more convenient now. All uses changed.
2140 (VALMASK) [USE_LSB_TAG]: Also define in this case.
2141 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
2143 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
2145 Explicitly free restriction data that are not needed anymore.
2146 * editfns.c (save_restriction_restore): Free restriction data.
2148 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
2150 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
2151 add argument, tune behavior, and adjust all callers.
2153 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
2155 Use typedef for EMACS_INT, EMACS_UINT.
2156 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
2157 than macros. This simplifies debugging in the usual case, since
2158 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
2159 and it allows expressions involving EMACS_INT casts.
2160 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
2162 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
2164 * nsterm.m (ns_read_socket): Return early if there is a modal
2167 2012-07-25 Martin Rudalics <rudalics@gmx.at>
2169 * frame.c (Fredirect_frame_focus): In doc-string don't mention
2170 that FOCUS-FRAME can be omitted.
2172 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
2174 Adjust buffer text indirection counters at the end of Fkill_buffer.
2175 * buffer.c (Fkill_buffer): Adjust indirection counters when the
2176 buffer is definitely dead. This should really fix an issue reported
2177 by Christoph Scholtes again. (Bug#12007).
2178 (init_buffer_once): Initialize indirection counters of
2179 buffer_defaults and buffer_local_symbols (for sanity and safety).
2181 2012-07-24 Eli Zaretskii <eliz@gnu.org>
2183 * xdisp.c (init_iterator): Don't compute dimensions of truncation
2184 and continuation glyphs on tooltip frames, leave them at zero.
2185 Avoids continued lines in tooltips. (Bug#11832)
2187 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
2189 Simplify copy_overlay.
2190 * buffer.c (copy_overlay): Simplify. Use build_marker.
2191 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
2193 2012-07-23 Eli Zaretskii <eliz@gnu.org>
2195 * print.c (print_object): Don't crash when a frame's name is nil
2196 or invalid. (Bug#12025)
2198 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
2199 it signals an error when a tooltip frame is being created.
2201 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
2203 Cleanup miscellaneous objects allocation and initialization.
2204 * alloc.c (allocate_misc): Change to static. Add argument to
2205 specify the subtype. Adjust comment and users.
2206 (build_overlay): New function.
2207 * buffer.c (copy_overlays, Fmake_overlay): Use it.
2208 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
2209 (allocate_misc): Remove prototype.
2210 (build_overlay): Add prototype.
2212 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
2214 Swap buffer text indirection counters in Fbuffer_swap_text.
2215 * buffer.c (Fbuffer_swap_text): Swap indirections too.
2216 This avoids crash reported by Christoph Scholtes at
2217 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
2219 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
2221 * nsmenu.m (Popdown_data): New struct.
2222 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
2224 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
2225 (initWithContentRect): Make imgView and contentView non-static
2226 and autorelease them. Also autorelease img and matrix (Bug#12005).
2227 (dealloc): Remove (Bug#12005).
2229 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
2231 Adjust consing_since_gc when objects are explicitly freed.
2232 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
2233 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
2234 (free_cons, free_misc): Subtract object size from consing_since_gc.
2236 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
2238 Simplify and cleanup markers positioning code.
2239 * marker.c (attach_marker): More useful eassert.
2240 (live_buffer, set_marker_internal): New function.
2241 (Fset_marker, set_marker_restricted): Use set_marker_internal.
2242 (set_marker_both, set_marker_restricted_both): Use live_buffer.
2244 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
2246 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
2247 as it's limited by the amount of memory, not by INT_MAX.
2249 2012-07-21 Eli Zaretskii <eliz@gnu.org>
2251 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
2252 in special-event-map. See the discussion at
2253 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
2256 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
2257 info.dwItemData. Fixes crashes on 64-bit Windows.
2258 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2260 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
2262 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
2263 (conversationIdentifier): Return value is NSInteger.
2264 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
2266 2012-07-21 Chong Yidong <cyd@gnu.org>
2268 * window.c (decode_any_window): Signal an error if the window is
2269 on a dead frame (Bug#11984).
2271 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2273 Add indirection counting to speed up Fkill_buffer.
2274 * buffer.h (struct buffer): New member.
2275 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
2276 (Fmake_indirect_buffer): Set indirection counter to -1, increment
2277 base buffer indirection counter.
2278 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
2279 (Fkill_buffer): Adjust indirection counters as needed, don't walk
2280 through buffer list if indirection counter is 0.
2282 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2284 Extend the value returned by Fgarbage_collect with heap statistics.
2285 * alloc.c (Qheap): New symbol.
2286 (syms_of_alloc): DEFSYM it.
2287 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
2288 (Fmemory_free): Remove.
2289 (syms_of_alloc): Don't defsubr it.
2290 * buffer.c (Fcompact_buffer): Remove.
2291 (syms_of_buffer): Don't defsubr it.
2293 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2295 Make maybe_gc inline.
2296 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
2297 * lisp.h (consing_since_gc, gc_relative_threshold)
2298 (memory_full_cons_threshold): Revert declaration.
2299 (maybe_gc): Remove prototype, define as inline.
2300 * alloc.c: Remove old commented-out code.
2301 (consing_since_gc, gc_relative_threshold)
2302 (memory_full_cons_threshold): Revert to global.
2305 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2307 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
2308 * lisp.h (build_unibyte_string): New function.
2309 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
2310 * sysdep.c, w32fns.c, xfns.c: Use it.
2311 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
2312 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
2313 Adjust users accordingly.
2314 * font.h (font_open_by_name): Adjust prototype.
2316 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2318 Cleanup calls to Fgarbage_collect.
2319 * lisp.h (maybe_gc): New prototype.
2320 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2321 Remove declarations.
2322 * alloc.c (maybe_gc): New function.
2323 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2325 * bytecode.c (MAYBE_GC): Use maybe_gc.
2326 * eval.c (eval_sub, Ffuncall): Likewise.
2327 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
2328 to avoid dependency from auto-save feature.
2330 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
2332 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
2333 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
2334 'for_each_per_buffer_object_at'.
2335 All uses changed. It's better to use upper-case for macros that
2336 cannot be implemented as functions, to give the reader a clue
2337 that they're special.
2339 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
2341 * alloc.c (Fgarbage_collect): Tweak docstring.
2343 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2345 Tweak the value returned from Fgarbage_collect again.
2346 * alloc.c (Fgarbage_collect): New return value, as confirmed in
2347 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
2348 Adjust documentation.
2349 (total_vector_bytes): Rename to total_vector_slots, adjust
2351 (total_free_vector_bytes): Rename to total_free_vector_slots,
2353 (Qstring_bytes, Qvector_slots): New symbols.
2354 (syms_of_alloc): DEFSYM them.
2356 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2358 Buffer compaction primitive which may be used from Lisp.
2359 * buffer.c (compact_buffer, Fcompact_buffer): New function.
2360 (syms_of_buffer): Register Fcompact_buffer.
2361 * alloc.c (Fgarbage_collect): Use compact_buffer.
2362 * buffer.h (compact_buffer): New prototype.
2363 (struct buffer_text): New member.
2365 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2367 New macro to iterate over all buffers, miscellaneous cleanups.
2368 * lisp.h (all_buffers): Remove declaration.
2369 * buffer.h (all_buffers): Add declaration, with comment.
2370 (for_each_buffer): New macro.
2371 * alloc.c (Fgarbage_collect, mark_object): Use it.
2372 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
2373 (init_buffer): Likewise.
2374 * data.c (Fset_default): Likewise.
2375 * coding.c (code_conversion_restore): Remove redundant check
2377 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
2379 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2381 Fix bug that created negative-length intervals.
2382 * intervals.c (merge_interval_right, merge_interval_left):
2383 Do not zero out this interval if it is absorbed by its children,
2384 as this interval's total length doesn't change in that case. See
2385 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
2387 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
2389 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
2390 when invoking (make-bool-vector N t) and N is a positive
2391 multiple of 8 -- the last 8 bits were mistakenly cleared.
2393 Remove some struct layout assumptions in bool vectors.
2394 * alloc.c (bool_header_size): New constant.
2395 (header_size, word_size): Move earlier, as they're now used earlier.
2396 Use 'word_size' in a few more places, where it's appropriate.
2397 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
2398 padding before the data member of a bool vector.
2399 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
2400 than doing the check by hand with an abort ().
2402 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
2404 * eval.c (Fdefvar): Don't check constants since we only set the var if
2405 it's not yet defined anyway (bug#11904).
2407 * lisp.h (last_undo_boundary): Declare new var.
2408 * keyboard.c (command_loop_1): Set it.
2409 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
2410 were auto-added by the command loop (bug#11774).
2412 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2414 * w32font.c (Qsymbol): Remove local definition.
2415 (syms_of_w32font): Don't DEFSYM it.
2417 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2419 Fix sweep_vectors to handle large bool vectors correctly.
2420 * alloc.c (sweep_vectors): Account total_vector_bytes for
2421 bool vectors larger than VBLOCK_BYTES_MAX.
2423 2012-07-18 Chong Yidong <cyd@gnu.org>
2425 * frame.c (x_set_frame_parameters): Revert bogus change introduced
2426 in 2012-05-25 commit by Paul Eggert (Bug#11738).
2428 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2430 Return more descriptive data from Fgarbage_collect.
2431 Suggested by Stefan Monnier in
2432 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
2433 * alloc.c (bounded_number): New function.
2434 (total_buffers, total_vectors): New variable.
2435 (total_string_size): Rename to total_string_bytes, adjust users.
2436 (total_vector_size): Rename to total_vector_bytes, adjust users.
2437 (sweep_vectors): Account total_vectors and total_vector_bytes.
2438 (Fgarbage_collect): New return value. Adjust documentation.
2439 (gc_sweep): Account total_buffers.
2440 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
2441 (VECTOR_SIZE): Remove.
2442 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
2443 (Qinterval, Qmisc): New symbols.
2444 (syms_of_data): Initialize them.
2445 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
2446 (Qcons, Qbuffer): New declarations.
2448 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2450 * alloc.c (Fmemory_free): Account for memory-free's own storage.
2451 Round up, not down. Improve doc.
2453 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2455 Restore old code in allocate_string_data to avoid Faset breakage.
2456 Reported by Julien Danjou <julien@danjou.info> in
2457 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
2458 * alloc.c (allocate_string_data): Restore old code with minor
2459 adjustments, fix comment to explain this subtle issue.
2461 2012-07-17 Eli Zaretskii <eliz@gnu.org>
2463 Remove FILE_SYSTEM_CASE.
2464 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
2466 * fileio.c (FILE_SYSTEM_CASE): Don't define.
2467 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
2468 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
2469 call-process-region passes it through expand-file-name.
2471 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
2473 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2475 Fix crash when creating indirect buffer (Bug#11917)
2476 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
2477 Don't handle unbound variables specially if non-zero.
2478 (Fbuffer_local_variables): Pass zero.
2479 (clone_per_buffer_values): Pass non-zero.
2481 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2483 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
2484 to make the loop interruptible.
2486 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2488 * gnutls.c (emacs_gnutls_handshake): Only retry if
2489 GNUTLS_E_INTERRUPTED.
2491 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2493 Cleanup and convert miscellaneous checks to eassert.
2494 * alloc.c (mark_interval): Fix comment, partially rephrase
2495 old comment from intervals.h (see below).
2496 * intervals.c (find_interval, adjust_intervals_for_insertion)
2497 (delete_interval, adjust_intervals_for_deletion)
2498 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
2500 (adjust_intervals_for_insertion, make_new_interval):
2501 Remove obsolete and unused code.
2502 * intervals.h (struct interval): Remove obsolete comment.
2503 * textprotp.c (erase_properties): Remove unused code.
2504 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
2505 (Fremove_list_of_text_properties): Convert to eassert.
2507 2012-07-17 Chong Yidong <cyd@gnu.org>
2509 * editfns.c (Finsert_char): Doc fix.
2511 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2513 Fix previous change to make Fmemory_free always accurate.
2514 * alloc.c (make_interval): Update total_free_intervals.
2515 (make_float): Likewise for total_free_floats.
2516 (free_cons, Fcons): Likewise for total_free_conses.
2517 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
2518 Likewise for total_free_vector_bytes.
2519 (Fmake_symbol): Likewise for total_free_symbols.
2520 (bytes_free): Remove.
2522 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2524 Simple free memory accounting feature.
2525 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
2526 (sweep_vectors): Accumulate size of free vectors.
2527 (Fgarbage_collect): Setup bytes_free.
2528 (Fmemory_free): New function.
2529 (syms_of_alloc): Register it.
2531 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2533 Cleanup overlays checking.
2534 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
2535 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
2536 eassert and OVERLAYP.
2537 (sort_overlays): Change to use OVERLAYP.
2539 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
2541 * editfns.c (Finsert_char): Make it interactive, and make the
2542 second arg optional. Copy interactive spec and docstring from
2545 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2547 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
2548 Unlike the other wrapped functions, fabs has an unspecified
2551 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
2553 * nsterm.m (keyDown): Interpret flags without left/right bits
2554 as the left key (Bug#11670).
2556 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2558 Remove empty and useless init functions.
2559 * lisp.h (init_character_once, init_fns, init_image)
2560 (init_filelock, init_sound): Remove prototype.
2561 * character.c (init_character_once): Remove.
2562 * filelock.c (init_filelock): Likewise.
2563 * fns.c (init_fns): Likewise.
2564 * image.c (init_image): Likewise.
2565 * sound.c (init_sound): Likewise.
2566 * emacs.c (main): Adjust accordingly.
2568 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2570 * gtkutil.h: Tiny cleanups.
2571 (use_old_gtk_file_dialog): Remove useless declaration.
2572 (xg_uses_old_file_dialog): Add suggested const attribute.
2574 2012-07-15 Eli Zaretskii <eliz@gnu.org>
2576 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
2577 (bidi_paragraph_init): Use it to limit search forward for a strong
2578 directional character in abnormally large paragraphs full of
2579 neutral or weak characters. (Bug#11943)
2581 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
2583 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
2584 the toolbar (Bug#9451).
2585 (xg_make_tool_item): Give the widget event box a transparent
2588 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2590 Cleanup basic allocation variables and functions.
2591 * alloc.c (ignore_warnings, init_intervals, init_float)
2592 (init_cons, init_symbol, init_marker): Remove.
2593 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
2594 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
2595 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
2596 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
2597 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
2598 (staticidx, init_alloc_once, init_strings, free_ablock):
2599 Remove redundant initialization.
2600 * fns.c (init_weak_hash_tables): Remove.
2601 * lisp.h (init_weak_hash_tables): Remove prototype.
2603 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2605 Use zero_vector where appropriate.
2606 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
2608 * lisp.h (zero_vector): New declaration.
2609 * font.c (null_vector): Remove.
2610 (syms_of_font): Remove initialization and staticpro.
2611 (font_list_entities, font_find_for_lface): Change to use zero_vector.
2612 * keymap.c (Faccessible_keymaps): Likewise.
2614 2012-07-15 Leo Liu <sdl.web@gmail.com>
2616 * fringe.c: Fix typo in comments.
2618 2012-07-14 Leo Liu <sdl.web@gmail.com>
2620 * fringe.c: Add a new bitmap exclamation-mark.
2622 2012-07-14 Eli Zaretskii <eliz@gnu.org>
2624 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
2626 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
2627 (HAVE_MENUS): Don't define, defined by editing config.in with
2629 (GMALLOC_INHIBIT_VALLOC): Don't define.
2630 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
2632 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
2634 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
2636 2012-07-14 Glenn Morris <rgm@gnu.org>
2638 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
2639 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
2640 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
2642 2012-07-13 Glenn Morris <rgm@gnu.org>
2644 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
2646 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
2647 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
2649 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
2651 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
2652 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
2653 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
2654 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
2656 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
2657 as boolean expression.
2658 (x_set_window_size): Remove unused variable toolbar.
2659 (ns_get_color_default, ns_mod_to_lisp): Remove.
2660 (ns_mouse_position): Remove unused variables xchar and ychar.
2661 (ns_compute_glyph_string_overhangs): Remove unused variable face.
2662 (ns_set_vertical_scroll_bar): Remove unused variable count.
2663 (ns_delete_terminal): Remove unused variable i.
2664 (ns_term_init): Remove unused variables r, g and b.
2665 (mouseDown): Remove unused variable window.
2666 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
2667 (initFrameFromEmacs): Remove unused variable vbextra.
2668 (mouseEntered): Remove unused variables p and dpyinfo.
2669 (mouseExited): Remove unused variables p and r.
2670 (ns_define_frame_cursor, ns_clear_frame_area)
2671 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
2672 (menuDown): Assign [sender tag] to variable and cast the variable.
2674 * nsterm.h (menuDown): Add id as type to argument sender.
2675 (ns_display_info_for_name): Add Lisp_Object argument.
2676 (ns_term_init): Add Lisp_Object argument.
2677 (ns_map_event_to_object): Add void argument.
2678 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
2679 prototype with arguments and only declare if __OBJC__.
2680 (nxatoms_of_nsselect): Add void argument.
2681 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
2682 (ns_alloc_autorelease_pool): Add void argument.
2683 (ns_release_autorelease_pool): Add void* argument.
2684 (ns_get_defaults_value): Add const char* argument.
2686 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
2687 (initFromContents): Use SSDATA where appropriate.
2688 (ns_update_menubar): Add braces to ambigous if-else.
2689 (initWithTitle): Put () around assignment in if statement.
2690 (ns_menu_show): Remove unused variables window and keymap.
2691 (update_frame_tool_bar): Remove unused variable selected_p.
2692 (initWithContentRect): Remove unused variable this_cmd_name.
2694 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
2696 (setXBMColor): Remove unused variable len.
2697 (setPixmapData): Put () around assignment in loop statement.
2699 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
2700 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
2702 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
2703 around assignment in loop statement.
2704 (nsfont_open): Remove unused variable i.
2705 (nsfont_open): Remove unused variable len.
2706 (nsfont_draw): Remove unused variable cs.
2708 * nsfns.m (x_set_icon_name, ns_set_name_internal)
2709 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
2710 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
2711 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
2712 (Fns_font_name, Fns_perform_service)
2713 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
2714 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
2715 (ns_set_name): Remove unused variable view.
2716 (x_set_menu_bar_lines): Remove unused variable olines.
2717 (x_set_tool_bar_lines): Remove unused variable root_window.
2718 (Fns_list_colors): Put () around assignment in while statement.
2719 (Fns_perform_service): Remove unused variable len.
2720 (Fns_display_usable_bounds): Remove unused variable top.
2721 (syms_of_nsfns): Remove unused variable i.
2723 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
2726 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2728 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
2729 and free it with DestroyExceptionInfo (Bug#11558).
2731 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
2733 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
2734 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
2735 Set here, not in nt/config.nt.
2737 2012-07-13 Eli Zaretskii <eliz@gnu.org>
2739 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
2740 cursor overflow into the last glyph on display line when the right
2741 fringe is off. (Bug#11832)
2743 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
2745 * xdisp.c (produce_special_glyphs): Now static.
2746 * dispextern.h (produce_special_glyphs): Remove decl.
2748 2012-07-13 Glenn Morris <rgm@gnu.org>
2750 * s/bsd-common.h, s/cygwin.h: Remove empty files.
2751 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
2753 * s/usg5-4-common.h (USG, USG5):
2754 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
2755 * s/sol2-6.h (SOLARIS2):
2756 * s/irix6-5.h (IRIX6_5):
2757 * s/hpux10-20.h (USG, USG5, HPUX):
2758 * s/gnu-linux.h (USG, GNU_LINUX):
2759 * s/freebsd.h (BSD_SYSTEM):
2760 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
2761 * s/cygwin.h (CYGWIN):
2762 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
2763 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
2765 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
2767 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
2769 2012-07-13 Glenn Morris <rgm@gnu.org>
2771 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
2773 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
2775 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
2776 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
2778 2012-07-12 Glenn Morris <rgm@gnu.org>
2780 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
2782 * process.c (init_process_emacs): Rename from init_process.
2783 The old name is also the name of a Mach system call.
2784 * lisp.h, emacs.c: Update for this name change.
2785 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
2788 2012-07-12 Eli Zaretskii <eliz@gnu.org>
2790 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
2791 memmove call that removes glyphs covered by the left truncation
2792 glyph. Improve commentary.
2793 (display_line): Fix display of continuation glyphs on GUI frames
2794 when the right fringe is turned off and variable-size fonts are
2795 used in the window. Move the code that appends a stretch glyph to
2796 produce_special_glyphs, so that it could be used for truncation
2797 and continuation glyphs alike.
2798 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
2799 glyph of a suitably computed width, to align the special glyphs at
2800 the window margin. Code moved from display_line. (Bug#11832)
2802 2012-07-12 Glenn Morris <rgm@gnu.org>
2804 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
2806 * s/gnu-linux.h, s/hpux10-20.h:
2807 Do not unconditionally define HAVE_XRMSETDATABASE.
2809 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
2811 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
2813 Fix typos that broke OS X build.
2814 Reported by Randal L. Schwartz in
2815 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
2816 * nsterm.m (ns_timeout): Add missing local decl.
2817 (ns_get_color): snprintf -> sprintf, to fix typo.
2819 2012-07-12 Glenn Morris <rgm@gnu.org>
2821 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
2822 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
2823 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
2824 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
2826 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
2827 Move PTY_OPEN to configure.
2829 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
2830 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
2831 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
2833 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
2835 Use empty_unibyte_string where applicable.
2836 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
2837 * lread.c (read1): Likewise.
2838 * xsettings.c (syms_of_xsettings): Likewise.
2840 2012-07-12 Glenn Morris <rgm@gnu.org>
2842 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
2843 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
2844 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
2845 * s/hpux10-20.h (RUN_TIME_REMAP):
2846 * s/bsd-common.h (TABDLY): Move to configure.
2848 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
2850 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
2852 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
2853 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
2855 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
2857 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
2858 * s/template.h: Move NARROWPROTO to configure.
2860 2012-07-11 Glenn Morris <rgm@gnu.org>
2862 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
2863 unused since 2011-01-17 change to systty.h.
2865 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
2866 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
2867 Move HAVE_PTYS and HAVE_SOCKETS to configure.
2869 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2871 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
2873 2012-07-11 Glenn Morris <rgm@gnu.org>
2875 * s/darwin.h, s/gnu-linux.h, s/template.h:
2876 Move INTERRUPT_INPUT to configure.
2878 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2880 Minor adjustments to interning code.
2881 * lisp.h (intern, intern_c_string): Redefine as static inline
2882 wrappers for intern_1 and intern_c_string_1, respectively.
2883 (intern_1, intern_c_string_1): Rename prototypes.
2884 * lread.c (intern_1, intern_c_string_1, oblookup):
2885 Simplify Vobarray checking.
2886 * font.c (font_intern_prop): Likewise. Adjust comment.
2887 * w32font.c (intern_font_name): Likewise.
2889 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
2891 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
2893 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
2894 of Fcar/Fcdr if possible.
2895 * font.c (check_otf_features): Likewise.
2896 * fontset.c (Fnew_fontset): Likewise.
2897 * gnutls.c (Fgnutls_boot): Likewise.
2898 * minibuf.c (read_minibuf): Likewise.
2899 * msdos.c (IT_set_frame_parameters): Likewise.
2900 * xmenu.c (Fx_popup_dialog): Likewise.
2901 * w32menu.c (Fx_popup_dialog): Likewise.
2903 2012-07-11 Glenn Morris <rgm@gnu.org>
2905 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
2906 since nothing has defined it on these platforms.
2908 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
2909 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
2911 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
2912 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
2913 Move CLASH_DETECTION to configure.
2915 * s/gnu.h: Remove file, which is now empty.
2917 * s/gnu.h, s/gnu-linux.h:
2918 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
2920 2012-07-11 John Wiegley <johnw@newartisans.com>
2922 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
2923 function attribute, so we only use it if it exists in the
2926 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2928 Avoid call to strlen in fast_c_string_match_ignore_case.
2929 * search.c (fast_c_string_match_ignore_case): Change to use
2930 length argument. Adjust users accordingly.
2931 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
2933 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2935 Assume mkdir, rmdir.
2936 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
2937 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
2940 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
2943 * s/hpux10-20.h (HAVE_PERROR): Remove.
2944 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
2945 Remove dummy definition, as this problem was obsolete long ago.
2948 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
2950 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2952 Avoid calls to strlen in font processing functions.
2953 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
2954 (font_open_by_name): Change to use length argument.
2955 Adjust users accordingly.
2956 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
2958 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
2959 Change to return ptrdiff_t.
2960 (xfont_list_pattern, xfont_match): Use length returned by
2961 xfont_decode_coding_xlfd.
2962 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
2964 2012-07-11 Glenn Morris <rgm@gnu.org>
2966 * s/darwin.h, s/freebsd.h, s/netbsd.h:
2967 Move DONT_REOPEN_PTY to configure.
2969 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
2970 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
2972 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
2974 Remove "#define unix" that is no longer needed (Bug#11905).
2975 * s/aix4-2.h (unix): Remove; no longer needed.
2977 EMACS_TIME simplification (Bug#11875).
2978 This replaces macros (which typically do not work in GDB)
2979 with functions, typedefs and enums, making the code easier to debug.
2980 The functional style also makes code easier to read and maintain.
2981 * systime.h: Include <sys/time.h> on all hosts, not just if
2982 WINDOWSNT, since 'struct timeval' is needed in general.
2983 (EMACS_TIME): Now a typedef, not a macro.
2984 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
2986 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
2987 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
2988 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
2989 (EMACS_TIME_LE): Now functions, not macros.
2990 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
2991 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
2992 which are not functions. All uses rewritten to use:
2993 (make_emacs_time): New function.
2994 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
2995 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
2996 not functions. All uses rewritten to use the following, respectively:
2997 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
2998 (add_emacs_time, sub_emacs_time): New functions.
2999 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
3000 * fileio.c (Fcopy_file):
3001 * xterm.c (XTflash): Get the current time closer to when it's used.
3002 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
3004 * bytecode.c (targets): Suppress -Woverride-init warnings.
3006 Simplify by avoiding confusing use of strncpy etc.
3007 * doc.c (Fsnarf_documentation):
3008 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
3009 * frame.c (Fmake_terminal_frame):
3010 * gtkutil.c (get_utf8_string):
3012 * nsmenu.m (ns_update_menubar):
3013 * regex.c (regerror):
3014 Prefer memcpy to strncpy and strncat when either will do.
3015 * fileio.c (Fsubstitute_in_file_name):
3016 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
3017 (menu_separator_name_p):
3018 * nsmenu.m (ns_update_menubar):
3019 Prefer memcmp to strncmp when either will do.
3020 * nsterm.m: Include <ftoastr.h>.
3022 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
3023 Prefer snprintf to strncpy.
3024 * nsterm.m (ns_term_init):
3025 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
3026 * nsterm.m (ns_term_init):
3027 Avoid the need for strncpy, by using build_string or
3028 make_unibyte_string directly. Use dtoastr, not snprintf.
3029 * process.c (Fmake_network_process): Diagnose service names that
3030 are too long, rather than silently truncating them or creating
3031 non-null-terminated names.
3032 (Fnetwork_interface_info): Likewise, for interface names.
3033 * sysdep.c (system_process_attributes) [GNU_LINUX]:
3034 Prefer sprintf to strncat.
3035 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
3036 Prefer vsnprintf to vsprintf + strncpy.
3038 2012-07-10 Glenn Morris <rgm@gnu.org>
3040 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
3041 Clarify fallback case.
3043 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3045 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
3046 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
3047 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
3048 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
3049 where argument type is known to be a Lisp_Cons.
3051 2012-07-10 Tom Tromey <tromey@redhat.com>
3053 * bytecode.c (BYTE_CODE_THREADED): New macro.
3054 (BYTE_CODES): New macro. Replaces all old byte-code defines.
3055 (enum byte_code_op): New type.
3056 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
3057 (exec_byte_code): Use them. Use token threading when applicable.
3059 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3061 Optimize pure C strings initialization.
3062 * lisp.h (make_pure_string): Fix prototype.
3063 (build_pure_c_string): New function, defined as static inline. This
3064 provides a better opportunity to optimize away calls to strlen when
3065 the function is called with compile-time constant argument.
3066 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
3067 argument, adjust users accordingly. Use build_pure_c_string where
3069 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
3070 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
3071 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
3073 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3075 Avoid calls to strlen in miscellaneous functions.
3076 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
3077 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
3078 * lread.c (openp): Likewise.
3080 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3082 Avoid calls to strlen in path processing functions.
3083 * fileio.c (file_name_as_directory): Add comment. Change to add
3084 srclen argument and return the length of result. Adjust users
3086 (directory_file_name): Fix comment. Change to add srclen argument,
3087 swap 1st and 2nd arguments to obey the common convention.
3088 Adjust users accordingly.
3089 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
3091 2012-07-10 Glenn Morris <rgm@gnu.org>
3093 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
3094 Move PENDING_OUTPUT_COUNT definition to configure.
3096 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
3097 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
3098 * s/gnu.h (DATA_START): Move definitions to configure.
3100 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
3101 We include usg5-4-common.h, which defines them both.
3103 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
3104 O_RDONLY already includes it).
3106 Stop ns builds setting the EMACSLOADPATH environment variable.
3107 * nsterm.m (ns_load_path): Rename from ns_init_paths.
3108 Now it does not set EMACSLOADPATH, just returns the load-path string.
3109 * nsterm.h: Update accordingly.
3110 * lread.c [HAVE_NS]: Include nsterm.h.
3111 (init_lread) [HAVE_NS]: Use ns_load_path.
3112 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
3114 2012-07-09 Glenn Morris <rgm@gnu.org>
3116 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
3117 since the included bsd-common.h does so.
3119 Stop ns builds setting the EMACSPATH environment variable.
3120 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
3121 (ns_init_paths): Do not set EMACSPATH.
3122 * nsterm.h (ns_exec_path): Add it.
3123 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
3126 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
3128 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
3130 * process.c (wait_reading_process_output): 'waitchannels' was unset
3131 when read_kbd || !NILP (wait_for_cell); fix this.
3133 Add GCC-style 'const' attribute to functions that can use it.
3134 * character.h (char_resolve_modifier_mask):
3135 * keyboard.h (make_ctrl_char):
3136 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
3137 (init_character_once, next_almost_prime, init_fns, init_image)
3138 (flush_pending_output, init_sound):
3139 * mem-limits.h (start_of_data):
3140 * menu.h (finish_menu_items):
3141 Add ATTRIBUTE_CONST.
3142 * emacs.c (DEFINE_DUMMY_FUNCTION):
3143 Declare the dummy function with ATTRIBUTE_CONST.
3144 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
3145 Add decls with ATTRIBUTE_CONST.
3147 Minor improvements to make_formatted_string.
3148 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
3149 where int is good enough, as vsprintf returns an int.
3150 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
3152 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3154 Use make_formatted_string to avoid double length calculation.
3155 * lisp.h (make_formatted_string): New prototype.
3156 * alloc.c (make_formatted_string): New function.
3157 * buffer.c (Fgenerate_new_buffer_name): Use it.
3158 * dbus.c (syms_of_dbusbind): Likewise.
3159 * editfns.c (Fcurrent_time_zone): Likewise.
3160 * filelock.c (get_boot_time): Likewise.
3161 * frame.c (make_terminal_frame, set_term_frame_name)
3162 (x_report_frame_params): Likewise.
3163 * image.c (gs_load): Likewise.
3164 * minibuf.c (get_minibuffer): Likewise.
3165 * msdos.c (dos_set_window_size): Likewise.
3166 * process.c (make_process): Likewise.
3167 * xdisp.c (ensure_echo_area_buffers): Likewise.
3168 * xsettings.c (apply_xft_settings): Likewise.
3170 2012-07-09 Glenn Morris <rgm@gnu.org>
3172 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
3173 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
3174 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
3175 * nsterm.h (ns_etc_directory): Add it.
3176 * callproc.c [HAVE_NS]: Include nsterm.h.
3177 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
3179 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
3181 Move marker debugging code under MARKER_DEBUG.
3182 * marker.c (MARKER_DEBUG): Move marker debugging code under
3183 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
3184 for bootstrap with --enable-checking (~3x slowdown reported
3185 by Juanma Barranquero <lekktu@gmail.com>).
3186 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
3188 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
3190 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
3191 See <http://bugs.gnu.org/11825#29>.
3193 2012-07-08 Eli Zaretskii <eliz@gnu.org>
3195 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
3196 has no font, use the frame's font. (Bug#11813)
3197 (display_line): Add commentary about displaying truncation glyphs
3199 (produce_special_glyphs): Move here from term.c.
3201 * term.c (produce_special_glyphs): Move to xdisp.c.
3203 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
3206 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
3208 * xdisp.c (display_line): Avoid warning about implicit declaration
3211 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
3213 * lisp.h: Remove empty conditional.
3215 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
3217 * lread.c (load_path_check): Now static.
3219 Fix some minor --with-ns problems found by static checking.
3220 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
3221 (x_set_font) [!HAVE_X_WINDOWS]:
3222 * image.c (xpm_load_image) [HAVE_NS]:
3223 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
3224 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
3225 Remove unused local.
3226 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
3227 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
3228 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
3229 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
3230 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
3231 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
3232 Fix pointer signedness problem.
3233 * xfaces.c (FRAME_X_FONT_TABLE):
3234 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
3236 2012-07-07 Glenn Morris <rgm@gnu.org>
3238 * lread.c (load_path_check): New function, split from init_lread.
3239 (init_lread): Reorganize. Motivation:
3240 If EMACSLOADPATH is set, check/warn about that rather than the
3241 defaults, which we are not going to use. Hence we can remove
3242 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
3243 Don't warn if site-lisp directories are missing.
3244 If not installed, start from a blank load-path, since
3245 PATH_LOADSEARCH refers to the eventual installation directories.
3247 2012-07-07 Eli Zaretskii <eliz@gnu.org>
3249 Support truncation and continuation glyphs on GUI frames, when
3250 fringes are disabled. (Bug#11832)
3251 * xdisp.c (init_iterator): Get dimensions of truncation and
3252 continuation glyphs even if on GUI frames.
3253 Adjust it->last_visible_x on GUI frames when the left or right fringes,
3254 or both, are absent.
3255 (start_display, move_it_in_display_line_to): Handle the case of a
3256 GUI frame without a fringe to display continuation or truncation
3258 (insert_left_trunc_glyphs): Support GUI frames: make sure
3259 truncation glyphs overwrite enough glyphs from the current line to
3260 have sufficient space in pixels.
3261 (display_line): Support truncation and continuation glyphs on GUI
3262 frames. If some spare pixels are left on the line after inserting
3263 the truncation glyphs, fill that space with a stretch glyph of a
3264 suitably computed width.
3266 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
3267 produce_glyphs, to support GUI sessions.
3269 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
3271 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
3273 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
3275 Do not require float-time's arg to fit in time_t (Bug#11825).
3276 This works better on hosts where time_t is unsigned, and where
3277 float-time is applied to the (negative) difference between two times.
3278 * editfns.c (decode_time_components): Last arg is now double *,
3279 not int *, and means to store all the result as a double, without
3280 worrying about whether the seconds part fits in time_t.
3281 All callers changed.
3282 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
3283 All callers changed.
3284 (Ffloat_time): Do not fail merely because the specified time falls
3285 outside of time_t range.
3287 2012-07-07 Glenn Morris <rgm@gnu.org>
3289 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
3290 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
3291 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
3293 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
3295 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
3296 Update dependencies.
3298 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
3300 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3302 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
3303 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
3304 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
3305 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
3306 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
3307 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
3309 * xfont.c (compare_font_names): Redo to omit the need for casts.
3311 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
3313 * xfns.c (Fx_change_window_property): Doc fix.
3314 * w32fns.c (Fx_change_window_property): Doc fix.
3316 * w32fns.c (Fx_window_property): Accept the same arguments as the
3317 X Windows version. Doc fix.
3318 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
3320 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
3321 Eli Zaretskii <eliz@gnu.org>
3323 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
3324 Windows-specific code from nt/config.nt moved here.
3325 Obsolete settings removed.
3327 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3329 * process.c: Avoid unnecessary calls to gettime.
3330 (wait_reading_process_output): Don't get the time of day
3331 when gobbling data immediately and not waiting, as there's no need
3332 for it in that case. This removes a FIXME.
3334 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
3336 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
3337 is defined (Bug#11768).
3339 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3341 Fix marker debugging code.
3342 * marker.c (byte_char_debug_check): Do not perform the check
3343 if buffer is not multibyte.
3344 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3345 Call byte_char_debug_check with correct arguments.
3347 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3349 Compile marker debugging code only if ENABLE_CHECKING is defined.
3350 * marker.c (byte_char_debug_check, count_markers):
3351 Use only if ENABLE_CHECKING is defined.
3352 (byte_debug_flag): Remove.
3353 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3354 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
3356 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3358 Avoid code repetition in marker-related functions.
3359 * marker.c (attach_marker): New function.
3360 (Fset_marker, set_marker_restricted, set_marker_both)
3361 (set_marker_restricted_both): Use it.
3362 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
3363 Consistently rename charno to charpos.
3364 (marker_position): Add eassert.
3365 (marker_byte_position): Convert to eassert.
3367 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3369 Simplify list operations in unchain_overlay and unchain_marker.
3370 * buffer.c (unchain_overlay): Simplify. Add comment.
3371 * marker.c (unchain_marker): Simplify. Fix comments.
3373 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3375 Introduce fast path for the widely used marker operation.
3376 * alloc.c (build_marker): New function.
3377 * lisp.h (build_marker): New prototype.
3378 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
3379 * composite.c (autocmp_chars): Likewise.
3380 * editfns.c (buildmark): Remove.
3381 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
3382 (save_restriction_save): Use build_marker.
3383 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
3384 * window.c (save_window_save): Likewise.
3386 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3388 Do not use Fdelete_overlay in delete_all_overlays
3389 to avoid redundant calls to unchain_overlay.
3390 * buffer.c (drop_overlay): New function.
3391 (delete_all_overlays, Fdelete_overlay): Use it.
3392 * minibuf.c (get_minibuffer): Fix comment.
3394 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3396 Port to OpenBSD 5.1 amd64.
3397 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
3398 This is needed for OpenBSD, and should be harmless on all BSD systems.
3399 Also, include <sys/sysctl.h>, as it should be available on all
3400 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
3401 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
3402 use p_pid member, not kp_proc.pid.
3404 2012-07-06 Glenn Morris <rgm@gnu.org>
3406 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
3408 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3410 More xmalloc and related cleanup.
3411 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
3412 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
3413 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
3414 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
3415 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
3416 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
3417 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
3418 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
3419 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
3421 Omit needless casts involving void * pointers and allocation.
3422 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
3423 as the former is more robust if P's type is changed.
3424 Prefer xzalloc to xmalloc + memset 0.
3425 Simplify malloc-or-realloc to realloc.
3426 Don't worry about xmalloc returning a null pointer.
3427 Prefer xstrdup to xmalloc + strcpy.
3428 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
3430 * keyboard.c (apply_modifiers_uncached): Prefer local array to
3431 alloca of a constant.
3433 2012-07-05 Eli Zaretskii <eliz@gnu.org>
3435 * xdisp.c (display_line): Fix horizontal pixel coordinates when
3436 hscroll is larger than the line width. Fixes long and futile
3437 looping inside extend_face_to_end_of_line (on a TTY) producing
3438 glyphs that are not needed and thrown away.
3440 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3442 * marker.c (set_marker_restricted_both): Simplify by using
3445 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3447 * editfns.c (region_limit): Simplify by using clip_to_bounds.
3449 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
3451 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
3452 not defined (Bug#11768).
3453 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
3454 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
3455 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
3456 followed by gtk_box_set_homogeneous (Bug#11768).
3457 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
3458 (update_theme_scrollbar_width, xg_create_scroll_bar):
3459 Use gtk_scrollbar_new (Bug#11768).
3460 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
3461 (is_box_type): New function (Bug#11768).
3462 (xg_tool_item_stale_p): Call is_box_type.
3463 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
3464 with default display (Bug#11768).
3466 2012-07-05 Eli Zaretskii <eliz@gnu.org>
3468 * xdisp.c (window_hscroll_limited): New function.
3469 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
3470 coordinates when window's hscroll is set to insanely large
3473 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
3475 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
3476 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
3478 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3481 * lisp.h (xzalloc): New prototype. Omit needless casts.
3482 * alloc.c (xzalloc): New function. Omit needless casts.
3483 * charset.c: Omit needless casts. Convert all calls to
3484 xmalloc with following memset to xzalloc.
3485 * dispnew.c: Likewise.
3486 * fringe.c: Likewise.
3487 * image.c: Likewise.
3488 * sound.c: Likewise.
3490 * w32fns.c: Likewise.
3491 * w32font.c: Likewise.
3492 * w32term.c: Likewise.
3493 * xfaces.c: Likewise.
3495 * xterm.c: Likewise.
3496 * atimer.c: Omit needless casts.
3497 * buffer.c: Likewise.
3498 * callproc.c: Likewise.
3500 * coding.c: Likewise.
3501 * composite.c: Likewise.
3503 * doprnt.c: Likewise.
3504 * editfns.c: Likewise.
3505 * emacs.c: Likewise.
3507 * filelock.c: Likewise.
3509 * gtkutil.c: Likewise.
3510 * keyboard.c: Likewise.
3512 * lread.c: Likewise.
3513 * minibuf.c: Likewise.
3514 * msdos.c: Likewise.
3515 * print.c: Likewise.
3516 * process.c: Likewise.
3517 * region-cache.c: Likewise.
3518 * search.c: Likewise.
3519 * sysdep.c: Likewise.
3520 * termcap.c: Likewise.
3521 * terminal.c: Likewise.
3522 * tparam.c: Likewise.
3523 * w16select.c: Likewise.
3525 * w32reg.c: Likewise.
3526 * w32select.c: Likewise.
3527 * w32uniscribe.c: Likewise.
3528 * widget.c: Likewise.
3529 * xdisp.c: Likewise.
3530 * xmenu.c: Likewise.
3532 * xselect.c: Likewise.
3534 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3536 * fileio.c (time_error_value): Check the right error number.
3537 Problem reported by Troels Nielsen in
3538 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
3540 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3542 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
3543 This should be fixed in a better way; see Eli Zaretskii in
3544 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
3545 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
3547 * fileio.c (time_error_value): Rename from special_mtime.
3548 The old name's problems were noted by Eli Zaretskii in
3549 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
3551 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
3552 This variable's comment says Emacs needs at least one GDB-visible
3553 symbol of type enum pvec_type, to work around GDB problems.
3554 The symbol's value doesn't matter.
3556 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
3557 that causes compilation to fail on pre-C99 compilers.
3559 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
3561 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
3562 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
3564 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3566 * buffer.c (init_buffer_once): Fix initialization of
3567 headers for buffer_defaults and buffer_local_symbols.
3568 Reported by Juanma Barranquero <lekktu@gmail.com>.
3570 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
3572 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
3573 * lisp.h (enum pvec_type): Use fewer bits.
3574 (PSEUDOVECTOR_SIZE_BITS): New constant.
3575 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
3576 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
3577 change in pvec_type.
3578 (PSEUDOVECTOR_TYPEP): New macro.
3579 (TYPED_PSEUDOVECTORP): Use it.
3580 * fns.c (internal_equal): Adapt code to extract pvectype.
3581 * emacs.c (gdb_pvec_type): Update type.
3582 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
3583 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
3584 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
3585 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
3586 (sweep_vectors): Use it. Use local var `total_bytes' instead of
3587 abusing vector->header.next.nbytes.
3588 (live_vector_p): Use PVEC_TYPE.
3589 (mark_object): Adapt code to extract pvectype. Use switch.
3591 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3593 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
3594 Tighten new eassert a bit.
3596 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3598 Fix compilation with --enable-gcc-warnings and -O1
3600 * doprnt.c (doprnt): Change type of tem to int, initialize
3601 to avoid compiler warning. Add eassert.
3602 * search.c (simple_search): Initialize match_byte to avoid
3603 compiler warning. Add eassert.
3605 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3607 Avoid weird behavior with large horizontal scrolls.
3608 Without this change, for example, large hscroll values would
3609 mess up Emacs's display on Fedora 15 x86, presumably due to
3610 overflows in int calculations in the display code.
3611 Also, if buffers had long lines, Emacs would freeze.
3612 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
3613 (set_window_hscroll): New function, containing the old guts of
3614 Fset_window_hscroll. Return the clipped value.
3615 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
3616 This avoids the need to check against PTRDIFF_MAX.
3618 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
3620 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3622 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
3624 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3626 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
3627 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
3628 since GCC 4.4.6 issues a bogus warning for them.
3630 Fix bugs in file timestamp newness comparisons.
3631 * fileio.c (Ffile_newer_than_file_p):
3632 * lread.c (Fload): Use full timestamp resolution of files,
3633 not just the 1-second resolution, so that files that are only
3634 slightly newer still count as newer.
3635 * fileio.c (Ffile_newer_than_file_p): Don't assume file
3636 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
3638 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
3640 * fileio.c: Improve handling of file time marker. (Bug#11852)
3641 (special_mtime): New function.
3642 (Finsert_file_contents, Fverify_visited_file_modtime):
3643 Use it to set special mtime values consistently.
3645 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
3647 * fileio.c (Finsert_file_contents): Properly handle st_mtime
3648 marker for non-existing file. (Bug#11852)
3650 2012-07-03 Glenn Morris <rgm@gnu.org>
3652 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
3653 and did not make it into globals.h).
3655 2012-07-03 Tom Tromey <tromey@redhat.com>
3657 * window.c (Fset_window_margins, Fset_window_fringes)
3658 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
3659 * textprop.c (Fprevious_property_change): No longer static.
3660 * syntax.c (Fsyntax_table_p): No longer static.
3661 * process.c (Fget_process, Fprocess_datagram_address): No longer
3663 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
3664 * keyboard.c (Fcommand_execute): No longer static.
3666 * insdel.c (Fcombine_after_change_execute): No longer static.
3667 * image.c (Finit_image_library): No longer static.
3668 * fileio.c (Fmake_symbolic_link): No longer static.
3669 * eval.c (Ffetch_bytecode): No longer static.
3670 * editfns.c (Fuser_full_name): No longer static.
3671 * doc.c (Fdocumentation_property, Fsnarf_documentation):
3673 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
3675 * dired.c (Ffile_attributes): No longer static.
3676 * composite.c (Fcomposition_get_gstring): No longer static.
3677 * callproc.c (Fgetenv_internal): No longer static.
3679 * ccl.h: Remove EXFUNs.
3680 * buffer.h: Remove EXFUNs.
3681 * dispextern.h: Remove EXFUNs.
3682 * intervals.h: Remove EXFUNs.
3683 * fontset.h: Remove EXFUN.
3684 * font.h: Remove EXFUNs.
3685 * dosfns.c (system_process_attributes): Remove EXFUN.
3686 * keymap.h: Remove EXFUNs.
3687 * lisp.h: Remove EXFUNs.
3688 * w32term.h: Remove EXFUNs.
3689 * window.h: Remove EXFUNs.
3690 * xsettings.h: Remove EXFUN.
3691 * xterm.h: Remove EXFUN.
3693 2012-07-03 Glenn Morris <rgm@gnu.org>
3695 * lisp.h (Frandom): Make it visible to C.
3696 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
3697 buffer for invisible buffers. (Bug#1229)
3699 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3701 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
3702 values which aren't power of 2.
3703 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
3704 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
3707 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
3709 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
3711 * alloc.c (mark_object): Revert part of last patch to use `switch'.
3713 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3715 * alloc.c (allocate_vector_block): Remove redundant
3716 calls to mallopt if DOUG_LEA_MALLOC is defined.
3717 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
3718 avoid calls to mallopt if zero_vector is returned.
3720 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3722 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
3723 is enabled, avoid dereferencing NULL current_sblock if
3726 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3728 Cleanup basic buffer management.
3729 * buffer.h (struct buffer): Change layout to use generic vector
3730 marking code. Fix some comments. Change type of 'clip_changed'
3731 to bitfield. Remove unused #ifndef old.
3732 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
3733 (GET_OVERLAYS_AT): Fix indentation.
3734 (for_each_per_buffer_object_at): New macro.
3735 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
3736 (Fbuffer_local_variables): Use it.
3737 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
3738 * alloc.c (allocate_buffer): Adjust to match new layout of
3739 struct buffer. Fix comment.
3740 (mark_overlay): New function.
3741 (mark_buffer): Use it. Use mark_vectorlike to mark normal
3742 Lisp area of struct buffer.
3743 (mark_object): Use it. Adjust marking of misc objects
3744 and related comments.
3746 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
3748 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
3749 wrapper that is not needed because the wrapped code is a no-op (zero
3750 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
3751 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
3753 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
3755 * alloc.c (mark_buffer): Simplify. Remove prototype.
3756 (mark_object): Add comment. Reorganize marking of vector-like
3757 objects. Use CHECK_LIVE for all vector-like objects except buffers
3758 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
3759 Avoid redundant calls to mark_vectorlike for bool vectors.
3761 2012-06-30 Glenn Morris <rgm@gnu.org>
3763 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
3765 * epaths.in (PATH_SITELOADSEARCH): New.
3766 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
3767 This is rather than relying on --enable-locallisppath elements
3768 having "site-lisp" in their names. (Bug#10208#25, 11658)
3770 2012-06-30 Eli Zaretskii <eliz@gnu.org>
3772 * w32proc.c (sys_select): Accept and ignore one more argument.
3774 * w32.c (emacs_gnutls_pull): Call select with one more argument.
3776 * sysselect.h [DOS_NT]: Don't include sys/select.h.
3777 (pselect) [!MS_DOS]: Redirect to sys_select.
3779 * sysdep.c: Don't include dos.h and dosfns.h.
3781 * process.c (sys_select):
3782 * msdos.c (sys_select): Accept one more argument and ignore it.
3784 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
3785 adapt data types and code to that.
3788 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
3789 which clashes with the gnulib function of the same name.
3791 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
3793 * font.c (font_style_to_value, font_style_symbolic)
3794 (font_prop_validate_style): Add type checks for values in
3797 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
3799 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
3802 2012-06-29 Eli Zaretskii <eliz@gnu.org>
3804 * xdisp.c (try_window_id): Undo last change.
3806 * w32.c (getwd): Adjust commentary about startup_dir.
3807 (init_environment): Always call sys_access, even in non-MSVC
3808 builds. Don't chdir to the directory of the Emacs executable.
3809 This undoes code from 1997 which was justified by the need to
3810 "avoid conflicts when removing and renaming directories". But its
3811 downside was that every relative file name was being interpreted
3812 relative to the directory of the Emacs executable, which can never
3813 be TRT. In particular, it broke sys_access when called with
3814 relative file names.
3815 (sys_access): Map GetLastError to errno.
3817 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3819 * window.h (struct window): Change type of 'fringes_outside_margins'
3820 to bitfield. Fix comment. Adjust users accordingly.
3821 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
3823 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
3826 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
3828 * gnutls.c (emacs_gnutls_handshake):
3829 Add QUIT to make the loop interruptible.
3831 2012-06-29 Glenn Morris <rgm@gnu.org>
3833 * charset.c (init_charset): Make lack of etc/charsets fatal.
3835 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3837 * editfns.c (region_limit): Fix type mismatch.
3839 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3841 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
3842 undefined. Convert from xassert to eassert.
3843 * nsmenu.m: Convert from xassert to eassert.
3844 * nsterm.m: Likewise.
3846 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
3848 * editfns.c (region_limit): Clip to narrowing (bug#11770).
3850 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
3852 Avoid integer overflow on scroll-left and scroll-right.
3853 * window.c (HSCROLL_MAX): New macro.
3854 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
3855 overflow when requested scroll falls outside ptrdiff_t range.
3857 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3859 * window.h (struct window): Change type of 'hscroll',
3860 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
3861 'last_modified' and 'last_overlay_modified' to EMACS_INT.
3862 Adjust users accordingly.
3863 * xdisp.c (try_cursor_movement): Replace type check with eassert.
3864 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
3865 from EMACS_INT to ptrdiff_t.
3866 (make_window): Omit redundant initialization.
3868 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
3870 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
3872 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3874 * window.h (struct window): Change type of 'use_time' and
3875 'sequence_number' from Lisp_Object to int.
3876 * frame.c (make_frame): Adjust users accordingly.
3877 * print.c (print_object): Likewise.
3878 * window.c (select_window, Fwindow_use_time, make_parent_window)
3879 (make_window): Likewise.
3881 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3883 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
3884 enabled with --enable-checking=[all,glyphs] configure option.
3885 Fix GLYPH_DEBUG usage assuming that it may be undefined,
3886 adjust comments accordingly.
3887 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
3888 undefined, adjust comments accordingly.
3889 * image.c: Likewise.
3890 * scroll.c: Likewise.
3891 * w32fns.c: Likewise.
3892 * w32term.c: Likewise.
3893 * xdisp.c: Likewise.
3894 * xfaces.c: Likewise.
3896 * xterm.c: Likewise.
3898 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3900 Generalize run-time debugging checks.
3901 * dispextern.h (XASSERTS): Remove.
3902 * fontset.c (xassert): Remove.
3903 Convert from xassert to eassert.
3904 * alloc.c: Convert from xassert to eassert.
3906 * dispnew.c: Likewise.
3908 * fringe.c: Likewise.
3909 * ftfont.c: Likewise.
3910 * gtkutil.c: Likewise.
3911 * image.c: Likewise.
3912 * keyboard.c: Likewise.
3914 * process.c: Likewise.
3915 * scroll.c: Likewise.
3916 * sound.c: Likewise.
3918 * w32console.c: Likewise.
3919 * w32fns.c: Likewise.
3920 * w32term.c: Likewise.
3921 * window.c: Likewise.
3922 * xdisp.c: Likewise.
3923 * xfaces.c: Likewise.
3925 * xselect.c: Likewise.
3926 * xterm.c: Likewise.
3928 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
3930 * fns.c (maybe_resize_hash_table): Output message when growing the
3933 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3935 * alloc.c (allocate_string_data): Remove dead code.
3936 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
3937 avoid GCC warning about unused macro.
3939 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3941 * alloc.c (allocate_string): Omit intervals initialization.
3942 * alloc.c (make_uninit_multibyte_string): Initialize intervals
3943 as in make_pure_string and make_pure_c_string.
3945 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3947 * alloc.c (allocate_string): Fix last change.
3949 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3951 * alloc.c (allocate_string): Remove two redundant calls
3952 to memset, add explicit initialization where appropriate.
3954 2012-06-27 Glenn Morris <rgm@gnu.org>
3956 * lisp.mk (lisp): Remove paths.elc.
3958 2012-06-27 Chong Yidong <cyd@gnu.org>
3960 * doc.c (Fsubstitute_command_keys): Fix punctuation.
3962 2012-06-26 John Wiegley <johnw@newartisans.com>
3964 * unexmacosx.c (copy_data_segment): Add two section names used
3965 on Mac OS X Lion: __mod_init_func and __mod_term_func.
3967 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
3968 when building with Clang.
3970 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
3972 * eval.c (Fapply): Allow calling it with a single argument.
3974 2012-06-26 Eli Zaretskii <eliz@gnu.org>
3976 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
3977 _stricmp and _strnicmp.
3978 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
3980 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3982 * alloc.c (allocate_window): Zero out non-Lisp part of newly
3984 (allocate_process): Likewise for new process.
3985 (allocate_terminal): Change to use offsetof.
3986 (allocate_frame): Likewise.
3987 * frame.c (make_frame): Omit redundant initialization.
3988 * window.c (make_parent_window): Use memset.
3989 (make_window): Omit redundant initialization.
3990 * process.c (make_process): Omit redundant initialization.
3991 * terminal.c (create_terminal): Likewise.
3993 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3995 * term.c (delete_tty): Remove redundant call to memset.
3997 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3999 * alloc.c: Remove build_string.
4000 * lisp.h: Define build_string as static inline. This provides
4001 a better opportunity to optimize away calls to strlen when the
4002 function is called with compile-time constant argument.
4003 * image.c (imagemagick_error): Convert to build_string.
4004 * w32proc.c (sys_spawnve): Likewise.
4005 * xterm.c (x_term_init): Likewise.
4007 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
4009 Use sprintf return value instead of invoking strlen on result.
4010 In the old days this wasn't portable, since some sprintf
4011 implementations returned char *. But they died out years ago and
4012 Emacs already assumes sprintf returns int.
4013 Similarly for float_to_string.
4014 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
4015 * ccl.c (ccl_driver):
4016 * character.c (string_escape_byte8):
4017 * data.c (Fnumber_to_string):
4018 * doprnt.c (doprnt):
4019 * print.c (print_object):
4020 * xdisp.c (message_dolog):
4021 * xfns.c (syms_of_xfns):
4022 Use sprintf or float_to_string result to avoid need to call strlen.
4023 * data.c (Fnumber_to_string):
4024 Use make_unibyte_string, since the string must be ASCII.
4025 * lisp.h, print.c (float_to_string): Now returns int length.
4026 * term.c (produce_glyphless_glyph):
4027 Use sprintf result rather than recomputing it.
4029 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
4030 * Makefile.in (ALL_CFLAGS):
4031 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
4032 * gmalloc.c, regex.c: Include <config.h> unconditionally.
4034 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4036 * dispextern.h (xstrcasecmp): Define to library function
4037 strcasecmp if available.
4038 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
4040 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
4042 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
4043 Avoid comma operator.
4044 * menu.c (push_submenu_start, push_submenu_end)
4045 (push_left_right_boundary, push_menu_pane): Likewise.
4046 * msdos.c (dos_rawgetc): Likewise.
4048 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4050 * xfns.c (xic_create_fontsetname): Remove redundant calls
4053 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
4055 * gtkutil.c (get_utf8_string): Remove redundant assignment.
4056 sprintf already null-terminates its output.
4058 * xfns.c (x_window): Remove redundant cast.
4060 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4062 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
4063 `const char *' to `char *' to avoid compiler warning.
4065 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4067 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
4068 instead of truncating it to 63 (admittedly a generous limit).
4070 * process.c: Fix spelling and caps in comments.
4072 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
4074 * emacs.c (setpgrp): Remove definition, unused.
4075 * sysdep.c (setpgrp): Remove definition, not used in this file.
4077 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
4079 * makefile.w32-in: Update dependencies.
4081 2012-06-24 Eli Zaretskii <eliz@gnu.org>
4083 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
4084 (SYSTIME_H): Add nt/inc/sys/time.h.
4086 * systime.h [WINDOWSNT]: Include sys/time.h.
4088 * s/ms-w32.h (struct timespec): Definition moved from
4089 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
4091 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4093 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
4094 * buffer.h (buffer_slot_type_mismatch):
4095 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4096 * eval.c (unwind_to_catch):
4097 * image.c (my_png_error, my_error_exit):
4098 * keyboard.c (quit_throw_to_read_char, user_error)
4099 (Fexit_recursive_edit, Fabort_recursive_edit):
4100 * lisp.h (die, args_out_of_range, args_out_of_range_3)
4101 (wrong_type_argument, buffer_overflow, __executable_start)
4102 (memory_full, buffer_memory_full, string_overflow, Fthrow)
4103 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
4104 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
4106 (child_setup) [!DOS_NT]:
4107 * lread.c (end_of_file_error, invalid_syntax):
4108 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4109 * puresize.h (pure_write_error):
4110 * search.c (matcher_overflow):
4111 * sound.c (sound_perror, alsa_sound_perror):
4112 * sysdep.c, syssignal.h (croak):
4113 * term.c (maybe_fatal, vfatal):
4114 * textprop.c (text_read_only):
4115 * undo.c (user_error):
4116 * unexmacosx.c (unexec_error):
4117 * xterm.c (x_ins_del_lines, x_delete_glyphs):
4118 Use _Noreturn rather than NO_RETURN.
4119 No need for separate decl merely because of _Noreturn.
4120 * sound.c (sound_warning, parse_sound):
4121 Remove unnecessary forward decls.
4123 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4125 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
4126 * lisp.h (WAIT_READING_MAX): New macro.
4127 * dispnew.c (Fsleep_for, sit_for):
4128 * keyboard.c (kbd_buffer_get_event):
4129 * process.c (Faccept_process_output):
4130 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
4131 This improves on the previous patch, which introduced a bug
4132 when time_t is unsigned and as wide as intmax_t.
4133 See <http://bugs.gnu.org/9000#51>.
4135 2012-06-23 Eli Zaretskii <eliz@gnu.org>
4137 * dispnew.c (sit_for, Fsleep_for):
4138 * keyboard.c (kbd_buffer_get_event):
4139 * process.c (Faccept_process_output): Avoid compiler warnings when
4140 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
4142 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
4144 * makefile.w32-in: Update dependencies.
4146 * w32.c (ltime): Add return type and declare static.
4147 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
4149 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
4151 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
4152 Privately reported by Herbert J. Skuhra.
4153 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
4155 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
4156 not make_lisp_timeval, when the argument is of type EMACS_TIME.
4158 2012-06-23 Eli Zaretskii <eliz@gnu.org>
4160 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
4161 last argument of make_unibyte_string.
4163 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
4164 language ID in the event parameters.
4166 * w32term.c (w32_read_socket): Put the new keyboard codepage into
4167 event.code, not the obscure "character set ID".
4169 2012-06-23 Chong Yidong <cyd@gnu.org>
4171 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
4173 2012-06-23 Eli Zaretskii <eliz@gnu.org>
4175 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
4176 * w32.c (fdutimens): New function.
4178 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
4180 * s/ms-w32.h (pselect): Redirect to sys_select.
4182 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
4184 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
4185 in the logic of incrementing and decrementing the value of
4186 use_relocatable_buffers.
4188 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
4190 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
4191 Privately reported by Herbert J. Skuhra.
4192 [__FreeBSD__]: Remove "*/" typo after "#include".
4193 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
4194 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
4195 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
4196 Don't assume EMACS_TIME and struct timeval are the same type.
4198 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
4200 Support higher-resolution time stamps (Bug#9000).
4201 The time stamps are only nanosecond-resolution at the C level,
4202 since that's the best that any real-world system supports now.
4203 But they are picosecond-resolution at the Lisp level, as that's
4204 easy, and leaves room for future OS improvements.
4206 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
4209 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
4210 Don't get current time unless it's needed.
4212 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
4213 now provides it if it's absent.
4214 (start_atimer): Port to higher-res time stamps.
4215 Check for time stamp overflow. Don't get current time more
4216 often than is needed.
4218 * buffer.h (struct buffer): Buffer modtime now has high resolution.
4219 Include systime.h, not time.h.
4220 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
4222 * dired.c: Include stat-time.h.
4223 (Ffile-attributes): File times now have higher resolution.
4225 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
4226 (struct image): Timestamp now has higher resolution.
4228 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
4229 has at least microseconds now. All uses removed.
4230 (update_frame, update_single_window, update_window, update_frame_1)
4231 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
4232 (duration_to_sec_usec): Remove; no longer needed.
4234 * editfns.c (time_overflow): Now extern.
4235 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
4236 (float-time, Fformat_time_string, Fcurrent_time_string)
4237 (Fcurrent_time_zone): Accept and generate higher-resolution
4239 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
4240 (decode_time_components, lisp_seconds_argument): New functions.
4241 (make_time): Now static.
4242 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
4243 Report an error if the time is invalid, rather than having the caller
4246 * fileio.c: Include <stat-time.h>
4247 (Fcopy_file): Copy higher-resolution time stamps.
4248 Prefer to set the time stamp via a file descriptor if that works.
4249 (Fset_file_times, Finsert_file_contents, Fwrite_region)
4250 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
4251 (Fvisited_file_modtime, Fset_visited_file_modtime):
4252 Support higher-resolution time stamps.
4254 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
4256 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
4258 * image.c (prepare_image_for_display, clear_image_cache)
4259 (lookup_image): Port to higer-resolution time stamps.
4261 * keyboard.c (start_polling, bind_polling_period):
4262 Check for time stamp overflow.
4263 (read_char, kbd_buffer_get_event, timer_start_idle)
4264 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
4265 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
4266 Port to higher-resolution time stamps. Do not assume time_t is signed.
4267 (decode_timer): New function. Timers are now vectors of length 9,
4268 not 8, to accommodate the picosecond component.
4269 (timer_check_2): Use it.
4271 * nsterm.m (select_timeout, timeval_subtract): Remove.
4272 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
4273 as they're a bit more accurate and handle overflow better.
4274 (ns_select): Change prototype to be compatible with pselect.
4275 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
4276 * nsterm.h (ns_select): Adjust prototype.
4278 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
4279 us-resolution time stamps.
4280 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
4282 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
4284 * lisp.h (time_overflow): New decl.
4285 (wait_reading_process_output): First arg is now intmax_t, not int,
4286 to accommodate larger waits.
4288 * process.h (struct Lisp_Process.read_output_delay):
4289 Now counts nanoseconds, not microseconds.
4290 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
4292 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
4293 (wait_reading_process_output):
4294 Port to ns-resolution time stamps.
4295 (Faccept_process_output, wait_reading_process_output):
4296 Check for time stamp overflow. Do not assume time_t is signed.
4297 (select_wrapper): Remove; we now use pselect.
4298 (Fprocess_attributes): Now generates ns-resolution time stamps.
4300 * sysdep.c: Include utimens.h. Don't include utime.h
4301 or worry about struct utimbuf; gnulib does that for us now.
4302 (gettimeofday): Remove; gnulib provides a substitute.
4303 (make_timeval): New function.
4304 (set_file_times): Now sets ns-resolution time stamps.
4305 New arg FD; all uses changed.
4306 (time_from_jiffies, ltime_from_jiffies, get_up_time)
4307 (system_process_attributes):
4308 Now returns ns-resolution time stamp. All uses changed.
4309 Check for time stamp overflow.
4311 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
4312 provides a substitute now.
4314 * systime.h: Include timespec.h rather than sys/time.h and time.h,
4315 since it guarantees struct timespec.
4316 (EMACS_TIME): Now struct timespec, so that we can support
4317 ns-resolution time stamps.
4318 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
4319 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
4320 (EMACS_USECS): Remove.
4321 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
4322 so multiply the arg by 1000 before storing it.
4323 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
4325 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
4326 Port to ns-resolution time stamps.
4327 (EMACS_TIME_NEG_P): Remove; replaced by....
4328 (EMACS_TIME_SIGN): New macro.
4329 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
4330 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
4331 (set_file_times, make_time, lisp_time_argument): Adjust signature.
4332 (make_timeval, make_lisp_time, decode_time_components): New decls.
4333 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
4334 that it mishandled time_t overflow. You can't compare by subtracting!
4335 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
4336 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
4338 * term.c: Include <sys/time.h>.
4339 (timeval_to_Time): New function, for proper overflow wraparound.
4340 (term_mouse_position, term_mouse_click): Use it.
4342 * undo.c (record_first_change): Support higher-resolution time stamps
4344 (Fprimitive_undo): Use them when restoring time stamps.
4346 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
4347 (w32_get_internal_run_time):
4348 Port to higher-resolution Emacs time stamps.
4349 (ltime): Now accepts single 64-bit integer, as that's more convenient
4352 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
4354 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
4355 for compatibility with pselect. Support ns-resolution time stamps.
4357 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
4359 * xselect.c (wait_for_property_change, x_get_foreign_selection):
4360 Check for time stamp overflow, and support ns-resolution time stamps.
4362 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
4363 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
4364 (timeval_subtract): Remove; no longer needed.
4365 (XTflash, XTring_bell, x_wait_for_event):
4366 Port to ns-resolution time stamps. Don't assume time_t is signed.
4368 2012-06-22 Chong Yidong <cyd@gnu.org>
4370 * xdisp.c (x_consider_frame_title): Revert last change.
4372 2012-06-22 Eli Zaretskii <eliz@gnu.org>
4374 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
4375 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
4376 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
4377 staticidx goes up to 1597 out of 1600 = 0x640.)
4379 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
4381 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
4382 Otherwise, the umask might be mistakenly 0 while handling input signals.
4384 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
4386 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
4388 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
4390 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
4391 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
4392 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
4393 access to `contents' member of Lisp_Vector objects with AREF and ASET
4396 2012-06-19 Chong Yidong <cyd@gnu.org>
4398 * frame.c (delete_frame): When selecting a frame on a different
4399 text terminal, do not alter the terminal's top-frame.
4401 * xdisp.c (format_mode_line_unwind_data): Record the target
4402 frame's selected window and its terminal's top-frame.
4403 (unwind_format_mode_line): Restore them.
4404 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
4406 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
4407 since tty frames can be explicitly named.
4408 (prepare_menu_bars): Likewise.
4410 * term.c (Ftty_top_frame): New function.
4412 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4414 Port byte-code-meter to modern targets.
4415 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
4416 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
4417 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
4418 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
4419 (METER_1, METER_2): Simplify.
4421 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
4423 * data.c (Fdefalias): Return `symbol' (bug#11686).
4425 2012-06-18 Martin Rudalics <rudalics@gmx.at>
4427 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
4428 gets killed during executing of this function (Bug#11665).
4429 Try to always return Qt when the buffer has been actually killed.
4430 (Vkill_buffer_query_functions): In doc-string say that functions
4431 run by this hook should not change the current buffer.
4433 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4435 Fix recently-introduced process.c problems found by static checking.
4436 * process.c (write_queue_push, write_queue_pop, send_process):
4437 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
4438 (write_queue_pop): Fix pointer signedness problem.
4439 (send_process): Remove unused local.
4441 2012-06-17 Chong Yidong <cyd@gnu.org>
4443 * xdisp.c (redisplay_internal): No need to redisplay terminal
4444 frames that are not on top.
4446 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
4448 * process.c (make_process): Initialize write_queue.
4449 (write_queue_push, write_queue_pop): New functions.
4450 (send_process): Use them to maintain correct ordering of process
4453 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
4455 * lisp.h (eassert): Assume C89 or later.
4456 This removes the need for CHECK.
4457 (CHECK): Remove. Its comments about always evaluating its
4458 argument were confusing, as 'eassert' typically does not evaluate
4461 * coding.c (produce_chars): Use ptrdiff_t, not int.
4463 * xterm.c (x_draw_underwave): Check for integer overflow.
4464 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
4466 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
4468 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
4469 referenced (Bug#11583).
4471 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
4473 Implement wave-style variant of underlining.
4474 * dispextern.h (face_underline_type): New enum.
4475 (face): Add field for underline type.
4476 * nsterm.m (ns_draw_underwave): New function.
4477 (ns_draw_text_decoration): Use it.
4478 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
4480 (x_draw_glyph_string): Use them.
4481 * xfaces.c (Qline, Qwave): New Lisp objects.
4482 (check_lface_attrs, merge_face_ref)
4483 (Finternal_set_lisp_face_attribute, realize_x_face):
4484 Handle wave-style underline face attributes.
4485 * xterm.c (x_draw_underwave): New function.
4486 (x_draw_glyph_string): Use it.
4488 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
4490 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
4491 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
4492 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
4493 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
4494 ($(BLD)/w32select.$(O)): Update dependencies.
4496 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4498 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
4499 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
4500 * character.c (_fetch_multibyte_char_p): Remove.
4501 * alloc.c: Include "character.h" before "buffer.h".
4503 * buffer.c: Likewise.
4504 * bytecode.c: Likewise.
4505 * callint.c: Likewise.
4506 * callproc.c: Likewise.
4507 * casefiddle.c: Likewise.
4508 * casetab.c: Likewise.
4509 * category.c: Likewise.
4511 * coding.c: Likewise.
4512 * composite.c: Likewise.
4513 * dired.c: Likewise.
4514 * dispnew.c: Likewise.
4516 * dosfns.c: Likewise.
4517 * editfns.c: Likewise.
4518 * emacs.c: Likewise.
4519 * fileio.c: Likewise.
4520 * filelock.c: Likewise.
4522 * fontset.c: Likewise.
4523 * fringe.c: Likewise.
4524 * indent.c: Likewise.
4525 * insdel.c: Likewise.
4526 * intervals.c: Likewise.
4527 * keyboard.c: Likewise.
4528 * keymap.c: Likewise.
4529 * lread.c: Likewise.
4530 * macros.c: Likewise.
4531 * marker.c: Likewise.
4532 * minibuf.c: Likewise.
4533 * nsfns.m: Likewise.
4534 * nsmenu.m: Likewise.
4535 * print.c: Likewise.
4536 * process.c: Likewise.
4537 * regex.c: Likewise.
4538 * region-cache.c: Likewise.
4539 * search.c: Likewise.
4540 * syntax.c: Likewise.
4542 * textprop.c: Likewise.
4544 * unexsol.c: Likewise.
4545 * w16select.c: Likewise.
4546 * w32fns.c: Likewise.
4547 * w32menu.c: Likewise.
4548 * window.c: Likewise.
4549 * xdisp.c: Likewise.
4551 * xmenu.c: Likewise.
4553 * xselect.c: Likewise.
4555 2012-06-16 Eli Zaretskii <eliz@gnu.org>
4557 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
4558 If all the glyphs of the glyph row came from strings, and we have no
4559 cursor positioning clues, put the cursor on the first glyph of the
4561 (handle_face_prop): Use chunk-relative overlay string index when
4562 indexing into it->string_overlays array. (Bug#11653)
4563 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
4564 the rightmost. (Bug#11720)
4566 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4568 * category.h (CHAR_HAS_CATEGORY): Define as inline.
4569 (CATEGORY_MEMBER): Enforce 1/0 value.
4570 * category.c (_temp_category_set): Remove.
4572 2012-06-16 Eli Zaretskii <eliz@gnu.org>
4574 * window.c (Fdelete_other_windows_internal)
4575 (Fdelete_window_internal): Don't access frame's mouse highlight
4576 info of the initial frame. (Bug#11677)
4578 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
4580 * .gdbinit (xgetint): Fix recently-introduced paren typo.
4581 Assume USE_2_TAGS_FOR_INTS.
4582 (xreload): Adjust $tagmask width to match recent lisp.h change.
4584 Simplify lisp.h in minor ways that should not affect code.
4585 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
4586 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
4587 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
4588 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
4589 (INTTYPEBITS): New macro, for clarity.
4590 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
4591 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
4592 Simplify now that USE_LSB_TAG is always defined.
4593 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
4594 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
4596 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
4598 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
4600 2012-06-13 Glenn Morris <rgm@gnu.org>
4602 * s/bsd-common.h (BSD4_3):
4603 * s/usg5-4-common.h (USG5_4): No longer define; unused.
4605 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
4607 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
4610 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
4612 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
4613 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
4614 * alloc.c (widen_to_Lisp_Object): Remove.
4615 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
4616 * frame.c (delete_frame): Remove outdated comment.
4617 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
4618 USE_LISP_UNION_TYPE.
4619 (Fw32_unregister_hot_key): Likewise.
4620 (Fw32_toggle_lock_key): Likewise.
4621 * w32menu.c (add_menu_item): Likewise.
4622 (w32_menu_display_help): Use XIL instead of checking
4623 USE_LISP_UNION_TYPE.
4624 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
4625 (init_heap): Likewise.
4626 * w32term.c (w32_read_socket): Update comment.
4628 2012-06-13 Glenn Morris <rgm@gnu.org>
4630 * s/usg5-4-common.h, src/s/unixware.h:
4631 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
4633 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
4635 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
4637 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
4638 * alloc.c (make_number) [!defined make_number]:
4639 Remove, as lisp.h always defines this now.
4640 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
4641 (roundup_size): Verify that it is a power of 2.
4642 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
4643 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
4644 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
4645 -DUSE_LSB_TAG=0, to override the automatically-selected default.
4646 USE_LSB_TAG now is always defined to be either 0 or 1.
4648 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
4649 code works fine either way, and efficiency is not a concern here,
4650 as the union type is for debugging, not for production.
4651 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
4652 Use an inline function on all platforms when using the union type,
4653 since this is simpler and 'static inline' can be used portably
4655 (LISP_INITIALLY_ZERO): New macro.
4656 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
4657 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
4659 2012-06-12 Glenn Morris <rgm@gnu.org>
4661 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
4663 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
4665 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
4666 Move BROKEN_SIGIO to configure.
4668 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
4669 Move NO_TERMIO to configure.
4671 2012-06-12 Chong Yidong <cyd@gnu.org>
4673 * image.c (imagemagick_load_image): Use MagickFlattenImage if
4674 MagickMergeImageLayers is undefined. Use pixel pusher loop if
4675 MagickExportImagePixels is undefined.
4677 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
4679 * image.c (imagemagick_load_image): Remove unused label.
4681 2012-06-11 Glenn Morris <rgm@gnu.org>
4683 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4684 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
4685 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
4686 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
4688 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
4690 * alloc.c (make_byte_code): New function.
4691 (Fmake_byte_code): Use it. Don't purify here.
4692 * lread.c (read1): Use it as well to avoid extra allocation.
4694 2012-06-11 Chong Yidong <cyd@gnu.org>
4696 * image.c (imagemagick_load_image): Implement transparency.
4698 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
4700 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
4701 account for preceding backslashes. (Bug#11663)
4703 2012-06-09 Chong Yidong <cyd@gnu.org>
4705 * term.c: Support italics in capable terminals (Bug#9652).
4706 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
4707 (turn_on_face): Output using TS_enter_italic_mode if available.
4708 Don't handle unused blinking and alt-charset cases.
4709 (turn_off_face): Handle italic case; discard unused tty_blinking_p
4710 and tty_alt_charset_p cases.
4711 (tty_capable_p, init_tty): Support italics.
4713 * termchar.h (struct tty_display_info): Add field for italics.
4714 Remove unused blink field.
4716 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
4719 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
4720 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
4721 tty_alt_charset_p. Add tty_italic_p.
4723 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
4725 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
4726 dbus_type_is_basic if available.
4727 (xd_extract_signed, xd_extract_unsigned): Rename from
4728 extract_signed and extract_unsigned, respectively. Adapt callers.
4730 2012-06-09 Chong Yidong <cyd@gnu.org>
4732 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
4734 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
4737 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
4739 * xdisp.c (vmessage): Treat frame message as multibyte.
4740 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
4741 would generate the diagnostic "Making \302\247 buffer-local while
4744 2012-06-08 Eli Zaretskii <eliz@gnu.org>
4746 * dispnew.c (showing_window_margins_p): Undo last change, which
4747 was done due to an inadvertent commit.
4748 (adjust_frame_glyphs_for_frame_redisplay): Do call
4749 showing_window_margins_p.
4751 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4753 * eval.c (Fmake_var_non_special): New primitive.
4754 (syms_of_eval): Defsubr it.
4755 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
4757 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
4759 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
4760 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
4762 2012-06-08 Eli Zaretskii <eliz@gnu.org>
4764 * alloc.c (allocate_vectorlike): Fix last change.
4766 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
4768 Block-based vector allocation of small vectors.
4769 * lisp.h (struct vectorlike_header): New field `nbytes',
4770 adjust comment accordingly.
4771 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
4772 to denote vector blocks. Adjust users (live_vector_p,
4773 mark_maybe_pointer, valid_lisp_object_p) accordingly.
4774 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
4775 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
4776 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
4777 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
4778 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
4779 (roundup_size): New constant.
4780 (struct vector_block): New data type.
4781 (vector_blocks, vector_free_lists, zero_vector): New variables.
4782 (all_vectors): Rename to `large_vectors'.
4783 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
4784 (sweep_vectors): New functions.
4785 (allocate_vectorlike): Return `zero_vector' as the only vector of
4786 0 items. Allocate new vector from block if vector size is less than
4787 or equal to VBLOCK_BYTES_MAX.
4788 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
4789 (init_alloc_once): Add call to init_vectors.
4791 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4793 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
4795 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
4797 * doprnt.c (doprnt): Truncate multibyte char correctly.
4798 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
4799 would mishandle a string argument "Xc" if X was a multibyte
4800 character of length 2: it would truncate after X's first byte
4801 rather than including all of X.
4803 2012-06-06 Chong Yidong <cyd@gnu.org>
4805 * buffer.c (word_wrap): Doc fix.
4807 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
4809 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
4811 2012-06-03 Glenn Morris <rgm@gnu.org>
4813 * xdisp.c (tool-bar-style): Doc fix.
4815 2012-06-03 Ulrich Müller <ulm@gentoo.org>
4817 * Makefile.in (PAXCTL): Define.
4818 (temacs$(EXEEXT)): Disable memory randomization for the temacs
4819 binary via PaX flags if the paxctl utility is available.
4820 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
4821 Restore PaX flags to their default. (Bug#11398)
4823 2012-06-03 Chong Yidong <cyd@gnu.org>
4825 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
4828 2012-06-03 Chong Yidong <cyd@gnu.org>
4830 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
4831 (note_mode_line_or_margin_highlight): If there is no help echo,
4832 use mode-line-default-help-echo. Handle the case where the mouse
4833 position is past the end of the mode line string.
4835 * buffer.c (buffer_local_value_1): New function, split from
4836 Fbuffer_local_value; can return Qunbound.
4837 (Fbuffer_local_value): Use it.
4838 (Vmode_line_format): Docstring tweaks.
4840 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4842 * sysdep.c (system_process_attributes): Improve comment.
4844 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
4846 * keyboard.c: Export real-this-command to Elisp.
4847 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
4848 and DEFVAR it. Update all users.
4850 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4852 * minibuf.c (Fassoc_string): Remove duplicate declaration.
4854 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
4855 Convert pctcpu and pctmem to Lisp float properly.
4856 Let the compiler fold better, as 100.0/0x8000 is exact.
4858 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
4860 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
4863 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
4865 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
4867 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
4869 For a 'struct window', replace some Lisp_Object fields to
4870 bitfields where appropriate, remove unused fields.
4871 * window.h (struct window): Remove unused 'last_mark_x' and
4872 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
4873 change it's type from Lisp_Object to bitfield.
4874 Change type of 'force_start', 'optional_new_start',
4875 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
4876 fields from Lisp_Object to bitfield. Adjust users accordingly.
4878 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
4880 Pacify gcc -Wdouble-precision when using Xaw.
4881 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
4882 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
4883 Use 'float' consistently, rather than 'float' in most places
4884 and 'double' in a couple of places.
4886 2012-05-31 Eli Zaretskii <eliz@gnu.org>
4888 * xdisp.c (handle_stop): Detect whether we have overlay strings
4889 loaded by testing it->current.overlay_string_index to be
4890 non-negative, instead of checking whether n_overlay_strings is
4891 positive. (Bug#11587)
4893 2012-05-31 Chong Yidong <cyd@gnu.org>
4895 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
4897 * doc.c (Fsubstitute_command_keys): Doc fix.
4899 2012-05-31 Eli Zaretskii <eliz@gnu.org>
4901 * search.c (search_buffer): Remove calls to
4902 r_alloc_inhibit_buffer_relocation, as it is now called by
4903 maybe_unify_char, which was the cause of relocation of buffer text
4906 2012-05-31 Eli Zaretskii <eliz@gnu.org>
4908 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
4909 for the duration of call to load_charset, to avoid problems with
4910 callers of maybe_unify_char that access buffer text through C
4913 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
4914 decrement the inhibition flag, instead of just setting or
4917 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
4919 Remove obsolete '#define static' cruft.
4920 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
4921 This #undef was "temporary" in 2000; it is no longer needed
4922 now that '#define static' has gone away.
4923 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
4924 (gray_bitmap_bits): Remove; no longer needed.
4925 All uses replaced with definiens.
4926 * xterm.c: Include "bitmaps/gray.xbm".
4928 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
4930 Clean up __executable_start, monstartup when --enable-profiling.
4931 The following changes affect the code only when profiling.
4932 * dispnew.c (__executable_start): Rename from safe_bcopy.
4933 Define only on platforms that need it.
4934 * emacs.c: Include <sys/gmon.h> when profiling.
4935 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
4936 (__executable_start): Remove decl, since lisp.h does it now.
4937 (safe_bcopy): Remove decl; no longer has that name.
4938 (main): Coalesce #if into single bit of code, for simplicity.
4939 Cast pointers to uintptr_t, since standard libraries want integers
4941 * lisp.h (__executable_start): New decl.
4943 2012-05-31 Glenn Morris <rgm@gnu.org>
4945 * image.c (Fimagemagick_types): Doc fix.
4947 2012-05-30 Jim Meyering <meyering@redhat.com>
4949 * callproc.c (Fcall_process_region): Include directory component
4950 in mkstemp error message (Bug#11586).
4952 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
4954 * alloc.c, lisp.h (make_pure_vector): Now static.
4956 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
4958 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
4959 Move to byte-run.el.
4960 (Fautoload): Do the hash-doc more carefully.
4961 * data.c (Fdefalias): Purify definition, except for keymaps.
4962 (Qdefun): Move from eval.c.
4963 * lisp.h (Qdefun): Remove.
4964 * lread.c (read1): Tiny simplification.
4966 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
4968 Do not create empty overlays with the evaporate property (Bug#9642).
4969 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
4970 Bug#9642, but explicitly check that the buffer the overlay would
4971 be moved to is live and rearrange lines to make sure that errors
4972 will not put the overlay in an inconsistent state.
4973 (Fdelete_overlay): Cosmetics.
4975 2012-05-28 Eli Zaretskii <eliz@gnu.org>
4977 * w32term.c (my_bring_window_to_top): New function.
4978 (x_raise_frame): Use handle returned by DeferWindowPos, which
4979 could be different from the original one.
4980 Call my_bring_window_to_top instead of my_set_foreground_window.
4983 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
4984 by calling BringWindowToTop.
4986 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
4987 (WM_EMACS_END): Increase by one.
4989 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
4991 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
4992 This avoids undefined behavior that might cause the eassert
4993 to not catch an out-of-range value.
4995 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
4997 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
4998 Update dependencies.
5000 2012-05-27 Eli Zaretskii <eliz@gnu.org>
5002 * bidi.c (bidi_mirror_char): Fix last change.
5004 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
5006 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
5007 when referring to sectname field in printf format.
5009 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
5011 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
5012 Only r_alloc_inhibit_buffer_relocation needed to be added;
5013 the others were already declared.
5015 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
5016 before checking whether it's out of range. Put the check inside
5018 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
5020 2012-05-27 Ken Brown <kbrown@cornell.edu>
5022 * callproc.c (Fcall_process): Restore a line that was accidentally
5023 commented out in the 2011-02-13 change (bug#11547).
5025 2012-05-27 Eli Zaretskii <eliz@gnu.org>
5027 * lisp.h [REL_ALLOC]: Add prototypes for external functions
5028 defined on ralloc.c.
5030 * buffer.c [REL_ALLOC]: Remove prototypes of
5031 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
5032 they are now on lisp.h.
5034 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
5036 * search.c (search_buffer): Use it to inhibit relocation of buffer
5037 text while re_search_2 is doing its job, because re_search_2 is
5038 passed C pointers to buffer text. (Bug#11519)
5040 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
5043 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
5044 state after an additional call to move_it_in_display_line_to, keep
5045 the values of it->max_ascent and it->max_descent found for the
5047 (pos_visible_p): Revert the comparison against bottom_y to what it
5048 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
5051 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5053 Fix coding-related core dumps with gcc -ftrapv.
5054 The code was computing A - B, where A and B are pointers, and B is
5055 random garbage. This can lead to core dumps on platforms that
5056 have special pointer registers, and it also leads to core dumps on
5057 x86-64 when compiled with gcc -ftrapv. The fix is to compute
5058 A - B only when B is initialized properly.
5059 * coding.c (coding_set_source, coding_set_destination): Return void.
5060 (coding_change_source, coding_change_destinations): New functions,
5061 with the old behaviors of coding_set_source and coding_set_destination.
5062 All callers that need an offset changed to use these new functions.
5064 2012-05-26 Glenn Morris <rgm@gnu.org>
5066 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
5068 2012-05-26 Eli Zaretskii <eliz@gnu.org>
5070 Extend mouse support on W32 text-mode console.
5071 * xdisp.c (draw_row_with_mouse_face):
5072 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
5074 * w32console.c: Include window.h.
5075 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
5077 (initialize_w32_display): Initialize mouse-highlight data.
5079 * w32inevt.c: Include termchar.h and window.h.
5080 (do_mouse_event): Support mouse-autoselect-window. When the mouse
5081 moves, call note_mouse_highlight. If help_echo changed, call
5082 gen_help_event to produce help-echo message in the echo area.
5083 Call clear_mouse_face if mouse_face_hidden is set in the mouse
5086 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5088 * lread.c (read1): Simplify slightly to avoid an overflow warning
5089 with GCC 4.7.0 on x86-64.
5091 2012-05-26 Eli Zaretskii <eliz@gnu.org>
5093 * bidi.c (bidi_mirror_char): Revert last change: an int is
5094 definitely wide enough here.
5096 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
5098 Fix integer width and related bugs (Bug#9874).
5099 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
5100 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
5101 (string_bytes, check_sblock, allocate_string_data):
5102 (compact_small_strings, Fmake_bool_vector, make_string)
5103 (make_unibyte_string, make_multibyte_string)
5104 (make_string_from_bytes, make_specified_string)
5105 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
5106 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
5108 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5109 (allocate_pseudovector):
5110 Use int, not EMACS_INT, where int is wide enough.
5111 (inhibit_garbage_collection, Fgarbage_collect):
5112 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5113 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
5114 int might not be wide enough.
5115 (bidi_cache_search, bidi_cache_find, bidi_init_it)
5116 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
5117 (bidi_at_paragraph_end, bidi_find_paragraph_start)
5118 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
5119 (bidi_level_of_next_char, bidi_move_to_visually_next):
5120 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5121 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
5122 (Fkill_buffer, Fset_buffer_major_mode)
5123 (advance_to_char_boundary, Fbuffer_swap_text)
5124 (Fset_buffer_multibyte, overlays_at, overlays_in)
5125 (overlay_touches_p, struct sortvec, record_overlay_string)
5126 (overlay_strings, recenter_overlay_lists)
5127 (adjust_overlays_for_insert, adjust_overlays_for_delete)
5128 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
5129 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
5130 (Foverlay_recenter, last_overlay_modification_hooks_used)
5131 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
5132 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5133 (validate_region): Omit unnecessary test for b <= e,
5134 since that's guaranteed by the previous test.
5135 (adjust_overlays_for_delete): Avoid pos + length overflow.
5136 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
5137 (report_overlay_modification):
5138 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5139 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
5140 Omit pointer cast, which isn't needed anyway, and doesn't work
5141 after the EMACS_INT -> ptrdiff_t change.
5142 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
5143 * buffer.h: Adjust decls to match defn changes elsewhere.
5144 (struct buffer_text, struct buffer):
5145 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5146 Use EMACS_INT, not int, where int might not be wide enough.
5147 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
5148 not int, to avoid needless 32-bit limit on 64-bit hosts.
5149 (exec_byte_code): Use tighter memory-full test, one that checks
5150 for alloca overflow. Don't compute the address of the object just
5151 before an array, as that's not portable. Use EMACS_INT, not
5152 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
5153 * callint.c (Fcall_interactively):
5154 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5155 * callproc.c (call_process_kill, Fcall_process):
5156 Don't assume pid_t fits into an Emacs fixnum.
5157 (call_process_cleanup, Fcall_process, child_setup):
5158 Don't assume pid_t fits into int.
5159 (call_process_cleanup, Fcall_process, delete_temp_file)
5160 (Fcall_process_region):
5161 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5162 (Fcall_process): Simplify handling of volatile integers.
5163 Use int, not EMACS_INT, where int will do.
5164 * casefiddle.c (casify_object, casify_region, operate_on_word)
5165 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
5166 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5167 (casify_object): Avoid integer overflow when overallocating buffer.
5168 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
5169 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
5170 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
5171 * category.h (CATEGORYP): Don't assume arg is nonnegative.
5172 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
5173 integers are now checked earlier. All uses replaced with XINT.
5175 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5176 For CCL_MapSingle, check that content and value are in int range.
5177 (ccl_driver, Fregister_code_conversion_map):
5178 Check that Vcode_version_map_vector is a vector.
5179 (resolve_symbol_ccl_program): Check that vector header is in range.
5180 Always copy the vector, so that we can check its contents reliably
5181 now rather than having to recheck each instruction as it's being
5182 executed. Check that vector words fit in 'int'.
5183 (ccl_get_compiled_code, Fregister_ccl_program)
5184 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
5185 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
5186 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
5187 contents are in range.
5188 (Fccl_execute_on_string): Check that status is in range.
5189 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
5190 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
5191 Accept and return EMACS_INT, not int, because callers can pass values
5193 (c_string_width, strwidth, lisp_string_width, chars_in_text)
5194 (multibyte_chars_in_text, parse_str_as_multibyte)
5195 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
5196 (str_as_unibyte, str_to_unibyte, string_count_byte8)
5197 (string_escape_byte8, Fget_byte):
5198 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5199 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
5200 avoid mishandling large integers.
5201 * character.h: Adjust decls to match defn changes elsewhere.
5202 * charset.c (load_charset_map_from_file, find_charsets_in_text)
5203 (Ffind_charset_region):
5204 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5205 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
5206 (load_charset_map_from_vector, Fdefine_charset_internal):
5207 Don't assume fixnum fits in int.
5208 (load_charset_map_from_vector, Fmap_charset_chars):
5209 Remove now-unnecessary CHECK_NATNUMs.
5210 (Fdefine_charset_internal): Check ranges here, more carefully.
5211 Don't rely on undefined behavior with signed left shift overflow.
5212 Don't assume unsigned int fits into fixnum, or that fixnum fits
5213 into unsigned int. Don't require max_code to be a valid fixnum;
5214 that's not true for gb10830 4-byte on a 32-bit host. Allow
5215 invalid_code to be a cons, for the same reason. Require code_offset
5216 to be a character. Avoid int overflow if max_char is close
5218 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
5219 this is intended anyway and avoids some undefined behavior.
5220 (load_charset_map): Pass unsigned, not int, as 2nd arg of
5221 INDEX_TO_CODE_POINT, as that's what it expects.
5222 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
5223 * charset.h (DECODE_CHAR): Return int, not unsigned;
5224 this is what was intended anyway, and it avoids undefined behavior.
5225 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
5226 integer-overflow issues.
5227 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
5228 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
5229 where the argument is EMACS_INT, and this behavior is not intended.
5230 * chartab.c (Fmake_char_table, Fset_char_table_range)
5231 (uniprop_get_decoder, uniprop_get_encoder):
5232 Don't assume fixnum fits in int.
5233 * cmds.c (move_point): New function, that does the gist of
5234 Fforward_char and Fbackward_char, but does so while checking
5235 for integer overflow more accurately.
5236 (Fforward_char, Fbackward_char): Use it.
5237 (Fforward_line, Fend_of_line, internal_self_insert)
5238 (internal_self_insert):
5239 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5240 Fix a FIXME, by checking for integer overflow when calculating
5241 target_clm and actual_clm.
5242 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
5243 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
5244 (ASSURE_DESTINATION, coding_alloc_by_realloc)
5245 (coding_alloc_by_making_gap, alloc_destination)
5246 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
5247 (encode_coding_utf_16, detect_coding_emacs_mule)
5248 (decode_coding_emacs_mule, encode_coding_emacs_mule)
5249 (detect_coding_iso_2022, decode_coding_iso_2022)
5250 (encode_invocation_designation, encode_designation_at_bol)
5251 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
5252 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
5253 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
5254 (encode_coding_ccl, encode_coding_raw_text)
5255 (detect_coding_charset, decode_coding_charset)
5256 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
5257 (produce_composition, produce_charset, produce_annotation)
5258 (decode_coding, handle_composition_annotation)
5259 (handle_charset_annotation, consume_chars, decode_coding_gap)
5260 (decode_coding_object, encode_coding_object, detect_coding_system)
5261 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
5262 (code_convert_region, code_convert_string)
5263 (Fdefine_coding_system_internal)
5264 (coding_set_source, coding_set_destination):
5265 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5266 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
5267 (Fdefine_coding_system_internal):
5268 Don't assume fixnums fit in int.
5269 (decode_coding_gap, decode_coding_object, encode_coding_object)
5270 (Fread_coding_system, Fdetect_coding_region)
5271 (Funencodable_char_position, Fcheck_coding_systems_region)
5272 (get_translation, handle_composition_annotation, consume_chars):
5273 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5274 (consume_chars): Rewrite to not calculate an address outside buffer.
5275 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
5276 Don't access memory outside of the args array.
5277 (Fdefine_coding_system_internal): Check for charset-id overflow.
5278 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
5279 result of ENCODE_CHAR.
5280 * coding.h: Adjust decls to match defn changes elsewhere.
5281 (struct coding_system):
5282 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5283 * composite.c (get_composition_id, find_composition)
5284 (run_composition_function, update_compositions)
5285 (compose_text, composition_gstring_put_cache)
5286 (composition_gstring_p, composition_gstring_width)
5287 (fill_gstring_header, fill_gstring_body, autocmp_chars)
5288 (composition_compute_stop_pos, composition_reseat_it)
5289 (composition_update_it, struct position_record)
5290 (find_automatic_composition, composition_adjust_point)
5291 (Fcomposition_get_gstring, Ffind_composition_internal):
5292 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5293 (update_compositions):
5294 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5295 * composite.h: Adjust decls to match defn changes elsewhere.
5296 (struct composition):
5297 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5298 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
5299 Do not attempt to compute the address of the object just before a
5300 buffer; this is not portable.
5302 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5303 (Faset): Use int, not EMACS_INT, where int is wide enough.
5304 (Fstring_to_number): Don't assume fixnums fit in int.
5305 (Frem): Don't assume arg is nonnegative.
5306 * dbusbind.c (xd_append_arg): Check for integers out of range.
5307 (Fdbus_call_method): Don't overflow the timeout int.
5308 (extract_signed, extract_unsigned): New functions.
5309 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
5310 (xd_get_connection_references): Return ptrdiff_t, not int.
5312 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
5313 (xd_read_message_1):
5314 Use int, not unsigned, where the dbus API uses int.
5315 (Fdbus_message_internal): Don't overflow mtype.
5316 (syms_of_dbusbind): Allocate right-sized buffer for integers.
5317 * dired.c (directory_files_internal, file_name_completion, scmp)
5318 (file_name_completion_stat):
5319 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5320 (file_name_completion): Don't overflow matchcount.
5321 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
5322 * dispextern.h: Adjust decls to match defn changes elsewhere.
5323 (struct text_pos, struct glyph, struct bidi_saved_info)
5324 (struct bidi_string_data, struct bidi_it, struct composition_it)
5326 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5327 (struct display_pos, struct composition_it, struct it):
5328 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5329 * dispnew.c (increment_matrix_positions)
5330 (increment_row_positions, mode_line_string)
5331 (marginal_area_string):
5332 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5333 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
5334 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5335 (duration_to_sec_usec): New function, to check for overflow better.
5336 (Fsleep_for, sit_for): Use it.
5337 * doc.c (get_doc_string, store_function_docstring):
5338 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5339 (get_doc_string, Fsnarf_documentation):
5340 Use int, not EMACS_INT, where int is wide enough.
5342 Use SAFE_ALLOCA, not alloca.
5343 Check for overflow when converting EMACS_INT to off_t.
5344 * doprnt.c (doprnt):
5345 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5346 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
5347 Don't assume uid_t fits into fixnum.
5348 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
5349 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
5350 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
5351 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
5352 (general_insert_function)
5353 (Finsert_char, make_buffer_string, make_buffer_string_both)
5354 (update_buffer_properties, Fbuffer_substring)
5355 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
5356 (Fsubst_char_in_region, check_translation)
5357 (Ftranslate_region_internal, save_restriction_restore, Fformat)
5358 (transpose_markers, Ftranspose_regions):
5359 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5360 (clip_to_bounds): Move to lisp.h as an inline function).
5361 (Fconstrain_to_field): Don't assume integers are nonnegative.
5362 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
5363 (Fsubst_char_in_region, Fsave_restriction):
5364 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5365 (Femacs_pid): Don't assume pid_t fits into fixnum.
5366 (lo_time): Use int, not EMACS_INT, when int suffices.
5367 (lisp_time_argument): Check for usec out of range.
5368 (Fencode_time): Don't assume fixnum fits in int.
5369 (Fuser_login_name, Fuser_full_name): Signal an error
5370 if a uid argument is out of range, rather than relying on
5372 (Fformat_time_string): Remove now-unnecessary check.
5373 lisp_time_argument checks for out-of-range usec now.
5374 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
5375 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
5376 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
5377 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
5378 (init_cmdargs, Fdump_emacs):
5379 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5380 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
5381 the bottom (typically) 32 bits of the fixnum.
5382 * eval.c (specpdl_size, call_debugger):
5383 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5384 (when_entered_debugger, Fbacktrace_debug):
5385 Don't assume fixnum can fit in int.
5386 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
5387 the object just before a buffer; this is not portable.
5388 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
5389 (grow_specpdl, unbind_to):
5390 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5391 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
5392 (grow_specpdl): Simplify allocation by using xpalloc.
5393 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
5394 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
5395 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
5396 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5397 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
5399 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5400 (Fcopy_file, non_regular_nbytes, read_non_regular)
5401 (Finsert_file_contents):
5402 Use int, not EMACS_INT, where int is wide enough.
5403 (READ_BUF_SIZE): Verify that it fits in int.
5404 (Finsert_file_contents): Check that counts are in proper range,
5405 rather than assuming fixnums fit into ptrdiff_t etc.
5406 Don't assume fixnums fit into int.
5407 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5408 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
5409 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
5410 (string_char_to_byte, string_byte_to_char)
5411 (string_make_multibyte, string_to_multibyte)
5412 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
5413 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
5414 (substring_both, Fdelete, internal_equal, Ffillarray)
5415 (Fclear_string, mapcar1)
5416 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
5417 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
5418 (larger_vector, make_hash_table, maybe_resize_hash_table)
5419 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
5420 (Fmaphash, secure_hash):
5421 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5422 (concat): Check for string index and length overflow.
5423 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
5425 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5426 (larger_vector): New API (vec, incr_min, size_max) replaces old
5427 one (vec, new_size, init). This catches size overflow.
5428 INIT was removed because it was always Qnil.
5429 All callers changed.
5430 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
5431 the upper bound on a hash table index size.
5432 (make_hash_table, maybe_resize_hash_table): Use it.
5433 (secure_hash): Computer start_byte and end_byte only after
5434 they're known to be in ptrdiff_t range.
5435 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
5436 (Ffont_get_glyphs, Ffont_at):
5437 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5438 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
5439 (Flist_fonts, Fopen_font):
5440 Don't assume fixnum can fit in int.
5441 (check_gstring): Don't assume index can fit in int.
5442 (font_match_p): Check that fixnum is a character, not a nonnegative
5443 fixnum, since the later code needs to stuff it into an int.
5444 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
5445 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
5446 conversion overflow issues.
5447 (Fopen_font): Check for integer out of range.
5448 (Ffont_get_glyphs): Don't assume index can fit in int.
5449 * font.h: Adjust decls to match defn changes elsewhere.
5450 * fontset.c (reorder_font_vector): Redo score calculation to avoid
5452 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
5453 printmax_t, where ptrdiff_t is wide enough.
5454 (Finternal_char_font):
5455 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5456 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
5457 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
5458 (Fset_frame_position, x_set_frame_parameters)
5459 (x_set_line_spacing, x_set_border_width)
5460 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
5461 Check that fixnums are in proper range for system types.
5462 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
5463 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5464 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
5465 Use SAFE_ALLOCA_LISP, not alloca.
5466 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
5467 intptr_t is wide enough.
5468 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
5469 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
5470 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
5471 Check for fixnum out of range.
5472 * ftfont.c (ftfont_list): Don't assume index fits in int.
5473 Check that fixnums are in proper range for system types.
5474 (ftfont_shape_by_flt):
5475 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5476 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
5477 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5478 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
5479 Check that fixnums are in proper range for system types.
5480 * gnutls.h: Adjust decls to match defn changes elsewhere.
5481 * gtkutil.c (xg_dialog_run):
5482 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5483 (update_frame_tool_bar):
5484 Check that fixnums are in proper range for system types.
5485 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5486 (lookup_image): Check that fixnums are in range for system types.
5487 * indent.c (last_known_column, last_known_column_point):
5488 (current_column_bol_cache):
5489 (skip_invisible, current_column, check_display_width):
5490 (check_display_width, scan_for_column, current_column_1)
5491 (Findent_to, Fcurrent_indentation, position_indentation)
5492 (indented_beyond_p, Fmove_to_column, compute_motion):
5493 (Fcompute_motion, Fvertical_motion):
5494 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5495 (last_known_column_modified): Use EMACS_INT, not int.
5496 (check_display_width):
5498 Check that fixnums and floats are in proper range for system types.
5499 (compute_motion): Don't assume index or fixnum fits in int.
5500 (compute_motion, Fcompute_motion):
5501 Use int, not EMACS_INT, when it is wide enough.
5502 (vmotion): Omit local var start_hpos that is always 0; that way
5503 we don't need to worry about overflow in expressions involving it.
5504 * indent.h: Adjust decls to match defn changes elsewhere.
5506 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5507 Use int, not EMACS_INT, where int is wide enough.
5508 Remove unused members ovstring_chars_done and tab_offset;
5510 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
5511 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
5512 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
5513 (make_gap, copy_text, insert, insert_and_inherit)
5514 (insert_before_markers, insert_before_markers_and_inherit)
5515 (insert_1, count_combining_before, count_combining_after)
5516 (insert_1_both, insert_from_string)
5517 (insert_from_string_before_markers, insert_from_string_1)
5518 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
5519 (adjust_after_replace, adjust_after_insert, replace_range)
5520 (replace_range_2, del_range, del_range_1, del_range_byte)
5521 (del_range_both, del_range_2, modify_region)
5522 (prepare_to_modify_buffer, signal_before_change)
5523 (signal_after_change, Fcombine_after_change_execute):
5524 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5525 * intervals.c (traverse_intervals, rotate_right, rotate_left)
5526 (balance_an_interval, split_interval_right, split_interval_left)
5527 (find_interval, next_interval, update_interval)
5528 (adjust_intervals_for_insertion, delete_node, delete_interval)
5529 (interval_deletion_adjustment, adjust_intervals_for_deletion)
5530 (static_offset_intervals, offset_intervals)
5531 (merge_interval_right, merge_interval_left, make_new_interval)
5532 (graft_intervals_into_buffer, temp_set_point_both)
5533 (temp_set_point, set_point, adjust_for_invis_intang)
5534 (set_point_both, move_if_not_intangible, get_property_and_range)
5535 (get_local_map, copy_intervals, copy_intervals_to_string)
5536 (compare_string_intervals, set_intervals_multibyte_1):
5537 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5538 * intervals.h: Adjust decls to match defn changes elsewhere.
5540 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5541 * keyboard.c (this_command_key_count, this_single_command_key_start)
5542 (before_command_key_count, before_command_echo_length, echo_now)
5543 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
5544 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
5545 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
5546 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
5547 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5548 (last_non_minibuf_size, last_point_position, echo_truncate)
5549 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
5550 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
5551 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
5552 (stuff_buffered_input):
5553 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5554 (last_auto_save, command_loop_1, read_char):
5555 Use EMACS_INT, not int, to avoid integer overflow.
5556 (record_char): Avoid overflow in total_keys computation.
5557 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
5558 * keyboard.h: Adjust decls to match defn changes elsewhere.
5559 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
5560 (Fkey_description, Fdescribe_vector, Flookup_key):
5561 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5562 (click_position): New function, to check that positions are in range.
5563 (Fcurrent_active_maps):
5565 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5566 (Faccessible_keymaps, Fkey_description):
5567 (preferred_sequence_p):
5568 Don't assume fixnum can fit into int.
5569 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
5570 Check for integer overflow in size calculations.
5571 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
5572 avoid mishandling large integers.
5573 * lisp.h: Adjust decls to match defn changes elsewhere.
5574 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
5575 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
5576 (struct Lisp_Marker):
5577 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5578 (clip_to_bounds): Now an inline function, moved here from editfns.c.
5579 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
5580 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
5581 All callers changed.
5582 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
5583 Assume the arg has valid form, since it always does.
5584 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
5585 unsigned integer system type.
5586 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
5587 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
5588 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5589 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
5590 (duration_to_sec_usec): New decl.
5591 * lread.c (read_from_string_index, read_from_string_index_byte)
5592 (read_from_string_limit, readchar, unreadchar, openp)
5593 (read_internal_start, read1, oblookup):
5594 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5595 (Fload, readevalloop, Feval_buffer, Feval_region):
5596 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5597 (openp): Check for out-of-range argument to 'access'.
5598 (read1): Use int, not EMACS_INT, where int is wide enough.
5599 Don't assume fixnum fits into int.
5600 Fix off-by-one error that can read outside a buffer.
5601 (read_filtered_event): Use duration_to_sec_usec
5602 to do proper overflow checking on durations.
5603 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
5604 in size calculation.
5605 (Fexecute_kbd_macro):
5606 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5607 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
5608 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
5609 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
5610 (set_marker_both, set_marker_restricted_both, marker_position)
5611 (marker_byte_position, Fbuffer_has_markers_at):
5612 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5613 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
5614 * menu.c (ensure_menu_items): Rename from grow_menu_items.
5615 It now merely ensures that the menu is large enough, without
5616 necessarily growing it, as this avoids some integer overflow issues.
5617 All callers changed.
5618 (keymap_panes, parse_single_submenu, Fx_popup_menu):
5619 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5620 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
5621 Use SAFE_ALLOCA_LISP, not alloca.
5622 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
5623 to EMACS_INT. Check that fixnums are in proper range for system types.
5624 * minibuf.c (minibuf_prompt_width, string_to_object)
5625 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
5626 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
5627 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5628 (get_minibuffer, read_minibuf_unwind):
5629 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5630 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
5631 this simplifies overflow checking. All callers changed.
5632 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
5634 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5635 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
5636 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
5637 Check that fixnums are in proper range for system types.
5638 (Fx_create_frame, Fx_show_tip):
5639 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5640 * nsfont.m (ns_findfonts, nsfont_list_family):
5641 Don't assume fixnum fits in long.
5642 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
5643 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5644 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
5646 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
5647 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5648 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
5649 (PRINTDECLARE, PRINTPREPARE):
5650 (strout, print_string):
5651 (print, print_preprocess, print_check_string_charset_prop)
5653 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5655 (temp_output_buffer_setup, Fprin1_to_string, print_object):
5656 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5657 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
5658 (printchar, strout): Use xpalloc to catch size calculation overflow.
5659 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
5660 (print_error_message): Use SAFE_ALLOCA, not alloca.
5661 (print_object): Use int, not EMACS_INT, where int is wide enough.
5662 (print_depth, new_backquote_output, print_number_index):
5663 Use ptrdiff_t, not int, where int might not be wide enough.
5664 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
5665 (Fset_process_window_size, Fformat_network_address)
5666 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
5668 Check that fixnums are in proper range for system types.
5669 (Fsignal_process): Simplify by avoiding a goto.
5670 Check for process-ids out of pid_t range rather than relying on
5672 (process_tick, update_tick): Use EMACS_INT, not int.
5673 (Fformat_network_address, read_process_output, send_process)
5674 (Fprocess_send_region, status_notify):
5675 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5676 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
5677 (wait_reading_process_output, read_process_output, exec_sentinel):
5678 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5679 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
5680 (Faccept_process_output): Use duration_to_sec_usec to do proper
5681 overflow checking on durations.
5682 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
5683 Don't assume pid_t fits in int.
5684 * process.h (struct Lisp_Process): Members tick and update_tick
5685 are now of type EMACS_INT, not int.
5686 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
5687 configured --with-wide-int.
5688 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
5689 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
5690 * search.c (looking_at_1, string_match_1):
5691 (fast_string_match, fast_c_string_match_ignore_case)
5692 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
5693 (scan_newline, find_before_next_newline, search_command)
5694 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
5695 (set_search_regs, wordify):
5698 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5699 (string_match_1, search_buffer, set_search_regs):
5701 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5702 (wordify): Check for overflow in size calculation.
5703 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
5704 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
5705 Check that fixnums are in proper range for system types.
5706 * sound.c (struct sound_device)
5707 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
5708 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5709 (Fplay_sound_internal):
5710 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5711 * syntax.c (struct lisp_parse_state, find_start_modiff)
5712 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
5713 (Fparse_partial_sexp):
5714 Don't assume fixnums can fit in int.
5715 (struct lisp_parse_state, find_start_pos, find_start_value)
5716 (find_start_value_byte, find_start_begv)
5717 (update_syntax_table, char_quoted, dec_bytepos)
5718 (find_defun_start, prev_char_comend_first, back_comment):
5719 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
5720 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
5721 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5722 (Finternal_describe_syntax_value): Check that match_lisp is a
5723 character, not an integer, since the code stuffs it into int.
5724 (scan_words, scan_sexps_forward):
5725 Check that fixnums are in proper range for system types.
5727 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5728 (scan_sexps_forward):
5729 Use CHARACTERP, not INTEGERP, since the value must fit into int.
5730 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
5731 * syntax.h: Adjust decls to match defn changes elsewhere.
5732 (struct gl_state_s):
5733 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5734 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
5735 MOST_POSITIVE_FIXNUM.
5736 * sysdep.c (wait_for_termination_1, wait_for_termination)
5737 (interruptible_wait_for_termination, mkdir):
5738 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
5739 (emacs_read, emacs_write):
5740 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5741 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
5742 and double all fit in int.
5743 * term.c (set_tty_color_mode):
5744 Check that fixnums are in proper range for system types.
5745 * termhooks.h (struct input_event):
5746 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5747 * textprop.c (validate_interval_range, interval_of)
5748 (Fadd_text_properties, set_text_properties_1)
5749 (Fremove_text_properties, Fremove_list_of_text_properties)
5750 (Ftext_property_any, Ftext_property_not_all)
5751 (copy_text_properties, text_property_list, extend_property_ranges)
5752 (verify_interval_modification):
5753 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5754 (Fnext_single_char_property_change)
5755 (Fprevious_single_char_property_change):
5756 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5757 (copy_text_properties):
5758 Check for integer overflow in index calculation.
5759 * undo.c (last_boundary_position, record_point, record_insert)
5760 (record_delete, record_marker_adjustment, record_change)
5761 (record_property_change):
5762 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5763 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
5764 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5765 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
5766 (Fx_hide_tip, Fx_file_dialog):
5767 * w32menu.c (set_frame_menubar):
5768 Use ptrdiff_t, not int, for consistency with rest of code.
5769 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
5770 (select_window, Fdelete_other_windows_internal)
5771 (window_scroll_pixel_based, window_scroll_line_based)
5772 (Frecenter, Fset_window_configuration):
5773 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5774 (Fset_window_hscroll, run_window_configuration_change_hook)
5775 (set_window_buffer, temp_output_buffer_show, scroll_command)
5776 (Fscroll_other_window, Frecenter):
5777 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5778 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
5779 Don't assume fixnum fits in int.
5780 (Fset_window_scroll_bars):
5781 Check that fixnums are in proper range for system types.
5782 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
5783 (string_pos, c_string_pos, number_of_chars, init_iterator)
5784 (in_ellipses_for_invisible_text_p, init_from_display_pos)
5785 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
5786 (compute_display_string_end, handle_face_prop)
5787 (face_before_or_after_it_pos, handle_invisible_prop)
5788 (handle_display_prop, handle_display_spec, handle_single_display_spec)
5789 (display_prop_intangible_p, string_buffer_position_lim)
5790 (string_buffer_position, handle_composition_prop, load_overlay_strings)
5791 (get_overlay_strings_1, get_overlay_strings)
5792 (iterate_out_of_display_property, forward_to_next_line_start)
5793 (back_to_previous_visible_line_start, reseat, reseat_to_string)
5794 (get_next_display_element, set_iterator_to_next)
5795 (get_visually_first_element, compute_stop_pos_backwards)
5796 (handle_stop_backwards, next_element_from_buffer)
5797 (move_it_in_display_line_to, move_it_in_display_line)
5798 (move_it_to, move_it_vertically_backward, move_it_by_lines)
5799 (add_to_log, message_dolog, message_log_check_duplicate)
5800 (message2, message2_nolog, message3, message3_nolog
5801 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
5802 (current_message_1, truncate_echo_area, truncate_message_1)
5803 (set_message, set_message_1, store_mode_line_noprop)
5804 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
5805 (text_outside_line_unchanged_p, check_point_in_composition)
5806 (reconsider_clip_changes)
5807 (redisplay_internal, set_cursor_from_row, try_scrolling)
5808 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
5809 (redisplay_window, find_last_unchanged_at_beg_row)
5810 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
5811 (trailing_whitespace_p, find_row_edges, display_line)
5812 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
5813 (display_mode_element, store_mode_line_string)
5814 (pint2str, pint2hrstr, decode_mode_spec)
5815 (display_count_lines, display_string, draw_glyphs)
5816 (x_produce_glyphs, x_insert_glyphs)
5817 (rows_from_pos_range, mouse_face_from_buffer_pos)
5818 (fast_find_string_pos, mouse_face_from_string_pos)
5819 (note_mode_line_or_margin_highlight, note_mouse_highlight):
5820 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5821 (safe_call, init_from_display_pos, handle_fontified_prop)
5822 (handle_single_display_spec, load_overlay_strings)
5823 (with_echo_area_buffer, setup_echo_area_for_printing)
5824 (display_echo_area, echo_area_display)
5825 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
5826 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5827 (redisplay_window, dump_glyph_row, display_mode_line)
5828 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
5829 (handle_display_spec, display_prop_string_p):
5830 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5831 (handle_single_display_spec, build_desired_tool_bar_string)
5832 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
5833 (get_specified_cursor_type):
5834 Check that fixnums are in proper range for system types.
5835 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
5836 (Flookup_image_map):
5837 Don't assume fixnums fit in int.
5838 (compare_overlay_entries):
5839 Avoid mishandling comparisons due to subtraction overflow.
5840 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
5841 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
5842 (handle_tool_bar_click):
5843 Use int, not unsigned, since we prefer signed and the signedness
5844 doesn't matter here.
5845 (get_next_display_element, next_element_from_display_vector):
5846 Use int, not EMACS_INT, when int is wide enough.
5847 (start_hourglass): Use duration_to_sec_usec to do proper
5848 overflow checking on durations.
5849 * xfaces.c (Fbitmap_spec_p):
5850 Check that fixnums are in proper range for system types.
5851 (compare_fonts_by_sort_order):
5852 Avoid mishandling comparisons due to subtraction overflow.
5853 (Fx_family_fonts, realize_basic_faces):
5854 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5856 Don't assume fixnum fits in int.
5857 Use SAFE_ALLOCA_LISP, not alloca.
5858 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
5859 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
5860 (face_at_buffer_position, face_for_overlay_string)
5861 (face_at_string_position):
5862 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5863 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
5864 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
5866 Check that fixnums are in proper range for system types.
5867 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
5868 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
5869 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5870 (Fx_change_window_property): Don't assume fixnums fit in int.
5871 * xfont.c (xfont_chars_supported):
5872 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5873 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
5874 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
5875 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5876 * xml.c (parse_region):
5877 * xrdb.c (magic_file_p):
5878 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5879 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
5880 (x_get_local_selection, x_reply_selection_request)
5881 (x_handle_selection_request, wait_for_property_change):
5882 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5883 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
5884 short is wide enough.
5885 (x_send_client_event): Don't assume fixnum fits in int.
5886 * xterm.c (x_x_to_emacs_modifiers):
5887 Don't assume EMACS_INT overflows nicely into int.
5888 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
5890 (handle_one_xevent): NATNUMP can eval its arg twice.
5891 (x_connection_closed):
5892 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5893 * xterm.h: Adjust decls to match defn changes elsewhere.
5894 (struct scroll_bar): Use struct vectorlike_header
5895 rather than rolling our own approximation.
5896 (SCROLL_BAR_VEC_SIZE): Remove; not used.
5898 2012-05-25 Glenn Morris <rgm@gnu.org>
5900 * lisp.mk (lisp): Update for more files being compiled now.
5902 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
5904 * lread.c: Remove `read_pure' which makes no difference.
5905 (read_pure): Remove var.
5906 (unreadpure): Remove function.
5907 (readevalloop): Don't call read_list with -1 flag.
5908 (read1, read_vector): Don't test read_pure any more.
5909 (read_list): Simplify.
5911 * fileio.c, character.h: Minor style tweaks.
5913 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
5915 * window.h (clip_changed): Remove useless declaration.
5917 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
5919 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
5920 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
5922 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
5925 This directory predates autoconf and is no longer needed nowadays.
5926 Move its few remaining bits of functionality to where they're needed.
5927 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
5928 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
5929 * m/template.h: Remove.
5930 * Makefile.in (M_FILE): Remove. All uses removed.
5931 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
5932 * lisp.h (USE_LSB_TAG):
5933 * mem-limits.h (EXCEEDS_LISP_PTR):
5934 Use VAL_MAX, not VALBITS, in #if.
5935 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
5936 (EMACS_UINT): Define unconditionally now.
5937 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
5938 (BITS_PER_EMACS_INT): New constants, replacing
5939 what used to be in config.h, but not useful in #if.
5940 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
5941 define them any more.
5942 (VAL_MAX): New macro.
5944 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
5945 BITS_PER_EMACS_INT, in #if.
5946 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5947 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
5948 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
5949 * s/ms-w32.h (DATA_START):
5950 Move here from removed file m/intel386.h.
5951 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
5952 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
5954 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
5956 Assume C89 or later.
5957 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
5958 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
5960 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
5961 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
5962 * textprop.c, tparam.c (NULL): Remove.
5963 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
5964 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
5965 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
5966 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
5967 * xterm.c (input_signal_count): Assume volatile works.
5969 2012-05-21 Ken Brown <kbrown@cornell.edu>
5971 * xgselect.c (xg_select): Fix first argument in call to 'select'
5974 2012-05-20 Ken Brown <kbrown@cornell.edu>
5976 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
5977 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
5979 2012-05-19 Ken Brown <kbrown@cornell.edu>
5981 * xfns.c (x_in_use): Remove `static' qualifier.
5982 * xterm.h (x_in_use): Declare.
5983 * xgselect.c: Include xterm.h.
5984 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
5985 and `display_arg' (bug#9754).
5987 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
5989 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
5991 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
5992 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
5994 2012-05-18 Eli Zaretskii <eliz@gnu.org>
5996 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
5998 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
5999 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
6001 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
6002 reference to image_cache->refcount.
6003 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
6005 2012-05-17 Juri Linkov <juri@jurta.org>
6007 * search.c (Fword_search_regexp, Fword_search_backward)
6008 (Fword_search_forward, Fword_search_backward_lax)
6009 (Fword_search_forward_lax): Move functions to isearch.el
6010 (bug#10145, bug#11381).
6012 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
6014 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
6016 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
6018 * lread.c (init_obarray): Declare Qt and Qnil as special.
6020 2012-05-14 Glenn Morris <rgm@gnu.org>
6022 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
6023 Put "libexec" before "bin", for the sake of init_callproc_1.
6025 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6027 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
6029 * unexaix.c: Port to more-recent AIX compilers.
6030 (report_error, report_error_1, make_hdr, copy_sym)
6031 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
6032 Make arguments const char *, not char *, to avoid violations of C
6033 standard and to fix some AIX warnings reported by Gilles Pion.
6035 2012-05-14 Eli Zaretskii <eliz@gnu.org>
6037 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
6038 already have overlays loaded.
6039 (handle_single_display_spec): Before returning without displaying
6040 fringe bitmap, synchronize the bidi iterator with the main display
6041 iterator, by calling iterate_out_of_display_property.
6042 (iterate_out_of_display_property): Detect buffer iteration by
6043 testing that it->string is a Lisp string.
6044 (get_next_display_element): When the current object is exhausted,
6045 and there's something on it->stack, call set_iterator_to_next to
6046 proceed with what's on the stack, instead of returning zero.
6047 (set_iterator_to_next): If called at the end of a Lisp string,
6048 proceed to consider_string_end without incrementing string
6049 position. Don't increment display vector index past the end of
6050 the display vector. (Bug#11417)
6051 (pos_visible_p): Don't report a position visible when move_it_to
6052 stopped at the last line of window, which happens to be scanned
6053 backwards by the bidi iteration. (Bug#11464)
6055 2012-05-14 Eli Zaretskii <eliz@gnu.org>
6057 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
6058 and right-margin display specs even if the spec is invalid or we
6059 are on a TTY, and thus unable to display on the fringes.
6060 That's because the text with the property will not be displayed anyway,
6061 so we need to signal to the caller that this is a "replacing"
6062 display spec. This fixes display when the spec is invalid or we
6065 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6067 * unexaix.c (make_hdr): Fix typo in prototype.
6068 This bug broke the build on AIX. Problem reported by Gilles Pion.
6070 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
6072 * keyboard.c (kbd_buffer_get_event): Read special events also in
6073 batch mode. (Bug#11415)
6075 2012-05-12 Glenn Morris <rgm@gnu.org>
6077 * ns.mk: Update for ns_appbindir no longer having trailing "/".
6079 2012-05-12 Eli Zaretskii <eliz@gnu.org>
6081 * lisp.mk (lisp): Add newcomment.elc.
6083 2012-05-12 Glenn Morris <rgm@gnu.org>
6085 * Makefile.in (MKDIR_P): New, set by configure.
6086 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
6088 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
6090 Remove unused function hourglass_started.
6091 * dispextern.h (hourglass_started):
6092 * w32fns.c (hourglass_started):
6093 * xdisp.c (hourglass_started): Remove.
6095 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
6097 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
6098 Update dependencies.
6100 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
6102 * xgselect.c (xg_select): Put maxfds+1 into a var.
6103 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
6105 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
6107 2012-05-10 Dave Abrahams <dave@boostpro.com>
6109 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
6110 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
6112 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
6114 * dbusbind.c (xd_registered_buses): New internal Lisp object.
6115 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
6116 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
6117 Initialize xd_registered_buses.
6119 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
6121 Untag more efficiently if USE_LSB_TAG.
6122 This is based on a proposal by YAMAMOTO Mitsuharu in
6123 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
6124 For an admittedly artificial (nth 8000 longlist) benchmark on
6125 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
6126 Emacs's overall text size by 1%.
6127 * lisp.h (XUNTAG): New macro.
6128 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
6129 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
6130 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
6131 * eval.c (Fautoload):
6132 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
6133 * frame.h (XFRAME): Use XUNTAG.
6135 Port recent dbusbind.c changes to 32-bit --with-wide-int.
6136 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
6137 Remove unportable assumptions about print widths of types like
6139 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
6140 intptr_t when converting between pointer and integer, to avoid GCC
6141 warnings about wrong width.
6143 2012-05-09 Eli Zaretskii <eliz@gnu.org>
6145 * w32proc.c (new_child): Force Windows to reserve only 64KB of
6146 stack for each reader_thread, instead of defaulting to 8MB
6147 determined by the linker. This avoids failures in creating
6148 subprocesses on Windows 7, see the discussion in this thread:
6149 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
6151 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
6153 Fix up display of the *Minibuf-0* buffer in the mini window.
6154 * keyboard.c (read_char): Don't clear the echo area if there's no
6156 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
6157 contents of *Minibuf-0*) if there's no message displayed in its stead.
6159 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
6161 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
6164 2012-05-06 Chong Yidong <cyd@gnu.org>
6166 * lisp.mk (lisp): Update.
6168 2012-05-05 Jim Meyering <meyering@redhat.com>
6170 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
6172 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
6174 * data.c (PUT_ERROR): New macro.
6175 (syms_of_data): Use it. Add new error type `user-error'.
6176 * undo.c (user_error): New function.
6177 (Fprimitive_undo): Use it.
6178 * print.c (print_error_message): Adjust print style for `user-error'.
6179 * keyboard.c (user_error): New function.
6180 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
6182 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
6184 Do not limit current-time-string to years 1000..9999.
6185 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
6186 (Fcurrent_time_string): Support any year that is supported by the
6187 underlying localtime representation. Don't use asctime, as it
6188 has undefined behavior for years outside the range -999..9999.
6190 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
6192 Fix race conditions involving setenv, gmtime, localtime, asctime.
6193 Without this fix, interrupts could mess up code that uses these
6194 nonreentrant functions, since setting TZ invalidates existing
6195 tm_zone or tzname values, and since most of these functions return
6196 pointers to static storage.
6197 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
6198 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
6199 Grow the critical sections to include not just invoking
6200 localtime/gmtime, but also accessing these functions' results
6201 including their tm_zone values if any, and any related TZ setting.
6202 (format_time_string): Last arg is now struct tm *, not struct tm **,
6203 so that the struct tm is saved in the critical section.
6204 All callers changed. Simplify allocation of initial buffer, partly
6205 motivated by the fact that memory allocation needs to be outside
6206 the critical section.
6208 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
6210 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
6211 with RESET_INTERVAL.
6213 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
6214 Remove duplicated buffer name initialization.
6216 2012-05-02 Jim Meyering <jim@meyering.net>
6218 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
6220 * xfns.c (x_window): Use xstrdup (Bug#11375).
6222 2012-05-02 Eli Zaretskii <eliz@gnu.org>
6224 * xdisp.c (pos_visible_p): If already at a newline from the
6225 display string before the 'while' loop, don't walk back the glyphs
6226 from it3.glyph_row. Solves assertion violation when the display
6227 string begins with a newline (egg.el). (Bug#11367)
6229 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
6231 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
6234 2012-05-01 Glenn Morris <rgm@gnu.org>
6236 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
6237 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
6238 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
6239 All were removed before 23.1.
6241 * dispnew.c: Remove HAVE_LIBNCURSES test;
6242 it is always true on relevant platforms.
6244 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
6245 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
6247 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
6249 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
6251 * .gdbinit (xpr): Remove checks for no longer existing misc types.
6252 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
6255 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
6257 Do not avoid creating empty evaporating overlays (Bug#9642).
6258 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
6259 That is, do not delete an evaporating overlay if it becomes
6260 empty after its bounds are adjusted to fit within its buffer.
6261 This fix caused other problems, and I'm reverting it until we get
6262 to the bottom of them.
6264 2012-04-27 Chong Yidong <cyd@gnu.org>
6266 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
6268 2012-04-27 Eli Zaretskii <eliz@gnu.org>
6270 * xdisp.c (pos_visible_p): If the window start position is beyond
6271 ZV, start the display from buffer beginning. Prevents assertion
6272 violation in init_iterator when the minibuffer window is scrolled
6275 * window.c (window_scroll_pixel_based): Likewise.
6277 2012-04-27 Chong Yidong <cyd@gnu.org>
6279 * keymap.c (where_is_internal): Doc fix (Bug#10872).
6281 2012-04-27 Glenn Morris <rgm@gnu.org>
6283 * fileio.c (Fcopy_file, Fset_file_selinux_context):
6284 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
6286 2012-04-27 Eli Zaretskii <eliz@gnu.org>
6288 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
6289 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
6291 2012-04-26 Eli Zaretskii <eliz@gnu.org>
6293 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
6294 display element, check also the underlying string or buffer
6295 character. (Bug#11341)
6297 * w32menu.c: Include w32heap.h.
6298 (add_menu_item): If the call to AppendMenuW (via
6299 unicode_append_menu) fails, disable Unicode menus only if we are
6300 running on Windows 9X/Me.
6302 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
6304 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
6305 (xgetint): Add missing shift for LSB tags.
6307 2012-04-24 Martin Rudalics <rudalics@gmx.at>
6309 * keyboard.c (read_char): Don't wipe echo area for select window
6310 events: These might get delayed via `mouse-autoselect-window'
6313 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
6315 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
6316 manipulation of :loaded-from data.
6318 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
6320 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
6321 now a cons (bug#11311).
6323 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
6325 Do not create empty overlays with the evaporate property (Bug#9642).
6326 * buffer.c (Fmove_overlay): Delete an evaporating overlay
6327 if it becomes empty after its bounds are adjusted to fit within
6328 its buffer. Without this fix, in a nonempty buffer (let ((o
6329 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
6330 yields an empty overlay that has the evaporate property, which is
6331 not supposed to happen.
6333 Fix minor GTK3 problems found by static checking.
6334 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6335 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6336 (struct _EmacsFixedClass, emacs_fixed_get_type):
6337 Move decls here from emacsgtkfixed.h, since they needn't be public.
6338 (emacs_fixed_get_type): Now static.
6339 (emacs_fixed_class_init): Omit unused local.
6340 (emacs_fixed_child_type): Remove; unused.
6341 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6342 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6343 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
6344 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
6345 (EMACS_FIXED_GET_CLASS): Remove; unused.
6346 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
6348 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
6349 Problem reported by Juanma Barranquero for Windows -Wunused-function.
6351 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6353 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
6354 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
6355 (__malloc_size_t, __malloc_ptrdiff_t):
6356 Remove. All uses removed, replaced by the definiens if needed,
6357 since we can assume C89 or better now.
6358 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
6359 (protect_malloc_state, align, get_contiguous_space)
6360 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
6361 (malloc_atfork_handler_child, malloc_enable_thread)
6362 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
6363 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
6364 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
6365 (special_realloc, _realloc_internal_nolock, _realloc_internal)
6366 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
6367 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
6368 Define using prototypes, not old style.
6369 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
6370 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
6371 (align): Don't assume that signed integer overflow wraps around.
6372 Omit unused local var.
6373 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
6374 (_free_internal_nolock, memalign, mallochook, reallochook):
6375 Omit no-longer-needed casts.
6376 (valloc): Use getpagesize, not __getpagesize.
6377 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
6378 (struct hdr): The 'magic' member is now size_t, not unsigned long.
6380 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
6382 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
6384 Move functions from C to Lisp. Make non-blocking method calls
6385 the default. Implement further D-Bus standard interfaces.
6387 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
6388 (QCdbus_request_name_allow_replacement)
6389 (QCdbus_request_name_replace_existing)
6390 (QCdbus_request_name_do_not_queue)
6391 (QCdbus_request_name_reply_primary_owner)
6392 (QCdbus_request_name_reply_in_queue)
6393 (QCdbus_request_name_reply_exists)
6394 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
6395 (QCdbus_registered_serial, QCdbus_registered_method)
6396 (QCdbus_registered_signal): New Lisp objects.
6397 (XD_DEBUG_MESSAGE): Use sizeof.
6398 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
6399 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
6400 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
6401 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
6402 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
6403 (xd_signature, xd_append_arg): Allow float for integer types.
6404 (xd_get_connection_references): New function.
6405 (xd_get_connection_address): Rename from xd_initialize.
6406 Return cached address.
6407 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
6408 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
6410 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
6411 Return number of refcounts.
6412 (Fdbus_get_unique_name): Make stronger parameter check.
6413 (Fdbus_message_internal): New defun.
6414 (Fdbus_call_method, Fdbus_call_method_asynchronously)
6415 (Fdbus_method_return_internal, Fdbus_method_error_internal)
6416 (Fdbus_send_signal, Fdbus_register_service)
6417 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
6418 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
6419 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
6420 (Vdbus_compiled_version, Vdbus_runtime_version)
6421 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
6422 (Vdbus_message_type_method_return, Vdbus_message_type_error)
6423 (Vdbus_message_type_signal): New defvars.
6424 (Vdbus_registered_buses, Vdbus_registered_objects_table):
6427 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6429 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
6430 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
6431 Do not assume ptrdiff_t is the same width as 'int'.
6433 * alloc.c: Handle unusual debugging option combinations.
6434 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
6435 since the two debugging options are incompatible.
6436 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
6438 (mem_init, mem_insert, mem_insert_fixup):
6439 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
6440 (NEED_MEM_INSERT): Remove; no longer needed.
6442 2012-04-22 Leo Liu <sdl.web@gmail.com>
6444 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
6446 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6448 * sysdep.c [__FreeBSD__]: Minor cleanups.
6449 (list_system_processes, system_process_attributes) [__FreeBSD__]:
6450 Use Emacs indenting style more consistently. Avoid some casts.
6451 Use 'double' consistently rather than mixing 'float' and 'double'.
6453 2012-04-21 Eduard Wiebe <usenet@pusto.de>
6455 * sysdep.c (list_system_processes, system_process_attributes):
6456 Add implementation for FreeBSD (Bug#5243).
6458 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
6460 * lisp.mk (lisp): Update.
6462 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
6464 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
6465 It is never used otherwise.
6467 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
6469 * print.c (print_preprocess): Only check print_depth if print-circle
6471 (print_object): Check for cycles even when print-circle is nil and
6472 print-gensym is t, but only check print_depth if print-circle is nil.
6474 2012-04-20 Chong Yidong <cyd@gnu.org>
6476 * process.c (wait_reading_process_output): If EIO occurs on a pty,
6477 set the status to "failed" and ensure that sentinel is run.
6479 2012-04-20 Glenn Morris <rgm@gnu.org>
6481 * process.c (Fset_process_inherit_coding_system_flag)
6482 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
6483 (Fmake_network_process, Fmake_serial_process): Doc fix.
6485 2012-04-20 Eli Zaretskii <eliz@gnu.org>
6487 * xdisp.c (string_buffer_position_lim): Limit starting position to
6489 (set_cursor_from_row): If called for a mode-line or header-line
6490 row, return zero immediately.
6491 (try_cursor_movement): If inside continuation line, don't back up
6492 farther than the first row after the header line, if any.
6493 Don't consider the header-line row as "partially visible", even if
6494 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
6496 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
6498 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
6501 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6502 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
6504 configure: new option --enable-gcc-warnings (Bug#11207)
6505 * Makefile.in (C_WARNINGS_SWITCH): Remove.
6506 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6507 (ALL_CFLAGS): Use new macros rather than old.
6508 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
6509 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
6510 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
6511 -Wunused-result, -Wunused-variable. This should go away once
6512 the Emacs and Gnulib regex code is merged.
6513 (xmalloc, xrealloc): Now static.
6515 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
6517 * dired.c (Fsystem_groups): Remove unused local.
6519 2012-04-17 Glenn Morris <rgm@gnu.org>
6521 * dired.c (Fsystem_users): Doc fix.
6523 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
6525 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
6526 (syms_of_dired): Add them.
6528 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
6530 Fix minor alloc.c problems found by static checking.
6531 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
6532 New extern decls, to avoid calling undeclared functions.
6533 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
6534 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
6535 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
6536 (NEED_MEM_INSERT): New macro.
6537 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
6538 Remove one incorrect comment and fix another.
6540 Fix minor ralloc.c problems found by static checking.
6541 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6542 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
6543 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
6544 (r_alloc_sbrk): Now static.
6546 Improve ralloc.c interface checking.
6547 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6548 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
6549 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
6550 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
6551 [REL_ALLOC]: ... to here, to check interface.
6552 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
6553 Remove decls. This fixes an "It stinks!".
6555 * alloc.c (which_symbols): Fix alignment issue / type clash.
6557 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
6559 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
6560 (struct Lisp_Misc_Any): Likewise.
6561 (struct Lisp_Free): Likewise.
6562 * alloc.c (union aligned_Lisp_Symbol): Define.
6563 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
6564 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
6565 (union aligned_Lisp_Misc): Define.
6566 (MARKER_BLOCK_SIZE, struct marker_block): Use union
6567 aligned_Lisp_Misc instead of union Lisp_Misc.
6568 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
6570 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
6572 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
6573 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
6574 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
6575 * s/netbsd.h, s/sol2-6.h:
6576 Remove definition of GC_MARK_STACK, since the default now works.
6577 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
6578 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
6579 no longer the default.
6580 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
6582 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
6584 * lread.c (lisp_file_lexically_bound_p):
6585 Fix hang at ";-*-\n" (bug#11238).
6587 2012-04-14 Eli Zaretskii <eliz@gnu.org>
6589 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
6590 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
6592 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
6594 * nsterm.m (constrainFrameRect): Always constrain when there is only
6595 one screen (Bug#10962).
6597 2012-04-13 Ken Brown <kbrown@cornell.edu>
6599 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
6601 2012-04-13 Reuben Thomas <rrt@sc3d.org>
6603 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
6605 2012-04-11 Daniel Colascione <dancol@dancol.org>
6607 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
6608 against is gone. It's better to use vfork now so that when Cygwin
6609 gains a new, working vfork, we use it automatically (bug#10398).
6611 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6613 * window.c (save_window_save): Obey window-point-insertion-type.
6615 2012-04-11 Glenn Morris <rgm@gnu.org>
6617 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
6619 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6621 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
6623 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6625 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
6626 (force_quit_count): New var.
6627 (handle_interrupt): Use it.
6629 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
6631 * w32.c (w32_delayed_load): Record the full path of the library
6632 being loaded (bug#10424).
6634 2012-04-09 Glenn Morris <rgm@gnu.org>
6636 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
6637 not just in the obarray, before snarfing them. (Bug#11036)
6639 * Makefile.in ($(leimdir)/leim-list.el):
6640 Pass EMACS rather than BUILT_EMACS.
6642 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
6644 * process.c (make_process):
6645 * process.h: Add integer `gnutls_handshakes_tried' member to
6648 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
6649 Add convenience `GNUTLS_LOG2i' macro.
6651 * gnutls.c (gnutls_log_function2i): Convenience log function.
6652 (emacs_gnutls_read): Use new log functions,
6653 `gnutls_handshakes_tried' process member, and
6654 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
6655 attempts per process (connection).
6657 2012-04-09 Chong Yidong <cyd@gnu.org>
6659 * eval.c (Fuser_variable_p, user_variable_p_eh)
6660 (lisp_indirect_variable): Functions deleted.
6661 (Fdefvar): Caller changed.
6663 * callint.c (Finteractive, Fcall_interactively):
6664 * minibuf.c (Fread_variable): Callers changed.
6666 2012-04-09 Eli Zaretskii <eliz@gnu.org>
6668 * xdisp.c (set_cursor_from_row): If the display string appears in
6669 the buffer at position that is closer to point than the position
6670 after the display string, display the cursor on the first glyph of
6671 the display string. Fixes cursor display when a 'display' text
6672 property immediately follows invisible text. (Bug#11094)
6674 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
6676 composite.c: use 'double' consistently
6677 * composite.c (get_composition_id): Use 'double' consistently
6678 instead of converting 'float' to 'double' and vice versa; this is
6679 easier to understand and avoids a GCC warning.
6681 2012-04-09 Glenn Morris <rgm@gnu.org>
6683 * Makefile.in: Generate leim-list with bootstrap-emacs, in
6684 preparation for dumping it with emacs. (Bug#4789)
6685 (leimdir): New variable.
6686 ($(leimdir)/leim-list.el): New rule.
6687 (emacs$(EXEEXT)): Depend on leim-list.el.
6689 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
6690 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
6691 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
6693 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
6695 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
6698 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
6700 * xml.c (init_libxml2_functions) [WINDOWSNT]:
6701 Remove unused local variable.
6703 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6705 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
6706 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
6707 (mark_memory): Mark Lisp_Objects only if pointers might hide in
6708 objects, as mark_maybe_pointer will catch them otherwise.
6709 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
6710 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
6712 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6714 Fix typo that broke non-Windows builds.
6715 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
6717 2012-04-07 Eli Zaretskii <eliz@gnu.org>
6719 Support building on MS-Windows with libxml2.
6721 * makefile.w32-in (OBJ2): Add xml.$(O).
6722 (GLOBAL_SOURCES): Add xml.c.
6723 ($(BLD)/xml.$(O)): New dependency list.
6725 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
6726 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
6727 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
6728 [!WINDOWSNT]: New macros.
6729 (init_libxml2_functions, libxml2_loaded_p): New functions.
6730 (parse_region): Call fn_xmlCheckVersion instead of using the macro
6731 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
6732 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
6733 Calls xmlCleanupParser only if libxml2 was loaded (or statically
6735 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
6736 Call init_libxml2_functions before calling libxml2 functions.
6737 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
6739 * emacs.c: Don't include libxml/parser.h.
6740 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
6741 xmlCleanupParser directly.
6743 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
6745 2012-04-07 Eli Zaretskii <eliz@gnu.org>
6747 * indent.c (Fvertical_motion): If there is a display string at
6748 point, use it.vpos to compute how many lines to backtrack after
6749 move_it_to point. (Bug#11133)
6751 2012-04-06 Eli Zaretskii <eliz@gnu.org>
6753 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
6754 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
6755 about subtle differences between FETCH_CHAR* and STRING_CHAR*
6756 macros related to unification of CJK characters. For the details,
6757 see the discussion following the message here:
6758 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
6760 2012-04-04 Chong Yidong <cyd@gnu.org>
6762 * keyboard.c (Vdelayed_warnings_list): Doc fix.
6764 2012-04-01 Eli Zaretskii <eliz@gnu.org>
6766 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
6767 instead of alloca. (Bug#11138)
6769 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
6771 * w32menu.c (is_simple_dialog): Properly check lisp types.
6774 2012-03-31 Eli Zaretskii <eliz@gnu.org>
6776 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
6777 position we get to after a call to move_it_to fails the
6778 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
6779 only if we wind up in a string from display property. (Bug#11063)
6781 * window.c (Fdelete_other_windows_internal): Invalidate the row
6782 and column information about mouse highlight, so that redisplay
6783 restores it after reallocating the glyph matrices. (Bug#7464)
6785 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
6786 string comes from a `display' text property, use the buffer
6787 position of that property as if we actually saw that position in
6789 (move_it_by_lines): Remove the assertion that
6790 "it->current_x == 0 && it->hpos == 0" which can be legitimately
6791 violated when there's a before-string at the beginning of a line.
6794 2012-03-30 Eli Zaretskii <eliz@gnu.org>
6796 * xdisp.c (append_space_for_newline): If the default face was
6797 remapped, use the remapped face for the appended newline.
6798 (extend_face_to_end_of_line): Use the remapped default face for
6799 extending the face to the end of the line.
6800 (display_line): Call extend_face_to_end_of_line when the default
6801 face was remapped. (Bug#11068)
6803 2012-03-29 Eli Zaretskii <eliz@gnu.org>
6805 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
6807 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
6809 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
6811 2012-03-27 Glenn Morris <rgm@gnu.org>
6813 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
6816 2012-03-26 Kenichi Handa <handa@m17n.org>
6818 * dispextern.h (struct glyph): Fix previous change. Change the
6819 bit length of glyphless.ch to 25 (Bug#11082).
6821 2012-03-26 Chong Yidong <cyd@gnu.org>
6823 * keyboard.c (Vselection_inhibit_update_commands): New variable.
6824 (command_loop_1): Use it; inhibit selection update for
6825 handle-select-window too (Bug#8996).
6827 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
6829 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
6831 2012-03-25 Kenichi Handa <handa@m17n.org>
6833 * dispextern.h (struct glyph): Change the bit length of
6834 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
6836 2012-03-24 Eli Zaretskii <eliz@gnu.org>
6838 * s/ms-w32.h (tzname): Include time.h before redirecting to
6839 _tzname. Fixes the MSVC build. (Bug#9960)
6841 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
6843 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
6846 * xterm.c (XTread_socket): Only modify handling_signal if
6847 !SYNC_INPUT. (Bug#11080)
6849 2012-03-23 Eli Zaretskii <eliz@gnu.org>
6851 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
6852 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
6853 when fetching a multibyte character consumes more bytes than
6854 CHAR_BYTES returns, due to unification of CJK characters in
6855 string_char. (Bug#11073)
6857 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
6859 * process.c (wait_reading_process_output): Handle pty disconnect
6860 by refraining from sending oneself a SIGCHLD (bug#10933).
6862 2012-03-22 Chong Yidong <cyd@gnu.org>
6864 * dispextern.h (struct it): New member string_from_prefix_prop_p.
6866 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
6867 Mark string as coming from a prefix property.
6868 (handle_face_prop): Use default face for prefix strings (Bug#4281).
6869 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
6871 2012-03-21 Chong Yidong <cyd@gnu.org>
6873 * xfaces.c (Vface_remapping_alist): Doc fix.
6875 2012-03-20 Eli Zaretskii <eliz@gnu.org>
6877 * w32proc.c (Fw32_set_console_codepage)
6878 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
6881 2012-03-20 Chong Yidong <cyd@gnu.org>
6883 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
6884 to reflect default non-nil value of redisplay-dont-pause.
6886 2012-03-19 Kenichi Handa <handa@m17n.org>
6888 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
6889 it fit in a valid range (Bug#11003).
6891 2012-03-18 Eli Zaretskii <eliz@gnu.org>
6893 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
6894 that is not from display property, accept the row as a "cursor
6895 row" if one of the string's character has a non-nil `cursor'
6896 property. Fixes cursor positioning when there are newlines in
6897 overlay strings, e.g. in icomplete.el. (Bug#11035)
6899 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
6901 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
6903 2012-03-12 Chong Yidong <cyd@gnu.org>
6905 * eval.c (inhibit_lisp_code): Rename from
6906 inhibit_window_configuration_change_hook; move from window.c.
6908 * xfns.c (unwind_create_frame_1, Fx_create_frame):
6909 * window.c (run_window_configuration_change_hook)
6910 (syms_of_window): Callers changed.
6912 2012-03-11 Chong Yidong <cyd@gnu.org>
6914 * keymap.c (Fkey_description): Doc fix (Bug#9700).
6916 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
6918 2012-03-10 Chong Yidong <cyd@gnu.org>
6920 * frame.c (other_visible_frames): Don't assume the selected frame
6921 is visible (Bug#10955).
6923 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
6925 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
6927 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
6929 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
6930 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
6933 2012-03-03 Glenn Morris <rgm@gnu.org>
6935 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
6937 2012-03-02 Eli Zaretskii <eliz@gnu.org>
6939 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
6940 position past the first glyph_row that ends at ZV. (Bug#10902)
6941 (redisplay_window, next_element_from_string): Fix typos in
6943 (redisplay_window): Pass to move_it_vertically the margin in
6944 pixels, not in screen lines.
6946 2012-03-02 Glenn Morris <rgm@gnu.org>
6948 * buffer.c (buffer-list-update-hook): Doc fix.
6950 2012-02-29 Eli Zaretskii <eliz@gnu.org>
6952 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
6953 push_it before setting up the iterator for the first overlay
6954 string, even if we have an empty string loaded.
6955 (next_overlay_string): If there's an empty string on the iterator
6956 stack, pop the stack. (Bug#10903)
6958 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
6960 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
6961 Suggested by Stefan Monnier in
6962 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
6963 * alloc.c (widen_to_Lisp_Object): New static function.
6964 (mark_memory): Also mark Lisp_Objects by fetching pointer words
6965 and widening them to Lisp_Objects. This would work even if
6966 USE_LSB_TAG is defined and wide integers are used, which might
6967 happen in a future version of Emacs.
6969 2012-02-25 Chong Yidong <cyd@gnu.org>
6971 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
6974 * xselect.c (Fx_selection_exists_p): Doc fix.
6975 (x_clipboard_manager_save_all): Print an informative message
6976 before saving to clipboard manager.
6978 2012-02-24 Chong Yidong <cyd@gnu.org>
6980 * keyboard.c (process_special_events): Handle all X selection
6981 requests in kbd_buffer, not just the next one (Bug#8869).
6983 2012-02-23 Chong Yidong <cyd@gnu.org>
6985 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
6986 call when setting menu-bar-lines and tool-bar-lines parameters.
6987 (unwind_create_frame_1): New helper function.
6989 * window.c (inhibit_window_configuration_change_hook): New var.
6990 (run_window_configuration_change_hook): Obey it.
6991 (syms_of_window): Initialize it.
6993 2012-02-22 Chong Yidong <cyd@gnu.org>
6995 * xterm.c (x_draw_image_relief): Add missing type check for
6996 Vtool_bar_button_margin (Bug#10743).
6998 2012-02-21 Chong Yidong <cyd@gnu.org>
7000 * fileio.c (Vfile_name_handler_alist): Doc fix.
7002 * buffer.c (Fget_file_buffer): Protect against invalid file
7003 handler return value.
7005 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
7007 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
7008 when computing $valmask.
7010 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
7011 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
7012 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
7013 It's useless in that case, and it can cause problems on hosts
7014 that allocate halves of EMACS_INT values separately.
7015 Reported by Dan Horák. Diagnosed by Andreas Schwab in
7016 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
7017 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
7018 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
7019 it avoids undefined behavior on hosts where shifting right by more
7020 than the word width has undefined behavior.
7022 2012-02-19 Chong Yidong <cyd@gnu.org>
7024 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
7025 (Funhandled_file_name_directory, Ffile_name_as_directory)
7026 (Fdirectory_file_name, Fexpand_file_name)
7027 (Fsubstitute_in_file_name): Protect against invalid file handler
7028 return values (Bug#10845).
7030 2012-02-18 Eli Zaretskii <eliz@gnu.org>
7032 * .gdbinit (pitx): Fix incorrect references to fields of the
7035 2012-02-17 Chong Yidong <cyd@gnu.org>
7037 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
7039 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
7041 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
7042 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
7044 2012-02-15 Chong Yidong <cyd@gnu.org>
7046 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
7047 marked as special. Also, starting docstrings with * is obsolete.
7049 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
7051 * gnutls.c (emacs_gnutls_write): Fix last change.
7053 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
7055 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
7058 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
7060 * keymap.c (Fsingle_key_description): Handle char ranges.
7062 2012-02-12 Chong Yidong <cyd@gnu.org>
7064 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
7065 as that creates a dangerous corner case.
7067 * window.c (Fdelete_window_internal): Invalidate the mouse
7068 highlight (Bug#9904).
7070 2012-02-12 Glenn Morris <rgm@gnu.org>
7072 * xselect.c (Fx_own_selection_internal)
7073 (Fx_get_selection_internal, Fx_disown_selection_internal)
7074 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
7075 * nsselect.m (Fx_own_selection_internal)
7076 (Fx_disown_selection_internal, Fx_selection_exists_p)
7077 (Fx_selection_owner_p, Fx_get_selection_internal):
7078 Sync docs and argument specs with the xselect.c versions.
7080 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
7082 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
7084 2012-02-11 Eli Zaretskii <eliz@gnu.org>
7086 * w32select.c (Fx_selection_exists_p): Sync doc string and
7087 argument list with xselect.c. (Bug#10783)
7089 * w16select.c (Fx_selection_exists_p): Sync doc string and
7090 argument list with xselect.c. (Bug#10783)
7092 2012-02-10 Glenn Morris <rgm@gnu.org>
7094 * fns.c (Fsecure_hash): Doc fix.
7096 2012-02-09 Kenichi Handa <handa@m17n.org>
7098 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
7100 2012-02-07 Chong Yidong <cyd@gnu.org>
7102 * buffer.c (Fbuffer_local_variables)
7103 (buffer_lisp_local_variables): Handle unbound vars correctly;
7104 don't let Qunbound leak into Lisp.
7106 2012-02-07 Glenn Morris <rgm@gnu.org>
7108 * image.c (Fimagemagick_types): Doc fix.
7110 * image.c (imagemagick-render-type): Change it from a lisp object
7111 to an integer. Move the doc here from the lisp manual.
7112 Treat all values not equal to 0 the same.
7114 2012-02-06 Chong Yidong <cyd@gnu.org>
7116 * doc.c (store_function_docstring): Avoid applying docstring of
7117 alias to base function (Bug#2603).
7119 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
7121 * .gdbinit (pp1, pv1): Remove redundant defines.
7124 2012-02-04 Chong Yidong <cyd@gnu.org>
7126 * nsterm.m: Declare a global (Bug#10694).
7128 2012-02-04 Eli Zaretskii <eliz@gnu.org>
7130 * w32.c (get_emacs_configuration_options):
7131 Include --enable-checking, if specified, in the return value.
7133 2012-02-04 Martin Rudalics <rudalics@gmx.at>
7135 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
7136 after rounding frame sizes. (Bug#9723)
7138 2012-02-04 Eli Zaretskii <eliz@gnu.org>
7140 * keyboard.c (adjust_point_for_property): Don't position point
7141 before BEGV. (Bug#10696)
7143 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
7145 Handle overflow when computing char display width (Bug#9496).
7146 * character.c (char_width): Return EMACS_INT, not int.
7147 (char_width, c_string_width): Check for overflow when
7148 computing the width; this is possible now that individual
7149 characters can have unbounded width. Problem introduced
7150 by merge from Emacs 23 on 2012-01-19.
7152 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
7154 * dbusbind.c (Fdbus_register_method): Mention the return value
7155 :ignore in the docstring.
7157 2012-02-02 Glenn Morris <rgm@gnu.org>
7159 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
7161 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
7162 Unconditionally set to t. (Bug#10673)
7163 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
7164 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
7165 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
7167 2012-02-02 Kenichi Handa <handa@m17n.org>
7169 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
7170 0, do not call append_composite_glyph.
7172 2012-02-02 Kenichi Handa <handa@m17n.org>
7174 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
7176 (x_produce_glyphs): If the component of a composition is a null
7177 string, set it->pixel_width to 1 to avoid zero-width glyph.
7179 2012-02-01 Eli Zaretskii <eliz@gnu.org>
7181 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
7182 first 2 arguments are identical. This makes inserting large
7183 output from a subprocess an order of magnitude faster on
7184 MS-Windows, where all sbrk'ed memory is always contiguous.
7186 2012-01-31 Glenn Morris <rgm@gnu.org>
7188 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
7189 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
7190 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
7192 2012-01-29 Glenn Morris <rgm@gnu.org>
7194 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
7196 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
7198 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
7200 2012-01-28 Chong Yidong <cyd@gnu.org>
7202 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
7204 2012-01-26 Chong Yidong <cyd@gnu.org>
7206 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
7208 * search.c (Fsearch_forward, Fsearch_backward): Document negative
7209 repeat counts (Bug#10507).
7211 2012-01-26 Glenn Morris <rgm@gnu.org>
7213 * lread.c (syms_of_lread): Doc fix.
7215 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
7217 * coding.c (encode_designation_at_bol): Change return value to
7220 2012-01-25 Chong Yidong <cyd@gnu.org>
7222 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
7224 2012-01-21 Chong Yidong <cyd@gnu.org>
7226 * floatfns.c (Fcopysign): Make the second argument non-optional,
7227 since nil is not allowed anyway.
7229 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
7231 * process.c (read_process_output): Use p instead of XPROCESS (proc).
7232 (send_process): Likewise.
7234 2012-01-19 Martin Rudalics <rudalics@gmx.at>
7236 * window.c (save_window_save, Fcurrent_window_configuration)
7237 (Vwindow_persistent_parameters): Do not use Qstate.
7238 Rewrite doc-strings.
7240 2012-01-19 Kenichi Handa <handa@m17n.org>
7242 * character.c (char_width): New function.
7243 (Fchar_width, c_string_width, lisp_string_width):
7244 Use char_width (Bug#9496).
7246 2012-01-16 Martin Rudalics <rudalics@gmx.at>
7248 * window.c (Vwindow_persistent_parameters): New variable.
7249 (Fset_window_configuration, save_window_save): Handle persistent
7252 2012-01-14 Eli Zaretskii <eliz@gnu.org>
7254 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
7255 thrashing the stack of the thread. (Bug#9087)
7257 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
7259 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
7261 2012-01-11 Eli Zaretskii <eliz@gnu.org>
7263 * xdisp.c (rows_from_pos_range): Handle the case where the
7264 highlight ends on a newline. (Bug#10464)
7265 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
7266 he end column for display of highlight that ends on a newline
7269 2012-01-11 Glenn Morris <rgm@gnu.org>
7271 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
7272 from load-path also when installation-directory is nil. (Bug#10208)
7274 2012-01-10 Glenn Morris <rgm@gnu.org>
7276 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
7278 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
7279 Update template values to be closer to their typical values these days.
7281 2012-01-09 Eli Zaretskii <eliz@gnu.org>
7283 * xdisp.c (rows_from_pos_range): Accept additional argument
7284 DISP_STRING, and accept any glyph in a row whose object is that
7285 string as eligible for mouse highlight. Fixes mouse highlight of
7286 display strings from overlays. (Bug#10464)
7288 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
7290 emacs: fix an auto-save permissions race condition (Bug#10400)
7291 * fileio.c (auto_saving_dir_umask): New static var.
7292 (Fmake_directory_internal): Use it.
7293 (do_auto_save_make_dir): Set it, instead of invoking chmod after
7294 creating the directory. The old code temporarily assigns
7295 too-generous permissions to the directory.
7296 (do_auto_save_eh): Clear it.
7297 (Fdo_auto_save): Catch all errors, not just file errors, so
7298 that the var is always cleared.
7300 2012-01-07 Eli Zaretskii <eliz@gnu.org>
7302 * search.c (scan_buffer): Pass character positions to
7303 know_region_cache, not byte positions. (Bug#6540)
7305 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
7307 * w32.c (sys_rename): Report EXDEV when rename of a directory
7308 fails because the target is on another logical disk. (Bug#10284)
7310 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
7312 * xterm.c (x_embed_request_focus): New function.
7314 * xterm.h: Add prototype.
7316 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
7318 2012-01-05 Glenn Morris <rgm@gnu.org>
7320 * emacs.c (emacs_copyright): Update short copyright year to 2012.
7322 2012-01-01 Eli Zaretskii <eliz@gnu.org>
7324 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
7325 Load gnutls_transport_set_lowat only if GnuTLS version is below
7327 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
7328 GnuTLS versions below 2.11.1.
7330 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
7332 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
7333 to the doc string advising against its use for altering the way
7334 windows are scrolled.
7336 2011-12-28 Kenichi Handa <handa@m17n.org>
7338 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
7339 coding-system ASCII compatible only when it does not produce BOM
7340 on encoding (Bug#10383).
7342 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
7344 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
7346 (create_and_show_popup_menu): Always use menu_position_func for
7349 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
7351 * callint.c (Fcall_interactively): Don't truncate prompt string.
7353 2011-12-23 Eli Zaretskii <eliz@gnu.org>
7355 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
7356 property that ends at ZV, so that the bidi iteration could be
7357 resumed from there (after widening). (Bug#10360)
7359 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
7361 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
7363 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
7365 * nsterm.m (x_free_frame_resources):
7366 Release f->output_data.ns->miniimage.
7367 (ns_index_color): Fix indentation. Do not retain
7368 color_table->colors[i].
7370 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
7373 * nsfns.m (x_set_background_color): Assign return value from
7374 ns_index_color to face-background instead of NSColor*.
7375 (ns_implicitly_set_icon_type): Fix indentation.
7376 Change assignment in for loop to comparison.
7378 * emacs.c (ns_pool): New variable.
7379 (main): Assign ns_pool.
7380 (Fkill_emacs): Call ns_release_autorelease_pool.
7382 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
7383 autorelease fdesc, release fdAttrs and tdict.
7384 (ns_get_covering_families): Release charset.
7385 (ns_findfonts): Release NSFontDescriptor created with new.
7386 (ns_uni_to_glyphs): Fix indentation.
7387 (setString): Release attrStr before assigning new value.
7389 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
7391 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
7393 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
7394 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
7396 2011-12-18 David Reitter <reitter@cmu.edu>
7398 * nsterm.m (ns_term_init): Subscribe for notifications
7399 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
7400 to method trackingNotification in EmacsMenu.
7402 * nsmenu.m (trackingMenu): New variable.
7403 (trackingNotification): New method (from Aquamacs).
7404 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
7405 from Aquamacs (Bug#7030).
7407 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
7409 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
7410 (symbol_to_nsstring): Fix indentation.
7411 (ns_symbol_to_pb): New function.
7412 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
7413 (Fns_rotate_cut_buffers_internal): Remove.
7414 (Fns_store_selection_internal): Rename from
7415 Fns_store_cut_buffer_internal.
7416 (ns_get_foreign_selection, Fx_own_selection_internal)
7417 (Fx_disown_selection_internal, Fx_selection_exists_p)
7418 (Fns_get_selection_internal, Fns_store_selection_internal):
7419 Use ns_symbol_to_pb and check if return value is nil.
7420 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
7421 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
7422 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
7423 renamed to Sns_store_selection_internal.
7424 (ns_handle_selection_request): Move code to Fx_own_selection_internal
7425 and remove this function.
7426 (ns_handle_selection_clear): Remove, never used.
7427 (Fx_own_selection_internal): Move code from ns_handle_selection_request
7430 2011-12-17 Ken Brown <kbrown@cornell.edu>
7432 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
7433 GID is unknown (Bug#10257).
7435 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
7437 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
7438 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
7439 which caused a build failure on GNU/Linux IA-64. This problem was
7440 introduced by my 2011-10-07 patch.
7442 2011-12-15 Juri Linkov <juri@jurta.org>
7444 * image.c (imagemagick_error): New function. (Bug#10112)
7445 (imagemagick_load_image): Comment out `MagickSetResolution' call.
7446 Use `imagemagick_error' where ImageMagick functions return
7448 (Fimagemagick_types): Add `Fnreverse' to return the list in the
7451 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7453 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
7454 fill background (Bug#8992).
7456 2011-12-13 Martin Rudalics <rudalics@gmx.at>
7458 * window.c (Vwindow_combination_resize)
7459 (Vwindow_combination_limit): Use t instead of non-nil in
7461 (Vrecenter_redisplay): Add first sentence of doc-string on
7463 (Frecenter): Fix doc-string typo.
7465 2011-12-11 Kenichi Handa <handa@m17n.org>
7467 * coding.c (Funencodable_char_position): Pay attention to the
7468 buffer text relocation (Bug#9389).
7470 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
7472 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
7473 gtk_init (Bug#10100).
7475 2011-12-10 Eli Zaretskii <eliz@gnu.org>
7477 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
7478 IT->string is nil. (Bug#10263)
7480 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
7482 * nsterm.h (x_free_frame_resources): Declare.
7484 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
7485 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
7487 * nsterm.h (ns_get_defaults_value): Declare.
7489 * nsterm.m (ns_default): Call ns_get_defaults_value.
7491 2011-12-09 Eli Zaretskii <eliz@gnu.org>
7493 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
7496 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7498 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
7499 that where the value of an _OBJC_* symbol points to is in the .bss
7500 section (Bug#10240).
7502 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7504 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
7505 after the loop to call ccl_driver at least once (Bug#8619).
7507 2011-12-08 Kenichi Handa <handa@m17n.org>
7509 * ftfont.c (get_adstyle_property): Fix previous change
7512 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
7514 * w32.c (init_environment): If no_site_lisp, remove site-lisp
7515 dirs from the default value of EMACSLOADPATH (bug#10208).
7517 2011-12-07 Glenn Morris <rgm@gnu.org>
7519 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
7520 installation and source directories as well. (Bug#10208)
7522 2011-12-06 Chong Yidong <cyd@gnu.org>
7524 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
7526 2011-12-06 Glenn Morris <rgm@gnu.org>
7528 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
7529 as an error, not just -1. (Bug#10217)
7531 2011-12-05 Chong Yidong <cyd@gnu.org>
7533 * keyboard.c (process_special_events): New function.
7534 (swallow_events, Finput_pending_p): Use it (Bug#10195).
7536 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
7538 * coding.c (encode_designation_at_bol): Don't use uninitialized
7539 local variable (Bug#9318).
7541 2011-12-05 Kenichi Handa <handa@m17n.org>
7543 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
7544 return Qnil (Bug#8046, Bug#10193).
7546 2011-12-05 Kenichi Handa <handa@m17n.org>
7548 * coding.c (encode_designation_at_bol): New args charbuf_end and
7549 dst. Return the number of produced bytes. Callers changed.
7550 (coding_set_source): Return how many bytes coding->source was
7552 (coding_set_destination): Return how many bytes
7553 coding->destination was relocated.
7554 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
7555 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
7557 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7559 * coding.c (CODING_CHAR_CHARSET_P): New macro.
7560 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
7563 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
7565 The following changes are to fix Bug#9318.
7567 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
7568 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
7569 (encode_coding_iso_2022, encode_coding_sjis)
7570 (encode_coding_big5, encode_coding_charset): Use the above macros.
7572 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
7574 * lisp.h (process_quit_flag): Fix external declaration.
7576 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7578 Don't macro-inline non-performance-critical code.
7579 * eval.c (process_quit_flag): New function.
7580 * lisp.h (QUIT): Use it.
7582 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
7584 * nsfns.m (get_geometry_from_preferences): New function.
7585 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
7587 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
7589 * emacs.c (Qkill_emacs): Define.
7590 (syms_of_emacs): Initialize it.
7591 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
7592 Qquit_flag to `kill-emacs' instead.
7593 (quit_throw_to_read_char): Add parameter `from_signal'.
7594 All callers changed. Call Fkill_emacs if requested and safe.
7595 * lisp.h (QUIT): Call Fkill_emacs if requested.
7597 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
7599 * widget.c (update_wm_hints): Return if wmshell is null.
7600 (widget_update_wm_size_hints): New function.
7602 * widget.h (widget_update_wm_size_hints): Declare.
7604 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
7605 widget_update_wm_size_hints (Bug#10104).
7607 2011-12-03 Eli Zaretskii <eliz@gnu.org>
7609 * xdisp.c (handle_invisible_prop): If the invisible text ends just
7610 before a newline, prepare the bidi iterator for consuming the
7611 newline, and keep the current paragraph direction. (Bug#10183)
7612 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
7614 2011-12-02 Juri Linkov <juri@jurta.org>
7616 * search.c (Fword_search_regexp): New Lisp function created from
7617 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
7618 (Fword_search_backward, Fword_search_forward)
7619 (Fword_search_backward_lax, Fword_search_forward_lax):
7620 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
7621 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
7623 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
7625 * fileio.c (Finsert_file_contents): Move after-change-function call
7626 to before the "handled:" label, since all "goto handled" appear in
7627 cases where the *-change-functions have already been properly called
7630 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
7632 * keyboard.c (interrupt_signal): Don't call kill-emacs when
7633 waiting for input. (Bug#10169)
7635 2011-11-30 Eli Zaretskii <eliz@gnu.org>
7637 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
7638 verifies glyph row's hash code--we have just reallocated the
7639 glyphs, so their contents can be complete garbage. (Bug#10164)
7641 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
7643 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
7645 2011-11-30 Eli Zaretskii <eliz@gnu.org>
7647 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
7648 attributes are tested _before_ calling verify_row_hash, to protect
7649 against GCC re-ordering of the tests. (Bug#10164)
7651 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
7653 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
7655 * xterm.c (handle_one_xevent): Only set async_visible and friends
7656 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7657 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
7658 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
7660 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
7662 Remove GCPRO-related macros that exist only to avoid shadowing locals.
7663 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
7664 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
7665 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7666 All uses changed to use GCPRO1 etc.
7667 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
7668 Revert to old implementation (i.e., before 2011-03-11).
7670 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7672 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
7673 of scroll runs so as to avoid assigning disabled bogus rows and
7674 unnecessary graphics copy operations.
7676 2011-11-27 Eli Zaretskii <eliz@gnu.org>
7678 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
7679 (snprintf) [_MSC_VER]: Redirect to _snprintf.
7680 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
7681 (malloc, free, realloc, calloc): Redirect to e_* only when
7684 * lisp.h (GCTYPEBITS): Move before first use.
7685 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
7686 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
7687 this macro definition.
7689 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
7692 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
7694 * gtkutil.c (xg_create_frame_widgets):
7695 Call gtk_window_set_has_resize_grip (FALSE) if that function is
7696 present with Gtk+ 2.0.
7698 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7700 * fileio.c (Finsert_file_contents): Undo previous change; see
7701 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7703 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7705 Rename locals to avoid shadowing.
7706 * fileio.c (Finsert_file_contents):
7707 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
7708 * process.c (wait_reading_process_output):
7709 Rename inner 'proc' to 'p' to avoid shadowing.
7710 Indent for consistency with usual Emacs style.
7712 2011-11-25 Eli Zaretskii <eliz@gnu.org>
7714 * xdisp.c (redisplay_window): If cursor row is not fully visible
7715 after recentering, and scroll-conservatively is set to a large
7716 number, scroll window by a few more lines to make the cursor fully
7717 visible and out of scroll-margin. (Bug#10105)
7718 (start_display): Don't move to the next line if the display should
7719 start at a newline that is part of a display vector or an overlay
7722 2011-11-24 Juri Linkov <juri@jurta.org>
7724 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
7725 after the `MagickPingImage' call. (Bug#10112)
7727 2011-11-23 Chong Yidong <cyd@gnu.org>
7729 * window.c (Fcoordinates_in_window_p): Accept only live windows.
7731 2011-11-23 Martin Rudalics <rudalics@gmx.at>
7733 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
7734 making another buffer current. (Bug#10114)
7736 2011-11-23 Glenn Morris <rgm@gnu.org>
7738 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
7740 2011-11-23 Chong Yidong <cyd@gnu.org>
7742 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
7743 using it (Bug#5984).
7745 2011-11-22 Eli Zaretskii <eliz@gnu.org>
7747 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
7748 and header-lines, as they don't have one computed for them.
7751 * .gdbinit (prow): Make displayed values more self-explaining.
7752 Add row's hash code.
7754 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
7756 * process.c (wait_reading_process_output): Fix asynchrounous
7757 GnuTLS socket handling on some versions of the GnuTLS library.
7758 (wait_reading_process_output): Add comment and URL.
7760 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
7762 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
7764 2011-11-21 Chong Yidong <cyd@gnu.org>
7766 * window.c (Fnext_window, Fprevious_window): Doc fix.
7768 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7770 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
7772 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
7774 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
7776 2011-11-20 Martin Rudalics <rudalics@gmx.at>
7778 * window.c (Fset_window_combination_limit): Rename argument
7780 (Vwindow_combination_limit): Remove "status" from doc-string.
7782 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
7784 * m/ibms390.h: Remove.
7785 * m/ibms390x.h: Don't include "ibms390.h".
7787 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7789 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
7790 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
7792 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
7794 * casetab.c (Fset_case_table):
7795 * charset.c (Fcharset_after): Fix typos.
7797 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
7799 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
7800 Otherwise, valgrind does not work on some platforms.
7801 Problem reported by Andreas Schwab in
7802 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
7803 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
7804 is set, removing the need for VIRT_ADDRESS_VARIES.
7805 (PURE_P): Use a more-efficient implementation that needs just one
7806 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
7807 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
7808 to 4 (xorl, subq, cmpq, setbe).
7809 * alloc.c (pure): Always extern now, since that's the
7810 VIRT_ADDR_VARIES behavior.
7811 (PURE_POINTER_P): Use a single comparison, not two, for
7812 consistency with the new puresize.h.
7813 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
7814 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
7815 Remove VIRT_ADDR_VARIES no longer needed.
7817 2011-11-19 Eli Zaretskii <eliz@gnu.org>
7819 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
7820 (erase_phys_cursor, update_window_cursor, show_mouse_face)
7821 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
7822 behave as if the cursor position were at the window margin.
7824 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
7825 and the cursor position is out of bounds, behave as if the cursor
7826 position were at the window margin. (Bug#10075)
7828 2011-11-18 Chong Yidong <cyd@gnu.org>
7830 * window.c (Fwindow_combination_limit): Make first argument
7831 non-optional, since it is meaningless for live windows like the
7834 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
7836 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
7838 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
7840 * intervals.c: Fix grafting over the whole buffer (bug#10071).
7841 (graft_intervals_into_buffer): Simplify.
7843 2011-11-18 Eli Zaretskii <eliz@gnu.org>
7845 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
7846 hash values of the two rows.
7847 (copy_row_except_pointers): Preserve the used[] arrays and the
7848 hash values of the two rows. (Bug#10035)
7849 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
7851 * xdisp.c (row_hash): New function, body extracted from
7852 compute_line_metrics.
7853 (compute_line_metrics): Call row_hash, instead of computing the
7856 * dispnew.c (verify_row_hash): Call row_hash for computing the
7857 hash code of a row, instead of duplicating code from xdisp.c.
7859 * dispextern.h (row_hash): Add prototype.
7861 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
7863 * frame.c (delete_frame): Don't delete the terminal when the last
7864 X frame is closed if emacs is built with GTK toolkit.
7866 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
7868 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
7870 2011-11-17 Martin Rudalics <rudalics@gmx.at>
7872 * window.c (Vwindow_splits): Rename to
7873 Vwindow_combination_resize. Suggested by Juri Linkov.
7874 (Fsplit_window_internal): Use Vwindow_combination_resize instead
7877 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
7879 * nsfns.m (Fns_font_name):
7880 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
7882 2011-11-16 Martin Rudalics <rudalics@gmx.at>
7884 * window.h (window): Rename slot "nest" to "combination_limit".
7885 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
7886 (Fset_window_nest): Rename to Fset_window_combination_limit.
7887 (Vwindow_nest): Rename to Vwindow_combination_limit.
7888 (recombine_windows, make_parent_window, make_window)
7889 (Fsplit_window_internal, saved_window)
7890 (Fset_window_configuration, save_window_save): Rename all
7891 occurrences of window_nest to window_combination_limit.
7893 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
7895 * image.c (imagemagick_load_image): Fix typo.
7897 2011-11-14 Eli Zaretskii <eliz@gnu.org>
7899 * xdisp.c (display_line): Move the call to
7900 highlight_trailing_whitespace before the call to
7901 compute_line_metrics, since the latter needs to see the final
7902 faces of all the glyphs to compute ROW's hash value.
7903 Fixes assertion violations in row_equal_p. (Bug#10035)
7905 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
7907 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
7908 just return (bug#10044).
7910 2011-11-12 Eli Zaretskii <eliz@gnu.org>
7912 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
7913 with user-defined heap size. Bump the default size of the temacs
7914 heap to 27MB, to avoid memory warning when running temacs.
7915 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
7917 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
7918 current_matrix and desired_matrix. (Bug#9990)
7919 (verify_row_hash) [XASSERTS]: New function.
7920 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
7921 that the hash value of glyph rows is correct.
7923 2011-11-12 Martin Rudalics <rudalics@gmx.at>
7925 * window.h (window): Remove splits slot.
7926 * window.c (Fwindow_splits, Fset_window_splits): Remove.
7927 (Fdelete_other_windows_internal, make_parent_window)
7928 (make_window, Fsplit_window_internal, Fdelete_window_internal)
7929 (Fset_window_configuration, save_window_save): Don't deal with
7930 split status of windows.
7931 (saved_window): Remove splits slot.
7932 (Vwindow_splits): Rewrite doc-string.
7934 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
7936 * xfns.c (unwind_create_frame):
7937 * nsfns.m (unwind_create_frame):
7938 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
7939 Vframe_list (Bug#9999).
7941 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
7943 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
7945 2011-11-11 Kenichi Handa <handa@m17n.org>
7947 * callproc.c (Fcall_process): Set the member dst_multibyte of
7950 2011-11-11 Johan Bockgård <bojohan@gnu.org>
7952 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
7953 avoid a crash (bug#9496).
7955 2011-11-09 Chong Yidong <cyd@gnu.org>
7957 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
7958 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
7960 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
7962 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
7964 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
7966 Avoid some portability problems by eschewing 'extern inline' functions.
7967 The trivial performance wins aren't worth the portability hassles; see
7968 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
7970 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
7971 (window_box_width, window_box_left, window_box_left_offset)
7972 (window_box_right, window_box_right_offset): Undo previous change,
7973 by removing the "extern"s.
7974 * intervals.c (adjust_intervals_for_insertion)
7975 (adjust_intervals_for_deletion): Undo previous change,
7976 making these static again.
7977 (offset_intervals, temp_set_point_both, temp_set_point)
7978 (copy_intervals_to_string): No longer inline.
7979 * xdisp.c (window_text_bottom_y, window_box_width)
7980 (window_box_height, window_box_left_offset)
7981 (window_box_right_offset, window_box_left, window_box_right)
7982 (window_box): No longer inline.
7984 2011-11-08 Chong Yidong <cyd@gnu.org>
7986 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
7987 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
7988 Signal an error if not a live window.
7989 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
7990 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
7992 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
7994 * lisp.h (syms_of_abbrev): Remove declaration.
7995 Reported by CHENG Gao <chenggao@royau.me>.
7997 2011-11-07 Eli Zaretskii <eliz@gnu.org>
7999 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
8000 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
8001 of temacs in GUI mode.
8003 2011-11-07 Martin Rudalics <rudalics@gmx.at>
8005 * window.h: Declare delete_all_child_windows instead of
8006 delete_all_subwindows.
8007 * window.c (Fwindow_nest, Fset_window_nest)
8008 (Fset_window_new_total, Fset_window_new_normal)
8009 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
8010 (delete_all_subwindows): Rename to delete_all_child_windows.
8011 (Fdelete_other_windows_internal, Fset_window_configuration):
8012 Call delete_all_child_windows instead of delete_all_subwindows.
8013 * frame.c (delete_frame): Call delete_all_child_windows instead
8014 of delete_all_subwindows.
8016 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
8018 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
8019 This is also needed for porting to any host where GC_MARK_STACK is
8020 not GC_MAKE_GCPROS_NOOPS.
8021 (which_symbols): Use it.
8023 2011-11-07 Kenichi Handa <handa@m17n.org>
8025 * coding.c (coding_set_destination): Check coding->src_pos only
8026 when coding->src_object is a buffer (bug#9910).
8028 * process.c (send_process): Set the member src_multibyte of coding
8029 to 0 (bug#9911) when sending a unibyte text.
8031 * callproc.c (Fcall_process): Set the member src_multibyte of
8032 process_coding to 0 (bug#9912).
8034 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8036 * xmenu.c (cleanup_widget_value_tree): New function.
8037 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
8038 calling free_menubar_widget_value_tree directly (Bug#9830).
8040 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
8042 Fix some portability problems with 'inline'.
8043 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
8044 (window_box_width, window_box_left, window_box_left_offset)
8045 (window_box_right, window_box_right_offset): Declare extern.
8046 Otherwise, these inline functions do not conform to C99 and
8047 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
8048 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
8049 * intervals.c (adjust_intervals_for_insertion)
8050 (adjust_intervals_for_deletion): Now extern, because otherwise the
8051 extern inline functions 'offset_intervals' couldn't refer to it.
8052 (static_offset_intervals): Remove.
8053 (offset_intervals): Rewrite using the old contents of
8054 static_offset_intervals. The old version didn't conform to C99
8055 because an extern inline function contained a reference to an
8056 identifier with static linkage.
8058 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
8060 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
8063 2011-11-06 Eli Zaretskii <eliz@gnu.org>
8065 * xdisp.c (init_iterator, reseat_to_string): Don't set the
8066 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
8067 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
8068 return Qleft_to_right.
8070 2011-11-06 Chong Yidong <cyd@gnu.org>
8072 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
8073 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
8074 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
8075 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
8076 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
8077 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
8078 (Fwindow_vscroll): Doc fix.
8079 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
8080 argument, since it makes no sense to pass a live window and for
8081 consistency with window-child.
8083 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
8085 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
8088 2011-11-05 Jason Rumney <jasonr@gnu.org>
8090 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
8091 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
8093 (add_font_entity_to_list): Fix logic errors in mixed boolean and
8094 bitwise arithmetic preventing use of unicode-sip and non-truetype
8097 2011-11-05 Eli Zaretskii <eliz@gnu.org>
8099 * s/ms-w32.h (fstat, stat, utime): Move redirections to
8102 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
8103 initialization code to keep similarity to xfns.c after changes
8106 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
8108 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
8109 (unwind_create_frame): New function (Bug#9943).
8110 (Fx_create_frame): Restructure code to be more similar to the one in
8111 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
8112 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
8113 Move terminal->reference_count++ just before making the frame official
8116 * nsterm.m (x_free_frame_resources): New function.
8117 (x_destroy_window): Move code to x_free_frame_resources.
8119 * xfns.c (unwind_create_frame): Fix comment.
8120 (Fx_create_frame, x_create_tip_frame):
8121 Move terminal->reference_count++ just before making the frame
8122 official. Move initialization of image_cache_refcount and
8123 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
8125 2011-11-05 Eli Zaretskii <eliz@gnu.org>
8127 Support MSVC build with newer versions of Visual Studio.
8128 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
8129 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
8132 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
8133 which are not supported by MSVC.
8134 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
8135 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
8137 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
8139 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
8141 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
8143 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
8145 Support MSVC build with newer versions of Visual Studio.
8146 * w32.c: Don't include w32api.h for MSVC.
8147 (init_environment) [_MSC_VER]: Call sys_access, not _access.
8149 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
8150 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
8151 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
8152 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
8154 (alloca) [_MSC_VER]: Define to _alloca.
8156 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
8158 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
8160 2011-11-04 Eli Zaretskii <eliz@gnu.org>
8162 * xdisp.c (note_mouse_highlight): If either of
8163 previous/next-single-property-change returns nil, treat that as
8164 the beginning or the end of the buffer. (Bug#9955)
8166 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
8168 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
8169 label is not null (Bug#9951).
8170 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
8173 2011-11-04 Eli Zaretskii <eliz@gnu.org>
8175 * window.c (Fwindow_body_size): Mention in the doc string that the
8176 return value is in frame's canonical units. (Bug#9949)
8178 2011-11-03 Eli Zaretskii <eliz@gnu.org>
8180 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
8182 * w32fns.c (unwind_create_frame): If needed, free the glyph
8183 matrices of the partially constructed frame. (Bug#9943)
8184 * xfns.c (unwind_create_frame): Likewise.
8186 2011-11-01 Eli Zaretskii <eliz@gnu.org>
8188 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
8189 Don't stop backward scan on the continuation glyph, even though
8190 its CHARPOS is positive.
8191 (mouse_face_from_buffer_pos, note_mouse_highlight):
8192 Rename cover_string to disp_string.
8194 2011-11-01 Martin Rudalics <rudalics@gmx.at>
8196 * window.c (temp_output_buffer_show): Don't use
8197 Vtemp_buffer_show_specifiers.
8198 (Vtemp_buffer_show_specifiers): Remove unused variable.
8200 2011-10-30 Eli Zaretskii <eliz@gnu.org>
8202 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
8203 past the beginning of the current glyph matrix.
8205 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
8207 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
8208 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
8209 HAVE_GTK3 (Bug#9869).
8211 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
8212 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
8214 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
8216 * xterm.c: Declare x_handle_net_wm_state to return int.
8217 (handle_one_xevent): Check if we are iconified but don't have
8218 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
8219 (get_current_wm_state): Return non-zero if not hidden,
8220 check for _NET_WM_STATE_HIDDEN (Bug#9893).
8221 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
8222 (x_handle_net_wm_state): Return what get_current_wm_state returns.
8223 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
8225 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
8227 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
8228 so that this new function doesn't get optimized away by a
8229 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
8231 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
8233 * frame.h (MOUSE_HL_INFO): Remove excess parens.
8235 2011-10-29 Eli Zaretskii <eliz@gnu.org>
8237 Fix the `xbytecode' command.
8238 * .gdbinit (xprintbytestr): New command.
8239 (xwhichsymbols): Rename from `which'; all callers changed.
8240 (xbytecode): Print the byte-code string as well.
8242 2011-10-29 Kim Storm <storm@cua.dk>
8244 * alloc.c (which_symbols): New function.
8246 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
8248 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
8251 2011-10-29 Glenn Morris <rgm@gnu.org>
8253 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
8254 Not clear what it was for, and it causes various bugs. (Bug#9839)
8256 2011-10-28 Eli Zaretskii <eliz@gnu.org>
8258 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
8259 possible random value that matches one of those tested as
8260 condition to clear the mouse face.
8262 2011-10-28 Chong Yidong <cyd@gnu.org>
8264 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
8266 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
8268 * window.c (make_window): Initialize phys_cursor_on_p.
8270 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
8272 * lisp.h (struct Lisp_Symbol): Update comments.
8274 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
8276 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
8278 2011-10-28 Eli Zaretskii <eliz@gnu.org>
8280 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
8281 <oslsachem@gmail.com> for helping to debug this.
8283 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
8284 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
8285 (g_b_init_get_glyph_outline_w): New static variables.
8286 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
8287 (GetGlyphOutlineW_Proc): New typedefs.
8288 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
8289 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
8291 (w32font_open_internal, compute_metrics):
8292 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
8293 instead of calling the "wide" APIs directly.
8295 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
8297 * w32.h (syms_of_w32font): Add prototype.
8299 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
8301 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
8302 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
8303 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
8304 (Fmove_to_window_line): Doc fix.
8306 2011-10-27 Chong Yidong <cyd@gnu.org>
8308 * process.c (make_process): Set gnutls_state to NULL.
8310 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
8311 non-NULL, regardless of GNUTLS_INITSTAGE.
8312 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
8313 an error. Set process slots as soon as we allocate them.
8315 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
8317 2011-10-27 Chong Yidong <cyd@gnu.org>
8319 * gnutls.c (emacs_gnutls_deinit): New function.
8320 Deallocate credentials structures as well as calling gnutls_deinit.
8321 (Fgnutls_deinit, Fgnutls_boot): Use it.
8323 * process.c (make_process): Initialize GnuTLS credentials to NULL.
8324 (deactivate_process): Call emacs_gnutls_deinit.
8326 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
8328 * image.c (x_create_x_image_and_pixmap):
8329 * w32.c (sys_rename, w32_delayed_load):
8330 * w32font.c (fill_in_logfont):
8331 * w32reg.c (x_get_string_resource): Silence compiler warnings.
8333 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
8335 * w32fns.c (w32_default_color_map): New function,
8336 extracted from Fw32_default_color_map.
8337 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
8339 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
8341 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
8343 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
8345 * keyboard.c (test_undefined): New function (bug#9751).
8346 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
8348 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
8350 * sysdep.c (init_sys_modes): Fix the check for the controlling
8351 terminal (Bug#6649).
8353 2011-10-20 Eli Zaretskii <eliz@gnu.org>
8355 * dispextern.h (struct bidi_it): New member next_en_type.
8357 * bidi.c (bidi_line_init): Initialize the next_en_type member.
8358 (bidi_resolve_explicit_1): When next_en_pos is valid for the
8359 current character, check also for next_en_type being WEAK_EN.
8360 (bidi_resolve_weak): Don't enter the expensive loop if the current
8361 position is before next_en_pos. Record the bidi type of the first
8362 non-ET, non-BN character we find, in addition to its position.
8363 (bidi_level_of_next_char): Invalidate next_en_type when
8364 next_en_pos is over-stepped.
8366 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
8368 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
8369 * editfns.c: Rewrite current-time-zone so that it invokes
8370 the equivalent of (format-time-string "%Z") to get the time zone name.
8371 This fixes a bug when the time zone name contains characters that
8372 need converting from the system time locale to Emacs internal format.
8373 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
8374 that patch fixed format-time-string to do the conversion, but
8375 I forgot to fix current-time-zone.
8376 (format_time_string): New function, containing most of
8377 what Fformat_time_string used to contain.
8378 (Fformat_time_string): Rewrite in terms of format_time_string.
8379 This doesn't change this function's behavior.
8380 (current-time-zone): Rewrite to use format_time_string.
8381 This fixes the bug reported by Michael Schierl in
8382 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
8383 Jason Rumney's 2007-06-07 change worked around this bug, but
8385 * systime.h (tzname, timezone): Remove no-longer-used declarations.
8387 2011-10-19 Eli Zaretskii <eliz@gnu.org>
8389 * xdisp.c (start_display): If the character at POS is displayed
8390 via a display vector, reset IT->current.dpvec_index to zero.
8391 (try_window_reusing_current_matrix): If a line ends in a display
8392 vector or the next line starts in a display vector, continue
8393 redrawing the window even though the character position of
8394 start_row was reached.
8397 2011-10-18 Chong Yidong <cyd@gnu.org>
8399 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
8400 with nobreak-char-display too.
8402 2011-10-18 Eli Zaretskii <eliz@gnu.org>
8404 Fix part 3 of bug#9771.
8405 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
8406 (bidi_resolve_neutral): Don't enter the expensive loop looking for
8407 non-neutral characters if the current character is a paragraph
8408 separator (a.k.a. Newline). This avoids running the same
8409 expensive loop twice, once when we consume the preceding newline
8410 and the other time when the line actually needs to be displayed.
8411 Avoid the loop when we see neutrals on the base embedding level
8412 following a character whose directionality is the same as the
8413 paragraph's. This avoids running the expensive loop when a line
8414 ends in a long sequence of neutrals, like control characters.
8415 Add assertion against STRONG_AL type. Slightly rearrange code
8416 that determines the type of a neutral given the first non-neutral
8418 (bidi_level_of_next_char): Set next_en_pos to zero when
8419 invalidating its info.
8421 2011-10-17 Eli Zaretskii <eliz@gnu.org>
8423 * xdisp.c (push_display_prop): Determine whether to record string
8424 or buffer position by IT->string, not by IT->method. Allow
8425 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
8426 (move_it_vertically_backward): Don't look for character position
8427 immediately after the newline when in a continuation line.
8430 2011-10-15 Martin Rudalics <rudalics@gmx.at>
8432 * window.c (coordinates_in_window): Rewrite and delabelize
8433 vertical border check. (Bug#5357) (Bug#9618)
8435 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
8437 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
8438 errors in XSetWindowBorder (bug#9310).
8440 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
8442 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
8443 avoid crash when xmalloc overrun checking is enabled.
8445 2011-10-13 Eli Zaretskii <eliz@gnu.org>
8447 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
8448 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
8449 cursor motion with <left> and <right> arrow keys.
8451 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
8452 some callers set that themselves.
8454 2011-10-12 Eli Zaretskii <eliz@gnu.org>
8456 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
8457 display string and the previous row comes from the same string and
8458 is empty. (Bug#9739) (Bug#9738)
8460 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
8462 * doc.c (get_doc_string): Encode file name (bug#9735).
8464 2011-10-12 Eli Zaretskii <eliz@gnu.org>
8466 * bidi.c (bidi_level_of_next_char):
8467 * xdisp.c (get_visually_first_element): Remove old incorrect
8468 comments regarding the Unicode Line Separator character.
8470 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
8472 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
8474 * alloc.c (Fgc_status): Do not access beyond zombies array
8475 boundary if nzombies > MAX_ZOMBIES.
8476 * alloc.c (dump_zombies): Add missing format specifier.
8478 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
8480 * xdisp.c (set_cursor_from_row): Simplify conditionals,
8481 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
8483 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
8484 Some packages use them to denote characters with modifiers.
8486 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
8488 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
8489 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
8490 matching a pp-number. Rename parameter var to var1.
8492 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
8494 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
8496 2011-10-08 Glenn Morris <rgm@gnu.org>
8498 * callint.c (Fcall_interactively): Give a more explicit error for the
8499 'c' case with a non-character input. (Bug#8479)
8501 2011-10-08 Eli Zaretskii <eliz@gnu.org>
8503 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
8505 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
8506 lines that are hscrolled on the left.
8508 * dispnew.c (buffer_posn_from_coords): Account for a possible
8509 presence of header-line. (Bug#4426)
8511 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
8513 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
8514 Don't advertise functionality which we discourage or doesn't work.
8516 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
8518 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
8519 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
8520 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
8521 this makes Emacs dump core during garbage collection on rare
8522 occasions. sizeof is obviously inferior to offsetof here, so
8523 stick with offsetof.
8524 (GC_POINTER_ALIGNMENT): New macro.
8525 (mark_memory): Omit 3rd (offset) arg; caller changed.
8526 Don't assume EMACS_INT alignment is the same as pointer alignment.
8528 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
8530 * keyboard.c (read_key_sequence_remapped): New var.
8531 (read_key_sequence): Compute remapping in the right buffer.
8532 (command_loop_1): Use read_key_sequence's remapping directly.
8534 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
8536 * dired.c (file_name_completion): Don't expand file name.
8537 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
8538 before checking file name handler.
8540 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
8541 they've been requested explicitly (bug#9591).
8543 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
8545 * keymap.c (Fsingle_key_description): Use make_specified_string
8546 instead of build_string to build string from push_key_description.
8549 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8551 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
8552 This fixes a Y2038 bug on 64-bit hosts.
8553 * buffer.c (reset_buffer):
8554 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
8555 (Fclear_buffer_auto_save_failure):
8556 Use 0, not -1, to represent an unset failure time, since time_t
8557 might not be signed.
8559 Remove dependency on glibc malloc internals.
8560 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8561 Move back here from lisp.h, but with their new implementations.
8562 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8563 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
8564 * charset.c (charset_table_init): New static var.
8565 (syms_of_charset): Use it instead of xmalloc. This removes a
8566 dependency on glibc malloc internals. See Eli Zaretskii's comment in
8567 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
8568 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8569 Move back to alloc.c.
8570 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8571 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
8573 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
8575 * nsterm.m (windowDidResize): Call x_set_window_size only when
8576 ns_in_resize is true. Otherwise set pixelwidth/height and
8577 call change_frame_size (Bug#9628).
8579 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8581 Port --enable-checking=all to Fedora 14 x86-64.
8582 * charset.c (syms_of_charset): Also account for glibc malloc's
8583 internal overhead when calculating the initial malloc maximum.
8585 Port --enable-checking=all to Fedora 14 x86.
8586 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8588 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
8589 (overrun_check_realloc, overrun_check_free):
8590 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
8591 That way, xmalloc returns a properly-aligned pointer even if
8592 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
8593 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
8594 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
8595 into account when calculating the initial malloc maximum.
8596 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8597 Move here from alloc.c, so that charset.c can use it too.
8598 Properly align; the old code wasn't right for common 32-bit hosts
8599 when configured with --enable-checking=all.
8600 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8601 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
8603 2011-09-29 Eli Zaretskii <eliz@gnu.org>
8605 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
8608 2011-09-28 Eli Zaretskii <eliz@gnu.org>
8610 * xdisp.c (compute_display_string_end): If there's no display
8611 string at CHARPOS, return -1.
8613 * bidi.c (bidi_fetch_char): When compute_display_string_end
8614 returns a negative value, treat the character as a normal
8615 character not covered by a display string. (Bug#9624)
8617 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
8619 * lread.c (Fread_from_string): Fix typo in docstring.
8621 2011-09-27 Eli Zaretskii <eliz@gnu.org>
8623 * xdisp.c (handle_invisible_prop): If invisible text ends on a
8624 newline, reseat the iterator instead of bidi-iterating there one
8625 character at a time. (Bug#9610)
8626 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
8627 TO_CHARPOS if the bidi iterator is at base embedding level.
8629 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
8631 * lread.c (readevalloop): Use correct code for NBSP.
8632 (read1): Likewise. (Bug#9608)
8634 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
8636 * dbusbind.c (Fdbus_register_signal): When service is not
8637 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
8639 2011-09-25 Glenn Morris <rgm@gnu.org>
8641 * buffer.c (truncate-lines): Doc fix.
8643 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
8645 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
8646 (Fset_window_next_buffers): Doc fix.
8648 2011-09-24 Glenn Morris <rgm@gnu.org>
8650 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
8652 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
8654 Fix minor problems found by static checking.
8655 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
8656 * indent.c (Fvertical_motion): Fix == vs = typo.
8658 2011-09-24 Eli Zaretskii <eliz@gnu.org>
8660 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
8661 Default value is now t. Doc fix.
8663 * indent.c (Fvertical_motion): Compute and apply the overshoot
8664 logic when moving up, not only when moving down. Fix the
8665 confusing name and values of the it_overshoot_expected variable;
8666 logic changes accordingly. (Bug#9254) (Bug#9549)
8668 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
8669 CHARPOS is covered by a display string which includes newlines.
8670 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
8671 is covered by a display string with embedded newlines.
8673 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
8675 * dbusbind.c (Fdbus_register_signal): Add match rule to
8676 Vdbus_registered_objects_table. (Bug#9581)
8677 (Fdbus_register_method, Vdbus_registered_objects_table):
8680 2011-09-24 Jim Meyering <meyering@redhat.com>
8682 do not ignore write error for any output size
8683 The previous change was incomplete.
8684 While it makes emacs --batch detect the vast majority of stdout
8685 write failures, errors were still ignored whenever the output size is
8686 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
8687 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
8688 && echo FAIL: ignored write error
8689 FAIL: ignored write error
8690 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
8691 && echo FAIL: ignored write error
8692 FAIL: ignored write error
8693 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
8695 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
8697 * emacs.c (Fkill_emacs): In noninteractive mode exit
8698 non-successfully if a write error occurred on stdout. (Bug#9574)
8700 2011-09-21 Eli Zaretskii <eliz@gnu.org>
8702 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
8705 * dispextern.h (struct it): Update the comment documenting what
8708 2011-09-20 Eli Zaretskii <eliz@gnu.org>
8710 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
8711 a display string, extend search for cursor position to end of row.
8712 (find_row_edges): If the row ends in a newline from a display
8713 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
8714 Handle the case of a display string with multiple newlines.
8715 (Fcurrent_bidi_paragraph_direction): Fix search for previous
8716 non-empty line. Fixes confusing cursor motion with arrow keys at
8717 the beginning of a line that starts with whitespace.
8719 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
8721 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
8724 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
8726 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
8729 2011-09-18 Eli Zaretskii <eliz@gnu.org>
8731 * xdisp.c (display_line): Record maximum and minimum buffer
8732 positions even if no glyphs were produced (e.g., by a zero-width
8733 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
8734 buffer positions that will be removed from the glyph row because
8736 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
8737 column is beyond frame width: don't subtract 1 "pixel" when
8738 computing width of the stretch.
8739 (reseat_at_next_visible_line_start): Undo the change made on
8740 2011-09-17 that saved paragraph information and restored it after
8741 the call to `reseat'. (Bug#9545)
8743 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8745 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
8746 and turn window cursor on if cleared (Bug#9415).
8748 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
8750 * search.c (boyer_moore): Take unibyte characters from pattern
8751 literally. (Bug#9458)
8753 2011-09-18 Eli Zaretskii <eliz@gnu.org>
8755 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
8757 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
8759 Fix minor problem found by static checking.
8760 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
8761 initialized, to pacify gcc -Wuninitialized.
8763 * fileio.c: Report proper errno when syscall falls.
8764 (Finsert_file_contents): Save and restore errno,
8765 so that report_file_error outputs the correct diagnostic.
8766 (Fwrite_region) [CLASH_DETECTION]: Likewise.
8768 2011-09-18 Eli Zaretskii <eliz@gnu.org>
8770 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
8772 2011-09-17 Eli Zaretskii <eliz@gnu.org>
8774 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
8775 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
8777 2011-09-17 Eli Zaretskii <eliz@gnu.org>
8779 * xdisp.c (reseat_at_next_visible_line_start): Keep information
8780 about the current paragraph and restore it after the call to reseat.
8782 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
8783 (bidi_find_paragraph_start): Search back for paragraph beginning
8784 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
8785 (bidi_move_to_visually_next): Only trigger paragraph-related
8786 computations when the last character is a newline or at EOB, not
8787 just any NEUTRAL_B. (Bug#9470)
8789 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
8790 truncated lines if point is covered by a display string. (Bug#9524)
8792 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
8794 * xselect.c: Relax test for outgoing X longs (Bug#9498).
8795 (cons_to_x_long): New function.
8796 (lisp_data_to_selection_data): Use it. Correct the test for
8797 short-versus-long data; it was negated. Break out of vector
8798 loop, for efficiency, when a long datum is discovered.
8800 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
8802 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
8804 2011-09-16 Eli Zaretskii <eliz@gnu.org>
8806 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
8807 GCC PR/17406) by declaring this function with external scope.
8809 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8811 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
8812 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
8814 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
8816 * editfns.c (Fformat): Correctly handle text properties on "%%".
8818 2011-09-15 Eli Zaretskii <eliz@gnu.org>
8820 * xterm.c (x_draw_composite_glyph_string_foreground):
8821 * w32term.c (x_draw_composite_glyph_string_foreground):
8822 * term.c (encode_terminal_code):
8823 * composite.c (composition_update_it, get_composition_id):
8824 * xdisp.c (get_next_display_element)
8825 (fill_composite_glyph_string): Add comments about special meaning
8826 of TAB characters in a composition.
8828 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8830 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
8831 This occurs when processing a multibyte format.
8832 Problem reported by Wolfgang Jenker.
8834 2011-09-15 Johan Bockgård <bojohan@gnu.org>
8836 * xdisp.c (try_cursor_movement): Only check for exact match if
8837 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
8839 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8841 Remove unused external symbols.
8842 * dispextern.h (calc_pixel_width_or_height): Remove decl.
8843 * xdisp.c (calc_pixel_width_or_height): Now static.
8844 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
8845 * indent.c (check_display_width):
8846 * w32term.c: Fix comment to match code.
8847 * xterm.c, xterm.h (x_catching_errors): Remove.
8849 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8851 * xselect.c: Use signed conversions more consistently (Bug#9498).
8852 (selection_data_to_lisp_data): Assume incoming selection data are
8853 signed integers, not unsigned. This is to be consistent with
8854 outgoing selection data, which was modified to use signed integers
8855 in as part of the fix to Bug#9196 in response to Jan D.'s comment
8856 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
8857 expects long, not unsigned long.
8859 2011-09-14 Eli Zaretskii <eliz@gnu.org>
8861 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
8862 computation of loop end. Reported by Johan Bockgård
8865 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
8867 * frame.c (Fother_visible_frames_p): Function deleted.
8869 2011-09-12 Eli Zaretskii <eliz@gnu.org>
8871 * indent.c (compute_motion): Process display vector front to back
8872 rather than the other way around. (Bug#2496)
8874 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
8876 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
8878 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
8880 * minibuf.c (Fread_from_minibuffer): Doc fix.
8882 2011-09-11 Eli Zaretskii <eliz@gnu.org>
8884 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
8885 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
8887 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
8889 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
8890 value for non-existent files.
8892 2011-09-11 Eli Zaretskii <eliz@gnu.org>
8894 * fileio.c (Finsert_file_contents): If the file cannot be opened,
8895 set its "size" to -1. This will set the modtime_size field of
8896 the corresponding buffer to -1, which is what
8897 verify-visited-file-modtime expects for files that do not exist.
8900 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
8902 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
8904 * lisp.h: ... from here. push_key_description is no longer
8905 defined in keyboard.c, so its declaration should not be in
8906 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
8907 logically belongs with push_key_description.
8909 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
8911 * buffer.h: Include <sys/types.h> instead of <time.h>.
8912 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
8913 Problem reported by Herbert J. Skuhra.
8915 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
8917 * xml.c (parse_region): Make the parsing work for
8918 non-comment-starting XML files again (bug#9144).
8920 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
8922 * image.c (gif_load): Fix calculation of bottom and right corner.
8925 2011-09-10 Eli Zaretskii <eliz@gnu.org>
8927 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
8928 redisplay in small windows.
8930 2011-09-09 Eli Zaretskii <eliz@gnu.org>
8932 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
8934 2011-09-08 Martin Rudalics <rudalics@gmx.at>
8936 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
8937 Operate on live windows only.
8939 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
8941 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
8943 2011-09-07 Eli Zaretskii <eliz@gnu.org>
8945 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
8946 only under bidi iteration.
8948 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
8950 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
8952 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
8954 isnan: Fix porting problem to Solaris 10 with bundled gcc.
8955 Without this fix, the command to link temacs failed due to an
8956 undefined symbol __builtin_isnan. This is because
8957 /usr/include/iso/math_c99.h #defines isnan(x) to
8958 __builtin_isnan(x), but the bundled gcc, which identifies itself
8959 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
8961 * floatfns.c (isnan): #undef, and then #define to a clone of
8963 (Fisnan): Always define, since it's always available now.
8964 (syms_of_floatfns): Always define isnan at the Lisp level.
8966 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
8968 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
8970 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
8972 * fileio.c: Fix bugs with large file offsets (Bug#9428).
8973 The previous code assumed that file offsets (off_t values) fit in
8974 EMACS_INT variables, which is not true on typical 32-bit hosts.
8975 The code messed up by falsely reporting buffer overflow in cases
8976 such as (insert-file-contents "big" nil 1 2) into an empty buffer
8977 when "big" contains more than 2**29 bytes, even though this
8978 inserts just one byte and does not overflow the buffer.
8979 (Finsert_file_contents): Store file offsets as off_t
8980 values, not as EMACS_INT values. Check for overflow when
8981 converting between EMACS_INT and off_t. When checking for
8982 buffer overflow or for overlap, take the offsets into account.
8983 Don't use EMACS_INT for small values where int suffices.
8984 When checking for overlap, fix a typo: ZV was used where
8985 ZV_BYTE was intended.
8986 (Fwrite_region): Don't assume off_t fits into 'long'.
8987 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
8989 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
8991 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
8993 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
8995 sprintf-related integer and memory overflow issues (Bug#9412).
8997 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8998 (esprintf, exprintf, evxprintf): New functions.
8999 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
9000 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
9001 (modify_event_symbol): Do not assume that the length of
9002 name_alist_or_stem is safe to alloca and fits in int.
9003 (Fexecute_extended_command): Likewise for function name and binding.
9004 (Frecursion_depth): Wrap around reliably on integer overflow.
9005 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
9006 since some callers pass EMACS_INT values.
9007 (Fsingle_key_description): Don't crash if symbol name contains more
9008 than MAX_ALLOCA bytes.
9009 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
9010 (get_minibuffer): Arg is now EMACS_INT, not int.
9011 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
9012 (esprintf, exprintf, evxprintf): New decls.
9013 * window.h (command_loop_level, minibuf_level): Reflect API changes.
9015 * dbusbind.c (signature_cat): New function.
9016 (xd_signature, Fdbus_register_signal):
9017 Do not overrun buffer; instead, report string overflow.
9019 * dispnew.c (add_window_display_history): Don't overrun buffer.
9020 Truncate instead; this is OK since it's just a log.
9022 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
9023 even if the time zone offset is outlandishly large.
9024 Don't mishandle offset == INT_MIN.
9026 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
9027 when creating daemon; the previous buffer-overflow check was incorrect.
9029 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
9030 which has the guts of the old verror function.
9032 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
9033 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
9035 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
9036 (font_unparse_xlfd): Don't blindly alloca long strings.
9037 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
9038 fits in int, when using sprintf. Use single snprintf to count
9039 length of string rather than counting it via multiple sprintfs;
9040 that's simpler and more reliable.
9041 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
9042 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
9043 sprintf, in case result does not fit in int.
9045 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
9046 (fontset_from_font): Print it.
9048 * frame.c (tty_frame_count): Now printmax_t, not int.
9049 (make_terminal_frame, set_term_frame_name): Print it.
9050 (x_report_frame_params): In X, window IDs are unsigned long,
9051 not signed long, so print them as unsigned.
9052 (validate_x_resource_name): Check for implausibly long names,
9053 and don't assume name length fits in 'int'.
9054 (x_get_resource_string): Don't blindly alloca invocation name;
9055 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
9058 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
9059 (xg_check_special_colors, xg_set_geometry):
9060 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
9062 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
9063 Use esprintf, not sprintf, in case result does not fit in int.
9065 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9066 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
9067 it as a large positive number.
9068 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
9069 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9071 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
9072 in case result does not fit in int.
9074 * print.c (float_to_string): Detect width overflow more reliably.
9075 (print_object): Make sprintf buffer a bit bigger, to avoid potential
9076 buffer overrun. Don't assume list length fits in 'int'. Treat
9077 print length of 0 as 0, not as infinity; to be consistent with other
9078 uses of print length in this function. Don't overflow print length
9079 index. Don't assume hash table size fits in 'long', or that
9080 vectorlike size fits in 'unsigned long'.
9082 * process.c (make_process): Use printmax_t, not int, to format
9083 process-name gensyms.
9085 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
9087 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
9088 to avoid potential buffer overrun.
9090 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
9091 if X resource line is longer than 512 bytes.
9093 * xfns.c (x_window): Make sprintf buffer a bit bigger
9094 to avoid potential buffer overrun.
9096 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
9098 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
9100 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
9102 Integer overflow fixes for scrolling, etc.
9103 Without these, Emacs silently mishandles large integers sometimes.
9104 For example, "C-u 4294967297 M-x recenter" was treated as if
9105 it were "C-u 1 M-x recenter" on a typical 64-bit host.
9107 * xdisp.c (try_window_id): Check Emacs fixnum range before
9108 converting to 'int'.
9110 * window.c (window_scroll_line_based, Frecenter):
9111 Check that an Emacs fixnum is in range before assigning it to 'int'.
9112 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
9113 values converted from Emacs fixnums.
9114 (Frecenter): Don't wrap around a line count if it is out of 'int'
9115 range; instead, treat it as an extreme value.
9116 (Fset_window_configuration, compare_window_configurations):
9117 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
9119 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
9120 that can exceed INT_MAX. Check that EMACS_INT value is in range
9121 before assigning it to the (possibly-narrower) index.
9122 (match_limit): Don't assume that a fixnum can fit in 'int'.
9124 * print.c (print_object): Use ptrdiff_t, not int, for index that can
9127 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
9128 (Fvertical_motion): Don't wrap around LINES values that don't fit
9129 in 'int'. Instead, treat them as extreme values. This is good
9130 enough for windows, which can't have more than INT_MAX lines anyway.
9132 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
9134 * Require libxml/parser.h to avoid compilation warning.
9136 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
9138 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
9139 since this reportedly can destroy thread storage.
9141 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
9143 * syntax.c (find_defun_start): Update all cache variables if
9144 exiting early (Bug#9401).
9146 2011-08-30 Eli Zaretskii <eliz@gnu.org>
9148 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
9150 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
9151 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
9152 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
9154 * term.c (tty_append_glyph): New function.
9155 (produce_stretch_glyph): Static function and its prototype deleted.
9157 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
9160 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
9162 * image.c (parse_image_spec): Check for nonnegative, not for positive,
9163 when checking :margin (Bug#9390).
9164 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
9165 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
9166 so that the name doesn't mislead. All uses changed.
9168 2011-08-28 Johan Bockgård <bojohan@gnu.org>
9170 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
9173 2011-08-27 Eli Zaretskii <eliz@gnu.org>
9175 * xdisp.c (move_it_to): Don't bail out early when reaching
9176 position beyond to_charpos, if we are scanning backwards.
9177 (move_it_vertically_backward): When DY == 0, make sure we get to
9178 the first character in the line after the newline.
9180 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
9182 * ccl.c: Improve and simplify overflow checking (Bug#9196).
9183 (ccl_driver): Do not generate an out-of-range pointer.
9184 (Fccl_execute_on_string): Remove unnecessary check for
9185 integer overflow, noted by Stefan Monnier in
9186 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
9187 Remove a FIXME that didn't need fixing.
9188 Simplify the newly-introduced buffer reallocation code.
9190 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
9192 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
9194 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
9196 Integer and memory overflow issues (Bug#9196).
9198 * doc.c (get_doc_string): Rework so that
9199 get_doc_string_buffer_size is the actual buffer size, rather than
9200 being 1 less than the actual buffer size; this makes xpalloc more
9203 * image.c (x_allocate_bitmap_record, cache_image):
9204 * xselect.c (Fx_register_dnd_atom):
9205 Simplify previous changes by using xpalloc.
9207 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
9208 since either will do and ptrdiff_t is convenient with xpalloc.
9210 * charset.c (charset_table_size)
9211 (struct charset_sort_data.priority): Now ptrdiff_t.
9212 (charset_compare): Don't overflow if priorities differ greatly.
9213 (Fsort_charsets): Don't assume list length fits in int.
9214 Check for size-calculation overflow when allocating sort data.
9215 (syms_of_charset): Allocate an initial charset table that is
9216 just under 64 KiB, to avoid problems with glibc malloc and mmap.
9218 * cmds.c (internal_self_insert): Check for size-calculation overflow.
9220 * composite.h (struct composition.glyph_len): Now int, not unsigned.
9221 The actual value is always <= INT_MAX, and leaving it unsigned made
9222 overflow checking harder.
9224 * dispextern.h (struct glyph_matrix.rows_allocated)
9225 (struct face_cache.size): Now ptrdiff_t, for convenience in use
9226 with xpalloc. The values are still always <= INT_MAX.
9228 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
9230 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
9231 (SAFE_NALLOCA): New macro.
9233 * region-cache.c (struct boundary.pos, find_cache_boundary)
9234 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
9235 (set_cache_region, invalidate_region_cache)
9236 (revalidate_region_cache, know_region_cache, region_cache_forward)
9237 (region_cache_backward, pp_cache):
9238 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
9239 so that ptrdiff_t * can be passed to xpalloc.
9240 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
9241 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
9242 (pp_cache): Don't assume cache_len fits in int.
9243 * region-cache.h: Adjust extern decls to match.
9245 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
9246 EMACS_INT, since either will do, for xpalloc.
9248 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
9249 (xnmalloc, xnrealloc, xpalloc): New functions.
9251 * bidi.c (bidi_shelve_header_size): New constant.
9252 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
9253 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
9255 * bidi.c (bidi_cache_shrink):
9256 * buffer.c (overlays_at, overlays_in, record_overlay_string)
9258 Don't update size of array until after memory allocation succeeds,
9259 because xmalloc/xrealloc may not return.
9260 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
9261 now that we have proper integer overflow checking.
9262 (record_overlay_string, overlay_strings): Catch overflows when
9263 calculating size of overlay_str_buf.
9265 * callproc.c (Fcall_process): Check for size overflow when
9266 calculating size of args2.
9267 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
9268 Normally we prefer signed values, but sticking with ptrdiff_t would
9269 require adding more-complicated checks.
9271 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
9272 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
9273 Redo buffer-overflow calculations to avoid integer overflow.
9274 Add a FIXME comment where memory seems to be over-allocated.
9276 * character.c (Fstring): Check for size-calculation overflow.
9278 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
9279 unnecessary integer overflow. Check for size overflow.
9280 (encode_coding_object): Don't update size until xmalloc succeeds.
9282 * composite.c (get_composition_id): Check for overflow in glyph
9283 length calculations.
9285 Integer and memory overflow fixes for display code.
9286 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
9287 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
9288 (scrolling_window): Check for overflow in size calculations.
9289 (line_draw_cost, realloc_glyph_pool, add_row_entry):
9290 Don't assume glyph table len fits in int.
9291 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
9292 (row_table_size): Now ptrdiff_t, not int.
9293 (scrolling_window): Avoid overflow in size calculations.
9294 Don't update size until allocation succeeds.
9295 * fns.c (concat): Check for overflow in size calculations.
9296 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
9297 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
9298 (NEXT_ALMOST_PRIME_LIMIT): New constant.
9300 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
9301 (get_doc_string): Check for size calculation overflow.
9302 Don't update size until allocation succeeds.
9303 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
9304 EMACS_INT, where ptrdiff_t will do.
9305 (Fsubstitute_command_keys): Check for string overflow.
9307 * editfns.c (set_time_zone_rule): Don't assume environment length
9309 (message_length): Now ptrdiff_t, not int.
9310 (Fmessage_box): Don't update size until allocation succeeds.
9311 Don't assume message length fits in int.
9312 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
9314 * emacs.c (main): Do not reallocate argv, since there is a null at
9315 the end that can be overwritten, and this way there's no need to
9316 worry about size-calculation overflow.
9317 (sort_args): Check for size-calculation overflow.
9319 * eval.c (init_eval_once, grow_specpdl): Don't update size until
9321 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
9323 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
9324 (x_set_scroll_bar_width, x_figure_window_size):
9325 Check for integer overflow.
9326 (x_set_alpha): Do not assume XINT fits in int.
9328 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
9329 This is for the members text_lines, text_cols, total_lines, total_cols,
9330 where the system imposes an 'int' limit.
9332 * fringe.c (Fdefine_fringe_bitmap):
9333 Don't update size until alloc works.
9335 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
9336 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
9338 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
9339 Check for size-calculation overflow.
9340 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
9341 do, as we prefer signed integers.
9342 (id_to_widget.max_size, id_to_widget.used)
9343 (xg_store_widget_in_map, xg_remove_widget_from_map)
9344 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
9345 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
9346 Use and return ptrdiff_t, not int.
9347 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
9348 * gtkutil.h: Change prototypes to match the above.
9350 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
9351 are duplicate now that they've been promoted to lisp.h.
9352 (x_allocate_bitmap_record, x_alloc_image_color)
9353 (make_image_cache, cache_image, xpm_load):
9354 Don't update size until alloc is done.
9355 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
9357 Check for size calculation overflow.
9358 (ct_colors_allocated_max): New constant.
9359 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
9362 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
9363 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
9364 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
9365 Use ptrdiff_t, not int, to count maps.
9366 (read_char_minibuf_menu_prompt): Check for overflow in size
9367 calculations. Don't update size until allocation succeeds.
9368 Redo calculations to avoid overflow.
9369 * keyboard.h: Change prototypes to match the above.
9371 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
9373 (current_minor_maps): Check for size calculation overflow.
9374 * keymap.h: Change prototypes to match the above.
9376 * lread.c (read1, init_obarray): Don't update size until alloc done.
9378 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
9379 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
9381 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
9382 Now ptrdiff_t, not int.
9383 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
9384 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
9386 * process.c (Fnetwork_interface_list): Check for overflow
9387 in size calculation.
9389 * region-cache.c (move_cache_gap): Check for size calculation overflow.
9391 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
9392 overflow. Don't bother calling xmalloc when xrealloc will do.
9394 * search.c (Freplace_match): Check for size calculation overflow.
9395 (Fset_match_data): Don't assume list lengths fit in 'int'.
9397 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
9398 for command line length. Do not attempt to address one before the
9399 beginning of an array, as that's not portable.
9401 * term.c (max_frame_lines): Remove; unused.
9402 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
9404 (encode_terminal_code, calculate_costs): Check for size
9405 calculation overflow.
9406 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
9407 table lengths and related sizes. Don't update size until alloc
9408 done. Redo calculations to avoid overflow.
9409 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
9411 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
9412 subtracting pointers.
9413 (gobble_line): Check for overflow more carefully. Don't update size
9416 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
9417 Don't update size until alloc done.
9418 Redo size calculations to avoid overflow.
9419 Check for size calculation overflow.
9420 (main) [DEBUG]: Fix typo in invoking tparam1.
9422 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
9423 Use ptrdiff_t, not int, for sizes.
9424 (store_mode_line_noprop_char): Don't update size until alloc done.
9426 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
9427 Use ptrdiff_t, not int, for sizes.
9428 (Finternal_make_lisp_face, cache_face):
9429 Check for size calculation overflow.
9430 (cache_face): Treat size calculation overflows as if they were
9431 memory exhaustion (the usual treatment), rather than aborting.
9433 * xfns.c (x_encode_text, x_set_name_internal)
9434 (Fx_change_window_property): Use ptrdiff_t, not int, to count
9435 sizes, since they can exceed INT_MAX in size. Check for size
9436 calculation overflow.
9438 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
9439 (xg_select): Check for size calculation overflow.
9440 Don't update size until alloc done.
9442 * xrdb.c (get_environ_db): Don't assume path length fits in int,
9443 as sprintf is limited to int lengths.
9445 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
9446 (X_LONG_MIN): New macros.
9447 Use them to make the following changes clearer.
9448 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
9449 This change doesn't affect the value now, but it may help remind
9450 future maintainers not to raise the value too much later.
9451 (SELECTION_QUANTUM): Remove, replacing with ...
9452 (selection_quantum): ... new function, which avoids overflow.
9454 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
9455 assumption that selection length fits in 'int'.
9456 (x_reply_selection_request, x_handle_selection_request)
9457 (x_get_window_property, receive_incremental_selection)
9458 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
9459 (lisp_data_to_selection_data, clean_local_selection_data):
9460 Use ptrdiff_t, not int, to record length of selection.
9461 (x_reply_selection_request, x_get_window_property)
9462 (receive_incremental_selection, x_property_data_to_lisp):
9463 Redo calculations to avoid overflow.
9464 (x_reply_selection_request): When sending hint, ceiling it at
9465 X_LONG_MAX rather than relying on wraparound overflow to send
9467 (x_get_window_property, receive_incremental_selection)
9468 (lisp_data_to_selection_data, x_property_data_to_lisp):
9469 Check for size-calculation overflow.
9470 (x_get_window_property, receive_incremental_selection)
9471 (lisp_data_to_selection_data, Fx_register_dnd_atom):
9472 Don't store size until memory allocation succeeds.
9473 (x_get_window_property): Plug memory leak on memory exhaustion.
9474 Don't double-block input; malloc is safe here. Don't assume 2**34
9475 - 4 fits in unsigned long. Add an xassert to check
9476 XGetWindowProperty overflow. Be more careful about overflow
9477 calculations, and distinguish size from memory overflow better.
9478 (receive_incremental_selection): When tracing, don't assume
9479 unsigned int is less than INT_MAX.
9480 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
9481 harmful) conversions of unsigned short to int.
9482 (lisp_data_to_selection_data): Don't assume that integers
9483 in the range -65535 through -1 fit in an X unsigned short.
9484 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
9485 result parameters unless successful. Rely on cons_to_unsigned
9486 to report problems with elements; the old code wasn't right anyway.
9487 (x_check_property_data): Check for int overflow; we cannot use
9488 a wider type due to X limits.
9489 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
9491 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
9493 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
9494 (x_term_init): Check for size calculation overflow.
9495 (x_color_cells): Don't store size until memory allocation succeeds.
9496 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
9497 Don't assume alloca size is less than MAX_ALLOCA.
9498 (x_term_init): Don't assume length fits in int (sprintf is limited
9501 Use ptrdiff_t for composition IDs.
9502 * character.c (lisp_string_width):
9503 * composite.c (composition_table_size, n_compositions)
9504 (get_composition_id, composition_gstring_from_id):
9505 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
9506 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
9507 * window.c (Frecenter):
9508 Use ptrdiff_t, not int, for composition IDs.
9509 * composite.c (get_composition_id): Check for integer overflow.
9510 * composite.h: Adjust prototypes to match the above changes.
9512 Use ptrdiff_t for hash table indexes.
9513 * category.c (hash_get_category_set):
9514 * ccl.c (ccl_driver):
9515 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
9516 * coding.c (coding_system_charset_list, detect_coding_system):
9517 * coding.h (struct coding_system.id):
9518 * composite.c (get_composition_id, gstring_lookup_cache):
9519 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
9520 * image.c (xpm_get_color_table_h):
9521 * lisp.h (hash_lookup, hash_put):
9522 * minibuf.c (Ftest_completion):
9523 Use ptrdiff_t for hash table indexes, not int (which is too
9524 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
9525 32-bit --with-wide-int hosts).
9527 * charset.c (Fdefine_charset_internal): Check for integer overflow.
9528 Add a FIXME comment about memory leaks.
9529 (syms_of_charset): Don't assume xmalloc returns.
9531 Don't assume that stated character widths fit in int.
9532 * character.c (Fchar_width, c_string_width, lisp_string_width):
9533 * character.h (CHAR_WIDTH):
9534 * indent.c (MULTIBYTE_BYTES_WIDTH):
9535 Use sanitize_char_width to avoid undefined and/or bad behavior
9536 with outlandish widths.
9537 * character.h (sanitize_tab_width): Rename from sanitize_width,
9538 now that we have two such functions. All uses changed.
9539 (sanitize_char_width): New inline function.
9541 Don't assume that tab-width fits in int.
9542 * character.h (sanitize_width): New inline function.
9543 (SANE_TAB_WIDTH): New macro.
9544 (ASCII_CHAR_WIDTH): Use it.
9545 * indent.c (sane_tab_width): Remove. All uses replaced by
9546 SANE_TAB_WIDTH (current_buffer).
9547 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
9549 * fileio.c: Integer overflow issues with file modes.
9550 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
9552 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
9553 Remove unreachable code.
9554 (read_hex, load_charset_map_from_file): Check for integer overflow.
9556 * xterm.c: Don't go over XClientMessageEvent limit.
9557 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
9558 (x_send_scroll_bar_event): Likewise. Check that the size does not
9559 exceed limits imposed by XClientMessageEvent, as well as the usual
9560 ptrdiff_t and size_t limits.
9562 * keyboard.c: Overflow, signedness and related fixes.
9563 (make_lispy_movement): Use same integer type in forward decl
9564 that is used in the definition.
9565 (read_key_sequence, keyremap_step):
9566 Change bufsize argument back to int, undoing my 2011-03-30 change.
9567 We prefer signed types, and int is wide enough here.
9568 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
9569 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
9570 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
9571 length, not size_t. Use ptrdiff_t for index, not int.
9572 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
9573 possibility of integer overflow.
9575 Overflow, signedness and related fixes for images.
9577 * dispextern.h (struct it.stack[0].u.image.image_id)
9578 (struct_it.image_id, struct image.id, struct image_cache.size)
9579 (struct image_cache.used, struct image_cache.ref_count):
9580 * gtkutil.c (update_frame_tool_bar):
9581 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
9582 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
9583 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
9584 * nsmenu.m (update_frame_tool_bar):
9585 * xdisp.c (calc_pixel_width_or_height):
9586 * xfns.c (image_cache_refcount):
9587 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
9588 on typical 64-bit hosts.
9590 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
9591 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
9592 Omit unnecessary casts to int.
9593 (parse_image_spec): Check that integers fall into 'int' range
9594 when the callers expect that.
9595 (image_ascent): Redo ascent calculation to avoid int overflow.
9596 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
9597 (lookup_image): Remove unnecessary tests.
9598 (xbm_image_p): Locals are now of int, not EMACS_INT,
9599 since parse_image_check makes sure they fit into int.
9600 (png_load, gif_load, svg_load_image):
9601 Prefer int to unsigned where either will do.
9602 (tiff_handler): New function, combining the cores of the
9603 old tiff_error_handler and tiff_warning_handler.
9604 This function is rewritten to use vsnprintf and thereby avoid
9605 stack buffer overflows. It uses only the features of vsnprintf
9606 that are common to both POSIX and native Microsoft.
9607 (tiff_error_handler, tiff_warning_handler): Use it.
9608 (tiff_load, gif_load, imagemagick_load_image):
9609 Don't assume :index value fits in 'int'.
9610 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
9611 (imagemagick_load_image): Check that crop parameters fit into
9612 the integer types that MagickCropImage accepts. Don't assume
9613 Vimagemagick_render_type has a nonnegative value. Don't assume
9614 size_t fits in 'long'.
9615 (gs_load): Use printmax_t to print the widest integers possible.
9616 Check for integer overflow when computing image height and width.
9618 2011-08-26 Eli Zaretskii <eliz@gnu.org>
9620 * xdisp.c (redisplay_window): Don't force window start if point
9621 will be invisible in the resulting window. (Bug#9324)
9623 2011-08-25 Eli Zaretskii <eliz@gnu.org>
9625 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
9626 the display spec is of the form `(space ...)'.
9627 (handle_display_spec): Return the value returned by
9628 handle_single_display_spec, not just 1 or zero.
9629 (handle_single_display_spec): If the display spec is of the form
9630 `(space ...)', and specifies display in the text area, return 2
9632 (try_cursor_movement): Check for the need to scroll more
9633 accurately, and prefer exact match for point under bidi.
9634 Don't advance `row' beyond the last row of the window.
9636 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
9637 into disp_prop; all users changed.
9639 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
9640 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
9641 for the text covered by the display property.
9643 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
9645 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
9646 Change return value to nil.
9647 (Frecord_buffer): Delete unused function.
9649 2011-08-24 Eli Zaretskii <eliz@gnu.org>
9651 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
9652 buffers, return left-to-right.
9653 (set_cursor_from_row): Consider candidate row a win if its glyph
9654 represents a newline and point is on that newline. Fixes cursor
9655 positioning on the newline at EOL of R2L text within L2R
9656 paragraph, and vice versa.
9657 (try_cursor_movement): Check continued rows, in addition to
9658 continuation rows. Fixes unwarranted scroll when point enters a
9659 continued line of R2L text within an L2R paragraph, or vice versa.
9660 (cursor_row_p): Consider the case of point being equal to
9661 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
9662 from the end of a short line to the beginning of a continued line
9663 of R2L text within L2R paragraph.
9664 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
9665 composed characters.
9667 * bidi.c (bidi_check_type): Use xassert.
9668 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
9671 2011-08-23 Eli Zaretskii <eliz@gnu.org>
9673 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
9676 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
9678 * nsfont.m (ns_otf_to_script): Fix typo.
9680 2011-08-22 Kenichi Handa <handa@m17n.org>
9682 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
9683 extra slot even if the purpose is char-code-property-table.
9685 2011-08-23 Eli Zaretskii <eliz@gnu.org>
9687 * xdisp.c (redisplay_window): When computing centering_position,
9688 account for the height of the header line. (Bug#8874)
9690 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
9691 instead of CHAR_TO_BYTE. Fixes a crash when a completion
9692 candidate is selected by the mouse, and that candidate has a
9693 composed character under the mouse.
9695 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
9696 coordinates reported by pos-visible-in-window-p for a composed
9697 character in column zero.
9699 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
9701 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
9703 2011-08-22 Eli Zaretskii <eliz@gnu.org>
9705 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
9706 consider it a hit if to_charpos is anywhere in the range of the
9707 composed buffer positions.
9709 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
9711 * image.c (gif_load): Don't assume that each subimage has the same
9712 dimensions as the base image. Handle disposal method that is
9713 "undefined" by the gif spec (Bug#9335).
9715 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
9717 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
9718 (Fcondition_case): Document `debug' symbol in error handler.
9720 2011-08-19 Eli Zaretskii <eliz@gnu.org>
9722 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
9723 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
9724 from an Org mode buffer to a Speedbar frame.
9726 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
9727 a composition, take its buffer position from IT->cmp_it.charpos.
9728 Fixes cursor positioning at the beginning of a line that begins
9729 with a composed character.
9731 2011-08-18 Eli Zaretskii <eliz@gnu.org>
9733 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
9734 character bidirectional type, use STRONG_L instead. Fixes crashes
9735 in a buffer produced by `describe-categories'.
9737 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
9738 members before the level stack, so they would be saved and
9739 restored when copying iterator state. Fixes incorrect reordering
9740 around TABs covered by display properties.
9742 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
9744 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
9746 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
9748 * eval.c (internal_condition_case, internal_condition_case_1)
9749 (internal_condition_case_2, internal_condition_case_n):
9750 Remove unnecessary aborts (Bug#9081).
9752 2011-08-17 Eli Zaretskii <eliz@gnu.org>
9754 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
9755 has no `load' handler, try opening the file locally. (Bug#9311)
9757 2011-08-16 Ken Brown <kbrown@cornell.edu>
9759 * gmalloc.c: Expand comment.
9761 2011-08-16 Eli Zaretskii <eliz@gnu.org>
9763 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
9764 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
9766 2011-08-16 Ken Brown <kbrown@cornell.edu>
9768 Fix memory allocation problems in Cygwin build (Bug#9273).
9770 * unexcw.c ( __malloc_initialized): Declare external variable.
9771 (fixup_executable): Force the dumped emacs to reinitialize malloc.
9773 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
9775 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
9777 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
9779 [CYGWIN] (special_realloc): New function.
9780 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
9781 requests to realloc storage in the static heap.
9783 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
9785 * bidi.c (bidi_initialize): Remove unused local.
9787 2011-08-15 Eli Zaretskii <eliz@gnu.org>
9790 * biditype.h: Remove file.
9791 * makefile.w32-in ($(BLD)/bidi.$(O)):
9792 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
9794 * dispextern.h: Fix a typo in the comment to bidi_type_t.
9796 * chartab.c: Improve commentary for the uniprop_table API.
9798 * bidi.c (bidi_paragraph_init): Support zero value of
9799 bidi_ignore_explicit_marks_for_paragraph_level.
9800 (bidi_initialize): Use uniprop_table instead of including
9801 biditype.h and bidimirror.h.
9803 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
9804 coordinates of the iterator when restoring from ppos_it.
9807 2011-08-14 Kenichi Handa <handa@m17n.org>
9809 * process.c (create_process): Call setup_process_coding_systems
9810 after the pid of the process is set to -1 (Bug#8162).
9812 2011-08-14 Eli Zaretskii <eliz@gnu.org>
9814 * xdisp.c (move_it_in_display_line_to): Don't invoke
9815 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
9816 ppos_it. Fixes vertical cursor motion when line beginning is
9817 covered by an image. (Bug#9296)
9819 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
9821 * nsterm.h (ns_run_ascript): Declare.
9822 (NSAPP_DATA2_RUNASSCRIPT): Define.
9824 * nsfns.m (as_script, as_result, as_status): New static variables.
9825 (ns_run_ascript): New function.
9826 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
9827 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
9828 the event loop. Get status from as_status (Bug#7276).
9830 * nsterm.m (sendEvent): If event is NSApplicationDefined and
9831 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
9832 the event loop (Bug#7276).
9834 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
9836 * gnutls.c (QCgnutls_bootprop_priority)
9837 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
9838 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
9839 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
9840 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
9841 (QCgnutls_bootprop_verify_hostname_error)
9842 (QCgnutls_bootprop_callbacks_verify): Rename from
9843 Qgnutls_bootprop_..., all uses changed.
9845 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
9848 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
9850 * xfaces.c (Qframe_set_background_mode): Now static.
9851 * dispextern.h (Qframe_set_background_mode): Remove decl.
9853 * process.c (Fnetwork_interface_info): Declare local only if needed.
9855 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
9857 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
9858 (Fnetwork_interface_list): Allocate in increments of bytes instead
9859 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
9860 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
9862 (struct ifflag_def): notrailers is smart on OSX.
9863 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
9864 Get hardware address with getifaddrs if available.
9866 2011-08-12 Eli Zaretskii <eliz@gnu.org>
9868 * xdisp.c (iterate_out_of_display_property): xassert that
9869 IT->position is set to within IT->object's boundaries. Break from
9870 the loop as soon as EOB is reached; avoids infloops in redisplay
9871 when IT->position is set up wrongly due to some bug.
9872 Set IT->current to match the bidi iterator unconditionally.
9873 (push_display_prop): Allow GET_FROM_STRING as IT->method on
9874 entry. Force push_it to save on the stack the current
9875 buffer/string position, to be restored by pop_it. Fix flags in
9876 the iterator structure wrt the object coming from a display
9877 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
9878 properties. (Bug#9284)
9880 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
9882 * fontset.c (fontset_get_font_group): Add proper type checks.
9885 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9887 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
9888 and LC_VERSION_MIN_MACOSX.
9889 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
9890 (dump_it) [LC_FUNCTION_STARTS]: Use it.
9892 2011-08-08 Eli Zaretskii <eliz@gnu.org>
9894 * xdisp.c (forward_to_next_line_start): Allow to use the
9895 no-display-properties-and-no-overlays under bidi display.
9896 Set disp_pos in the bidi iterator to avoid searches for display
9897 properties and overlays.
9899 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
9901 * editfns.c (Fset_time_zone_rule): Document relationship with the
9904 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
9905 the font entity extracted from the cache (Bug#8109).
9907 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
9909 * composite.c (autocmp_chars): Don't reset point. That is done by
9910 restore_point_unwind (Bug#5984).
9912 2011-08-07 Juri Linkov <juri@jurta.org>
9914 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
9915 to show the arg `TIME' instead of `TIMEVAL'.
9917 2011-08-06 Eli Zaretskii <eliz@gnu.org>
9919 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
9920 display property strides EOL and includes a newline, as in
9921 longlines-mode. (Bug#9254)
9922 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
9923 word-wrap under bidirectional display. (Bug#9224)
9925 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
9926 is non-zero, even if the data buffer is NULL. Fixes a crash in
9927 vertical-motion with longlines-mode. (Bug#9254)
9929 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9931 * bidi.c <bidi_cache_total_alloc>: Now static.
9932 (bidi_initialize): Initialize bidi_cache_total_alloc.
9934 * xdisp.c (display_line): Release buffer allocated for shelved bidi
9937 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
9938 amount allocated this far in `bidi_cache_total_alloc'.
9939 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
9940 non-zero, only free the data buffer without restoring the cache
9941 contents. All callers changed.
9943 * dispextern.h (bidi_unshelve_cache): Update prototype.
9945 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
9946 (move_it_in_display_line, move_it_to)
9947 (move_it_vertically_backward, move_it_by_lines): Replace the call
9948 to xfree to an equivalent call to bidi_unshelve_cache.
9949 (move_it_in_display_line_to): Fix logic of returning
9950 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
9952 2011-08-05 Eli Zaretskii <eliz@gnu.org>
9954 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
9955 came from a string character with a `cursor' property. (Bug#9229)
9957 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
9959 * Makefile.in (LIB_PTHREAD): New variable.
9960 (LIBES): Add LIB_PTHREAD (Bug#9216).
9962 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
9963 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
9965 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
9967 * regex.c (re_iswctype): Remove some redundant boolean conversions.
9969 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
9971 * xterm.c (x_find_topmost_parent): New function.
9972 (x_set_frame_alpha): Find topmost parent window with
9973 x_find_topmost_parent and set the property there also (bug#9181).
9974 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
9976 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
9978 * callproc.c (Fcall_process): Avoid vfork clobbering
9979 the local vars buffer, coding_systems, current_dir.
9981 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
9983 * keymap.c (Fmake_composed_keymap): Move to subr.el.
9985 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
9987 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
9988 so that it is not optimized away.
9990 * xdisp.c (compute_display_string_pos): Remove unused local.
9992 2011-08-02 Eli Zaretskii <eliz@gnu.org>
9994 Fix slow cursor motion and scrolling in large buffers with
9995 selective display, like Org Mode buffers. (Bug#9218)
9997 * dispextern.h (struct bidi_it): New member disp_prop_p.
9999 * xdisp.c: Remove one-slot cache of display string positions.
10000 (compute_display_string_pos): Accept an additional argument
10001 DISP_PROP_P; callers changed. Scan at most 5K characters forward
10002 for a display string or property. If found, set DISP_PROP_P
10005 * bidi.c (bidi_fetch_char): Accept an additional argument
10006 DISP_PROP_P, and pass it to compute_display_string_pos.
10007 Only handle text covered by a display string if DISP_PROP_P is returned
10008 non-zero. All callers of bidi_fetch_char changed.
10010 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
10012 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
10014 2010-12-03 Don March <don@ohspite.net>
10016 * keymap.c (Fdefine_key): Fix non-prefix key error message when
10017 last character M-[char] is translated to ESC [char] (bug#7541).
10019 2011-08-02 Kenichi Handa <handa@m17n.org>
10021 * lisp.h (uniprop_table): Extern it.
10023 * chartab.c (uniprop_table): Make it non-static.
10025 2011-08-01 Eli Zaretskii <eliz@gnu.org>
10027 * xdisp.c (forward_to_next_line_start): Accept additional argument
10028 BIDI_IT_PREV, and store into it the state of the bidi iterator had
10030 (reseat_at_next_visible_line_start): Use the bidi iterator state
10031 returned by forward_to_next_line_start to restore the state of
10032 it->bidi_it after backing up to previous newline. (Bug#9212)
10034 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
10036 * regex.c (re_comp): Protoize.
10037 (re_exec): Fix return type.
10038 (regexec): Fix type of `ret'. (Bug#9203)
10040 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10042 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
10043 This is needed if max-image-size is a floating-point number.
10045 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10047 * print.c (print_object): Print empty symbol as ##.
10049 * lread.c (read1): Read ## as empty symbol.
10051 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
10053 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
10054 setting frame foreground color (Bug#9175).
10055 (x_set_background_color): Likewise.
10057 * nsmenu.m (-setText): Size tooltip dimensions precisely to
10058 contents (Bug#9176).
10059 (EmacsTooltip -init): Remove bezels and add shadows to
10062 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
10063 or scroll bar (Bug#8470).
10065 * nsfont.m (nsfont_open): Remove assignment to voffset and
10066 unnecessary vars hshink, expand, hd, full_height, min_height.
10067 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
10069 * nsterm.h (nsfont_info): Remove voffset field.
10071 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
10073 Implement strike-through and overline on NextStep (Bug#8863).
10075 * nsfont.m (nsfont_open): Use underline position provided by font,
10076 instead of hard-coded value of 2.
10077 (nsfont_draw): Call ns_draw_text_decoration instead.
10079 * nsterm.h: Add declaration for ns_draw_text_decoration.
10081 * nsterm.m (ns_draw_text_decoration): New function for drawing
10082 underline, overline, and strike-through.
10083 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
10084 ns_draw_text_decoration. Change treatment of cursor drawing to
10085 accommodate underlining, etc.
10087 2011-07-28 Eli Zaretskii <eliz@gnu.org>
10089 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
10092 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10094 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
10095 Without this fix, if a signal arrives just after memory fills up,
10096 'malloc' might be invoked reentrantly.
10098 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
10099 In other words, assume that every image size is allowed, on non-X
10100 hosts. This assumption is probably wrong, but it lets Emacs compile.
10102 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10104 * regex.c (re_iswctype): Convert return values to boolean.
10106 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
10108 * xdisp.c (compute_display_string_pos): Don't use cached display
10109 string position if the buffer had its restriction changed.
10112 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10114 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
10116 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10118 Integer signedness and overflow and related fixes. (Bug#9079)
10120 * bidi.c: Integer size and overflow fixes.
10121 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
10122 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
10123 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10124 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
10125 (bidi_find_other_level_edge):
10126 Use ptrdiff_t instead of EMACS_INT where either will do.
10127 This works better on 32-bit hosts configured --with-wide-int.
10128 (bidi_cache_ensure_space): Check for size-calculation overflow.
10129 Use % rather than repeated addition, for better worst-case speed.
10130 Don't set bidi_cache_size until after xrealloc returns, because it
10132 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
10133 (bidi_cache_ensure_space): Also check that the bidi cache size
10134 does not exceed that of the largest Lisp string or buffer. See Eli
10135 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
10137 * alloc.c (__malloc_size_t): Remove.
10138 All uses replaced by size_t. See Andreas Schwab's note
10139 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
10141 * image.c: Improve checking for integer overflow.
10142 (check_image_size): Assume that f is nonnull, since
10143 it is always nonnull in practice. This is one less thing to
10144 worry about when checking for integer overflow later.
10145 (x_check_image_size): New function, which checks for integer
10146 overflow issues inside X.
10147 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
10148 This removes the need for a memory_full check.
10149 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
10150 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
10151 (xbm_read_bitmap_data): Change locals back to 'int', since
10152 their values must fit in 'int'.
10153 (xpm_load_image, png_load, tiff_load):
10154 Invoke x_create_x_image_and_pixmap earlier,
10155 to avoid much needless work if the image is too large.
10156 (tiff_load): Treat overly large images as if
10157 x_create_x_image_and_pixmap failed, not as malloc failures.
10158 (gs_load): Use x_check_image_size.
10160 * gtkutil.c: Omit integer casts.
10161 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
10162 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
10164 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
10166 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
10167 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
10168 would wrongly return t on a 64-bit host.
10170 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
10171 The plain *_OVERFLOW macros run afoul of GCC bug 49705
10172 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
10173 and therefore cause GCC to emit a bogus diagnostic in some cases.
10175 * image.c: Integer signedness and overflow and related fixes.
10176 This is not an exhaustive set of fixes, but it's time to
10177 record what I've got.
10178 (lookup_pixel_color, check_image_size): Remove redundant decls.
10179 (check_image_size): Don't assume that arbitrary EMACS_INT values
10180 fit in 'int', or that arbitrary 'double' values fit in 'int'.
10181 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
10182 (tiff_load, imagemagick_load_image):
10183 Check for overflow in size calculations.
10184 (x_create_x_image_and_pixmap): Remove unnecessary test for
10185 xmalloc returning NULL; that can't happen.
10186 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
10187 (xpm_color_bucket): Use better integer hashing function.
10188 (xpm_cache_color): Don't possibly over-allocate memory.
10189 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
10190 (gif_memory_source):
10191 Use ptrdiff_t, not int or size_t, to record sizes.
10192 (png_load): Don't assume values greater than 2**31 fit in 'int'.
10193 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
10194 either works, as we prefer signed integers.
10195 (tiff_read_from_memory, tiff_write_from_memory):
10196 Return tsize_t, not size_t, since that's what the TIFF API wants.
10197 (tiff_read_from_memory): Don't fail simply because the read would
10198 go past EOF; instead, return a short read.
10199 (tiff_load): Omit no-longer-needed casts.
10200 (Fimagemagick_types): Don't assume size fits into 'int'.
10202 Improve hashing quality when configured --with-wide-int.
10203 * fns.c (hash_string): New function, taken from sxhash_string.
10204 Do not discard information about ASCII character case; this
10205 discarding is no longer needed.
10206 (sxhash-string): Use it. Change sig to match it. Caller changed.
10207 * lisp.h: Declare it.
10208 * lread.c (hash_string): Remove, since we now use fns.c's version.
10209 The fns.c version returns a wider integer if --with-wide-int is
10210 specified, so this should help the quality of the hashing a bit.
10212 * emacs.c: Integer overflow minor fix.
10213 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
10214 Define only if GNU_LINUX.
10215 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
10217 * dispnew.c: Integer signedness and overflow fixes.
10218 Remove unnecessary forward decls, that were a maintenance hassle.
10219 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
10221 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
10222 (scrolling_window): Use ptrdiff_t, not int, for byte count.
10223 (prepare_desired_row, line_draw_cost):
10224 Use int, not unsigned, where either works.
10225 (save_current_matrix, restore_current_matrix):
10226 Use ptrdiff_t, not size_t, where either works.
10227 (init_display): Check for overflow more accurately, and without
10228 relying on undefined behavior.
10230 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
10231 Remove, replacing with the new symbols in lisp.h. All uses changed.
10232 * fileio.c (make_temp_name):
10233 * filelock.c (lock_file_1, lock_file):
10234 * xdisp.c (message_dolog):
10235 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
10236 Use pMd etc. instead.
10237 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
10238 replacing the pWIDE etc. symbols removed from editfns.c.
10240 * keyboard.h (num_input_events): Now uintmax_t.
10241 This is (very slightly) less likely to mess up due to wraparound.
10244 * buffer.c: Integer signedness fixes.
10245 (alloc_buffer_text, enlarge_buffer_text):
10246 Use ptrdiff_t rather than size_t when either will do, as we prefer
10249 * alloc.c: Integer signedness and overflow fixes.
10250 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
10251 (__malloc_size_t): Default to size_t, not to int.
10252 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
10253 (Fgarbage_collect, mark_object_loop_halt, mark_object):
10254 Prefer ptrdiff_t to size_t when either would do, as we prefer
10256 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
10257 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
10258 Now const. Initialize with values that are in range even if char
10260 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
10261 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
10262 These functions do the right thing with sizes > 2**32.
10263 (check_depth): Now ptrdiff_t, not int.
10264 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
10265 Adjust to new way of storing sizes. Check for size overflow bugs
10267 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
10268 slightly wrong anyway, as it missed one instance of
10269 XMALLOC_OVERRUN_CHECK_OVERHEAD.
10270 (refill_memory_reserve): Omit needless cast to size_t.
10271 (mark_object_loop_halt): Mark as externally visible.
10273 * xselect.c: Integer signedness and overflow fixes.
10274 (Fx_register_dnd_atom, x_handle_dnd_message):
10275 Use ptrdiff_t, not size_t, since we prefer signed.
10276 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
10277 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
10278 x_dnd_atoms_size and x_dnd_atoms_length.
10280 * doprnt.c: Prefer signed to unsigned when either works.
10282 * doprnt.c (doprnt):
10284 * xdisp.c (vmessage):
10285 Use ptrdiff_t, not size_t, when using or implementing doprnt,
10286 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
10287 prefer signed arithmetic to avoid comparison confusion.
10288 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
10289 but is a bit tricky.
10291 Assume freestanding C89 headers, string.h, stdlib.h.
10292 * data.c, doprnt.c, floatfns.c, print.c:
10293 Include float.h unconditionally.
10294 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
10295 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
10296 * regex.c: Likewise for stddef.h, string.h.
10297 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
10298 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
10299 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
10300 (STDC_HEADERS): Remove obsolete defines.
10301 * sysdep.c: Include limits.h unconditionally.
10303 Assume support for memcmp, memcpy, memmove, memset.
10304 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
10305 * regex.c (memcmp, memcpy):
10306 Remove; we assume C89 now.
10308 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
10309 (__malloc_safe_bcopy): Remove; no longer needed.
10311 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
10312 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
10313 well either way, and we prefer signed to unsigned.
10315 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
10317 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
10318 closes the connection while we're reading (bug#9182).
10320 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
10322 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
10323 are specified (Bug#9168).
10325 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
10327 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
10328 Found by GCC static checking and --with-wide-int on a 32-bit host.
10330 2011-07-25 Eli Zaretskii <eliz@gnu.org>
10332 * xdisp.c (compute_display_string_pos): Fix logic of caching
10333 previous display string position. Initialize cached_prev_pos to
10334 -1. Fixes slow-down at the beginning of a buffer.
10336 2011-07-24 Eli Zaretskii <eliz@gnu.org>
10338 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
10339 for attrs[LFACE_FONTSET_INDEX].
10341 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
10343 * xml.c (parse_region): Remove unused local
10344 that was recently introduced.
10346 2011-07-23 Eli Zaretskii <eliz@gnu.org>
10348 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
10349 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
10351 * xdisp.c (move_it_in_display_line_to): Record the best matching
10352 position for TO_CHARPOS while scanning the line, and restore it on
10353 exit if none of the characters scanned was an exact match.
10354 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
10355 when exact match is impossible due to invisible text, and the
10356 lines are truncated.
10358 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
10360 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
10363 2011-07-22 Eli Zaretskii <eliz@gnu.org>
10365 Fix a significant slow-down of cursor motion with C-n, C-p,
10366 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
10367 auto-repeat under bidi redisplay in fontified buffers.
10368 * xdisp.c (compute_stop_pos_backwards): New function.
10369 (next_element_from_buffer): Call compute_stop_pos_backwards to
10370 find a suitable prev_stop when we find ourselves before
10372 (reseat): Don't look for prev_stop, as that could mean a very long
10374 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
10375 <cached_disp_overlay_modiff>: Cache for last found display string
10377 (compute_display_string_pos): Return the cached position if asked
10378 about the same buffer in the same area of character positions, and
10379 the buffer wasn't changed since the time the display string
10380 position was cached.
10382 2011-07-22 Eli Zaretskii <eliz@gnu.org>
10384 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
10385 is an integer, which is important for empty lines. (Bug#9149)
10387 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
10389 * frame.c (Fmodify_frame_parameters): In tty case, update the
10390 default face if necessary (Bug#4238).
10392 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
10394 * editfns.c (Fstring_to_char): No need to explain what a character
10395 is in the docstring (Bug#6576).
10397 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10399 * xml.c (parse_region): Make sure we always return a tree.
10401 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
10403 * xml.c (parse_region): If a document contains only comments,
10406 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10408 * xml.c (make_dom): Return comments, too.
10410 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
10413 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
10414 and the surrounding thread.
10415 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
10416 rather than fgets, and retry after EINTR. Otherwise, 'emacs
10417 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
10419 * s/openbsd.h (BROKEN_SIGIO): Define.
10420 * unexelf.c (unexec) [__OpenBSD__]:
10421 Don't update the .mdebug section of the Alpha COFF symbol table.
10423 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
10425 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
10428 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
10430 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
10431 This fixes some race conditions on the permissions of any newly
10434 * alloc.c (valid_pointer_p): Use pipe, not open.
10435 This fixes some permissions issues when debugging.
10437 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
10438 If fchown fails to set both uid and gid, try to set just gid,
10439 as that is sometimes allowed. Adjust the file's mode to eliminate
10440 setuid or setgid bits that are inappropriate if fchown fails.
10442 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
10444 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
10445 to compare Lisp_Objects.
10446 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
10447 global_gnutls_log_level, don't mistake it for a Lisp_Object.
10448 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
10450 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
10452 * lread.c (read_integer): Unread even EOF character.
10453 (read1): Likewise. Properly record start position of symbol.
10455 * lread.c (read1): Read `#:' as empty uninterned symbol if no
10456 symbol character follows.
10458 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
10460 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
10461 This works around a problem with the previous change to Fcopy_file.
10462 Recent glibc declares fchown with __attribute__((warn_unused_result)),
10463 and without this change, GCC might complain about discarding
10464 fchown's return value.
10466 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
10468 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
10470 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
10472 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
10474 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
10476 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
10477 it's used from the C level.
10479 * process.c: Use the same condition for POLL_FOR_INPUT in both
10480 keyboard.c and process.c (bug#1858).
10482 2011-07-09 Lawrence Mitchell <wence@gmx.li>
10484 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
10485 (Fgnutls_boot): Use it.
10487 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
10489 * doc.c (Fsubstitute_command_keys): Revert last change.
10491 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
10493 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
10494 quotes the next character, and doesn't affect other longer
10495 sequences (bug#8935).
10497 * lread.c (syms_of_lread): Clarify that is isn't only
10498 `eval-buffer' and `eval-defun' that's affected by
10499 `lexical-binding' (bug#8460).
10501 2011-07-15 Eli Zaretskii <eliz@gnu.org>
10503 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
10504 bidi redisplay when a line includes both an image and is truncated.
10506 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
10508 Fix minor problems found by static checking.
10509 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
10510 (elsz): Now a signed constant, not a size_t var. We prefer signed
10511 types to unsigned, to avoid integer comparison confusion. Without
10512 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
10513 "cannot optimize loop, the loop counter may overflow", a symptom
10515 * indent.c (Fvertical_motion): Mark locals as initialized.
10516 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
10518 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10520 * search.c (Fre_search_backward): Mention `case-fold-search' in
10521 all the re_search_* functions (bug#8138).
10523 * keyboard.c (Fopen_dribble_file): Document when the file is
10526 2011-07-14 Eli Zaretskii <eliz@gnu.org>
10528 * bidi.c (bidi_dump_cached_states): Fix format of displaying
10531 Support bidi reordering of display and overlay strings.
10532 * xdisp.c (compute_display_string_pos)
10533 (compute_display_string_end): Accept additional argument STRING.
10534 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
10535 (reseat_to_string): Initialize bidi_it->string.s and
10536 bidi_it->string.schars.
10537 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
10538 NULL (avoids a crash in bidi_paragraph_init).
10539 Initialize itb.string.lstring.
10540 (init_iterator): Call bidi_init_it only of a valid
10541 buffer position was specified. Initialize paragraph_embedding to
10543 (reseat_to_string): Initialize the bidi iterator.
10544 (display_string): If we need to ignore text properties of
10545 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
10546 original value of -1 will not work with bidi.)
10547 (compute_display_string_pos): First arg is now struct
10548 `text_pos *'; all callers changed. Support display properties on
10550 (compute_display_string_end): Support display properties on Lisp
10552 (init_iterator, reseat_1, reseat_to_string): Initialize the
10553 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
10554 when iterating on a string not from display properties).
10555 (compute_display_string_pos, compute_display_string_end):
10556 Fix calculation of the object to scan. Fixes an error when using
10558 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
10559 base_level_stop; instead, set base_level_stop to BEGV.
10560 Fixes crashes in vertical-motion.
10561 (next_element_from_buffer): Improve commentary for when
10562 the iterator is before prev_stop.
10563 (init_iterator): Initialize bidi_p from the default value of
10564 bidi-display-reordering, not from buffer-local value. Use the
10565 buffer-local value only if initializing for buffer iteration.
10566 (handle_invisible_prop): Support invisible properties on strings
10567 that are being bidi-reordered.
10568 (set_iterator_to_next): Support bidi reordering of C strings and
10570 (next_element_from_string): Support bidi reordering of Lisp
10572 (handle_stop_backwards): Support Lisp strings as well.
10573 (display_string): Support display of R2L glyph rows.
10574 Use IT_STRING_CHARPOS when displaying from a Lisp string.
10575 (init_iterator): Don't initialize it->bidi_p for strings
10577 (reseat_to_string): Initialize it->bidi_p for strings here.
10578 (next_element_from_string, next_element_from_c_string)
10579 (next_element_from_buffer): Add xassert's for correspondence
10580 between IT's object being iterated and it->bidi_it.string
10582 (face_before_or_after_it_pos): Support bidi iteration.
10583 (next_element_from_c_string): Handle the case of the first string
10584 character that is not the first one in the visual order.
10585 (get_visually_first_element): New function, refactored from common
10586 parts of next_element_from_buffer, next_element_from_string, and
10587 next_element_from_c_string.
10588 (tool_bar_lines_needed, redisplay_tool_bar)
10589 (display_menu_bar): Force left-to-right direction. Add a FIXME
10590 comment for making that be controlled by a user option.
10591 (push_it, pop_it): Save and restore the state of the
10592 bidi iterator. Save and restore the bidi_p flag.
10593 (pop_it): Iterate out of display property for string iteration as
10595 (iterate_out_of_display_property): Support iteration over strings.
10596 (handle_single_display_spec): Set up it->bidi_it for iteration
10597 over a display string, and call bidi_init_it.
10598 (handle_single_display_spec, next_overlay_string)
10599 (get_overlay_strings_1, push_display_prop): Set up the bidi
10600 iterator for displaying display or overlay strings.
10601 (forward_to_next_line_start): Don't use the shortcut if
10603 (back_to_previous_visible_line_start): If handle_display_prop
10604 pushed the iterator stack, restore the internal state of the bidi
10605 iterator by calling bidi_pop_it same number of times.
10606 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
10607 and we are bidi-iterating, don't decrement the iterator position;
10608 instead, set the first_elt flag in the bidi iterator, to produce
10610 (reseat_1): Remove redundant setting of string_from_display_prop_p.
10611 (push_display_prop): xassert that we are iterating a buffer.
10612 (push_it, pop_it): Save and restore paragraph_embedding member.
10613 (handle_single_display_spec, next_overlay_string)
10614 (get_overlay_strings_1, reseat_1, reseat_to_string)
10615 (push_display_prop): Set up the `unibyte' member of bidi_it.string
10616 correctly. Don't assume unibyte strings are not bidi-reordered.
10617 (compute_display_string_pos)
10618 (compute_display_string_end): Fix handling the case of C string.
10619 (push_it, pop_it): Save and restore from_disp_prop_p.
10620 (handle_single_display_spec, push_display_prop): Set the
10621 from_disp_prop_p flag.
10622 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
10623 (pop_it): Call iterate_out_of_display_property only if we are
10624 popping after iteration over a string that came from a display
10625 property. Fix a typo in popping stretch info. Add an assertion
10626 for verifying that the iterator position is in sync with the bidi
10628 (handle_single_display_spec, get_overlay_strings_1)
10629 (push_display_prop): Fix initialization of paragraph direction for
10630 string when that of the parent object is not yet determined.
10631 (reseat_1): Call bidi_init_it to resync the bidi
10632 iterator with IT's position. (Bug#7616)
10633 (find_row_edges): If ROW->start.pos gives position
10634 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
10635 (handle_stop, back_to_previous_visible_line_start, reseat_1):
10636 Reset the from_disp_prop_p flag.
10637 (SAVE_IT, RESTORE_IT): New macros.
10638 (pos_visible_p, face_before_or_after_it_pos)
10639 (back_to_previous_visible_line_start)
10640 (move_it_in_display_line_to, move_it_in_display_line)
10641 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10642 (try_scrolling, redisplay_window, display_line): Use them when
10643 saving a temporary copy of the iterator and restoring it back.
10644 (back_to_previous_visible_line_start, reseat_1)
10645 (init_iterator): Empty the bidi cache "stack".
10646 (move_it_in_display_line_to): If iterator ended up at
10647 EOL, but we never saw any buffer positions smaller than
10648 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
10649 motion in bidi-reordered lines.
10650 (move_it_in_display_line_to): Record prev_method and prev_pos
10651 immediately before the call to set_iterator_to_next. Fixes cursor
10652 motion in bidi-reordered lines with stretch glyphs and strings
10653 displayed in margins. (Bug#8133) (Bug#8867)
10654 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
10656 (pos_visible_p): Support positions in bidi-reordered lines.
10657 Save and restore bidi cache.
10659 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
10660 (bidi_paragraph_info): Delete unused struct.
10661 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
10662 (bidi_cache_start): New variable.
10663 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
10665 (bidi_cache_fetch_state, bidi_cache_search)
10666 (bidi_cache_find_level_change, bidi_cache_iterator_state)
10667 (bidi_cache_find, bidi_peek_at_next_level)
10668 (bidi_level_of_next_char, bidi_find_other_level_edge)
10669 (bidi_move_to_visually_next): Compare cache index with
10670 bidi_cache_start rather than with zero.
10671 (bidi_fetch_char): Accept new argument STRING; all callers
10672 changed. Support iteration over a string. Support strings with
10673 display properties. Support unibyte strings. Fix the type of
10674 `len' according to what STRING_CHAR_AND_LENGTH expects.
10675 (bidi_paragraph_init, bidi_resolve_explicit_1)
10676 (bidi_resolve_explicit, bidi_resolve_weak)
10677 (bidi_level_of_next_char, bidi_move_to_visually_next):
10678 Support iteration over a string.
10679 (bidi_set_sor_type, bidi_resolve_explicit_1)
10680 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
10681 can now be zero (for strings); special values 0 and -1 were
10682 changed to -1 and -2, respectively.
10683 (bidi_char_at_pos): New function.
10684 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
10685 Call it instead of FETCH_MULTIBYTE_CHAR.
10686 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
10687 initialized to valid values.
10688 (bidi_init_it): Don't initialize charpos and bytepos with invalid
10690 (bidi_level_of_next_char): Allow the sentinel "position" to pass
10691 the test for valid cached positions. Fix the logic for looking up
10692 the sentinel state in the cache. GCPRO the Lisp string we are
10694 (bidi_push_it, bidi_pop_it): New functions.
10695 (bidi_initialize): Initialize the bidi cache start stack pointer.
10696 (bidi_cache_ensure_space): New function, refactored from part of
10697 bidi_cache_iterator_state. Don't assume the required size is just
10698 one BIDI_CACHE_CHUNK away.
10699 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
10700 (bidi_count_bytes, bidi_char_at_pos): New functions.
10701 (bidi_cache_search): Don't assume bidi_cache_last_idx is
10702 always valid if bidi_cache_idx is valid.
10703 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
10704 is valid if it's going to be used.
10705 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
10706 (bidi_cache_fetch_state, bidi_cache_search)
10707 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10708 (bidi_cache_iterator_state, bidi_cache_find)
10709 (bidi_find_other_level_edge, bidi_cache_start_stack):
10710 All variables related to cache indices are now EMACS_INT.
10712 * dispextern.h (struct bidi_string_data): New structure.
10713 (struct bidi_it): New member `string'. Make flag members be 1-bit
10714 fields, and put them last in the struct.
10715 (compute_display_string_pos, compute_display_string_end):
10717 (bidi_push_it, bidi_pop_it): Add prototypes.
10718 (struct iterator_stack_entry): New members bidi_p,
10719 paragraph_embedding, and from_disp_prop_p.
10720 (struct it): Member bidi_p is now a bit field 1 bit wide.
10721 (bidi_shelve_cache, bidi_unshelve_cache):
10722 Declare prototypes.
10724 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
10725 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
10726 and vector-like objects.
10728 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
10729 cache around display iteration.
10731 * window.c (Fwindow_end, window_scroll_pixel_based)
10732 (displayed_window_lines, Frecenter): Save and restore the bidi
10733 cache around display iteration.
10735 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10737 * editfns.c (Fdelete_region): Clarify the use of the named
10738 parameters (bug#6788).
10740 2011-07-14 Martin Rudalics <rudalics@gmx.at>
10742 * indent.c (Fvertical_motion): Set and restore w->pointm when
10743 saving and restoring the window's buffer (Bug#9006).
10745 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
10747 * editfns.c (Fstring_to_char): Clarify just what is returned
10748 (bug#6576). Text by Eli Zaretskii.
10750 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
10752 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
10754 2011-07-13 Eli Zaretskii <eliz@gnu.org>
10756 * buffer.c (mmap_find): Fix a typo.
10758 2011-07-13 Johan Bockgård <bojohan@gnu.org>
10760 Fix execution of x selection hooks.
10761 * xselect.c (Qx_lost_selection_functions)
10762 (Qx_sent_selection_functions): New vars.
10763 (syms_of_xselect): DEFSYM them.
10764 (x_handle_selection_request): Pass Qx_sent_selection_functions
10765 rather than Vx_sent_selection_functions to Frun_hook_with_args.
10766 (x_handle_selection_clear,x_clear_frame_selections):
10767 Pass Qx_lost_selection_functions rather than
10768 Vx_lost_selection_functions to Frun_hook_with_args.
10770 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
10772 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
10773 The old code sometimes used this field without initializing it.
10775 * alloc.c (gc_sweep): Don't read past end of array.
10776 In theory, the old code could also have corrupted Emacs internals,
10777 though it'd be very unlikely.
10779 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
10781 * character.c (Fcharacterp): Don't advertise optional ignored
10782 argument. (Bug#4026)
10784 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
10786 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
10789 * window.c (Fset_window_start): Doc fix (bug#4199).
10790 (Fset_window_hscroll): Ditto.
10792 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
10794 Fix minor new problems caught by GCC 4.6.1.
10795 * term.c (init_tty): Remove unused local.
10796 * xsettings.c (store_monospaced_changed): Define this function only
10797 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
10798 not used otherwise.
10800 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
10802 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
10804 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
10806 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
10807 are the mini-buffer and the echo area (bug#3320).
10809 * term.c (init_tty): Remove support for supdup, c10 and perq
10810 terminals, which are no longer supported (bug#1482).
10812 2011-07-10 Johan Bockgård <bojohan@gnu.org>
10814 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
10816 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
10818 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
10819 for non-popups (Bug#3642).
10821 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
10823 * alloc.c (reset_malloc_hooks): Protoize.
10824 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
10825 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
10826 * cm.c (losecursor): Likewise.
10827 * data.c (fmod): Likewise.
10828 * dispnew.c (swap_glyphs_in_rows): Likewise.
10829 * emacs.c (memory_warning_signal): Likewise.
10830 * floatfns.c (float_error): Likewise.
10831 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
10832 (otf_open, font_otf_capability, generate_otf_features)
10833 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
10835 * image.c (pbm_read_file): Likewise.
10836 * indent.c (string_display_width): Likewise.
10837 * intervals.c (check_for_interval, search_for_interval)
10838 (inc_interval_count, count_intervals, root_interval)
10839 (adjust_intervals_for_insertion, make_new_interval): Likewise.
10840 * lread.c (defalias): Likewise.
10841 * ralloc.c (r_alloc_check): Likewise.
10842 * regex.c (set_image_of_range_1, set_image_of_range)
10843 (regex_grow_registers): Likewise.
10844 * sysdep.c (strerror): Likewise.
10845 * termcap.c (valid_filename_p, tprint, main): Likewise.
10846 * tparam.c (main): Likewise.
10847 * unexhp9k800.c (run_time_remap, save_data_space)
10848 (update_file_ptrs, read_header, write_header, calculate_checksum)
10849 (copy_file, copy_rest, display_header): Likewise.
10850 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
10852 * xdisp.c (check_it): Likewise.
10853 * xfaces.c (register_color, unregister_color, unregister_colors):
10855 * xfns.c (print_fontset_result): Likewise.
10856 * xrdb.c (member, fatal, main): Likewise.
10858 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
10860 Fix minor problems found by static checking (Bug#9031).
10861 * chartab.c (char_table_set_range, map_sub_char_table):
10862 Remove unused locals.
10863 (uniprop_table): Now static.
10864 * composite.c (_work_char): Remove unused static var.
10866 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
10868 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
10870 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
10872 * gtkutil.c (qttip_cb): Remove code without function.
10874 2011-07-09 Eli Zaretskii <eliz@gnu.org>
10876 * w32.c (pthread_sigmask): New stub.
10878 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
10880 Use pthread_sigmask, not sigprocmask (Bug#9010).
10881 sigprocmask is portable only for single-threaded applications, and
10882 Emacs can be multi-threaded when it uses GTK.
10883 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
10885 * callproc.c (Fcall_process):
10886 * process.c (create_process):
10887 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
10888 Use pthread_sigmask, not sigprocmask.
10890 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10892 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
10893 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
10896 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10898 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
10899 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
10900 (xg_hide_tooltip): Fix comment.
10902 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
10903 in registerServicesMenuSendTypes.
10904 (validRequestorForSendType): Don't check ns_return_types.
10906 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
10909 2011-07-08 Jason Rumney <jasonr@gnu.org>
10911 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
10912 SH_SHOW for hidden windows (Bug#5482).
10914 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
10915 frame struct members of non-existent frames (Bug#6284).
10917 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10919 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
10920 variable firstTime not needed on OSX >= 10.6.
10921 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
10922 >= 10.5. Use setKnobProportion, setDoubleValue.
10924 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
10925 (MAC_OS_X_VERSION_10_5): Define if not defined.
10926 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
10927 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
10928 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
10930 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
10931 cString and lossyCString on OSX >= 10.4.
10933 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
10934 sizeToFit on OSX >= 10.2.
10936 * nsimage.m (allocInitFromFile): Don't use deprecated method
10937 bestRepresentationForDevice on OSX >= 10.6.
10939 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
10942 * emacs.c: Declare unexec_init_emacs_zone.
10944 * nsgui.h: Fix compiler warning about gnulib redefining verify.
10946 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
10948 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
10949 on svcsMenu (Bug#8842).
10951 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
10953 (Fns_list_services): Just return Qnil on 10.6, code not working there.
10955 * nsterm.m (QUTF8_STRING): Declare.
10956 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
10957 (validRequestorForSendType): Return type is (id).
10958 Change indexOfObjectIdenticalTo to indexOfObject.
10959 Check if we have local selection before returning self (Bug#8842).
10960 (writeSelectionToPasteboard): Put local selection into paste board
10961 if we have a local selection (Bug#8842).
10962 (syms_of_nsterm): DEFSYM QUTF8_STRING.
10964 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
10965 (ns_get_local_selection): Declare.
10967 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
10969 * keymap.c (describe_map_tree): Don't insert a double newline at
10970 the end of the buffer (bug#1169) and return whether we inserted
10973 * callint.c (Fcall_interactively): Change "reading args" to
10974 "providing args" to try to clarify what it does (bug#1010).
10976 2011-07-07 Kenichi Handa <handa@m17n.org>
10978 * composite.c (composition_compute_stop_pos): Ignore a static
10979 composition starting before CHARPOS (Bug#8915).
10981 * xdisp.c (handle_composition_prop): Likewise.
10983 2011-07-07 Eli Zaretskii <eliz@gnu.org>
10985 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
10988 2011-07-07 Kenichi Handa <handa@m17n.org>
10990 * character.h (unicode_category_t): New enum type.
10992 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
10993 (Qchar_code_property_table): New variable.
10994 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
10995 (UNIPROP_COMPRESSED_FORM_P): New macros.
10996 (char_table_ascii): Uncompress the compressed values.
10997 (sub_char_table_ref): New arg is_uniprop. Callers changed.
10998 Uncompress the compressed values.
10999 (sub_char_table_ref_and_range): Likewise.
11000 (char_table_ref_and_range): Uncompress the compressed values.
11001 (sub_char_table_set): New arg is_uniprop. Callers changed.
11002 Uncompress the compressed values.
11003 (sub_char_table_set_range): Args changed. Callers changed.
11004 (char_table_set_range): Adjuted for the above change.
11005 (map_sub_char_table): Delete args default_val and parent. Add arg
11006 top. Give decoded values to a Lisp function.
11007 (map_char_table): Adjust for the above change. Give decoded
11008 values to a Lisp function. Gcpro more variables.
11009 (uniprop_table_uncompress)
11010 (uniprop_decode_value_run_length): New functions.
11011 (uniprop_decoder, uniprop_decoder_count): New variables.
11012 (uniprop_get_decoder, uniprop_encode_value_character)
11013 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
11015 (uniprop_encoder, uniprop_encoder_count): New variables.
11016 (uniprop_get_encoder, uniprop_table)
11017 (Funicode_property_table_internal, Fget_unicode_property_internal)
11018 (Fput_unicode_property_internal): New functions.
11019 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
11020 Sunicode_property_table_internal, Sget_unicode_property_internal,
11021 and Sput_unicode_property_internal. Defvar_lisp
11022 char-code-property-alist.
11024 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
11025 Vunicode_category_table.
11027 * font.c (font_range): Adjust for the change of
11028 Vunicode_category_table.
11030 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
11032 * m/iris4d.h: Remove file, move contents ...
11033 * s/irix6-5.h: ... here.
11035 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
11037 Remove unportable assumption about struct layout (Bug#8884).
11038 * alloc.c (mark_buffer):
11039 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
11040 (clone_per_buffer_values): Don't assume that
11041 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
11042 This isn't true in general, and it's particularly not true
11043 if Emacs is configured with --with-wide-int.
11044 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
11045 New macros, used in the buffer.c change.
11047 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
11049 * xsettings.c: Use both GConf and GSettings if both are available.
11050 (store_config_changed_event): Add comment.
11051 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
11052 (store_tool_bar_style_changed): New functions.
11053 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
11054 (struct xsettings): Move font inside HAVE_XFT.
11055 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
11056 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
11057 Move inside HAVE_XFT.
11058 (something_changed_gsettingsCB): Rename from something_changedCB.
11059 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
11061 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
11062 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
11063 (something_changed_gconfCB): Rename from something_changedCB.
11064 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
11065 (parse_settings): Move check for font inside HAVE_XFT.
11066 (read_settings, apply_xft_settings): Add comment.
11067 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
11068 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
11069 call store_font_name_changed.
11070 (xft_settings_event): Add comment.
11071 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
11072 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
11073 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
11074 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
11075 (xsettings_initialize): Call init_gsettings last.
11076 (xsettings_get_system_font, xsettings_get_system_normal_font):
11079 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
11081 Random fixes. E.g., (random) never returned negative values.
11082 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
11083 subseconds part to the entropy, as that's a bit more random.
11084 Prefer signed to unsigned, since the signedness doesn't matter and
11085 in general we prefer signed. When given a limit, use a
11086 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
11087 latter isn't right if USE_2_TAGS_FOR_INTS.
11088 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
11089 not 0..VALMASK. Don't discard "excess" bits that random () returns.
11091 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11093 * textprop.c (text_property_stickiness):
11094 Obey Vtext_property_default_nonsticky.
11095 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
11096 * w32fns.c (syms_of_w32fns):
11097 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
11099 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11101 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
11102 This is more efficient than Ffile_directory_p and avoids a minor race.
11104 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
11106 * buffer.c (Foverlay_put): Say what the return value is
11109 * fileio.c (barf_or_query_if_file_exists): Check first if the file
11110 is a directory before asking whether to use the file name
11112 (barf_or_query_if_file_exists): Make the "File is a directory"
11113 error be more correct.
11115 * fns.c (Frequire): Remove the mention of the .gz files, since
11116 that's installation-specific, but keep the mention of
11117 `get-load-suffixes'.
11119 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11121 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
11122 Report string overflow if the output is too long.
11124 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
11126 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
11127 (syms_of_gnutls): Remove duplicate DEFSYM for
11128 Qgnutls_bootprop_verify_hostname_error, an error for
11129 Qgnutls_bootprop_verify_error (which is no longer used).
11131 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
11132 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
11133 Also (re)move comments that are misplaced or no longer relevant.
11135 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11137 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
11139 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
11141 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
11142 and background color parameters if they have been changed.
11144 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
11146 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
11148 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
11150 * xsettings.c (SYSTEM_FONT): Define only when used.
11151 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
11153 * keymap.c (access_keymap_1): Now static.
11155 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
11157 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
11158 leave any prefix arg for the up event (Bug#1586).
11160 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
11162 * lread.c (syms_of_lread): Mention single symbols defined by
11163 `defvar' or `defconst' (bug#7154).
11165 * fns.c (Frequire): Mention .el.gz files (bug#7314).
11166 (Frequire): Mention get-load-suffixes.
11168 2011-07-02 Martin Rudalics <rudalics@gmx.at>
11170 * window.h (window): Remove clone_number slot.
11171 * window.c (Fwindow_clone_number, Fset_window_clone_number):
11173 (make_parent_window, make_window, saved_window)
11174 (Fset_window_configuration, save_window_save): Don't deal with
11176 * buffer.c (Qclone_number): Remove declaration.
11177 (sort_overlays, overlay_strings): Don't deal with clone numbers.
11179 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
11181 Add multiple inheritance to keymaps.
11182 * keymap.c (Fmake_composed_keymap): New function.
11183 (Fset_keymap_parent): Simplify.
11184 (fix_submap_inheritance): Remove.
11185 (access_keymap_1): New function extracted from access_keymap to handle
11186 embedded parents and handle lists of maps.
11187 (access_keymap): Use it.
11188 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
11189 (Fcopy_keymap): Handle embedded parents.
11190 (Fcommand_remapping, define_as_prefix): Simplify.
11191 (Fkey_binding): Simplify.
11192 (syms_of_keymap): Move minibuffer-local-completion-map,
11193 minibuffer-local-filename-completion-map,
11194 minibuffer-local-must-match-map, and
11195 minibuffer-local-filename-must-match-map to Elisp.
11196 (syms_of_keymap): Defsubr make-composed-keymap.
11197 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
11198 (parse_menu_item): Trivial simplification.
11200 2011-07-01 Glenn Morris <rgm@gnu.org>
11202 * Makefile.in (SETTINGS_LIBS): Fix typo.
11204 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
11206 * coding.c (Fencode_coding_string): Record the last coding system
11207 used, as the function doc string says (bug#8738).
11209 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
11211 * xsettings.c (store_monospaced_changed): Take new font as arg and
11212 check for change against current_mono_font.
11213 (EMACS_TYPE_SETTINGS): Remove this and related defines.
11214 (emacs_settings_constructor, emacs_settings_get_property)
11215 (emacs_settings_set_property, emacs_settings_class_init)
11216 (emacs_settings_init, gsettings_obj): Remove.
11217 (something_changedCB): New function for HAVE_GSETTINGS.
11218 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
11219 with value as argument.
11220 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
11221 g_settings_new (Bug#8967). Do not create gsettings_obj.
11222 Remove calls to g_settings_bind. Connect something_changedCB to
11225 * xgselect.c: Add defined (HAVE_GSETTINGS).
11226 (xgselect_initialize): Ditto.
11228 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
11229 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
11232 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
11234 * eval.c (struct backtrace): Simplify and port the data structure.
11235 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
11236 signed bit field, as this assumption is not portable and it makes
11237 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
11238 "char debug_on_exit : 1" as this is not portable either; instead,
11239 use the portable "unsigned int debug_on_exit : 1". Remove unused
11240 member evalargs. Remove obsolete comments about cc bombing out.
11242 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
11244 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
11245 Let HAVE_GSETTINGS override HAVE_GCONF.
11246 (store_monospaced_changed): New function.
11247 (EMACS_SETTINGS): A new type derived from GObject to handle
11248 GSettings notifications.
11249 (emacs_settings_constructor, emacs_settings_get_property)
11250 (emacs_settings_set_property, emacs_settings_class_init):
11252 (gsettings_client, gsettings_obj): New variables.
11253 (GSETTINGS_SCHEMA): New define.
11254 (something_changedCB): Call store_monospaced_changed.
11255 (init_gsettings): New function.
11256 (xsettings_initialize): Call init_gsettings.
11257 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
11260 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
11263 2011-06-29 Martin Rudalics <rudalics@gmx.at>
11265 * window.c (resize_root_window, grow_mini_window)
11266 (shrink_mini_window): Rename Qresize_root_window to
11267 Qwindow_resize_root_window and Qresize_root_window_vertically to
11268 Qwindow_resize_root_window_vertically.
11270 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
11272 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
11274 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
11276 * makefile.w32-in: Redesign dependencies so they reflect more
11277 clearly which files are directly included by each source file,
11278 and not through other includes.
11280 2011-06-27 Martin Rudalics <rudalics@gmx.at>
11282 * buffer.c (Qclone_number): Declare static and DEFSYM it.
11283 (sort_overlays, overlay_strings): When an overlay's clone number
11284 matches the window's clone number process the overlay even if
11285 the overlay's window property doesn't match the current window.
11287 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
11288 (Fwindow_hchild): Rename to Fwindow_left_child.
11289 (Fwindow_next): Rename to Fwindow_next_sibling.
11290 (Fwindow_prev): Rename to Fwindow_prev_sibling.
11291 (resize_window_check): Rename to window_resize_check.
11292 (resize_window_apply): Rename to window_resize_apply.
11293 (Fresize_window_apply): Rename to Fwindow_resize_apply.
11294 (Fdelete_other_windows_internal, resize_frame_windows)
11295 (Fsplit_window_internal, Fdelete_window_internal)
11296 (grow_mini_window, shrink_mini_window)
11297 (Fresize_mini_window_internal): Fix callers accordingly.
11299 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
11301 * emacsgtkfixed.h: State that this is only used with Gtk+3.
11302 (emacs_fixed_set_min_size): Remove.
11303 (emacs_fixed_new): Take frame as argument.
11305 * emacsgtkfixed.c: State that this is only used with Gtk+3.
11306 (_EmacsFixedPrivate): Remove minwidth/height.
11307 Add struct frame *f.
11308 (emacs_fixed_init): Initialize priv->f.
11309 (get_parent_class, emacs_fixed_set_min_size): Remove.
11310 (emacs_fixed_new): Set priv->f to argument.
11311 (emacs_fixed_get_preferred_width)
11312 (emacs_fixed_get_preferred_height): Use min_width/height from
11313 frames size_hint to set minimum and natural (Bug#8919).
11314 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
11315 and use min_width/height from frames size_hint to set
11316 min_width/height (Bug#8919).
11318 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
11319 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
11322 2011-06-26 Eli Zaretskii <eliz@gnu.org>
11324 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
11325 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
11328 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
11330 * process.c (wait_reading_process_output): Bypass select if
11331 waiting for a cell while ignoring keyboard input, and input is
11332 pending. Suggested by Jan Djärv (Bug#8869).
11334 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
11336 Use gnulib's dup2 module instead of rolling our own.
11337 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
11339 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11341 * dispnew.c (scrolling_window): Before scrolling, turn off a
11342 mouse-highlight in the window being scrolled.
11344 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
11346 Move DEFSYM to lisp.h and use everywhere.
11348 * character.h (DEFSYM): Move declaration...
11349 * lisp.h (DEFSYM): ...here.
11355 * w32select.c: Don't include character.h.
11357 * alloc.c (syms_of_alloc):
11358 * buffer.c (syms_of_buffer):
11359 * bytecode.c (syms_of_bytecode):
11360 * callint.c (syms_of_callint):
11361 * casefiddle.c (syms_of_casefiddle):
11362 * casetab.c (init_casetab_once):
11363 * category.c (init_category_once, syms_of_category):
11364 * ccl.c (syms_of_ccl):
11365 * cmds.c (syms_of_cmds):
11366 * composite.c (syms_of_composite):
11367 * dbusbind.c (syms_of_dbusbind):
11368 * dired.c (syms_of_dired):
11369 * dispnew.c (syms_of_display):
11370 * doc.c (syms_of_doc):
11371 * editfns.c (syms_of_editfns):
11372 * emacs.c (syms_of_emacs):
11373 * eval.c (syms_of_eval):
11374 * fileio.c (syms_of_fileio):
11375 * fns.c (syms_of_fns):
11376 * frame.c (syms_of_frame):
11377 * fringe.c (syms_of_fringe):
11378 * insdel.c (syms_of_insdel):
11379 * keymap.c (syms_of_keymap):
11380 * lread.c (init_obarray, syms_of_lread):
11381 * macros.c (syms_of_macros):
11382 * msdos.c (syms_of_msdos):
11383 * print.c (syms_of_print):
11384 * process.c (syms_of_process):
11385 * search.c (syms_of_search):
11386 * sound.c (syms_of_sound):
11387 * syntax.c (init_syntax_once, syms_of_syntax):
11388 * terminal.c (syms_of_terminal):
11389 * textprop.c (syms_of_textprop):
11390 * undo.c (syms_of_undo):
11391 * w32.c (globals_of_w32):
11392 * window.c (syms_of_window):
11393 * xdisp.c (syms_of_xdisp):
11394 * xfaces.c (syms_of_xfaces):
11395 * xfns.c (syms_of_xfns):
11396 * xmenu.c (syms_of_xmenu):
11397 * xsettings.c (syms_of_xsettings):
11398 * xterm.c (syms_of_xterm): Use DEFSYM.
11400 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
11402 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
11404 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
11406 Integer and buffer overflow fixes (Bug#8873).
11408 * print.c (printchar, strout): Check for string overflow.
11409 (PRINTPREPARE, printchar, strout):
11410 Don't set size unless allocation succeeds.
11412 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
11413 for sizes. Check for string overflow more accurately.
11414 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
11416 * macros.c: Integer and buffer overflow fixes.
11417 * keyboard.h (struct keyboard.kbd_macro_bufsize):
11418 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
11419 Use ptrdiff_t, not int, for sizes.
11420 Don't increment bufsize until after realloc succeeds.
11421 Check for size-calculation overflow.
11422 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
11424 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
11426 * lread.c: Integer overflow fixes.
11427 (read_integer): Radix is now EMACS_INT, not int,
11428 to improve quality of diagnostics for out-of-range radices.
11429 Calculate buffer size correctly for out-of-range radices.
11430 (read1): Check for integer overflow in radices, and in
11431 read-circle numbers.
11432 (read_escape): Avoid int overflow.
11433 (Fload, openp, read_buffer_size, read1)
11434 (substitute_object_recurse, read_vector, read_list, map_obarray):
11435 Use ptrdiff_t, not int, for sizes.
11436 (read1): Use EMACS_INT, not int, for sizes.
11437 Check for size overflow.
11439 * image.c (cache_image): Check for size arithmetic overflow.
11441 * lread.c: Integer overflow issues.
11442 (saved_doc_string_size, saved_doc_string_length)
11443 (prev_saved_doc_string_size, prev_saved_doc_string_length):
11444 Now ptrdiff_t, not int.
11445 (read1): Don't assume doc string length fits in int. Check for
11446 out-of-range doc string lengths.
11447 (read_list): Don't assume file position fits in int.
11448 (read_escape): Check for hex character overflow.
11450 2011-06-22 Leo Liu <sdl.web@gmail.com>
11452 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
11453 Move to minibuffer.el.
11455 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11457 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
11458 The following patches are for when GLYPH_DEBUG && !XASSERT.
11459 * dispextern.h (trace_redisplay_p, dump_glyph_string):
11460 * dispnew.c (flush_stdout):
11461 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
11462 Mark as externally visible.
11463 * dispnew.c (check_window_matrix_pointers): Now static.
11464 * dispnew.c (window_to_frame_vpos):
11465 * xfns.c (unwind_create_frame):
11466 * xterm.c (x_check_font): Remove unused local.
11467 * scroll.c (CHECK_BOUNDS):
11468 * xfaces.c (cache_fache): Rename local to avoid shadowing.
11469 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
11470 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
11471 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
11472 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
11474 (debug_method_add): Use va_list and vsprintf rather than relying
11475 on undefined behavior with wrong number of arguments.
11476 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
11477 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
11478 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
11479 since we're not interested in debugging glyphs with old libraries.
11480 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
11481 GCC 4.6.0's static checking.
11483 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11485 Integer overflow and signedness fixes (Bug#8873).
11486 A few related buffer overrun fixes, too.
11488 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
11490 * dispextern.h (struct face.stipple):
11491 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
11492 (x_bitmap_mask, x_allocate_bitmap_record)
11493 (x_create_bitmap_from_data, x_create_bitmap_from_file)
11494 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
11495 (x_create_bitmap_from_xpm_data):
11496 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
11497 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
11499 * xfaces.c (load_pixmap):
11500 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
11501 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
11502 (.bitmaps_last, struct x_output.icon_bitmap):
11503 Use ptrdiff_t, not int, for bitmap indexes.
11504 (x_allocate_bitmap_record): Check for size overflow.
11505 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
11507 Use ptrdiff_t, not int, for overlay counts.
11508 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
11509 * editfns.c (overlays_around, get_pos_property):
11510 * textprop.c (get_char_property_and_overlay):
11511 * xdisp.c (next_overlay_change, note_mouse_highlight):
11512 * xfaces.c (face_at_buffer_position):
11513 * buffer.c (OVERLAY_COUNT_MAX): New macro.
11514 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
11515 (Fnext_overlay_change, Fprevious_overlay_change)
11516 (mouse_face_overlay_overlaps, Foverlays_in):
11517 Use ptrdiff_t, not int, for sizes.
11518 (overlays_at, overlays_in): Check for size-calculation overflow.
11520 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
11522 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
11523 (x_session_initialize): Do not assume string length fits in int.
11525 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
11526 This is unlikely, but can occur if DPI is outlandish.
11528 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
11529 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
11531 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
11532 * xrdb.c (magic_file_p, search_magic_path):
11533 Omit last arg SUFFIX; it was always 0. All callers changed.
11534 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
11536 * xfont.c (xfont_match): Avoid need for strlen.
11538 * xfns.c: Don't assume strlen fits in int.
11539 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
11541 * xdisp.c (message_log_check_duplicate): Return intmax_t,
11542 not unsigned long, as we prefer signed integers. All callers changed.
11543 Detect integer overflow in repeat count.
11544 (message_dolog): Don't assume print length fits in 39 bytes.
11545 (display_mode_element): Don't assume strlen fits in int.
11547 * termcap.c: Don't assume sizes fit in int and never overflow.
11548 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
11549 (gobble_line): Check for size-calculation overflow.
11551 * minibuf.c (Fread_buffer):
11552 * lread.c (intern, intern_c_string):
11553 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
11554 Don't assume string length fits in int.
11556 * keyboard.c (parse_tool_bar_item):
11557 * gtkutil.c (style_changed_cb): Avoid need for strlen.
11559 * font.c: Don't assume string length fits in int.
11560 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
11561 Use ptrdiff_t, not int.
11562 (font_intern_prop): Don't assume string length fits in int.
11563 Don't assume integer property fits in fixnum.
11564 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
11566 * filelock.c: Fix some buffer overrun and integer overflow issues.
11567 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
11568 Reformulate so as not to need the command string.
11569 Invoke gzip -cd rather than gunzip, as it's more portable.
11570 (lock_info_type, lock_file_1, lock_file):
11571 Don't assume pid_t and time_t fit in unsigned long.
11572 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
11573 (current_lock_owner): Prefer signed type for sizes.
11574 Use memcpy, not strncpy, where memcpy is what is really wanted.
11575 Don't assume (via atoi) that time_t and pid_t fit in int.
11576 Check for time_t and/or pid_t out of range, e.g., via a network share.
11577 Don't alloca where an auto var works fine.
11579 * fileio.c: Fix some integer overflow issues.
11580 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
11581 Don't assume string length fits in int.
11582 (directory_file_name): Don't assume string length fits in long.
11583 (make_temp_name): Don't assume pid fits in int, or that its print
11584 length is less than 20.
11586 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
11588 * coding.c (make_subsidiaries): Don't assume string length fits in int.
11590 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
11592 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
11593 We prefer signed integers, even for size calculations.
11595 * emacs.c: Don't assume string length fits in 'int'.
11596 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
11597 (main): Don't invoke strlen when not needed.
11599 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
11600 (XD_DEBUG_MESSAGE): Don't waste a byte.
11602 * callproc.c (getenv_internal_1, getenv_internal)
11603 (Fgetenv_internal):
11604 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
11606 * lread.c (invalid_syntax): Omit length argument.
11607 All uses changed. This doesn't fix a bug, but it simplifies the
11608 code away from its former Hollerith-constant appearance, and it's
11609 one less 'int' to worry about when looking at integer-overflow issues.
11610 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
11612 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
11613 This didn't break anything, but it didn't help either.
11614 It's confusing to put a bogus integer in a place where the actual
11615 value does not matter.
11616 (LIST_END_P): Remove unused macro and its bogus comment.
11617 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
11619 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
11620 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
11622 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
11623 We prefer signed types, and the value cannot exceed the EMACS_INT
11624 range anyway (because otherwise the length would not be representable).
11625 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
11626 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
11627 This avoids a GCC warning when WIDE_EMACS_INT.
11629 * indent.c (sane_tab_width): New function.
11630 (current_column, scan_for_column, Findent_to, position_indentation)
11631 (compute_motion): Use it. This is just for clarity.
11632 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
11634 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
11636 * lisp.h (lint_assume): New macro.
11637 * composite.c (composition_gstring_put_cache):
11638 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
11640 * editfns.c, insdel.c:
11641 Omit unnecessary forward decls, to simplify future changes.
11643 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
11645 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
11647 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
11648 Use much-faster test for byte-length change.
11649 Don't assume string byte-length fits in 'int'.
11650 Check that character arg fits in 'int'.
11651 (mapcar1): Declare byte as byte, for clarity.
11653 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
11655 * fns.c (concat): Catch string overflow earlier.
11656 Do not rely on integer wraparound.
11658 * dispextern.h (struct it.overlay_strings_charpos)
11659 (struct it.selective): Now EMACS_INT, not int.
11660 * xdisp.c (forward_to_next_line_start)
11661 (back_to_previous_visible_line_start)
11662 (reseat_at_next_visible_line_start, next_element_from_buffer):
11663 Don't arbitrarily truncate the value of 'selective' to int.
11665 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
11667 * composite.c: Don't truncate sizes to 'int'.
11668 (composition_gstring_p, composition_reseat_it)
11669 (composition_adjust_point): Use EMACS_INT, not int.
11670 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
11671 not EMACS_UINT, for indexes.
11673 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
11675 * buffer.c: Include <verify.h>.
11676 (struct sortvec.priority, struct sortstr.priority):
11677 Now EMACS_INT, not int.
11678 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
11679 (struct sortstr.size, record_overlay_string)
11680 (struct sortstrlist.size, struct sortlist.used):
11681 Don't truncate size to int.
11682 (record_overlay_string): Check for size-calculation overflow.
11683 (init_buffer_once): Check at compile-time, not run-time.
11685 2011-06-22 Jim Meyering <meyering@redhat.com>
11687 Don't leak an XBM-image-sized buffer
11688 * image.c (xbm_load): Free the image buffer after using it.
11690 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
11693 * composite.c (find_automatic_composition): Omit needless 'return 0;'
11694 that Sun C diagnosed.
11695 * fns.c (secure_hash): Fix pointer signedness issue.
11696 * intervals.c (static_offset_intervals): New function.
11697 (offset_intervals): Use it.
11699 2011-06-21 Leo Liu <sdl.web@gmail.com>
11702 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
11705 * fns.c (secure_hash): Rename from crypto_hash_function and change
11706 the first arg to accept symbols.
11707 (Fsecure_hash): New primitive.
11708 (syms_of_fns): New symbols.
11710 2011-06-20 Deniz Dogan <deniz@dogan.se>
11712 * process.c (Fset_process_buffer): Clarify return value in
11715 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
11717 * dispnew.c (add_window_display_history): Use BVAR.
11719 * xdisp.c (debug_method_add): Use BVAR.
11720 (check_window_end, dump_glyph_matrix, dump_glyph)
11721 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
11723 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
11726 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
11727 check till after the cache is created in init_frame_faces.
11729 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
11731 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
11733 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
11735 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
11736 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
11737 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
11739 Improve buffer-overflow checking (Bug#8873).
11740 * fileio.c (Finsert_file_contents):
11741 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
11742 Remove the old (too-loose) buffer overflow checks.
11743 They weren't needed, since make_gap checks for buffer overflow.
11744 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
11745 The old code merely checked for Emacs fixnum overflow, and relied
11746 on undefined (wraparound) behavior. The new code avoids undefined
11747 behavior, and also checks for ptrdiff_t and/or size_t overflow.
11749 * editfns.c (Finsert_char): Don't dump core with very negative counts.
11750 Tune. Don't use wider integers than needed. Don't use alloca.
11751 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
11753 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
11755 * insdel.c, lisp.h (buffer_overflow): New function.
11756 (insert_from_buffer_1, replace_range, replace_range_2):
11757 * insdel.c (make_gap_larger):
11758 * editfns.c (Finsert_char):
11759 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
11761 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
11763 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
11765 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
11767 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
11768 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
11770 * fileio.c: Don't assume EMACS_INT fits in off_t.
11771 (emacs_lseek): New static function.
11772 (Finsert_file_contents, Fwrite_region): Use it.
11773 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
11775 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
11777 * fns.c: Don't overflow int when computing a list length.
11778 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
11779 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
11780 truncation on 64-bit hosts. Check for QUIT every
11781 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
11782 faster and is responsive enough.
11783 (Flength): Report an error instead of overflowing an integer.
11784 (Fsafe_length): Return a float if the value is not representable
11785 as a fixnum. This shouldn't happen except in contrived situations.
11786 (Fnthcdr, Fsort): Don't assume list length fits in int.
11787 (Fcopy_sequence): Don't assume vector length fits in int.
11789 * alloc.c: Check that resized vectors' lengths fit in fixnums.
11790 (header_size, word_size): New constants.
11791 (allocate_vectorlike): Don't check size overflow here.
11792 (allocate_vector): Check it here instead, since this is the only
11793 caller of allocate_vectorlike that could cause overflow.
11794 Check that the new vector's length is representable as a fixnum.
11796 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
11797 The previous code was bogus. For example, next_almost_prime (32)
11798 returned 39, which is undesirable as it is a multiple of 3; and
11799 next_almost_prime (24) returned 25, which is a multiple of 5 so
11800 why was the code bothering to check for multiples of 7?
11802 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
11804 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
11806 Variadic C functions now count arguments with ptrdiff_t.
11807 This partly undoes my 2011-03-30 change, which replaced int with size_t.
11808 Back then I didn't know that the Emacs coding style prefers signed int.
11809 Also, in the meantime I found a few more instances where arguments
11810 were being counted with int, which may truncate counts on 64-bit
11811 machines, or EMACS_INT, which may be unnecessarily wide.
11812 * lisp.h (struct Lisp_Subr.function.aMANY)
11813 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
11814 Arg counts are now ptrdiff_t, not size_t.
11815 All variadic functions and their callers changed accordingly.
11816 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
11817 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
11818 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
11819 * callint.c (Fcall_interactively): Check arg count for overflow,
11820 to avoid potential buffer overrun. Use signed char, not 'int',
11821 for 'varies' array, so that we needn't bother to check its size
11822 calculation for overflow.
11823 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
11824 * eval.c (apply_lambda):
11825 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
11826 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
11827 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
11829 * callint.c (Fcall_interactively): Don't use index var as event count.
11831 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
11832 * mem-limits.h (SIZE): Remove; no longer used.
11834 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
11836 Remove unnecessary casts.
11837 * xterm.c (x_term_init):
11838 * xfns.c (x_set_border_pixel):
11839 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
11840 These aren't needed now that we assume ANSI C.
11842 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
11843 It's more likely to cause problems (due to unsigned overflow)
11846 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
11848 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
11850 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
11852 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
11854 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
11856 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
11858 GLYPH_CODE_FACE returns EMACS_INT, not int.
11859 * dispextern.h (merge_faces):
11860 * xfaces.c (merge_faces):
11861 * xdisp.c (get_next_display_element, next_element_from_display_vector):
11862 Don't assume EMACS_INT fits in int.
11864 * character.h (CHAR_VALID_P): Remove unused parameter.
11865 * fontset.c, lisp.h, xdisp.c: All uses changed.
11867 * editfns.c (Ftranslate_region_internal): Omit redundant test.
11869 * fns.c (concat): Minor tuning based on overflow analysis.
11870 This doesn't fix any bugs. Use int to hold character, instead
11871 of constantly refetching from Emacs object. Use XFASTINT, not
11872 XINT, for value known to be a character. Don't bother comparing
11873 a single byte to 0400, as it's always less.
11875 * floatfns.c (Fexpt):
11876 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
11878 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
11881 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
11883 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
11884 Without this fix, on a 64-bit host (aset S 0 4294967386) would
11885 incorrectly succeed when S was a string, because 4294967386 was
11886 truncated before it was used.
11888 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
11889 Otherwise, an out-of-range integer could cause undefined behavior
11892 * composite.c: Use int, not EMACS_INT, for characters.
11893 (fill_gstring_body, composition_compute_stop_pos): Use int, not
11894 EMACS_INT, for values that are known to be in character range.
11895 This doesn't fix any bugs but is the usual style inside Emacs and
11896 may generate better code on 32-bit machines.
11898 Make sure a 64-bit char is never passed to ENCODE_CHAR.
11899 This is for reasons similar to the recent CHAR_STRING fix.
11900 * charset.c (Fencode_char): Check that character arg is actually
11901 a character. Pass an int to ENCODE_CHAR.
11902 * charset.h (ENCODE_CHAR): Verify that the character argument is no
11903 wider than 'int', as a compile-time check to prevent future regressions
11906 * character.c (char_string): Remove unnecessary casts.
11908 Make sure a 64-bit char is never passed to CHAR_STRING.
11909 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
11910 by silently ignoring the top 32 bits, allowing some values
11911 that were far too large to be valid characters.
11912 * character.h: Include <verify.h>.
11913 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
11914 arguments are no wider than unsigned, as a compile-time check
11915 to prevent future regressions in this area.
11917 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
11918 (Fsubst_char_in_region):
11920 * xdisp.c (decode_mode_spec_coding):
11921 Adjust to CHAR_STRING's new requirement.
11922 * editfns.c (Finsert_char, Fsubst_char_in_region):
11923 * fns.c (concat): Check that character args are actually
11924 characters. Without this test, these functions did the wrong
11925 thing with wildly out-of-range values on 64-bit hosts.
11927 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
11928 These casts should not be needed on 32-bit hosts, either.
11929 * keyboard.c (read_char):
11930 * lread.c (Fload): Remove casts to unsigned.
11932 * lisp.h (UNSIGNED_CMP): New macro.
11933 This fixes comparison bugs on 64-bit hosts.
11934 (ASCII_CHAR_P): Use it.
11935 * casefiddle.c (casify_object):
11936 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
11937 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
11938 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
11939 * dispextern.h (FACE_FROM_ID):
11940 * keyboard.c (read_char): Use UNSIGNED_CMP.
11942 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
11943 not to EMACS_INT, to avoid GCC warning.
11945 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
11947 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
11948 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
11949 isn't needed on 32-bit machines.
11951 * buffer.c (Fgenerate_new_buffer_name):
11952 Use EMACS_INT for count, not int.
11953 (advance_to_char_boundary): Return EMACS_INT, not int.
11955 * data.c (Qcompiled_function): Now static.
11957 * window.c (window_body_lines): Now static.
11959 * image.c (gif_load): Rename local to avoid shadowing.
11961 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
11962 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
11963 * alloc.c (make_save_value): Integer argument is now of type
11964 ptrdiff_t, not int.
11965 (mark_object): Use ptrdiff_t, not int.
11966 * lisp.h (pD): New macro.
11967 * print.c (print_object): Use it.
11969 * alloc.c: Use EMACS_INT, not int, to count objects.
11970 (total_conses, total_markers, total_symbols, total_vector_size)
11971 (total_free_conses, total_free_markers, total_free_symbols)
11972 (total_free_floats, total_floats, total_free_intervals)
11973 (total_intervals, total_strings, total_free_strings):
11974 Now EMACS_INT, not int. All uses changed.
11975 (Fgarbage_collect): Compute overall total using a double, so that
11976 integer overflow is less likely to be a problem. Check for overflow
11977 when converting back to an integer.
11978 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
11979 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
11980 These were 'int' variables that could overflow on 64-bit hosts;
11981 they were never used, so remove them instead of repairing them.
11982 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
11983 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
11984 Previously, this ceilinged at INT_MAX, but that doesn't work on
11986 (allocate_pseudovector): Don't use EMACS_INT when int would do.
11988 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
11989 (allocate_vectorlike): Check for ptrdiff_t overflow.
11990 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
11991 when a (possibly-narrower) signed value would do just as well.
11992 We prefer using signed arithmetic, to avoid comparison confusion.
11994 * alloc.c: Catch some string size overflows that we were missing.
11995 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
11996 for convenience in STRING_BYTES_MAX.
11997 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
11998 The definition here is exact; the one in lisp.h was approximate.
11999 (allocate_string_data): Check for string overflow. This catches
12000 some instances we weren't catching before. Also, it catches
12001 size_t overflow on (unusual) hosts where SIZE_MAX <= min
12002 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
12003 and ptrdiff_t and EMACS_INT are both 64 bits.
12005 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
12006 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
12007 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
12009 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
12011 * alloc.c (Fmake_string): Check for out-of-range init.
12013 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
12015 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
12017 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
12019 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
12020 xg_get_default_scrollbar_width.
12022 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
12023 (int_gtk_range_get_value): Move to the scroll bar part of the file.
12024 (style_changed_cb): Call update_theme_scrollbar_width and call
12025 x_set_scroll_bar_default_width and xg_frame_set_char_size for
12026 all frames (Bug#8505).
12027 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
12028 Call gtk_window_set_resizable if HAVE_GTK3.
12029 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
12030 and height if HAVE_GTK3 (Bug#8505).
12031 (scroll_bar_width_for_theme): New variable.
12032 (update_theme_scrollbar_width): New function.
12033 (xg_get_default_scrollbar_width): Move code to
12034 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
12035 (xg_initialize): Call update_theme_scrollbar_width.
12037 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
12039 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
12041 2011-06-12 Martin Rudalics <rudalics@gmx.at>
12043 * frame.c (make_frame): Call other_buffer_safely instead of
12046 * window.c (temp_output_buffer_show): Call display_buffer with
12047 second argument Vtemp_buffer_show_specifiers and reset latter
12048 immediately after the call.
12049 (Vtemp_buffer_show_specifiers): New variable.
12050 (auto_window_vscroll_p, next_screen_context_lines)
12051 (Vscroll_preserve_screen_position): Remove leading asterisks from
12054 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
12056 Fix minor problems found by GCC 4.6.0 static checking.
12057 * buffer.c (Qclone_number): Remove for now, as it's unused.
12058 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
12059 (record_buffer): Remove unused local.
12060 * frame.c (other_visible_frames, frame_buffer_list): Now static.
12061 (set_frame_buffer_list): Remove; unused.
12062 * frame.h (other_visible_frames): Remove decl.
12063 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
12064 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
12065 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
12067 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
12068 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
12069 Define only if HAVE_GPM.
12070 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
12071 (update_hints_inhibit): Remove; never set. All uses removed.
12072 * widgetprv.h (emacsFrameClassRec): Remove decl.
12073 * window.c (delete_deletable_window): Now returns void, since it
12074 wasn't returning anything.
12075 (compare_window_configurations): Remove unused locals.
12076 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
12077 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
12078 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
12079 the same widths as pointers. This follows up on the 2011-05-06 patch.
12080 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
12081 * xterm.h: Likewise.
12082 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
12084 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
12086 * makefile.w32-in: Update dependencies.
12087 (LISP_H): Add lib/intprops.h.
12089 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
12091 * image.c (gif_load): Add animation frame delay to the metadata.
12092 (syms_of_image): Use DEFSYM. New symbol `delay'.
12094 2011-06-11 Martin Rudalics <rudalics@gmx.at>
12096 * window.c (delete_deletable_window): Re-add.
12097 (Fset_window_configuration): Rewrite to handle dead buffers and
12098 consequently deletable windows.
12099 (window_tree, Fwindow_tree): Remove. Supply functionality in
12101 (compare_window_configurations): Simplify code.
12103 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
12105 * image.c (imagemagick_load_image): Fix type mismatch.
12106 (Fimagemagick_types): Likewise.
12108 * window.h (replace_buffer_in_windows): Declare.
12110 2011-06-11 Martin Rudalics <rudalics@gmx.at>
12112 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
12113 Qclone_number. Remove external declaration of Qdelete_window.
12114 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
12116 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
12117 Run Qbuffer_list_update_hook if allowed.
12118 (Fother_buffer): Rewrite doc-string. Major rewrite for new
12119 buffer list implementation.
12120 (other_buffer_safely): New function.
12121 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
12122 calls to replace_buffer_in_windows and
12123 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
12125 (record_buffer): Inhibit quitting and rewrite using quittable
12126 functions. Run Qbuffer_list_update_hook if allowed.
12127 (Frecord_buffer, Funrecord_buffer): New functions.
12128 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
12129 Move switch-to-buffer to window.el.
12130 (bury-buffer): Move to window.el.
12131 (Vbuffer_list_update_hook): New variable.
12133 * lisp.h (other_buffer_safely): Add prototype in buffer.c
12136 * window.h (resize_frame_windows): Move up in code.
12137 (Fwindow_frame): Remove EXFUN.
12138 (replace_buffer_in_all_windows): Remove prototype.
12139 (replace_buffer_in_windows_safely): Add prototype.
12141 * window.c: Declare Qdelete_window static again. Move down
12142 declaration of select_count.
12143 (Fnext_window, Fprevious_window): Rewrite doc-strings.
12144 (Fother_window): Move to window.el.
12145 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
12146 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
12147 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
12149 (replace_buffer_in_windows): Implement by calling
12150 Qreplace_buffer_in_windows.
12151 (replace_buffer_in_all_windows): Remove with some functionality
12152 moved into replace_buffer_in_windows_safely.
12153 (replace_buffer_in_windows_safely): New function.
12154 (select_window_norecord, select_frame_norecord): Move in front
12155 of run_window_configuration_change_hook. Remove now obsolete
12157 (Fset_window_buffer): Rewrite doc-string.
12158 Call Qrecord_window_buffer.
12159 (keys_of_window): Move binding for other-window to window.el.
12161 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
12163 * dispextern.h (struct image): Replace data member, whose int_val
12164 and ptr_val fields were not used by anything, with a single
12167 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
12168 (gif_clear_image, gif_load, imagemagick_load_image)
12169 (gs_clear_image, gs_load): Callers changed.
12171 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
12173 * buffer.h: Include <time.h>, for time_t.
12174 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
12176 Fix minor problems found by static checking.
12178 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
12180 Make identifiers static if they are not used in other modules.
12181 * data.c (Qcompiled_function, Qframe, Qvector):
12182 * image.c (QimageMagick, Qsvg):
12183 * minibuf.c (Qmetadata):
12184 * window.c (resize_window_check, resize_root_window): Now static.
12185 * window.h (resize_window_check, resize_root_window): Remove decls.
12187 * window.c (window_deletion_count, delete_deletable_window):
12189 (window_body_lines): Now static.
12190 (Fdelete_other_windows_internal): Mark vars as initialized.
12191 Make sure 'resize_failed' is initialized.
12192 (run_window_configuration_change_hook): Rename local to avoid shadowing.
12193 (resize_window_apply): Remove unused local.
12194 * window.h (delete_deletable_window): Remove decl.
12196 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
12197 (imagemagick_load_image): Fix pointer signedness problem by changing
12198 last arg from unsigned char * to char *. All uses changed.
12199 Also, fix a local for similar reasons.
12200 Remove unused locals. Remove locals to avoid shadowing.
12201 (fn_rsvg_handle_free): Remove; unused.
12202 (svg_load, svg_load_image): Fix pointer signedness problem.
12203 (imagemagick_load_image): Don't use garbage pointer image_wand.
12205 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
12207 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
12209 * image.c (gif_load): Fix omitted cast error introduced by
12212 2011-06-10 Martin Rudalics <rudalics@gmx.at>
12214 * window.h (resize_proportionally, orig_total_lines)
12215 (orig_top_line): Remove from window structure.
12216 (set_window_height, set_window_width, change_window_heights)
12217 (Fdelete_window): Remove prototypes.
12218 (resize_frame_windows): Remove duplicate declaration.
12220 2011-06-10 Eli Zaretskii <eliz@gnu.org>
12222 * window.h (resize_frame_windows, resize_window_check)
12223 (delete_deletable_window, resize_root_window)
12224 (resize_frame_windows): Declare prototypes.
12226 * window.c (resize_window_apply): Make definition be "static" to
12227 match the prototype.
12229 2011-06-10 Martin Rudalics <rudalics@gmx.at>
12231 * window.c: Remove declarations of Qwindow_size_fixed,
12232 window_min_size_1, window_min_size_2, window_min_size,
12233 size_window, window_fixed_size_p, enlarge_window, delete_window.
12234 Remove static from declaration of Qdelete_window, it's
12235 temporarily needed by Fbury_buffer.
12236 (replace_window): Don't assign orig_top_line and
12238 (Fdelete_window, delete_window): Remove. Window deletion is
12239 handled by window.el.
12240 (window_loop): Remove DELETE_OTHER_WINDOWS case.
12241 Replace Fdelete_window calls with calls to Qdelete_window.
12242 (Fdelete_other_windows): Remove. Deleting other windows is
12243 handled by window.el.
12244 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
12245 handled in window.el.
12246 (window_min_size_2, window_min_size_1, window_min_size): Remove.
12247 Window minimum sizes are handled in window.el.
12248 (shrink_windows, size_window, set_window_height)
12249 (set_window_width, change_window_heights, window_height)
12250 (window_width, CURBEG, CURSIZE, enlarge_window)
12251 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
12252 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
12253 handled in window.el.
12254 (make_dummy_parent): Rename to make_parent_window and give it a
12255 second argument horflag.
12256 (make_window): Don't set resize_proportionally any more.
12257 (Fsplit_window): Remove. Windows are split in window.el.
12258 (save_restore_action, save_restore_orig_size)
12259 (shrink_window_lowest_first, save_restore_orig_size): Remove.
12260 Resize mini windows in window.el.
12261 (grow_mini_window, shrink_mini_window): Implement by calling
12262 Qresize_root_window_vertically, resize_window_check and
12263 resize_window_apply.
12264 (saved_window, Fset_window_configuration, save_window_save):
12265 Do not handle orig_top_line, orig_total_lines, and
12266 resize_proportionally.
12267 (window_min_height, window_min_width): Move to window.el.
12268 (keys_of_window): Move bindings for delete-other-windows,
12269 split-window, delete-window and enlarge-window to window.el.
12271 * buffer.c: Temporarily extern Qdelete_window.
12272 (Fbury_buffer): Temporarily call Qdelete_window instead of
12273 Fdelete_window (Fbury_buffer will move to window.el soon).
12275 * frame.c (set_menu_bar_lines_1): Remove code handling
12276 orig_top_line and orig_total_lines.
12278 * dispnew.c (adjust_frame_glyphs_initially): Don't use
12279 set_window_height but set heights directly.
12280 (change_frame_size_1): Use resize_frame_windows.
12282 * xdisp.c (init_xdisp): Don't use set_window_height but set
12285 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
12286 Use resize_frame_windows instead of change_window_heights and run
12287 run_window_configuration_change_hook.
12289 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
12290 instead of change_window_heights and run
12291 run_window_configuration_change_hook.
12293 2011-06-09 Martin Rudalics <rudalics@gmx.at>
12295 * window.c (replace_window): Rename second argument REPLACEMENT to
12296 NEW. New third argument SETFLAG. Rewrite.
12297 (delete_window, make_dummy_parent): Call replace_window with
12299 (window_list_1): Move down in code.
12300 (run_window_configuration_change_hook): Move set_buffer part
12301 before select_frame_norecord part in order to unwind correctly.
12302 Rename count1 to count.
12303 (recombine_windows, delete_deletable_window, resize_root_window)
12304 (Fdelete_other_windows_internal)
12305 (Frun_window_configuration_change_hook, make_parent_window)
12306 (resize_window_check, resize_window_apply, Fresize_window_apply)
12307 (resize_frame_windows, Fsplit_window_internal)
12308 (Fdelete_window_internal, Fresize_mini_window_internal):
12310 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
12312 2011-06-08 Martin Rudalics <rudalics@gmx.at>
12314 * window.h (window): Add some new members to window structure -
12315 normal_lines, normal_cols, new_total, new_normal, clone_number,
12316 splits, nest, prev_buffers, next_buffers.
12317 (WINDOW_TOTAL_SIZE): Move here from window.c.
12318 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
12320 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
12322 (make_dummy_parent): Set new members of windows structure.
12323 (make_window): Move down in code. Handle new members of window
12325 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
12326 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
12327 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
12328 (Fset_window_prev_buffers, Fwindow_next_buffers)
12329 (Fset_window_next_buffers, Fset_window_clone_number):
12331 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
12332 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
12334 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
12335 Argument WINDOW can be now internal window too.
12336 (Fwindow_use_time): Move up in code.
12337 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
12338 Rewrite doc-string.
12339 (Fset_window_configuration, saved_window)
12340 (Fcurrent_window_configuration, save_window_save): Handle new
12341 members of window structure.
12342 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
12343 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
12344 (syms_of_window): New Lisp objects Qrecord_window_buffer,
12345 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
12346 Qget_mru_window, Qresize_root_window,
12347 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
12348 Qauto_buffer_name; staticpro them.
12350 2011-06-07 Martin Rudalics <rudalics@gmx.at>
12352 * window.c (Fwindow_total_size, Fwindow_left_column)
12353 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
12354 (Fwindow_list_1): New functions.
12355 (window_box_text_cols): Replace with window_body_cols.
12356 (Fwindow_width, Fscroll_left, Fscroll_right):
12357 Use window_body_cols instead of window_box_text_cols.
12358 (delete_window, Fset_window_configuration):
12359 Call delete_all_subwindows with window as argument.
12360 (delete_all_subwindows): Take a window as argument and not a
12361 structure. Rewrite.
12362 (window_loop): Remove handling of GET_LRU_WINDOW and
12363 GET_LARGEST_WINDOW.
12364 (Fget_lru_window, Fget_largest_window): Move to window.el.
12366 * window.h: Extern window_body_cols instead of
12367 window_box_text_cols. delete_all_subwindows now takes a
12368 Lisp_Object as argument.
12370 * indent.c (compute_motion, Fcompute_motion):
12371 Use window_body_cols instead of window_box_text_cols.
12373 * frame.c (delete_frame): Call delete_all_subwindows with root
12374 window as argument.
12376 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
12378 * fns.c (Fputhash): Document return value.
12380 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
12382 * image.c (gif_load): Implement gif89a spec "no disposal" method.
12384 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12386 Cons<->int and similar integer overflow fixes (Bug#8794).
12388 Check for overflow when converting integer to cons and back.
12389 * charset.c (Fdefine_charset_internal, Fdecode_char):
12390 Use cons_to_unsigned to catch overflow.
12391 (Fencode_char): Use INTEGER_TO_CONS.
12392 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
12393 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
12394 * data.c (long_to_cons, cons_to_long): Remove.
12395 (cons_to_unsigned, cons_to_signed): New functions.
12396 These signal an error for invalid or out-of-range values.
12397 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
12398 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
12399 * font.c (Ffont_variation_glyphs):
12400 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
12401 * lisp.h: Include <intprops.h>.
12402 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
12403 (cons_to_signed, cons_to_unsigned): New decls.
12404 (long_to_cons, cons_to_long): Remove decls.
12405 * undo.c (record_first_change): Use INTEGER_TO_CONS.
12406 (Fprimitive_undo): Use CONS_TO_INTEGER.
12407 * xfns.c (Fx_window_property): Likewise.
12408 * xselect.c: Include <limits.h>.
12409 (x_own_selection, selection_data_to_lisp_data):
12410 Use INTEGER_TO_CONS.
12411 (x_handle_selection_request, x_handle_selection_clear)
12412 (x_get_foreign_selection, Fx_disown_selection_internal)
12413 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
12414 (lisp_data_to_selection_data): Use cons_to_unsigned.
12415 (x_fill_property_data): Use cons_to_signed.
12416 Report values out of range.
12418 Check for buffer and string overflow more precisely.
12419 * buffer.h (BUF_BYTES_MAX): New macro.
12420 * lisp.h (STRING_BYTES_MAX): New macro.
12421 * alloc.c (Fmake_string):
12422 * character.c (string_escape_byte8):
12423 * coding.c (coding_alloc_by_realloc):
12424 * doprnt.c (doprnt):
12425 * editfns.c (Fformat):
12427 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
12428 since they may not be the same number.
12429 * editfns.c (Finsert_char):
12430 * fileio.c (Finsert_file_contents):
12431 Likewise for BUF_BYTES_MAX.
12433 * image.c: Use ptrdiff_t, not int, for sizes.
12434 (slurp_file): Switch from int to ptrdiff_t.
12436 (slurp_file): Check that file size fits in both size_t (for
12437 malloc) and ptrdiff_t (for sanity and safety).
12439 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
12440 if b->modtime has its maximal value.
12442 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
12444 Don't assume time_t can fit into int.
12445 * buffer.h (struct buffer.modtime): Now time_t, not int.
12446 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
12447 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
12449 Minor fixes for signed vs unsigned integers.
12450 * character.h (MAYBE_UNIFY_CHAR):
12451 * charset.c (maybe_unify_char):
12452 * keyboard.c (read_char, reorder_modifiers):
12453 XINT -> XFASTINT, since the integer must be nonnegative.
12454 * ftfont.c (ftfont_spec_pattern):
12455 * keymap.c (access_keymap, silly_event_symbol_error):
12456 XUINT -> XFASTINT, since the integer must be nonnegative.
12457 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
12458 since it makes no difference and we prefer signed.
12459 * keyboard.c (record_char): Use XUINT when all the neighbors do.
12460 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
12463 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
12465 * window.h (Fwindow_frame): Declare.
12467 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12469 * alloc.c: Simplify handling of large-request failures (Bug#8800).
12470 (SPARE_MEMORY): Always define.
12471 (LARGE_REQUEST): Remove.
12472 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
12474 2011-06-06 Martin Rudalics <rudalics@gmx.at>
12476 * lisp.h: Move EXFUNS for Fframe_root_window,
12477 Fframe_first_window and Fset_frame_selected_window to window.h.
12479 * window.h: Move EXFUNS for Fframe_root_window,
12480 Fframe_first_window and Fset_frame_selected_window here from
12483 * frame.c (Fwindow_frame, Fframe_first_window)
12484 (Fframe_root_window, Fframe_selected_window)
12485 (Fset_frame_selected_window): Move to window.c.
12486 (Factive_minibuffer_window): Move to minibuf.c.
12487 (Fother_visible_frames_p): New function.
12489 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
12491 * window.c (decode_window, decode_any_window): Move up in code.
12492 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
12493 (inhibit_frame_unsplittable): Remove unused variable.
12494 (Fwindow_buffer): Move up and rewrite doc-string.
12495 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
12496 (Fwindow_prev): New functions.
12497 (Fwindow_frame): Move here from frame.c. Accept any window as
12499 (Fframe_root_window, Fframe_first_window)
12500 (Fframe_selected_window): Move here from frame.c. Accept frame
12501 or arbitrary window as argument. Update doc-strings.
12502 (Fminibuffer_window): Move up in code.
12503 (Fwindow_minibuffer_p): Move up in code and simplify.
12504 (Fset_frame_selected_window): Move here from frame.c.
12506 (Fselected_window, select_window, Fselect_window): Move up in
12507 code. Minor doc-string fixes.
12509 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12511 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
12512 Do not assume that spare memory exists; that assumption is valid
12513 only if SYSTEM_MALLOC.
12514 (LARGE_REQUEST): New macro, so that the issue of large requests
12515 is separated from the issue of spare memory.
12517 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
12519 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
12522 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
12524 * xfns.c (x_set_scroll_bar_default_width): Move declarations
12527 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
12529 * gtkutil.c (xg_get_default_scrollbar_width): New function.
12531 * gtkutil.h: Declare xg_get_default_scrollbar_width.
12533 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
12534 min width by calling x_set_scroll_bar_default_width (Bug#8505).
12536 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
12538 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
12540 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
12542 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
12543 (x_clipboard_manager_save): Add return value.
12544 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
12545 New error handlers.
12546 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
12547 Obey Vx_select_enable_clipboard_manager. Catch errors in
12548 x_clipboard_manager_save (Bug#8779).
12549 (Vx_select_enable_clipboard_manager): New variable.
12550 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
12552 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
12554 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
12556 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12558 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
12559 in the current matrix if keep_current_p is non-zero.
12561 2011-06-04 Eli Zaretskii <eliz@gnu.org>
12563 * bidi.c (bidi_level_of_next_char): Fix last change.
12565 2011-06-03 Eli Zaretskii <eliz@gnu.org>
12567 Support bidi reordering of text covered by display properties.
12569 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
12570 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
12571 (bidi_cache_search, bidi_cache_iterator_state)
12572 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
12573 (bidi_level_of_next_char, bidi_move_to_visually_next):
12574 Support character positions inside a run of characters covered by a
12576 (bidi_paragraph_init, bidi_resolve_explicit_1)
12577 (bidi_level_of_next_char): Call bidi_fetch_char and
12578 bidi_fetch_char_advance instead of FETCH_CHAR and
12579 FETCH_CHAR_ADVANCE.
12580 (bidi_init_it): Initialize new members.
12581 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
12583 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
12584 instead of using explicit *_CHAR codes.
12585 (bidi_resolve_explicit, bidi_resolve_weak):
12586 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
12587 bidirectional text is supported only in multibyte buffers.
12588 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
12589 it to initialize the frame_window_p member of struct bidi_it.
12590 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
12591 (bidi_resolve_explicit, bidi_resolve_weak)
12592 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
12593 bidi_it->nchars is non-positive.
12594 (bidi_level_of_next_char): Don't try to lookup the cache for the
12595 next/previous character if nothing is cached there yet, or if we
12596 were just reseat()'ed to a new position.
12598 * xdisp.c (set_cursor_from_row): Set start and stop points
12599 according to the row's direction when priming the loop that looks
12600 for the glyph on which to display cursor.
12601 (single_display_spec_intangible_p): Function deleted.
12602 (display_prop_intangible_p): Reimplement to call
12603 handle_display_spec instead of single_display_spec_intangible_p.
12604 Accept 3 additional arguments needed by handle_display_spec.
12605 This fixes incorrect cursor motion across display property with complex
12606 values: lists, `(when COND...)' forms, etc.
12607 (single_display_spec_string_p): Support property values that are
12608 lists with the argument STRING its top-level element.
12609 (display_prop_string_p): Fix the condition for processing a
12610 property that is a list to be consistent with handle_display_spec.
12611 (handle_display_spec): New function, refactored from the
12612 last portion of handle_display_prop.
12613 (compute_display_string_pos): Accept additional argument
12614 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
12615 value of a `display' property is a "replacing spec".
12616 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
12617 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
12618 the display property, but just return a value indicating whether
12619 the display property will replace the characters it covers.
12620 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
12621 frame_window_p members of struct bidi_it.
12622 (compute_display_string_pos, compute_display_string_end):
12624 (push_it): Accept second argument POSITION, where pop_it should
12625 jump to continue iteration.
12626 (reseat_1): Initialize bidi_it.disp_pos.
12628 * keyboard.c (adjust_point_for_property): Adjust the call to
12629 display_prop_intangible_p to its new signature.
12631 * dispextern.h (struct bidi_it): New member frame_window_p.
12632 (bidi_init_it): Update prototypes.
12633 (display_prop_intangible_p): Update prototype.
12634 (compute_display_string_pos, compute_display_string_end):
12635 Declare prototypes.
12636 (struct bidi_it): New members nchars and disp_pos. ch_len is now
12639 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
12641 Malloc failure behavior now depends on size of allocation.
12642 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
12643 * lisp.h: Change signatures accordingly.
12644 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
12645 All callers changed. (Bug#8762)
12647 * gnutls.c: Use Emacs's memory allocators.
12648 Without this change, the gnutls library would invoke malloc etc.
12649 directly, which causes problems on non-SYNC_INPUT hosts, and which
12650 runs afoul of improving memory_full behavior. (Bug#8761)
12651 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
12652 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
12653 xfree instead of the default malloc, realloc, free.
12654 (Fgnutls_boot): No need to check for memory allocation failure,
12655 since xmalloc does that for us.
12657 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
12658 * category.c (hash_get_category_set):
12659 * ccl.c (ccl_driver):
12660 * charset.c (Fdefine_charset_internal):
12661 * charset.h (struct charset.hash_index):
12662 * composite.c (get_composition_id, gstring_lookup_cache)
12663 (composition_gstring_put_cache):
12664 * composite.h (struct composition.hash_index):
12665 * dispextern.h (struct image.hash):
12666 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
12667 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
12668 (hashfn_equal, hashfn_user_defined, make_hash_table)
12669 (maybe_resize_hash_table, hash_lookup, hash_put)
12670 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
12671 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
12672 (Fsxhash, Fgethash, Fputhash, Fmaphash):
12673 * image.c (make_image, search_image_cache, lookup_image)
12674 (xpm_put_color_table_h):
12675 * lisp.h (struct Lisp_Hash_Table):
12676 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
12677 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
12678 for hashes and hash indexes, instead of 'unsigned' and 'int'.
12679 * alloc.c (allocate_vectorlike):
12680 Check for overflow in vector size calculations.
12681 * ccl.c (ccl_driver):
12682 Check for overflow when converting EMACS_INT to int.
12683 * fns.c, image.c: Remove unnecessary static decls that would otherwise
12684 need to be updated by these changes.
12685 * fns.c (make_hash_table, maybe_resize_hash_table):
12686 Check for integer overflow with large hash tables.
12687 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
12688 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
12689 (SXHASH_REDUCE): New macro.
12690 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
12691 Use it instead of discarding useful hash info with large hash values.
12692 (sxhash_float): New function.
12693 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
12694 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
12695 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
12696 Rewrite to use FIXNUM_BITS, as this simplifies things.
12697 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
12698 Adjust signatures to match updated version of code.
12699 (consing_since_gc): Now EMACS_INT, since a single hash table can
12700 use more than INT_MAX bytes.
12702 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
12704 Make it possible to build with GCC-4.6+ -O2 -flto.
12706 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
12708 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
12710 * minibuf.c (get_minibuffer, read_minibuf_unwind):
12711 Call minibuffer-inactive-mode.
12713 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
12715 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
12716 Update dependencies.
12718 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12720 * data.c (init_data): Remove code for UTS, this system is not
12723 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12725 Don't force ./temacs to start in terminal mode.
12727 * frame.c (make_initial_frame): Initialize faces in all cases, not
12728 only when CANNOT_DUMP is defined.
12729 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
12731 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12733 * dispnew.c (add_window_display_history): Use const for the string
12734 pointer. Remove declaration, not needed.
12736 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
12738 Use 'inline', not 'INLINE'.
12739 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
12740 * alloc.c, fontset.c (INLINE): Remove.
12741 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
12742 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
12743 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
12744 * gmalloc.c (register_heapinfo): Use inline unconditionally.
12745 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
12747 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12749 Make it possible to run ./temacs.
12751 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
12752 syms_of_callproc does the same thing. Remove test for
12753 "initialized", do it in the caller.
12754 * emacs.c (main): Avoid calling set_initial_environment when dumping.
12756 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
12758 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
12759 (read_minibuf): Use get_minibuffer.
12760 (syms_of_minibuf): Use DEFSYM.
12761 (Qmetadata): New var.
12762 * data.c (Qbuffer): Don't make it static.
12763 (syms_of_data): Use DEFSYM.
12765 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
12767 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
12768 (CCL_CODE_MIN): New macro.
12770 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
12772 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
12774 * eval.c (Qdebug): Now static.
12775 * lisp.h (Qdebug): Remove decl. This reverts a part of the
12776 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
12777 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
12779 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
12781 * image.c: Various fixes to ImageMagick code comments.
12782 (Fimagemagick_types): Doc fix.
12784 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
12786 Minor fixes prompted by GCC 4.6.0 warnings.
12788 * xselect.c (converted_selections, conversion_fail_tag): Now static.
12790 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
12791 (x_clipboard_manager_save_all): Move extern decl to ...
12792 * xterm.h: ... here, so that it can be checked for consistency.
12794 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
12796 * xselect.c (x_clipboard_manager_save_frame)
12797 (x_clipboard_manager_save_all): New functions.
12798 (Fx_clipboard_manager_save): Lisp function deleted.
12800 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
12801 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
12803 * xterm.h: Update prototype.
12805 2011-05-28 William Xu <william.xwl@gmail.com>
12807 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
12808 exiting (Bug#8239).
12810 2011-05-28 Jim Meyering <meyering@redhat.com>
12812 Avoid a sign-extension bug in crypto_hash_function.
12813 * fns.c (to_uchar): Define.
12814 (crypto_hash_function): Use it to convert some newly-signed
12815 variables to unsigned, to avoid sign-extension bugs. For example,
12816 without this change, (md5 "truc") would evaluate to
12817 45723a2aff78ff4fff7fff1114760e62 rather than the expected
12818 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
12819 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
12821 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
12823 Integer overflow fixes.
12825 * dbusbind.c: Serial number integer overflow fixes.
12826 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
12827 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
12828 to hold a serial number that is too large for a fixnum.
12829 (Fdbus_method_return_internal, Fdbus_method_error_internal):
12830 Check for serial numbers out of range. Decode any serial number
12831 that was so large that it became a float. (Bug#8722)
12833 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
12834 (Fdbus_call_method, Fdbus_call_method_asynchronously):
12835 Use XFASTINT rather than XUINT when numbers are nonnegative.
12836 (xd_append_arg, Fdbus_method_return_internal):
12837 (Fdbus_method_error_internal): Likewise. Also, for unsigned
12838 arguments, check that Lisp number is nonnegative, rather than
12839 silently wrapping negative numbers around. (Bug#8722)
12840 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
12843 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
12845 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
12847 ccl: Add integer overflow checks.
12848 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
12849 (IN_INT_RANGE): New macros.
12850 (ccl_driver): Use them to check for integer overflow when
12851 decoding a CCL program. Many of the new checks are whether XINT (x)
12852 fits in int; it doesn't always, on 64-bit hosts. The new version
12853 doesn't catch all possible integer overflows, but it's an
12854 improvement. (Bug#8719)
12856 * alloc.c (make_event_array): Use XINT, not XUINT.
12857 There's no need for unsigned here.
12859 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
12860 This follows up to the 2011-05-06 change that substituted uintptr_t
12861 for EMACS_INT. This case wasn't caught back then.
12863 Rework Fformat to avoid integer overflow issues.
12864 * editfns.c: Include <float.h> unconditionally, as it's everywhere
12865 now (part of C89). Include <verify.h>.
12866 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
12867 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
12868 (Fformat): Avoid the prepass trying to compute sizes; it was only
12869 approximate and thus did not catch overflow reliably. Instead, walk
12870 through the format just once, formatting and computing sizes as we go,
12871 checking for integer overflow at every step, and allocating a larger
12872 buffer as needed. Keep track separately whether the format is
12873 multibyte. Keep only the most-recently calculated precision, rather
12874 than them all. Record whether each argument has been converted to
12875 string. Use EMACS_INT, not int, for byte and char and arg counts.
12876 Support field widths and precisions larger than INT_MAX. Avoid
12877 sprintf's undefined behavior with conversion specifications such as %#d
12878 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
12879 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
12880 formatting out-of-range floating point numbers with int
12881 formats. (Bug#8668)
12883 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
12885 * data.c: Avoid integer truncation in expressions involving floats.
12886 * data.c: Include <intprops.h>.
12887 (arith_driver): When there's an integer overflow in an expression
12888 involving floating point, convert the integers to floating point
12889 so that the resulting value does not suffer from catastrophic
12890 integer truncation. For example, on a 64-bit host (* 4
12891 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
12892 Do not rely on undefined behavior after integer overflow.
12894 merge count_size_as_multibyte, parse_str_to_multibyte
12895 * character.c, character.h (count_size_as_multibyte):
12896 Rename from parse_str_to_multibyte; all uses changed.
12897 Check for integer overflow.
12898 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
12899 since it's now a duplicate of the other. This is more of
12900 a character than a buffer op, so better that it's in character.c.
12901 * fns.c, print.c: Adjust to above changes.
12903 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
12905 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
12907 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
12909 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
12910 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
12911 (x_clipboard_manager_save): Now static.
12912 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
12914 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
12915 (crypto_hash_function): Now static.
12916 Fix pointer signedness problems. Avoid unnecessary initializations.
12918 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
12920 * termhooks.h (Vselection_alist): Make it terminal-local.
12922 * terminal.c (create_terminal): Initialize it.
12924 * xselect.c: Support for clipboard managers.
12925 (Vselection_alist): Move to termhooks.h as terminal-local var.
12926 (LOCAL_SELECTION): New macro.
12927 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
12928 (symbol_to_x_atom): Remove gratuitous arg.
12929 (x_handle_selection_request, lisp_data_to_selection_data)
12930 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
12931 (x_own_selection, x_get_local_selection, x_convert_selection):
12932 New arg, specifying work frame. Use terminal-local Vselection_alist.
12933 (some_frame_on_display): Delete unused function.
12934 (Fx_own_selection_internal, Fx_get_selection_internal)
12935 (Fx_disown_selection_internal, Fx_selection_owner_p)
12936 (Fx_selection_exists_p): New optional frame arg.
12937 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
12938 (x_handle_selection_clear): Don't treat other terminals with the
12939 same keyboard specially. Use the terminal-local Vselection_alist.
12940 (x_clear_frame_selections): Use Frun_hook_with_args.
12942 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
12944 * xterm.h: Add support for those atoms.
12946 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
12948 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
12949 (converted_selections, conversion_fail_tag): New global variables.
12950 (x_selection_request_lisp_error): Free the above.
12951 (x_get_local_selection): Remove unnecessary code.
12952 (x_reply_selection_request): Args changed; handle arbitrary array
12953 of converted selections stored in converted_selections.
12954 Separate the XChangeProperty and SelectionNotify steps.
12955 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
12956 (x_convert_selection): New function.
12957 (x_handle_selection_event): Simplify.
12958 (x_get_foreign_selection): Don't ignore incoming requests while
12959 waiting for an answer; this will fail when we implement
12960 SAVE_TARGETS, and seems unnecessary anyway.
12961 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
12962 (Vx_sent_selection_functions): Doc fix.
12964 2011-05-26 Leo Liu <sdl.web@gmail.com>
12966 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
12968 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12970 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
12972 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
12973 for fringe update if it has periodic bitmap.
12974 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
12975 and fringe_bitmap_periodic_p.
12977 * fringe.c (get_fringe_bitmap_data): New function.
12978 (draw_fringe_bitmap_1, update_window_fringes): Use it.
12979 (update_window_fringes): Record periodicity of fringe bitmap in glyph
12980 row. Mark glyph row for fringe update if periodicity changed.
12982 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
12983 for fringe update unless it has periodic bitmap.
12985 2011-05-25 Kenichi Handa <handa@m17n.org>
12987 * xdisp.c (get_next_display_element): Set correct it->face_id for
12988 a static composition.
12990 2011-05-24 Leo Liu <sdl.web@gmail.com>
12993 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
12995 * fns.c (crypto_hash_function, Fsha1): New function.
12996 (Fmd5): Use crypto_hash_function.
12997 (syms_of_fns): Add Ssha1.
12999 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13001 * gnutls.c: Remove unused macros.
13002 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
13003 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
13004 Remove macros that are defined and never used.
13005 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
13007 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
13009 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
13010 (Fx_get_selection_internal): Minor cleanup.
13011 (Fx_own_selection_internal): Rename arguments for consistency with
13014 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13016 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
13018 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
13020 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
13022 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13024 * dispnew.c (scrolling_window): Don't exclude the case that the
13025 last enabled row in the desired matrix touches the bottom boundary.
13027 2011-05-21 Glenn Morris <rgm@gnu.org>
13029 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
13030 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
13031 and add some more files.
13033 2011-05-20 Eli Zaretskii <eliz@gnu.org>
13035 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
13036 report_file_error introduced by the change from 2011-05-07.
13038 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
13040 * systime.h (Time): Define only if emacs is defined.
13041 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
13042 where the include path doesn't have X11/X.h by default. See
13043 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
13045 2011-05-20 Kenichi Handa <handa@m17n.org>
13047 * composite.c (find_automatic_composition): Fix previous change.
13049 2011-05-20 Glenn Morris <rgm@gnu.org>
13051 * lisp.mk: New file, split from Makefile.in.
13052 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
13053 (shortlisp): Remove.
13054 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
13056 2011-05-19 Glenn Morris <rgm@gnu.org>
13058 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
13059 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
13060 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
13061 (lisp): Set the order to that of loadup.el.
13062 (shortlisp): Make it a copy of $lisp.
13063 (SOME_MACHINE_LISP): Remove.
13064 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
13065 Use just $shortlisp, not $SOME_MACHINE_LISP too.
13067 2011-05-18 Kenichi Handa <handa@m17n.org>
13069 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
13070 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
13071 (find_automatic_composition): Mostly rewrite for efficiency.
13073 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
13075 * makefile.w32-in: Update dependencies.
13077 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
13079 * menu.c: Include limits.h (fixes the MS-Windows build broken by
13080 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
13082 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
13084 Fix some integer overflow issues, such as string length overflow.
13086 * insdel.c (count_size_as_multibyte): Check for string overflow.
13088 * character.c (lisp_string_width): Check for string overflow.
13089 Use EMACS_INT, not int, for string indexes and lengths; in
13090 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
13091 the resulting string length overflows an EMACS_INT; instead,
13092 report a string overflow if no precision given. When checking for
13093 precision exhaustion, use a check that cannot possibly have
13094 integer overflow. (Bug#8675)
13095 * character.h (lisp_string_width): Adjust to new signature.
13097 * alloc.c (string_overflow): New function.
13098 (Fmake_string): Use it. This doesn't change behavior, but saves
13099 a few bytes and will simplify future changes.
13100 * character.c (string_escape_byte8): Likewise.
13101 * lisp.h (string_overflow): New decl.
13103 Fixups, following up to the user-interface timestamp change.
13104 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
13105 for UI timestamps, instead of unsigned long.
13106 * msdos.c (mouse_get_pos): Likewise.
13107 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
13108 * w32gui.h (Time): Define by including "systime.h" rather than by
13109 declaring it ourselves. (Bug#8664)
13111 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
13112 * image.c (clear_image_cache): Likewise.
13114 * term.c (term_mouse_position): Don't assume time_t wraparound.
13116 Be more systematic about user-interface timestamps.
13117 Before, the code sometimes used 'Time', sometimes 'unsigned long',
13118 and sometimes 'EMACS_UINT', to represent these timestamps.
13119 This change causes it to use 'Time' uniformly, as that's what X uses.
13120 This makes the code easier to follow, and makes it easier to catch
13121 integer overflow bugs such as Bug#8664.
13122 * frame.c (Fmouse_position, Fmouse_pixel_position):
13123 Use Time, not unsigned long, for user-interface timestamps.
13124 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
13125 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
13126 * keyboard.h (last_event_timestamp): Likewise.
13127 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
13128 * menu.h (xmenu_show): Likewise.
13129 * term.c (term_mouse_position): Likewise.
13130 * termhooks.h (struct input_event.timestamp): Likewise.
13131 (struct terminal.mouse_position_hook): Likewise.
13132 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
13133 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
13134 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
13135 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
13136 what it was before.
13137 * menu.h, termhooks.h: Include "systime.h", for Time.
13139 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
13140 Don't assume that the difference between two unsigned long values
13141 can fit into an integer. At this point, we know button_down_time
13142 <= event->timestamp, so the difference must be nonnegative, so
13143 there's no need to cast the result if double-click-time is
13144 nonnegative, as it should be; check that it's nonnegative, just in
13145 case. This bug is triggered when events are more than 2**31 ms
13146 apart (about 25 days). (Bug#8664)
13148 * xselect.c (last_event_timestamp): Remove duplicate decl.
13149 (x_own_selection): Remove needless cast to unsigned long.
13151 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
13152 that always fit in int. Use a sentinel instead of a counter, to
13153 avoid a temp and to allay GCC's concerns about possible int overflow.
13154 * frame.h (struct frame): Use int for menu_bar_items_used
13155 instead of EMACS_INT, since it always fits in int.
13157 * menu.c (grow_menu_items): Check for int overflow.
13159 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
13161 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
13162 Before, the code was not consistent. These values cannot exceed
13163 2**31 - 1 so there's no need to make them unsigned.
13164 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
13165 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
13166 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
13168 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
13170 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
13171 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
13172 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
13173 presumably because the widths might not match.
13175 * window.c (size_window): Avoid needless test at loop start.
13177 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
13179 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
13181 2011-05-12 Drew Adams <drew.adams@oracle.com>
13183 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
13185 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13187 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
13188 `width' to `bar_area_x' and `bar_area_width', respectively.
13189 (x_scroll_run): Take account of fringe background extension.
13191 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
13192 Rename local vars `left' and `width' to `bar_area_x' and
13193 `bar_area_width', respectively.
13194 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
13195 background extension.
13197 2011-05-10 Jim Meyering <meyering@redhat.com>
13199 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
13201 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
13203 * image.c (Finit_image_library): Return t for built-in image types,
13204 like pbm and xbm. (Bug#8640)
13206 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
13208 * w32menu.c (set_frame_menubar): Fix submenu allocation.
13210 2011-05-07 Eli Zaretskii <eliz@gnu.org>
13212 * w32console.c (Fset_screen_color): Doc fix.
13213 (Fget_screen_color): New function.
13214 (syms_of_ntterm): Defsubr it.
13216 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
13217 unlink the temporary file if Fcall_process didn't create it in the
13219 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
13220 child process will be redirected to a file specified with `:file'.
13221 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
13222 cue to call_process_cleanup not to close that handle.
13224 2011-05-07 Ben Key <bkey76@gmail.com>
13226 * makefile.w32-in: The bootstrap-temacs rule now makes use of
13227 one of two shell specific rules, either bootstrap-temacs-CMD or
13228 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
13229 to the previous implementation of the bootstrap-temacs rule.
13230 The bootstrap-temacs-CMD rule is similar to the previous
13231 implementation of the bootstrap-temacs rule except that it
13232 makes use of the ESC_CFLAGS variable instead of the CFLAGS
13235 These changes, along with some changes to nt/configure.bat,
13236 nt/gmake.defs, and nt/nmake.defs, are required to extend my
13237 earlier fix to add support for --cflags and --ldflags options
13238 that include quotes so that it works whether make uses cmd or
13241 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
13243 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
13244 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
13246 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
13247 a string. Handle both cases.
13248 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
13249 (Fdbus_register_method): Use Qinvalid_function.
13251 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
13253 * makefile.w32-in: Update dependencies.
13254 (LISP_H): Add inttypes.h and stdin.h.
13255 (PROCESS_H): Add unistd.h.
13257 2011-05-06 Eli Zaretskii <eliz@gnu.org>
13259 * lread.c: Include limits.h (fixes the MS-Windows build broken by
13260 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
13262 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
13264 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
13266 * term.c (vfatal): Remove stray call to va_end.
13267 It's not needed and the C Standard doesn't allow it here anyway.
13269 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
13270 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
13272 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
13275 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
13277 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13279 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
13281 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
13283 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
13285 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
13286 * charset.c (Fdefine_charset_internal): Don't initialize
13287 charset.code_space[15]. The value was garbage, on hosts with
13288 32-bit int (Bug#8600).
13290 * lread.c (read_integer): Be more consistent with string-to-number.
13291 Use string_to_number to do the actual conversion; this avoids
13292 rounding errors and fixes some other screwups. Without this fix,
13293 for example, #x1fffffffffffffff was misread as -2305843009213693952.
13294 (digit_to_number): Move earlier, for benefit of read_integer.
13295 Return -1 if the digit is out of range for the base, -2 if it is
13296 not a digit in any supported base. (Bug#8602)
13298 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
13300 * dispnew.c (scrolling_window): Return 1 if we scrolled,
13301 to match comment at start of function. This also removes a
13302 GCC warning about overflow in a 32+64-bit port.
13304 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
13306 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
13307 Reported by Stefan Monnier in
13308 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
13309 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
13310 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
13312 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
13313 (EMACS_UINTPTR): Likewise, with uintptr_t.
13315 * lisp.h: Prefer 64-bit EMACS_INT if available.
13316 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
13317 on 32-bit hosts that have 64-bit int, so that they can access
13319 However, temporarily disable this change unless the temporary
13320 symbol WIDE_EMACS_INT is defined.
13322 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
13324 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
13325 This removes an assumption that EMACS_INT and long are the same
13326 width as pointers. The assumption is true for Emacs porting targets
13327 now, but we want to make other targets possible.
13328 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
13329 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
13330 In the rest of the code, change types of integers that hold casted
13331 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
13332 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
13333 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
13334 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
13335 No need to cast type when ORing.
13336 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
13337 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
13338 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
13339 assume EMACS_INT is the same width as char *.
13340 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
13341 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
13342 Remove no-longer-needed casts.
13343 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
13344 (xg_tool_bar_help_callback, xg_make_tool_item):
13345 Use EMACS_INTPTR to hold an integer
13346 that will be cast to void *; this can avoid a GCC warning
13347 if EMACS_INT is not the same width as void *.
13348 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
13349 * xdisp.c (display_echo_area_1, resize_mini_window_1):
13350 (current_message_1, set_message_1):
13351 Use a local to convert to proper width without a cast.
13352 * xmenu.c (dialog_selection_callback): Likewise.
13354 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
13355 Also, don't assume VALBITS / RAND_BITS is less than 5,
13356 and don't rely on undefined behavior when shifting a 1 left into
13358 * lisp.h (get_random): Change signature to match.
13360 * lread.c (hash_string): Use size_t, not int, for hash computation.
13361 Normally we prefer signed values; but hashing is special, because
13362 it's better to use unsigned division on hash table sizes so that
13363 the remainder is nonnegative. Also, size_t is the natural width
13364 for hashing into memory. The previous code used 'int', which doesn't
13365 retain enough info to hash well into very large tables.
13366 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
13368 * dbusbind.c: Don't possibly lose pointer info when converting.
13369 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
13370 Use XPNTR rather than XHASH, so that the high-order bits of
13371 the pointer aren't lost when converting through void *.
13373 * eval.c (Fautoload): Don't double-shift a pointer.
13375 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
13377 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
13379 * gnutls.c (DEF_GNUTLS_FN):
13380 * image.c (DEF_IMGLIB_FN): Make function pointers static.
13382 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
13384 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
13387 2011-05-05 Eli Zaretskii <eliz@gnu.org>
13389 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
13390 New version that can reserve upto 2GB of heap space.
13392 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
13394 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
13396 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
13398 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
13399 `gnutls_certificate_set_x509_key_file'.
13401 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
13403 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
13404 Update dependencies.
13406 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
13408 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
13409 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
13410 Remove unused parameter `fildes'.
13411 * process.c (read_process_output, send_process): Don't pass it.
13413 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
13415 Fix previous change: the library cache is defined in w32.c.
13416 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
13417 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
13419 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
13421 Implement dynamic loading of GnuTLS on Windows.
13423 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
13424 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
13425 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13428 * gnutls.c (Qgnutls_dll): Define.
13429 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
13430 (gnutls_*): Declare function pointers.
13431 (init_gnutls_functions): New function to initialize function pointers.
13432 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
13433 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
13434 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13435 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
13436 (emacs_gnutls_write, emacs_gnutls_read)
13437 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
13438 (Fgnutls_available_p): New function.
13439 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
13440 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
13441 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
13443 * image.c: Include w32.h.
13444 (Vimage_type_cache): Delete.
13445 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
13446 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
13447 (w32_delayed_load): Move to w32.c.
13449 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
13451 * w32.c (QCloaded_from, Vlibrary_cache): Define.
13452 (w32_delayed_load): Move from image.c. When loading a library, record
13453 its filename in the :loaded-from property of the library id.
13454 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
13455 Initialize and staticpro them.
13456 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
13458 * process.c: Include lisp.h before w32.h, not after.
13459 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
13460 instead of gnutls_record_check_pending.
13462 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
13464 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
13466 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
13467 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
13470 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
13472 * xterm.c (x_set_frame_alpha): Do not set property on anything
13473 else than FRAME_X_OUTER_WINDOW (Bug#8608).
13475 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
13477 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
13479 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
13481 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
13482 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
13483 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
13484 (gnutls_global_initialized, Qgnutls_bootprop_priority)
13485 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
13486 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
13487 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
13488 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
13489 (Qgnutls_bootprop_callbacks_verify): Make static.
13491 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
13493 * callproc.c: Indentation fixup.
13495 * sysdep.c (wait_for_termination_1): Make static.
13496 (wait_for_termination, interruptible_wait_for_termination):
13497 Move after wait_for_termination_1.
13499 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
13501 * sysdep.c (interruptible_wait_for_termination): New function
13502 which is like wait_for_termination, but allows keyboard
13505 * callproc.c (Fcall_process): Add (:file "file") as an option for
13507 (Fcall_process_region): Ditto.
13509 2011-04-30 Eli Zaretskii <eliz@gnu.org>
13511 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
13512 rather than `XVECTOR (FOO)->size'.
13514 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
13515 inttypes.h, as a gnulib replacement is used if it not available in
13518 2011-04-21 Eli Zaretskii <eliz@gnu.org>
13520 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
13521 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
13522 of MOST_POSITIVE_FIXNUM. (Bug#8528)
13524 * coding.c (coding_alloc_by_realloc): Error out if destination
13525 will grow beyond MOST_POSITIVE_FIXNUM.
13526 (decode_coding_emacs_mule): Abort if there isn't enough place in
13527 charbuf for the composition carryover bytes. Reserve an extra
13528 space for up to 2 characters produced in a loop.
13529 (decode_coding_iso_2022): Abort if there isn't enough place in
13530 charbuf for the composition carryover bytes.
13532 2011-04-21 Eli Zaretskii <eliz@gnu.org>
13534 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
13535 aborting when %lld or %lll format is passed.
13536 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
13537 %llo or %llx format is passed. (Bug#8545)
13539 * window.c (window_scroll_line_based): Use a marker instead of
13540 simple variables to record original value of point. (Bug#7952)
13542 * doprnt.c (doprnt): Fix the case where a multibyte sequence
13543 produced by %s or %c overflows available buffer space. (Bug#8545)
13545 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
13547 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
13548 (SIZE_MAX): Move defn after all includes, as they might #define it.
13550 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
13552 * w32.c (init_environment): Warn about defaulting HOME to C:\.
13554 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
13556 * keyboard.c (Qdelayed_warnings_hook): Define.
13557 (command_loop_1): Run `delayed-warnings-hook'
13558 if Vdelayed_warnings_list is non-nil.
13559 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
13560 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
13562 2011-04-28 Eli Zaretskii <eliz@gnu.org>
13564 * doprnt.c (doprnt): Don't return value smaller than the buffer
13565 size if the message was truncated. (Bug#8545).
13567 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
13569 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
13570 (Fx_window_property): #if-0 the whole functions, not just the bodies.
13572 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13574 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
13576 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
13578 * makefile.w32-in: Update dependencies.
13580 2011-04-27 Eli Zaretskii <eliz@gnu.org>
13582 Improve `doprnt' and its usage. (Bug#8545)
13583 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
13584 `format_end'. Remove support for %l as a conversion specifier.
13585 Don't use xrealloc. Improve diagnostics when the %l size modifier
13586 is used. Update the commentary.
13588 * eval.c (verror): Simplify calculation of size_t.
13590 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
13593 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
13595 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
13598 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13600 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
13601 This makes this file independent of the recent pseudovector change.
13603 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
13605 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
13607 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
13608 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
13609 Remove unused local.
13610 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
13612 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
13613 GCC 4.6.0 optimizes based on type-based alias analysis.
13614 For example, if b is of type struct buffer * and v of type struct
13615 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
13616 != &v->size, and therefore "v->size = 1; b->size = 2; return
13617 v->size;" must therefore return 1. This assumption is incorrect
13618 for Emacs, since it type-puns struct Lisp_Vector * with many other
13619 types. To fix this problem, this patch adds a new type struct
13620 vectorlike_header that documents the constraints on layout of vectors
13621 and pseudovectors, and helps optimizing compilers not get fooled
13622 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
13623 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
13624 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
13626 (XSETPVECTYPE): Rewrite in terms of new macro.
13627 (XSETPVECTYPESIZE): New macro, specifying both type and size.
13628 This is a bit clearer, and further avoids the possibility of
13629 undesirable aliasing.
13630 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
13631 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
13632 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
13633 since Lisp_Subr is a special case (no "next" field).
13634 (ASIZE): Now uses header.size rather than size.
13635 All previous uses of XVECTOR (foo)->size replaced to use this macro,
13636 to avoid the hassle of writing XVECTOR (foo)->header.size.
13637 (struct vectorlike_header): New type.
13638 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
13639 object, to help avoid aliasing.
13640 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
13641 (SUBRP): Likewise, since Lisp_Subr is a special case.
13642 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
13643 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
13644 (struct Lisp_Hash_Table): Combine first two members into a single
13645 struct vectorlike_header member. All uses of "size" and "next" members
13646 changed to be "header.size" and "header.next".
13647 * buffer.h (struct buffer): Likewise.
13648 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
13649 * frame.h (struct frame): Likewise.
13650 * process.h (struct Lisp_Process): Likewise.
13651 * termhooks.h (struct terminal): Likewise.
13652 * window.c (struct save_window_data, struct saved_window): Likewise.
13653 * window.h (struct window): Likewise.
13654 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
13655 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
13656 * buffer.c (init_buffer_once): Likewise.
13657 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
13659 * process.c (Fformat_network_address): Use local var for size,
13662 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
13664 Make the Lisp reader and string-to-float more consistent (Bug#8525)
13665 * data.c (atof): Remove decl; no longer used or needed.
13666 (digit_to_number): Move to lread.c.
13667 (Fstring_to_number): Use new string_to_number function, to be
13668 consistent with how the Lisp reader treats infinities and NaNs.
13669 Do not assume that floating-point numbers represent EMACS_INT
13670 without losing information; this is not true on most 64-bit hosts.
13671 Avoid double-rounding errors, by insisting on integers when
13672 parsing non-base-10 numbers, as the documentation specifies.
13673 * lisp.h (string_to_number): New decl, replacing ...
13674 (isfloat_string): Remove.
13675 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
13676 (read1): Do not accept +. and -. as integers; this
13677 appears to have been a coding error. Similarly, do not accept
13678 strings like +-1e0 as floating point numbers. Do not report
13679 overflow for integer overflows unless the base is not 10 which
13680 means we have no simple and reliable way to continue.
13681 Break out the floating-point parsing into a new
13682 function string_to_number, so that Fstring_to_number parses
13683 floating point numbers consistently with the Lisp reader.
13684 (digit_to_number): Move here from data.c. Make it static inline.
13685 (E_CHAR, EXP_INT): Remove, replacing with ...
13686 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
13687 (string_to_number): New function, replacing isfloat_string.
13688 This function checks for valid syntax and produces the resulting
13689 Lisp float number too. Rework it so that string-to-number
13690 no longer mishandles examples like "1.0e+". Use strtoumax,
13691 so that overflow for non-base-10 numbers is reported only when
13692 there's no portable and simple way to convert to floating point.
13694 * textprop.c (set_text_properties_1): Rewrite for clarity,
13695 and to avoid GCC warning about integer overflow.
13697 * intervals.h (struct interval): Use EMACS_INT for members
13698 where EMACS_UINT might cause problems. See
13699 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
13700 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
13701 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
13703 (offset_intervals): Tell GCC not to worry about length overflow
13704 when negating a negative length.
13706 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
13707 (overrun_check_free): Likewise.
13709 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
13710 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
13713 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13714 (gnutls_make_error): Rename local to avoid shadowing.
13715 (gnutls_emacs_global_deinit): ifdef out; not used.
13716 (Fgnutls_boot): Use const for pointer to readonly storage.
13717 Comment out unused local. Fix pointer signedness problems.
13719 * lread.c (openp): Don't stuff size_t into an 'int'.
13720 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
13721 about possible signed overflow.
13723 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13724 (GDK_KEY_g): Don't define if already defined.
13725 (xg_prepare_tooltip): Avoid pointer signedness problem.
13726 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
13728 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
13729 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
13731 * xfns.c (Fx_window_property): Simplify a bit,
13732 to make a bit faster and to avoid GCC 4.6.0 warning.
13733 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
13735 * fns.c (internal_equal): Don't assume size_t fits in int.
13737 * alloc.c (compact_small_strings): Tighten assertion a little.
13739 Replace pEd with more-general pI, and fix some printf arg casts.
13740 * lisp.h (pI): New macro, generalizing old pEd macro to other
13741 conversion specifiers. For example, use "...%"pI"d..." rather
13742 than "...%"pEd"...".
13743 (pEd): Remove. All uses replaced with similar uses of pI.
13744 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
13745 * alloc.c (check_pure_size): Don't overflow by converting size to int.
13746 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
13747 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
13748 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
13749 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
13750 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
13752 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
13753 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
13754 * print.c (safe_debug_print, print_object): Likewise.
13755 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
13757 Use pI instead of if-then-else-abort. Use %p to avoid casts,
13758 avoiding the 0 flag, which is not portable.
13759 * process.c (Fmake_network_process): Use pI to avoid cast.
13760 * region-cache.c (pp_cache): Likewise.
13761 * xdisp.c (decode_mode_spec): Likewise.
13762 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
13763 behavior on 64-bit hosts with printf arg.
13764 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
13765 (x_stop_queuing_selection_requests): Likewise.
13766 (x_get_window_property): Don't truncate byte count to an 'int'
13769 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
13770 here, since it parses constructs like leading '-' and spaces,
13771 which are not wanted; and it overflows with large numbers.
13772 Instead, simply match F[0-9]+, which is what is wanted anyway.
13774 * alloc.c: Remove unportable assumptions about struct layout.
13775 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
13776 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
13777 (allocate_vectorlike, make_pure_vector): Use the new macros,
13778 plus offsetof, to remove unportable assumptions about struct layout.
13779 These assumptions hold on all porting targets that I know of, but
13780 they are not guaranteed, they're easy to remove, and removing them
13781 makes further changes easier.
13783 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
13784 This doesn't fix a bug but makes the code clearer.
13785 (string_overrun_cookie): Now const. Use initializers that
13786 don't formally overflow signed char, to avoid warnings.
13787 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
13788 can cause Emacs to crash when string overrun checking is enabled.
13789 (allocate_buffer): Don't assume sizeof (struct buffer) is a
13790 multiple of sizeof (EMACS_INT); it need not be, if
13791 alignof(EMACS_INT) < sizeof (EMACS_INT).
13792 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
13794 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
13796 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
13798 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
13800 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
13801 supposed to be handshaking. (Bug#8556)
13802 Reported by Paul Eggert <eggert@cs.ucla.edu>.
13804 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
13806 * lisp.h (Qdebug): List symbol.
13807 * eval.c (Qdebug): Restore global linkage.
13808 * keyboard.c (debug-on-event): New variable.
13809 (handle_user_signal): Break into debugger when debug-on-event
13810 matches the current signal symbol.
13812 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
13814 * alloc.c (check_sblock, check_string_bytes)
13815 (check_string_free_list): Convert to standard C.
13817 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
13819 * w32.c (emacs_gnutls_push): Fix typo.
13821 2011-04-25 Eli Zaretskii <eliz@gnu.org>
13823 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
13824 "cast to pointer from integer of different size".
13826 Improve doprnt and its use in verror. (Bug#8545)
13827 * doprnt.c (doprnt): Document the set of format control sequences
13828 supported by the function. Use SAFE_ALLOCA instead of always
13831 * eval.c (verror): Don't limit the buffer size at size_max-1, that
13832 is one byte too soon. Don't use xrealloc; instead xfree and
13835 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
13837 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
13840 * gnutls.c: Renamed global_initialized to
13841 gnutls_global_initialized. Added internals for the
13842 :verify-hostname-error, :verify-error, and :verify-flags
13843 parameters of `gnutls-boot' and documented those parameters in the
13844 docstring. Start callback support.
13845 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
13846 unless a fatal error occurred. Call gnutls_alert_send_appropriate
13847 on error. Return error code.
13848 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
13849 (emacs_gnutls_read): Likewise.
13850 (Fgnutls_boot): Return handshake error code.
13851 (emacs_gnutls_handle_error): New function.
13852 (wsaerror_to_errno): Likewise.
13854 * w32.h (emacs_gnutls_pull): Add prototype.
13855 (emacs_gnutls_push): Likewise.
13857 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
13858 (emacs_gnutls_push): Likewise.
13860 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
13862 * process.c (wait_reading_process_output): Check if GnuTLS
13863 buffered some data internally if no FDs are set for TLS
13866 * makefile.w32-in (OBJ2): Add gnutls.$(O).
13867 (LIBS): Link to USER_LIBS.
13868 ($(BLD)/gnutls.$(0)): New target.
13870 2011-04-24 Eli Zaretskii <eliz@gnu.org>
13872 * xdisp.c (handle_single_display_spec): Rename the
13873 display_replaced_before_p argument into display_replaced_p, to
13874 make it consistent with the commentary. Fix typos in the
13877 * textprop.c (syms_of_textprop): Remove dead code.
13878 (copy_text_properties): Delete obsolete commentary about an
13879 interface that was deleted long ago. Fix typos in the description
13882 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
13883 to changes in oldXMenu/XMenu.h from 2011-04-16.
13884 <menu_help_message, prev_menu_help_message>: Constify.
13885 (IT_menu_make_room): menu->help_text is now `const char **';
13888 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
13889 to changes in oldXMenu/XMenu.h from 2011-04-16.
13890 (struct XMenu): Declare `help_text' `const char **'.
13892 * xfaces.c <Qunspecified>: Make extern again.
13894 * syntax.c: Include sys/types.h before including regex.h, as
13897 * doc.c (get_doc_string): Improve the format passed to `error'.
13899 * doprnt.c (doprnt): Improve commentary.
13901 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
13903 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
13906 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
13907 changes in globals.h immediately force recompilation.
13908 (TAGS): Depend on $(CURDIR)/m/intel386.h and
13909 $(CURDIR)/s/ms-w32.h.
13910 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
13912 * character.c (Fchar_direction): Function deleted.
13913 (syms_of_character): Don't defsubr it.
13914 <char-direction-table>: Deleted.
13916 2011-04-23 Eli Zaretskii <eliz@gnu.org>
13918 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
13919 * doprnt.c: Include limits.h.
13920 (SIZE_MAX): New macro.
13921 (doprnt): Return a size_t value. 2nd arg is now size_t.
13922 Many local variables are now size_t instead of int or unsigned.
13923 Improve overflow protection. Support `l' modifier for integer
13924 conversions. Support %l conversion. Don't assume an EMACS_INT
13925 argument for integer conversions and for %c.
13927 * lisp.h (doprnt): Restore prototype.
13929 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
13930 $(SRC)/character.h.
13932 * Makefile.in (base_obj): Add back doprnt.o.
13934 * deps.mk (doprnt.o): Add back prerequisites.
13935 (callint.o): Depend on character.h.
13937 * eval.c (internal_lisp_condition_case): Include the handler
13938 representation in the error message.
13939 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
13940 when breaking from the loop.
13942 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
13944 * callint.c (Fcall_interactively): When displaying error message
13945 about invalid control letter, pass the character's codepoint, not
13946 a pointer to its multibyte form. Improve display of the character
13947 in octal and display also its hex code.
13949 * character.c (char_string): Use %x to display the (unsigned)
13950 codepoint of an invalid character, to avoid displaying a bogus
13953 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
13954 `error', not SYMBOL_NAME itself.
13956 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
13957 character arguments to `error'.
13959 * charset.c (check_iso_charset_parameter): Fix incorrect argument
13960 to `error' in error message about FINAL_CHAR argument. Make sure
13961 FINAL_CHAR is a character, and use %c when it is passed as
13962 argument to `error'.
13964 2011-04-23 Eli Zaretskii <eliz@gnu.org>
13966 * s/ms-w32.h (localtime): Redirect to sys_localtime.
13968 * w32.c: Include <time.h>.
13969 (sys_localtime): New function.
13971 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
13973 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
13975 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
13977 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
13979 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
13980 zombies (Bug#8467).
13982 2011-04-19 Eli Zaretskii <eliz@gnu.org>
13984 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
13985 gl_state.e_property when gl_state.object is Qt.
13987 * insdel.c (make_gap_larger): Remove limitation of buffer size
13990 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
13992 * xdisp.c (lookup_glyphless_char_display)
13993 (produce_glyphless_glyph): Handle cons cell entry in
13994 glyphless-char-display.
13995 (Vglyphless_char_display): Document it.
13997 * term.c (produce_glyphless_glyph): Handle cons cell entry in
13998 glyphless-char-display.
14000 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
14002 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
14004 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
14006 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
14007 definition for no-X builds.
14009 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
14011 Static checks with GCC 4.6.0 and non-default toolkits.
14013 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
14015 * process.c (keyboard_bit_set): Define only if SIGIO.
14016 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
14017 (send_process): Repair possible setjmp clobbering.
14019 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
14021 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
14023 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
14025 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
14026 Define only if needed.
14028 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
14029 by pacifying GCC about it. Maybe it's time to retire it?
14030 * xfaces.c (USG, __TIMEVAL__): Likewise.
14032 * dispextern.h (struct redisplay_interface): Rename param
14033 to avoid shadowing.
14034 * termhooks.h (struct terminal): Likewise.
14035 * xterm.c (xembed_send_message): Likewise.
14037 * insdel.c (make_gap_smaller): Define only if
14038 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
14040 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
14043 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
14044 so that we aren't warned about unused symbols.
14046 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
14048 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
14050 * xfns.c (x_real_positions): Mark locals as initialized.
14052 * xmenu.c (xmenu_show): Don't use uninitialized vars.
14054 * xterm.c: Fix problems found by static analysis with other toolkits.
14055 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
14056 (x_dispatch_event): Declare static if USE_GTK, and
14057 define if USE_GTK || USE_X_TOOLKIT.
14058 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
14059 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
14060 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
14061 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
14063 * xmenu.c (menu_help_callback): Pointer type fixes.
14064 Use const pointers when pointing at readonly data. Avoid pointer
14065 signedness clashes.
14066 (FALSE): Remove unused macro.
14067 (update_frame_menubar): Remove unused decl.
14069 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
14071 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
14072 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
14073 (single_menu_item): Rename local to avoid shadowing.
14075 * keyboard.c (make_lispy_event): Remove unused local var.
14077 * frame.c, frame.h (x_get_resource_string): Bring this back, but
14078 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
14080 * bitmaps: Change bitmaps from unsigned char back to the X11
14081 compatible char. Avoid the old compiler warnings about
14082 out-of-range initializers by using, for example, '\xab' rather
14085 * xgselect.c (xgselect_initialize): Check vs interface
14086 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
14088 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
14090 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
14091 to read-only memory.
14093 * fns.c (vector): Remove; this old hack is no longer needed.
14095 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
14097 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
14099 * xrdb.c (x_load_resources): Omit unused local.
14101 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
14102 (x_window): Rename locals to avoid shadowing.
14103 (USG): Use the kludged USG macro, to pacify gcc.
14105 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
14106 (x_term_init): Remove local to avoid shadowing.
14108 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
14110 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
14111 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
14113 2011-04-16 Eli Zaretskii <eliz@gnu.org>
14115 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
14117 Fix regex.c, syntax.c and friends for buffers > 2GB.
14118 * syntax.h (struct gl_state_s): Declare character position members
14121 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
14123 * textprop.c (verify_interval_modification, interval_of):
14124 Declare arguments EMACS_INT.
14126 * intervals.c (adjust_intervals_for_insertion): Declare arguments
14129 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
14131 * indent.c (Fvertical_motion): Local variable it_start is now
14134 * regex.c (re_match, re_match_2, re_match_2_internal)
14135 (bcmp_translate, regcomp, regexec, print_double_string)
14136 (group_in_compile_stack, re_search, re_search_2, regex_compile)
14137 (re_compile_pattern, re_exec): Declare arguments and local
14138 variables `size_t' and `ssize_t' and return values `regoff_t', as
14140 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
14141 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
14142 <compile_stack_type>: `size' and `avail' are now `size_t'.
14144 * regex.h <regoff_t>: Use ssize_t, not int.
14145 (re_search, re_search_2, re_match, re_match_2): Arguments that
14146 specify buffer/string position and length are now ssize_t and
14147 size_t. Return type is regoff_t.
14149 2011-04-16 Ben Key <bkey76@gmail.com>
14151 * nsfont.m: Fixed bugs in ns_get_family and
14152 ns_descriptor_to_entity that were caused by using free to
14153 deallocate memory blocks that were allocated by xmalloc (via
14154 xstrdup). This caused Emacs to crash when compiled with
14155 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
14156 --enable-checking=xmallocoverrun). xfree is now used to
14157 deallocate these memory blocks.
14159 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
14161 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
14163 emacs_write: Accept and return EMACS_INT for sizes.
14164 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
14166 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
14167 Accept and return EMACS_INT.
14168 (emacs_gnutls_write): Return the number of bytes written on
14170 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
14171 (emacs_read, emacs_write): Remove check for negative size, as the
14172 Emacs source code has been audited now.
14173 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
14174 (emacs_read, emacs_write): Use it.
14175 * process.c (send_process): Adjust to the new signatures of
14176 emacs_write and emacs_gnutls_write. Do not attempt to store
14177 a byte offset into an 'int'; it might overflow.
14178 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
14180 * sound.c: Don't assume sizes fit in 'int'.
14181 (struct sound_device.period_size, alsa_period_size):
14182 Return EMACS_INT, not int.
14183 (struct sound_device.write, vox_write, alsa_write):
14184 Accept EMACS_INT, not int.
14185 (wav_play, au_play): Use EMACS_INT to store sizes and to
14186 record read return values.
14188 2011-04-15 Ben Key <bkey76@gmail.com>
14190 * keyboard.c (Qundefined): Don't declare static since it is used
14192 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
14193 static since they are used in nsfont.m.
14195 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
14197 * process.c (Qprocessp): Don't declare static.
14198 * lisp.h (Qprocessp): Declare again.
14200 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
14202 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
14204 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
14206 Improve C-level modularity by making more things 'static'.
14208 Don't publish debugger-only interfaces to other modules.
14209 * lisp.h (safe_debug_print, debug_output_compilation_hack):
14210 (verify_bytepos, count_markers): Move decls to the only modules
14212 * region-cache.h (pp_cache): Likewise.
14213 * window.h (check_all_windows): Likewise.
14214 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
14216 * sysdep.c (croak): Now static, if
14217 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
14218 * syssignal.h (croak): Declare only if not static.
14220 * alloc.c (refill_memory_reserve): Now static if
14221 !defined REL_ALLOC || defined SYSTEM_MALLOC.
14222 * lisp.h (refill_memory_reserve): Declare only if not static.
14224 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
14225 Define only if USE_LUCID.
14227 * xrdb.c (x_customization_string, x_rm_string): Now static.
14229 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
14230 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
14232 * xdisp.c (draw_row_with_mouse_face): Now static.
14233 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
14235 * window.h (check_all_windows): Mark externally visible.
14237 * window.c (window_deletion_count): Now static.
14239 * undo.c: Make symbols static if they're not exported.
14240 (last_undo_buffer, last_boundary_position, pending_boundary):
14243 * textprop.c (interval_insert_behind_hooks): Now static.
14244 (interval_insert_in_front_hooks): Likewise.
14246 * term.c: Make symbols static if they're not exported.
14247 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
14248 (max_frame_lines, tty_set_terminal_modes):
14249 (tty_reset_terminal_modes, tty_turn_off_highlight):
14250 (get_tty_terminal): Now static.
14251 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
14252 * termhooks.h (term_mouse_moveto): Do not declare if
14253 HAVE_WINDOW_SYSTEM.
14254 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
14255 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
14257 * sysdep.c: Make symbols static if they're not exported.
14258 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
14260 (sigprocmask_set, full_mask): Remove; unused.
14261 (wait_debugging): Mark as visible.
14262 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
14263 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
14265 * syntax.c (syntax_temp): Define only if !__GNUC__.
14267 * sound.c (current_sound_device, current_sound): Now static.
14269 * search.c (searchbufs, searchbuf_head): Now static.
14271 * scroll.c (scroll_cost): Remove; unused.
14272 * dispextern.h (scroll_cost): Remove decl.
14274 * region-cache.h (pp_cache): Mark as externally visible.
14276 * process.c: Make symbols static if they're not exported.
14277 (process_tick, update_tick, create_process, chan_process):
14278 (Vprocess_alist, proc_buffered_char, datagram_access):
14279 (fd_callback_data, send_process_frame, process_sent_to): Now static.
14280 (deactivate_process): Mark defn as static, as well as decl.
14281 * lisp.h (create_process): Remove decl.
14282 * process.h (chan_process, Vprocess_alist): Remove decls.
14284 * print.c: Make symbols static if they're not exported.
14285 (print_depth, new_backquote_output, being_printed, print_buffer):
14286 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
14287 (print_interval, print_number_index, initial_stderr_stream):
14289 * lisp.h (Fprinc): Remove decl.
14290 (debug_output_compilation_hack): Mark as externally visible.
14292 * sysdep.c (croak): Move decl from here to syssignal.h.
14293 * syssignal.h (croak): Put it here, so the API can be checked when
14294 'croak' is called from dissociate_if_controlling_tty.
14296 * minibuf.c: Make symbols static if they're not exported.
14297 (minibuf_save_list, choose_minibuf_frame): Now static.
14298 * lisp.h (choose_minibuf_frame): Remove decl.
14300 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
14302 * lread.c: Make symbols static if they're not exported.
14303 (read_objects, initial_obarray, oblookup_last_bucket_number):
14305 (make_symbol): Remove; unused.
14306 * lisp.h (initial_obarray, make_symbol): Remove decls.
14308 * keyboard.c: Make symbols static if they're not exported.
14309 (single_kboard, recent_keys_index, total_keys, recent_keys):
14310 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
14311 (this_single_command_key_start, echoing, last_auto_save):
14312 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
14313 (command_loop, echo_now, keyboard_init_hook, help_char_p):
14314 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
14315 (Vlispy_mouse_stem, double_click_count):
14317 (force_auto_save_soon): Define only if SIGDANGER.
14318 (ignore_mouse_drag_p): Now static if
14319 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
14320 (print_help): Remove; unused.
14321 (stop_character, last_timer_event): Mark as externally visible.
14322 * keyboard.h (ignore_mouse_drag_p): Declare only if
14323 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
14324 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
14325 * lisp.h (echoing): Remove decl.
14326 (force_auto_save_soon): Declare only if SIGDANGER.
14327 * xdisp.c (redisplay_window): Simplify code, to make it more
14328 obvious that ignore_mouse_drag_p is not accessed if !defined
14329 USE_GTK && !defined HAVE_NS.
14331 * intervals.c: Make symbols static if they're not exported.
14332 (merge_properties_sticky, merge_interval_right, delete_interval):
14334 * intervals.h (merge_interval_right, delete_interval): Remove decls.
14336 * insdel.c: Make symbols static if they're not exported.
14337 However, leave prepare_to_modify_buffer alone. It's never
14338 called from outside this function, but that appears to be a bug.
14339 (combine_after_change_list, combine_after_change_buffer):
14340 (adjust_after_replace, signal_before_change): Now static.
14341 (adjust_after_replace_noundo): Remove; unused.
14342 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
14343 (signal_before_change): Remove decls.
14345 * indent.c (val_compute_motion, val_vmotion): Now static.
14347 * image.c: Make symbols static if they're not exported.
14348 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
14350 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
14351 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
14353 * fringe.c (standard_bitmaps): Now static.
14354 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
14356 * frame.c: Make symbols static if they're not exported.
14357 (x_report_frame_params, make_terminal_frame): Now static.
14358 (get_frame_param): Now static, unless HAVE_NS.
14359 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
14360 (x_get_resource_string): Remove; not used.
14361 * frame.h (make_terminal_frame, x_report_frame_params):
14362 (x_get_resource_string); Remove decls.
14363 (x_fullscreen_adjust): Declare only if WINDOWSNT.
14364 * lisp.h (get_frame_param): Declare only if HAVE_NS.
14366 * font.c, fontset.c: Make symbols static if they're not exported.
14367 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
14368 (FACE_SUITABLE_FOR_CHAR_P): Use it.
14369 * font.c (font_close_object): Now static.
14370 * font.h (font_close_object): Remove.
14371 * fontset.c (FONTSET_OBJLIST): Remove.
14372 (free_realized_fontset) #if-0 the body, which does nothing.
14373 (face_suitable_for_char_p): #if-0, as it's never called.
14374 * fontset.h (face_suitable_for_char_p): Remove decl.
14375 * xfaces.c (face_at_string_position):
14376 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
14377 since 0 is always ASCII.
14379 * fns.c (weak_hash_tables): Now static.
14381 * fileio.c: Make symbols static if they're not exported.
14382 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
14383 (Vwrite_region_annotation_buffers): Now static.
14385 * eval.c: Make symbols static if they're not exported.
14386 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
14387 * lisp.h (backtrace_list): Remove decl.
14389 * emacs.c: Make symbols static if they're not exported.
14390 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
14391 (fatal_error_code, fatal_error_signal_hook, standard_args):
14393 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
14394 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
14395 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
14396 * lisp.h (fatal_error_signal_hook): Remove decl.
14397 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
14399 * editfns.c: Move a (normally-unused) function to its only use.
14400 * editfns.c, lisp.h (get_operating_system_release): Remove.
14401 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
14402 worth the hassle of breaking this out.
14404 * xterm.c: Make symbols static if they're not exported.
14405 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
14406 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
14407 (x_destroy_window, x_delete_display):
14409 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
14410 (x_mouse_leave): Remove; unused.
14411 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
14412 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
14413 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
14415 (x_mouse_leave): Declare only if WINDOWSNT.
14416 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
14417 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
14420 * ftxfont.c: Make symbols static if they're not exported.
14421 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
14423 * font.h (ftxfont_driver): Likewise.
14425 * xfns.c: Make symbols static if they're not exported.
14426 (x_last_font_name, x_display_info_for_name):
14427 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
14428 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
14429 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
14430 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
14431 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
14432 (last_show_tip_args): Now static.
14433 (xic_defaut_fontset, xic_create_fontsetname): Define only if
14434 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
14435 (x_screen_planes): Remove; unused.
14436 * dispextern.h (x_screen_planes): Remove decl.
14438 * dispnew.c: Make symbols static if they're not exported.
14439 * dispextern.h (redraw_garbaged_frames, scrolling):
14440 (increment_row_positions): Remove.
14441 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
14442 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
14444 (redraw_garbaged_frames): Remove; unused.
14446 * xfaces.c: Make symbols static if they're not exported.
14447 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
14449 * xterm.h (defined_color): Remove decls.
14450 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
14451 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
14452 (menu_face_changed_default, defined_color, free_realized_face):
14453 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
14454 (ascii_face_of_lisp_face): Remove; unused.
14456 * xdisp.c: Make symbols static if they're not exported.
14457 * dispextern.h (scratch_glyph_row, window_box_edges):
14458 (glyph_to_pixel_coords, set_cursor_from_row):
14459 (get_next_display_element, set_iterator_to_next):
14460 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
14461 (show_mouse_face): Remove decls
14462 * frame.h (message_buf_print): Likewise.
14463 * lisp.h (pop_message, set_message, check_point_in_composition):
14465 * xterm.h (set_vertical_scroll_bar): Likewise.
14466 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
14467 (message_buf_print, scratch_glyph_row, displayed_buffer):
14468 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
14469 (get_next_display_element, show_mouse_face, window_box_edges):
14470 (frame_to_window_pixel_xy, check_point_in_composition):
14471 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
14472 (glyph_to_pixel_coords): Remove; unused.
14474 * dired.c (file_name_completion): Now static.
14476 * dbusbind.c (xd_in_read_queued_messages): Now static.
14478 * lisp.h (circular_list_error, FOREACH): Remove; unused.
14479 * data.c (circular_list_error): Remove.
14481 * commands.h (last_point_position, last_point_position_buffer):
14482 (last_point_position_window): Remove decls.
14483 * keyboard.c: Make these variables static.
14485 * coding.h (coding, code_convert_region, encode_coding_gap):
14487 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
14488 (iso_code_class, detect_coding, code_convert_region): Now static.
14489 (encode_coding_gap): Remove; unused.
14491 * chartab.c (chartab_chars, chartab_bits): Now static.
14493 * charset.h (charset_iso_8859_1): Remove decl.
14494 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
14497 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
14498 * ccl.c (Vccl_program_table): Now static.
14499 (check_ccl_update): Remove; unused.
14501 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
14502 * category.h: ... from here.
14503 * category.c (check_category_table, set_category_set): Now static.
14505 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
14506 * lisp.h: Remove these decls.
14508 * buffer.c (buffer_count): Remove unused var.
14510 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
14511 so that it's not optimized away.
14512 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
14513 * dispextern.h (bidi_dump_cached_states): Remove, since it's
14514 exported only to the debugger.
14516 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
14517 * atimer.h (run_all_atimers): Remove; not exported.
14519 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
14520 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
14521 was inaccessible from Lisp.
14522 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
14523 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
14525 alloc.c: Import and export fewer symbols, and remove unused items.
14526 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
14528 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
14529 it's not optimized away by whole-program optimization.
14530 (message_enable_multibyte, free_misc): Remove.
14531 (catchlist, handlerlist, mark_backtrace):
14532 Declare only if BYTE_MARK_STACK.
14533 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
14534 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
14535 (message_enable_multibyte): Remove decl.
14536 (free_misc, interval_free_list, float_block, float_block_index):
14537 (n_float_blocks, float_free_list, cons_block, cons_block_index):
14538 (cons_free_list, last_marked_index):
14540 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
14541 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
14542 (mark_backtrace): Define only if BYTE_MARK_STACK.
14543 * xdisp.c (message_enable_multibyte): Now static.
14545 Declare Lisp_Object Q* variables to be 'static' if not exported.
14546 This makes it easier for human readers (and static analyzers)
14547 to see whether these variables are used from other modules.
14548 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
14549 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
14550 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
14551 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
14552 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
14553 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
14554 * xmenu.c, xselect.c:
14555 Declare Q* vars static if they are not used in other modules.
14556 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
14557 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
14558 Remove decls of unexported vars.
14559 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
14561 * lisp.h (DEFINE_FUNC): Make sname 'static'.
14563 Make Emacs functions such as Fatom 'static' by default.
14564 This makes it easier for human readers (and static analyzers)
14565 to see whether these functions can be called from other modules.
14566 DEFUN now defines a static function. To make the function external
14567 so that it can be used in other C modules, use the new macro DEFUE.
14568 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
14569 (Finit_image_library):
14570 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
14571 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
14572 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
14573 Remove decls, since these functions are now static.
14574 (Funintern, Fget_internal_run_time): New decls, since these functions
14575 were already external.
14577 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
14578 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
14579 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
14580 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
14581 * keyboard.c, keymap.c, lread.c:
14582 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
14583 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
14584 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
14585 Mark functions with DEFUE instead of DEFUN,
14586 if they are used in other modules.
14587 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
14588 decls for now-static functions.
14589 * buffer.h (Fdelete_overlay): Remove decl.
14590 * callproc.c (Fgetenv_internal): Mark as internal.
14591 * composite.c (Fremove_list_of_text_properties): Remove decl.
14592 (Fcomposition_get_gstring): New forward static decl.
14593 * composite.h (Fcomposite_get_gstring): Remove decl.
14594 * dired.c (Ffile_attributes): New forward static decl.
14595 * doc.c (Fdocumntation_property): New forward static decl.
14596 * eval.c (Ffetch_bytecode): New forward static decl.
14597 (Funintern): Remove extern decl; now in .h file where it belongs.
14598 * fileio.c (Fmake_symbolic_link): New forward static decl.
14599 * image.c (Finit_image_library): New forward static decl.
14600 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
14601 * intervals.h (Fprevious_property_change):
14602 (Fremove_list_of_text_properties): Remove decls.
14603 * keyboard.c (Fthis_command_keys): Remove decl.
14604 (Fcommand_execute): New forward static decl.
14605 * keymap.c (Flookup_key): New forward static decl.
14606 (Fcopy_keymap): Now static.
14607 * keymap.h (Flookup_key): Remove decl.
14608 * process.c (Fget_process): New forward static decl.
14609 (Fprocess_datagram_address): Mark as internal.
14610 * syntax.c (Fsyntax_table_p): New forward static decl.
14611 (skip_chars): Remove duplicate decl.
14612 * textprop.c (Fprevious_property_change): New forward static decl.
14613 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
14615 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
14616 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
14618 * editfns.c (Fformat): Remove unreachable code.
14620 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
14622 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
14625 2011-04-13 Eli Zaretskii <eliz@gnu.org>
14627 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
14628 when at ZV. (Bug#8487)
14630 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
14632 * charset.c (Fclear_charset_maps): Use xfree instead of free.
14634 * keyboard.c (parse_tool_bar_item): Likewise.
14635 * sound.c (sound_cleanup, alsa_close): Likewise.
14636 * termcap.c (tgetent): Likewise.
14637 * xfns.c (x_default_font_parameter): Likewise.
14638 * xsettings.c (read_and_apply_settings): Likewise.
14640 * alloc.c (overrun_check_malloc, overrun_check_realloc)
14641 (overrun_check_free): Protoize.
14643 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
14645 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
14646 since callers should never pass a negative size.
14647 Change the signature to match that of plain 'read' and 'write'; see
14648 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
14649 * lisp.h: Update prototypes of emacs_write and emacs_read.
14651 2011-04-11 Eli Zaretskii <eliz@gnu.org>
14653 * xdisp.c (redisplay_window): Don't try to determine the character
14654 position of the scroll margin if the window start point w->startp
14655 is outside the buffer's accessible region. (Bug#8468)
14657 2011-04-10 Eli Zaretskii <eliz@gnu.org>
14659 Fix write-region and its subroutines for buffers > 2GB.
14660 * fileio.c (a_write, e_write): Modify declaration of arguments and
14661 local variables to support buffers larger than 2GB.
14662 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
14664 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
14665 argument, local variables, and return value.
14667 * lisp.h: Update prototypes of emacs_write and emacs_read.
14669 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
14671 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
14673 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
14675 Fix more problems found by GCC 4.6.0's static checks.
14677 * xdisp.c (vmessage): Use a better test for character truncation.
14679 * charset.c (load_charset_map): <, not <=, for optimization,
14680 and to avoid potential problems with integer overflow.
14681 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
14682 * casetab.c (set_identity, shuffle): Likewise.
14683 * editfns.c (Fformat): Likewise.
14684 * syntax.c (skip_chars): Likewise.
14686 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
14687 This also lets GCC 4.6.0 generate slightly better loop code.
14689 * callint.c (Fcall_interactively): <, not <=, for optimization.
14690 (Fcall_interactively): Count the number of arguments produced,
14691 not the number of arguments given. This is simpler and lets GCC
14692 4.6.0 generate slightly better code.
14694 * ftfont.c: Distingish more carefully between FcChar8 and char.
14695 The previous code passed unsigned char * to a functions like
14696 strlen and xstrcasecmp that expect char *, which does not
14697 conform to the C standard.
14698 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
14699 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
14700 char * when the C standard requires it.
14702 * keyboard.c (read_char): Remove unused var.
14704 * eval.c: Port to Windows vsnprintf (Bug#8435).
14705 Include <limits.h>.
14706 (SIZE_MAX): Define if the headers do not.
14707 (verror): Do not give up if vsnprintf returns a negative count.
14708 Instead, grow the buffer. This ports to Windows vsnprintf, which
14709 does not conform to C99. Problem reported by Eli Zaretskii.
14710 Also, simplify the allocation scheme, by avoiding the need for
14711 calling realloc, and removing the ALLOCATED variable.
14713 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
14715 Remove invocations of doprnt, as Emacs now uses vsnprintf.
14716 But keep the doprint source code for now, as we might revamp it
14717 and use it again (Bug#8435).
14718 * lisp.h (doprnt): Remove.
14719 * Makefile.in (base_obj): Remove doprnt.o.
14720 * deps.mk (doprnt.o): Remove.
14722 error: Print 32- and 64-bit integers portably (Bug#8435).
14723 Without this change, on typical 64-bit hosts error ("...%d...", N)
14724 was used to print both 32- and 64-bit integers N, which relied on
14725 undefined behavior.
14726 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
14727 * lisp.h (error, verror): Mark as printf-like functions.
14728 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
14729 Report overflow in size calculations when allocating printf buffer.
14730 Do not truncate output string at its first null byte.
14731 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
14732 Truncate the output at a character boundary, since vsnprintf does not
14734 * charset.c (check_iso_charset_parameter): Convert internal
14735 character to string before calling 'error', since %c now has the
14737 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
14738 overflow when computing char to be passed to 'error'. Do not
14739 pass Lisp_Object to 'error'; pass the integer instead.
14740 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
14741 formatted with plain %d.
14743 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
14745 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
14747 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
14749 * xterm.c (x_catch_errors): Remove duplicate declaration.
14751 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
14753 * xdisp.c, lisp.h (message_nolog): Remove; unused.
14755 2011-04-10 Jim Meyering <meyering@redhat.com>
14757 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
14758 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
14759 return ssize_t not "int", and use size_t as the buffer length.
14760 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
14761 * gnutls.h: Update declarations.
14762 * process.c (read_process_output): Use ssize_t, to match.
14763 (send_process): Likewise.
14765 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
14767 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
14769 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
14771 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
14772 Use unsigned char, to match FcChar8 type definition.
14774 * xterm.c (handle_one_xevent):
14775 * xmenu.c (create_and_show_popup_menu):
14776 * xselect.c (x_decline_selection_request)
14777 (x_reply_selection_request): Avoid type-punned deref of X events.
14779 2011-04-09 Eli Zaretskii <eliz@gnu.org>
14781 Fix some uses of `int' instead of EMACS_INT.
14782 * search.c (string_match_1, fast_string_match)
14783 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
14784 (scan_buffer, find_next_newline_no_quit)
14785 (find_before_next_newline, search_command, Freplace_match)
14786 (Fmatch_data): Make some `int' variables be EMACS_INT.
14788 * xdisp.c (display_count_lines): 3rd argument and return value now
14789 EMACS_INT. All callers changed.
14790 (pint2hrstr): Last argument is now EMACS_INT.
14792 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
14793 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
14794 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
14795 (decode_coding_utf_16, decode_coding_emacs_mule)
14796 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
14797 (decode_coding_ccl, decode_coding_charset)
14798 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
14799 (decode_coding_iso_2022, decode_coding_emacs_mule)
14800 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
14801 <char_offset, last_offset>: Declare EMACS_INT.
14802 (encode_coding_utf_8, encode_coding_utf_16)
14803 (encode_coding_emacs_mule, encode_invocation_designation)
14804 (encode_designation_at_bol, encode_coding_iso_2022)
14805 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
14806 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
14808 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
14809 (encode_invocation_designation): Last argument P_NCHARS is now
14811 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
14812 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
14814 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
14817 * ccl.c (Fccl_execute_on_string): Declare some variables
14820 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
14822 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
14824 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
14826 * process.c (Fformat_network_address): Doc fix.
14828 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
14830 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
14832 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
14834 * keyboard.c (read_char): Call Lisp function help-form-show,
14835 instead of using internal_with_output_to_temp_buffer.
14836 (Qhelp_form_show): New var.
14837 (syms_of_keyboard): Use DEFSYM macro.
14839 * print.c (internal_with_output_to_temp_buffer): Function deleted.
14841 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
14843 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
14845 * process.c (Flist_processes): Remove to Lisp.
14846 (list_processes_1): Delete.
14848 2011-04-06 Eli Zaretskii <eliz@gnu.org>
14850 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
14852 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
14854 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
14856 Fix more problems found by GCC 4.6.0's static checks.
14858 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
14860 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
14862 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
14864 * xdisp.c (vmessage): Mark as a printf-like function.
14866 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
14868 * sound.c (sound_warning): Don't crash if arg contains a printf format.
14870 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
14871 printf-like functions.
14872 (tiff_load): Add casts to remove these marks before passing them
14873 to system-supplied API.
14875 * eval.c (Fsignal): Remove excess argument to 'fatal'.
14877 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
14878 This avoids several warnings with gcc -Wstrict-overflow.
14879 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
14880 directly, rather than having caller test rule sign. This avoids
14881 some unnecessary tests.
14882 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
14883 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
14884 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
14886 * xfont.c (xfont_text_extents): Remove var that was set but not used.
14887 (xfont_open): Avoid unnecessary tests.
14889 * composite.c (composition_gstring_put_cache): Use unsigned integer.
14891 * composite.h, composite.c (composition_gstring_put_cache):
14892 Use EMACS_INT, not int, for length.
14894 * composite.h (COMPOSITION_DECODE_REFS): New macro,
14895 breaking out part of COMPOSITION_DECODE_RULE.
14896 (COMPOSITION_DECODE_RULE): Use it.
14897 * composite.c (get_composition_id): Remove unused local vars,
14898 by using the new macro.
14900 * textprop.c (set_text_properties_1): Change while to do-while,
14901 since the condition is always true at first.
14903 * intervals.c (graft_intervals_into_buffer): Mark var as used.
14904 (interval_deletion_adjustment): Return unsigned value.
14907 * process.c (list_processes_1, create_pty, read_process_output):
14908 (exec_sentinel): Remove vars that were set but not used.
14909 (create_pty): Remove unnecessary "volatile"s.
14910 (Fnetwork_interface_info): Avoid possibility of int overflow.
14911 (read_process_output): Do adaptive read buffering even if carryover.
14912 (read_process_output): Simplify nbytes computation if buffered.
14914 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
14916 * syntax.c (scan_words): Remove var that was set but not used.
14917 (update_syntax_table): Use unsigned instead of int.
14919 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
14920 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
14921 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
14923 * print.c (print_error_message): Avoid int overflow.
14925 * font.c (font_list_entities): Redo for clarity,
14926 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
14928 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
14929 (font_score): Avoid potential overflow in diff calculation.
14931 * fns.c (substring_both): Remove var that is set but not used.
14932 (sxhash): Redo loop for clarity and to avoid wraparound warning.
14934 * eval.c (funcall_lambda): Rename local to avoid shadowing.
14936 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
14937 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
14938 can always succeed if overflow has undefined behavior.
14940 * search.c (boyer_moore, wordify): Remove vars set but not used.
14941 (wordify): Omit three unnecessary tests.
14943 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
14944 All callers changed. This avoids the need for an unused var.
14946 * casefiddle.c (casify_region): Remove var that is set but not used.
14948 * dired.c (file_name_completion): Remove var that is set but not used.
14950 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
14952 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
14953 (Finsert_file_contents): Remove unnecessary code checking fd.
14955 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
14956 Check for integer overflow on size calculations.
14958 * buffer.c (Fprevious_overlay_change): Remove var that is set
14961 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
14962 Remove vars that are set but not used.
14963 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
14964 (timer_check_2): Mark vars as initialized.
14966 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
14968 * image.c (lookup_image): Remove var that is set but not used.
14969 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
14971 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
14972 that are set but not used.
14974 * xfns.c (make_invisible_cursor): Don't return garbage
14975 if XCreateBitmapFromData fails (Bug#8410).
14977 * xselect.c (x_get_local_selection, x_handle_property_notify):
14978 Remove vars that are set but not used.
14980 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
14981 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
14983 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
14984 Remove var that is set but not used.
14985 (scroll_bar_windows_size): Now size_t, not int.
14986 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
14987 Check for overflow.
14989 * xfaces.c (realize_named_face): Remove vars that are set but not used.
14990 (map_tty_color) [!defined MSDOS]: Likewise.
14992 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
14994 * coding.c: Remove vars that are set but not used.
14995 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
14996 All callers changed.
14997 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
14998 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
14999 (decode_coding_charset): Remove vars that are set but not used.
15001 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
15002 that is set but not used.
15004 * print.c (print_object): Remove var that is set but not used.
15006 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
15007 The gnulib version avoids calling malloc in the usual case,
15008 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
15009 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
15010 * filelock.c (current_lock_owner): Likewise.
15011 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
15012 * sysdep.c: Include allocator.h, careadlinkat.h.
15013 (emacs_no_realloc_allocator): New static constant.
15014 (emacs_readlink): New function.
15015 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
15016 ../lib/careadlinkat.h.
15018 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
15020 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
15021 first non-nil return value).
15023 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
15025 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
15026 if not defined (Bug#8403).
15028 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
15030 * xdisp.c (display_count_lines): Remove parameter `start',
15031 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
15032 (get_char_face_and_encoding): Remove parameter `multibyte_p',
15033 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15034 (fill_stretch_glyph_string): Remove parameters `row' and `area',
15035 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
15036 and thereabouts. All callers changed.
15037 (get_per_char_metric): Remove parameter `f', unused since
15038 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15040 2011-04-02 Jim Meyering <meyering@redhat.com>
15042 do not dereference NULL upon failed strdup
15043 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
15044 (ns_get_family): Likewise.
15046 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
15048 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
15050 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
15052 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
15055 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
15057 Add lexical binding.
15059 * window.c (Ftemp_output_buffer_show): New fun.
15060 (Fsave_window_excursion):
15061 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
15063 * lread.c (lisp_file_lexically_bound_p): New function.
15064 (Fload): Bind Qlexical_binding.
15065 (readevalloop): Remove `evalfun' arg.
15066 Bind Qinternal_interpreter_environment.
15067 (Feval_buffer): Bind Qlexical_binding.
15068 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
15070 (syms_of_lread): Declare `lexical-binding'.
15072 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
15074 * keyboard.c (eval_dyn): New fun.
15075 (menu_item_eval_property): Use it.
15077 * image.c (parse_image_spec): Use Ffunctionp.
15079 * fns.c (concat, mapcar1): Accept byte-code-functions.
15081 * eval.c (Fsetq): Handle lexical vars.
15082 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
15083 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
15084 (FletX, Flet): Obey lexical binding.
15085 (Fcommandp): Handle closures.
15086 (Feval): New `lexical' arg.
15087 (eval_sub): New function extracted from Feval. Use it almost
15088 everywhere where Feval was used. Look up vars in lexical env.
15090 (Ffunctionp): Move from subr.el.
15091 (Ffuncall): Handle closures.
15092 (apply_lambda): Remove `eval_flags'.
15093 (funcall_lambda): Handle closures and new byte-code-functions.
15094 (Fspecial_variable_p): New function.
15095 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
15096 but without exporting it to Lisp.
15098 * doc.c (Fdocumentation, store_function_docstring):
15099 * data.c (Finteractive_form): Handle closures.
15101 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
15104 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
15106 (exec_byte_code): New function extracted from Fbyte_code to handle new
15107 calling convention for byte-code-functions. Add new byte-codes.
15109 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
15111 * alloc.c (Fmake_symbol): Init new `declared_special' field.
15113 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
15115 * xdisp.c (redisplay_internal): Fix prototype.
15117 2011-03-31 Eli Zaretskii <eliz@gnu.org>
15119 * xdisp.c (SCROLL_LIMIT): New macro.
15120 (try_scrolling): Use it when setting scroll_limit.
15121 Limit scrolling to 100 screen lines.
15122 (redisplay_window): Even when falling back on "recentering",
15123 position point in the window according to scroll-conservatively,
15124 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
15126 (try_scrolling): When point is above the window, allow searching
15127 as far as scroll_max, or one screenful, to compute vertical
15128 distance from PT to the scroll margin position. This prevents
15129 try_scrolling from unnecessarily failing when
15130 scroll-conservatively is set to a value slightly larger than the
15131 window height. Clean up the case of PT below the margin at bottom
15132 of window: scroll_max can no longer be INT_MAX. When aggressive
15133 scrolling is in use, don't let point enter the opposite scroll
15134 margin as result of the scroll.
15135 (syms_of_xdisp) <scroll-conservatively>: Document the
15136 threshold of 100 lines for never-recentering scrolling.
15138 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
15140 * dispextern.h (move_it_by_lines):
15141 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
15142 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
15143 (message_log_check_duplicate): Remove parameters `prev_bol' and
15144 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
15145 (redisplay_internal): Remove parameter `preserve_echo_area',
15146 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
15148 * indent.c (Fvertical_motion):
15149 * window.c (window_scroll_pixel_based, Frecenter):
15150 Don't pass `need_y_p' to `move_it_by_lines'.
15152 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
15154 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
15155 steal a few bits to be more compact.
15156 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
15157 Remove unneeded casts.
15159 * bytecode.c (Fbyte_code): CAR and CDR can GC.
15161 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
15163 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
15164 binding" message (bug#7967).
15166 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
15168 Fix more problems found by GCC 4.6.0's static checks.
15170 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
15171 Remove unused local var.
15173 * editfns.c (Fmessage_box): Remove unused local var.
15175 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
15176 (note_mode_line_or_margin_highlight, note_mouse_highlight):
15177 Omit unused local vars.
15178 * window.c (shrink_windows): Omit unused local var.
15179 * menu.c (digest_single_submenu): Omit unused local var.
15180 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
15181 Omit unused local var.
15183 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
15184 Don't assume string length fits in int.
15185 (keyremap_step, read_key_sequence): Use size_t for sizes.
15186 (read_key_sequence): Don't check last_real_key_start redundantly.
15188 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
15189 instead of alloca (Bug#8344).
15191 * eval.c (Fbacktrace): Don't assume nargs fits in int.
15192 (Fbacktrace_frame): Don't assume nframes fits in int.
15194 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
15196 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
15199 * term.c (produce_glyphless_glyph): Remove unnecessary test.
15201 * cm.c (calccost): Turn while-do into do-while, for clarity.
15203 * keyboard.c (syms_of_keyboard): Use the same style as later
15204 in this function when indexing through an array. This also
15205 works around GCC bug 48267.
15207 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
15209 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
15211 * chartab.c (sub_char_table_ref_and_range): Redo for slight
15212 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
15214 * keyboard.c, keyboard.h (num_input_events): Now size_t.
15215 This avoids undefined behavior on integer overflow, and is a bit
15216 more convenient anyway since it is compared to a size_t variable.
15218 Variadic C functions now count arguments with size_t, not int.
15219 This avoids an unnecessary limitation on 64-bit machines, which
15220 caused (substring ...) to crash on large vectors (Bug#8344).
15221 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
15222 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
15223 All variadic functions and their callers changed accordingly.
15224 (struct gcpro.nvars): Now size_t, not int. All uses changed.
15225 * data.c (arith_driver, float_arith_driver): Likewise.
15226 * editfns.c (general_insert_function): Likewise.
15227 * eval.c (struct backtrace.nargs, interactive_p)
15228 (internal_condition_case_n, run_hook_with_args, apply_lambda)
15229 (funcall_lambda, mark_backtrace): Likewise.
15230 * fns.c (concat): Likewise.
15231 * frame.c (x_set_frame_parameters): Likewise.
15232 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
15233 0 if not found, not -1. All callers changed.
15235 * alloc.c (garbage_collect): Don't assume stack size fits in int.
15236 (stack_copy_size): Now size_t, not int.
15237 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
15239 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
15241 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
15242 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
15243 All callers changed.
15245 * lisp.h (multibyte_char_to_unibyte):
15246 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
15247 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
15248 * character.h (CHAR_TO_BYTE8):
15249 * cmds.c (internal_self_insert):
15250 * editfns.c (general_insert_function):
15251 * keymap.c (push_key_description):
15252 * search.c (Freplace_match):
15253 * xdisp.c (message_dolog, set_message_1): All callers changed.
15255 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
15257 * keyboard.c (safe_run_hook_funcall): New function.
15258 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
15259 don't set the hook to nil, but remove the offending function instead.
15260 (Qcommand_hook_internal): Remove, unused.
15261 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
15262 Vcommand_hook_internal.
15264 * eval.c (enum run_hooks_condition): Remove.
15265 (funcall_nil, funcall_not): New functions.
15266 (run_hook_with_args): Call each function through a `funcall' argument.
15267 Remove `cond' argument, now redundant.
15268 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
15269 (Frun_hook_with_args_until_failure): Adjust accordingly.
15270 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
15272 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
15274 * dispextern.h (string_buffer_position): Remove declaration.
15276 * print.c (strout): Remove parameter `multibyte', unused since
15277 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
15279 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
15280 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
15281 All callers changed.
15283 * w32.c (_wsa_errlist): Use braces for struct initializers.
15285 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
15286 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
15287 All callers changed.
15288 (string_buffer_position): Likewise. Also, make static (it's never
15289 used outside xdisp.c).
15290 (cursor_row_p): Remove parameter `w', unused since
15291 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
15292 (decode_mode_spec): Remove parameter `precision', introduced during
15293 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
15294 All callers changed.
15296 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
15298 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
15300 2011-03-27 Anders Lindgren <andlind@gmail.com>
15302 * nsterm.m (ns_menu_bar_is_hidden): New variable.
15303 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
15304 (ns_update_auto_hide_menu_bar): New functions.
15305 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
15306 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
15307 ns_constrain_all_frames.
15308 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
15309 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
15311 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
15313 * nsmenu.m (runDialogAt): Remove argument to timer_check.
15315 2011-03-27 Glenn Morris <rgm@gnu.org>
15317 * syssignal.h: Replace RETSIGTYPE with void.
15318 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
15319 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
15320 Replace SIGTYPE with void everywhere.
15321 * s/usg5-4-common.h (SIGTYPE): Remove definition.
15322 * s/template.h (SIGTYPE): Remove commented out definition.
15324 2011-03-26 Eli Zaretskii <eliz@gnu.org>
15326 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
15327 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
15329 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
15331 * w32.c (read_unc_volume): Use parameter `henum', instead of
15332 global variable `wget_enum_handle'.
15334 * keymap.c (describe_vector): Remove parameters `indices' and
15335 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
15336 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
15338 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
15340 * keyboard.c (timer_check): Remove parameter `do_it_now',
15341 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
15342 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
15343 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
15345 * keyboard.c (read_char):
15346 * w32menu.c (w32_menu_display_help):
15347 * xmenu.c (show_help_event, menu_help_callback):
15348 Adjust calls to `show_help_echo'.
15350 * gtkutil.c (xg_maybe_add_timer):
15351 * keyboard.c (readable_events):
15352 * process.c (wait_reading_process_output):
15353 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
15355 * insdel.c (adjust_markers_gap_motion):
15356 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
15357 (gap_left, gap_right): Don't call it.
15359 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
15361 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
15362 incurred during fontification.
15364 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
15366 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
15367 (DEFVAR_PER_BUFFER): Don't pass it.
15369 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
15370 (scrolling_window): Don't pass it.
15372 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
15374 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
15376 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
15378 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
15379 of variables specific to SELinux and computation of `encoded_absname'.
15381 * image.c (XPutPixel): Remove unused variable `height'.
15383 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
15385 * unexw32.c (get_section_info): Remove unused variable `section'.
15387 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
15388 (system_process_attributes): Remove unused variable `sess'.
15389 (sys_read): Remove unused variable `err'.
15391 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
15392 (w32_wnd_proc): Remove unused variable `isdead'.
15393 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
15394 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
15395 (x_create_tip_frame): Remove unused variable `tem'.
15397 * w32inevt.c (w32_console_read_socket):
15398 Remove unused variable `no_events'.
15400 * w32term.c (x_draw_composite_glyph_string_foreground):
15401 Remove unused variable `width'.
15403 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
15405 * w32term.c (x_set_glyph_string_clipping):
15406 Don't pass uninitialized region to CombineRgn.
15408 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
15410 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
15411 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
15412 (Fx_close_connection): Remove unused variable `i'.
15414 * w32font.c (w32font_draw): Return number of glyphs.
15415 (w32font_open_internal): Remove unused variable `i'.
15416 (w32font_driver): Add missing initializer.
15418 * w32menu.c (utf8to16): Remove unused variable `utf16'.
15419 (fill_in_menu): Remove unused variable `items_added'.
15421 * w32term.c (last_mouse_press_frame): Remove static global variable.
15422 (w32_clip_to_row): Remove unused variable `f'.
15423 (x_delete_terminal): Remove unused variable `i'.
15425 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
15426 (NOTHING): Remove unused static global variable.
15427 (uniscribe_check_otf): Remove unused variable `table'.
15428 (uniscribe_font_driver): Add missing initializers.
15430 2011-03-23 Julien Danjou <julien@danjou.info>
15432 * term.c (Fsuspend_tty, Fresume_tty):
15433 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
15434 * window.c (temp_output_buffer_show):
15435 * insdel.c (signal_before_change):
15436 * frame.c (Fhandle_switch_frame):
15437 * fileio.c (Fdo_auto_save):
15438 * emacs.c (Fkill_emacs):
15439 * editfns.c (save_excursion_restore):
15440 * cmds.c (internal_self_insert):
15441 * callint.c (Fcall_interactively):
15442 * buffer.c (Fkill_all_local_variables):
15443 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
15445 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
15446 unconditionally since it does the check itself.
15448 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
15450 Fix more problems found by GCC 4.5.2's static checks.
15452 * coding.c (encode_coding_raw_text): Avoid unnecessary test
15453 the first time through the loop, since we know p0 < p1 then.
15454 This also avoids a gcc -Wstrict-overflow warning.
15456 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
15457 leading to a memory leak, possible in functions like
15458 load_charset_map_from_file that can allocate an unbounded number
15459 of objects (Bug#8318).
15461 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
15462 that could (at least in theory) be that large.
15464 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
15465 This is less likely to overflow, and avoids undefined behavior if
15466 overflow does occur. All callers changed. Use strtoul to scan
15467 for the unsigned long integer.
15468 (pint2hrstr): Simplify and tune code slightly.
15469 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
15471 * scroll.c (do_scrolling): Work around GCC bug 48228.
15472 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
15474 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
15475 This also avoids a warning with gcc -Wstrict-overflow.
15476 (validate_x_resource_name): Simplify count usage.
15477 This also avoids a warning with gcc -Wstrict-overflow.
15479 * fileio.c (Fcopy_file): Report error if fchown or fchmod
15482 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
15484 * process.c (Fmake_network_process): Use socklen_t, not int,
15485 where POSIX says socklen_t is required in portable programs.
15486 This fixes a porting bug on hosts like 64-bit HP-UX, where
15487 socklen_t is wider than int (Bug#8277).
15488 (Fmake_network_process, server_accept_connection):
15489 (wait_reading_process_output, read_process_output):
15492 * process.c: Rename or move locals to avoid shadowing.
15493 (list_processes_1, Fmake_network_process):
15494 (read_process_output_error_handler, exec_sentinel_error_handler):
15495 Rename or move locals.
15496 (Fmake_network_process): Define label "retry_connect" only if needed.
15497 (Fnetwork_interface_info): Fix pointer signedness.
15498 (process_send_signal): Add cast to avoid pointer signedness problem.
15499 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
15500 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
15502 Make tparam.h and terminfo.c consistent.
15503 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
15504 Include tparam.h instead, since it declares them.
15505 * cm.h (PC): Remove extern decl; tparam.h now does this.
15506 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
15507 * terminfo.c: Include tparam.h, to check interfaces.
15508 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
15509 (tparam): Adjust signature to match interface in tparam.h;
15510 this removes some undefined behavior. Check that outstring and len
15511 are zero, which they always are with Emacs.
15512 * tparam.h (PC, BC, UP): New extern decls.
15514 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
15515 (xftfont_open): Rename locals to avoid shadowing.
15517 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
15518 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
15519 (OTF_TAG_SYM): Omit macro if not needed.
15520 (ftfont_list): Remove unused local.
15521 (get_adstyle_property, ftfont_pattern_entity):
15522 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
15523 Rename locals to avoid shadowing.
15525 * xfont.c (xfont_list_family): Mark var as initialized.
15527 * xml.c (make_dom): Now static.
15529 * composite.c (composition_compute_stop_pos): Rename local to
15531 (composition_reseat_it): Remove unused locals.
15532 (find_automatic_composition, composition_adjust_point): Likewise.
15533 (composition_update_it): Mark var as initialized.
15534 (find_automatic_composition): Mark vars as initialized,
15535 with a FIXME (Bug#8290).
15537 character.h: Rename locals to avoid shadowing.
15538 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
15539 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
15540 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
15541 (BUF_DEC_POS): Be more systematic about renaming local temporaries
15542 to avoid shadowing.
15544 * textprop.c (property_change_between_p): Remove; unused.
15546 * intervals.c (interval_start_pos): Now static.
15548 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
15550 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
15551 Rename locals to avoid shadowing.
15553 * sound.c (wav_play, au_play, Fplay_sound_internal):
15554 Fix pointer signedness.
15555 (alsa_choose_format): Remove unused local var.
15556 (wav_play): Initialize a variable to 0, to prevent undefined
15557 behavior (Bug#8278).
15559 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
15561 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
15563 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
15564 clobbering (Bug#8298).
15565 * sysdep.c (sys_subshell): Likewise.
15566 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
15568 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
15569 This should get cleaned up, so that child_setup has the
15570 same signature on all platforms.
15572 * callproc.c (call_process_cleanup): Now static.
15573 (relocate_fd): Rename locals to avoid shadowing.
15575 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
15577 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
15578 not to be necessary, and produces flickering.
15580 2011-03-20 Glenn Morris <rgm@gnu.org>
15582 * config.in: Remove file.
15584 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
15586 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
15587 are now in src/globals.h.
15588 (syms_of_minibuf): Remove spurious & from previous change.
15590 2011-03-20 Leo Liu <sdl.web@gmail.com>
15592 * minibuf.c (completing-read-function): New variable.
15593 (completing-read-default): Rename from completing-read.
15594 (completing-read): Call completing-read-function.
15596 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
15598 * xfaces.c (Fx_load_color_file):
15599 Read color file from absolute filename (bug#8250).
15601 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
15603 * makefile.w32-in: Update dependencies.
15605 2011-03-17 Eli Zaretskii <eliz@gnu.org>
15607 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
15609 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
15611 Fix more problems found by GCC 4.5.2's static checks.
15613 * process.c (make_serial_process_unwind, send_process_trap):
15614 (sigchld_handler): Now static.
15616 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
15617 That way, the code declares only the vars that it needs.
15618 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
15619 * s/cygwin.h (PTY_ITERATION): Likewise.
15620 * s/darwin.h (PTY_ITERATION): Likewise.
15621 * s/gnu-linux.h (PTY_ITERATION): Likewise.
15623 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
15624 * process.c (allocate_pty): Don't declare stb unless it's needed.
15626 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
15627 (CONSTANTLIM): Remove; unused.
15628 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
15629 Define only if needed.
15631 * unexelf.c (unexec): Name an expression,
15632 to avoid gcc -Wbad-function-cast warning.
15633 Use a different way to cause a compilation error if anyone uses
15634 n rather than nn, a way that does not involve shadowing.
15635 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
15637 * deps.mk (unexalpha.o): Remove; unused.
15639 New file unexec.h, the (simple) interface for unexec (Bug#8267).
15640 * unexec.h: New file.
15641 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
15642 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
15643 Depend on unexec.h.
15644 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
15645 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
15646 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
15647 Change as necessary to match prototype in unexec.h.
15649 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
15651 (back_comment, skip_chars): Mark vars as initialized.
15653 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
15654 Rename locals to avoid shadowing.
15656 * lread.c (read1): Rewrite so as not to use empty "else".
15657 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
15659 * print.c (Fredirect_debugging_output): Fix pointer signedess.
15661 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
15662 warning when compiling print.c.
15664 * font.c (font_unparse_fcname): Abort in an "impossible" situation
15665 instead of using an uninitialized var.
15666 (font_sort_entities): Mark var as initialized.
15668 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
15670 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
15671 pointers to constants.
15672 (font_parse_fcname): Remove unused vars.
15673 (font_delete_unmatched): Now static.
15674 (font_get_spec): Remove; unused.
15675 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
15676 (font_update_drivers, Ffont_get_glyphs, font_add_log):
15677 Rename or move locals to avoid shadowing.
15679 * fns.c (require_nesting_list, require_unwind): Now static.
15680 (Ffillarray): Rename locals to avoid shadowing.
15682 * floatfns.c (domain_error2): Define only if needed.
15683 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
15685 * alloc.c (mark_backtrace): Move decl from here ...
15686 * lisp.h: ... to here, so that it can be checked.
15688 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
15689 (Fdefvar): Rewrite so as not to use empty "else".
15690 (lisp_indirect_variable): Name an expression,
15691 to avoid gcc -Wbad-function-cast warning.
15692 (Fdefvar): Rename locals to avoid shadowing.
15694 * callint.c (quotify_arg, quotify_args): Now static.
15695 (Fcall_interactively): Rename locals to avoid shadowing.
15696 Use const pointer when appropriate.
15698 * lisp.h (get_system_name, get_operating_system_release):
15699 Move decls here, to check interfaces.
15700 * process.c (get_operating_system_release): Move decl to lisp.h.
15701 * xrdb.c (get_system_name): Likewise.
15702 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
15703 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
15704 some of which prompt warnings from gcc -Wbad-function-cast.
15705 (Fformat_time_string, Fencode_time, Finsert_char):
15706 (Ftranslate_region_internal, Fformat):
15707 Rename or remove local vars to avoid shadowing.
15708 (Ftranslate_region_internal): Mark var as initialized.
15710 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
15713 * lisp.h (eassert): Check that the argument compiles, even if
15714 ENABLE_CHECKING is not defined.
15716 * data.c (Findirect_variable): Name an expression, to avoid
15717 gcc -Wbad-function-cast warning.
15718 (default_value, arithcompare, arith_driver, arith_error): Now static.
15719 (store_symval_forwarding): Rename local to avoid shadowing.
15720 (Fmake_variable_buffer_local, Fmake_local_variable):
15721 Mark variables as initialized.
15722 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
15724 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
15725 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
15726 Rename locals to avoid shadowing.
15727 (mark_stack): Move local variables into the #ifdef region where
15729 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
15730 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
15732 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
15733 (GC_STRING_CHARS): Remove; not used.
15734 (Fmemory_limit): Cast sbrk's returned value to char *.
15736 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
15737 avoids undefined behavior in theory.
15739 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
15741 Use functions, not macros, for up- and down-casing (Bug#8254).
15742 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15743 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
15744 to use the following functions instead of these macros.
15745 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
15746 EMACS_INT, since callers assume the returned value fits in int.
15747 (upcase1): Likewise, for UPCASE_TABLE.
15748 (uppercasep, lowercasep, upcase): New static inline functions.
15749 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
15750 the race-condition problem in the old DOWNCASE.
15752 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
15753 Rename locals to avoid shadowing.
15754 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
15755 (regex_compile, re_search_2, re_match_2_internal):
15756 Remove unused local vars.
15757 (FREE_VAR): Rewrite so as not to use empty "else",
15758 which gcc can warn about.
15759 (regex_compile, re_match_2_internal): Mark locals as initialized.
15760 (RETALLOC_IF): Define only if needed.
15761 (WORDCHAR_P): Likewise. This one is never needed, but is used
15762 only in a comment talking about a compiler bug, so put inside
15763 the #if 0 of that comment.
15764 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
15765 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
15768 * search.c (boyer_moore): Rename locals to avoid shadowing.
15769 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
15770 (PREV_CHAR_BOUNDARY): Likewise.
15772 * search.c (simple_search): Remove unused var.
15774 * dired.c (compile_pattern): Move decl from here ...
15775 * lisp.h: ... to here, so that it can be checked.
15776 (struct re_registers): New forward decl.
15778 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
15780 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
15782 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
15783 Rename locals to avoid shadowing.
15784 (Fvertical_motion): Mark locals as initialized.
15786 * casefiddle.c (casify_object, casify_region): Now static.
15787 (casify_region): Mark local as initialized.
15789 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
15791 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
15792 New macros, so that the caller can use some names other than
15793 gcpro1, gcpro2, etc.
15794 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
15796 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
15797 argument, for consistency with GCPRO2_VAR, etc: it is now the
15798 prefix of the variable, not the variable itself. All uses
15800 * dired.c (directory_files_internal, file_name_completion):
15801 Rename locals to avoid shadowing.
15803 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
15804 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
15805 dired.c's scmp function, had undefined behavior.
15806 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15807 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
15808 * buffer.h: ... to here, because these macros use current_buffer,
15809 and the new implementation with inline functions needs to have
15810 current_buffer in scope now, rather than later when the macros
15812 (downcase, upcase1): New static inline functions.
15813 (DOWNCASE, UPCASE1): Reimplement using these functions.
15814 This avoids undefined behavior in expressions like
15815 DOWNCASE (x) == DOWNCASE (y), which previously suffered
15816 from race conditions in accessing the global variables
15817 case_temp1 and case_temp2.
15818 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
15819 * lisp.h (case_temp1, case_temp2): Remove their decls.
15820 * character.h (ASCII_CHAR_P): Move from here ...
15821 * lisp.h: ... to here, so that the inline functions mentioned
15822 above can use them.
15824 * dired.c (directory_files_internal_unwind): Now static.
15826 * fileio.c (file_name_as_directory, directory_file_name):
15827 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
15829 (file_name_as_directory): Use const pointers when appropriate.
15830 (Fexpand_file_name): Likewise. In particular, newdir might
15831 point at constant storage, so make it a const pointer.
15832 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
15833 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
15835 (Fset_file_times, Finsert_file_contents, auto_save_error):
15836 Rename locals to avoid shadowing.
15838 * minibuf.c (choose_minibuf_frame_1): Now static.
15839 (Ftry_completion, Fall_completions): Rename or remove locals
15840 to avoid shadowing.
15842 * marker.c (bytepos_to_charpos): Remove; unused.
15844 * lisp.h (verify_bytepos, count_markers): New decls,
15845 so that gcc does not warn that these functions aren't declared.
15847 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
15848 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
15849 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
15850 (copy_text): Remove unused local var.
15852 * filelock.c (within_one_second): Now static.
15853 (lock_file_1): Rename local to avoid shadowing.
15855 * buffer.c (fix_overlays_before): Mark locals as initialized.
15856 (fix_start_end_in_overlays): Likewise. This function should be
15857 simplified by using pointers-to-pointers, but that's a different
15859 (switch_to_buffer_1): Now static.
15860 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
15861 (report_overlay_modification): Rename locals to avoid shadowing.
15863 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
15864 Fix pointer signedness issue.
15865 (sys_subshell): Mark local as volatile if checking for lint,
15866 to suppress a gcc -Wclobbered warning that does not seem to be right.
15867 (MAXPATHLEN): Define only if needed.
15869 * process.c (serial_open, serial_configure): Move decls from here ...
15870 * systty.h: ... to here, so that they can be checked.
15872 * fns.c (get_random, seed_random): Move extern decls from here ...
15873 * lisp.h: ... to here, so that they can be checked.
15875 * sysdep.c (reset_io): Now static.
15876 (wait_for_termination_signal): Remove; unused.
15878 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
15879 (copy_keymap_item, append_key, push_text_char_description):
15881 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
15882 (DENSE_TABLE_SIZE): Remove; unused.
15883 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
15884 (describe_map_tree):
15885 Rename locals to avoid shadowing.
15887 * keyboard.c: Declare functions static if they are not used elsewhere.
15888 (echo_char, echo_dash, cmd_error, top_level_2):
15889 (poll_for_input, handle_async_input): Now static.
15890 (read_char, kbd_buffer_get_event, make_lispy_position):
15891 (make_lispy_event, make_lispy_movement, apply_modifiers):
15892 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
15893 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
15894 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
15895 (read_key_sequence, read_char): Mark locals as initialized.
15896 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
15898 * keyboard.h (make_ctrl_char): New decl.
15899 (mark_kboards): Move decl here ...
15900 * alloc.c (mark_kboards): ... from here.
15902 * lisp.h (force_auto_save_soon): New decl.
15904 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
15905 (DEFINE_DUMMY_FUNCTION): New macro.
15906 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
15908 (main): Add casts to avoid warnings
15909 if GCC considers string literals to be constants.
15911 * lisp.h (fatal_error_signal): Add decl, since it's exported.
15913 * dbusbind.c: Pointer signedness fixes.
15914 (xd_signature, xd_append_arg, xd_initialize):
15915 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15916 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15917 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
15918 (Fdbus_register_signal): Use SSDATA when the context wants char *.
15920 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
15921 if GCC considers string literals to be constants.
15922 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
15924 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
15926 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
15927 (print_preprocess, print_object): New macro to fix last change.
15929 * print.c (print_preprocess): Don't forget font objects.
15931 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
15933 * emacs.c (USAGE3): Doc fixes.
15935 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
15937 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
15940 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
15942 * lisp.h (VWindow_system, Qfile_name_history):
15943 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
15944 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
15945 (w32_system_caret_x, w32_system_caret_y): Declare extern.
15947 * w32select.c: Don't #include "keyboard.h".
15948 (run_protected): Add extern declaration for waiting_for_input.
15950 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
15951 * w32console.c (detect_input_pending, read_input_pending)
15952 (encode_terminal_code):
15953 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
15954 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
15955 (w32_system_caret_y, Qfile_name_history):
15956 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
15957 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
15958 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
15959 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
15960 * w32proc.c (Qlocal, report_file_error):
15961 * w32term.c (Vwindow_system, updating_frame):
15962 * w32uniscribe.c (initialized, uniscribe_font_driver):
15963 Remove unneeded extern declarations.
15965 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
15967 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
15969 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
15971 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
15972 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
15973 These macros can no longer be used for assignment.
15975 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
15976 Assign struct members directly, instead of using BUF_BEGV etc.
15977 (record_buffer_markers, fetch_buffer_markers): New functions for
15978 recording and fetching special buffer markers.
15979 (set_buffer_internal_1, set_buffer_temp): Use them.
15981 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
15983 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
15985 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
15986 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
15988 * xdisp.c (hscroll_window_tree):
15989 (reconsider_clip_changes): Use PT instead of BUF_PT.
15991 2011-03-13 Eli Zaretskii <eliz@gnu.org>
15993 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
15994 $(EMACS_ROOT)/lib/intprops.h.
15996 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
15998 Fix more problems found by GCC 4.5.2's static checks.
16000 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
16001 to unsigned char * to avoid compiler diagnostic.
16002 (xg_free_frame_widgets): Make it clear that a local variable is
16003 needed only if USE_GTK_TOOLTIP.
16004 (gdk_window_get_screen): Make it clear that this macro is needed
16005 only if USE_GTK_TOOLTIP.
16006 (int_gtk_range_get_value): New function, which avoids a diagnostic
16007 from gcc -Wbad-function-cast.
16008 (xg_set_toolkit_scroll_bar_thumb): Use it.
16009 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
16010 diagnostic from gcc -Wbad-function-cast.
16011 (get_utf8_string, xg_get_file_with_chooser):
16012 Rename locals to avoid shadowing.
16013 (create_dialog): Move locals to avoid shadowing.
16015 * xgselect.c (xg_select): Remove unused var.
16017 * image.c (four_corners_best): Mark locals as initialized.
16018 (gif_load): Initialize transparent_p to zero (Bug#8238).
16019 Mark another local as initialized.
16020 (my_png_error, my_error_exit): Mark with NO_RETURN.
16022 * image.c (clear_image_cache): Now static.
16023 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
16024 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
16025 (x_edge_detection): Remove unnecessary cast that
16026 gcc -Wbad-function-cast diagnoses.
16027 (gif_load): Fix pointer signedness.
16028 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
16029 (jpeg_load, gif_load): Rename locals to avoid shadowing.
16031 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
16033 Improve quality of tests for time stamp overflow.
16034 For example, without this patch (encode-time 0 0 0 1 1
16035 1152921504606846976) returns the obviously-bogus value (-948597
16036 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
16037 reports time overflow. See
16038 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
16039 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
16040 * editfns.c: Include limits.h and intprops.h.
16041 (TIME_T_MIN, TIME_T_MAX): New macros.
16042 (time_overflow): Move earlier, to before first use.
16043 (hi_time, lo_time): New functions, for an accurate test for
16044 out-of-range times.
16045 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
16046 (Fget_internal_run_time): Don't assume time_t fits in int.
16047 (make_time): Use list2 instead of Fcons twice.
16048 (Fdecode_time): More accurate test for out-of-range times.
16049 (check_tm_member): New function.
16050 (Fencode_time): Use it, to test for out-of-range times.
16051 (lisp_time_argument): Don't rely on undefined left-shift and
16052 right-shift behavior when checking for time stamp overflow.
16054 * editfns.c (time_overflow): New function, refactoring common code.
16055 (Fformat_time_string, Fdecode_time, Fencode_time):
16056 (Fcurrent_time_string): Use it.
16058 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
16059 * dired.c (make_time): Move to ...
16060 * editfns.c (make_time): ... here.
16061 * systime.h: Note the move.
16063 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16065 * fringe.c (update_window_fringes): Remove unused variables.
16067 * unexmacosx.c (copy_data_segment): Also copy __got section.
16070 2011-03-12 Eli Zaretskii <eliz@gnu.org>
16072 * termcap.c [MSDOS]: Include "msdos.h".
16073 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
16074 Constify `char *' arguments and their references according to
16075 prototypes in tparam.h.
16077 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
16079 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
16080 Adapt all references accordingly.
16082 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
16084 2011-03-11 Tom Tromey <tromey@redhat.com>
16086 * buffer.c (syms_of_buffer): Remove obsolete comment.
16088 2011-03-11 Eli Zaretskii <eliz@gnu.org>
16090 * termhooks.h (encode_terminal_code): Declare prototype.
16092 * msdos.c (encode_terminal_code): Don't declare prototype.
16094 * term.c (encode_terminal_code): Now external again, used by
16095 w32console.c and msdos.c.
16097 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
16098 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
16100 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
16102 Fix some minor problems found by GCC 4.5.2's static checks.
16104 * fringe.c (update_window_fringes): Mark locals as initialized
16106 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
16108 * alloc.c (mark_fringe_data): Move decl from here ...
16109 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
16110 to check its interface.
16111 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
16113 * fontset.c (free_realized_fontset): Now static.
16114 (Fset_fontset_font): Rename local to avoid shadowing.
16115 (fontset_font): Mark local as initialized.
16116 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
16118 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
16120 * xselect.c (x_disown_buffer_selections): Remove; not used.
16121 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
16122 (x_own_selection, Fx_disown_selection_internal): Rename locals
16123 to avoid shadowing.
16124 (x_handle_dnd_message): Remove local to avoid shadowing.
16126 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
16127 so that the caller can use some name other than gcpro1.
16128 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
16129 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
16130 (Fx_backspace_delete_keys_p):
16131 Use them to avoid shadowing, and rename vars to avoid shadowing.
16132 (x_decode_color, x_set_name, x_window): Now static.
16133 (Fx_create_frame): Add braces to silence GCC warning.
16134 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
16135 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
16136 Remove unused locals.
16137 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
16138 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
16139 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
16142 * xterm.h (x_mouse_leave): New decl.
16144 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
16145 Remove unused functions.
16146 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
16147 (x_calc_absolute_position): Now static.
16148 (XTread_socket): Don't define label "out" unless it's used.
16149 Don't declare local "event" unless it's used.
16150 (x_iconify_frame, x_free_frame_resources): Don't declare locals
16151 unless they are used.
16152 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
16153 (x_fatal_error_signal): Remove; not used.
16154 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
16155 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
16156 (x_error_catcher, x_connection_closed, x_error_handler):
16157 (x_error_quitter, xembed_send_message, x_iconify_frame):
16158 (my_log_handler): Rename locals to avoid shadowing.
16159 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
16160 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
16162 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
16163 Rename or move locals to avoid shadowing.
16164 (tty_defined_color, merge_face_heights): Now static.
16165 (free_realized_faces_for_fontset): Remove; not used.
16166 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
16167 does not deduce is never used uninitialized.
16168 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
16169 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
16171 * terminal.c (store_terminal_param): Now static.
16173 * xmenu.c (menu_highlight_callback): Now static.
16174 (set_frame_menubar): Remove unused local.
16175 (xmenu_show): Rename parameter to avoid shadowing.
16176 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
16177 since they might point to immutable storage.
16178 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
16179 since it's unused otherwise.
16181 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
16182 Add a FIXME, since the code still doesn't look right. (Bug#8215)
16183 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
16184 avoids a gcc -Wuninitialized diagnostic.
16185 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
16186 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
16187 does not deduce are never used uninitialized.
16189 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
16191 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
16192 * window.c (window_loop, size_window):
16193 (run_window_configuration_change_hook, enlarge_window): Likewise.
16195 * window.c (display_buffer): Now static.
16196 (size_window): Mark variables that gcc -Wuninitialized
16197 does not deduce are never used uninitialized.
16198 * window.h (check_all_windows): New decl, to forestall
16199 gcc -Wmissing-prototypes diagnostic.
16200 * dispextern.h (bidi_dump_cached_states): Likewise.
16202 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
16204 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
16205 Include <limits.h>.
16206 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
16207 and to avoid gcc -Wuninitialized warning.
16208 (load_charset_map): Mark variables that gcc -Wuninitialized
16209 does not deduce are never used uninitialized.
16210 (load_charset): Abort instead of using uninitialized var (Bug#8229).
16212 * coding.c (coding_set_source, coding_set_destination):
16213 Use "else { /* comment */ }" rather than "else /* comment */;"
16214 for clarity, and to avoid gcc -Wempty-body warning.
16215 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
16216 a block, when the outer 'i' will do.
16217 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
16218 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
16219 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
16220 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
16221 (Fdecode_sjis_char, Fdefine_coding_system_internal):
16222 Rename locals to avoid shadowing.
16223 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
16224 * coding.c (emacs_mule_char, encode_invocation_designation):
16225 Now static, since they're not used elsewhere.
16226 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
16227 (decode_coding_object, encode_coding_object, detect_coding_system):
16228 (decode_coding_emacs_mule): Mark variables that gcc
16229 -Wuninitialized does not deduce are never used uninitialized.
16230 (detect_coding_iso_2022): Initialize a local variable that might
16231 be used uninitialized. Leave a FIXME because it's not clear that
16232 this initialization is needed. (Bug#8211)
16233 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
16234 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
16235 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
16236 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
16237 Remove unused macros.
16239 * category.c (hash_get_category_set): Remove unused local var.
16240 (copy_category_table): Now static, since it's not used elsewhere.
16241 * character.c (string_count_byte8): Likewise.
16243 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
16244 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
16246 * chartab.c (copy_sub_char_table): Now static, since it's not used
16248 (sub_char_table_ref_and_range, char_table_ref_and_range):
16249 Rename locals to avoid shadowing.
16250 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
16252 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
16253 (BIDI_BOB): Remove unused macro.
16255 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
16256 deduce are never used uninitialized.
16257 * term.c (encode_terminal_code): Likewise.
16259 * term.c (encode_terminal_code): Now static. Remove unused local.
16261 * tparam.h: New file.
16262 * term.c, tparam.h: Include it.
16263 * deps.mk (term.o, tparam.o): Depend on tparam.h.
16264 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
16265 Move these decls to tparam.h, and make them agree with what
16266 is actually in tparam.c. The previous trick of using incompatible
16267 decls in different modules does not conform to the C standard.
16268 All callers of tparam changed to use tparam's actual API.
16269 * tparam.c (tparam1, tparam, tgoto):
16270 Use const pointers where appropriate.
16272 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
16273 * cm.h (struct cm): Likewise.
16274 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
16275 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
16276 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
16277 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
16278 (turn_on_face, init_tty): Likewise.
16279 * termchar.h (struct tty_display_info): Likewise.
16281 * term.c (term_mouse_position): Rename local to avoid shadowing.
16283 * alloc.c (mark_ttys): Move decl from here ...
16284 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
16286 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
16288 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
16290 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
16292 * search.c (compile_pattern_1): Remove argument regp, unused since
16293 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
16294 (compile_pattern): Don't pass it.
16296 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
16298 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
16299 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
16301 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
16303 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
16305 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
16306 gdk_window_get_screen, gdk_window_get_geometry,
16307 gdk_x11_window_lookup_for_display and GDK_KEY_g.
16308 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
16309 (xg_get_pixbuf_from_pixmap): New function.
16310 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
16311 to Pixmap, take frame as parameter, remove GdkColormap parameter.
16312 Call xg_get_pixbuf_from_pixmap instead of
16313 gdk_pixbuf_get_from_drawable.
16314 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
16315 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
16316 (xg_check_special_colors): Use GtkStyleContext and its functions
16318 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
16319 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
16320 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
16321 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
16322 Call gtk_widget_get_preferred_size.
16323 (xg_frame_resized): gdk_window_get_geometry only takes 5
16325 (xg_win_to_widget, xg_event_is_for_menubar):
16326 Call gdk_x11_window_lookup_for_display.
16327 (xg_set_widget_bg): New function.
16328 (delete_cb): New function.
16329 (xg_create_frame_widgets): Connect delete-event to delete_cb.
16330 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
16331 (xg_set_background_color): Call xg_set_widget_bg.
16332 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
16333 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
16334 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
16335 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
16337 (update_frame_tool_bar): Call gtk_widget_hide.
16338 (xg_initialize): Use GDK_KEY_g.
16340 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
16342 (x_session_initialize): Call gdk_x11_set_sm_client_id.
16344 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
16345 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
16346 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
16348 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
16350 * w32xfns.c (select_palette): Check success of RealizePalette against
16351 GDI_ERROR, not zero.
16353 See ChangeLog.11 for earlier changes.
16355 ;; Local Variables:
16359 Copyright (C) 2011-2012 Free Software Foundation, Inc.
16361 This file is part of GNU Emacs.
16363 GNU Emacs is free software: you can redistribute it and/or modify
16364 it under the terms of the GNU General Public License as published by
16365 the Free Software Foundation, either version 3 of the License, or
16366 (at your option) any later version.
16368 GNU Emacs is distributed in the hope that it will be useful,
16369 but WITHOUT ANY WARRANTY; without even the implied warranty of
16370 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16371 GNU General Public License for more details.
16373 You should have received a copy of the GNU General Public License
16374 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.