MS-Windows adaptations for 2012-08-25T04:04:08Z!eggert@cs.ucla.edu and 2012-08-25T04...
[bpt/emacs.git] / src / ChangeLog
CommitLineData
391ceac5
EZ
12012-08-25 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
4
2f221583
PE
52012-08-25 Paul Eggert <eggert@cs.ucla.edu>
6
f4a681b0
PE
7 On assertion failure, print backtrace if available.
8 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
9 (die) [ENABLE_CHECKING]: Print a backtrace if available.
10 * Makefile.in (LIB_EXECINFO): New macro.
11 (LIBES): Use it.
12
2f221583
PE
13 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
14 * bytecode.c (exec_byte_code):
15 * callint.c (check_mark, Fcall_interactively):
16 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
17 (getenv_internal, sync_process_alive, call_process_exited):
18 * lisp.h (USE_SAFE_ALLOCA):
19 Use bool for booleans, instead of int.
20 * lisp.h, process.h: Adjust prototypes to match above changes.
21 * callint.c (Fcall_interactively): Don't assume the mark's
22 offset fits in 'int'.
23
37ef52bb
PE
242012-08-24 Paul Eggert <eggert@cs.ucla.edu>
25
26 * buffer.c, buffer.h: Use bool for boolean.
27 * buffer.c (reset_buffer_local_variables)
28 (buffer_lisp_local_variables, Fset_buffer_modified_p)
29 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
30 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
31 (overlay_touches_p, overlay_strings, Foverlay_put)
32 (report_overlay_modification, call_overlay_mod_hooks):
33 (mmap_enlarge, mmap_set_vars):
34 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
35 Use bool for booleans, instead of int.
36 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
37 since the 1-or-0 return value is always ignored anyway.
38 (mmap_initialized_p):
39 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
40 * buffer.h, lisp.h: Adjust prototypes to match above changes.
41
2cc21167
PE
422012-08-23 Paul Eggert <eggert@cs.ucla.edu>
43
44 * bidi.c: Use bool for boolean.
45 This is a bit more readable, and makes the text segment of bidi.o
46 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
47 Presumably it's faster too.
48 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
49 Now bool.
50 (bidi_cache_find_level_change, bidi_cache_iterator_state)
51 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
52 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
53 (bidi_explicit_dir_char, bidi_level_of_next_char)
54 (bidi_find_other_level_edge, bidi_move_to_visually_next):
55 Use bool for booleans, instead of int.
56 * dispextern.h (bidi_init_it, bidi_paragraph_init)
57 (bidi_unshelve_cache): Adjust decls to match code.
58
7db4ddf4
MR
592012-08-23 Martin Rudalics <rudalics@gmx.at>
60
61 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
62 argument.
63
b1bb8011
PE
642012-08-23 Paul Eggert <eggert@cs.ucla.edu>
65
66 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
67 * atimer.h: Include <stdbool.h>.
68
ff687885
DN
692012-08-22 Dan Nicolaescu <dann@gnu.org>
70
71 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
72 compile time tests instead of run time tests on systems that do
73 not use them.
74 (FRAME_MAC_P): Remove leftover from deleted code.
75 * frame.c (syms_of_frame): Remove leftover from deleted code.
76
4ce7a138
JD
772012-08-22 Jan Djärv <jan.h.d@swipnet.se>
78
79 * nsterm.m (insertText:): Don't clear modifiers if code is space.
80
d733ec6d
PE
812012-08-22 Paul Eggert <eggert@cs.ucla.edu>
82
83 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
84 Otherwise, the compiler complains about (A?B:C) where B is void
85 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
86 (fontset_add): Return void, for FONTSET_ADD.
87
d0d2d26f
PE
882012-08-21 Paul Eggert <eggert@cs.ucla.edu>
89
fce31d69
PE
90 * alloc.c: Use bool for booleans.
91 (gc_in_progress, abort_on_gc)
92 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
93 (dont_register_blocks) [GC_MALLOC_CHECK]:
94 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
95 (check_string_bytes, make_specified_string, memory_full)
96 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
97 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
98 (mark_stack, valid_pointer_p, make_pure_string)
99 (Fgarbage_collect, survives_gc_p, gc_sweep):
100 Use bool for booleans, instead of int.
101 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
102 Remove unused local.
103 * alloc.c (PURE_POINTER_P):
104 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
105 * editfns.c (Fformat):
106 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
107 (Fdo_auto_save):
108 * fns.c (sweep_weak_table):
109 * lisp.h (suppress_checking, push_message, survives_gc_p)
110 (make_pure_string, gc_in_progress, abort_on_gc):
111 * lread.c (readchar, read1):
112 * print.c (Fprin1_to_string):
113 * xdisp.c (push_message):
114 Use bool for booleans affected directly or indirectly by
115 alloc.c's changes.
116
d0d2d26f
PE
117 Make recently-introduced setters macros.
118 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
119 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
120 (set_fontset_default, set_fontset_fallback): Rename from their
121 upper-case counterparts, and make them functions rather than macros.
122 This is more consistent with the other recently-introduced setters.
123 These don't need to be inline, since they're local.
124
d18e2bb6
JD
1252012-08-21 Jan Djärv <jan.h.d@swipnet.se>
126
127 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
128 the loop (Bug#12247).
129
1b9d9d16
PE
1302012-08-21 Paul Eggert <eggert@cs.ucla.edu>
131
132 * lisp.h (vcopy): Use memcpy rather than our own loop.
133 This fixes a performance regression introduced by the recent
134 addition of vcopy. This means 'vcopy' will need to be modified
135 for a copying collector, but that's OK. Also, tighten the
136 checking in the assertion.
137
b2f09701
EZ
1382012-08-21 Eli Zaretskii <eliz@gnu.org>
139
140 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
141 components for RTL text (Bug#11860). Adjust X-OFFSET of each
142 non-base glyph for the width of the base character, according to
143 what x_draw_composite_glyph_string_foreground expects. Generate
144 WADJUST value according to composition_gstring_width's
145 expectations, to produce correct width of the composed character.
146 Reverse the sign of the DU offset produced by ScriptPlace.
147
9b994fed
PE
1482012-08-21 Paul Eggert <eggert@cs.ucla.edu>
149
150 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
151
086ca913
DA
1522012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
153
154 Avoid direct writes to contents member of struct Lisp_Vector.
155 * lisp.h (vcopy): New function to copy data into vector.
156 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
157 * fns.c (Ffillarray): Use ASET.
158 * keyboard.c (timer_check_2): Use AREF and ASET.
159 (append_tool_bar_item, Frecent_keys): Use vcopy.
160 * lread.c (read_vector): Use ASET.
161 * msdos.c (Frecent_doskeys): Use vcopy.
162 * xface.c (Finternal_copy_lisp_face): Use vcopy.
163 (Finternal_merge_in_global_face): Use ASET and vcopy.
164 * xfont.c (xfont_list_pattern): Likewise.
165
5481664a
MR
1662012-08-21 Martin Rudalics <rudalics@gmx.at>
167
168 * window.c (Fwindow_point): For the selected window always return
169 the position of its buffer's point.
170 (Fset_window_point): For the selected window always go in its
171 buffer to the specified position.
172
6d470bdd
DA
1732012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
174
175 Setter macros for fontsets.
176 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
177 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
178 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
179 Adjust users.
180
24564fe1
GM
1812012-08-20 Glenn Morris <rgm@gnu.org>
182
183 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
184 Don't assume that `ln -f' works.
185
0a05a035
EZ
1862012-08-20 Eli Zaretskii <eliz@gnu.org>
187
188 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
189 and later about non-assignments with no effect. See discussion at
190 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
191 details.
192
e46f2325
DA
1932012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
194
195 Inline setter functions for Lisp_Objects slots of struct specbinding.
196 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
197 Adjust users.
198
734fbd86
MR
1992012-08-20 Martin Rudalics <rudalics@gmx.at>
200
201 * window.c (select_window): Always make selected window's buffer
202 current.
203
f1a95992
DA
2042012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
205
206 Use AREF and ASET for docstrings of category tables.
207 * category.h (CATEGORY_DOCSTRING): Use AREF.
208 (SET_CATEGORY_DOCSTRING): Use ASET.
209 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
210
e83064be
DA
2112012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
212
213 Inline setter functions for hash table members.
214 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
215 (set_hash_hash, set_hash_index): Rename with _slot suffix.
216 (set_hash_key_and_value, set_hash_index, set_hash_next)
217 (set_hash_hash): New functions.
218 * charset.c, fns.c: Adjust users.
219
4ce60d2e
DA
2202012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
221
222 Inline getter and setter functions for per-buffer values.
223 * buffer.h (per_buffer_default, set_per_buffer_default)
224 (per_buffer_value, set_per_buffer_value): New functions.
225 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
226 * buffer.c, data.c: Adjust users.
227
c06c9690
JB
2282012-08-20 Juanma Barranquero <lekktu@gmail.com>
229
230 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
231
32bd4250
PE
2322012-08-19 Paul Eggert <eggert@cs.ucla.edu>
233
bad03192 234 Rely on <config.h> + <unistd.h> to declare 'environ',
b69a6d22
PE
235 as gnulib does this if the system doesn't.
236 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
72279493
EZ
237 Remove declaration. MS-Windows declares it on stdlib.h which is
238 included by conf_post.h.
b69a6d22
PE
239 * emacs.c (environ) [DOUG_LEA_MALLOC]:
240 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
241 * vm-limit.c: Include <unistd.h>, for 'environ'.
242
22d7feb2
PE
243 * unexaix.c, unexcoff.c: Include "mem-limits.h".
244 (start_of_data): Remove decl; mem-limits.h provides it.
245
32bd4250
PE
246 * xdisp.c (handle_invisible_prop): Make it a bit faster
247 and avoid a gcc -Wmaybe-uninitialized diagnostic.
248
450809af
CY
2492012-08-19 Chong Yidong <cyd@gnu.org>
250
251 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
252 ends (Bug#3874).
253
9e677988
AS
2542012-08-19 Andreas Schwab <schwab@linux-m68k.org>
255
6b1319ce
AS
256 * .gdbinit: Use call instead of set when calling a function in the
257 inferior.
258
9e677988
AS
259 * data.c (set_internal): Don't use set_blv_found.
260 (Fkill_local_variable): Likewise.
261
d7191076
AA
2622012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
263
264 * nsfont.m (ns_ascii_average_width): Ensure the string
265 ascii_printable is initialized with a null-terminated character
266 array. Otherwise, it can contain undesired extra characters.
267
e757f1c6
PE
2682012-08-18 Paul Eggert <eggert@cs.ucla.edu>
269
270 port new setting code to Sun C 5.8 2005/10/13
271 * chartab.c, lisp.h (char_table_set, char_table_set_range):
272 Return void, not Lisp_Object. Otherwise, the compiler
273 complains about (A?B:C) where B is void and C is Lisp_Object
274 when compiling CHAR_TABLE_SET, due to the recent change to
275 the API of sub_char_table_set_contents.
276
a999ce26
CY
2772012-08-18 Chong Yidong <cyd@gnu.org>
278
279 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
280 for the string case (Bug#3874).
281
3f22b86f
PE
2822012-08-18 Paul Eggert <eggert@cs.ucla.edu>
283
39eb03f1
PE
284 * buffer.h (BSET): Remove (Bug#12215).
285 Replace all uses with calls to new setter functions.
286 (bset_bidi_paragraph_direction, bset_case_canon_table)
287 (bset_case_eqv_table, bset_directory, bset_display_count)
288 (bset_display_time, bset_downcase_table)
289 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
290 (bset_last_selected_window, bset_local_var_alist)
291 (bset_mark_active, bset_point_before_scroll, bset_read_only)
292 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
293 (bset_width_table):
294 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
295 (bset_auto_fill_function, bset_auto_save_file_format)
296 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
297 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
298 (bset_cache_long_line_scans, bset_case_fold_search)
299 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
300 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
301 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
302 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
303 (bset_header_line_format, bset_indicate_buffer_boundaries)
304 (bset_indicate_empty_lines, bset_invisibility_spec)
305 (bset_left_fringe_width, bset_major_mode, bset_mark)
306 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
307 (bset_name, bset_overwrite_mode, bset_pt_marker)
308 (bset_right_fringe_width, bset_save_length)
309 (bset_scroll_bar_width, bset_scroll_down_aggressively)
310 (bset_scroll_up_aggressively, bset_selective_display)
311 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
312 (bset_word_wrap, bset_zv_marker):
313 * category.c (bset_category_table):
314 * syntax.c (bset_syntax_table):
315 New setter functions.
316
6a09a33b
PE
317 * process.h (PSET): Remove (Bug#12215).
318 Replace all uses with calls to new setter functions.
319 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
320 (PROCESS_INLINE): New macro.
321 (pset_childp): New setter function.
322 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
323 * process.c (PROCESS_INLINE):
324 Define to EXTERN_INLINE, so that the corresponding functions
325 are compiled into code.
326 (pset_buffer, pset_command, pset_decode_coding_system)
327 (pset_decoding_buf, pset_encode_coding_system)
328 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
329 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
330 (pset_type, pset_write_queue): New setter functions.
331
e8c17b81
PE
332 * window.h (WSET): Remove (Bug#12215).
333 Replace all uses with calls to new setter functions.
334 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
335 (WINDOW_INLINE): New macro.
336 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
337 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
338 (wset_total_lines, wset_vertical_scroll_bar)
339 (wset_window_end_pos, wset_window_end_valid)
340 (wset_window_end_vpos): New setter functions.
341 * window.c (WINDOW_INLINE):
342 Define to EXTERN_INLINE, so that the corresponding functions
343 are compiled into code.
344 (wset_combination_limit, wset_dedicated, wset_display_table)
345 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
346 (wset_new_normal, wset_new_total, wset_next_buffers)
347 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
348 (wset_prev_buffers, wset_right_fringe_width)
349 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
350 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
351 (wset_window_parameters):
352 * xdisp.c (wset_base_line_number, wset_base_line_pos)
353 (wset_column_number_displayed, wset_region_showing):
354 New setter functions.
355
3f22b86f
PE
356 * termhooks.h (TSET): Remove (Bug#12215).
357 Replace all uses with calls to new setter functions.
358 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
359 (TERMHOOKS_INLINE): New macro.
360 (tset_charset_list, tset_selection_alist): New setter functions.
361 * terminal.c (TERMHOOKS_INLINE):
362 Define to EXTERN_INLINE, so that the corresponding functions
363 are compiled into code.
364 (tset_param_alist): New setter function.
365
742af32f
PE
3662012-08-17 Paul Eggert <eggert@cs.ucla.edu>
367
15dbb4d6
PE
368 * keyboard.h (KSET): Remove (Bug#12215).
369 Replace all uses with calls to new setter functions.
370 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
371 (KEYBOARD_INLINE): New macro.
372 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
373 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
374 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
375 New setter functions.
376 * keyboard.c (KEYBOARD_INLINE):
377 Define to EXTERN_INLINE, so that the corresponding functions
378 are compiled into code.
379 (kset_echo_string, kset_kbd_queue)
380 (kset_keyboard_translate_table, kset_last_prefix_arg)
381 (kset_last_repeatable_command, kset_local_function_key_map)
382 (kset_overriding_terminal_local_map, kset_real_last_command)
383 (kset_system_key_syms): New setter functions.
384
f00af5b1
PE
385 * frame.h (FSET): Remove (Bug#12215).
386 Replace all uses with calls to new setter functions.
387 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
388 (FRAME_INLINE): New macro.
389 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
390 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
391 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
392 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
393 (fset_param_alist, fset_root_window, fset_scroll_bars)
394 (fset_selected_window, fset_title, fset_tool_bar_items)
395 (fset_tool_bar_position, fset_tool_bar_window): New functions.
396 * frame.c (FRAME_INLINE):
397 Define to EXTERN_INLINE, so that the corresponding functions
398 are compiled into code.
399 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
400
0c94c8d6
PE
401 A few more naming-convention fixes for getters and setters.
402 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
403 and rename from buffer_overlays_set_before.
404 (set_buffer_overlays_after): Move here from buffer.h, and rename
405 from buffer_overlays_set_after.
406 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
407 All uses changed.
408 (set_buffer_intervals): Rename from buffer_set_intervals.
409 * intervals.c (set_interval_object): Move here from intervals.h,
410 and rename from interval_set_object.
411 (set_interval_left): Move here from intervals.h, and rename from
412 interval_set_left.
413 (set_interval_right): Move here from intervals.h, and rename from
414 interval_set_right.
415 (copy_interval_parent): Move here from intervals.h, and rename from
416 interval_copy_parent.
417 * intervals.h (set_interval_parent): Rename from interval_set_parent.
418 (set_interval_plist): Rename from interval_set_plist.
419 Return void, not Lisp_Object, since no caller uses the result.
420 * lisp.h (string_intervals): Rename from string_get_intervals.
421 (set_string_intervals): Rename from string_set_intervals.
422
34dabdb7
PE
423 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
424 (set_char_table_contents): Rename from char_table_set_contents.
0b390a9d 425 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
34dabdb7
PE
426 All uses changed. See the end of
427 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
428
742af32f
PE
429 * lisp.h (CSET): Remove (Bug#12215).
430 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
431 (set_char_table_purpose): New functions,
432 replacing CSET. All uses changed. For example, replace
433 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
c24eb18a 434 "set_char_table_parent (char_table, parent);".
742af32f
PE
435 The old version was confusing because it used the same name
436 'parent' for two different things.
437
a04e2c62
DA
4382012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
439
440 Functions to get and set Lisp_Object fields of buffer-local variables.
441 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
442 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
443 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
444 * data.c, eval.c, frame.c: Adjust users.
445
383dcbf9
CY
4462012-08-17 Chong Yidong <cyd@gnu.org>
447
448 * xfaces.c (merge_face_vectors): If the target font specfies a
449 font spec, make the font's attributes take precedence over
450 directly-specified attributes.
451 (merge_face_ref): Recognize :font.
452
44386687
DA
4532012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
454
455 Do not use memcpy for copying intervals.
456 * intervals.c (reproduce_interval): New function.
457 (reproduce_tree, reproduce_tree_obj): Use it.
458 (reproduce_tree_obj): Remove prototype.
459
927c7216
PE
4602012-08-17 Paul Eggert <eggert@cs.ucla.edu>
461
462 * lisp.h (duration_to_sec_usec): Remove unused decl.
463
93044f7b
AA
4642012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
465
466 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
467 to an allocated instance of NSString, not to the class itself.
468
9851e4a5
JB
4692012-08-17 Juanma Barranquero <lekktu@gmail.com>
470
471 * makefile.w32-in (C_CTYPE_H): New macro.
472 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
473 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
474 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
475
620f13b0
PE
4762012-08-16 Paul Eggert <eggert@cs.ucla.edu>
477
478 Use ASCII tests for character types.
479 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
480 * xfns.c, xterm.c:
481 Don't include <ctype.h>; was not needed.
482 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
483 * sysdep.c, xfaces.c:
484 Include <c-ctype.h> instead of <ctype.h>.
485 * nsterm.m: Include <c-ctype.h>.
486 * charset.c (read_hex):
487 * doc.c (Fsnarf_documentation):
488 * fileio.c (IS_DRIVE) [WINDOWSNT]:
489 (DRIVE_LETTER) [DOS_NT]:
490 (Ffile_name_directory, Fexpand_file_name)
491 (Fsubstitute_in_file_name):
492 * font.c (font_parse_xlfd, font_parse_fcname):
493 * frame.c (x_set_font_backend):
494 * gtkutil.c (xg_get_font):
495 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
496 * nsimage.m (hexchar):
497 * nsterm.m (ns_xlfd_to_fontname):
498 * sysdep.c (system_process_attributes):
499 * xfaces.c (hash_string_case_insensitive):
500 Use C-locale tests instead of locale-specific tests for character
501 types, since we want the ASCII interpretation here, not the
502 interpretation suitable for whatever happens to be the current locale.
503
52162052
MR
5042012-08-16 Martin Rudalics <rudalics@gmx.at>
505
506 Consistently check windows for validity/liveness
507 (Bug#11984, Bug#12025, Bug#12026).
508 * lisp.h (CHECK_VALID_WINDOW): New macro.
509 * window.c (decode_window): Rename to decode_live_window.
510 (decode_valid_window, Fwindow_valid_p): New functions.
511 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
512 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
513 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
514 (Fwindow_prev_sibling, Fwindow_combination_limit)
515 (Fset_window_combination_limit, Fwindow_use_time)
516 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
517 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
518 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
519 (Fwindow_hscroll, Fset_window_hscroll)
520 (Fwindow_redisplay_end_trigger)
521 (Fset_window_redisplay_end_trigger, Fwindow_edges)
522 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
523 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
524 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
525 (Fwindow_end, Fset_window_point, Fset_window_start)
526 (Fpos_visible_in_window_p, Fwindow_line_height)
527 (Fwindow_dedicated_p, Fset_window_dedicated_p)
528 (Fwindow_prev_buffers, Fset_window_prev_buffers)
529 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
530 (Fset_window_parameter, Fwindow_display_table)
531 (Fset_window_display_table, Fdelete_other_windows_internal)
532 (Fset_window_buffer, Fset_window_new_total)
533 (Fset_window_new_normal, Fdelete_window_internal)
534 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
535 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
536 (Fwindow_scroll_bars): Check whether argument window is a valid or
537 live window. Update doc-strings.
538 (syms_of_window): New symbol Qwindow_valid_p.
539 * keyboard.c (Fposn_at_x_y): Check whether argument
540 frame_or_window denotes a valid window.
541
2751c80f
DA
5422012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
543
544 Fix previous char table change.
545 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
546 * chartab.c (optimize_sub_char_table): Likewise.
547
032a42c8
CY
5482012-08-16 Chong Yidong <cyd@gnu.org>
549
a2d19368
CY
550 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
551
032a42c8
CY
552 * xfont.c (xfont_open):
553 * xftfont.c (xftfont_open): Set the font's max_width field.
554
555 * nsfont.m (nsfont_open): Similar to the Xft backend, set
556 min_width to space_width and average_width to the average over
557 printable ASCII characters.
558 (ns_char_width): Code cleanup.
559 (ns_ascii_average_width): New utility function.
560
561 * font.h (struct font): Update comments.
562
a098c930
DA
5632012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
564
032a42c8 565 Simple interface to set Lisp_Object fields of character tables.
a098c930
DA
566 * lisp.h (CSET): New macro.
567 (char_table_set_extras, char_table_set_contents)
568 (sub_char_table_set_contents): New function.
569 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
570 * syntax.c: Adjust users.
571
8be3a09c
SM
5722012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
573
574 * eval.c (eval_sub): Bind lexical-binding.
575 * lread.c (Qlexical_binding): Make non-static.
576
ac4845a6
JD
5772012-08-15 Jan Djärv <jan.h.d@swipnet.se>
578
ddee6515
JD
579 * nsmenu.m (popupSession): Remove.
580 (pop_down_menu): Remove endModalSession.
581 (timeout_handler:): New method.
582 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
583 Call runModalForWindow. Check timer_fired when it returns.
584 If not set, cancel timer and break out of loop.
585 Otherwise loop again, with a new timeout.
586
587 * nsterm.m: Include fcntl.h if present.
588 (fd_entry, t_readfds, inNsSelect): Remove.
589 (select_writefds, select_valid, select_timeout, selfds)
590 (select_mutex, apploopnr): Add.
591 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
592 Otherwise call kbd_buffer_store_event.
593 (ns_send_appdefined): Remove release of fd_entry.
594 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
595 Increment and decrement apploopnr.
596 (ns_select): If no file descriptors, just do a NSTimer.
597 Otherwise copy read/write masks and start select thread (fd_handler).
598 Start main loop and wait for application defined event.
599 Inform select thread to stop selecting after main loop is exited.
600 (ns_term_init): Create selfds pipe and set non-blocking.
601 Initialize select_mutex. Start the select thread (fd_handler).
602 (fd_handler:): Loop forever, wait for info from the main thread
603 to either start or stop selecting. When select returns, send
604 and appdefined event.
605 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
606 If not call kbd_buffer_store_event.
607
608 * nsterm.h (EmacsApp): fd_handler takes id argument.
609 (EmacsDialogPanel): Add timer_fired and timeout_handler.
610
ac4845a6
JD
611 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
612
eb424fe3
EZ
6132012-08-15 Eli Zaretskii <eliz@gnu.org>
614
615 * region-cache.c (move_cache_gap): Update gap_len using the actual
616 growth of the boundaries array. Do not change cache_len.
617 (Bug#12196)
618
4e6a86c6
DA
6192012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
620
621 Generalize and cleanup font subsystem checks.
622 * font.h (FONT_DEBUG, font_assert): Remove.
8be3a09c
SM
623 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
624 Change font_assert to eassert. Use eassert where appropriate.
4e6a86c6 625
5bf192ca
DA
6262012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
627
628 * gtkutil.c (xg_get_font): Use pango_units_to_double.
629
f2045622
CY
6302012-08-15 Chong Yidong <cyd@gnu.org>
631
8be3a09c
SM
632 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
633 When using the new font chooser, use gtk_font_chooser_get_font_desc to
634 extract the font descriptor instead of just the font name.
635 In that case, return a font spec instead of a string.
f2045622
CY
636 (x_last_font_name): Move to this file from xfns.c.
637
638 * xfns.c (Fx_select_font): The return value can also be a font
639 spec. Move x_last_font_name management to gtkutil.c.
640
641 * xfaces.c: Make font weight and style symbols non-static.
642
7f6feb56
SM
6432012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
644
645 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
646 (bug#12117).
647
fecbd8ff
SM
6482012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
649
650 * alloc.c (Fgarbage_collect): Use plural form consistently.
651
9b8d5165
EZ
6522012-08-14 Eli Zaretskii <eliz@gnu.org>
653
654 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
655 iteration through the command loop. Fixes a problem whereby mouse
656 movements are ignored until the first mouse click.
657
f5d9e83a
PE
6582012-08-14 Paul Eggert <eggert@cs.ucla.edu>
659
660 Use bool, not int, for Lisp booleans.
661 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
662 makes Emacs a bit smaller and presumably a bit faster.
663 * lisp.h: Include <stdbool.h>.
664 (struct Lisp_Boolfwd, defvar_bool):
665 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
666 * regex.c [!emacs]: Include <stdbool.h>.
667 (false, true): Remove; <stdbool.h> does this for us now.
668
55802e4a
CY
6692012-08-14 Chong Yidong <cyd@gnu.org>
670
4abcdac8
CY
671 * character.c (Fcharacterp): Doc fix (Bug#12076).
672
673 * data.c (Findirect_variable): Doc fix (Bug#11040).
674
55802e4a
CY
675 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
676
677 * editfns.c (Fformat): Doc fix (Bug#12059).
4abcdac8 678 (Fsave_current_buffer): Doc fix (Bug#11542).
55802e4a 679
8e99d072
BR
6802012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
681
682 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
683 (bug#12022).
684
08908aca
MR
6852012-08-14 Martin Rudalics <rudalics@gmx.at>
686
687 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
688 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
689 * minibuf.c (choose_minibuf_frame, read_minibuf):
690 * w32fns.c (x_create_tip_frame):
691 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
692 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
693
56120d6f
PE
6942012-08-14 Paul Eggert <eggert@cs.ucla.edu>
695
696 * intervals.c (offset_intervals): Remove obsolete comment.
697
67b77c0b
AS
6982012-08-14 Andreas Schwab <schwab@linux-m68k.org>
699
700 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
701
f48b82fd
GR
7022012-08-14 Gergely Risko <gergely@risko.hu>
703
704 * coding.c (decode_coding): Record buffer modification before
705 disabling undo_list (Bug#11773).
706
fd318b54
DA
7072012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
708
709 Revert and cleanup some recent overlay changes.
710 * buffer.h (enum overlay_type): Remove.
711 (buffer_get_overlays, buffer_set_overlays): Likewise.
712 (buffer_set_overlays_before, buffer_set_overlays_after):
713 New function. Adjust users.
714 (unchain_both): Add eassert.
715
41a62dd9
DA
7162012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
717
718 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
719
5884c324
PE
7202012-08-14 Paul Eggert <eggert@cs.ucla.edu>
721
722 * gtkutil.c (xg_mark_data): Don't assume C99.
723
ca06f160
JD
7242012-08-13 Jan Djärv <jan.h.d@swipnet.se>
725
726 * gtkutil.c (xg_frame_tb_info): New struct.
727 (TB_INFO_KEY): New define.
728 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
729 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
730 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
731 if not present.
732 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
733 is up to date. Otherwise store new data.
734 (free_frame_tool_bar): Free xg_frame_tb_info if present.
735
7864a3f7
DA
7362012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
737
738 Use KSET for write access to Lisp_Object members of struct kboard.
739 * keyboard.h (KSET): New macro.
740 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
741 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
742 * xterm.c: Adjust users.
743
4c31be61
DA
7442012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
745
746 Use BSET for write access to Lisp_Object members of struct buffer.
747 * buffer.h (BSET): New macro.
748 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
749 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
750 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
751 * window.c, xdisp.c, xfns.c: Adjust users.
752
14ae4239
BT
7532012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
754
755 * lread.c (syms_of_lread): Initialize Vlexical_binding.
756
32bcadb4
JD
7572012-08-11 Jan Djärv <jan.h.d@swipnet.se>
758
3d29b2ce
JD
759 * nsterm.m (not_in_argv): New function.
760 (application:openFile, application:openTempFile:):
761 (application:openFileWithoutUI:, application:openFiles:): Open file
762 if not_in_argv returns non-zero (bug#12171).
763
32bcadb4 764 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
14ae4239
BT
765 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
766 Define for Gtk+ versions less than 3.2.
32bcadb4
JD
767 (xg_get_font_name): Use those functions/macros here.
768 Reported by Frans Oilinki <moilinki@gmail.com>.
769
9ff9402d 7702012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8ccd072a
YM
771
772 * unexmacosx.c (copy_data_segment): Copy initialized data in
773 statically linked libraries from input file rather than memory.
774
db74a5fc
YM
775 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
776 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
777 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
778
25e65510
GM
7792012-08-10 Glenn Morris <rgm@gnu.org>
780
781 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
782 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
783
7961135c
DA
7842012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
785
786 Fix last change to allow compilation with low optimization levels.
787 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
788 Reported by Jan Djärv <jan.h.d@swipnet.se>.
789
42b3a444
DA
7902012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
791
792 Use common inline syntax in intervals.h.
793 * intervals.h (INTERVALS_INLINE): New macro.
794 Change all users from LISP_INLINE.
795
9fb0c957
DA
7962012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
797
798 Define Qnone once for all platforms.
799 * frame.c (Qnone): Define here.
800 (syms_of_frame): DEFSYM it.
801 * lisp.h (Qnone): New declaration.
802 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
803 * xfns.c: Remove duplication. Adjust users.
804
65e8ee52
DA
8052012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
806
807 Remove unused macros from intervals.h.
808 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
809 * intervals.c: Adjust comment.
810
9b855fd6
EZ
8112012-08-10 Eli Zaretskii <eliz@gnu.org>
812
813 * w32fns.c <w32_unicode_gui>: New static variable.
814 (globals_of_w32fns): Initialize it according to os_subtype.
815 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
816 testing os_subtype.
817
39cb9e56 8182012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
d30be705
EZ
819 Eli Zaretskii <eliz@gnu.org>
820
821 Fix bug #10299 with Unicode characters sent by customized
822 keyboards created by MSKLC.
823 * w32fns.c (INIT_WINDOW_CLASS): New macro.
824 (w32_init_class): Use it to initialize the Emacs class with either
825 ANSI or Unicode API calls.
826 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
827 later.
828 (w32_wnd_proc): If the character code sent by WM_CHAR or
829 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
830 original message. Call DefWindowProcW on NT and later.
831
9374581a
GM
8322012-08-10 Glenn Morris <rgm@gnu.org>
833
4b94e8cf
GM
834 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
835
9374581a
GM
836 * lisp.h (DIRECTORY_SEP): Let configure set it.
837
a2752828
DA
8382012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
839
840 Use TSET for write access to Lisp_Object slots of struct terminal.
841 * termhooks.h (TSET): New macro.
842 * coding.c, terminal.c, xselect.c: Adjust users.
843
cc92c454
SM
8442012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
845
846 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
847 the failing expression, include them in the error message.
848 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
849 * lisp.h (internal_condition_case_n): Update declaration.
850
4cb3e6b3
DA
8512012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
852
853 Inline functions to examine and change buffer overlays.
854 * buffer.c (unchain_both): New function.
855 * buffer.h (buffer_get_overlays, buffer_set_overlays):
856 (buffer_has_overlays): New function.
857 (enum overlay_type): New enum.
858 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
859 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
860
8707c1e5
DA
8612012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
862
863 Inline functions to examine and change buffer intervals.
864 * alloc.c (mark_interval_tree): Remove.
865 (MARK_INTERVAL_TREE): Simplify.
866 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
867 * intervals.c (buffer_balance_intervals): New function.
868 (graft_intervals_into_buffer): Adjust indentation.
869 (set_intervals_multibyte): Simplify.
870 * buffer.h (BUF_INTERVALS): Remove.
871 (buffer_get_intervals, buffer_set_intervals): New function.
872 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
873 * intervals.c, textprop.c: Adjust users.
874
ad8c997f
DA
8752012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
876
877 Inline functions to examine and change string intervals.
878 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
879 (string_get_intervals, string_set_intervals): New function.
880 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
881 * lread.c, print.c, textprop.c: Adjust users.
882
32ac3a6b
GM
8832012-08-08 Glenn Morris <rgm@gnu.org>
884
885 * lisp.mk (lisp): Remove language/persian.elc.
886
77c7bcb1
DA
8872012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
888
889 Cleanup intervals.
890 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
891 (NULL_INTERVAL_P): Likewise. Adjust users.
14ae4239
BT
892 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
893 Adjust comment. Move under #if 0.
77c7bcb1
DA
894 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
895 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
896
9c08a8d4
DA
8972012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
898
899 Check total length of intervals with eassert.
900 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
901 * intervals.c: Change all users to eassert.
902
26d16b35
EZ
9032012-08-07 Eli Zaretskii <eliz@gnu.org>
904
14ae4239
BT
905 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
906 Rename fields to match removal of FGET and WGET and disuse of
26d16b35
EZ
907 INTERNAL_FIELD in Lisp_Cons.
908
c644523b
DA
9092012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
910
911 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
912 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
913 name since all xname users are fixed long time ago. Do not
914 use INTERNAL_FIELD.
915 (set_symbol_name, set_symbol_function, set_symbol_plist):
916 (set_symbol_next, set_overlay_plist): New function.
917 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
918 (struct Lisp_Overlay): Likewise.
919 (CVAR, MVAR, SVAR): Remove.
920 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
921 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
922 * xterm.c: Adjust users.
923 * .gdbinit: Change to use name field of struct Lisp_Symbol
924 where appropriate.
925
6a3d20cc
DA
9262012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
927
928 Basic functions to set Lisp_Object and pointer slots of intervals.
929 * intervals.h (interval_set_parent, interval_set_object):
930 (interval_set_left, interval_set_right, interval_set_plist):
931 (interval_copy_parent): New function.
932 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
14ae4239
BT
933 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
934 Adjust indentation.
6a3d20cc
DA
935 (INTERVAL_SIZE): Remove. Adjust users.
936 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
937
4d2b044c
DA
9382012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
939
940 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
941 * process.h (PGET): Remove.
942 (struct Lisp_Process): Do not use INTERNAL_FIELD.
943 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
944
d3d50620
DA
9452012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
946
947 Drop WGET and revert read access to Lisp_Objects slots of struct window.
948 * window.h (WGET): Remove.
949 (struct window): Do not use INTERNAL_FIELD.
950 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
951 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
952 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
953 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
954 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
955 Adjust users.
956
d10a51dc
CY
9572012-08-07 Chong Yidong <cyd@gnu.org>
958
959 * window.c (Fwindow_edges, Fwindow_pixel_edges)
960 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
961 (Fdelete_window_internal): Signal an error if the window is not on
962 a live frame (Bug#12025).
963
e69b0960
DA
9642012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
965
966 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
967 * frame.h (FGET): Remove.
968 (struct frame): Do not use INTERNAL_FIELD.
969 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
970 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
971 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
972 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
973
25a20a3a
JB
9742012-08-06 Juanma Barranquero <lekktu@gmail.com>
975
976 * w32.c: Silence compiler warnings.
977 (map_w32_filename): Remove unused variable `is_fat'.
978 (chase_symlinks): Add parentheses around expression.
979
1c6f11f4
GM
9802012-08-06 Glenn Morris <rgm@gnu.org>
981
1db4583a
GM
982 * sysdep.c: Respect BROKEN_GETWD.
983
1c6f11f4
GM
984 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
985 Let configure handle it.
986 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
987
2b90362b
DA
9882012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
989
990 Use GCALIGNMENT where appropriate.
991 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
992 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
993 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
994
5f50daf2
EZ
9952012-08-06 Eli Zaretskii <eliz@gnu.org>
996
14ae4239
BT
997 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
998 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
5f50daf2 999
cbcc7007
SM
10002012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
1001
1002 * buffer.h (struct buffer): Revert `indirections' to a simple int;
1003 that should be sufficient for everyone.
1004
4d365fa4
JD
10052012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1006
1007 * keyboard.c (timer_check_2): Add break so timer_check returns next
1008 timeout.
1009
dd86bd82
DA
10102012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1011
1012 Fix Windows build errors introduced after converting to WGET and WSET.
1013 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
1014 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1015
054e1668
JD
10162012-08-06 Jan Djärv <jan.h.d@swipnet.se>
1017
1018 * nsterm.m (ns_frame_rehighlight): Use FSET.
1019
1020 * nsmenu.m (ns_update_menubar): Use FSET.
1021
21238f11
DA
10222012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1023
1024 Separate read and write access to Lisp_Object slots of Lisp_Process.
1025 * process.h (PGET, PSET): New macros similar to AREF and ASET.
1026 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
1027
077288cf
DA
10282012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1029
1030 Separate read and write access to Lisp_Object slots of struct window.
1031 * window.h (WGET, WSET): New macros similar to AREF and ASET.
1032 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1033 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1034 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
1035 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
1036 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
1037 Adjust users.
1038
71688bd7
DA
10392012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1040
1041 Fix Windows build errors introduced after converting to FGET and FSET.
1042 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
1043 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
1044 (w32_judge_scroll_bars): Change to use FSET.
1045 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
1046
f99bac93
DA
10472012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1048
1049 Fix replacement typo.
1050 * window.c (replace_window): Set root_window instead of
1051 selected_window. This fixes a total window subsystem
1052 malfunction reported by Bastien Guerry <bzg@gnu.org>.
1053
8c2a0f2d
GM
10542012-08-06 Glenn Morris <rgm@gnu.org>
1055
1056 * lisp.mk (lisp): Add language/persian.elc.
1057
edd74c35
DA
10582012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
1059
1060 Separate read and write access to Lisp_Object slots of struct frame.
1061 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
1062 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
1063 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
1064 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
1065 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
1066
8671676c
AS
10672012-08-05 Andreas Schwab <schwab@linux-m68k.org>
1068
1069 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
1070
663e2b3f
DA
10712012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
1072
1073 Generalize common compile-time constants.
1074 * lisp.h (header_size, bool_header_size, word_size): Now here.
1075 (struct Lisp_Vector): Add comment.
1076 (struct Lisp_Bool_Vector): Move up to define handy constants.
1077 (VECSIZE, PSEUDOVECSIZE): Simplify.
1078 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
1079 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
1080 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
1081 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
1082 * xfont.c, xmenu.c: Use word_size where appropriate.
1083
d32e47af
LM
10842012-08-05 Lawrence Mitchell <wence@gmx.li>
1085
1086 * search.c (Freplace_match): Treat \? in the replacement text
1087 literally (Bug#8161).
1088
e5d9c0d1
CY
10892012-08-05 Chong Yidong <cyd@gnu.org>
1090
1091 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
1092 * frame.c (Vdelete_frame_functions):
1093 * emacs.c (Vkill_emacs_hook): Doc fix.
1094
8da0576b
EZ
10952012-08-04 Eli Zaretskii <eliz@gnu.org>
1096
1097 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
1098 --with-x-toolkit=no builds.
1099 Reported by Carsten Mattner <carstenmattner@gmail.com>.
1100
02676e5d
CY
11012012-08-04 Chong Yidong <cyd@gnu.org>
1102
1103 * syntax.c (Fmodify_syntax_entry): Doc fix.
1104
97147da9
EZ
11052012-08-04 Eli Zaretskii <eliz@gnu.org>
1106
76151e2c
EZ
1107 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
1108 * w32.c (init_environment): Change the default values of many
1109 environment variables in dflt_envvars[] to NULL, to avoid pushing
14ae4239
BT
1110 them into environment when they were not already defined.
1111 Remove the code that deletes site-lisp subdirectories from the default
76151e2c 1112 value of EMACSLOADPATH, as it is no longer needed.
14ae4239
BT
1113 (check_windows_init_file): Now external, not static.
1114 Use Vload_path as is, without adding anything, as this function is now
76151e2c
EZ
1115 called when Vload_path is already set up.
1116
1117 * w32.h (check_windows_init_file): Add prototype.
1118
1119 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
1120 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
1121 compatibility with Posix platforms.
1122 (main): Move the call to check_windows_init_file to here from
1123 w32.c.
1124 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
1125 any, in the DEFALT argument into the root of the Emacs build or
1126 installation tree, as appropriate.
1127
1128 * callproc.c (init_callproc_1): Call decode_env_path instead of
1129 doing its equivalent by hand.
1130 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
1131 the code that sets Vexec_path run on MS-Windows.
1132
1133 * lread.c (init_lread): Add comments to #ifdef's.
1134
97147da9
EZ
1135 * msdos.c (dos_set_window_size, IT_update_begin)
1136 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
1137 instead of direct references.
1138
185ee146
PE
11392012-08-04 Paul Eggert <eggert@cs.ucla.edu>
1140
1141 Export DEFAULT_REHASH_* to GDB.
1142 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
1143 Now constants, not macros.
1144
8834c57a
PE
11452012-08-03 Paul Eggert <eggert@cs.ucla.edu>
1146
98c6f1e3
PE
1147 Remove unnecessary casts involving pointers.
1148 These casts are no longer needed now that we assume C89 or later,
1149 since they involve casting to or from void *.
1150 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
1151 (make_pure_float, make_pure_vector):
1152 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
1153 * macros.c (Fstart_kbd_macro):
1154 * menu.c (find_and_return_menu_selection):
1155 * minibuf.c (read_minibuf_noninteractive):
1156 * sysdep.c (closedir):
1157 * xdisp.c (x_produce_glyphs):
1158 * xfaces.c (compare_fonts_by_sort_order):
1159 * xfns.c (x_real_positions, select_visual):
1160 * xselect.c (x_stop_queuing_selection_requests)
1161 (x_get_window_property, x_get_window_property_as_lisp_data):
1162 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
1163 Remove unnecessary pointer casts.
1164 * alloc.c (record_xmalloc): New function.
1165 * lisp.h (record_xmalloc): New decl.
1166 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
1167 more like a function. This is because the pointer cast is not
1168 needed. All uses changed.
1169 * print.c (print_string, print_error_message): Avoid length recalc.
1170
8834c57a
PE
1171 Improve fix for macroexp crash with debugging (Bug#12118).
1172 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
1173 ARRAY_MARK_FLAG when checking subscripts, because ASET is
1174 not supposed to be invoked from the garbage collector.
1175 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
1176 (gc_aset): New function, which is like ASET but can be
1177 used in the garbage collector.
1178 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1179 (set_hash_index): Use it instead of ASET.
1180
6dad7178
EZ
11812012-08-03 Eli Zaretskii <eliz@gnu.org>
1182
1183 Support symlinks on latest versions of MS-Windows.
1184 * w32.c: Include winioctl.h and aclapi.h.
1185 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
1186 (revert_to_self): Forward declarations of static functions.
1187 <static BOOL g_b_init_get_security_info>:
1188 <g_b_init_create_symbolic_link>: New static flags.
1189 (globals_of_w32): Initialize them to zero.
1190 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
1191 (map_w32_filename): Improve commentary. Simplify switch.
1192 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
1193 headers (most versions of MinGW w32api don't).
1194 (get_security_info, create_symbolic_link)
1195 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
1196 New functions.
1197 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
1198 in the argument file name.
1199 (sys_access): Call unc_volume_file_attributes only if
1200 GetFileAttributes fails with network-related error codes.
1201 (sys_rename): Diagnose renaming of a symlink when the user doesn't
1202 have the required privileges.
14ae4239 1203 (get_file_security_desc_by_name): Rename from
6dad7178
EZ
1204 get_file_security_desc.
1205 (stat_worker): New function, with most of the guts of 'stat', and
14ae4239
BT
1206 with addition of handling of symlinks and support for 'lstat'.
1207 If possible, get file's attributes and security information by
6dad7178
EZ
1208 handle, not by name. Produce S_IFLNK bit for symlinks, when
1209 called from 'lstat'.
1210 (stat, lstat): New functions, call 'stat_worker'.
1211 (symlink, readlink, careadlinkat): Rewritten to create and resolve
1212 symlinks when the underlying filesystem supports them.
1213
f162bcc3
PE
12142012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1215
79ea6c20
PE
1216 Fix macroexp crash on Windows with debugging (Bug#12118).
1217 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
1218 checking subscripts; problem introduced with the recent
1219 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
1220 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
1221 since it's used in non-static inline functions now.
1222
c0ce93fd
PE
1223 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
1224 Don't assume buffer size fits in 'int'. Remove unused local.
c71f5156 1225
f162bcc3
PE
1226 Use C99-style 'extern inline' if available.
1227 * buffer.h (BUFFER_INLINE):
1228 * category.h (CATEGORY_INLINE):
1229 * character.h (CHARACTER_INLINE):
1230 * charset.h (CHARSET_INLINE):
1231 * composite.h (COMPOSITE_INLINE):
1232 * dispextern.h (DISPEXTERN_INLINE):
1233 * lisp.h (LISP_INLINE):
1234 * systime.h (SYSTIME_INLINE):
1235 New macro, replacing 'static inline' in this header.
1236 * buffer.h, category.h, character.h, charset.h, composite.h:
1237 * dispextern.h, lisp.h, systime.h:
1238 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1239 * alloc.c (LISP_INLINE):
1240 * buffer.c (BUFFER_INLINE):
1241 * category.c (CATEGORY_INLINE):
1242 * character.c (CHARACTER_INLINE):
1243 * charset.c (CHARSET_INLINE):
1244 * composite.c (COMPOSITE_INLINE):
1245 * dispnew.c (DISPEXTERN_INLINE):
1246 * sysdep.c (SYSTIME_INLINE):
1247 Define to EXTERN_INLINE, so that the corresponding functions
1248 are compiled into code.
1249 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
1250 (INLINE_HEADER_END): New macros.
1251 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
1252 since it's used in non-static inline functions now.
a8333d03 1253 (VALMASK) [!USE_LSB_TAG]: Likewise.
f162bcc3 1254
837b365b
GM
12552012-08-02 Glenn Morris <rgm@gnu.org>
1256
d66b744d
GM
1257 * s/: Remove empty directory.
1258
837b365b
GM
1259 * s/ms-w32.h: Move to ../nt/inc.
1260 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
1261 Update for new ms-w32.h location.
1262
13294f95
PE
12632012-08-02 Paul Eggert <eggert@cs.ucla.edu>
1264
1265 Port to Solaris 8.
1266 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
1267
90df0db3
GM
12682012-08-02 Glenn Morris <rgm@gnu.org>
1269
1270 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
1271 hard-coding the path separator.
1272
4939150c
PE
12732012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1274
1275 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
1276 This how ASET and AREF are supposed to work, and makes
1277 it easier to think about future improvements. See
1278 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
1279 * charset.h (set_charset_attr): New function.
1280 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
1281 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
1282 (aref_addr): New function. All uses of &AREF(...) changed.
1283 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
1284 (set_hash_index): New functions. All lvalue-style uses of
1285 HASH_KEY etc. changed.
1286 * keyboard.c (set_prop): New function. All lvalue-style uses
1287 of PROP changed.
1288
947b2afd
AA
12892012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
1290
1291 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
1292 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
1293 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
1294 * nsfns.m (ns_set_name_as_filename): Likewise.
1295 * nsmenu.m (ns_update_menubar): Likewise.
1296 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
1297
4f5d0325
EZ
12982012-08-01 Eli Zaretskii <eliz@gnu.org>
1299
2008beae
EZ
1300 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
1301 Adapt to latest changes in field names of the corresponding Lisp
288479f6 1302 objects.
2008beae 1303
4f5d0325
EZ
1304 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
1305
fe3cc771
GM
13062012-08-01 Glenn Morris <rgm@gnu.org>
1307
1308 * s/msdos.h: Remove file.
1309 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
1310 * Makefile.in (S_FILE): Remove.
1311 (config_h): Remove S_FILE.
1312
c90acc54
JB
13132012-08-01 Juanma Barranquero <lekktu@gmail.com>
1314
1315 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
1316 Remove; moved to nt/config.nt.
1317
d8a05828
DA
13182012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1319
1320 Use INTERNAL_FIELD for conses and overlays.
1321 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
1322 Remove obsolete comment.
1323 (MVAR): New macro.
1324 (struct Lisp_Overlay): Use INTERNAL_FIELD.
1325 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
1326
8271d590
DA
13272012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1328
1329 Use INTERNAL_FIELD for symbols.
1330 * lisp.h (SVAR): New macro. Adjust users.
1331 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
1332 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
1333
3193acd2
DA
13342012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1335
1336 Use INTERNAL_FIELD for processes.
1337 * process.h (PVAR): New macro. Adjust style.
1338 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
1339 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
1340
3a45383a
DA
13412012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
1342
1343 Use INTERNAL_FIELD for windows.
1344 * window.h (WVAR): New macro.
1345 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
1346 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
1347 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
1348 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
1349 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
1350 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1351
c1dbc63c
PE
13522012-08-01 Paul Eggert <eggert@cs.ucla.edu>
1353
1354 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
1355
5c0c0e8a
GM
13562012-08-01 Glenn Morris <rgm@gnu.org>
1357
1358 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
1359 Move to configure.ac.
1360
552a99b4
JB
13612012-08-01 Juanma Barranquero <lekktu@gmail.com>
1362
1363 * makefile.w32-in (CONFIG_H): Update dependencies.
1364 (CONF_POST_H): New macro.
1365
1366 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
1367
8d8e2dfe
GM
13682012-07-31 Glenn Morris <rgm@gnu.org>
1369
bc96620a
GM
1370 * Makefile.in (S_FILE): No longer set by configure.
1371
476b1b2d
GM
1372 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
1373 is available.
1374 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
1375
b2c7a106
GM
1376 * process.h (NULL_DEVICE):
1377 * emacs.c (SEPCHAR):
1378 * editfns.c (USER_FULL_NAME): Let configure set them.
1379
d53d062a
GM
1380 * s/README, s/template.h: Remove files.
1381
4515017f
GM
1382 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
1383
8d8e2dfe
GM
1384 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
1385 Move to configure.ac.
1386
5b20b3cc
EZ
13872012-07-31 Eli Zaretskii <eliz@gnu.org>
1388
1e0afd9a
EZ
1389 * .gdbinit (xframe): Adapt to introduction of FVAR and the
1390 resulting renaming of 'struct frame' members.
1391
5b20b3cc
EZ
1392 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
1393
1394 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
1395 after introduction of FVAR.
1396
f1310128
JD
13972012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1398
79e721e0
JD
1399 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
1400
1401 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
1402 instead of compositeToPoint.
1403 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
1404
8d7c7eed 1405 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
f1310128 1406
e34f7f79
DA
14072012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1408
1409 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
1410 * lisp.h (INTERNAL_FIELD): New macro.
14ae4239 1411 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
e34f7f79
DA
1412 (BVAR): Change to use INTERNAL_FIELD.
1413 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
1414 (KVAR): Change to use INTERNAL_FIELD.
1415 * frame.h (FVAR): New macro.
1416 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
3a45383a
DA
1417 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
1418 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
1419 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
e34f7f79
DA
1420 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
1421
c09bfb2f
DA
14222012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
1423
1424 Miscellaneous fixes for non-default X toolkits.
1425 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
1426 * xterm.c (x_frame_of_widget): Remove redundant prototype.
1427 Move under #ifdef USE_LUCID.
1428 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
1429 definition and usage to avoid warnings.
1430
14c114ae
JD
14312012-07-31 Jan Djärv <jan.h.d@swipnet.se>
1432
1433 * nsterm.m (openFiles): Fix previous checkin.
1434
3bd21e82
PE
14352012-07-31 Paul Eggert <eggert@cs.ucla.edu>
1436
1437 * indent.c (compute_motion): Remove unused local.
1438
c1529ded
GM
14392012-07-31 Glenn Morris <rgm@gnu.org>
1440
400d5621
GM
1441 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
1442
268e2432
GM
1443 * conf_post.h [USG5_4]:
1444 Move remaining contents of s/usg5-4-common.h here.
1445 * s/usg5-4-common.h: Remove file.
1446
7552f3ee
GM
1447 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
1448 * s/irix6-5.h: Remove file.
1449
6a381852
GM
1450 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
1451 * s/darwin.h: Remove file.
1452
c1529ded
GM
1453 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
1454 * s/hpux10-20.h: Remove file, which is now empty.
1455
b429a4ee
GM
14562012-07-30 Glenn Morris <rgm@gnu.org>
1457
1458 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
1459 * Makefile.in (config_h): Add conf_post.h.
1460 * makefile.w32-in (CONFIG_H): Add conf_post.h.
1461
adff3182
JD
14622012-07-30 Jan Djärv <jan.h.d@swipnet.se>
1463
1464 * nsterm.m (ns_do_open_file): New variable.
b9031d69 1465 (ns_term_init): Set ns_do_open_file to YES after run returns.
14ae4239
BT
1466 (openFile, openTempFile, openFileWithoutUI, openFiles):
1467 Open files only if ns_do_open_file.
adff3182 1468
c32af1e4
PE
14692012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1470
7393bcbb
PE
1471 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
1472 This no-op macro hasn't been needed for many years.
1473 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
1474
c32af1e4
PE
1475 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
1476 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
1477 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
1478 gdb_make_enums_visible.
1479 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
1480 (DIRECTORY_SEP): Now a constant, not a macro.
1481
302fc036
EZ
14822012-07-30 Eli Zaretskii <eliz@gnu.org>
1483
1484 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
1485 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
1486
1487 * w32term.c <w32_keyboard_codepage>: Renamed from
1488 keyboard_codepage and now external. All users changed.
1489
1490 * w32term.h: Add declaration of w32_keyboard_codepage.
1491
1492 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
1493 the codepage to translate keys to Unicode. If this argument is
1494 -1, use the value returned by GetConsoleCP. All callers changed.
1495
88fb40b4
PE
14962012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1497
0aee6912
PE
1498 Update .PHONY listings in makefiles.
1499 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
1500 bootstrap-clean, distclean, maintainer-clean, versioclean,
1501 extraclean, frc.
1502
88fb40b4
PE
1503 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
1504 This is a bit clearer. Fix some commentary typos.
1505
0a763bd1
GM
15062012-07-30 Glenn Morris <rgm@gnu.org>
1507
32bac6d6
GM
1508 * s/netbsd.h: Let configure include signal.h if needed.
1509 Remove file, which is now empty.
1510
b65e7c46
GM
1511 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
1512 Let configure set them.
1513 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
1514 No more need to undefine.
0a763bd1 1515
169304bd
AS
15162012-07-30 Andreas Schwab <schwab@linux-m68k.org>
1517
1518 * keymap.c (Fkey_description): Don't remove 0x80 bit from
1519 non-single-byte char when adding meta modifier. (Bug#12090)
1520
6cd7a139
DA
15212012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
1522
1523 Convert safe_call to use variable number of arguments.
1524 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
1525 (safe_call2): Fix comment.
1526 * lisp.h (safe_call): Adjust prototype.
1527 * coding.c (encode_coding_object): Change to use safe_call2.
1528 * xfaces.c (merge_face_heights): Change to use safe_call1.
1529
d34d6ffc
GM
15302012-07-30 Glenn Morris <rgm@gnu.org>
1531
7b8a48e4 1532 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
227f5bd0 1533 does that unconditionally. Remove file, which is now empty.
7b8a48e4 1534
d34d6ffc
GM
1535 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
1536 Remove empty files.
1537
03a660a6
PE
15382012-07-30 Paul Eggert <eggert@cs.ucla.edu>
1539
1540 Export to GDB most of lisp.h's remaining object-like macros.
1541 * lisp.h (min, max): Move earlier, because they're used earlier now.
1542 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
1543 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
1544 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
1545 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
1546 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
1547 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
1548 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
1549 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
1550 Now constants, for GDB. They need not be macros.
1551 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
1552 Now constants, for GDB, as well as macros, for static initializers.
1553 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
1554 Move to after the definition of struct Lisp_Char_Table,
1555 since the former now needs that type defined.
1556 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
1557 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
1558 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
1559 New enums, for gdb_make_enums_visible.
1560 (GLYPH_MODE_LINE_FACE): Remove; unused.
88fb40b4 1561 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
03a660a6
PE
1562 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
1563 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
1564 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
1565 enum maxargs, enum MAX_ALLOCA.
1566 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
1567 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
1568 no longer needed, now that they are done in lisp.h.
1569
e499d0ee
DA
15702012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
1571
1572 Cleanup string bytes checking.
1573 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
1574 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
1575 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
1576 (check_sblock, compact_small_strings): Simplify.
1577
d5040d2d
PE
15782012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1579
1580 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
1581 These macros are confusing and no longer need to be defined, as
1582 the enum values now suffice. All uses replaced with definiens.
1583 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
1584
7f259ae6
JB
15852012-07-29 Juanma Barranquero <lekktu@gmail.com>
1586
1587 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
1588 ($(BLD)/w32console.$(O)): Update dependencies.
1589
7e63e0c3
DA
15902012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1591
1592 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
1593 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
1594 time. Adjust users.
1595 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
1596
ffd817eb
JD
15972012-07-29 Jan Djärv <jan.h.d@swipnet.se>
1598
1599 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
1600 setting sitelisp (Bug#12010).
1601
417a7a0e
EZ
16022012-07-29 Eli Zaretskii <eliz@gnu.org>
1603
14ae4239 1604 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
417a7a0e
EZ
1605
1606 * w32heap.c (cache_system_info):
1607 * w32.c (sys_rename):
1608 * w32proc.c (find_child_console, sys_kill): All users changed.
1609
387d4d92
PE
16102012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1611
1612 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
1613
55a6cca6
EZ
16142012-07-29 Eli Zaretskii <eliz@gnu.org>
1615
1616 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
1617
dbcf001c
DA
16182012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1619
1620 Cleanup statistics calculation in Fgarbage_collect.
14ae4239
BT
1621 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
1622 Fix zombies percentage calculation. Simplify elapsed time calculation.
dbcf001c 1623
e2688e4a
DA
16242012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
1625
1626 Generalize marker debugging code under MARKER_DEBUG and use eassert.
1627 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
1628 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
1629 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
1630 (replace_range, replace_range_2, del_range_2): Change to eassert.
1631 * marker.c (byte_char_debug_check): Adjust style.
1632
b46a6a83
PE
16332012-07-29 Paul Eggert <eggert@cs.ucla.edu>
1634
1635 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
1636 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
1637 long-ago-commented-out code that talks about "WIN32".
1638 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
1639 All uses changed.
1640
e32a5799
PE
16412012-07-28 Paul Eggert <eggert@cs.ucla.edu>
1642
1643 Use Gnulib stdalign module (Bug#9772, Bug#9960).
1644 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
1645 Simplify by using alignof.
1646 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
1647 * lisp.h: Include <stdalign.h>.
1648 (GCALIGNMENT): New macro and constant.
1649 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
1650 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
1651 (stdalign): New macro, if not already defined.
1652
df81cd29
EZ
16532012-07-28 Eli Zaretskii <eliz@gnu.org>
1654
01bd1b0d
EZ
1655 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
1656 * w32inevt.c: Include w32inevt.h.
1657 (w32_read_console_input): New inline function, calls either
1658 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
1659 w32_console_unicode_input.
1660 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
1661 (w32_kbd_patch_key, key_event): Use the codepage returned by
1662 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
1663 (key_event): use uChar.UnicodeChar only if
1664 w32_console_unicode_input is non-zero.
1665
1666 * w32console.c: Include w32heap.h.
1667 <w32_console_unicode_input>: New global variable.
1668 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
1669 family of Windows, zero otherwise.
1670
1671 * w32inevt.h: Declare w32_console_unicode_input.
1672
df81cd29
EZ
1673 * xdisp.c (init_iterator): Don't reference tip_frame in a build
1674 --without-x. (Bug#11742)
1675
c20fdd9e
PE
16762012-07-27 Paul Eggert <eggert@cs.ucla.edu>
1677
1678 Adjust GDB to reflect pvec_type changes (Bug#12036).
1679 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
14ae4239
BT
1680 2012-07-04 changes to pseudovector representation.
1681 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
c20fdd9e 1682
32770973 16832012-07-27 Michael Albinus <michael.albinus@gmx.de>
e518bc71
MA
1684
1685 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
1686 bus address.
1687 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
1688
3438fe21
EZ
16892012-07-27 Eli Zaretskii <eliz@gnu.org>
1690
bcfbc9de
EZ
1691 * alloc.c (listn): Fix the order the arguments are consed onto the
1692 list.
1693
3438fe21
EZ
1694 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
1695 enumeration constants, as PURE and HEAP are too general, and clash
1696 with other headers and sources, such as gmalloc.c and the
1697 MS-Windows system headers. All users changed.
1698
eeaea515
DA
16992012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
1700
1701 Revert last save_excursion_save and save_excursion_restore changes.
1702 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
1703 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
1704
073c88c2
DA
17052012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
1706
1707 Fix recently-introduced typos in Windows port.
1708 Reported by Martin Rudalics <rudalics@gmx.at>.
1709 * w32.c (init_environment): Replace comma with semicolon.
eeaea515 1710 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
073c88c2 1711
4706125e
PE
17122012-07-27 Paul Eggert <eggert@cs.ucla.edu>
1713
1714 Improve GDB symbol export (Bug#12036).
1715 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
1716 arms of an 'if', not using conditional expressions; otherwise GDB
1717 complains about the types in the unevaluated arm when the argument
1718 is an integer literal.
1719 (xgetint): Simplify expression.
1720 * alloc.c (gdb_make_enums_visible): New constant. This ports to
1721 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
1722 Zaretskii in <http://bugs.gnu.org/12036#13>.
1723 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
1724 needed now that we have gdb_make_enums_visible.
1725 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
1726 (enum enum_USE_LSB_TAG):
1727 New enum types, packaging up enums that need to be exported to GDB.
1728
694b6c97
DA
17292012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
1730
1731 Utility function to make a list from specified amount of objects.
1732 * lisp.h (enum constype): New datatype.
1733 (listn): New prototype.
1734 * alloc.c (listn): New function.
1735 (Fmemory_use_count, syms_of_alloc): Use it.
1736 * buffer.c (syms_of_buffer): Likewise.
1737 * callint.c (syms_of_callint): Likewise.
1738 * charset.c (define_charset_internal): Likewise.
1739 * coding.c (syms_of_coding): Likewise.
1740 * keymap.c (syms_of_keymap): Likewise.
1741 * search.c (syms_of_search): Likewise.
1742 * syntax.c (syms_of_syntax): Likewise.
1743 * w32.c (init_environment): Likewise.
1744 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
1745 * xdisp.c (syms_of_xdisp): Likewise.
1746 * xfns.c (syms_of_xfns): Likewise.
1747
6195f384
DA
17482012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
1749
1750 Fast save_excursion_save and save_excursion_restore.
1751 * lisp.h (struct Lisp_Excursion): New data type.
1752 (PVEC_EXCURSION): New pseudovector type.
1753 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
1754 to deal with it. Adjust comments.
1755 (init_marker, attach_marker): New prototype.
1756 (unchain_marker): Adjust prototype.
1757 * marker.c (attach_marker): Change to global.
1758 (init_marker): New function.
1759 * alloc.c (Fmake_marker, build_marker): Use it.
1760 (build_marker): More easserts.
1761 (mark_object): Handle struct Lisp_Excursion.
1762 * editfns.c (save_excursion_save, save_excursion_restore):
1763 Reimplement to use struct Lisp_Excursion. Add comments.
1764
5eceb8fb
PE
17652012-07-26 Paul Eggert <eggert@cs.ucla.edu>
1766
1767 Fix export of symbols to GDB (Bug#12036).
1768 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
1769 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
1770 emacs.c, as this is a more-suitable home. Had this been done earlier
1771 the fix for 12036 would have avoided some of the problems noted in
1772 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
1773 would have been more obvious.
562157c8
PE
1774 * emacs.c: Do not include <verify.h>; no longer needed.
1775 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5eceb8fb
PE
1776 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
1777 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
1778 Remove; now done in lisp.h.
1779 * lisp.h (PUBLISH_TO_GDB): New macro.
1780 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
1781 (DATA_SEG_BITS): Use it.
1782 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
1783 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
1784 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
1785 not be usable in #if. This simplifies things.
1786
d6749401
JB
17872012-07-26 Juanma Barranquero <lekktu@gmail.com>
1788
1789 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
1790
1781b9e9
PE
17912012-07-26 Paul Eggert <eggert@cs.ucla.edu>
1792
d89518db 1793 Simplify export of symbols to GDB (Bug#12036).
1781b9e9
PE
1794 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
1795 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
1796 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
1797 Adjust to changes in lisp.h and emacs.c, by using
1798 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
1799 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
1800 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
1801 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
1802 instead of gdb_valbits.
1803 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
1804 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
1805 instead of gdb_array_mark_flag.
1806 (xboolvector): Get size from $->size, not $->header.size.
1807 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
1808 (xreload, hook-run, hookpost-run): Remove.
1809 * emacs.c: Include <verify.h>.
1810 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
1811 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
1812 Remove.
1813 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
1814 (gdb_USE_LSB_TAG): New enum constants.
1815 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
1816 Also define these as enum constants, so they're visible to GDB.
1817 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
1818 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
1819 as constants, so they're visible to GDB.
1820 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
1821 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
1822 Now enum constants, not macros, so they're visible to GDB.
1823 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
1824 more convenient now. All uses changed.
1825 (VALMASK) [USE_LSB_TAG]: Also define in this case.
1826 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
1827
3628596a
DA
18282012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
1829
1830 Explicitly free restriction data that are not needed anymore.
1831 * editfns.c (save_restriction_restore): Free restriction data.
1832
7abaf5cc
SM
18332012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
1834
1835 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
1836 add argument, tune behavior, and adjust all callers.
1837
71f88e00
PE
18382012-07-25 Paul Eggert <eggert@cs.ucla.edu>
1839
1840 Use typedef for EMACS_INT, EMACS_UINT.
1841 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
1842 than macros. This simplifies debugging in the usual case, since
1843 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
1844 and it allows expressions involving EMACS_INT casts.
1845 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
1846
57ec3034
JD
18472012-07-25 Jan Djärv <jan.h.d@swipnet.se>
1848
1849 * nsterm.m (ns_read_socket): Return early if there is a modal
1850 window (Bug#12043).
1851
8137e7b3
MR
18522012-07-25 Martin Rudalics <rudalics@gmx.at>
1853
1854 * frame.c (Fredirect_frame_focus): In doc-string don't mention
1855 that FOCUS-FRAME can be omitted.
1856
04e9897c
DA
18572012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
1858
1859 Adjust buffer text indirection counters at the end of Fkill_buffer.
1860 * buffer.c (Fkill_buffer): Adjust indirection counters when the
1861 buffer is definitely dead. This should really fix an issue reported
1862 by Christoph Scholtes again. (Bug#12007).
1863 (init_buffer_once): Initialize indirection counters of
1864 buffer_defaults and buffer_local_symbols (for sanity and safety).
1865
8a0484e1
EZ
18662012-07-24 Eli Zaretskii <eliz@gnu.org>
1867
1868 * xdisp.c (init_iterator): Don't compute dimensions of truncation
1869 and continuation glyphs on tooltip frames, leave them at zero.
1870 Avoids continued lines in tooltips. (Bug#11832)
1871
fa691a83
DA
18722012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
1873
1874 Simplify copy_overlay.
04e9897c 1875 * buffer.c (copy_overlay): Simplify. Use build_marker.
fa691a83
DA
1876 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
1877
436bc8e0
EZ
18782012-07-23 Eli Zaretskii <eliz@gnu.org>
1879
1880 * print.c (print_object): Don't crash when a frame's name is nil
1881 or invalid. (Bug#12025)
1882
1883 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
1884 it signals an error when a tooltip frame is being created.
1885
d7a7fda3
DA
18862012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
1887
1888 Cleanup miscellaneous objects allocation and initialization.
1889 * alloc.c (allocate_misc): Change to static. Add argument to
1890 specify the subtype. Adjust comment and users.
1891 (build_overlay): New function.
1892 * buffer.c (copy_overlays, Fmake_overlay): Use it.
1893 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
1894 (allocate_misc): Remove prototype.
1895 (build_overlay): Add prototype.
1896
18972012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
372f8ffc
DA
1898
1899 Swap buffer text indirection counters in Fbuffer_swap_text.
1900 * buffer.c (Fbuffer_swap_text): Swap indirections too.
1901 This avoids crash reported by Christoph Scholtes at
1902 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
1903
9d7fa573
JD
19042012-07-22 Jan Djärv <jan.h.d@swipnet.se>
1905
1906 * nsmenu.m (Popdown_data): New struct.
1907 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
1908 free Popdown_data.
1909 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
1910 (initWithContentRect): Make imgView and contentView non-static
1911 and autorelease them. Also autorelease img and matrix (Bug#12005).
1912 (dealloc): Remove (Bug#12005).
1913
0dd6d66d
DA
19142012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
1915
1916 Adjust consing_since_gc when objects are explicitly freed.
1917 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
1918 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
1919 (free_cons, free_misc): Subtract object size from consing_since_gc.
1920
d36d71df
DA
19212012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
1922
1923 Simplify and cleanup markers positioning code.
1924 * marker.c (attach_marker): More useful eassert.
1925 (live_buffer, set_marker_internal): New function.
1926 (Fset_marker, set_marker_restricted): Use set_marker_internal.
1927 (set_marker_both, set_marker_restricted_both): Use live_buffer.
1928
fb9ea40f
PE
19292012-07-22 Paul Eggert <eggert@cs.ucla.edu>
1930
1931 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
1932 as it's limited by the amount of memory, not by INT_MAX.
1933
2d5c5f7d
EZ
19342012-07-21 Eli Zaretskii <eliz@gnu.org>
1935
07fb592e
EZ
1936 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
1937 in special-event-map. See the discussion at
1938 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
1939 for the reasons.
1940
37a9eac8 1941 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
14ae4239
BT
1942 info.dwItemData. Fixes crashes on 64-bit Windows.
1943 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
2d5c5f7d 1944
c4328746
JD
19452012-07-21 Jan Djärv <jan.h.d@swipnet.se>
1946
1947 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
4b17afa7 1948 (conversationIdentifier): Return value is NSInteger.
784051c4 1949 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
c4328746 1950
6e5d1c12
CY
19512012-07-21 Chong Yidong <cyd@gnu.org>
1952
1953 * window.c (decode_any_window): Signal an error if the window is
1954 on a dead frame (Bug#11984).
1955
9928463d
DA
19562012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
1957
1958 Add indirection counting to speed up Fkill_buffer.
1959 * buffer.h (struct buffer): New member.
1960 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
1961 (Fmake_indirect_buffer): Set indirection counter to -1, increment
1962 base buffer indirection counter.
1963 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
1964 (Fkill_buffer): Adjust indirection counters as needed, don't walk
1965 through buffer list if indirection counter is 0.
1966
f8643a6b
DA
19672012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
1968
1969 Extend the value returned by Fgarbage_collect with heap statistics.
1970 * alloc.c (Qheap): New symbol.
1971 (syms_of_alloc): DEFSYM it.
1972 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
1973 (Fmemory_free): Remove.
1974 (syms_of_alloc): Don't defsubr it.
1975 * buffer.c (Fcompact_buffer): Remove.
1976 (syms_of_buffer): Don't defsubr it.
1977
dac616ff
DA
19782012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
1979
1980 Make maybe_gc inline.
1981 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
1982 * lisp.h (consing_since_gc, gc_relative_threshold)
1983 (memory_full_cons_threshold): Revert declaration.
1984 (maybe_gc): Remove prototype, define as inline.
1985 * alloc.c: Remove old commented-out code.
1986 (consing_since_gc, gc_relative_threshold)
1987 (memory_full_cons_threshold): Revert to global.
1988 (maybe_gc): Remove.
1989
d7ea76b4
DA
19902012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
1991
1992 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
1993 * lisp.h (build_unibyte_string): New function.
1994 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
1995 * sysdep.c, w32fns.c, xfns.c: Use it.
1996 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
1997 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
1998 Adjust users accordingly.
1999 * font.h (font_open_by_name): Adjust prototype.
2000
765e61e3
DA
20012012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
2002
2003 Cleanup calls to Fgarbage_collect.
2004 * lisp.h (maybe_gc): New prototype.
2005 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2006 Remove declarations.
2007 * alloc.c (maybe_gc): New function.
2008 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
2009 Make them static.
2010 * bytecode.c (MAYBE_GC): Use maybe_gc.
2011 * eval.c (eval_sub, Ffuncall): Likewise.
2012 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
2013 to avoid dependency from auto-save feature.
2014
52b852c7
PE
20152012-07-19 Paul Eggert <eggert@cs.ucla.edu>
2016
2017 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
2018 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
2019 'for_each_per_buffer_object_at'.
2020 All uses changed. It's better to use upper-case for macros that
2021 cannot be implemented as functions, to give the reader a clue
2022 that they're special.
2023
5db81e33
SM
20242012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
2025
2026 * alloc.c (Fgarbage_collect): Tweak docstring.
2027
5b835e1d
DA
20282012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2029
2030 Tweak the value returned from Fgarbage_collect again.
2031 * alloc.c (Fgarbage_collect): New return value, as confirmed in
2032 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
2033 Adjust documentation.
2034 (total_vector_bytes): Rename to total_vector_slots, adjust
2035 accounting.
2036 (total_free_vector_bytes): Rename to total_free_vector_slots,
2037 adjust accounting.
2038 (Qstring_bytes, Qvector_slots): New symbols.
2039 (syms_of_alloc): DEFSYM them.
2040
9cd47b72
DA
20412012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2042
2043 Buffer compaction primitive which may be used from Lisp.
2044 * buffer.c (compact_buffer, Fcompact_buffer): New function.
2045 (syms_of_buffer): Register Fcompact_buffer.
2046 * alloc.c (Fgarbage_collect): Use compact_buffer.
2047 * buffer.h (compact_buffer): New prototype.
2048 (struct buffer_text): New member.
2049
d17337e5
DA
20502012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
2051
2052 New macro to iterate over all buffers, miscellaneous cleanups.
2053 * lisp.h (all_buffers): Remove declaration.
2054 * buffer.h (all_buffers): Add declaration, with comment.
2055 (for_each_buffer): New macro.
2056 * alloc.c (Fgarbage_collect, mark_object): Use it.
2057 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
2058 (init_buffer): Likewise.
2059 * data.c (Fset_default): Likewise.
2060 * coding.c (code_conversion_restore): Remove redundant check
2061 for dead buffer.
2062 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
2063
60cfd278
AS
20642012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2065
2066 Fix bug that created negative-length intervals.
2067 * intervals.c (merge_interval_right, merge_interval_left):
2068 Do not zero out this interval if it is absorbed by its children,
2069 as this interval's total length doesn't change in that case. See
2070 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
2071
d06714cb
PE
20722012-07-18 Paul Eggert <eggert@cs.ucla.edu>
2073
83713154
PE
2074 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
2075 when invoking (make-bool-vector N t) and N is a positive
2076 multiple of 8 -- the last 8 bits were mistakenly cleared.
2077
d06714cb
PE
2078 Remove some struct layout assumptions in bool vectors.
2079 * alloc.c (bool_header_size): New constant.
2080 (header_size, word_size): Move earlier, as they're now used earlier.
2081 Use 'word_size' in a few more places, where it's appropriate.
2082 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
2083 padding before the data member of a bool vector.
2084 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
2085 than doing the check by hand with an abort ().
2086
464d5a5e
SM
20872012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
2088
5fbc0409
SM
2089 * eval.c (Fdefvar): Don't check constants since we only set the var if
2090 it's not yet defined anyway (bug#11904).
2091
464d5a5e
SM
2092 * lisp.h (last_undo_boundary): Declare new var.
2093 * keyboard.c (command_loop_1): Set it.
2094 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
2095 were auto-added by the command loop (bug#11774).
2096
8dc2e44a
AS
20972012-07-18 Andreas Schwab <schwab@linux-m68k.org>
2098
2099 * w32font.c (Qsymbol): Remove local definition.
2100 (syms_of_w32font): Don't DEFSYM it.
2101
169925ec
DA
21022012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2103
2104 Fix sweep_vectors to handle large bool vectors correctly.
2105 * alloc.c (sweep_vectors): Account total_vector_bytes for
2106 bool vectors larger than VBLOCK_BYTES_MAX.
2107
5fbfb018
CY
21082012-07-18 Chong Yidong <cyd@gnu.org>
2109
2110 * frame.c (x_set_frame_parameters): Revert bogus change introduced
2111 in 2012-05-25 commit by Paul Eggert (Bug#11738).
2112
3ab6e069
DA
21132012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
2114
2115 Return more descriptive data from Fgarbage_collect.
2116 Suggested by Stefan Monnier in
2117 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
2118 * alloc.c (bounded_number): New function.
2119 (total_buffers, total_vectors): New variable.
2120 (total_string_size): Rename to total_string_bytes, adjust users.
2121 (total_vector_size): Rename to total_vector_bytes, adjust users.
2122 (sweep_vectors): Account total_vectors and total_vector_bytes.
2123 (Fgarbage_collect): New return value. Adjust documentation.
2124 (gc_sweep): Account total_buffers.
2125 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
2126 (VECTOR_SIZE): Remove.
2127 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
2128 (Qinterval, Qmisc): New symbols.
2129 (syms_of_data): Initialize them.
2130 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
2131 (Qcons, Qbuffer): New declarations.
2132
6d02fe5b
PE
21332012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2134
2135 * alloc.c (Fmemory_free): Account for memory-free's own storage.
2136 Round up, not down. Improve doc.
2137
b7ffe040
DA
21382012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2139
2140 Restore old code in allocate_string_data to avoid Faset breakage.
2141 Reported by Julien Danjou <julien@danjou.info> in
2142 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
2143 * alloc.c (allocate_string_data): Restore old code with minor
2144 adjustments, fix comment to explain this subtle issue.
2145
4dc7c8d5
SM
21462012-07-17 Eli Zaretskii <eliz@gnu.org>
2147
2148 Remove FILE_SYSTEM_CASE.
2149 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
2150
2151 * fileio.c (FILE_SYSTEM_CASE): Don't define.
2152 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
2153 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
2154 call-process-region passes it through expand-file-name.
2155
2156 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
2157
21582012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2159
2160 Fix crash when creating indirect buffer (Bug#11917)
2161 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
2162 Don't handle unbound variables specially if non-zero.
2163 (Fbuffer_local_variables): Pass zero.
2164 (clone_per_buffer_values): Pass non-zero.
2165
21662012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2167
2168 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
2169 to make the loop interruptible.
2170
21712012-07-17 Andreas Schwab <schwab@linux-m68k.org>
2172
2173 * gnutls.c (emacs_gnutls_handshake): Only retry if
2174 GNUTLS_E_INTERRUPTED.
2175
cce7fefc
DA
21762012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2177
2178 Cleanup and convert miscellaneous checks to eassert.
2179 * alloc.c (mark_interval): Fix comment, partially rephrase
2180 old comment from intervals.h (see below).
2181 * intervals.c (find_interval, adjust_intervals_for_insertion)
2182 (delete_interval, adjust_intervals_for_deletion)
2183 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
2184 Convert to eassert.
2185 (adjust_intervals_for_insertion, make_new_interval):
2186 Remove obsolete and unused code.
2187 * intervals.h (struct interval): Remove obsolete comment.
2188 * textprotp.c (erase_properties): Remove unused code.
2189 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
2190 (Fremove_list_of_text_properties): Convert to eassert.
2191
9ea10cc3
CY
21922012-07-17 Chong Yidong <cyd@gnu.org>
2193
2194 * editfns.c (Finsert_char): Doc fix.
2195
3900d5de
DA
21962012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2197
2198 Fix previous change to make Fmemory_free always accurate.
2199 * alloc.c (make_interval): Update total_free_intervals.
2200 (make_float): Likewise for total_free_floats.
2201 (free_cons, Fcons): Likewise for total_free_conses.
2202 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
2203 Likewise for total_free_vector_bytes.
2204 (Fmake_symbol): Likewise for total_free_symbols.
2205 (bytes_free): Remove.
2206
7098646f
DA
22072012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2208
2209 Simple free memory accounting feature.
2210 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
2211 (sweep_vectors): Accumulate size of free vectors.
2212 (Fgarbage_collect): Setup bytes_free.
2213 (Fmemory_free): New function.
2214 (syms_of_alloc): Register it.
2215
22657b40
DA
22162012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
2217
2218 Cleanup overlays checking.
2219 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
2220 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
2221 eassert and OVERLAYP.
2222 (sort_overlays): Change to use OVERLAYP.
2223
ddfc8813
RK
22242012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
2225
2226 * editfns.c (Finsert_char): Make it interactive, and make the
2227 second arg optional. Copy interactive spec and docstring from
2228 ucs-insert.
2229
7c26cf3c
PE
22302012-07-17 Paul Eggert <eggert@cs.ucla.edu>
2231
2232 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
2233 Unlike the other wrapped functions, fabs has an unspecified
2234 effect on errno.
2235
5d127af9
JD
22362012-07-16 Jan Djärv <jan.h.d@swipnet.se>
2237
2238 * nsterm.m (keyDown): Interpret flags without left/right bits
2239 as the left key (Bug#11670).
2240
6a0dd1d7
DA
22412012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2242
2243 Remove empty and useless init functions.
2244 * lisp.h (init_character_once, init_fns, init_image)
2245 (init_filelock, init_sound): Remove prototype.
2246 * character.c (init_character_once): Remove.
2247 * filelock.c (init_filelock): Likewise.
2248 * fns.c (init_fns): Likewise.
2249 * image.c (init_image): Likewise.
2250 * sound.c (init_sound): Likewise.
2251 * emacs.c (main): Adjust accordingly.
2252
7a6136fd
DA
22532012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
2254
2255 * gtkutil.h: Tiny cleanups.
2256 (use_old_gtk_file_dialog): Remove useless declaration.
2257 (xg_uses_old_file_dialog): Add suggested const attribute.
2258
ce811ad9
EZ
22592012-07-15 Eli Zaretskii <eliz@gnu.org>
2260
2261 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
2262 (bidi_paragraph_init): Use it to limit search forward for a strong
2263 directional character in abnormally large paragraphs full of
2264 neutral or weak characters. (Bug#11943)
2265
c9adfeaa
SF
22662012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
2267
2268 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
2269 the toolbar (Bug#9451).
2270 (xg_make_tool_item): Give the widget event box a transparent
2271 background.
2272
fff62aa9
DA
22732012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2274
2275 Cleanup basic allocation variables and functions.
2276 * alloc.c (ignore_warnings, init_intervals, init_float)
2277 (init_cons, init_symbol, init_marker): Remove.
2278 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
2279 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
2280 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
2281 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
2282 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
2283 (staticidx, init_alloc_once, init_strings, free_ablock):
2284 Remove redundant initialization.
2285 * fns.c (init_weak_hash_tables): Remove.
2286 * lisp.h (init_weak_hash_tables): Remove prototype.
2287
9730daca
DA
22882012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
2289
2290 Use zero_vector where appropriate.
2291 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
2292 accordingly.
2293 * lisp.h (zero_vector): New declaration.
2294 * font.c (null_vector): Remove.
2295 (syms_of_font): Remove initialization and staticpro.
2296 (font_list_entities, font_find_for_lface): Change to use zero_vector.
2297 * keymap.c (Faccessible_keymaps): Likewise.
2298
2e2d2a13
LL
22992012-07-15 Leo Liu <sdl.web@gmail.com>
2300
2301 * fringe.c: Fix typo in comments.
2302
cd276f6e
LL
23032012-07-14 Leo Liu <sdl.web@gmail.com>
2304
2305 * fringe.c: Add a new bitmap exclamation-mark.
2306
5a1131d9
EZ
23072012-07-14 Eli Zaretskii <eliz@gnu.org>
2308
2309 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
2310
2311 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
2312 (HAVE_MENUS): Don't define, defined by editing config.in with
2313 msdos/sed2v2.inp.
2314 (GMALLOC_INHIBIT_VALLOC): Don't define.
2315 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
2316
22e983b7
JB
23172012-07-14 Juanma Barranquero <lekktu@gmail.com>
2318
2319 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
2320
5b3f250f
GM
23212012-07-14 Glenn Morris <rgm@gnu.org>
2322
2323 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
2324 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
2325 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
2326
33d63ff4
GM
23272012-07-13 Glenn Morris <rgm@gnu.org>
2328
5b633342
GM
2329 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
2330
33d63ff4
GM
2331 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
2332 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
2333
b55b9f85
JD
23342012-07-13 Jan Djärv <jan.h.d@swipnet.se>
2335
0dc8cf50
JD
2336 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
2337 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
2338 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
2339 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
2340 where appropriate.
2341 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
2342 as boolean expression.
2343 (x_set_window_size): Remove unused variable toolbar.
2344 (ns_get_color_default, ns_mod_to_lisp): Remove.
2345 (ns_mouse_position): Remove unused variables xchar and ychar.
2346 (ns_compute_glyph_string_overhangs): Remove unused variable face.
2347 (ns_set_vertical_scroll_bar): Remove unused variable count.
2348 (ns_delete_terminal): Remove unused variable i.
2349 (ns_term_init): Remove unused variables r, g and b.
2350 (mouseDown): Remove unused variable window.
2351 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
2352 (initFrameFromEmacs): Remove unused variable vbextra.
2353 (mouseEntered): Remove unused variables p and dpyinfo.
2354 (mouseExited): Remove unused variables p and r.
2355 (ns_define_frame_cursor, ns_clear_frame_area)
2356 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
2357 (menuDown): Assign [sender tag] to variable and cast the variable.
2358
2359 * nsterm.h (menuDown): Add id as type to argument sender.
2360 (ns_display_info_for_name): Add Lisp_Object argument.
2361 (ns_term_init): Add Lisp_Object argument.
2362 (ns_map_event_to_object): Add void argument.
2363 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
2364 prototype with arguments and only declare if __OBJC__.
2365 (nxatoms_of_nsselect): Add void argument.
2366 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
2367 (ns_alloc_autorelease_pool): Add void argument.
2368 (ns_release_autorelease_pool): Add void* argument.
2369 (ns_get_defaults_value): Add const char* argument.
2370
2371 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
2372 (initFromContents): Use SSDATA where appropriate.
2373 (ns_update_menubar): Add braces to ambigous if-else.
2374 (initWithTitle): Put () around assignment in if statement.
2375 (ns_menu_show): Remove unused variables window and keymap.
2376 (update_frame_tool_bar): Remove unused variable selected_p.
2377 (initWithContentRect): Remove unused variable this_cmd_name.
2378
2379 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
2380 appropriate.
2381 (setXBMColor): Remove unused variable len.
2382 (setPixmapData): Put () around assignment in loop statement.
2383
2384 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
2385 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
2386 where appropriate.
2387 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
2388 around assignment in loop statement.
2389 (nsfont_open): Remove unused variable i.
2390 (nsfont_open): Remove unused variable len.
2391 (nsfont_draw): Remove unused variable cs.
2392
2393 * nsfns.m (x_set_icon_name, ns_set_name_internal)
2394 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
2395 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
2396 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
2397 (Fns_font_name, Fns_perform_service)
2398 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
2399 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
2400 (ns_set_name): Remove unused variable view.
2401 (x_set_menu_bar_lines): Remove unused variable olines.
2402 (x_set_tool_bar_lines): Remove unused variable root_window.
2403 (Fns_list_colors): Put () around assignment in while statement.
2404 (Fns_perform_service): Remove unused variable len.
2405 (Fns_display_usable_bounds): Remove unused variable top.
2406 (syms_of_nsfns): Remove unused variable i.
2407
b55b9f85
JD
2408 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
2409 memcpy (Bug#11907).
2410
ed9265fc 24112012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
2277de02
JD
2412
2413 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
2414 and free it with DestroyExceptionInfo (Bug#11558).
2415
ef099b57
JB
24162012-07-13 Juanma Barranquero <lekktu@gmail.com>
2417
2418 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
2419 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
2420 Set here, not in nt/config.nt.
2421
ea814a5d
EZ
24222012-07-13 Eli Zaretskii <eliz@gnu.org>
2423
2424 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
2425 cursor overflow into the last glyph on display line when the right
2426 fringe is off. (Bug#11832)
2427
1a952767
PE
24282012-07-13 Paul Eggert <eggert@cs.ucla.edu>
2429
2430 * xdisp.c (produce_special_glyphs): Now static.
2431 * dispextern.h (produce_special_glyphs): Remove decl.
2432
983188fd
GM
24332012-07-13 Glenn Morris <rgm@gnu.org>
2434
8d7c7eed 2435 * s/bsd-common.h, s/cygwin.h: Remove empty files.
32fb4bb6
GM
2436 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
2437
983188fd
GM
2438 * s/usg5-4-common.h (USG, USG5):
2439 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
2440 * s/sol2-6.h (SOLARIS2):
2441 * s/irix6-5.h (IRIX6_5):
2442 * s/hpux10-20.h (USG, USG5, HPUX):
2443 * s/gnu-linux.h (USG, GNU_LINUX):
2444 * s/freebsd.h (BSD_SYSTEM):
2445 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
2446 * s/cygwin.h (CYGWIN):
2447 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
2448 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
2449
d1e68667 24502012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
24ef80ae
PE
2451
2452 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
24ef80ae 2453
6de0e799
GM
24542012-07-13 Glenn Morris <rgm@gnu.org>
2455
739ae010
GM
2456 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
2457
dbee5793
GM
2458 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
2459
6de0e799
GM
2460 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
2461 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
2462
b82da769
GM
24632012-07-12 Glenn Morris <rgm@gnu.org>
2464
4fae5a7a 2465 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
b82da769
GM
2466
2467 * process.c (init_process_emacs): Rename from init_process.
2468 The old name is also the name of a Mach system call.
2469 * lisp.h, emacs.c: Update for this name change.
2470 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
2471 longer needed.
2472
5a979817
EZ
24732012-07-12 Eli Zaretskii <eliz@gnu.org>
2474
2475 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
2476 memmove call that removes glyphs covered by the left truncation
2477 glyph. Improve commentary.
2478 (display_line): Fix display of continuation glyphs on GUI frames
2479 when the right fringe is turned off and variable-size fonts are
2480 used in the window. Move the code that appends a stretch glyph to
2481 produce_special_glyphs, so that it could be used for truncation
2482 and continuation glyphs alike.
2483 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
2484 glyph of a suitably computed width, to align the special glyphs at
2485 the window margin. Code moved from display_line. (Bug#11832)
2486
3e91a053
GM
24872012-07-12 Glenn Morris <rgm@gnu.org>
2488
ba9e4b84
GM
2489 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
2490
2491 * s/gnu-linux.h, s/hpux10-20.h:
2492 Do not unconditionally define HAVE_XRMSETDATABASE.
2493
3e91a053
GM
2494 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
2495
b300b1f4
PE
24962012-07-12 Paul Eggert <eggert@cs.ucla.edu>
2497
2498 Fix typos that broke OS X build.
2499 Reported by Randal L. Schwartz in
2500 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
2501 * nsterm.m (ns_timeout): Add missing local decl.
2502 (ns_get_color): snprintf -> sprintf, to fix typo.
2503
6e777848
GM
25042012-07-12 Glenn Morris <rgm@gnu.org>
2505
3f922c37
GM
2506 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
2507 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
2508 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
2509 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
2510
0ab7b23a
GM
2511 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
2512 Move PTY_OPEN to configure.
2513
6e777848
GM
2514 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
2515 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
2516 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
2517
4a7edc24
DA
25182012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
2519
2520 Use empty_unibyte_string where applicable.
2521 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
2522 * lread.c (read1): Likewise.
2523 * xsettings.c (syms_of_xsettings): Likewise.
2524
308aab79
GM
25252012-07-12 Glenn Morris <rgm@gnu.org>
2526
42bd1719
GM
2527 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
2528 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
7ccad002
GM
2529 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
2530 * s/hpux10-20.h (RUN_TIME_REMAP):
2531 * s/bsd-common.h (TABDLY): Move to configure.
2532
2533 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
2534
2535 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
2536
ea0bbd17 2537 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
42bd1719 2538 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
ea0bbd17
GM
2539
2540 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
51c3b9b4 2541
308aab79
GM
2542 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
2543 * s/template.h: Move NARROWPROTO to configure.
2544
ee1cf5cf
GM
25452012-07-11 Glenn Morris <rgm@gnu.org>
2546
30fe9bf4
GM
2547 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
2548 unused since 2011-01-17 change to systty.h.
2549
ee1cf5cf
GM
2550 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
2551 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
2552 Move HAVE_PTYS and HAVE_SOCKETS to configure.
2553
63e47e07
PE
25542012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2555
2556 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
2557
c43fb4c3
GM
25582012-07-11 Glenn Morris <rgm@gnu.org>
2559
2560 * s/darwin.h, s/gnu-linux.h, s/template.h:
2561 Move INTERRUPT_INPUT to configure.
2562
e8df9267
DA
25632012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2564
2565 Minor adjustments to interning code.
2566 * lisp.h (intern, intern_c_string): Redefine as static inline
2567 wrappers for intern_1 and intern_c_string_1, respectively.
2568 (intern_1, intern_c_string_1): Rename prototypes.
14ae4239
BT
2569 * lread.c (intern_1, intern_c_string_1, oblookup):
2570 Simplify Vobarray checking.
e8df9267
DA
2571 * font.c (font_intern_prop): Likewise. Adjust comment.
2572 * w32font.c (intern_font_name): Likewise.
2573
34348bd4
AS
25742012-07-11 Andreas Schwab <schwab@linux-m68k.org>
2575
d96a1e0c
AS
2576 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
2577
34348bd4
AS
2578 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
2579 of Fcar/Fcdr if possible.
2580 * font.c (check_otf_features): Likewise.
2581 * fontset.c (Fnew_fontset): Likewise.
2582 * gnutls.c (Fgnutls_boot): Likewise.
2583 * minibuf.c (read_minibuf): Likewise.
2584 * msdos.c (IT_set_frame_parameters): Likewise.
2585 * xmenu.c (Fx_popup_dialog): Likewise.
2586 * w32menu.c (Fx_popup_dialog): Likewise.
2587
c8add24e
GM
25882012-07-11 Glenn Morris <rgm@gnu.org>
2589
4b575b3c
GM
2590 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
2591 since nothing has defined it on these platforms.
2592
09f4e3b0
GM
2593 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
2594 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
2595
172bedef
GM
2596 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
2597 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
2598 Move CLASH_DETECTION to configure.
2599
249685df
GM
2600 * s/gnu.h: Remove file, which is now empty.
2601
c8add24e
GM
2602 * s/gnu.h, s/gnu-linux.h:
2603 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
2604
b41253a3
JW
26052012-07-11 John Wiegley <johnw@newartisans.com>
2606
2607 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
2608 function attribute, so we only use it if it exists in the
2609 compiler.
2610
d923b542
DA
26112012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2612
2613 Avoid call to strlen in fast_c_string_match_ignore_case.
2614 * search.c (fast_c_string_match_ignore_case): Change to use
2615 length argument. Adjust users accordingly.
2616 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
2617
5ebbef1d
PE
26182012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2619
bb352260
PE
2620 Assume mkdir, rmdir.
2621 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
2622 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
2623
57054ddd
PE
2624 Assume rename.
2625 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
2626
b747d3f7
PE
2627 Assume perror.
2628 * s/hpux10-20.h (HAVE_PERROR): Remove.
2629 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
2630 Remove dummy definition, as this problem was obsolete long ago.
2631
5ebbef1d
PE
2632 Assume strerror.
2633 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
2634
984e7f30
DA
26352012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
2636
2637 Avoid calls to strlen in font processing functions.
2638 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
14ae4239
BT
2639 (font_open_by_name): Change to use length argument.
2640 Adjust users accordingly.
d923b542
DA
2641 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
2642 Adjust prototypes.
2643 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
2644 Change to return ptrdiff_t.
984e7f30
DA
2645 (xfont_list_pattern, xfont_match): Use length returned by
2646 xfont_decode_coding_xlfd.
2647 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
2648
20e94fdd
GM
26492012-07-11 Glenn Morris <rgm@gnu.org>
2650
9d596af3
GM
2651 * s/darwin.h, s/freebsd.h, s/netbsd.h:
2652 Move DONT_REOPEN_PTY to configure.
2653
20e94fdd
GM
2654 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
2655 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
2656
e99a530f
PE
26572012-07-10 Paul Eggert <eggert@cs.ucla.edu>
2658
22ffb973
PE
2659 Remove "#define unix" that is no longer needed (Bug#11905).
2660 * s/aix4-2.h (unix): Remove; no longer needed.
2661
e9a9ae03
PE
2662 EMACS_TIME simplification (Bug#11875).
2663 This replaces macros (which typically do not work in GDB)
2664 with functions, typedefs and enums, making the code easier to debug.
2665 The functional style also makes code easier to read and maintain.
2666 * systime.h: Include <sys/time.h> on all hosts, not just if
2667 WINDOWSNT, since 'struct timeval' is needed in general.
2668 (EMACS_TIME): Now a typedef, not a macro.
2669 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
2670 not macros.
2671 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
2672 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
2673 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
2674 (EMACS_TIME_LE): Now functions, not macros.
2675 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
2676 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
2677 which are not functions. All uses rewritten to use:
2678 (make_emacs_time): New function.
2679 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
2680 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
2681 not functions. All uses rewritten to use the following, respectively:
2682 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
2683 (add_emacs_time, sub_emacs_time): New functions.
ed9265fc 2684 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
e9a9ae03
PE
2685 * fileio.c (Fcopy_file):
2686 * xterm.c (XTflash): Get the current time closer to when it's used.
2687 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
2688
ffacb126
PE
2689 * bytecode.c (targets): Suppress -Woverride-init warnings.
2690
e99a530f
PE
2691 Simplify by avoiding confusing use of strncpy etc.
2692 * doc.c (Fsnarf_documentation):
2693 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
2694 * frame.c (Fmake_terminal_frame):
2695 * gtkutil.c (get_utf8_string):
2696 * lread.c (openp):
2697 * nsmenu.m (ns_update_menubar):
2698 * regex.c (regerror):
2699 Prefer memcpy to strncpy and strncat when either will do.
2700 * fileio.c (Fsubstitute_in_file_name):
2701 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
2702 (menu_separator_name_p):
2703 * nsmenu.m (ns_update_menubar):
2704 Prefer memcmp to strncmp when either will do.
2705 * nsterm.m: Include <ftoastr.h>.
2706 (ns_get_color):
2707 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
2708 Prefer snprintf to strncpy.
2709 * nsterm.m (ns_term_init):
2710 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
2711 * nsterm.m (ns_term_init):
2712 Avoid the need for strncpy, by using build_string or
2713 make_unibyte_string directly. Use dtoastr, not snprintf.
2714 * process.c (Fmake_network_process): Diagnose service names that
2715 are too long, rather than silently truncating them or creating
2716 non-null-terminated names.
2717 (Fnetwork_interface_info): Likewise, for interface names.
2718 * sysdep.c (system_process_attributes) [GNU_LINUX]:
2719 Prefer sprintf to strncat.
2720 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
2721 Prefer vsnprintf to vsprintf + strncpy.
2722
c59592b3
GM
27232012-07-10 Glenn Morris <rgm@gnu.org>
2724
2725 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
2726 Clarify fallback case.
2727
7d7bbefd
DA
27282012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
2729
2730 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
2731 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
2732 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
d923b542 2733 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
7d7bbefd
DA
2734 where argument type is known to be a Lisp_Cons.
2735
3a4c8000
TT
27362012-07-10 Tom Tromey <tromey@redhat.com>
2737
2738 * bytecode.c (BYTE_CODE_THREADED): New macro.
2739 (BYTE_CODES): New macro. Replaces all old byte-code defines.
2740 (enum byte_code_op): New type.
2741 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
2742 (exec_byte_code): Use them. Use token threading when applicable.
2743
2a0213a6
DA
27442012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
2745
2746 Optimize pure C strings initialization.
2747 * lisp.h (make_pure_string): Fix prototype.
2748 (build_pure_c_string): New function, defined as static inline. This
2749 provides a better opportunity to optimize away calls to strlen when
2750 the function is called with compile-time constant argument.
2751 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
2752 argument, adjust users accordingly. Use build_pure_c_string where
2753 appropriate.
2754 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
2755 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
2756 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
2757
cb1caeaf
DA
27582012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
2759
2760 Avoid calls to strlen in miscellaneous functions.
2761 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
2762 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
2763 * lread.c (openp): Likewise.
2764
c293e30c
DA
27652012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
2766
2767 Avoid calls to strlen in path processing functions.
2768 * fileio.c (file_name_as_directory): Add comment. Change to add
2769 srclen argument and return the length of result. Adjust users
2770 accordingly.
2771 (directory_file_name): Fix comment. Change to add srclen argument,
14ae4239
BT
2772 swap 1st and 2nd arguments to obey the common convention.
2773 Adjust users accordingly.
c293e30c
DA
2774 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
2775
9e059e3f
GM
27762012-07-10 Glenn Morris <rgm@gnu.org>
2777
d02eb359
GM
2778 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
2779 Move PENDING_OUTPUT_COUNT definition to configure.
2780
882cf227
GM
2781 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
2782 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
2783 * s/gnu.h (DATA_START): Move definitions to configure.
2784
af6e839f
GM
2785 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
2786 We include usg5-4-common.h, which defines them both.
2787
40289a12
GM
2788 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
2789 O_RDONLY already includes it).
2790
9e059e3f
GM
2791 Stop ns builds setting the EMACSLOADPATH environment variable.
2792 * nsterm.m (ns_load_path): Rename from ns_init_paths.
2793 Now it does not set EMACSLOADPATH, just returns the load-path string.
2794 * nsterm.h: Update accordingly.
2795 * lread.c [HAVE_NS]: Include nsterm.h.
2796 (init_lread) [HAVE_NS]: Use ns_load_path.
2797 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
2798
7c4e8ec0
GM
27992012-07-09 Glenn Morris <rgm@gnu.org>
2800
d4f600ff
GM
2801 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
2802 since the included bsd-common.h does so.
2803
cbb31951
GM
2804 Stop ns builds setting the EMACSPATH environment variable.
2805 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
2806 (ns_init_paths): Do not set EMACSPATH.
2807 * nsterm.h (ns_exec_path): Add it.
2808 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
2809 Use ns_exec_path.
2810
7c4e8ec0
GM
2811 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
2812
26bccfae
PE
28132012-07-09 Paul Eggert <eggert@cs.ucla.edu>
2814
a0bee46f
PE
2815 * process.c (wait_reading_process_output): 'waitchannels' was unset
2816 when read_kbd || !NILP (wait_for_cell); fix this.
2817
5994c183
PE
2818 Add GCC-style 'const' attribute to functions that can use it.
2819 * character.h (char_resolve_modifier_mask):
2820 * keyboard.h (make_ctrl_char):
2821 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
2822 (init_character_once, next_almost_prime, init_fns, init_image)
2823 (flush_pending_output, init_sound):
2824 * mem-limits.h (start_of_data):
2825 * menu.h (finish_menu_items):
2826 Add ATTRIBUTE_CONST.
2827 * emacs.c (DEFINE_DUMMY_FUNCTION):
2828 Declare the dummy function with ATTRIBUTE_CONST.
2829 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
2830 Add decls with ATTRIBUTE_CONST.
2831
26bccfae
PE
2832 Minor improvements to make_formatted_string.
2833 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
2834 where int is good enough, as vsprintf returns an int.
2835 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
2836
a8290ec3
DA
28372012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
2838
2839 Use make_formatted_string to avoid double length calculation.
2840 * lisp.h (make_formatted_string): New prototype.
2841 * alloc.c (make_formatted_string): New function.
2842 * buffer.c (Fgenerate_new_buffer_name): Use it.
2843 * dbus.c (syms_of_dbusbind): Likewise.
2844 * editfns.c (Fcurrent_time_zone): Likewise.
2845 * filelock.c (get_boot_time): Likewise.
2846 * frame.c (make_terminal_frame, set_term_frame_name)
2847 (x_report_frame_params): Likewise.
2848 * image.c (gs_load): Likewise.
2849 * minibuf.c (get_minibuffer): Likewise.
2850 * msdos.c (dos_set_window_size): Likewise.
2851 * process.c (make_process): Likewise.
2852 * xdisp.c (ensure_echo_area_buffers): Likewise.
2853 * xsettings.c (apply_xft_settings): Likewise.
2854
d01ba2f1
GM
28552012-07-09 Glenn Morris <rgm@gnu.org>
2856
2857 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
2858 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
2859 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
2860 * nsterm.h (ns_etc_directory): Add it.
2861 * callproc.c [HAVE_NS]: Include nsterm.h.
2862 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
2863
f1f924b6
DA
28642012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
2865
2866 Move marker debugging code under MARKER_DEBUG.
2867 * marker.c (MARKER_DEBUG): Move marker debugging code under
2868 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
2869 for bootstrap with --enable-checking (~3x slowdown reported
2870 by Juanma Barranquero <lekktu@gmail.com>).
2871 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
2872
ab531b66
PE
28732012-07-08 Paul Eggert <eggert@cs.ucla.edu>
2874
2875 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
2876 See <http://bugs.gnu.org/11825#29>.
2877
c4b3bc8a
EZ
28782012-07-08 Eli Zaretskii <eliz@gnu.org>
2879
2880 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
2881 has no font, use the frame's font. (Bug#11813)
3434fe8a
EZ
2882 (display_line): Add commentary about displaying truncation glyphs
2883 on GUI frames.
2884 (produce_special_glyphs): Move here from term.c.
2885
2886 * term.c (produce_special_glyphs): Move to xdisp.c.
2887
2888 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
2889 section.
c4b3bc8a 2890
b676b881
AS
28912012-07-07 Andreas Schwab <schwab@linux-m68k.org>
2892
f17c5273
AS
2893 * xdisp.c (display_line): Avoid warning about implicit declaration
2894 of FRAME_FONT.
2895
298819b9
AS
2896 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
2897
b676b881
AS
2898 * lisp.h: Remove empty conditional.
2899
6045c4fd
PE
29002012-07-07 Paul Eggert <eggert@cs.ucla.edu>
2901
b3350bf9
PE
2902 * lread.c (load_path_check): Now static.
2903
6045c4fd
PE
2904 Fix some minor --with-ns problems found by static checking.
2905 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
2906 (x_set_font) [!HAVE_X_WINDOWS]:
2907 * image.c (xpm_load_image) [HAVE_NS]:
2908 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
2909 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
2910 Remove unused local.
2911 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
2912 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
2913 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
2914 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
2915 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
2916 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
2917 Fix pointer signedness problem.
2918 * xfaces.c (FRAME_X_FONT_TABLE):
2919 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
2920
929e7845
GM
29212012-07-07 Glenn Morris <rgm@gnu.org>
2922
2923 * lread.c (load_path_check): New function, split from init_lread.
2924 (init_lread): Reorganize. Motivation:
2925 If EMACSLOADPATH is set, check/warn about that rather than the
2926 defaults, which we are not going to use. Hence we can remove
2927 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
2928 Don't warn if site-lisp directories are missing.
2929 If not installed, start from a blank load-path, since
2930 PATH_LOADSEARCH refers to the eventual installation directories.
2931
58dd0aa4
EZ
29322012-07-07 Eli Zaretskii <eliz@gnu.org>
2933
2934 Support truncation and continuation glyphs on GUI frames, when
2935 fringes are disabled. (Bug#11832)
2936 * xdisp.c (init_iterator): Get dimensions of truncation and
14ae4239
BT
2937 continuation glyphs even if on GUI frames.
2938 Adjust it->last_visible_x on GUI frames when the left or right fringes,
58dd0aa4
EZ
2939 or both, are absent.
2940 (start_display, move_it_in_display_line_to): Handle the case of a
2941 GUI frame without a fringe to display continuation or truncation
2942 glyphs.
2943 (insert_left_trunc_glyphs): Support GUI frames: make sure
2944 truncation glyphs overwrite enough glyphs from the current line to
2945 have sufficient space in pixels.
2946 (display_line): Support truncation and continuation glyphs on GUI
2947 frames. If some spare pixels are left on the line after inserting
2948 the truncation glyphs, fill that space with a stretch glyph of a
2949 suitably computed width.
2950
2951 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
2952 produce_glyphs, to support GUI sessions.
2953
31571fd7
PE
29542012-07-07 Paul Eggert <eggert@cs.ucla.edu>
2955
5a16b9bc
PE
2956 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
2957
f3047c75
PE
2958 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
2959
31571fd7
PE
2960 Do not require float-time's arg to fit in time_t (Bug#11825).
2961 This works better on hosts where time_t is unsigned, and where
2962 float-time is applied to the (negative) difference between two times.
2963 * editfns.c (decode_time_components): Last arg is now double *,
2964 not int *, and means to store all the result as a double, without
2965 worrying about whether the seconds part fits in time_t.
2966 All callers changed.
2967 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
2968 All callers changed.
2969 (Ffloat_time): Do not fail merely because the specified time falls
2970 outside of time_t range.
2971
4516fbef
GM
29722012-07-07 Glenn Morris <rgm@gnu.org>
2973
2974 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
2975 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
2976 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
2977
07adc2c6
JB
29782012-07-07 Juanma Barranquero <lekktu@gmail.com>
2979
2980 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
2981 Update dependencies.
2982
2983 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
2984
fd573f31
PE
29852012-07-06 Paul Eggert <eggert@cs.ucla.edu>
2986
fee5959d
PE
2987 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
2988 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
2989 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
2990 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
2991 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
2992 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
2993
fd573f31
PE
2994 * xfont.c (compare_font_names): Redo to omit the need for casts.
2995
ddadbc0e
AS
29962012-07-06 Andreas Schwab <schwab@linux-m68k.org>
2997
fca8d6b6
AS
2998 * xfns.c (Fx_change_window_property): Doc fix.
2999 * w32fns.c (Fx_change_window_property): Doc fix.
3000
ddadbc0e
AS
3001 * w32fns.c (Fx_window_property): Accept the same arguments as the
3002 X Windows version. Doc fix.
3003 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
3004
ed9265fc 30052012-07-06 Juanma Barranquero <lekktu@gmail.com>
f247498e
JB
3006 Eli Zaretskii <eliz@gnu.org>
3007
3008 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
3009 Windows-specific code from nt/config.nt moved here.
3010 Obsolete settings removed.
3011
216ee680
PE
30122012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3013
3014 * process.c: Avoid unnecessary calls to gettime.
3015 (wait_reading_process_output): Don't get the time of day
3016 when gobbling data immediately and not waiting, as there's no need
3017 for it in that case. This removes a FIXME.
3018
bdd091e4
JD
30192012-07-06 Jan Djärv <jan.h.d@swipnet.se>
3020
3021 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
3022 is defined (Bug#11768).
3023
9d44f8ce
DA
30242012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3025
3026 Fix marker debugging code.
3027 * marker.c (byte_char_debug_check): Do not perform the check
3028 if buffer is not multibyte.
090bd7cb
JB
3029 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3030 Call byte_char_debug_check with correct arguments.
9d44f8ce 3031
90fc4786
DA
30322012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3033
3034 Compile marker debugging code only if ENABLE_CHECKING is defined.
090bd7cb
JB
3035 * marker.c (byte_char_debug_check, count_markers):
3036 Use only if ENABLE_CHECKING is defined.
90fc4786
DA
3037 (byte_debug_flag): Remove.
3038 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
3039 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
3040
7b7ae965
DA
30412012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3042
4e57b342
DA
3043 Avoid code repetition in marker-related functions.
3044 * marker.c (attach_marker): New function.
3045 (Fset_marker, set_marker_restricted, set_marker_both)
3046 (set_marker_restricted_both): Use it.
3047 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
3048 Consistently rename charno to charpos.
3049 (marker_position): Add eassert.
3050 (marker_byte_position): Convert to eassert.
3051
30522012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3053
3054 Simplify list operations in unchain_overlay and unchain_marker.
7b7ae965 3055 * buffer.c (unchain_overlay): Simplify. Add comment.
4e57b342 3056 * marker.c (unchain_marker): Simplify. Fix comments.
7b7ae965 3057
657924ff
DA
30582012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3059
3060 Introduce fast path for the widely used marker operation.
3061 * alloc.c (build_marker): New function.
3062 * lisp.h (build_marker): New prototype.
3063 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
3064 * composite.c (autocmp_chars): Likewise.
3065 * editfns.c (buildmark): Remove.
3066 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
3067 (save_restriction_save): Use build_marker.
3068 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
3069 * window.c (save_window_save): Likewise.
3070
041a49a6
DA
30712012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
3072
3073 Do not use Fdelete_overlay in delete_all_overlays
3074 to avoid redundant calls to unchain_overlay.
3075 * buffer.c (drop_overlay): New function.
3076 (delete_all_overlays, Fdelete_overlay): Use it.
3077 * minibuf.c (get_minibuffer): Fix comment.
3078
7dca65a4
PE
30792012-07-06 Paul Eggert <eggert@cs.ucla.edu>
3080
3081 Port to OpenBSD 5.1 amd64.
3082 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
3083 This is needed for OpenBSD, and should be harmless on all BSD systems.
3084 Also, include <sys/sysctl.h>, as it should be available on all
3085 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
3086 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
3087 use p_pid member, not kp_proc.pid.
3088
8eb876e2
GM
30892012-07-06 Glenn Morris <rgm@gnu.org>
3090
3091 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
3092
38182d90
PE
30932012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3094
3095 More xmalloc and related cleanup.
3096 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
3097 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
3098 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
3099 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
3100 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
3101 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
3102 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
3103 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
3104 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
3105 * xterm.c:
3106 Omit needless casts involving void * pointers and allocation.
3107 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
3108 as the former is more robust if P's type is changed.
3109 Prefer xzalloc to xmalloc + memset 0.
3110 Simplify malloc-or-realloc to realloc.
3111 Don't worry about xmalloc returning a null pointer.
3112 Prefer xstrdup to xmalloc + strcpy.
3113 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
3114 growing it.
3115 * keyboard.c (apply_modifiers_uncached): Prefer local array to
3116 alloca of a constant.
3117
6dd5a677
EZ
31182012-07-05 Eli Zaretskii <eliz@gnu.org>
3119
3120 * xdisp.c (display_line): Fix horizontal pixel coordinates when
3121 hscroll is larger than the line width. Fixes long and futile
3122 looping inside extend_face_to_end_of_line (on a TTY) producing
3123 glyphs that are not needed and thrown away.
3124
6b312f0f
DA
31252012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3126
3127 * marker.c (set_marker_restricted_both): Simplify by using
3128 clip_to_bounds.
3129
f520ef9b
PE
31302012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3131
3132 * editfns.c (region_limit): Simplify by using clip_to_bounds.
3133
383b7c95
JD
31342012-07-05 Jan Djärv <jan.h.d@swipnet.se>
3135
3136 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
3137 not defined (Bug#11768).
3138 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
3139 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
3140 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
3141 followed by gtk_box_set_homogeneous (Bug#11768).
3142 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
090bd7cb
JB
3143 (update_theme_scrollbar_width, xg_create_scroll_bar):
3144 Use gtk_scrollbar_new (Bug#11768).
383b7c95
JD
3145 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
3146 (is_box_type): New function (Bug#11768).
3147 (xg_tool_item_stale_p): Call is_box_type.
5293d758 3148 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
383b7c95
JD
3149 with default display (Bug#11768).
3150
d6e7bf45
EZ
31512012-07-05 Eli Zaretskii <eliz@gnu.org>
3152
3153 * xdisp.c (window_hscroll_limited): New function.
3154 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
3155 coordinates when window's hscroll is set to insanely large
3156 values. (Bug#11857)
3157
431391ec
JB
31582012-07-05 Juanma Barranquero <lekktu@gmail.com>
3159
3160 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
3161 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
3162
23f86fce
DA
31632012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
3164
3165 Cleanup xmalloc.
3166 * lisp.h (xzalloc): New prototype. Omit needless casts.
3167 * alloc.c (xzalloc): New function. Omit needless casts.
3168 * charset.c: Omit needless casts. Convert all calls to
3169 xmalloc with following memset to xzalloc.
3170 * dispnew.c: Likewise.
3171 * fringe.c: Likewise.
3172 * image.c: Likewise.
3173 * sound.c: Likewise.
3174 * term.c: Likewise.
3175 * w32fns.c: Likewise.
3176 * w32font.c: Likewise.
3177 * w32term.c: Likewise.
3178 * xfaces.c: Likewise.
3179 * xfns.c: Likewise.
3180 * xterm.c: Likewise.
3181 * atimer.c: Omit needless casts.
3182 * buffer.c: Likewise.
3183 * callproc.c: Likewise.
3184 * ccl.c: Likewise.
3185 * coding.c: Likewise.
3186 * composite.c: Likewise.
3187 * doc.c: Likewise.
3188 * doprnt.c: Likewise.
3189 * editfns.c: Likewise.
3190 * emacs.c: Likewise.
3191 * eval.c: Likewise.
3192 * filelock.c: Likewise.
3193 * fns.c: Likewise.
3194 * gtkutil.c: Likewise.
3195 * keyboard.c: Likewise.
3196 * lisp.h: Likewise.
3197 * lread.c: Likewise.
3198 * minibuf.c: Likewise.
3199 * msdos.c: Likewise.
3200 * print.c: Likewise.
3201 * process.c: Likewise.
3202 * region-cache.c: Likewise.
3203 * search.c: Likewise.
3204 * sysdep.c: Likewise.
3205 * termcap.c: Likewise.
3206 * terminal.c: Likewise.
3207 * tparam.c: Likewise.
3208 * w16select.c: Likewise.
3209 * w32.c: Likewise.
3210 * w32reg.c: Likewise.
3211 * w32select.c: Likewise.
3212 * w32uniscribe.c: Likewise.
3213 * widget.c: Likewise.
3214 * xdisp.c: Likewise.
3215 * xmenu.c: Likewise.
3216 * xrdb.c: Likewise.
3217 * xselect.c: Likewise.
3218
0497dc44
PE
32192012-07-05 Paul Eggert <eggert@cs.ucla.edu>
3220
3221 * fileio.c (time_error_value): Check the right error number.
3222 Problem reported by Troels Nielsen in
3223 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
3224
356e7178
PE
32252012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3226
4e71fd89
PE
3227 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
3228 This should be fixed in a better way; see Eli Zaretskii in
3229 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
3230 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
3231
f0941253
PE
3232 * fileio.c (time_error_value): Rename from special_mtime.
3233 The old name's problems were noted by Eli Zaretskii in
3234 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
3235
065c9eb4
PE
3236 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
3237 This variable's comment says Emacs needs at least one GDB-visible
3238 symbol of type enum pvec_type, to work around GDB problems.
3239 The symbol's value doesn't matter.
3240
356e7178
PE
3241 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
3242 that causes compilation to fail on pre-C99 compilers.
3243
ed9265fc 32442012-07-04 Juanma Barranquero <lekktu@gmail.com>
95f61aa2
JB
3245
3246 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
3247 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
3248
3884d954
DA
32492012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3250
d209e2fb 3251 * buffer.c (init_buffer_once): Fix initialization of
3884d954
DA
3252 headers for buffer_defaults and buffer_local_symbols.
3253 Reported by Juanma Barranquero <lekktu@gmail.com>.
3254
ee28be33
SM
32552012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
3256
3257 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
3258 * lisp.h (enum pvec_type): Use fewer bits.
3259 (PSEUDOVECTOR_SIZE_BITS): New constant.
3260 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
3261 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
3262 change in pvec_type.
3263 (PSEUDOVECTOR_TYPEP): New macro.
3264 (TYPED_PSEUDOVECTORP): Use it.
3265 * fns.c (internal_equal): Adapt code to extract pvectype.
3266 * emacs.c (gdb_pvec_type): Update type.
3267 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
3268 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
3269 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
3270 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
3271 (sweep_vectors): Use it. Use local var `total_bytes' instead of
3272 abusing vector->header.next.nbytes.
3273 (live_vector_p): Use PVEC_TYPE.
3274 (mark_object): Adapt code to extract pvectype. Use switch.
3275
c7f2cd7f
PE
32762012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3277
3278 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
3279 Tighten new eassert a bit.
3280
8ce70ed2
DA
32812012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3282
3283 Fix compilation with --enable-gcc-warnings and -O1
3284 optimization level.
3285 * doprnt.c (doprnt): Change type of tem to int, initialize
3286 to avoid compiler warning. Add eassert.
3287 * search.c (simple_search): Initialize match_byte to avoid
3288 compiler warning. Add eassert.
3289
dea7f1e5
PE
32902012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3291
24a212eb
PE
3292 Avoid weird behavior with large horizontal scrolls.
3293 Without this change, for example, large hscroll values would
3294 mess up Emacs's display on Fedora 15 x86, presumably due to
3295 overflows in int calculations in the display code.
3296 Also, if buffers had long lines, Emacs would freeze.
3297 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
3298 (set_window_hscroll): New function, containing the old guts of
3299 Fset_window_hscroll. Return the clipped value.
3300 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
3301 This avoids the need to check against PTRDIFF_MAX.
3302
dea7f1e5
PE
3303 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
3304
76046526
DA
33052012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
3306
3307 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
3308
39adff0d
PE
33092012-07-04 Paul Eggert <eggert@cs.ucla.edu>
3310
63807d47
PE
3311 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
3312 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
3313 since GCC 4.4.6 issues a bogus warning for them.
3314
39adff0d
PE
3315 Fix bugs in file timestamp newness comparisons.
3316 * fileio.c (Ffile_newer_than_file_p):
3317 * lread.c (Fload): Use full timestamp resolution of files,
3318 not just the 1-second resolution, so that files that are only
3319 slightly newer still count as newer.
3320 * fileio.c (Ffile_newer_than_file_p): Don't assume file
3321 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
3322
dbeed9a6
PE
33232012-07-03 Paul Eggert <eggert@cs.ucla.edu>
3324
3325 * fileio.c: Improve handling of file time marker. (Bug#11852)
3326 (special_mtime): New function.
3327 (Finsert_file_contents, Fverify_visited_file_modtime):
3328 Use it to set special mtime values consistently.
3329
636334d6
AS
33302012-07-03 Andreas Schwab <schwab@linux-m68k.org>
3331
3332 * fileio.c (Finsert_file_contents): Properly handle st_mtime
3333 marker for non-existing file. (Bug#11852)
3334
e2017fe2
GM
33352012-07-03 Glenn Morris <rgm@gnu.org>
3336
3337 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
3338 and did not make it into globals.h).
3339
404dbd37
TT
33402012-07-03 Tom Tromey <tromey@redhat.com>
3341
3342 * window.c (Fset_window_margins, Fset_window_fringes)
3343 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
3344 * textprop.c (Fprevious_property_change): No longer static.
3345 * syntax.c (Fsyntax_table_p): No longer static.
3346 * process.c (Fget_process, Fprocess_datagram_address): No longer
3347 static.
3348 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
3349 * keyboard.c (Fcommand_execute): No longer static.
3350 Remove EXFUN.
3351 * insdel.c (Fcombine_after_change_execute): No longer static.
3352 * image.c (Finit_image_library): No longer static.
3353 * fileio.c (Fmake_symbolic_link): No longer static.
3354 * eval.c (Ffetch_bytecode): No longer static.
3355 * editfns.c (Fuser_full_name): No longer static.
d209e2fb
JB
3356 * doc.c (Fdocumentation_property, Fsnarf_documentation):
3357 No longer static.
404dbd37
TT
3358 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
3359 static.
3360 * dired.c (Ffile_attributes): No longer static.
3361 * composite.c (Fcomposition_get_gstring): No longer static.
3362 * callproc.c (Fgetenv_internal): No longer static.
3363
3364 * ccl.h: Remove EXFUNs.
3365 * buffer.h: Remove EXFUNs.
3366 * dispextern.h: Remove EXFUNs.
3367 * intervals.h: Remove EXFUNs.
3368 * fontset.h: Remove EXFUN.
3369 * font.h: Remove EXFUNs.
3370 * dosfns.c (system_process_attributes): Remove EXFUN.
3371 * keymap.h: Remove EXFUNs.
3372 * lisp.h: Remove EXFUNs.
3373 * w32term.h: Remove EXFUNs.
3374 * window.h: Remove EXFUNs.
3375 * xsettings.h: Remove EXFUN.
3376 * xterm.h: Remove EXFUN.
3377
8e4fd1e1
GM
33782012-07-03 Glenn Morris <rgm@gnu.org>
3379
3380 * lisp.h (Frandom): Make it visible to C.
3381 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
3382 buffer for invisible buffers. (Bug#1229)
3383
ca95b3eb
DA
33842012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3385
3386 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
3387 values which aren't power of 2.
14ae4239
BT
3388 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
3389 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
ca95b3eb
DA
3390 accordingly.
3391
7555c33f
SM
33922012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
3393
3394 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
3395
3396 * alloc.c (mark_object): Revert part of last patch to use `switch'.
3397
d12e8f5a
DA
33982012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3399
3400 * alloc.c (allocate_vector_block): Remove redundant
3401 calls to mallopt if DOUG_LEA_MALLOC is defined.
3402 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
3403 avoid calls to mallopt if zero_vector is returned.
3404
296094c3
DA
34052012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3406
3407 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
3408 is enabled, avoid dereferencing NULL current_sblock if
3409 running undumped.
3410
36429c89
DA
34112012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
3412
3413 Cleanup basic buffer management.
3414 * buffer.h (struct buffer): Change layout to use generic vector
3415 marking code. Fix some comments. Change type of 'clip_changed'
3416 to bitfield. Remove unused #ifndef old.
3417 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
3418 (GET_OVERLAYS_AT): Fix indentation.
3419 (for_each_per_buffer_object_at): New macro.
3420 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
3421 (Fbuffer_local_variables): Use it.
3422 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
3423 * alloc.c (allocate_buffer): Adjust to match new layout of
3424 struct buffer. Fix comment.
3425 (mark_overlay): New function.
3426 (mark_buffer): Use it. Use mark_vectorlike to mark normal
3427 Lisp area of struct buffer.
3428 (mark_object): Use it. Adjust marking of misc objects
3429 and related comments.
3430
3b3e4cac
PE
34312012-07-02 Paul Eggert <eggert@cs.ucla.edu>
3432
3433 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
3434 wrapper that is not needed because the wrapped code is a no-op (zero
3435 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
3436 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
3437
cf5c0175
DA
34382012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
3439
3440 * alloc.c (mark_buffer): Simplify. Remove prototype.
3441 (mark_object): Add comment. Reorganize marking of vector-like
faf611c7 3442 objects. Use CHECK_LIVE for all vector-like objects except buffers
14ae4239
BT
3443 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
3444 Avoid redundant calls to mark_vectorlike for bool vectors.
cf5c0175 3445
ca26824c
GM
34462012-06-30 Glenn Morris <rgm@gnu.org>
3447
2e4c5312
GM
3448 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
3449
ca26824c
GM
3450 * epaths.in (PATH_SITELOADSEARCH): New.
3451 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
3452 This is rather than relying on --enable-locallisppath elements
3453 having "site-lisp" in their names. (Bug#10208#25, 11658)
3454
0d23c240
EZ
34552012-06-30 Eli Zaretskii <eliz@gnu.org>
3456
c9240d7a
EZ
3457 * w32proc.c (sys_select): Accept and ignore one more argument.
3458
3459 * w32.c (emacs_gnutls_pull): Call select with one more argument.
3460
0d23c240 3461 * sysselect.h [DOS_NT]: Don't include sys/select.h.
9ff8f76b 3462 (pselect) [!MS_DOS]: Redirect to sys_select.
0d23c240
EZ
3463
3464 * sysdep.c: Don't include dos.h and dosfns.h.
3465
3466 * process.c (sys_select):
3467 * msdos.c (sys_select): Accept one more argument and ignore it.
3468
3469 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
3470 adapt data types and code to that.
3471
3472 * dosfns.c:
3473 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
3474 which clashes with the gnulib function of the same name.
3475
af5a5a98
AS
34762012-06-30 Andreas Schwab <schwab@linux-m68k.org>
3477
c5e4379c
AS
3478 * font.c (font_style_to_value, font_style_symbolic)
3479 (font_prop_validate_style): Add type checks for values in
3480 font_style_table.
3481
af5a5a98
AS
3482 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
3483 argument.
3484 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
3485 uses.
3486
8d38f461
EZ
34872012-06-29 Eli Zaretskii <eliz@gnu.org>
3488
2e5a6631
EZ
3489 * xdisp.c (try_window_id): Undo last change.
3490
8d38f461
EZ
3491 * w32.c (getwd): Adjust commentary about startup_dir.
3492 (init_environment): Always call sys_access, even in non-MSVC
3493 builds. Don't chdir to the directory of the Emacs executable.
3494 This undoes code from 1997 which was justified by the need to
3495 "avoid conflicts when removing and renaming directories". But its
3496 downside was that every relative file name was being interpreted
3497 relative to the directory of the Emacs executable, which can never
3498 be TRT. In particular, it broke sys_access when called with
3499 relative file names.
3500 (sys_access): Map GetLastError to errno.
3501
2af3565e
DA
35022012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3503
3504 * window.h (struct window): Change type of 'fringes_outside_margins'
3505 to bitfield. Fix comment. Adjust users accordingly.
cf5c0175 3506 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
2af3565e
DA
3507 Adjust comment.
3508 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
3509 to ptrdiff_t.
3510
c8d3a25c 35112012-06-29 Andreas Schwab <schwab@linux-m68k.org>
57570cd3 3512
c8d3a25c
GM
3513 * gnutls.c (emacs_gnutls_handshake):
3514 Add QUIT to make the loop interruptible.
57570cd3 3515
c8d3a25c 35162012-06-29 Glenn Morris <rgm@gnu.org>
d01fd55f 3517
c8d3a25c
GM
3518 * charset.c (init_charset): Make lack of etc/charsets fatal.
3519
3e984ee8
DA
35202012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3521
3522 * editfns.c (region_limit): Fix type mismatch.
3523
ef884f23
DA
35242012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
3525
3526 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
3527 undefined. Convert from xassert to eassert.
3528 * nsmenu.m: Convert from xassert to eassert.
3529 * nsterm.m: Likewise.
3530
7d7e0027
SM
35312012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
3532
3533 * editfns.c (region_limit): Clip to narrowing (bug#11770).
3534
aa754e6a
PE
35352012-06-28 Paul Eggert <eggert@cs.ucla.edu>
3536
3537 Avoid integer overflow on scroll-left and scroll-right.
3538 * window.c (HSCROLL_MAX): New macro.
3539 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
3540 overflow when requested scroll falls outside ptrdiff_t range.
3541
80b00b08
DA
35422012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3543
3544 * window.h (struct window): Change type of 'hscroll',
3545 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
3546 'last_modified' and 'last_overlay_modified' to EMACS_INT.
3547 Adjust users accordingly.
3548 * xdisp.c (try_cursor_movement): Replace type check with eassert.
3549 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
3550 from EMACS_INT to ptrdiff_t.
3551 (make_window): Omit redundant initialization.
3552
62b2bcf6
JB
35532012-06-28 Juanma Barranquero <lekktu@gmail.com>
3554
3555 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
3556
45942c7d
DA
35572012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3558
3559 * window.h (struct window): Change type of 'use_time' and
3560 'sequence_number' from Lisp_Object to int.
3561 * frame.c (make_frame): Adjust users accordingly.
3562 * print.c (print_object): Likewise.
3563 * window.c (select_window, Fwindow_use_time, make_parent_window)
3564 (make_window): Likewise.
3565
e509cfa6
DA
35662012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3567
3568 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
3569 enabled with --enable-checking=[all,glyphs] configure option.
3570 Fix GLYPH_DEBUG usage assuming that it may be undefined,
3571 adjust comments accordingly.
3572 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
3573 undefined, adjust comments accordingly.
3574 * image.c: Likewise.
3575 * scroll.c: Likewise.
3576 * w32fns.c: Likewise.
3577 * w32term.c: Likewise.
3578 * xdisp.c: Likewise.
3579 * xfaces.c: Likewise.
3580 * xfns.c: Likewise.
3581 * xterm.c: Likewise.
3582
a54e2c05
DA
35832012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
3584
3585 Generalize run-time debugging checks.
3586 * dispextern.h (XASSERTS): Remove.
3587 * fontset.c (xassert): Remove.
3588 Convert from xassert to eassert.
3589 * alloc.c: Convert from xassert to eassert.
3590 * bidi.c: Likewise.
3591 * dispnew.c: Likewise.
3592 * fns.c: Likewise.
3593 * fringe.c: Likewise.
3594 * ftfont.c: Likewise.
3595 * gtkutil.c: Likewise.
3596 * image.c: Likewise.
3597 * keyboard.c: Likewise.
3598 * menu.c: Likewise.
3599 * process.c: Likewise.
3600 * scroll.c: Likewise.
3601 * sound.c: Likewise.
3602 * term.c: Likewise.
3603 * w32console.c: Likewise.
3604 * w32fns.c: Likewise.
3605 * w32term.c: Likewise.
3606 * window.c: Likewise.
3607 * xdisp.c: Likewise.
3608 * xfaces.c: Likewise.
3609 * xfns.c: Likewise.
3610 * xselect.c: Likewise.
3611 * xterm.c: Likewise.
3612
1ec4b7b2
SM
36132012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
3614
3615 * fns.c (maybe_resize_hash_table): Output message when growing the
3616 purify-hashtable.
3617
2014308a
DA
36182012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3619
3620 * alloc.c (allocate_string_data): Remove dead code.
3621 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
3622 avoid GCC warning about unused macro.
3623
246155eb
DA
36242012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3625
3626 * alloc.c (allocate_string): Omit intervals initialization.
3627 * alloc.c (make_uninit_multibyte_string): Initialize intervals
3628 as in make_pure_string and make_pure_c_string.
3629
43184b7b
DA
36302012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3631
d209e2fb 3632 * alloc.c (allocate_string): Fix last change.
43184b7b 3633
3fe6dd74
DA
36342012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
3635
d209e2fb 3636 * alloc.c (allocate_string): Remove two redundant calls
3fe6dd74
DA
3637 to memset, add explicit initialization where appropriate.
3638
1ba6038a
GM
36392012-06-27 Glenn Morris <rgm@gnu.org>
3640
3641 * lisp.mk (lisp): Remove paths.elc.
3642
c89926a5
CY
36432012-06-27 Chong Yidong <cyd@gnu.org>
3644
3645 * doc.c (Fsubstitute_command_keys): Fix punctuation.
3646
ed6b3510
JW
36472012-06-26 John Wiegley <johnw@newartisans.com>
3648
1ec4b7b2 3649 * unexmacosx.c (copy_data_segment): Add two section names used
157e99e4
JW
3650 on Mac OS X Lion: __mod_init_func and __mod_term_func.
3651
ed6b3510
JW
3652 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
3653 when building with Clang.
3654
8edd4a2b
SM
36552012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
3656
3657 * eval.c (Fapply): Allow calling it with a single argument.
3658
f6f62d1b
EZ
36592012-06-26 Eli Zaretskii <eliz@gnu.org>
3660
3661 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
3662 _stricmp and _strnicmp.
3663 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
3664
62efea5e
DA
36652012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3666
3667 * alloc.c (allocate_window): Zero out non-Lisp part of newly
3668 allocated window.
3669 (allocate_process): Likewise for new process.
8edd4a2b 3670 (allocate_terminal): Change to use offsetof.
62efea5e
DA
3671 (allocate_frame): Likewise.
3672 * frame.c (make_frame): Omit redundant initialization.
3673 * window.c (make_parent_window): Use memset.
3674 (make_window): Omit redundant initialization.
3675 * process.c (make_process): Omit redundant initialization.
3676 * terminal.c (create_terminal): Likewise.
3677
42997f4d
DA
36782012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3679
3680 * term.c (delete_tty): Remove redundant call to memset.
3681
1130ecfc
DA
36822012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
3683
3684 * alloc.c: Remove build_string.
3685 * lisp.h: Define build_string as static inline. This provides
3686 a better opportunity to optimize away calls to strlen when the
3687 function is called with compile-time constant argument.
3688 * image.c (imagemagick_error): Convert to build_string.
3689 * w32proc.c (sys_spawnve): Likewise.
3690 * xterm.c (x_term_init): Likewise.
3691
cf38a720
PE
36922012-06-26 Paul Eggert <eggert@cs.ucla.edu>
3693
99027bdd
PE
3694 Use sprintf return value instead of invoking strlen on result.
3695 In the old days this wasn't portable, since some sprintf
3696 implementations returned char *. But they died out years ago and
3697 Emacs already assumes sprintf returns int.
3698 Similarly for float_to_string.
3699 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
3700 * ccl.c (ccl_driver):
3701 * character.c (string_escape_byte8):
3702 * data.c (Fnumber_to_string):
3703 * doprnt.c (doprnt):
3704 * print.c (print_object):
3705 * xdisp.c (message_dolog):
3706 * xfns.c (syms_of_xfns):
3707 Use sprintf or float_to_string result to avoid need to call strlen.
3708 * data.c (Fnumber_to_string):
3709 Use make_unibyte_string, since the string must be ASCII.
3710 * lisp.h, print.c (float_to_string): Now returns int length.
3711 * term.c (produce_glyphless_glyph):
3712 Use sprintf result rather than recomputing it.
3713
cf38a720
PE
3714 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
3715 * Makefile.in (ALL_CFLAGS):
3716 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
3717 * gmalloc.c, regex.c: Include <config.h> unconditionally.
3718
3511c784
DA
37192012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3720
0a08eb21 3721 * dispextern.h (xstrcasecmp): Define to library function
3511c784
DA
3722 strcasecmp if available.
3723 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
3724
fb7da12e
AS
37252012-06-25 Andreas Schwab <schwab@linux-m68k.org>
3726
3727 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
3728 Avoid comma operator.
3729 * menu.c (push_submenu_start, push_submenu_end)
3730 (push_left_right_boundary, push_menu_pane): Likewise.
3731 * msdos.c (dos_rawgetc): Likewise.
3732
afa2ffd8
DA
37332012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3734
3735 * xfns.c (xic_create_fontsetname): Remove redundant calls
3736 to memset.
3737
b3b4476b
PE
37382012-06-25 Paul Eggert <eggert@cs.ucla.edu>
3739
4495ff38
PE
3740 * gtkutil.c (get_utf8_string): Remove redundant assignment.
3741 sprintf already null-terminates its output.
3742
b3b4476b
PE
3743 * xfns.c (x_window): Remove redundant cast.
3744
b00876c9
DA
37452012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
3746
3747 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
3748 `const char *' to `char *' to avoid compiler warning.
3749
d188e26b
PE
37502012-06-24 Paul Eggert <eggert@cs.ucla.edu>
3751
885d1d74
PE
3752 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
3753 instead of truncating it to 63 (admittedly a generous limit).
3754
d188e26b
PE
3755 * process.c: Fix spelling and caps in comments.
3756
e2f560b1
DN
37572012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
3758
e86db54b 3759 * emacs.c (setpgrp): Remove definition, unused.
e2f560b1
DN
3760 * sysdep.c (setpgrp): Remove definition, not used in this file.
3761
7583a3a1
JB
37622012-06-24 Juanma Barranquero <lekktu@gmail.com>
3763
3764 * makefile.w32-in: Update dependencies.
3765
696056c2
EZ
37662012-06-24 Eli Zaretskii <eliz@gnu.org>
3767
3768 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
3769 (SYSTIME_H): Add nt/inc/sys/time.h.
3770
3771 * systime.h [WINDOWSNT]: Include sys/time.h.
3772
3773 * s/ms-w32.h (struct timespec): Definition moved from
3774 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
3775
845ca893
PE
37762012-06-24 Paul Eggert <eggert@cs.ucla.edu>
3777
3778 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
3779 * buffer.h (buffer_slot_type_mismatch):
3780 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
3781 * eval.c (unwind_to_catch):
3782 * image.c (my_png_error, my_error_exit):
3783 * keyboard.c (quit_throw_to_read_char, user_error)
3784 (Fexit_recursive_edit, Fabort_recursive_edit):
3785 * lisp.h (die, args_out_of_range, args_out_of_range_3)
3786 (wrong_type_argument, buffer_overflow, __executable_start)
3787 (memory_full, buffer_memory_full, string_overflow, Fthrow)
3788 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
3789 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
3790 (fatal):
3791 (child_setup) [!DOS_NT]:
3792 * lread.c (end_of_file_error, invalid_syntax):
3793 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
3794 * puresize.h (pure_write_error):
3795 * search.c (matcher_overflow):
3796 * sound.c (sound_perror, alsa_sound_perror):
3797 * sysdep.c, syssignal.h (croak):
3798 * term.c (maybe_fatal, vfatal):
3799 * textprop.c (text_read_only):
3800 * undo.c (user_error):
3801 * unexmacosx.c (unexec_error):
3802 * xterm.c (x_ins_del_lines, x_delete_glyphs):
3803 Use _Noreturn rather than NO_RETURN.
3804 No need for separate decl merely because of _Noreturn.
3805 * sound.c (sound_warning, parse_sound):
3806 Remove unnecessary forward decls.
3807
f1dd8073
PE
38082012-06-24 Paul Eggert <eggert@cs.ucla.edu>
3809
3810 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
3811 * lisp.h (WAIT_READING_MAX): New macro.
3812 * dispnew.c (Fsleep_for, sit_for):
3813 * keyboard.c (kbd_buffer_get_event):
3814 * process.c (Faccept_process_output):
3815 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
3816 This improves on the previous patch, which introduced a bug
3817 when time_t is unsigned and as wide as intmax_t.
3818 See <http://bugs.gnu.org/9000#51>.
3819
b82c1755
EZ
38202012-06-23 Eli Zaretskii <eliz@gnu.org>
3821
3822 * dispnew.c (sit_for, Fsleep_for):
3823 * keyboard.c (kbd_buffer_get_event):
3824 * process.c (Faccept_process_output): Avoid compiler warnings when
3825 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
3826
ca300656
JB
38272012-06-23 Juanma Barranquero <lekktu@gmail.com>
3828
049ec95b
JB
3829 * makefile.w32-in: Update dependencies.
3830
ca300656
JB
3831 * w32.c (ltime): Add return type and declare static.
3832 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
3833
db7b8d06
PE
38342012-06-23 Paul Eggert <eggert@cs.ucla.edu>
3835
3836 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
3837 Privately reported by Herbert J. Skuhra.
3838 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
3839 All uses changed.
3840 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
3841 not make_lisp_timeval, when the argument is of type EMACS_TIME.
3842
0bd8297f
EZ
38432012-06-23 Eli Zaretskii <eliz@gnu.org>
3844
96512555
EZ
3845 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
3846 last argument of make_unibyte_string.
3847
0bd8297f
EZ
3848 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
3849 language ID in the event parameters.
3850
3851 * w32term.c (w32_read_socket): Put the new keyboard codepage into
3852 event.code, not the obscure "character set ID".
3853
63def6b6
CY
38542012-06-23 Chong Yidong <cyd@gnu.org>
3855
3856 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
3857
e8a02204
EZ
38582012-06-23 Eli Zaretskii <eliz@gnu.org>
3859
388cdec0
EZ
3860 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
3861 * w32.c (fdutimens): New function.
3862
3863 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
3864
3865 * s/ms-w32.h (pselect): Redirect to sys_select.
3866
3867 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
3868
e8a02204
EZ
3869 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
3870 in the logic of incrementing and decrementing the value of
3871 use_relocatable_buffers.
3872
d054f3fb
PE
38732012-06-23 Paul Eggert <eggert@cs.ucla.edu>
3874
3875 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
3876 Privately reported by Herbert J. Skuhra.
3877 [__FreeBSD__]: Remove "*/" typo after "#include".
3878 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
3879 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
3880 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
3881 Don't assume EMACS_TIME and struct timeval are the same type.
3882
d35af63c
PE
38832012-06-22 Paul Eggert <eggert@cs.ucla.edu>
3884
3885 Support higher-resolution time stamps (Bug#9000).
3886 The time stamps are only nanosecond-resolution at the C level,
3887 since that's the best that any real-world system supports now.
3888 But they are picosecond-resolution at the Lisp level, as that's
3889 easy, and leaves room for future OS improvements.
3890
3891 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
3892 (LIBES): Use it.
3893
3894 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
3895 Don't get current time unless it's needed.
3896
3897 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
3898 now provides it if it's absent.
3899 (start_atimer): Port to higher-res time stamps.
3900 Check for time stamp overflow. Don't get current time more
3901 often than is needed.
3902
3903 * buffer.h (struct buffer): Buffer modtime now has high resolution.
3904 Include systime.h, not time.h.
3905 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
3906
3907 * dired.c: Include stat-time.h.
3908 (Ffile-attributes): File times now have higher resolution.
3909
3910 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
3911 (struct image): Timestamp now has higher resolution.
3912
3913 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
3914 has at least microseconds now. All uses removed.
3915 (update_frame, update_single_window, update_window, update_frame_1)
3916 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
927c7216 3917 (duration_to_sec_usec): Remove; no longer needed.
d35af63c
PE
3918
3919 * editfns.c (time_overflow): Now extern.
3920 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
3921 (float-time, Fformat_time_string, Fcurrent_time_string)
3922 (Fcurrent_time_zone): Accept and generate higher-resolution
3923 time stamps.
3924 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
3925 (decode_time_components, lisp_seconds_argument): New functions.
3926 (make_time): Now static.
3927 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
3928 Report an error if the time is invalid, rather than having the caller
3929 do that.
3930
3931 * fileio.c: Include <stat-time.h>
3932 (Fcopy_file): Copy higher-resolution time stamps.
3933 Prefer to set the time stamp via a file descriptor if that works.
3934 (Fset_file_times, Finsert_file_contents, Fwrite_region)
3935 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
3936 (Fvisited_file_modtime, Fset_visited_file_modtime):
3937 Support higher-resolution time stamps.
3938
3939 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
3940
3941 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
3942
3943 * image.c (prepare_image_for_display, clear_image_cache)
3944 (lookup_image): Port to higer-resolution time stamps.
3945
3946 * keyboard.c (start_polling, bind_polling_period):
3947 Check for time stamp overflow.
3948 (read_char, kbd_buffer_get_event, timer_start_idle)
3949 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
3950 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
3951 Port to higher-resolution time stamps. Do not assume time_t is signed.
3952 (decode_timer): New function. Timers are now vectors of length 9,
3953 not 8, to accommodate the picosecond component.
3954 (timer_check_2): Use it.
3955
3956 * nsterm.m (select_timeout, timeval_subtract): Remove.
3957 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
3958 as they're a bit more accurate and handle overflow better.
3959 (ns_select): Change prototype to be compatible with pselect.
3960 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
3961 * nsterm.h (ns_select): Adjust prototype.
3962
3963 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
3964 us-resolution time stamps.
3965 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
3966
3967 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
3968
3969 * lisp.h (time_overflow): New decl.
3970 (wait_reading_process_output): First arg is now intmax_t, not int,
3971 to accommodate larger waits.
3972
3973 * process.h (struct Lisp_Process.read_output_delay):
3974 Now counts nanoseconds, not microseconds.
3975 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
3976 EMACS_HAS_USECS.
3977 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
3978 (wait_reading_process_output):
3979 Port to ns-resolution time stamps.
3980 (Faccept_process_output, wait_reading_process_output):
3981 Check for time stamp overflow. Do not assume time_t is signed.
3982 (select_wrapper): Remove; we now use pselect.
3983 (Fprocess_attributes): Now generates ns-resolution time stamps.
3984
3985 * sysdep.c: Include utimens.h. Don't include utime.h
3986 or worry about struct utimbuf; gnulib does that for us now.
3987 (gettimeofday): Remove; gnulib provides a substitute.
3988 (make_timeval): New function.
3989 (set_file_times): Now sets ns-resolution time stamps.
3990 New arg FD; all uses changed.
3991 (time_from_jiffies, ltime_from_jiffies, get_up_time)
3992 (system_process_attributes):
3993 Now returns ns-resolution time stamp. All uses changed.
3994 Check for time stamp overflow.
3995
3996 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
3997 provides a substitute now.
3998
3999 * systime.h: Include timespec.h rather than sys/time.h and time.h,
4000 since it guarantees struct timespec.
4001 (EMACS_TIME): Now struct timespec, so that we can support
4002 ns-resolution time stamps.
4003 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
4004 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
4005 (EMACS_USECS): Remove.
4006 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
4007 so multiply the arg by 1000 before storing it.
4008 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
4009 New macros.
4010 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
4011 Port to ns-resolution time stamps.
4012 (EMACS_TIME_NEG_P): Remove; replaced by....
4013 (EMACS_TIME_SIGN): New macro.
4014 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
4015 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
4016 (set_file_times, make_time, lisp_time_argument): Adjust signature.
4017 (make_timeval, make_lisp_time, decode_time_components): New decls.
4018 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
4019 that it mishandled time_t overflow. You can't compare by subtracting!
4020 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
4021 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
4022
4023 * term.c: Include <sys/time.h>.
4024 (timeval_to_Time): New function, for proper overflow wraparound.
4025 (term_mouse_position, term_mouse_click): Use it.
4026
4027 * undo.c (record_first_change): Support higher-resolution time stamps
4028 in the undo buffer.
4029 (Fprimitive_undo): Use them when restoring time stamps.
4030
4031 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
4032 (w32_get_internal_run_time):
4033 Port to higher-resolution Emacs time stamps.
4034 (ltime): Now accepts single 64-bit integer, as that's more convenient
4035 for callers.
4036
4037 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
4038
4039 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
4040 for compatibility with pselect. Support ns-resolution time stamps.
4041
4042 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
4043
4044 * xselect.c (wait_for_property_change, x_get_foreign_selection):
4045 Check for time stamp overflow, and support ns-resolution time stamps.
4046
4047 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
4048 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
4049 (timeval_subtract): Remove; no longer needed.
4050 (XTflash, XTring_bell, x_wait_for_event):
4051 Port to ns-resolution time stamps. Don't assume time_t is signed.
4052
b6a92dfe
CY
40532012-06-22 Chong Yidong <cyd@gnu.org>
4054
4055 * xdisp.c (x_consider_frame_title): Revert last change.
4056
d251c37c
EZ
40572012-06-22 Eli Zaretskii <eliz@gnu.org>
4058
4059 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
4060 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
4061 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
4062 staticidx goes up to 1597 out of 1600 = 0x640.)
4063
f10deafb
PE
40642012-06-20 Paul Eggert <eggert@cs.ucla.edu>
4065
4066 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
4067 Otherwise, the umask might be mistakenly 0 while handling input signals.
4068
ec6de1e2
SM
40692012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
4070
4071 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
4072
28be1ada
DA
40732012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
4074
4075 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
4076 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
4077 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
4078 access to `contents' member of Lisp_Vector objects with AREF and ASET
4079 where appropriate.
4080
c6bf3022
CY
40812012-06-19 Chong Yidong <cyd@gnu.org>
4082
4083 * frame.c (delete_frame): When selecting a frame on a different
4084 text terminal, do not alter the terminal's top-frame.
4085
4086 * xdisp.c (format_mode_line_unwind_data): Record the target
4087 frame's selected window and its terminal's top-frame.
4088 (unwind_format_mode_line): Restore them.
4089 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
4090 Callers changed.
4091 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
4092 since tty frames can be explicitly named.
4093 (prepare_menu_bars): Likewise.
4094
4095 * term.c (Ftty_top_frame): New function.
4096
defd4196
PE
40972012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4098
4099 Port byte-code-meter to modern targets.
4100 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
4101 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
8b5257e1 4102 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
defd4196
PE
4103 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
4104 (METER_1, METER_2): Simplify.
4105
1053a871
SM
41062012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
4107
4108 * data.c (Fdefalias): Return `symbol' (bug#11686).
4109
b7e8d081
MR
41102012-06-18 Martin Rudalics <rudalics@gmx.at>
4111
4112 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
1053a871
SM
4113 gets killed during executing of this function (Bug#11665).
4114 Try to always return Qt when the buffer has been actually killed.
b7e8d081
MR
4115 (Vkill_buffer_query_functions): In doc-string say that functions
4116 run by this hook should not change the current buffer.
4117
7ea2b339
PE
41182012-06-18 Paul Eggert <eggert@cs.ucla.edu>
4119
4120 Fix recently-introduced process.c problems found by static checking.
4121 * process.c (write_queue_push, write_queue_pop, send_process):
4122 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
4123 (write_queue_pop): Fix pointer signedness problem.
4124 (send_process): Remove unused local.
4125
96a313a1
CY
41262012-06-17 Chong Yidong <cyd@gnu.org>
4127
4128 * xdisp.c (redisplay_internal): No need to redisplay terminal
4129 frames that are not on top.
4130
20ca2e94
TN
41312012-06-17 Troels Nielsen <bn.troels@gmail.com>
4132
4133 * process.c (make_process): Initialize write_queue.
4134 (write_queue_push, write_queue_pop): New functions.
4135 (send_process): Use them to maintain correct ordering of process
4136 writes (Bug#10815).
4137
9a900ca9
PE
41382012-06-17 Paul Eggert <eggert@cs.ucla.edu>
4139
310fbfa8
PE
4140 * lisp.h (eassert): Assume C89 or later.
4141 This removes the need for CHECK.
4142 (CHECK): Remove. Its comments about always evaluating its
4143 argument were confusing, as 'eassert' typically does not evaluate
4144 its argument.
4145
27bb1ca4
PE
4146 * coding.c (produce_chars): Use ptrdiff_t, not int.
4147
9a900ca9
PE
4148 * xterm.c (x_draw_underwave): Check for integer overflow.
4149 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
4150
41b7f8bc 41512012-06-17 Jan Djärv <jan.h.d@swipnet.se>
50a93863
JD
4152
4153 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
4154 referenced (Bug#11583).
4155
9b0e3eba
AA
41562012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
4157
4158 Implement wave-style variant of underlining.
4159 * dispextern.h (face_underline_type): New enum.
4160 (face): Add field for underline type.
4161 * nsterm.m (ns_draw_underwave): New function.
4162 (ns_draw_text_decoration): Use it.
4163 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
4164 New functions.
4165 (x_draw_glyph_string): Use them.
4166 * xfaces.c (Qline, Qwave): New Lisp objects.
4167 (check_lface_attrs, merge_face_ref)
1053a871
SM
4168 (Finternal_set_lisp_face_attribute, realize_x_face):
4169 Handle wave-style underline face attributes.
9b0e3eba
AA
4170 * xterm.c (x_draw_underwave): New function.
4171 (x_draw_glyph_string): Use it.
4172
0fb52f11
JB
41732012-06-16 Juanma Barranquero <lekktu@gmail.com>
4174
4175 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
4176 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
4177 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
4178 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
4179 ($(BLD)/w32select.$(O)): Update dependencies.
4180
e5560ff7
AS
41812012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4182
4183 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
4184 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
4185 * character.c (_fetch_multibyte_char_p): Remove.
4186 * alloc.c: Include "character.h" before "buffer.h".
4187 * bidi.c: Likewise.
4188 * buffer.c: Likewise.
4189 * bytecode.c: Likewise.
4190 * callint.c: Likewise.
4191 * callproc.c: Likewise.
4192 * casefiddle.c: Likewise.
4193 * casetab.c: Likewise.
4194 * category.c: Likewise.
4195 * cmds.c: Likewise.
4196 * coding.c: Likewise.
4197 * composite.c: Likewise.
4198 * dired.c: Likewise.
4199 * dispnew.c: Likewise.
4200 * doc.c: Likewise.
4201 * dosfns.c: Likewise.
4202 * editfns.c: Likewise.
4203 * emacs.c: Likewise.
4204 * fileio.c: Likewise.
4205 * filelock.c: Likewise.
4206 * font.c: Likewise.
4207 * fontset.c: Likewise.
4208 * fringe.c: Likewise.
4209 * indent.c: Likewise.
4210 * insdel.c: Likewise.
4211 * intervals.c: Likewise.
4212 * keyboard.c: Likewise.
4213 * keymap.c: Likewise.
4214 * lread.c: Likewise.
4215 * macros.c: Likewise.
4216 * marker.c: Likewise.
4217 * minibuf.c: Likewise.
4218 * nsfns.m: Likewise.
4219 * nsmenu.m: Likewise.
4220 * print.c: Likewise.
4221 * process.c: Likewise.
4222 * regex.c: Likewise.
4223 * region-cache.c: Likewise.
4224 * search.c: Likewise.
4225 * syntax.c: Likewise.
4226 * term.c: Likewise.
4227 * textprop.c: Likewise.
4228 * undo.c: Likewise.
4229 * unexsol.c: Likewise.
4230 * w16select.c: Likewise.
4231 * w32fns.c: Likewise.
4232 * w32menu.c: Likewise.
4233 * window.c: Likewise.
4234 * xdisp.c: Likewise.
4235 * xfns.c: Likewise.
4236 * xmenu.c: Likewise.
4237 * xml.c: Likewise.
4238 * xselect.c: Likewise.
4239
2f07e6af
EZ
42402012-06-16 Eli Zaretskii <eliz@gnu.org>
4241
1053a871
SM
4242 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
4243 If all the glyphs of the glyph row came from strings, and we have no
2f07e6af 4244 cursor positioning clues, put the cursor on the first glyph of the
1097afe4
EZ
4245 row.
4246 (handle_face_prop): Use chunk-relative overlay string index when
4247 indexing into it->string_overlays array. (Bug#11653)
946fdb73
EZ
4248 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
4249 the rightmost. (Bug#11720)
2f07e6af 4250
29b83cec
AS
42512012-06-16 Andreas Schwab <schwab@linux-m68k.org>
4252
4253 * category.h (CHAR_HAS_CATEGORY): Define as inline.
4254 (CATEGORY_MEMBER): Enforce 1/0 value.
4255 * category.c (_temp_category_set): Remove.
4256
4c5501e9
EZ
42572012-06-16 Eli Zaretskii <eliz@gnu.org>
4258
4259 * window.c (Fdelete_other_windows_internal)
4260 (Fdelete_window_internal): Don't access frame's mouse highlight
4261 info of the initial frame. (Bug#11677)
4262
2b570124
PE
42632012-06-14 Paul Eggert <eggert@cs.ucla.edu>
4264
e93864f9
PE
4265 * .gdbinit (xgetint): Fix recently-introduced paren typo.
4266 Assume USE_2_TAGS_FOR_INTS.
4267 (xreload): Adjust $tagmask width to match recent lisp.h change.
4268
2b570124
PE
4269 Simplify lisp.h in minor ways that should not affect code.
4270 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
4271 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
4272 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
4273 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
4274 (INTTYPEBITS): New macro, for clarity.
4275 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
1053a871
SM
4276 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
4277 Simplify now that USE_LSB_TAG is always defined.
2b570124
PE
4278 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
4279 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
4280
81755f69
JB
42812012-06-13 Juanma Barranquero <lekktu@gmail.com>
4282
4283 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
4284
16192a57
GM
42852012-06-13 Glenn Morris <rgm@gnu.org>
4286
4287 * s/bsd-common.h (BSD4_3):
4288 * s/usg5-4-common.h (USG5_4): No longer define; unused.
4289
646b5f55
AS
42902012-06-13 Andreas Schwab <schwab@linux-m68k.org>
4291
4292 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
4293 instead of union.
4294 (XLI, XIL): Define.
1053a871
SM
4295 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
4296 Use them.
4297 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
646b5f55 4298 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
1053a871 4299 * alloc.c (widen_to_Lisp_Object): Remove.
646b5f55
AS
4300 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
4301 * frame.c (delete_frame): Remove outdated comment.
4302 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
4303 USE_LISP_UNION_TYPE.
4304 (Fw32_unregister_hot_key): Likewise.
4305 (Fw32_toggle_lock_key): Likewise.
4306 * w32menu.c (add_menu_item): Likewise.
4307 (w32_menu_display_help): Use XIL instead of checking
4308 USE_LISP_UNION_TYPE.
4309 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
4310 (init_heap): Likewise.
4311 * w32term.c (w32_read_socket): Update comment.
4312
1d3823c9
GM
43132012-06-13 Glenn Morris <rgm@gnu.org>
4314
c62ff706
GM
4315 * s/usg5-4-common.h, src/s/unixware.h:
4316 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
4317
1d3823c9
GM
4318 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
4319
bfe3e0a2
PE
43202012-06-13 Paul Eggert <eggert@cs.ucla.edu>
4321
4322 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
4323 * alloc.c (make_number) [!defined make_number]:
4324 Remove, as lisp.h always defines this now.
4325 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
4326 (roundup_size): Verify that it is a power of 2.
4327 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
4328 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
4329 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
4330 -DUSE_LSB_TAG=0, to override the automatically-selected default.
4331 USE_LSB_TAG now is always defined to be either 0 or 1.
4332 All uses changed.
4333 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
4334 code works fine either way, and efficiency is not a concern here,
4335 as the union type is for debugging, not for production.
4336 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
4337 Use an inline function on all platforms when using the union type,
4338 since this is simpler and 'static inline' can be used portably
4339 within Emacs now.
4340 (LISP_INITIALLY_ZERO): New macro.
4341 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
4342 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
4343
45fa9c0f
GM
43442012-06-12 Glenn Morris <rgm@gnu.org>
4345
b4492cba
GM
4346 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
4347
4348 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
0d369729 4349
45fa9c0f
GM
4350 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
4351 Move BROKEN_SIGIO to configure.
4352
4353 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
4354 Move NO_TERMIO to configure.
4355
0e25d334
CY
43562012-06-12 Chong Yidong <cyd@gnu.org>
4357
4358 * image.c (imagemagick_load_image): Use MagickFlattenImage if
4359 MagickMergeImageLayers is undefined. Use pixel pusher loop if
4360 MagickExportImagePixels is undefined.
4361
43682bb6
PE
43622012-06-12 Paul Eggert <eggert@cs.ucla.edu>
4363
4364 * image.c (imagemagick_load_image): Remove unused label.
4365
a9be7d2b
GM
43662012-06-11 Glenn Morris <rgm@gnu.org>
4367
4368 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
4369 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
4370 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
4371 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
4372
3017f87f
SM
43732012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
4374
4375 * alloc.c (make_byte_code): New function.
4376 (Fmake_byte_code): Use it. Don't purify here.
4377 * lread.c (read1): Use it as well to avoid extra allocation.
4378
1b9b4cf4
CY
43792012-06-11 Chong Yidong <cyd@gnu.org>
4380
4381 * image.c (imagemagick_load_image): Implement transparency.
4382
95988fcf
AS
43832012-06-10 Andreas Schwab <schwab@linux-m68k.org>
4384
4385 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
4386 account for preceding backslashes. (Bug#11663)
4387
cd4eb164
CY
43882012-06-09 Chong Yidong <cyd@gnu.org>
4389
4390 * term.c: Support italics in capable terminals (Bug#9652).
4391 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
4392 (turn_on_face): Output using TS_enter_italic_mode if available.
4393 Don't handle unused blinking and alt-charset cases.
4394 (turn_off_face): Handle italic case; discard unused tty_blinking_p
4395 and tty_alt_charset_p cases.
4396 (tty_capable_p, init_tty): Support italics.
4397
4398 * termchar.h (struct tty_display_info): Add field for italics.
4399 Remove unused blink field.
4400
4401 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
4402 Handle slant.
4403
4404 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
4405 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
4406 tty_alt_charset_p. Add tty_italic_p.
4407
ff88beb8
MA
44082012-06-09 Michael Albinus <michael.albinus@gmx.de>
4409
4410 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
4411 dbus_type_is_basic if available.
4412 (xd_extract_signed, xd_extract_unsigned): Rename from
4413 extract_signed and extract_unsigned, respectively. Adapt callers.
4414
44286096
CY
44152012-06-09 Chong Yidong <cyd@gnu.org>
4416
1682701f
CY
4417 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
4418
44286096
CY
4419 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
4420 case (Bug#9752).
4421
d86feb17
PE
44222012-06-08 Paul Eggert <eggert@cs.ucla.edu>
4423
4424 * xdisp.c (vmessage): Treat frame message as multibyte.
4425 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
4426 would generate the diagnostic "Making \302\247 buffer-local while
4427 let-bound!".
4428
d5c20fe8
EZ
44292012-06-08 Eli Zaretskii <eliz@gnu.org>
4430
4431 * dispnew.c (showing_window_margins_p): Undo last change, which
4432 was done due to an inadvertent commit.
4433 (adjust_frame_glyphs_for_frame_redisplay): Do call
4434 showing_window_margins_p.
4435
513749ee
SM
44362012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4437
4438 * eval.c (Fmake_var_non_special): New primitive.
4439 (syms_of_eval): Defsubr it.
4440 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
4441
d4a8f5c1
JB
44422012-06-08 Juanma Barranquero <lekktu@gmail.com>
4443
4444 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
4445 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
4446
8bbbc977
EZ
44472012-06-08 Eli Zaretskii <eliz@gnu.org>
4448
4449 * alloc.c (allocate_vectorlike): Fix last change.
4450
f3372c87
DA
44512012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
4452
4453 Block-based vector allocation of small vectors.
4454 * lisp.h (struct vectorlike_header): New field `nbytes',
4455 adjust comment accordingly.
4456 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
4457 to denote vector blocks. Adjust users (live_vector_p,
4458 mark_maybe_pointer, valid_lisp_object_p) accordingly.
4459 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
4460 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
4461 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
4462 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
4463 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
4464 (roundup_size): New constant.
4465 (struct vector_block): New data type.
4466 (vector_blocks, vector_free_lists, zero_vector): New variables.
513749ee 4467 (all_vectors): Rename to `large_vectors'.
f3372c87
DA
4468 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
4469 (sweep_vectors): New functions.
4470 (allocate_vectorlike): Return `zero_vector' as the only vector of
4471 0 items. Allocate new vector from block if vector size is less than
4472 or equal to VBLOCK_BYTES_MAX.
4473 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
4474 (init_alloc_once): Add call to init_vectors.
4475
4f18a4ed
SM
44762012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
4477
4478 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
4479
86f158bc
PE
44802012-06-07 Paul Eggert <eggert@cs.ucla.edu>
4481
4482 * doprnt.c (doprnt): Truncate multibyte char correctly.
4483 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
4484 would mishandle a string argument "Xc" if X was a multibyte
4485 character of length 2: it would truncate after X's first byte
4486 rather than including all of X.
4487
c5cfcbe0
CY
44882012-06-06 Chong Yidong <cyd@gnu.org>
4489
4490 * buffer.c (word_wrap): Doc fix.
4491
c05cf390
PE
44922012-06-04 Paul Eggert <eggert@cs.ucla.edu>
4493
4494 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
4495
0c3461de
GM
44962012-06-03 Glenn Morris <rgm@gnu.org>
4497
4498 * xdisp.c (tool-bar-style): Doc fix.
4499
c71232db
UM
45002012-06-03 Ulrich Müller <ulm@gentoo.org>
4501
4502 * Makefile.in (PAXCTL): Define.
4503 (temacs$(EXEEXT)): Disable memory randomization for the temacs
4504 binary via PaX flags if the paxctl utility is available.
4505 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
4506 Restore PaX flags to their default. (Bug#11398)
4507
383f7350
CY
45082012-06-03 Chong Yidong <cyd@gnu.org>
4509
4510 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
4511 buffer (Bug#11226).
4512
5f2c76c6
CY
45132012-06-03 Chong Yidong <cyd@gnu.org>
4514
4515 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
4516 (note_mode_line_or_margin_highlight): If there is no help echo,
4517 use mode-line-default-help-echo. Handle the case where the mouse
4518 position is past the end of the mode line string.
4519
4520 * buffer.c (buffer_local_value_1): New function, split from
4521 Fbuffer_local_value; can return Qunbound.
4522 (Fbuffer_local_value): Use it.
4523 (Vmode_line_format): Docstring tweaks.
4524
773d47f6
PE
45252012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4526
4527 * sysdep.c (system_process_attributes): Improve comment.
4528
f2d6a3df
SM
45292012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
4530
4531 * keyboard.c: Export real-this-command to Elisp.
4532 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
4533 and DEFVAR it. Update all users.
4534
63810350
PE
45352012-06-02 Paul Eggert <eggert@cs.ucla.edu>
4536
7bd5c1f4
PE
4537 * minibuf.c (Fassoc_string): Remove duplicate declaration.
4538
63810350
PE
4539 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
4540 Convert pctcpu and pctmem to Lisp float properly.
4541 Let the compiler fold better, as 100.0/0x8000 is exact.
4542
a2821611
AS
45432012-06-02 Andreas Schwab <schwab@linux-m68k.org>
4544
4545 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
4546 cons_block.
4547
5fceba1d
PE
45482012-06-01 Paul Eggert <eggert@cs.ucla.edu>
4549
4550 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
4551
c98ff5dd
DA
45522012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
4553
4554 For a 'struct window', replace some Lisp_Object fields to
4555 bitfields where appropriate, remove unused fields.
4556 * window.h (struct window): Remove unused 'last_mark_x' and
4557 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
4558 change it's type from Lisp_Object to bitfield.
4559 Change type of 'force_start', 'optional_new_start',
4560 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
4561 fields from Lisp_Object to bitfield. Adjust users accordingly.
4562
ca34e0be
PE
45632012-05-31 Paul Eggert <eggert@cs.ucla.edu>
4564
4565 Pacify gcc -Wdouble-precision when using Xaw.
4566 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
4567 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
4568 Use 'float' consistently, rather than 'float' in most places
4569 and 'double' in a couple of places.
4570
efc00ab1 45712012-05-31 Eli Zaretskii <eliz@gnu.org>
d5fd2c54
EZ
4572
4573 * xdisp.c (handle_stop): Detect whether we have overlay strings
4574 loaded by testing it->current.overlay_string_index to be
4575 non-negative, instead of checking whether n_overlay_strings is
4576 positive. (Bug#11587)
4577
efc00ab1 45782012-05-31 Chong Yidong <cyd@gnu.org>
353c87f6
CY
4579
4580 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
4581
4582 * doc.c (Fsubstitute_command_keys): Doc fix.
4583
efc00ab1 45842012-05-31 Eli Zaretskii <eliz@gnu.org>
a02ae4e5
EZ
4585
4586 * search.c (search_buffer): Remove calls to
4587 r_alloc_inhibit_buffer_relocation, as it is now called by
4588 maybe_unify_char, which was the cause of relocation of buffer text
4589 in bug#11519.
4590
efc00ab1 45912012-05-31 Eli Zaretskii <eliz@gnu.org>
291d430f
EZ
4592
4593 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
4594 for the duration of call to load_charset, to avoid problems with
4595 callers of maybe_unify_char that access buffer text through C
4596 pointers.
4597
4598 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
4599 decrement the inhibition flag, instead of just setting or
4600 resetting it.
4601
ba93a187
PE
46022012-05-31 Paul Eggert <eggert@cs.ucla.edu>
4603
4604 Remove obsolete '#define static' cruft.
4605 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
4606 This #undef was "temporary" in 2000; it is no longer needed
4607 now that '#define static' has gone away.
4608 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
4609 (gray_bitmap_bits): Remove; no longer needed.
4610 All uses replaced with definiens.
4611 * xterm.c: Include "bitmaps/gray.xbm".
4612
9e4bf381
PE
46132012-05-30 Paul Eggert <eggert@cs.ucla.edu>
4614
4615 Clean up __executable_start, monstartup when --enable-profiling.
4616 The following changes affect the code only when profiling.
4617 * dispnew.c (__executable_start): Rename from safe_bcopy.
4618 Define only on platforms that need it.
4619 * emacs.c: Include <sys/gmon.h> when profiling.
4620 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
4621 (__executable_start): Remove decl, since lisp.h does it now.
4622 (safe_bcopy): Remove decl; no longer has that name.
4623 (main): Coalesce #if into single bit of code, for simplicity.
4624 Cast pointers to uintptr_t, since standard libraries want integers
4625 and not pointers.
4626 * lisp.h (__executable_start): New decl.
4627
32d72c2f
GM
46282012-05-31 Glenn Morris <rgm@gnu.org>
4629
4630 * image.c (Fimagemagick_types): Doc fix.
4631
baac5bc7
JM
46322012-05-30 Jim Meyering <meyering@redhat.com>
4633
4634 * callproc.c (Fcall_process_region): Include directory component
4635 in mkstemp error message (Bug#11586).
4636
72cb32cf
PE
46372012-05-30 Paul Eggert <eggert@cs.ucla.edu>
4638
4639 * alloc.c, lisp.h (make_pure_vector): Now static.
4640
61b108cc
SM
46412012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
4642
4643 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
4644 Move to byte-run.el.
4645 (Fautoload): Do the hash-doc more carefully.
4646 * data.c (Fdefalias): Purify definition, except for keymaps.
4647 (Qdefun): Move from eval.c.
4648 * lisp.h (Qdefun): Remove.
4649 * lread.c (read1): Tiny simplification.
4650
471fe23d
TN
46512012-05-29 Troels Nielsen <bn.troels@gmail.com>
4652
934f3f58 4653 Do not create empty overlays with the evaporate property (Bug#9642).
471fe23d
TN
4654 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
4655 Bug#9642, but explicitly check that the buffer the overlay would
4656 be moved to is live and rearrange lines to make sure that errors
4657 will not put the overlay in an inconsistent state.
4658 (Fdelete_overlay): Cosmetics.
4659
85d0efd1
EZ
46602012-05-28 Eli Zaretskii <eliz@gnu.org>
4661
4662 * w32term.c (my_bring_window_to_top): New function.
4663 (x_raise_frame): Use handle returned by DeferWindowPos, which
61b108cc
SM
4664 could be different from the original one.
4665 Call my_bring_window_to_top instead of my_set_foreground_window.
85d0efd1
EZ
4666 (Bug#11513)
4667
4668 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
4669 by calling BringWindowToTop.
4670
4671 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
4672 (WM_EMACS_END): Increase by one.
4673
da92a98c
PE
46742012-05-28 Paul Eggert <eggert@cs.ucla.edu>
4675
4676 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
4677 This avoids undefined behavior that might cause the eassert
4678 to not catch an out-of-range value.
4679
74d1f848
JB
46802012-05-28 Juanma Barranquero <lekktu@gmail.com>
4681
4682 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
4683 Update dependencies.
4684
9e1a06fc
EZ
46852012-05-27 Eli Zaretskii <eliz@gnu.org>
4686
4687 * bidi.c (bidi_mirror_char): Fix last change.
4688
f3dd7312
AS
46892012-05-27 Andreas Schwab <schwab@linux-m68k.org>
4690
4691 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
4692 when referring to sectname field in printf format.
4693
81899c91
PE
46942012-05-27 Paul Eggert <eggert@cs.ucla.edu>
4695
57b81a9f
PE
4696 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
4697 Only r_alloc_inhibit_buffer_relocation needed to be added;
4698 the others were already declared.
4699
81899c91
PE
4700 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
4701 before checking whether it's out of range. Put the check inside
4702 eassert. See
4703 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
4704
33017faf 47052012-05-27 Ken Brown <kbrown@cornell.edu>
2f9b9adb
KB
4706
4707 * callproc.c (Fcall_process): Restore a line that was accidentally
4708 commented out in the 2011-02-13 change (bug#11547).
4709
33017faf 47102012-05-27 Eli Zaretskii <eliz@gnu.org>
52c55cc7
EZ
4711
4712 * lisp.h [REL_ALLOC]: Add prototypes for external functions
4713 defined on ralloc.c.
4714
4715 * buffer.c [REL_ALLOC]: Remove prototypes of
4716 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
4717 they are now on lisp.h.
4718
4719 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
4720
4721 * search.c (search_buffer): Use it to inhibit relocation of buffer
4722 text while re_search_2 is doing its job, because re_search_2 is
4723 passed C pointers to buffer text. (Bug#11519)
4724
23415acf
EZ
4725 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
4726 Update value to 24.
4727
44e27368
EZ
4728 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
4729 state after an additional call to move_it_in_display_line_to, keep
4730 the values of it->max_ascent and it->max_descent found for the
4731 entire line.
4732 (pos_visible_p): Revert the comparison against bottom_y to what it
4733 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
4734 (Bug#11464)
4735
c1892f11
PE
47362012-05-26 Paul Eggert <eggert@cs.ucla.edu>
4737
4738 Fix coding-related core dumps with gcc -ftrapv.
4739 The code was computing A - B, where A and B are pointers, and B is
4740 random garbage. This can lead to core dumps on platforms that
4741 have special pointer registers, and it also leads to core dumps on
4742 x86-64 when compiled with gcc -ftrapv. The fix is to compute
4743 A - B only when B is initialized properly.
4744 * coding.c (coding_set_source, coding_set_destination): Return void.
4745 (coding_change_source, coding_change_destinations): New functions,
4746 with the old behaviors of coding_set_source and coding_set_destination.
4747 All callers that need an offset changed to use these new functions.
4748
eb7afdad
GM
47492012-05-26 Glenn Morris <rgm@gnu.org>
4750
4751 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
4752
f12fdf02
EZ
47532012-05-26 Eli Zaretskii <eliz@gnu.org>
4754
53a63be6 4755 Extend mouse support on W32 text-mode console.
61b108cc
SM
4756 * xdisp.c (draw_row_with_mouse_face):
4757 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
eb3f6f01 4758
eb3f6f01 4759 * w32console.c: Include window.h.
61b108cc
SM
4760 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
4761 New functions.
eb3f6f01
EZ
4762 (initialize_w32_display): Initialize mouse-highlight data.
4763
53a63be6
EZ
4764 * w32inevt.c: Include termchar.h and window.h.
4765 (do_mouse_event): Support mouse-autoselect-window. When the mouse
4766 moves, call note_mouse_highlight. If help_echo changed, call
4767 gen_help_event to produce help-echo message in the echo area.
4768 Call clear_mouse_face if mouse_face_hidden is set in the mouse
4769 highlight info.
4770
4cfd81f6
PE
47712012-05-26 Paul Eggert <eggert@cs.ucla.edu>
4772
4773 * lread.c (read1): Simplify slightly to avoid an overflow warning
4774 with GCC 4.7.0 on x86-64.
4775
4446092a
EZ
47762012-05-26 Eli Zaretskii <eliz@gnu.org>
4777
4778 * bidi.c (bidi_mirror_char): Revert last change: an int is
4779 definitely wide enough here.
4780
42b2a986 47812012-05-25 Paul Eggert <eggert@cs.ucla.edu>
3164aeac 4782
42b2a986 4783 Fix integer width and related bugs (Bug#9874).
eb106a49 4784 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
d311d28c
PE
4785 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
4786 (string_bytes, check_sblock, allocate_string_data):
4787 (compact_small_strings, Fmake_bool_vector, make_string)
4788 (make_unibyte_string, make_multibyte_string)
4789 (make_string_from_bytes, make_specified_string)
4790 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
4791 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
4792 (mark_vectorlike):
4793 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4794 (allocate_pseudovector):
4795 Use int, not EMACS_INT, where int is wide enough.
4796 (inhibit_garbage_collection, Fgarbage_collect):
4797 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4798 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
4799 int might not be wide enough.
4800 (bidi_cache_search, bidi_cache_find, bidi_init_it)
4801 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
4802 (bidi_at_paragraph_end, bidi_find_paragraph_start)
4803 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
4804 (bidi_level_of_next_char, bidi_move_to_visually_next):
4805 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4806 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
4807 (Fkill_buffer, Fset_buffer_major_mode)
4808 (advance_to_char_boundary, Fbuffer_swap_text)
4809 (Fset_buffer_multibyte, overlays_at, overlays_in)
4810 (overlay_touches_p, struct sortvec, record_overlay_string)
4811 (overlay_strings, recenter_overlay_lists)
4812 (adjust_overlays_for_insert, adjust_overlays_for_delete)
4813 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
4814 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
4815 (Foverlay_recenter, last_overlay_modification_hooks_used)
4816 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
4817 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
977b0e45
PE
4818 (validate_region): Omit unnecessary test for b <= e,
4819 since that's guaranteed by the previous test.
d311d28c
PE
4820 (adjust_overlays_for_delete): Avoid pos + length overflow.
4821 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
4822 (report_overlay_modification):
4823 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4824 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
4825 Omit pointer cast, which isn't needed anyway, and doesn't work
4826 after the EMACS_INT -> ptrdiff_t change.
02481186 4827 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
d311d28c
PE
4828 * buffer.h: Adjust decls to match defn changes elsewhere.
4829 (struct buffer_text, struct buffer):
4830 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4831 Use EMACS_INT, not int, where int might not be wide enough.
39b5db3b
PE
4832 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
4833 not int, to avoid needless 32-bit limit on 64-bit hosts.
4834 (exec_byte_code): Use tighter memory-full test, one that checks
4835 for alloca overflow. Don't compute the address of the object just
4836 before an array, as that's not portable. Use EMACS_INT, not
4837 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
d311d28c
PE
4838 * callint.c (Fcall_interactively):
4839 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4840 * callproc.c (call_process_kill, Fcall_process):
4841 Don't assume pid_t fits into an Emacs fixnum.
4842 (call_process_cleanup, Fcall_process, child_setup):
4843 Don't assume pid_t fits into int.
4844 (call_process_cleanup, Fcall_process, delete_temp_file)
4845 (Fcall_process_region):
4846 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4847 (Fcall_process): Simplify handling of volatile integers.
4848 Use int, not EMACS_INT, where int will do.
4849 * casefiddle.c (casify_object, casify_region, operate_on_word)
4850 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
4851 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4852 (casify_object): Avoid integer overflow when overallocating buffer.
4853 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
45c2afd6 4854 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
d311d28c
PE
4855 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
4856 * category.h (CATEGORYP): Don't assume arg is nonnegative.
4857 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
4858 integers are now checked earlier. All uses replaced with XINT.
4859 (ccl_driver):
4860 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4861 For CCL_MapSingle, check that content and value are in int range.
c801946a
PE
4862 (ccl_driver, Fregister_code_conversion_map):
4863 Check that Vcode_version_map_vector is a vector.
d311d28c
PE
4864 (resolve_symbol_ccl_program): Check that vector header is in range.
4865 Always copy the vector, so that we can check its contents reliably
4866 now rather than having to recheck each instruction as it's being
4867 executed. Check that vector words fit in 'int'.
4868 (ccl_get_compiled_code, Fregister_ccl_program)
4869 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
4870 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
4871 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
4872 contents are in range.
4873 (Fccl_execute_on_string): Check that status is in range.
4874 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
4875 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
4876 Accept and return EMACS_INT, not int, because callers can pass values
4877 out of 'int' range.
4878 (c_string_width, strwidth, lisp_string_width, chars_in_text)
4879 (multibyte_chars_in_text, parse_str_as_multibyte)
4880 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
4881 (str_as_unibyte, str_to_unibyte, string_count_byte8)
4882 (string_escape_byte8, Fget_byte):
4883 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
a14e1568 4884 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
d311d28c
PE
4885 avoid mishandling large integers.
4886 * character.h: Adjust decls to match defn changes elsewhere.
4887 * charset.c (load_charset_map_from_file, find_charsets_in_text)
4888 (Ffind_charset_region):
4889 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4890 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
4891 (load_charset_map_from_vector, Fdefine_charset_internal):
3c7649c1 4892 Don't assume fixnum fits in int.
d311d28c
PE
4893 (load_charset_map_from_vector, Fmap_charset_chars):
4894 Remove now-unnecessary CHECK_NATNUMs.
4895 (Fdefine_charset_internal): Check ranges here, more carefully.
3c7649c1
PE
4896 Don't rely on undefined behavior with signed left shift overflow.
4897 Don't assume unsigned int fits into fixnum, or that fixnum fits
4898 into unsigned int. Don't require max_code to be a valid fixnum;
4899 that's not true for gb10830 4-byte on a 32-bit host. Allow
4900 invalid_code to be a cons, for the same reason. Require code_offset
4901 to be a character. Avoid int overflow if max_char is close
4902 to INT_MAX.
4903 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
4904 this is intended anyway and avoids some undefined behavior.
4905 (load_charset_map): Pass unsigned, not int, as 2nd arg of
4906 INDEX_TO_CODE_POINT, as that's what it expects.
4907 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
60ad3eab
PE
4908 * charset.h (DECODE_CHAR): Return int, not unsigned;
4909 this is what was intended anyway, and it avoids undefined behavior.
4910 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
4911 integer-overflow issues.
4912 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
4913 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
4914 where the argument is EMACS_INT, and this behavior is not intended.
d311d28c
PE
4915 * chartab.c (Fmake_char_table, Fset_char_table_range)
4916 (uniprop_get_decoder, uniprop_get_encoder):
4917 Don't assume fixnum fits in int.
4918 * cmds.c (move_point): New function, that does the gist of
4919 Fforward_char and Fbackward_char, but does so while checking
4920 for integer overflow more accurately.
c96e5d6a 4921 (Fforward_char, Fbackward_char): Use it.
d311d28c
PE
4922 (Fforward_line, Fend_of_line, internal_self_insert)
4923 (internal_self_insert):
4924 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4925 Fix a FIXME, by checking for integer overflow when calculating
4926 target_clm and actual_clm.
4927 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8f50130c 4928 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
d311d28c
PE
4929 (ASSURE_DESTINATION, coding_alloc_by_realloc)
4930 (coding_alloc_by_making_gap, alloc_destination)
4931 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
4932 (encode_coding_utf_16, detect_coding_emacs_mule)
4933 (decode_coding_emacs_mule, encode_coding_emacs_mule)
4934 (detect_coding_iso_2022, decode_coding_iso_2022)
4935 (encode_invocation_designation, encode_designation_at_bol)
4936 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
4937 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
4938 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
4939 (encode_coding_ccl, encode_coding_raw_text)
4940 (detect_coding_charset, decode_coding_charset)
4941 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
4942 (produce_composition, produce_charset, produce_annotation)
4943 (decode_coding, handle_composition_annotation)
4944 (handle_charset_annotation, consume_chars, decode_coding_gap)
4945 (decode_coding_object, encode_coding_object, detect_coding_system)
4946 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
4947 (code_convert_region, code_convert_string)
8f50130c
PE
4948 (Fdefine_coding_system_internal)
4949 (coding_set_source, coding_set_destination):
d311d28c
PE
4950 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4951 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
4952 (Fdefine_coding_system_internal):
4953 Don't assume fixnums fit in int.
4954 (decode_coding_gap, decode_coding_object, encode_coding_object)
5895d7b9 4955 (Fread_coding_system, Fdetect_coding_region)
2c6a9faa
PE
4956 (Funencodable_char_position, Fcheck_coding_systems_region)
4957 (get_translation, handle_composition_annotation, consume_chars):
d311d28c 4958 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
977b0e45 4959 (consume_chars): Rewrite to not calculate an address outside buffer.
d311d28c 4960 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
7b09a37a 4961 Don't access memory outside of the args array.
d311d28c 4962 (Fdefine_coding_system_internal): Check for charset-id overflow.
47664caa
PE
4963 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
4964 result of ENCODE_CHAR.
d311d28c
PE
4965 * coding.h: Adjust decls to match defn changes elsewhere.
4966 (struct coding_system):
4967 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4968 * composite.c (get_composition_id, find_composition)
4969 (run_composition_function, update_compositions)
4970 (compose_text, composition_gstring_put_cache)
4971 (composition_gstring_p, composition_gstring_width)
4972 (fill_gstring_header, fill_gstring_body, autocmp_chars)
4973 (composition_compute_stop_pos, composition_reseat_it)
4974 (composition_update_it, struct position_record)
4975 (find_automatic_composition, composition_adjust_point)
4976 (Fcomposition_get_gstring, Ffind_composition_internal):
4977 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4978 (update_compositions):
4979 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
4980 * composite.h: Adjust decls to match defn changes elsewhere.
4981 (struct composition):
4982 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4983 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
4984 Do not attempt to compute the address of the object just before a
4985 buffer; this is not portable.
4986 (Faref, Faset):
4987 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
4988 (Faset): Use int, not EMACS_INT, where int is wide enough.
4989 (Fstring_to_number): Don't assume fixnums fit in int.
4990 (Frem): Don't assume arg is nonnegative.
4991 * dbusbind.c (xd_append_arg): Check for integers out of range.
4992 (Fdbus_call_method): Don't overflow the timeout int.
42b2a986 4993 (extract_signed, extract_unsigned): New functions.
243e0530
PE
4994 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
4995 (xd_get_connection_references): Return ptrdiff_t, not int.
4996 All uses changed.
4997 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
4998 (xd_read_message_1):
4999 Use int, not unsigned, where the dbus API uses int.
5000 (Fdbus_message_internal): Don't overflow mtype.
5001 (syms_of_dbusbind): Allocate right-sized buffer for integers.
d311d28c
PE
5002 * dired.c (directory_files_internal, file_name_completion, scmp)
5003 (file_name_completion_stat):
5004 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5005 (file_name_completion): Don't overflow matchcount.
5006 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
5007 * dispextern.h: Adjust decls to match defn changes elsewhere.
5008 (struct text_pos, struct glyph, struct bidi_saved_info)
5009 (struct bidi_string_data, struct bidi_it, struct composition_it)
5010 (struct it):
5011 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5012 (struct display_pos, struct composition_it, struct it):
5013 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5014 * dispnew.c (increment_matrix_positions)
5015 (increment_row_positions, mode_line_string)
5016 (marginal_area_string):
5017 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
54e1617f 5018 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
d311d28c
PE
5019 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5020 (duration_to_sec_usec): New function, to check for overflow better.
5021 (Fsleep_for, sit_for): Use it.
5022 * doc.c (get_doc_string, store_function_docstring):
5023 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5024 (get_doc_string, Fsnarf_documentation):
5025 Use int, not EMACS_INT, where int is wide enough.
5026 (get_doc_string):
5027 Use SAFE_ALLOCA, not alloca.
5028 Check for overflow when converting EMACS_INT to off_t.
5029 * doprnt.c (doprnt):
5030 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5031 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
5032 Don't assume uid_t fits into fixnum.
5033 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
5034 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
5035 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
5036 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
5037 (general_insert_function)
5038 (Finsert_char, make_buffer_string, make_buffer_string_both)
5039 (update_buffer_properties, Fbuffer_substring)
5040 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
5041 (Fsubst_char_in_region, check_translation)
5042 (Ftranslate_region_internal, save_restriction_restore, Fformat)
5043 (transpose_markers, Ftranspose_regions):
5044 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5045 (clip_to_bounds): Move to lisp.h as an inline function).
5046 (Fconstrain_to_field): Don't assume integers are nonnegative.
5047 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
5048 (Fsubst_char_in_region, Fsave_restriction):
5049 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5050 (Femacs_pid): Don't assume pid_t fits into fixnum.
5051 (lo_time): Use int, not EMACS_INT, when int suffices.
5052 (lisp_time_argument): Check for usec out of range.
5053 (Fencode_time): Don't assume fixnum fits in int.
3f4eabd1
PE
5054 (Fuser_login_name, Fuser_full_name): Signal an error
5055 if a uid argument is out of range, rather than relying on
5056 undefined behavior.
c8d5c857
PE
5057 (Fformat_time_string): Remove now-unnecessary check.
5058 lisp_time_argument checks for out-of-range usec now.
243e0530 5059 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
d311d28c
PE
5060 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
5061 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
5062 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
5063 (init_cmdargs, Fdump_emacs):
5064 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5065 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
5066 the bottom (typically) 32 bits of the fixnum.
5067 * eval.c (specpdl_size, call_debugger):
5068 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5069 (when_entered_debugger, Fbacktrace_debug):
5070 Don't assume fixnum can fit in int.
5071 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
5072 the object just before a buffer; this is not portable.
5073 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
5074 (grow_specpdl, unbind_to):
5075 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5076 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
5077 (grow_specpdl): Simplify allocation by using xpalloc.
856bbc81 5078 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
d311d28c
PE
5079 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
5080 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
5081 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5082 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
5083 (a_write, e_write):
5084 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5085 (Fcopy_file, non_regular_nbytes, read_non_regular)
5086 (Finsert_file_contents):
5087 Use int, not EMACS_INT, where int is wide enough.
5088 (READ_BUF_SIZE): Verify that it fits in int.
5089 (Finsert_file_contents): Check that counts are in proper range,
5090 rather than assuming fixnums fit into ptrdiff_t etc.
5091 Don't assume fixnums fit into int.
125b3835 5092 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
5895d7b9
PE
5093 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
5094 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
d311d28c
PE
5095 (string_char_to_byte, string_byte_to_char)
5096 (string_make_multibyte, string_to_multibyte)
5097 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
5098 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
5099 (substring_both, Fdelete, internal_equal, Ffillarray)
5100 (Fclear_string, mapcar1)
5101 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
5102 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
5103 (larger_vector, make_hash_table, maybe_resize_hash_table)
5104 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
5105 (Fmaphash, secure_hash):
5106 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5107 (concat): Check for string index and length overflow.
5108 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
5109 (Frequire):
5110 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5111 (larger_vector): New API (vec, incr_min, size_max) replaces old
5112 one (vec, new_size, init). This catches size overflow.
5113 INIT was removed because it was always Qnil.
5114 All callers changed.
5115 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
5116 the upper bound on a hash table index size.
5117 (make_hash_table, maybe_resize_hash_table): Use it.
5118 (secure_hash): Computer start_byte and end_byte only after
5119 they're known to be in ptrdiff_t range.
5120 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
5121 (Ffont_get_glyphs, Ffont_at):
5122 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5123 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
5124 (Flist_fonts, Fopen_font):
5125 Don't assume fixnum can fit in int.
5126 (check_gstring): Don't assume index can fit in int.
5127 (font_match_p): Check that fixnum is a character, not a nonnegative
5128 fixnum, since the later code needs to stuff it into an int.
5129 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
5130 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
5131 conversion overflow issues.
5132 (Fopen_font): Check for integer out of range.
5133 (Ffont_get_glyphs): Don't assume index can fit in int.
5134 * font.h: Adjust decls to match defn changes elsewhere.
5135 * fontset.c (reorder_font_vector): Redo score calculation to avoid
5136 integer overflow.
5137 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
5138 printmax_t, where ptrdiff_t is wide enough.
5139 (Finternal_char_font):
5140 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5141 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
5142 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
5143 (Fset_frame_position, x_set_frame_parameters)
5144 (x_set_line_spacing, x_set_border_width)
5145 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
5146 Check that fixnums are in proper range for system types.
5147 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
5148 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5149 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
5150 Use SAFE_ALLOCA_LISP, not alloca.
5151 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
5152 intptr_t is wide enough.
5153 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
5154 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
5155 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
5156 Check for fixnum out of range.
5157 * ftfont.c (ftfont_list): Don't assume index fits in int.
5158 Check that fixnums are in proper range for system types.
5159 (ftfont_shape_by_flt):
5160 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
d311d28c
PE
5161 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
5162 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5163 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
5164 Check that fixnums are in proper range for system types.
5165 * gnutls.h: Adjust decls to match defn changes elsewhere.
5166 * gtkutil.c (xg_dialog_run):
5167 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5168 (update_frame_tool_bar):
5169 Check that fixnums are in proper range for system types.
5170 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
5895d7b9 5171 (lookup_image): Check that fixnums are in range for system types.
d311d28c
PE
5172 * indent.c (last_known_column, last_known_column_point):
5173 (current_column_bol_cache):
5174 (skip_invisible, current_column, check_display_width):
5175 (check_display_width, scan_for_column, current_column_1)
5176 (Findent_to, Fcurrent_indentation, position_indentation)
5177 (indented_beyond_p, Fmove_to_column, compute_motion):
5178 (Fcompute_motion, Fvertical_motion):
5179 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5180 (last_known_column_modified): Use EMACS_INT, not int.
5181 (check_display_width):
5182 (Fcompute_motion):
5183 Check that fixnums and floats are in proper range for system types.
5184 (compute_motion): Don't assume index or fixnum fits in int.
5185 (compute_motion, Fcompute_motion):
5186 Use int, not EMACS_INT, when it is wide enough.
5187 (vmotion): Omit local var start_hpos that is always 0; that way
5188 we don't need to worry about overflow in expressions involving it.
5189 * indent.h: Adjust decls to match defn changes elsewhere.
5190 (struct position):
5191 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5192 Use int, not EMACS_INT, where int is wide enough.
5193 Remove unused members ovstring_chars_done and tab_offset;
5194 all uses removed.
5195 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
5196 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
5197 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
5198 (make_gap, copy_text, insert, insert_and_inherit)
5199 (insert_before_markers, insert_before_markers_and_inherit)
5200 (insert_1, count_combining_before, count_combining_after)
5201 (insert_1_both, insert_from_string)
5202 (insert_from_string_before_markers, insert_from_string_1)
5203 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
5204 (adjust_after_replace, adjust_after_insert, replace_range)
5205 (replace_range_2, del_range, del_range_1, del_range_byte)
5206 (del_range_both, del_range_2, modify_region)
5207 (prepare_to_modify_buffer, signal_before_change)
5208 (signal_after_change, Fcombine_after_change_execute):
5209 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5210 * intervals.c (traverse_intervals, rotate_right, rotate_left)
5211 (balance_an_interval, split_interval_right, split_interval_left)
5212 (find_interval, next_interval, update_interval)
5213 (adjust_intervals_for_insertion, delete_node, delete_interval)
5214 (interval_deletion_adjustment, adjust_intervals_for_deletion)
5215 (static_offset_intervals, offset_intervals)
5216 (merge_interval_right, merge_interval_left, make_new_interval)
5217 (graft_intervals_into_buffer, temp_set_point_both)
5218 (temp_set_point, set_point, adjust_for_invis_intang)
5219 (set_point_both, move_if_not_intangible, get_property_and_range)
5220 (get_local_map, copy_intervals, copy_intervals_to_string)
5221 (compare_string_intervals, set_intervals_multibyte_1):
5222 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5223 * intervals.h: Adjust decls to match defn changes elsewhere.
5224 (struct interval):
5225 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5226 * keyboard.c (this_command_key_count, this_single_command_key_start)
5227 (before_command_key_count, before_command_echo_length, echo_now)
5228 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
5229 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
5230 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
5231 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
5232 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5233 (last_non_minibuf_size, last_point_position, echo_truncate)
5234 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
5235 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
5236 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
5237 (stuff_buffered_input):
5238 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5239 (last_auto_save, command_loop_1, read_char):
5240 Use EMACS_INT, not int, to avoid integer overflow.
5241 (record_char): Avoid overflow in total_keys computation.
5242 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
5243 * keyboard.h: Adjust decls to match defn changes elsewhere.
5244 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
5245 (Fkey_description, Fdescribe_vector, Flookup_key):
5246 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5247 (click_position): New function, to check that positions are in range.
5248 (Fcurrent_active_maps):
5249 (describe_command):
5250 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5251 (Faccessible_keymaps, Fkey_description):
5252 (preferred_sequence_p):
5253 Don't assume fixnum can fit into int.
5254 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
5255 Check for integer overflow in size calculations.
5256 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
5257 avoid mishandling large integers.
5258 * lisp.h: Adjust decls to match defn changes elsewhere.
5259 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
5260 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
5261 (struct Lisp_Marker):
5262 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5263 (clip_to_bounds): Now an inline function, moved here from editfns.c.
d311d28c
PE
5264 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
5265 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
5266 All callers changed.
5267 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
5268 Assume the arg has valid form, since it always does.
5269 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
5270 unsigned integer system type.
5271 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
5272 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
5273 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5274 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
5275 (duration_to_sec_usec): New decl.
5276 * lread.c (read_from_string_index, read_from_string_index_byte)
5277 (read_from_string_limit, readchar, unreadchar, openp)
5278 (read_internal_start, read1, oblookup):
5279 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5280 (Fload, readevalloop, Feval_buffer, Feval_region):
5281 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5282 (openp): Check for out-of-range argument to 'access'.
5283 (read1): Use int, not EMACS_INT, where int is wide enough.
5284 Don't assume fixnum fits into int.
6efdadfd 5285 Fix off-by-one error that can read outside a buffer.
1ab7b8ac
PE
5286 (read_filtered_event): Use duration_to_sec_usec
5287 to do proper overflow checking on durations.
d311d28c
PE
5288 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
5289 in size calculation.
5290 (Fexecute_kbd_macro):
5291 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5292 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
5293 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
5294 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
5295 (set_marker_both, set_marker_restricted_both, marker_position)
5296 (marker_byte_position, Fbuffer_has_markers_at):
5297 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5298 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
61b108cc 5299 * menu.c (ensure_menu_items): Rename from grow_menu_items.
d311d28c
PE
5300 It now merely ensures that the menu is large enough, without
5301 necessarily growing it, as this avoids some integer overflow issues.
5302 All callers changed.
5303 (keymap_panes, parse_single_submenu, Fx_popup_menu):
5304 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5305 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
5306 Use SAFE_ALLOCA_LISP, not alloca.
5307 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
5308 to EMACS_INT. Check that fixnums are in proper range for system types.
5309 * minibuf.c (minibuf_prompt_width, string_to_object)
5310 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
5311 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
5312 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5313 (get_minibuffer, read_minibuf_unwind):
5314 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5315 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
5316 this simplifies overflow checking. All callers changed.
5317 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
5318 (Ftest_completion):
5319 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5320 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
5321 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
5322 Check that fixnums are in proper range for system types.
5323 (Fx_create_frame, Fx_show_tip):
5324 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5325 * nsfont.m (ns_findfonts, nsfont_list_family):
5326 Don't assume fixnum fits in long.
5327 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
5328 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5329 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
5330 wide enough.
17fdb222 5331 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
d311d28c
PE
5332 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5333 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
5334 (PRINTDECLARE, PRINTPREPARE):
5335 (strout, print_string):
5336 (print, print_preprocess, print_check_string_charset_prop)
5337 (print_object):
5338 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5339 (PRINTDECLARE):
5340 (temp_output_buffer_setup, Fprin1_to_string, print_object):
5341 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5342 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
d311d28c 5343 (printchar, strout): Use xpalloc to catch size calculation overflow.
0fd11aa5 5344 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
d311d28c
PE
5345 (print_error_message): Use SAFE_ALLOCA, not alloca.
5346 (print_object): Use int, not EMACS_INT, where int is wide enough.
a8b7caa3
PE
5347 (print_depth, new_backquote_output, print_number_index):
5348 Use ptrdiff_t, not int, where int might not be wide enough.
d311d28c
PE
5349 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
5350 (Fset_process_window_size, Fformat_network_address)
5351 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
d44287d4 5352 (sigchld_handler):
d311d28c 5353 Check that fixnums are in proper range for system types.
d44287d4 5354 (Fsignal_process): Simplify by avoiding a goto.
d83cf4cc
PE
5355 Check for process-ids out of pid_t range rather than relying on
5356 undefined behavior.
e4d81efc 5357 (process_tick, update_tick): Use EMACS_INT, not int.
d311d28c
PE
5358 (Fformat_network_address, read_process_output, send_process)
5359 (Fprocess_send_region, status_notify):
5360 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5361 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
5362 (wait_reading_process_output, read_process_output, exec_sentinel):
5363 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5364 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
5365 (Faccept_process_output): Use duration_to_sec_usec to do proper
5366 overflow checking on durations.
dde14581
PE
5367 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
5368 Don't assume pid_t fits in int.
02481186
PE
5369 * process.h (struct Lisp_Process): Members tick and update_tick
5370 are now of type EMACS_INT, not int.
b62b53e8
PE
5371 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
5372 configured --with-wide-int.
d311d28c
PE
5373 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
5374 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
5375 * search.c (looking_at_1, string_match_1):
5376 (fast_string_match, fast_c_string_match_ignore_case)
5377 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
5378 (scan_newline, find_before_next_newline, search_command)
5379 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
5380 (set_search_regs, wordify):
5381 (Freplace_match):
5382 (Fmatch_data):
5383 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5384 (string_match_1, search_buffer, set_search_regs):
5385 (Fmatch_data):
5386 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5387 (wordify): Check for overflow in size calculation.
5388 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
5389 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
5390 Check that fixnums are in proper range for system types.
5391 * sound.c (struct sound_device)
5392 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
5393 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5394 (Fplay_sound_internal):
5395 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
eacd378d 5396 * syntax.c (struct lisp_parse_state, find_start_modiff)
d311d28c
PE
5397 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
5398 (Fparse_partial_sexp):
5399 Don't assume fixnums can fit in int.
5400 (struct lisp_parse_state, find_start_pos, find_start_value)
5401 (find_start_value_byte, find_start_begv)
5402 (update_syntax_table, char_quoted, dec_bytepos)
5403 (find_defun_start, prev_char_comend_first, back_comment):
5404 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
5405 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
5406 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5407 (Finternal_describe_syntax_value): Check that match_lisp is a
5408 character, not an integer, since the code stuffs it into int.
5409 (scan_words, scan_sexps_forward):
5410 Check that fixnums are in proper range for system types.
5411 (Fforward_word):
5412 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5413 (scan_sexps_forward):
5414 Use CHARACTERP, not INTEGERP, since the value must fit into int.
5415 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
5416 * syntax.h: Adjust decls to match defn changes elsewhere.
5417 (struct gl_state_s):
5418 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
e4ecdc9c
PE
5419 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
5420 MOST_POSITIVE_FIXNUM.
d311d28c
PE
5421 * sysdep.c (wait_for_termination_1, wait_for_termination)
5422 (interruptible_wait_for_termination, mkdir):
5423 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
5424 (emacs_read, emacs_write):
5425 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
225a2cff
PE
5426 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
5427 and double all fit in int.
d311d28c
PE
5428 * term.c (set_tty_color_mode):
5429 Check that fixnums are in proper range for system types.
5430 * termhooks.h (struct input_event):
5431 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5432 * textprop.c (validate_interval_range, interval_of)
5433 (Fadd_text_properties, set_text_properties_1)
5434 (Fremove_text_properties, Fremove_list_of_text_properties)
5435 (Ftext_property_any, Ftext_property_not_all)
5436 (copy_text_properties, text_property_list, extend_property_ranges)
5437 (verify_interval_modification):
5438 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5439 (Fnext_single_char_property_change)
5440 (Fprevious_single_char_property_change):
5441 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5895d7b9
PE
5442 (copy_text_properties):
5443 Check for integer overflow in index calculation.
d311d28c
PE
5444 * undo.c (last_boundary_position, record_point, record_insert)
5445 (record_delete, record_marker_adjustment, record_change)
5446 (record_property_change):
5447 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5448 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
5449 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5450 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
5451 (Fx_hide_tip, Fx_file_dialog):
5452 * w32menu.c (set_frame_menubar):
5453 Use ptrdiff_t, not int, for consistency with rest of code.
5454 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
5455 (select_window, Fdelete_other_windows_internal)
5456 (window_scroll_pixel_based, window_scroll_line_based)
5457 (Frecenter, Fset_window_configuration):
5458 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5459 (Fset_window_hscroll, run_window_configuration_change_hook)
5460 (set_window_buffer, temp_output_buffer_show, scroll_command)
5895d7b9 5461 (Fscroll_other_window, Frecenter):
d311d28c
PE
5462 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5463 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
5464 Don't assume fixnum fits in int.
5465 (Fset_window_scroll_bars):
5466 Check that fixnums are in proper range for system types.
5467 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
5468 (string_pos, c_string_pos, number_of_chars, init_iterator)
5469 (in_ellipses_for_invisible_text_p, init_from_display_pos)
5470 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
5471 (compute_display_string_end, handle_face_prop)
5895d7b9
PE
5472 (face_before_or_after_it_pos, handle_invisible_prop)
5473 (handle_display_prop, handle_display_spec, handle_single_display_spec)
d311d28c
PE
5474 (display_prop_intangible_p, string_buffer_position_lim)
5475 (string_buffer_position, handle_composition_prop, load_overlay_strings)
5476 (get_overlay_strings_1, get_overlay_strings)
5477 (iterate_out_of_display_property, forward_to_next_line_start)
5478 (back_to_previous_visible_line_start, reseat, reseat_to_string)
5479 (get_next_display_element, set_iterator_to_next)
5480 (get_visually_first_element, compute_stop_pos_backwards)
5481 (handle_stop_backwards, next_element_from_buffer)
5482 (move_it_in_display_line_to, move_it_in_display_line)
5483 (move_it_to, move_it_vertically_backward, move_it_by_lines)
5484 (add_to_log, message_dolog, message_log_check_duplicate)
5485 (message2, message2_nolog, message3, message3_nolog
5486 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
5487 (current_message_1, truncate_echo_area, truncate_message_1)
5488 (set_message, set_message_1, store_mode_line_noprop)
5489 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
5490 (text_outside_line_unchanged_p, check_point_in_composition)
5491 (reconsider_clip_changes)
5492 (redisplay_internal, set_cursor_from_row, try_scrolling)
5493 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
5494 (redisplay_window, find_last_unchanged_at_beg_row)
5495 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
5496 (trailing_whitespace_p, find_row_edges, display_line)
5497 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
5498 (display_mode_element, store_mode_line_string)
5499 (pint2str, pint2hrstr, decode_mode_spec)
5500 (display_count_lines, display_string, draw_glyphs)
5501 (x_produce_glyphs, x_insert_glyphs)
5502 (rows_from_pos_range, mouse_face_from_buffer_pos)
5503 (fast_find_string_pos, mouse_face_from_string_pos)
5504 (note_mode_line_or_margin_highlight, note_mouse_highlight):
5505 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5506 (safe_call, init_from_display_pos, handle_fontified_prop)
5507 (handle_single_display_spec, load_overlay_strings)
5508 (with_echo_area_buffer, setup_echo_area_for_printing)
5509 (display_echo_area, echo_area_display)
5510 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
5511 (update_tool_bar, hscroll_window_tree, redisplay_internal)
5895d7b9
PE
5512 (redisplay_window, dump_glyph_row, display_mode_line)
5513 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
43ad2e9a 5514 (handle_display_spec, display_prop_string_p):
d311d28c
PE
5515 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5516 (handle_single_display_spec, build_desired_tool_bar_string)
5517 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
5518 (get_specified_cursor_type):
5519 Check that fixnums are in proper range for system types.
5520 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
5521 (Flookup_image_map):
5522 Don't assume fixnums fit in int.
5523 (compare_overlay_entries):
5524 Avoid mishandling comparisons due to subtraction overflow.
5525 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
5526 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
5527 (handle_tool_bar_click):
5528 Use int, not unsigned, since we prefer signed and the signedness
5529 doesn't matter here.
5530 (get_next_display_element, next_element_from_display_vector):
5531 Use int, not EMACS_INT, when int is wide enough.
5532 (start_hourglass): Use duration_to_sec_usec to do proper
5533 overflow checking on durations.
5534 * xfaces.c (Fbitmap_spec_p):
5535 Check that fixnums are in proper range for system types.
5536 (compare_fonts_by_sort_order):
5537 Avoid mishandling comparisons due to subtraction overflow.
5538 (Fx_family_fonts, realize_basic_faces):
5539 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5540 (Fx_family_fonts):
5541 Don't assume fixnum fits in int.
5542 Use SAFE_ALLOCA_LISP, not alloca.
5543 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
5544 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
5545 (face_at_buffer_position, face_for_overlay_string)
5546 (face_at_string_position):
5547 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5548 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
5549 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
5550 (Fx_show_tip):
5551 Check that fixnums are in proper range for system types.
5552 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
5553 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
5554 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5555 (Fx_change_window_property): Don't assume fixnums fit in int.
5556 * xfont.c (xfont_chars_supported):
5557 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5558 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
5559 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
5560 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5561 * xml.c (parse_region):
5562 * xrdb.c (magic_file_p):
5563 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5564 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
5565 (x_get_local_selection, x_reply_selection_request)
5566 (x_handle_selection_request, wait_for_property_change):
5567 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5568 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
5569 short is wide enough.
5570 (x_send_client_event): Don't assume fixnum fits in int.
5571 * xterm.c (x_x_to_emacs_modifiers):
5572 Don't assume EMACS_INT overflows nicely into int.
5573 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
5574 may come from Lisp.
5575 (handle_one_xevent): NATNUMP can eval its arg twice.
5576 (x_connection_closed):
5577 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5578 * xterm.h: Adjust decls to match defn changes elsewhere.
5579 (struct scroll_bar): Use struct vectorlike_header
5580 rather than rolling our own approximation.
5581 (SCROLL_BAR_VEC_SIZE): Remove; not used.
5582
c6574eb5
GM
55832012-05-25 Glenn Morris <rgm@gnu.org>
5584
5585 * lisp.mk (lisp): Update for more files being compiled now.
5586
e8d32c7e
SM
55872012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
5588
48def666
SM
5589 * lread.c: Remove `read_pure' which makes no difference.
5590 (read_pure): Remove var.
5591 (unreadpure): Remove function.
5592 (readevalloop): Don't call read_list with -1 flag.
5593 (read1, read_vector): Don't test read_pure any more.
5594 (read_list): Simplify.
5595
e8d32c7e
SM
5596 * fileio.c, character.h: Minor style tweaks.
5597
4b2addb7
DA
55982012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
5599
5600 * window.h (clip_changed): Remove useless declaration.
5601
584461b2
JB
56022012-05-22 Juanma Barranquero <lekktu@gmail.com>
5603
5604 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
5605 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
5606
34374650
PE
56072012-05-22 Paul Eggert <eggert@cs.ucla.edu>
5608
5609 Remove src/m/*.
5610 This directory predates autoconf and is no longer needed nowadays.
5611 Move its few remaining bits of functionality to where they're needed.
5612 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
5613 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
5614 * m/template.h: Remove.
5615 * Makefile.in (M_FILE): Remove. All uses removed.
5616 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
5617 * lisp.h (USE_LSB_TAG):
5618 * mem-limits.h (EXCEEDS_LISP_PTR):
5619 Use VAL_MAX, not VALBITS, in #if.
5620 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
5621 (EMACS_UINT): Define unconditionally now.
5622 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
5623 (BITS_PER_EMACS_INT): New constants, replacing
5624 what used to be in config.h, but not useful in #if.
5625 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
5626 define them any more.
5627 (VAL_MAX): New macro.
5628 (VALMASK): Use it.
5629 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
5630 BITS_PER_EMACS_INT, in #if.
5631 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5632 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
5633 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
5634 * s/ms-w32.h (DATA_START):
5635 Move here from removed file m/intel386.h.
5636 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
5637 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
5638
261cb4bb
PE
56392012-05-21 Paul Eggert <eggert@cs.ucla.edu>
5640
5641 Assume C89 or later.
5642 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
5643 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
5644 (xrealloc):
5645 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
5646 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
5647 * textprop.c, tparam.c (NULL): Remove.
5648 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
5649 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
5650 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
5651 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
5652 * xterm.c (input_signal_count): Assume volatile works.
5653
ff23cd9f
KB
56542012-05-21 Ken Brown <kbrown@cornell.edu>
5655
5656 * xgselect.c (xg_select): Fix first argument in call to 'select'
5657 (bug#11508).
5658
1b170bc6
KB
56592012-05-20 Ken Brown <kbrown@cornell.edu>
5660
5661 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
bd7239f5 5662 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
1b170bc6 5663
b2f4d39f
KB
56642012-05-19 Ken Brown <kbrown@cornell.edu>
5665
5666 * xfns.c (x_in_use): Remove `static' qualifier.
5667 * xterm.h (x_in_use): Declare.
5668 * xgselect.c: Include xterm.h.
5669 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
5670 and `display_arg' (bug#9754).
5671
003fdae2
PE
56722012-05-19 Paul Eggert <eggert@cs.ucla.edu>
5673
9232a6d9
PE
5674 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
5675
003fdae2
PE
5676 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
5677 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
5678
784b56e2
EZ
56792012-05-18 Eli Zaretskii <eliz@gnu.org>
5680
5681 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
5682
5683 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
090bd7cb 5684 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
784b56e2
EZ
5685
5686 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
5687 reference to image_cache->refcount.
5688 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
5689
a0a79cde
JL
56902012-05-17 Juri Linkov <juri@jurta.org>
5691
5692 * search.c (Fword_search_regexp, Fword_search_backward)
5693 (Fword_search_forward, Fword_search_backward_lax)
5694 (Fword_search_forward_lax): Move functions to isearch.el
5695 (bug#10145, bug#11381).
5696
b0572523
PE
56972012-05-16 Paul Eggert <eggert@cs.ucla.edu>
5698
5699 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
5700
9660f5fc
SM
57012012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
5702
5703 * lread.c (init_obarray): Declare Qt and Qnil as special.
5704
4374de83
GM
57052012-05-14 Glenn Morris <rgm@gnu.org>
5706
5707 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
985584ae 5708 Put "libexec" before "bin", for the sake of init_callproc_1.
4374de83 5709
dc44c39a
PE
57102012-05-14 Paul Eggert <eggert@cs.ucla.edu>
5711
078c97cb
PE
5712 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
5713
dc44c39a
PE
5714 * unexaix.c: Port to more-recent AIX compilers.
5715 (report_error, report_error_1, make_hdr, copy_sym)
5716 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
5717 Make arguments const char *, not char *, to avoid violations of C
5718 standard and to fix some AIX warnings reported by Gilles Pion.
5719
e18afed7 57202012-05-14 Eli Zaretskii <eliz@gnu.org>
ac268e67
EZ
5721
5722 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
5723 already have overlays loaded.
5724 (handle_single_display_spec): Before returning without displaying
5725 fringe bitmap, synchronize the bidi iterator with the main display
5726 iterator, by calling iterate_out_of_display_property.
5727 (iterate_out_of_display_property): Detect buffer iteration by
5728 testing that it->string is a Lisp string.
5729 (get_next_display_element): When the current object is exhausted,
5730 and there's something on it->stack, call set_iterator_to_next to
5731 proceed with what's on the stack, instead of returning zero.
5732 (set_iterator_to_next): If called at the end of a Lisp string,
5733 proceed to consider_string_end without incrementing string
5734 position. Don't increment display vector index past the end of
5735 the display vector. (Bug#11417)
c8fb9dc6
EZ
5736 (pos_visible_p): Don't report a position visible when move_it_to
5737 stopped at the last line of window, which happens to be scanned
5738 backwards by the bidi iteration. (Bug#11464)
ac268e67 5739
e18afed7 57402012-05-14 Eli Zaretskii <eliz@gnu.org>
82f9b393
EZ
5741
5742 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
5743 and right-margin display specs even if the spec is invalid or we
61b108cc
SM
5744 are on a TTY, and thus unable to display on the fringes.
5745 That's because the text with the property will not be displayed anyway,
82f9b393
EZ
5746 so we need to signal to the caller that this is a "replacing"
5747 display spec. This fixes display when the spec is invalid or we
5748 are on a TTY.
5749
e18afed7 57502012-05-14 Paul Eggert <eggert@cs.ucla.edu>
297834cd
PE
5751
5752 * unexaix.c (make_hdr): Fix typo in prototype.
5753 This bug broke the build on AIX. Problem reported by Gilles Pion.
5754
9d0a235a
MA
57552012-05-14 Michael Albinus <michael.albinus@gmx.de>
5756
5757 * keyboard.c (kbd_buffer_get_event): Read special events also in
5758 batch mode. (Bug#11415)
5759
9e6b06ed
GM
57602012-05-12 Glenn Morris <rgm@gnu.org>
5761
5762 * ns.mk: Update for ns_appbindir no longer having trailing "/".
5763
c1a1d7a3
EZ
57642012-05-12 Eli Zaretskii <eliz@gnu.org>
5765
5766 * lisp.mk (lisp): Add newcomment.elc.
5767
3fe7cdc8
GM
57682012-05-12 Glenn Morris <rgm@gnu.org>
5769
5770 * Makefile.in (MKDIR_P): New, set by configure.
5771 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
5772
53f7d2c0
PE
57732012-05-11 Paul Eggert <eggert@cs.ucla.edu>
5774
5775 Remove unused function hourglass_started.
5776 * dispextern.h (hourglass_started):
5777 * w32fns.c (hourglass_started):
5778 * xdisp.c (hourglass_started): Remove.
5779
75aafb17
JB
57802012-05-10 Juanma Barranquero <lekktu@gmail.com>
5781
5782 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
5783 Update dependencies.
5784
12959e8e
PE
57852012-05-10 Paul Eggert <eggert@cs.ucla.edu>
5786
97107e2e
PE
5787 * xgselect.c (xg_select): Put maxfds+1 into a var.
5788 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
5789
12959e8e
PE
5790 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
5791
836d29b3
DA
57922012-05-10 Dave Abrahams <dave@boostpro.com>
5793
5794 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
5795 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
5796
5cb67954
MA
57972012-05-09 Michael Albinus <michael.albinus@gmx.de>
5798
5799 * dbusbind.c (xd_registered_buses): New internal Lisp object.
5800 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
5801 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
5802 Initialize xd_registered_buses.
5803
3478ec45
PE
58042012-05-09 Paul Eggert <eggert@cs.ucla.edu>
5805
b263a6b0
PE
5806 Untag more efficiently if USE_LSB_TAG.
5807 This is based on a proposal by YAMAMOTO Mitsuharu in
5808 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
5809 For an admittedly artificial (nth 8000 longlist) benchmark on
5810 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
5811 Emacs's overall text size by 1%.
5812 * lisp.h (XUNTAG): New macro.
5813 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
5814 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
5815 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
5816 * eval.c (Fautoload):
5817 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
5818 * frame.h (XFRAME): Use XUNTAG.
5819
3478ec45
PE
5820 Port recent dbusbind.c changes to 32-bit --with-wide-int.
5821 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
5822 Remove unportable assumptions about print widths of types like
5823 dbus_uint32_t.
5824 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
5825 intptr_t when converting between pointer and integer, to avoid GCC
5826 warnings about wrong width.
5827
666b903b 58282012-05-09 Eli Zaretskii <eliz@gnu.org>
0d887c7d
EZ
5829
5830 * w32proc.c (new_child): Force Windows to reserve only 64KB of
5831 stack for each reader_thread, instead of defaulting to 8MB
5832 determined by the linker. This avoids failures in creating
5833 subprocesses on Windows 7, see the discussion in this thread:
5834 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
5835
b120cc17
JC
58362012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
5837
5838 Fix up display of the *Minibuf-0* buffer in the mini window.
5839 * keyboard.c (read_char): Don't clear the echo area if there's no
5840 message to clear.
5841 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
2fed2689 5842 contents of *Minibuf-0*) if there's no message displayed in its stead.
b120cc17 5843
9a4b36f8
MA
58442012-05-07 Michael Albinus <michael.albinus@gmx.de>
5845
5846 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
5847 batch mode.
5848
e5f9458f
CY
58492012-05-06 Chong Yidong <cyd@gnu.org>
5850
5851 * lisp.mk (lisp): Update.
5852
eceeb5fc 58532012-05-05 Jim Meyering <meyering@redhat.com>
bf98199c
JM
5854
5855 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
5856
71873e2b
SM
58572012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
5858
5859 * data.c (PUT_ERROR): New macro.
5860 (syms_of_data): Use it. Add new error type `user-error'.
5861 * undo.c (user_error): New function.
5862 (Fprimitive_undo): Use it.
5863 * print.c (print_error_message): Adjust print style for `user-error'.
5864 * keyboard.c (user_error): New function.
5865 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
5866
ab0fa4e4
PE
58672012-05-03 Paul Eggert <eggert@cs.ucla.edu>
5868
5869 Do not limit current-time-string to years 1000..9999.
5870 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
5871 (Fcurrent_time_string): Support any year that is supported by the
5872 underlying localtime representation. Don't use asctime, as it
5873 has undefined behavior for years outside the range -999..9999.
5874
7ed806a7
PE
58752012-05-02 Paul Eggert <eggert@cs.ucla.edu>
5876
5877 Fix race conditions involving setenv, gmtime, localtime, asctime.
5878 Without this fix, interrupts could mess up code that uses these
5879 nonreentrant functions, since setting TZ invalidates existing
5880 tm_zone or tzname values, and since most of these functions return
5881 pointers to static storage.
5882 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
5883 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
5884 Grow the critical sections to include not just invoking
5885 localtime/gmtime, but also accessing these functions' results
5886 including their tm_zone values if any, and any related TZ setting.
5887 (format_time_string): Last arg is now struct tm *, not struct tm **,
71873e2b
SM
5888 so that the struct tm is saved in the critical section.
5889 All callers changed. Simplify allocation of initial buffer, partly
7ed806a7
PE
5890 motivated by the fact that memory allocation needs to be outside
5891 the critical section.
5892
0c16dfed
DA
58932012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
5894
5895 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
5896 with RESET_INTERVAL.
5897
5898 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
5899 Remove duplicated buffer name initialization.
5900
3f83ace8
JM
59012012-05-02 Jim Meyering <jim@meyering.net>
5902
5903 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
5904
c7b8541e
JM
5905 * xfns.c (x_window): Use xstrdup (Bug#11375).
5906
90207a15 59072012-05-02 Eli Zaretskii <eliz@gnu.org>
2fa85638
EZ
5908
5909 * xdisp.c (pos_visible_p): If already at a newline from the
5910 display string before the 'while' loop, don't walk back the glyphs
5911 from it3.glyph_row. Solves assertion violation when the display
5912 string begins with a newline (egg.el). (Bug#11367)
5913
b593d6a9
AH
59142012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
5915
5916 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
5917 Move to simple.el.
5918
4737362e
GM
59192012-05-01 Glenn Morris <rgm@gnu.org>
5920
99cf43f9
GM
5921 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
5922 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
5923 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
5924 All were removed before 23.1.
5925
9311dcff
GM
5926 * dispnew.c: Remove HAVE_LIBNCURSES test;
5927 it is always true on relevant platforms.
5928
4d5c6349
GM
5929 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
5930 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
5931
4737362e
GM
5932 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
5933
74dd3a6b
AS
59342012-04-30 Andreas Schwab <schwab@linux-m68k.org>
5935
5936 * .gdbinit (xpr): Remove checks for no longer existing misc types.
5937 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
5938 Remove.
5939
13c379ee
PE
59402012-04-28 Paul Eggert <eggert@cs.ucla.edu>
5941
5942 Do not avoid creating empty evaporating overlays (Bug#9642).
5943 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
5944 That is, do not delete an evaporating overlay if it becomes
5945 empty after its bounds are adjusted to fit within its buffer.
5946 This fix caused other problems, and I'm reverting it until we get
5947 to the bottom of them.
5948
a8e7d6d7 59492012-04-27 Chong Yidong <cyd@gnu.org>
9be2fd9b
CY
5950
5951 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
5952
a8e7d6d7 59532012-04-27 Eli Zaretskii <eliz@gnu.org>
f0ee99a0
EZ
5954
5955 * xdisp.c (pos_visible_p): If the window start position is beyond
5956 ZV, start the display from buffer beginning. Prevents assertion
5957 violation in init_iterator when the minibuffer window is scrolled
5958 via the scroll bar.
5959
5960 * window.c (window_scroll_pixel_based): Likewise.
5961
a8e7d6d7 59622012-04-27 Chong Yidong <cyd@gnu.org>
9ec7751f
CY
5963
5964 * keymap.c (where_is_internal): Doc fix (Bug#10872).
5965
a8e7d6d7 59662012-04-27 Glenn Morris <rgm@gnu.org>
24c51a09
GM
5967
5968 * fileio.c (Fcopy_file, Fset_file_selinux_context):
5969 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
5970
a8e7d6d7 59712012-04-27 Eli Zaretskii <eliz@gnu.org>
73055685 5972
b593d6a9
AH
5973 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
5974 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
73055685 5975
1c6900d9
EZ
59762012-04-26 Eli Zaretskii <eliz@gnu.org>
5977
4c3fa1d9
EZ
5978 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
5979 display element, check also the underlying string or buffer
5980 character. (Bug#11341)
5981
1c6900d9
EZ
5982 * w32menu.c: Include w32heap.h.
5983 (add_menu_item): If the call to AppendMenuW (via
5984 unicode_append_menu) fails, disable Unicode menus only if we are
5985 running on Windows 9X/Me.
5986
42bf8205
AS
59872012-04-24 Andreas Schwab <schwab@linux-m68k.org>
5988
5989 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
5990 (xgetint): Add missing shift for LSB tags.
5991
b1bac16e
MR
59922012-04-24 Martin Rudalics <rudalics@gmx.at>
5993
5994 * keyboard.c (read_char): Don't wipe echo area for select window
5995 events: These might get delayed via `mouse-autoselect-window'
5996 (Bug#11304).
5997
d69621cc
JB
59982012-04-24 Juanma Barranquero <lekktu@gmail.com>
5999
6000 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
6001 manipulation of :loaded-from data.
6002
02fd101b
JB
60032012-04-23 Juanma Barranquero <lekktu@gmail.com>
6004
6005 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
6006 now a cons (bug#11311).
6007
888bec30
PE
60082012-04-23 Paul Eggert <eggert@cs.ucla.edu>
6009
89a438bd
PE
6010 Do not create empty overlays with the evaporate property (Bug#9642).
6011 * buffer.c (Fmove_overlay): Delete an evaporating overlay
6012 if it becomes empty after its bounds are adjusted to fit within
6013 its buffer. Without this fix, in a nonempty buffer (let ((o
6014 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
6015 yields an empty overlay that has the evaporate property, which is
6016 not supposed to happen.
6017
1068fe4d
PE
6018 Fix minor GTK3 problems found by static checking.
6019 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6020 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6021 (struct _EmacsFixedClass, emacs_fixed_get_type):
6022 Move decls here from emacsgtkfixed.h, since they needn't be public.
6023 (emacs_fixed_get_type): Now static.
6024 (emacs_fixed_class_init): Omit unused local.
6025 (emacs_fixed_child_type): Remove; unused.
6026 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
6027 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
6028 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
6029 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
6030 (EMACS_FIXED_GET_CLASS): Remove; unused.
6031 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
6032
888bec30
PE
6033 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
6034 Problem reported by Juanma Barranquero for Windows -Wunused-function.
6035
de85e130
PE
60362012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6037
d0baac98 6038 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
bd7239f5 6039 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
d0baac98
PE
6040 (__malloc_size_t, __malloc_ptrdiff_t):
6041 Remove. All uses removed, replaced by the definiens if needed,
6042 since we can assume C89 or better now.
6043 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
6044 (protect_malloc_state, align, get_contiguous_space)
6045 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
6046 (malloc_atfork_handler_child, malloc_enable_thread)
6047 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
6048 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
6049 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
6050 (special_realloc, _realloc_internal_nolock, _realloc_internal)
6051 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
6052 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
6053 Define using prototypes, not old style.
6054 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
6055 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
6056 (align): Don't assume that signed integer overflow wraps around.
6057 Omit unused local var.
6058 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
6059 (_free_internal_nolock, memalign, mallochook, reallochook):
6060 Omit no-longer-needed casts.
6061 (valloc): Use getpagesize, not __getpagesize.
6062 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
6063 (struct hdr): The 'magic' member is now size_t, not unsigned long.
6064
de85e130
PE
6065 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
6066
dcbf5805
MA
60672012-04-22 Michael Albinus <michael.albinus@gmx.de>
6068
6069 Move functions from C to Lisp. Make non-blocking method calls
6070 the default. Implement further D-Bus standard interfaces.
6071
6072 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
6073 (QCdbus_request_name_allow_replacement)
6074 (QCdbus_request_name_replace_existing)
6075 (QCdbus_request_name_do_not_queue)
6076 (QCdbus_request_name_reply_primary_owner)
6077 (QCdbus_request_name_reply_in_queue)
6078 (QCdbus_request_name_reply_exists)
6079 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
6080 (QCdbus_registered_serial, QCdbus_registered_method)
6081 (QCdbus_registered_signal): New Lisp objects.
6082 (XD_DEBUG_MESSAGE): Use sizeof.
6083 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
6084 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
6085 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
6086 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
6087 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
6088 (xd_signature, xd_append_arg): Allow float for integer types.
6089 (xd_get_connection_references): New function.
b593d6a9
AH
6090 (xd_get_connection_address): Rename from xd_initialize.
6091 Return cached address.
dcbf5805
MA
6092 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
6093 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
6094 level.
6095 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9a4b36f8 6096 Return number of refcounts.
dcbf5805
MA
6097 (Fdbus_get_unique_name): Make stronger parameter check.
6098 (Fdbus_message_internal): New defun.
6099 (Fdbus_call_method, Fdbus_call_method_asynchronously)
6100 (Fdbus_method_return_internal, Fdbus_method_error_internal)
6101 (Fdbus_send_signal, Fdbus_register_service)
6102 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
6103 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
6104 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
6105 (Vdbus_compiled_version, Vdbus_runtime_version)
6106 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
6107 (Vdbus_message_type_method_return, Vdbus_message_type_error)
6108 (Vdbus_message_type_signal): New defvars.
b593d6a9
AH
6109 (Vdbus_registered_buses, Vdbus_registered_objects_table):
6110 Adapt docstring.
dcbf5805 6111
52828e02
PE
61122012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6113
da05bc4c
PE
6114 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
6115 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
6116 Do not assume ptrdiff_t is the same width as 'int'.
6117
52828e02
PE
6118 * alloc.c: Handle unusual debugging option combinations.
6119 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
6120 since the two debugging options are incompatible.
6121 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
6122 is defined.
6123 (mem_init, mem_insert, mem_insert_fixup):
6124 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
6125 (NEED_MEM_INSERT): Remove; no longer needed.
6126
f01769f9
LL
61272012-04-22 Leo Liu <sdl.web@gmail.com>
6128
6129 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
6130
5790543d
PE
61312012-04-22 Paul Eggert <eggert@cs.ucla.edu>
6132
6133 * sysdep.c [__FreeBSD__]: Minor cleanups.
6134 (list_system_processes, system_process_attributes) [__FreeBSD__]:
6135 Use Emacs indenting style more consistently. Avoid some casts.
6136 Use 'double' consistently rather than mixing 'float' and 'double'.
6137
b91b7e4d
EW
61382012-04-21 Eduard Wiebe <usenet@pusto.de>
6139
b593d6a9
AH
6140 * sysdep.c (list_system_processes, system_process_attributes):
6141 Add implementation for FreeBSD (Bug#5243).
b91b7e4d 6142
6114eb15
AS
61432012-04-21 Andreas Schwab <schwab@linux-m68k.org>
6144
6145 * lisp.mk (lisp): Update.
6146
2f38dff7
PE
61472012-04-20 Paul Eggert <eggert@cs.ucla.edu>
6148
6149 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
6150 It is never used otherwise.
6151
4ae29f89
SM
61522012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
6153
6154 * print.c (print_preprocess): Only check print_depth if print-circle
6155 is nil.
6156 (print_object): Check for cycles even when print-circle is nil and
6157 print-gensym is t, but only check print_depth if print-circle is nil.
6158
f30d612a
CY
61592012-04-20 Chong Yidong <cyd@gnu.org>
6160
6161 * process.c (wait_reading_process_output): If EIO occurs on a pty,
6162 set the status to "failed" and ensure that sentinel is run.
6163
c07a4c0b 61642012-04-20 Glenn Morris <rgm@gnu.org>
016a35df
GM
6165
6166 * process.c (Fset_process_inherit_coding_system_flag)
6167 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
4373fd43 6168 (Fmake_network_process, Fmake_serial_process): Doc fix.
016a35df 6169
c07a4c0b 61702012-04-20 Eli Zaretskii <eliz@gnu.org>
20a68157
EZ
6171
6172 * xdisp.c (string_buffer_position_lim): Limit starting position to
6173 BEGV.
6174 (set_cursor_from_row): If called for a mode-line or header-line
6175 row, return zero immediately.
6176 (try_cursor_movement): If inside continuation line, don't back up
4ae29f89
SM
6177 farther than the first row after the header line, if any.
6178 Don't consider the header-line row as "partially visible", even if
20a68157
EZ
6179 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
6180
c07a4c0b 61812012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 6182
4ae29f89
SM
6183 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
6184 (bug#11238).
ad3a2b41 6185
c07a4c0b 61862012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
6c94c34f 61872012-04-18 Paul Eggert <eggert@cs.ucla.edu>
ae6e112d
PE
6188
6189 configure: new option --enable-gcc-warnings (Bug#11207)
6190 * Makefile.in (C_WARNINGS_SWITCH): Remove.
6191 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
6192 (ALL_CFLAGS): Use new macros rather than old.
6193 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
6194 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
6195 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
6196 -Wunused-result, -Wunused-variable. This should go away once
6197 the Emacs and Gnulib regex code is merged.
6198 (xmalloc, xrealloc): Now static.
6199
aba027e8
PE
62002012-04-17 Paul Eggert <eggert@cs.ucla.edu>
6201
6202 * dired.c (Fsystem_groups): Remove unused local.
6203
e5a36063
GM
62042012-04-17 Glenn Morris <rgm@gnu.org>
6205
6206 * dired.c (Fsystem_users): Doc fix.
6207
316411f0
DA
62082012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
6209
6210 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
6211 (syms_of_dired): Add them.
6212
9426aba4
PE
62132012-04-16 Paul Eggert <eggert@cs.ucla.edu>
6214
b62a57be
PE
6215 Fix minor alloc.c problems found by static checking.
6216 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
6217 New extern decls, to avoid calling undeclared functions.
6218 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
6219 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
6220 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
6221 (NEED_MEM_INSERT): New macro.
6222 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
4b5afbb0 6223 Remove one incorrect comment and fix another.
b62a57be 6224
3539f31f
PE
6225 Fix minor ralloc.c problems found by static checking.
6226 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6227 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
6228 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
6229 (r_alloc_sbrk): Now static.
6230
a041960a
PE
6231 Improve ralloc.c interface checking.
6232 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
6233 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
6234 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
6235 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
6236 [REL_ALLOC]: ... to here, to check interface.
6237 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
6238 Remove decls. This fixes an "It stinks!".
6239
9426aba4
PE
6240 * alloc.c (which_symbols): Fix alignment issue / type clash.
6241
d55c12ed
AS
62422012-04-15 Andreas Schwab <schwab@linux-m68k.org>
6243
6244 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
6245 (struct Lisp_Misc_Any): Likewise.
6246 (struct Lisp_Free): Likewise.
6247 * alloc.c (union aligned_Lisp_Symbol): Define.
6248 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
6249 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
6250 (union aligned_Lisp_Misc): Define.
6251 (MARKER_BLOCK_SIZE, struct marker_block): Use union
6252 aligned_Lisp_Misc instead of union Lisp_Misc.
4ae29f89 6253 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
d55c12ed 6254
b948ce8b
PE
62552012-04-14 Paul Eggert <eggert@cs.ucla.edu>
6256
6257 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
6258 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
6259 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
6260 * s/netbsd.h, s/sol2-6.h:
6261 Remove definition of GC_MARK_STACK, since the default now works.
6262 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
6263 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
6264 no longer the default.
6265 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
6266
35dc09a1 62672012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
ad3a2b41 6268
35dc09a1
GM
6269 * lread.c (lisp_file_lexically_bound_p):
6270 Fix hang at ";-*-\n" (bug#11238).
ad3a2b41 6271
35dc09a1
GM
62722012-04-14 Eli Zaretskii <eliz@gnu.org>
6273
6274 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
6275 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
6276
62772012-04-14 Jan Djärv <jan.h.d@swipnet.se>
6278
6279 * nsterm.m (constrainFrameRect): Always constrain when there is only
6280 one screen (Bug#10962).
6281
bcd86815
KB
62822012-04-13 Ken Brown <kbrown@cornell.edu>
6283
6284 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
6285
c25df26e
RT
62862012-04-13 Reuben Thomas <rrt@sc3d.org>
6287
6288 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
6289
0fc59f1e
DC
62902012-04-11 Daniel Colascione <dancol@dancol.org>
6291
6292 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
6293 against is gone. It's better to use vfork now so that when Cygwin
6294 gains a new, working vfork, we use it automatically (bug#10398).
6295
de8c03dc
SM
62962012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6297
6298 * window.c (save_window_save): Obey window-point-insertion-type.
6299
2f097256
GM
63002012-04-11 Glenn Morris <rgm@gnu.org>
6301
6302 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
6303
453b951e
SM
63042012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
6305
6306 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
6307
75f1671a 63082012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
6bbef4e5
JC
6309
6310 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
6311 (force_quit_count): New var.
6312 (handle_interrupt): Use it.
6313
2a8ce227
JB
63142012-04-10 Juanma Barranquero <lekktu@gmail.com>
6315
6316 * w32.c (w32_delayed_load): Record the full path of the library
6317 being loaded (bug#10424).
6318
935396c0
GM
63192012-04-09 Glenn Morris <rgm@gnu.org>
6320
05920a43
GM
6321 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
6322 not just in the obarray, before snarfing them. (Bug#11036)
6323
935396c0
GM
6324 * Makefile.in ($(leimdir)/leim-list.el):
6325 Pass EMACS rather than BUILT_EMACS.
6326
a18ecafa
TZ
63272012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
6328
6329 * process.c (make_process):
6330 * process.h: Add integer `gnutls_handshakes_tried' member to
6331 process struct.
6332
6bbef4e5
JC
6333 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
6334 Add convenience `GNUTLS_LOG2i' macro.
a18ecafa
TZ
6335
6336 * gnutls.c (gnutls_log_function2i): Convenience log function.
6337 (emacs_gnutls_read): Use new log functions,
6338 `gnutls_handshakes_tried' process member, and
6339 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
6340 attempts per process (connection).
6341
b4d3bc10
CY
63422012-04-09 Chong Yidong <cyd@gnu.org>
6343
6344 * eval.c (Fuser_variable_p, user_variable_p_eh)
6345 (lisp_indirect_variable): Functions deleted.
6346 (Fdefvar): Caller changed.
6347
6348 * callint.c (Finteractive, Fcall_interactively):
6349 * minibuf.c (Fread_variable): Callers changed.
6350
70f4d973
EZ
63512012-04-09 Eli Zaretskii <eliz@gnu.org>
6352
6353 * xdisp.c (set_cursor_from_row): If the display string appears in
6354 the buffer at position that is closer to point than the position
6355 after the display string, display the cursor on the first glyph of
6356 the display string. Fixes cursor display when a 'display' text
6357 property immediately follows invisible text. (Bug#11094)
6358
cb3c2e3e
PE
63592012-04-09 Paul Eggert <eggert@cs.ucla.edu>
6360
6361 composite.c: use 'double' consistently
6362 * composite.c (get_composition_id): Use 'double' consistently
6363 instead of converting 'float' to 'double' and vice versa; this is
6364 easier to understand and avoids a GCC warning.
6365
fd06db5d
GM
63662012-04-09 Glenn Morris <rgm@gnu.org>
6367
50fe702a
GM
6368 * Makefile.in: Generate leim-list with bootstrap-emacs, in
6369 preparation for dumping it with emacs. (Bug#4789)
6370 (leimdir): New variable.
6371 ($(leimdir)/leim-list.el): New rule.
6372 (emacs$(EXEEXT)): Depend on leim-list.el.
6373
fd06db5d
GM
6374 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
6375 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
6376 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
6377
55c131ee
AS
63782012-04-08 Andreas Schwab <schwab@linux-m68k.org>
6379
6380 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
6381 proper alignment.
6382
9209588f
JB
63832012-04-07 Juanma Barranquero <lekktu@gmail.com>
6384
6385 * xml.c (init_libxml2_functions) [WINDOWSNT]:
6386 Remove unused local variable.
6387
e3fb2efb
PE
63882012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6389
6390 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
6391 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
6392 (mark_memory): Mark Lisp_Objects only if pointers might hide in
6393 objects, as mark_maybe_pointer will catch them otherwise.
6394 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
6395 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
6396
b5385551
PE
63972012-04-07 Paul Eggert <eggert@cs.ucla.edu>
6398
6399 Fix typo that broke non-Windows builds.
6400 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
6401
9078ead6
EZ
64022012-04-07 Eli Zaretskii <eliz@gnu.org>
6403
6404 Support building on MS-Windows with libxml2.
6405
6406 * makefile.w32-in (OBJ2): Add xml.$(O).
6407 (GLOBAL_SOURCES): Add xml.c.
6408 ($(BLD)/xml.$(O)): New dependency list.
6409
6410 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
6411 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
6412 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
6413 [!WINDOWSNT]: New macros.
6414 (init_libxml2_functions, libxml2_loaded_p): New functions.
6415 (parse_region): Call fn_xmlCheckVersion instead of using the macro
6416 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
6417 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
6418 Calls xmlCleanupParser only if libxml2 was loaded (or statically
6419 linked in).
6bbef4e5
JC
6420 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
6421 Call init_libxml2_functions before calling libxml2 functions.
9078ead6
EZ
6422 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
6423
6424 * emacs.c: Don't include libxml/parser.h.
6425 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
6426 xmlCleanupParser directly.
6427
6428 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
6429
3811fdf3
EZ
64302012-04-07 Eli Zaretskii <eliz@gnu.org>
6431
6432 * indent.c (Fvertical_motion): If there is a display string at
6433 point, use it.vpos to compute how many lines to backtrack after
6434 move_it_to point. (Bug#11133)
6435
2f8e16b2
EZ
64362012-04-06 Eli Zaretskii <eliz@gnu.org>
6437
6438 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
6439 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
6440 about subtle differences between FETCH_CHAR* and STRING_CHAR*
6441 macros related to unification of CJK characters. For the details,
6442 see the discussion following the message here:
6443 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
6444
3d439cd1
CY
64452012-04-04 Chong Yidong <cyd@gnu.org>
6446
6447 * keyboard.c (Vdelayed_warnings_list): Doc fix.
6448
8bc53d00
EZ
64492012-04-01 Eli Zaretskii <eliz@gnu.org>
6450
6451 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
6452 instead of alloca. (Bug#11138)
6453
3b0512a3
AS
64542012-04-01 Andreas Schwab <schwab@linux-m68k.org>
6455
6456 * w32menu.c (is_simple_dialog): Properly check lisp types.
6457 (Bug#11141)
6458
8427ddd2
EZ
64592012-03-31 Eli Zaretskii <eliz@gnu.org>
6460
979022ef
EZ
6461 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
6462 position we get to after a call to move_it_to fails the
6463 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
6464 only if we wind up in a string from display property. (Bug#11063)
6465
a6b1c7cc
EZ
6466 * window.c (Fdelete_other_windows_internal): Invalidate the row
6467 and column information about mouse highlight, so that redisplay
6468 restores it after reallocating the glyph matrices. (Bug#7464)
6469
8427ddd2
EZ
6470 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
6471 string comes from a `display' text property, use the buffer
6472 position of that property as if we actually saw that position in
6473 the row's glyphs.
697ba24b
EZ
6474 (move_it_by_lines): Remove the assertion that
6475 "it->current_x == 0 && it->hpos == 0" which can be legitimately
6476 violated when there's a before-string at the beginning of a line.
6477 (Bug#11063)
8427ddd2 6478
65a0a738
EZ
64792012-03-30 Eli Zaretskii <eliz@gnu.org>
6480
6481 * xdisp.c (append_space_for_newline): If the default face was
6482 remapped, use the remapped face for the appended newline.
6483 (extend_face_to_end_of_line): Use the remapped default face for
6484 extending the face to the end of the line.
6485 (display_line): Call extend_face_to_end_of_line when the default
6486 face was remapped. (Bug#11068)
6487
581355cc
EZ
64882012-03-29 Eli Zaretskii <eliz@gnu.org>
6489
6490 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
6491
e8fc049f
SM
64922012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
6493
6494 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
6495
4fb9a543
GM
64962012-03-27 Glenn Morris <rgm@gnu.org>
6497
6498 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
6499 Doc fixes.
6500
679910f1
KH
65012012-03-26 Kenichi Handa <handa@m17n.org>
6502
6503 * dispextern.h (struct glyph): Fix previous change. Change the
6504 bit length of glyphless.ch to 25 (Bug#11082).
6505
90d49b7f
CY
65062012-03-26 Chong Yidong <cyd@gnu.org>
6507
6508 * keyboard.c (Vselection_inhibit_update_commands): New variable.
6509 (command_loop_1): Use it; inhibit selection update for
6510 handle-select-window too (Bug#8996).
6511
f514f6f0
FP
65122012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
6513
e8fc049f 6514 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
f514f6f0 6515
bf43fa51
KH
65162012-03-25 Kenichi Handa <handa@m17n.org>
6517
6518 * dispextern.h (struct glyph): Change the bit length of
6519 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
6520
8a0c01dd
EZ
65212012-03-24 Eli Zaretskii <eliz@gnu.org>
6522
6523 * s/ms-w32.h (tzname): Include time.h before redirecting to
6524 _tzname. Fixes the MSVC build. (Bug#9960)
6525
7d1c3a76
AS
65262012-03-24 Andreas Schwab <schwab@linux-m68k.org>
6527
8ed79523
AS
6528 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
6529 characters.
6530
7d1c3a76
AS
6531 * xterm.c (XTread_socket): Only modify handling_signal if
6532 !SYNC_INPUT. (Bug#11080)
6533
e99a9b8b
EZ
65342012-03-23 Eli Zaretskii <eliz@gnu.org>
6535
6536 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
6537 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
6538 when fetching a multibyte character consumes more bytes than
6539 CHAR_BYTES returns, due to unification of CJK characters in
6540 string_char. (Bug#11073)
6541
5063c0e1
TN
65422012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
6543
6544 * process.c (wait_reading_process_output): Handle pty disconnect
6545 by refraining from sending oneself a SIGCHLD (bug#10933).
6546
9f851fbd
CY
65472012-03-22 Chong Yidong <cyd@gnu.org>
6548
6549 * dispextern.h (struct it): New member string_from_prefix_prop_p.
6550
5063c0e1 6551 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9f851fbd
CY
6552 Mark string as coming from a prefix property.
6553 (handle_face_prop): Use default face for prefix strings (Bug#4281).
6554 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
6555
fb5b8aca
CY
65562012-03-21 Chong Yidong <cyd@gnu.org>
6557
6558 * xfaces.c (Vface_remapping_alist): Doc fix.
6559
62356a1b
EZ
65602012-03-20 Eli Zaretskii <eliz@gnu.org>
6561
6562 * w32proc.c (Fw32_set_console_codepage)
5063c0e1
TN
6563 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
6564 Doc fixes.
62356a1b 6565
025de85b
CY
65662012-03-20 Chong Yidong <cyd@gnu.org>
6567
6568 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
6569 to reflect default non-nil value of redisplay-dont-pause.
6570
4827f94e
KH
65712012-03-19 Kenichi Handa <handa@m17n.org>
6572
6573 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
6574 it fit in a valid range (Bug#11003).
6575
e50a24a2
EZ
65762012-03-18 Eli Zaretskii <eliz@gnu.org>
6577
6578 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
6579 that is not from display property, accept the row as a "cursor
6580 row" if one of the string's character has a non-nil `cursor'
6581 property. Fixes cursor positioning when there are newlines in
6582 overlay strings, e.g. in icomplete.el. (Bug#11035)
6583
9af5ed87
PE
65842012-03-12 Paul Eggert <eggert@cs.ucla.edu>
6585
6586 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
6587
d1f55f16
CY
65882012-03-12 Chong Yidong <cyd@gnu.org>
6589
6590 * eval.c (inhibit_lisp_code): Rename from
6591 inhibit_window_configuration_change_hook; move from window.c.
6592
6593 * xfns.c (unwind_create_frame_1, Fx_create_frame):
6594 * window.c (run_window_configuration_change_hook)
6595 (syms_of_window): Callers changed.
6596
66c5eebd
CY
65972012-03-11 Chong Yidong <cyd@gnu.org>
6598
413df973
CY
6599 * keymap.c (Fkey_description): Doc fix (Bug#9700).
6600
66c5eebd
CY
6601 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
6602
1de11f56
CY
66032012-03-10 Chong Yidong <cyd@gnu.org>
6604
6605 * frame.c (other_visible_frames): Don't assume the selected frame
6606 is visible (Bug#10955).
6607
cae07000
SM
66082012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
6609
6610 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
6611
89c94350
JD
66122012-03-08 Jan Djärv <jan.h.d@swipnet.se>
6613
6614 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
6615 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
6616 zero (Bug#10954).
6617
999dd333
GM
66182012-03-03 Glenn Morris <rgm@gnu.org>
6619
01a6dcc8 6620 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
999dd333 6621
de0100f2
EZ
66222012-03-02 Eli Zaretskii <eliz@gnu.org>
6623
6624 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
6625 position past the first glyph_row that ends at ZV. (Bug#10902)
b8456c5c
EZ
6626 (redisplay_window, next_element_from_string): Fix typos in
6627 comments.
3e441275
EZ
6628 (redisplay_window): Pass to move_it_vertically the margin in
6629 pixels, not in screen lines.
de0100f2 6630
96a72ee9
GM
66312012-03-02 Glenn Morris <rgm@gnu.org>
6632
6633 * buffer.c (buffer-list-update-hook): Doc fix.
6634
312508d7
EZ
66352012-02-29 Eli Zaretskii <eliz@gnu.org>
6636
6637 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
6638 push_it before setting up the iterator for the first overlay
6639 string, even if we have an empty string loaded.
6640 (next_overlay_string): If there's an empty string on the iterator
6641 stack, pop the stack. (Bug#10903)
6642
27f3c637
PE
66432012-02-25 Paul Eggert <eggert@cs.ucla.edu>
6644
6645 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
6646 Suggested by Stefan Monnier in
6647 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
6648 * alloc.c (widen_to_Lisp_Object): New static function.
6649 (mark_memory): Also mark Lisp_Objects by fetching pointer words
6650 and widening them to Lisp_Objects. This would work even if
6651 USE_LSB_TAG is defined and wide integers are used, which might
6652 happen in a future version of Emacs.
6653
3c9dfce6
CY
66542012-02-25 Chong Yidong <cyd@gnu.org>
6655
fa74b241
CY
6656 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
6657 Doc fix.
6658
3c9dfce6
CY
6659 * xselect.c (Fx_selection_exists_p): Doc fix.
6660 (x_clipboard_manager_save_all): Print an informative message
6661 before saving to clipboard manager.
6662
9486df08
CY
66632012-02-24 Chong Yidong <cyd@gnu.org>
6664
6665 * keyboard.c (process_special_events): Handle all X selection
6666 requests in kbd_buffer, not just the next one (Bug#8869).
6667
f01d3321
CY
66682012-02-23 Chong Yidong <cyd@gnu.org>
6669
6670 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
6671 call when setting menu-bar-lines and tool-bar-lines parameters.
6672 (unwind_create_frame_1): New helper function.
6673
6674 * window.c (inhibit_window_configuration_change_hook): New var.
6675 (run_window_configuration_change_hook): Obey it.
b2e4ca7d 6676 (syms_of_window): Initialize it.
f01d3321 6677
86b847b6
CY
66782012-02-22 Chong Yidong <cyd@gnu.org>
6679
6680 * xterm.c (x_draw_image_relief): Add missing type check for
6681 Vtool_bar_button_margin (Bug#10743).
6682
a59225b1
CY
66832012-02-21 Chong Yidong <cyd@gnu.org>
6684
6685 * fileio.c (Vfile_name_handler_alist): Doc fix.
6686
6687 * buffer.c (Fget_file_buffer): Protect against invalid file
6688 handler return value.
6689
310f5bd4
PE
66902012-02-20 Paul Eggert <eggert@cs.ucla.edu>
6691
cb3a28cc
PE
6692 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
6693 when computing $valmask.
6694
310f5bd4
PE
6695 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
6696 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
6697 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
6698 It's useless in that case, and it can cause problems on hosts
6699 that allocate halves of EMACS_INT values separately.
6700 Reported by Dan Horák. Diagnosed by Andreas Schwab in
6701 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
6702 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
6703 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
6704 it avoids undefined behavior on hosts where shifting right by more
6705 than the word width has undefined behavior.
6706
2375c96a
CY
67072012-02-19 Chong Yidong <cyd@gnu.org>
6708
6709 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
6710 (Funhandled_file_name_directory, Ffile_name_as_directory)
6711 (Fdirectory_file_name, Fexpand_file_name)
6712 (Fsubstitute_in_file_name): Protect against invalid file handler
6713 return values (Bug#10845).
6714
3eb49e71
EZ
67152012-02-18 Eli Zaretskii <eliz@gnu.org>
6716
6717 * .gdbinit (pitx): Fix incorrect references to fields of the
6718 iterator stack.
6719
7b926f3f
CY
67202012-02-17 Chong Yidong <cyd@gnu.org>
6721
6722 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
6723
11273115
PE
67242012-02-15 Paul Eggert <eggert@cs.ucla.edu>
6725
6726 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
6727 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
6728
c3a70e2b
CY
67292012-02-15 Chong Yidong <cyd@gnu.org>
6730
6731 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
6732 marked as special. Also, starting docstrings with * is obsolete.
6733
0ca43699
AS
67342012-02-13 Andreas Schwab <schwab@linux-m68k.org>
6735
6736 * gnutls.c (emacs_gnutls_write): Fix last change.
6737
2e8f3c56
LI
67382012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
6739
6740 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
6741 send_process.
6742
af70074f
SM
67432012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
6744
6745 * keymap.c (Fsingle_key_description): Handle char ranges.
6746
95986d52
CY
67472012-02-12 Chong Yidong <cyd@gnu.org>
6748
afd83bd1
CY
6749 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
6750 as that creates a dangerous corner case.
6751
95986d52
CY
6752 * window.c (Fdelete_window_internal): Invalidate the mouse
6753 highlight (Bug#9904).
6754
bd7da63e
GM
67552012-02-12 Glenn Morris <rgm@gnu.org>
6756
6757 * xselect.c (Fx_own_selection_internal)
6758 (Fx_get_selection_internal, Fx_disown_selection_internal)
6759 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
6760 * nsselect.m (Fx_own_selection_internal)
6761 (Fx_disown_selection_internal, Fx_selection_exists_p)
6762 (Fx_selection_owner_p, Fx_get_selection_internal):
6763 Sync docs and argument specs with the xselect.c versions.
6764
77abcbc2
LI
67652012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
6766
6767 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
6768
90b671e2
EZ
67692012-02-11 Eli Zaretskii <eliz@gnu.org>
6770
1c0ca0b7
EZ
6771 * w32select.c (Fx_selection_exists_p): Sync doc string and
6772 argument list with xselect.c. (Bug#10783)
6773
6774 * w16select.c (Fx_selection_exists_p): Sync doc string and
6775 argument list with xselect.c. (Bug#10783)
90b671e2 6776
49241268
GM
67772012-02-10 Glenn Morris <rgm@gnu.org>
6778
6779 * fns.c (Fsecure_hash): Doc fix.
6780
f998bbe7 67812012-02-09 Kenichi Handa <handa@m17n.org>
5c1ca13d
KH
6782
6783 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
6784
0992bd9c
CY
67852012-02-07 Chong Yidong <cyd@gnu.org>
6786
6787 * buffer.c (Fbuffer_local_variables)
6788 (buffer_lisp_local_variables): Handle unbound vars correctly;
6789 don't let Qunbound leak into Lisp.
6790
af008560
GM
67912012-02-07 Glenn Morris <rgm@gnu.org>
6792
dd605cc4
GM
6793 * image.c (Fimagemagick_types): Doc fix.
6794
af008560
GM
6795 * image.c (imagemagick-render-type): Change it from a lisp object
6796 to an integer. Move the doc here from the lisp manual.
6797 Treat all values not equal to 0 the same.
6798
1449fa1d
CY
67992012-02-06 Chong Yidong <cyd@gnu.org>
6800
6801 * doc.c (store_function_docstring): Avoid applying docstring of
6802 alias to base function (Bug#2603).
6803
3723ec07
AS
68042012-02-04 Andreas Schwab <schwab@linux-m68k.org>
6805
6806 * .gdbinit (pp1, pv1): Remove redundant defines.
6807 (pr): Use pp.
6808
79c1cc1e
CY
68092012-02-04 Chong Yidong <cyd@gnu.org>
6810
6811 * nsterm.m: Declare a global (Bug#10694).
6812
d7f29f8e
EZ
68132012-02-04 Eli Zaretskii <eliz@gnu.org>
6814
cae07000
SM
6815 * w32.c (get_emacs_configuration_options):
6816 Include --enable-checking, if specified, in the return value.
d7f29f8e 6817
3b95a6f9
MR
68182012-02-04 Martin Rudalics <rudalics@gmx.at>
6819
6820 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
6821 after rounding frame sizes. (Bug#9723)
6822
d6fa96a6
EZ
68232012-02-04 Eli Zaretskii <eliz@gnu.org>
6824
6825 * keyboard.c (adjust_point_for_property): Don't position point
6826 before BEGV. (Bug#10696)
6827
df0b2940
PE
68282012-02-03 Paul Eggert <eggert@cs.ucla.edu>
6829
6830 Handle overflow when computing char display width (Bug#9496).
6831 * character.c (char_width): Return EMACS_INT, not int.
6832 (char_width, c_string_width): Check for overflow when
6833 computing the width; this is possible now that individual
6834 characters can have unbounded width. Problem introduced
6835 by merge from Emacs 23 on 2012-01-19.
6836
6bee44d6
MA
68372012-02-02 Michael Albinus <michael.albinus@gmx.de>
6838
6839 * dbusbind.c (Fdbus_register_method): Mention the return value
6840 :ignore in the docstring.
6841
44f92739
GM
68422012-02-02 Glenn Morris <rgm@gnu.org>
6843
1b9f60cc
GM
6844 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
6845
44f92739
GM
6846 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
6847 Unconditionally set to t. (Bug#10673)
6848 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
6849 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
6850 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
6851
c5d3843c
KH
68522012-02-02 Kenichi Handa <handa@m17n.org>
6853
6854 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
6855 0, do not call append_composite_glyph.
6856
159462d4 68572012-02-02 Kenichi Handa <handa@m17n.org>
d2a51fd7
KH
6858
6859 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
6860 NULL (Bug#6988).
6861 (x_produce_glyphs): If the component of a composition is a null
6862 string, set it->pixel_width to 1 to avoid zero-width glyph.
6863
78cef877
EZ
68642012-02-01 Eli Zaretskii <eliz@gnu.org>
6865
6866 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
6867 first 2 arguments are identical. This makes inserting large
6868 output from a subprocess an order of magnitude faster on
6869 MS-Windows, where all sbrk'ed memory is always contiguous.
6870
97897668
GM
68712012-01-31 Glenn Morris <rgm@gnu.org>
6872
6873 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
c78c6e0b 6874 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
97897668
GM
6875 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
6876
31fd3586
GM
68772012-01-29 Glenn Morris <rgm@gnu.org>
6878
6879 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
6880
0e24a8b2
CY
68812012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
6882
6883 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
6884
cc0adcb0
CY
68852012-01-28 Chong Yidong <cyd@gnu.org>
6886
6887 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
6888
acc28cb9
CY
68892012-01-26 Chong Yidong <cyd@gnu.org>
6890
9c69cfb7
CY
6891 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
6892
acc28cb9
CY
6893 * search.c (Fsearch_forward, Fsearch_backward): Document negative
6894 repeat counts (Bug#10507).
6895
48da7392
GM
68962012-01-26 Glenn Morris <rgm@gnu.org>
6897
6898 * lread.c (syms_of_lread): Doc fix.
6899
14af5f7f
CY
69002012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
6901
6902 * coding.c (encode_designation_at_bol): Change return value to
6903 EMACS_INT.
6904
0b21c100
CY
69052012-01-25 Chong Yidong <cyd@gnu.org>
6906
6907 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
6908
3c2907f7
CY
69092012-01-21 Chong Yidong <cyd@gnu.org>
6910
6911 * floatfns.c (Fcopysign): Make the second argument non-optional,
6912 since nil is not allowed anyway.
6913
959ad23f
AS
69142012-01-21 Andreas Schwab <schwab@linux-m68k.org>
6915
6916 * process.c (read_process_output): Use p instead of XPROCESS (proc).
6917 (send_process): Likewise.
6918
34a02f46
MR
69192012-01-19 Martin Rudalics <rudalics@gmx.at>
6920
6921 * window.c (save_window_save, Fcurrent_window_configuration)
cae07000
SM
6922 (Vwindow_persistent_parameters): Do not use Qstate.
6923 Rewrite doc-strings.
34a02f46 6924
1259009a 69252012-01-19 Kenichi Handa <handa@m17n.org>
25ed9e61
KH
6926
6927 * character.c (char_width): New function.
70d4fdf6
GM
6928 (Fchar_width, c_string_width, lisp_string_width):
6929 Use char_width (Bug#9496).
25ed9e61 6930
6a6ee00d
MR
69312012-01-16 Martin Rudalics <rudalics@gmx.at>
6932
6933 * window.c (Vwindow_persistent_parameters): New variable.
6934 (Fset_window_configuration, save_window_save): Handle persistent
6935 window parameters.
6936
c85efaf7
EZ
69372012-01-14 Eli Zaretskii <eliz@gnu.org>
6938
6939 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
6940 thrashing the stack of the thread. (Bug#9087)
6941
5944709e
PE
69422012-01-12 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
6945
e71f5d99
EZ
69462012-01-11 Eli Zaretskii <eliz@gnu.org>
6947
6948 * xdisp.c (rows_from_pos_range): Handle the case where the
6949 highlight ends on a newline. (Bug#10464)
6950 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
6951 he end column for display of highlight that ends on a newline
6952 before a R2L line.
6953
ce316182
GM
69542012-01-11 Glenn Morris <rgm@gnu.org>
6955
6956 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
6957 from load-path also when installation-directory is nil. (Bug#10208)
6958
5b43da69
GM
69592012-01-10 Glenn Morris <rgm@gnu.org>
6960
74cc8ff9
GM
6961 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
6962
7d8d6e4e
GM
6963 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
6964 Update template values to be closer to their typical values these days.
5b43da69 6965
a0db8d43
EZ
69662012-01-09 Eli Zaretskii <eliz@gnu.org>
6967
6968 * xdisp.c (rows_from_pos_range): Accept additional argument
6969 DISP_STRING, and accept any glyph in a row whose object is that
6970 string as eligible for mouse highlight. Fixes mouse highlight of
6971 display strings from overlays. (Bug#10464)
6972
9a0115ab 69732012-01-07 Paul Eggert <eggert@cs.ucla.edu>
09450bae 6974
b9110d6a 6975 emacs: fix an auto-save permissions race condition (Bug#10400)
09450bae
PE
6976 * fileio.c (auto_saving_dir_umask): New static var.
6977 (Fmake_directory_internal): Use it.
6978 (do_auto_save_make_dir): Set it, instead of invoking chmod after
6979 creating the directory. The old code temporarily assigns
6980 too-generous permissions to the directory.
6981 (do_auto_save_eh): Clear it.
b9110d6a 6982 (Fdo_auto_save): Catch all errors, not just file errors, so
09450bae
PE
6983 that the var is always cleared.
6984
6c1bd3f3
EZ
69852012-01-07 Eli Zaretskii <eliz@gnu.org>
6986
6987 * search.c (scan_buffer): Pass character positions to
6988 know_region_cache, not byte positions. (Bug#6540)
6989
069d2b50
L
69902012-01-07 LynX <_LynX@bk.ru> (tiny change)
6991
6992 * w32.c (sys_rename): Report EXDEV when rename of a directory
6993 fails because the target is on another logical disk. (Bug#10284)
6994
75bf0d33
DB
69952012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
6996
6997 * xterm.c (x_embed_request_focus): New function.
6998
6999 * xterm.h: Add prototype.
7000
7001 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
7002
1c6e5a32
GM
70032012-01-05 Glenn Morris <rgm@gnu.org>
7004
7005 * emacs.c (emacs_copyright): Update short copyright year to 2012.
7006
651e947e
EZ
70072012-01-01 Eli Zaretskii <eliz@gnu.org>
7008
7009 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
7010 Load gnutls_transport_set_lowat only if GnuTLS version is below
7011 2.11.1.
7012 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
7013 GnuTLS versions below 2.11.1.
7014
3778cdd8
AL
70152011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
7016
7017 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
7018 to the doc string advising against its use for altering the way
7019 windows are scrolled.
7020
0e5317f7
KH
70212011-12-28 Kenichi Handa <handa@m17n.org>
7022
7023 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
7024 coding-system ASCII compatible only when it does not produce BOM
7025 on encoding (Bug#10383).
7026
93d5ca1f
JD
70272011-12-26 Jan Djärv <jan.h.d@swipnet.se>
7028
7029 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
7030 can scroll.
7031 (create_and_show_popup_menu): Always use menu_position_func for
7032 Gtk3 (Bug#10361).
7033
ca22b785
AS
70342011-12-24 Andreas Schwab <schwab@linux-m68k.org>
7035
7036 * callint.c (Fcall_interactively): Don't truncate prompt string.
7037
d048e1e6
EZ
70382011-12-23 Eli Zaretskii <eliz@gnu.org>
7039
7040 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
7041 property that ends at ZV, so that the bidi iteration could be
3ba1a2ad 7042 resumed from there (after widening). (Bug#10360)
d048e1e6 7043
5ccaba1f
JD
70442011-12-22 Jan Djärv <jan.h.d@swipnet.se>
7045
7046 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
7047
204ee57f
JD
70482011-12-21 Jan Djärv <jan.h.d@swipnet.se>
7049
b81d40f0
JB
7050 * nsterm.m (x_free_frame_resources):
7051 Release f->output_data.ns->miniimage.
204ee57f
JD
7052 (ns_index_color): Fix indentation. Do not retain
7053 color_table->colors[i].
7054
7055 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
7056 before returning.
7057
7058 * nsfns.m (x_set_background_color): Assign return value from
7059 ns_index_color to face-background instead of NSColor*.
7060 (ns_implicitly_set_icon_type): Fix indentation.
7061 Change assignment in for loop to comparison.
7062
7063 * emacs.c (ns_pool): New variable.
7064 (main): Assign ns_pool.
7065 (Fkill_emacs): Call ns_release_autorelease_pool.
7066
7067 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
7068 autorelease fdesc, release fdAttrs and tdict.
7069 (ns_get_covering_families): Release charset.
7070 (ns_findfonts): Release NSFontDescriptor created with new.
7071 (ns_uni_to_glyphs): Fix indentation.
7072 (setString): Release attrStr before assigning new value.
7073
c803b2b7
JD
70742011-12-18 Jan Djärv <jan.h.d@swipnet.se>
7075
678f4426
JD
7076 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
7077 and NS_IMPL_COCOA.
7078 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
7079 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
7080
cd394be1 70812011-12-18 David Reitter <reitter@cmu.edu>
678f4426 7082
5fecd5fc
JD
7083 * nsterm.m (ns_term_init): Subscribe for notifications
7084 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
7085 to method trackingNotification in EmacsMenu.
7086
7087 * nsmenu.m (trackingMenu): New variable.
3771cb17 7088 (trackingNotification): New method (from Aquamacs).
5fecd5fc 7089 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
3771cb17 7090 from Aquamacs (Bug#7030).
678f4426
JD
7091
70922011-12-18 Jan Djärv <jan.h.d@swipnet.se>
5fecd5fc 7093
c803b2b7
JD
7094 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
7095 (symbol_to_nsstring): Fix indentation.
7096 (ns_symbol_to_pb): New function.
cae07000
SM
7097 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
7098 (Fns_rotate_cut_buffers_internal): Remove.
7099 (Fns_store_selection_internal): Rename from
c803b2b7
JD
7100 Fns_store_cut_buffer_internal.
7101 (ns_get_foreign_selection, Fx_own_selection_internal)
7102 (Fx_disown_selection_internal, Fx_selection_exists_p)
b81d40f0
JB
7103 (Fns_get_selection_internal, Fns_store_selection_internal):
7104 Use ns_symbol_to_pb and check if return value is nil.
7105 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
7106 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
c803b2b7
JD
7107 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
7108 renamed to Sns_store_selection_internal.
7109 (ns_handle_selection_request): Move code to Fx_own_selection_internal
7110 and remove this function.
7111 (ns_handle_selection_clear): Remove, never used.
7112 (Fx_own_selection_internal): Move code from ns_handle_selection_request
7113 here.
7114
e1b01a3a
KB
71152011-12-17 Ken Brown <kbrown@cornell.edu>
7116
7117 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
7118 GID is unknown (Bug#10257).
7119
2adb6e85
PE
71202011-12-17 Paul Eggert <eggert@cs.ucla.edu>
7121
7122 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
7123 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
7124 which caused a build failure on GNU/Linux IA-64. This problem was
7125 introduced by my 2011-10-07 patch.
7126
d1d7b339
JL
71272011-12-15 Juri Linkov <juri@jurta.org>
7128
7129 * image.c (imagemagick_error): New function. (Bug#10112)
7130 (imagemagick_load_image): Comment out `MagickSetResolution' call.
7131 Use `imagemagick_error' where ImageMagick functions return
7132 `MagickFalse'.
7133 (Fimagemagick_types): Add `Fnreverse' to return the list in the
7134 proper order.
7135
100d5755
KH
71362011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7137
7138 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
7139 fill background (Bug#8992).
7140
454592a6
MR
71412011-12-13 Martin Rudalics <rudalics@gmx.at>
7142
7143 * window.c (Vwindow_combination_resize)
7144 (Vwindow_combination_limit): Use t instead of non-nil in
7145 doc-strings.
61d4b438
MR
7146 (Vrecenter_redisplay): Add first sentence of doc-string on
7147 separate line.
53524d93 7148 (Frecenter): Fix doc-string typo.
454592a6 7149
3633e3aa
KH
71502011-12-11 Kenichi Handa <handa@m17n.org>
7151
7152 * coding.c (Funencodable_char_position): Pay attention to the
7153 buffer text relocation (Bug#9389).
7154
7b9d523a 71552011-12-10 Jan Djärv <jan.h.d@swipnet.se>
61ccba97 7156
7b9d523a
JD
7157 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
7158 gtk_init (Bug#10100).
7159
b73189c6
EZ
71602011-12-10 Eli Zaretskii <eliz@gnu.org>
7161
7162 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
7163 IT->string is nil. (Bug#10263)
7164
f7dfe5d6
JD
71652011-12-10 Jan Djärv <jan.h.d@swipnet.se>
7166
83faebb4
JD
7167 * nsterm.h (x_free_frame_resources): Declare.
7168
f7dfe5d6
JD
7169 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
7170 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
7171
7172 * nsterm.h (ns_get_defaults_value): Declare.
7173
7174 * nsterm.m (ns_default): Call ns_get_defaults_value.
7175
7cd4e72c
EZ
71762011-12-09 Eli Zaretskii <eliz@gnu.org>
7177
7178 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
7179 (Bug#10170)
7180
b34d7317
YM
71812011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7182
7183 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
7184 that where the value of an _OBJC_* symbol points to is in the .bss
7185 section (Bug#10240).
7186
76470ad1
KH
71872011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7188
7189 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
2fac8180 7190 after the loop to call ccl_driver at least once (Bug#8619).
76470ad1 7191
745fff94
KH
71922011-12-08 Kenichi Handa <handa@m17n.org>
7193
7194 * ftfont.c (get_adstyle_property): Fix previous change
7195 (Bug#10233).
7196
6e44397c
JB
71972011-12-07 Juanma Barranquero <lekktu@gmail.com>
7198
7199 * w32.c (init_environment): If no_site_lisp, remove site-lisp
7200 dirs from the default value of EMACSLOADPATH (bug#10208).
7201
7efa6272
GM
72022011-12-07 Glenn Morris <rgm@gnu.org>
7203
7204 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
7205 installation and source directories as well. (Bug#10208)
7206
f6fc4d87
CY
72072011-12-06 Chong Yidong <cyd@gnu.org>
7208
7209 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
7210
2bf26180
GM
72112011-12-06 Glenn Morris <rgm@gnu.org>
7212
7213 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
7214 as an error, not just -1. (Bug#10217)
7215
3a6ad4f0
CY
72162011-12-05 Chong Yidong <cyd@gnu.org>
7217
7218 * keyboard.c (process_special_events): New function.
7219 (swallow_events, Finput_pending_p): Use it (Bug#10195).
7220
75a3b399
PE
72212011-12-05 Paul Eggert <eggert@cs.ucla.edu>
7222
7223 * coding.c (encode_designation_at_bol): Don't use uninitialized
7224 local variable (Bug#9318).
7225
c3c9e25e
KH
72262011-12-05 Kenichi Handa <handa@m17n.org>
7227
7228 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
7229 return Qnil (Bug#8046, Bug#10193).
7230
5eb05ea3
KH
72312011-12-05 Kenichi Handa <handa@m17n.org>
7232
7233 * coding.c (encode_designation_at_bol): New args charbuf_end and
7234 dst. Return the number of produced bytes. Callers changed.
a79703f5
KH
7235 (coding_set_source): Return how many bytes coding->source was
7236 relocated.
7237 (coding_set_destination): Return how many bytes
7238 coding->destination was relocated.
7239 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
cae07000 7240 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
5eb05ea3
KH
7241
72422011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
7243
7244 * coding.c (CODING_CHAR_CHARSET_P): New macro.
7245 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
7246 macro (Bug#9318).
7247
72482011-12-05 Andreas Schwab <schwab@linux-m68k.org>
7249
7250 The following changes are to fix Bug#9318.
7251
a79703f5 7252 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
5eb05ea3
KH
7253 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
7254 (encode_coding_iso_2022, encode_coding_sjis)
a79703f5 7255 (encode_coding_big5, encode_coding_charset): Use the above macros.
5eb05ea3 7256
7dbda6df
JB
72572011-12-05 Juanma Barranquero <lekktu@gmail.com>
7258
7259 * lisp.h (process_quit_flag): Fix external declaration.
7260
6d5eb5b0
SM
72612011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
7262
7263 Don't macro-inline non-performance-critical code.
7264 * eval.c (process_quit_flag): New function.
7265 * lisp.h (QUIT): Use it.
7266
a0c3fad0
JD
72672011-12-04 Jan Djärv <jan.h.d@swipnet.se>
7268
7269 * nsfns.m (get_geometry_from_preferences): New function.
7270 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
7271
6c07aac2
AS
72722011-12-04 Andreas Schwab <schwab@linux-m68k.org>
7273
7274 * emacs.c (Qkill_emacs): Define.
7275 (syms_of_emacs): Initialize it.
7276 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
7277 Qquit_flag to `kill-emacs' instead.
6d5eb5b0
SM
7278 (quit_throw_to_read_char): Add parameter `from_signal'.
7279 All callers changed. Call Fkill_emacs if requested and safe.
6c07aac2
AS
7280 * lisp.h (QUIT): Call Fkill_emacs if requested.
7281
c052ead4
JD
72822011-12-03 Jan Djärv <jan.h.d@swipnet.se>
7283
7284 * widget.c (update_wm_hints): Return if wmshell is null.
7285 (widget_update_wm_size_hints): New function.
7286
7287 * widget.h (widget_update_wm_size_hints): Declare.
7288
7289 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
7290 widget_update_wm_size_hints (Bug#10104).
7291
9e49252b
EZ
72922011-12-03 Eli Zaretskii <eliz@gnu.org>
7293
7294 * xdisp.c (handle_invisible_prop): If the invisible text ends just
7295 before a newline, prepare the bidi iterator for consuming the
7296 newline, and keep the current paragraph direction. (Bug#10183)
e9a49426 7297 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
9e49252b 7298
02b16839
JL
72992011-12-02 Juri Linkov <juri@jurta.org>
7300
7301 * search.c (Fword_search_regexp): New Lisp function created from
7302 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
7303 (Fword_search_backward, Fword_search_forward)
7304 (Fword_search_backward_lax, Fword_search_forward_lax):
7305 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
7306 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
7307
0068070e
SM
73082011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
7309
7310 * fileio.c (Finsert_file_contents): Move after-change-function call
7311 to before the "handled:" label, since all "goto handled" appear in
7312 cases where the *-change-functions have already been properly called
7313 (bug#10117).
7314
3360a3fc
AS
73152011-12-01 Andreas Schwab <schwab@linux-m68k.org>
7316
7317 * keyboard.c (interrupt_signal): Don't call kill-emacs when
7318 waiting for input. (Bug#10169)
7319
73d6c093
EZ
73202011-11-30 Eli Zaretskii <eliz@gnu.org>
7321
7322 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
7323 verifies glyph row's hash code--we have just reallocated the
7324 glyphs, so their contents can be complete garbage. (Bug#10164)
7325
febe6bea
JB
73262011-11-30 Juanma Barranquero <lekktu@gmail.com>
7327
7328 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
7329
801a4313
EZ
73302011-11-30 Eli Zaretskii <eliz@gnu.org>
7331
7332 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
7333 attributes are tested _before_ calling verify_row_hash, to protect
7334 against GCC re-ordering of the tests. (Bug#10164)
7335
2b56b87e
JD
73362011-11-29 Jan Djärv <jan.h.d@swipnet.se>
7337
7338 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
7339
7340 * xterm.c (handle_one_xevent): Only set async_visible and friends
7341 if net_wm_state_hidden_seen is non-zero (Bug#10002)
7dbda6df 7342 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
2b56b87e
JD
7343 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
7344
dbf31225
PE
73452011-11-28 Paul Eggert <eggert@cs.ucla.edu>
7346
7347 Remove GCPRO-related macros that exist only to avoid shadowing locals.
7348 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
7349 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
7350 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7351 All uses changed to use GCPRO1 etc.
7352 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
7353 Revert to old implementation (i.e., before 2011-03-11).
7354
1305621b
YM
73552011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7356
7357 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
7358 of scroll runs so as to avoid assigning disabled bogus rows and
7359 unnecessary graphics copy operations.
7360
8c9afb46
EZ
73612011-11-27 Eli Zaretskii <eliz@gnu.org>
7362
7363 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
7364 (snprintf) [_MSC_VER]: Redirect to _snprintf.
7365 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
7366 (malloc, free, realloc, calloc): Redirect to e_* only when
7367 compiling Emacs.
7368
7369 * lisp.h (GCTYPEBITS): Move before first use.
7370 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
7371 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
7372 this macro definition.
7373
7374 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
7375 _MSC_VER.
7376
54e9e3bf
JD
73772011-11-27 Jan Djärv <jan.h.d@swipnet.se>
7378
6d5eb5b0
SM
7379 * gtkutil.c (xg_create_frame_widgets):
7380 Call gtk_window_set_has_resize_grip (FALSE) if that function is
54e9e3bf
JD
7381 present with Gtk+ 2.0.
7382
83aca1cb
PE
73832011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7384
7385 * fileio.c (Finsert_file_contents): Undo previous change; see
7386 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
7387
5b76caa4
PE
73882011-11-26 Paul Eggert <eggert@cs.ucla.edu>
7389
7390 Rename locals to avoid shadowing.
7391 * fileio.c (Finsert_file_contents):
7392 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
7393 * process.c (wait_reading_process_output):
7394 Rename inner 'proc' to 'p' to avoid shadowing.
7395 Indent for consistency with usual Emacs style.
7396
8c535114
EZ
73972011-11-25 Eli Zaretskii <eliz@gnu.org>
7398
7399 * xdisp.c (redisplay_window): If cursor row is not fully visible
7400 after recentering, and scroll-conservatively is set to a large
7401 number, scroll window by a few more lines to make the cursor fully
7402 visible and out of scroll-margin. (Bug#10105)
91b4a718
EZ
7403 (start_display): Don't move to the next line if the display should
7404 start at a newline that is part of a display vector or an overlay
7405 string. (Bug#10119)
8c535114 7406
fa4fdb5c
JL
74072011-11-24 Juri Linkov <juri@jurta.org>
7408
7409 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
7410 after the `MagickPingImage' call. (Bug#10112)
7411
90ec88df
CY
74122011-11-23 Chong Yidong <cyd@gnu.org>
7413
7414 * window.c (Fcoordinates_in_window_p): Accept only live windows.
7415
56e2e794
MR
74162011-11-23 Martin Rudalics <rudalics@gmx.at>
7417
7418 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
7419 making another buffer current. (Bug#10114)
7420
b6e64c41
GM
74212011-11-23 Glenn Morris <rgm@gnu.org>
7422
7423 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
7424
6b21de18
CY
74252011-11-23 Chong Yidong <cyd@gnu.org>
7426
7427 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
7428 using it (Bug#5984).
7429
b12cd789
EZ
74302011-11-22 Eli Zaretskii <eliz@gnu.org>
7431
7432 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
7433 and header-lines, as they don't have one computed for them.
7434 (Bug#10098)
7435
7436 * .gdbinit (prow): Make displayed values more self-explaining.
7437 Add row's hash code.
7438
261b6fd4
LMI
74392011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
7440
7441 * process.c (wait_reading_process_output): Fix asynchrounous
7442 GnuTLS socket handling on some versions of the GnuTLS library.
16c1ad08 7443 (wait_reading_process_output): Add comment and URL.
261b6fd4 7444
e7cfd277
JD
74452011-11-21 Jan Djärv <jan.h.d@swipnet.se>
7446
7447 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
7448
a9b9b7f5
CY
74492011-11-21 Chong Yidong <cyd@gnu.org>
7450
7451 * window.c (Fnext_window, Fprevious_window): Doc fix.
7452
b0d15b4f
SM
74532011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7454
7455 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
7456
fe7a3057
JB
74572011-11-20 Juanma Barranquero <lekktu@gmail.com>
7458
7459 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
7460
d2999b1a
MR
74612011-11-20 Martin Rudalics <rudalics@gmx.at>
7462
7463 * window.c (Fset_window_combination_limit): Rename argument
7464 STATUS to LIMIT.
7465 (Vwindow_combination_limit): Remove "status" from doc-string.
7466
d5ff9cd0
AS
74672011-11-20 Andreas Schwab <schwab@linux-m68k.org>
7468
7469 * m/ibms390.h: Remove.
7470 * m/ibms390x.h: Don't include "ibms390.h".
7471
a5bb9bd3
SM
74722011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
7473
7474 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
7475 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
7476
cd1181db
JB
74772011-11-20 Juanma Barranquero <lekktu@gmail.com>
7478
7479 * casetab.c (Fset_case_table):
7480 * charset.c (Fcharset_after): Fix typos.
7481
615a3b8d 74822011-11-20 Paul Eggert <eggert@cs.ucla.edu>
6a0bf43d 7483
17e845af
PE
7484 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
7485 Otherwise, valgrind does not work on some platforms.
7486 Problem reported by Andreas Schwab in
6a0bf43d
PE
7487 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
7488 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
7489 is set, removing the need for VIRT_ADDRESS_VARIES.
7490 (PURE_P): Use a more-efficient implementation that needs just one
7491 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
7492 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
7493 to 4 (xorl, subq, cmpq, setbe).
7494 * alloc.c (pure): Always extern now, since that's the
7495 VIRT_ADDR_VARIES behavior.
7496 (PURE_POINTER_P): Use a single comparison, not two, for
7497 consistency with the new puresize.h.
7498 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
7499 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
7500 Remove VIRT_ADDR_VARIES no longer needed.
7501
f8fe6f96
EZ
75022011-11-19 Eli Zaretskii <eliz@gnu.org>
7503
7504 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
7505 (erase_phys_cursor, update_window_cursor, show_mouse_face)
7506 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
7507 behave as if the cursor position were at the window margin.
7508
7509 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
7510 and the cursor position is out of bounds, behave as if the cursor
7511 position were at the window margin. (Bug#10075)
7512
df05a53c
CY
75132011-11-18 Chong Yidong <cyd@gnu.org>
7514
7515 * window.c (Fwindow_combination_limit): Make first argument
7516 non-optional, since it is meaningless for live windows like the
7517 selected window.
61ccba97 7518
2071918e
DA
75192011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
7520
7521 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
7522
b50a28de
SM
75232011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
7524
7525 * intervals.c: Fix grafting over the whole buffer (bug#10071).
7526 (graft_intervals_into_buffer): Simplify.
7527
015137db
EZ
75282011-11-18 Eli Zaretskii <eliz@gnu.org>
7529
7530 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
7531 hash values of the two rows.
7532 (copy_row_except_pointers): Preserve the used[] arrays and the
7533 hash values of the two rows. (Bug#10035)
68c95424 7534 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
015137db
EZ
7535
7536 * xdisp.c (row_hash): New function, body extracted from
7537 compute_line_metrics.
7538 (compute_line_metrics): Call row_hash, instead of computing the
7539 hash code inline.
7540
7541 * dispnew.c (verify_row_hash): Call row_hash for computing the
7542 hash code of a row, instead of duplicating code from xdisp.c.
7543
7544 * dispextern.h (row_hash): Add prototype.
7545
a2addb04
TH
75462011-11-18 Tassilo Horn <tassilo@member.fsf.org>
7547
7548 * frame.c (delete_frame): Don't delete the terminal when the last
7549 X frame is closed if emacs is built with GTK toolkit.
7550
df85d315
JB
75512011-11-17 Juanma Barranquero <lekktu@gmail.com>
7552
7553 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
7554
a0c2d0ae
MR
75552011-11-17 Martin Rudalics <rudalics@gmx.at>
7556
7557 * window.c (Vwindow_splits): Rename to
7558 Vwindow_combination_resize. Suggested by Juri Linkov.
7559 (Fsplit_window_internal): Use Vwindow_combination_resize instead
7560 of Vwindow_splits.
7561
58179cce
JB
75622011-11-16 Juanma Barranquero <lekktu@gmail.com>
7563
7877f373
JB
7564 * nsfns.m (Fns_font_name):
7565 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
58179cce 7566
b6f67890
MR
75672011-11-16 Martin Rudalics <rudalics@gmx.at>
7568
7569 * window.h (window): Rename slot "nest" to "combination_limit".
7570 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
7571 (Fset_window_nest): Rename to Fset_window_combination_limit.
7572 (Vwindow_nest): Rename to Vwindow_combination_limit.
7573 (recombine_windows, make_parent_window, make_window)
7574 (Fsplit_window_internal, saved_window)
7575 (Fset_window_configuration, save_window_save): Rename all
7576 occurrences of window_nest to window_combination_limit.
7577
c7015153
JB
75782011-11-15 Juanma Barranquero <lekktu@gmail.com>
7579
7580 * image.c (imagemagick_load_image): Fix typo.
7581
322ad6ec
EZ
75822011-11-14 Eli Zaretskii <eliz@gnu.org>
7583
7584 * xdisp.c (display_line): Move the call to
7585 highlight_trailing_whitespace before the call to
7586 compute_line_metrics, since the latter needs to see the final
6d5eb5b0
SM
7587 faces of all the glyphs to compute ROW's hash value.
7588 Fixes assertion violations in row_equal_p. (Bug#10035)
322ad6ec 7589
f067b8ec
JB
75902011-11-14 Juanma Barranquero <lekktu@gmail.com>
7591
7592 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
7593 just return (bug#10044).
7594
1e5b2111
EZ
75952011-11-12 Eli Zaretskii <eliz@gnu.org>
7596
7ef3cbd5
EZ
7597 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
7598 with user-defined heap size. Bump the default size of the temacs
7599 heap to 27MB, to avoid memory warning when running temacs.
7600 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
7601
1e5b2111
EZ
7602 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
7603 current_matrix and desired_matrix. (Bug#9990)
7a7270dd
EZ
7604 (verify_row_hash) [XASSERTS]: New function.
7605 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
7606 that the hash value of glyph rows is correct.
1e5b2111 7607
89d61221
MR
76082011-11-12 Martin Rudalics <rudalics@gmx.at>
7609
7610 * window.h (window): Remove splits slot.
7611 * window.c (Fwindow_splits, Fset_window_splits): Remove.
7612 (Fdelete_other_windows_internal, make_parent_window)
7613 (make_window, Fsplit_window_internal, Fdelete_window_internal)
7614 (Fset_window_configuration, save_window_save): Don't deal with
7615 split status of windows.
7616 (saved_window): Remove splits slot.
7617 (Vwindow_splits): Rewrite doc-string.
7618
97f18cc8
JD
76192011-11-11 Jan Djärv <jan.h.d@swipnet.se>
7620
7621 * xfns.c (unwind_create_frame):
7622 * nsfns.m (unwind_create_frame):
7623 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
7624 Vframe_list (Bug#9999).
7625
22a648b4
DA
76262011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
7627
0b381c7e 7628 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
22a648b4 7629
659afede
KH
76302011-11-11 Kenichi Handa <handa@m17n.org>
7631
7632 * callproc.c (Fcall_process): Set the member dst_multibyte of
7633 process_coding.
7634
9ac0394b
KH
76352011-11-11 Johan Bockgård <bojohan@gnu.org>
7636
7637 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
7638 avoid a crash (bug#9496).
7639
2fbdc249
CY
76402011-11-09 Chong Yidong <cyd@gnu.org>
7641
7642 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
7643 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
7644
ac6b1f81
PE
76452011-11-08 Paul Eggert <eggert@cs.ucla.edu>
7646
7647 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
7648
09db192c
PE
76492011-11-08 Paul Eggert <eggert@cs.ucla.edu>
7650
7651 Avoid some portability problems by eschewing 'extern inline' functions.
7652 The trivial performance wins aren't worth the portability hassles; see
7653 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
7654 et seq.
7655 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
7656 (window_box_width, window_box_left, window_box_left_offset)
7657 (window_box_right, window_box_right_offset): Undo previous change,
7658 by removing the "extern"s.
7659 * intervals.c (adjust_intervals_for_insertion)
7660 (adjust_intervals_for_deletion): Undo previous change,
7661 making these static again.
7662 (offset_intervals, temp_set_point_both, temp_set_point)
7663 (copy_intervals_to_string): No longer inline.
7664 * xdisp.c (window_text_bottom_y, window_box_width)
7665 (window_box_height, window_box_left_offset)
7666 (window_box_right_offset, window_box_left, window_box_right)
7667 (window_box): No longer inline.
7668
105216ed
CY
76692011-11-08 Chong Yidong <cyd@gnu.org>
7670
7671 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
6d5eb5b0
SM
7672 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
7673 Signal an error if not a live window.
105216ed
CY
7674 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
7675 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
7676
ae9e237f
JB
76772011-11-07 Juanma Barranquero <lekktu@gmail.com>
7678
7679 * lisp.h (syms_of_abbrev): Remove declaration.
7680 Reported by CHENG Gao <chenggao@royau.me>.
7681
c7aa8333
EZ
76822011-11-07 Eli Zaretskii <eliz@gnu.org>
7683
7684 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
7685 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
7686 of temacs in GUI mode.
7687
be7f5545
MR
76882011-11-07 Martin Rudalics <rudalics@gmx.at>
7689
7690 * window.h: Declare delete_all_child_windows instead of
7691 delete_all_subwindows.
7692 * window.c (Fwindow_nest, Fset_window_nest)
7693 (Fset_window_new_total, Fset_window_new_normal)
7694 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
7695 (delete_all_subwindows): Rename to delete_all_child_windows.
7696 (Fdelete_other_windows_internal, Fset_window_configuration):
7697 Call delete_all_child_windows instead of delete_all_subwindows.
7698 * frame.c (delete_frame): Call delete_all_child_windows instead
7699 of delete_all_subwindows.
7700
ca78dc43
PE
77012011-11-07 Paul Eggert <eggert@cs.ucla.edu>
7702
7703 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
7704 This is also needed for porting to any host where GC_MARK_STACK is
7705 not GC_MAKE_GCPROS_NOOPS.
7706 (which_symbols): Use it.
7707
a0241d01
KH
77082011-11-07 Kenichi Handa <handa@m17n.org>
7709
7710 * coding.c (coding_set_destination): Check coding->src_pos only
7711 when coding->src_object is a buffer (bug#9910).
7712
7713 * process.c (send_process): Set the member src_multibyte of coding
7714 to 0 (bug#9911) when sending a unibyte text.
7715
7716 * callproc.c (Fcall_process): Set the member src_multibyte of
7717 process_coding to 0 (bug#9912).
7718
a64bfdfa 77192011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
ba24cea2
YM
7720
7721 * xmenu.c (cleanup_widget_value_tree): New function.
7722 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
7723 calling free_menubar_widget_value_tree directly (Bug#9830).
7724
cb41b32a
PE
77252011-11-06 Paul Eggert <eggert@cs.ucla.edu>
7726
7727 Fix some portability problems with 'inline'.
7728 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
7729 (window_box_width, window_box_left, window_box_left_offset)
7730 (window_box_right, window_box_right_offset): Declare extern.
7731 Otherwise, these inline functions do not conform to C99 and
7732 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
7733 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
7734 * intervals.c (adjust_intervals_for_insertion)
7735 (adjust_intervals_for_deletion): Now extern, because otherwise the
7736 extern inline functions 'offset_intervals' couldn't refer to it.
7737 (static_offset_intervals): Remove.
7738 (offset_intervals): Rewrite using the old contents of
7739 static_offset_intervals. The old version didn't conform to C99
7740 because an extern inline function contained a reference to an
7741 identifier with static linkage.
7742
b7041366
AS
77432011-11-06 Andreas Schwab <schwab@linux-m68k.org>
7744
7745 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
7746 GC.
7747
88a37c4d
EZ
77482011-11-06 Eli Zaretskii <eliz@gnu.org>
7749
7750 * xdisp.c (init_iterator, reseat_to_string): Don't set the
7751 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
7752 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
7753 return Qleft_to_right.
7754
49745b39
CY
77552011-11-06 Chong Yidong <cyd@gnu.org>
7756
7757 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
7758 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
7759 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
7760 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
7761 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
7762 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
7763 (Fwindow_vscroll): Doc fix.
7764 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
7765 argument, since it makes no sense to pass a live window and for
7766 consistency with window-child.
7767
1f05cd82
CS
77682011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
7769
7770 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
7771 support MSVC.
7772
22610910
JR
77732011-11-05 Jason Rumney <jasonr@gnu.org>
7774
7775 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
7776 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
7777 fonts (Bug#6029).
7778 (add_font_entity_to_list): Fix logic errors in mixed boolean and
7779 bitwise arithmetic preventing use of unicode-sip and non-truetype
7780 opentype fonts.
7781
a06776b2
EZ
77822011-11-05 Eli Zaretskii <eliz@gnu.org>
7783
3ad924ba
EZ
7784 * s/ms-w32.h (fstat, stat, utime): Move redirections to
7785 "emacs"-only part.
7786
a06776b2
EZ
7787 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
7788 initialization code to keep similarity to xfns.c after changes
7789 from 2011-11-05.
7790
c9e7db78
JD
77912011-11-05 Jan Djärv <jan.h.d@swipnet.se>
7792
a97f8f3f
JD
7793 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
7794 (unwind_create_frame): New function (Bug#9943).
7795 (Fx_create_frame): Restructure code to be more similar to the one in
7796 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
7797 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
7798 Move terminal->reference_count++ just before making the frame official
7799 (Bug#9943).
7800
7801 * nsterm.m (x_free_frame_resources): New function.
7802 (x_destroy_window): Move code to x_free_frame_resources.
7803
c9e7db78 7804 * xfns.c (unwind_create_frame): Fix comment.
6d5eb5b0
SM
7805 (Fx_create_frame, x_create_tip_frame):
7806 Move terminal->reference_count++ just before making the frame
75f1671a 7807 official. Move initialization of image_cache_refcount and
c9e7db78
JD
7808 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
7809
a6fc3b5c
EZ
78102011-11-05 Eli Zaretskii <eliz@gnu.org>
7811
7812 Support MSVC build with newer versions of Visual Studio.
7813 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
7814 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
7815 nt/gmake.defs.
7816
7817 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
7818 which are not supported by MSVC.
7819 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
7820 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
7821 bitfields.
7822 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
7823 types in bitfields.
7824 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
7825
7826 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
7827
58179cce 78282011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
a6fc3b5c
EZ
7829
7830 Support MSVC build with newer versions of Visual Studio.
7831 * w32.c: Don't include w32api.h for MSVC.
7832 (init_environment) [_MSC_VER]: Call sys_access, not _access.
7833
7834 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
7835 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
7836 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
7837 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
7838 e_* cousins.
7839 (alloca) [_MSC_VER]: Define to _alloca.
7840
7841 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
7842
7843 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
7844
a58c13ed
EZ
78452011-11-04 Eli Zaretskii <eliz@gnu.org>
7846
7847 * xdisp.c (note_mouse_highlight): If either of
7848 previous/next-single-property-change returns nil, treat that as
7849 the beginning or the end of the buffer. (Bug#9955)
7850
fe0b6370
JD
78512011-11-04 Jan Djärv <jan.h.d@swipnet.se>
7852
a58c13ed 7853 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
fe0b6370
JD
7854 label is not null (Bug#9951).
7855 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
7856 may be NULL.
7857
89bd5ee1
EZ
78582011-11-04 Eli Zaretskii <eliz@gnu.org>
7859
7860 * window.c (Fwindow_body_size): Mention in the doc string that the
7861 return value is in frame's canonical units. (Bug#9949)
7862
84c3edb9
EZ
78632011-11-03 Eli Zaretskii <eliz@gnu.org>
7864
4e2fb5c7
EZ
7865 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
7866
84c3edb9 7867 * w32fns.c (unwind_create_frame): If needed, free the glyph
3ab15fd6 7868 matrices of the partially constructed frame. (Bug#9943)
2a58bbc1 7869 * xfns.c (unwind_create_frame): Likewise.
84c3edb9 7870
bc17a887
EZ
78712011-11-01 Eli Zaretskii <eliz@gnu.org>
7872
7873 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
7874 Don't stop backward scan on the continuation glyph, even though
7875 its CHARPOS is positive.
6d5eb5b0
SM
7876 (mouse_face_from_buffer_pos, note_mouse_highlight):
7877 Rename cover_string to disp_string.
bc17a887 7878
4ee88440
MR
78792011-11-01 Martin Rudalics <rudalics@gmx.at>
7880
7881 * window.c (temp_output_buffer_show): Don't use
7882 Vtemp_buffer_show_specifiers.
7883 (Vtemp_buffer_show_specifiers): Remove unused variable.
7884
c2ff3c02
EZ
78852011-10-30 Eli Zaretskii <eliz@gnu.org>
7886
7887 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
7888 past the beginning of the current glyph matrix.
7889
58179cce 78902011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
6e56383b
JD
7891
7892 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
7893 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
7894 HAVE_GTK3 (Bug#9869).
b77a6a7f 7895
3b574623
JD
7896 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
7897 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
7898
b77a6a7f
JD
7899 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
7900
7901 * xterm.c: Declare x_handle_net_wm_state to return int.
7902 (handle_one_xevent): Check if we are iconified but don't have
7903 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
7904 (get_current_wm_state): Return non-zero if not hidden,
7905 check for _NET_WM_STATE_HIDDEN (Bug#9893).
7906 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
7907 (x_handle_net_wm_state): Return what get_current_wm_state returns.
7908 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
7909
196e41e4
PE
79102011-10-29 Paul Eggert <eggert@cs.ucla.edu>
7911
7912 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
7913 so that this new function doesn't get optimized away by a
7914 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
7915
021f2e1a
AS
79162011-10-29 Andreas Schwab <schwab@linux-m68k.org>
7917
7918 * frame.h (MOUSE_HL_INFO): Remove excess parens.
7919
8b058d44
EZ
79202011-10-29 Eli Zaretskii <eliz@gnu.org>
7921
7922 Fix the `xbytecode' command.
7923 * .gdbinit (xprintbytestr): New command.
b50a28de 7924 (xwhichsymbols): Rename from `which'; all callers changed.
8b058d44
EZ
7925 (xbytecode): Print the byte-code string as well.
7926
4452fb80
EZ
79272011-10-29 Kim Storm <storm@cua.dk>
7928
8b058d44
EZ
7929 * alloc.c (which_symbols): New function.
7930
21b72067
AS
79312011-10-29 Andreas Schwab <schwab@linux-m68k.org>
7932
7933 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
7934 line. (Bug#9903)
7935
83ed7b5c
GM
79362011-10-29 Glenn Morris <rgm@gnu.org>
7937
7938 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
7939 Not clear what it was for, and it causes various bugs. (Bug#9839)
7940
5a7a728b
EZ
79412011-10-28 Eli Zaretskii <eliz@gnu.org>
7942
7943 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
7944 possible random value that matches one of those tested as
7945 condition to clear the mouse face.
7946
d3d0842f
CY
79472011-10-28 Chong Yidong <cyd@gnu.org>
7948
7949 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
7950
31b39d13
DN
79512011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
7952
7953 * window.c (make_window): Initialize phys_cursor_on_p.
7954
9aba6043
SM
79552011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
7956
7957 * lisp.h (struct Lisp_Symbol): Update comments.
7958
c20992f4
JB
79592011-10-28 Juanma Barranquero <lekktu@gmail.com>
7960
7961 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
7962
db4f02f2
EZ
79632011-10-28 Eli Zaretskii <eliz@gnu.org>
7964
7965 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
7966 <oslsachem@gmail.com> for helping to debug this.
7967
7968 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
7969 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
7970 (g_b_init_get_glyph_outline_w): New static variables.
7971 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
7972 (GetGlyphOutlineW_Proc): New typedefs.
7973 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9aba6043
SM
7974 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
7975 New functions.
7976 (w32font_open_internal, compute_metrics):
7977 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
db4f02f2
EZ
7978 instead of calling the "wide" APIs directly.
7979
7980 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
7981
7982 * w32.h (syms_of_w32font): Add prototype.
7983
87e68db4
JB
79842011-10-27 Juanma Barranquero <lekktu@gmail.com>
7985
7986 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
7987 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
7988 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
7989 (Fmove_to_window_line): Doc fix.
7990
435c1d67
CY
79912011-10-27 Chong Yidong <cyd@gnu.org>
7992
7993 * process.c (make_process): Set gnutls_state to NULL.
7994
7995 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
7996 non-NULL, regardless of GNUTLS_INITSTAGE.
7997 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
7998 an error. Set process slots as soon as we allocate them.
7999
8000 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
8001
9c6c6f49
CY
80022011-10-27 Chong Yidong <cyd@gnu.org>
8003
9aba6043
SM
8004 * gnutls.c (emacs_gnutls_deinit): New function.
8005 Deallocate credentials structures as well as calling gnutls_deinit.
9c6c6f49
CY
8006 (Fgnutls_deinit, Fgnutls_boot): Use it.
8007
8008 * process.c (make_process): Initialize GnuTLS credentials to NULL.
8009 (deactivate_process): Call emacs_gnutls_deinit.
8010
657d08d3
JB
80112011-10-27 Juanma Barranquero <lekktu@gmail.com>
8012
8013 * image.c (x_create_x_image_and_pixmap):
8014 * w32.c (sys_rename, w32_delayed_load):
8015 * w32font.c (fill_in_logfont):
8016 * w32reg.c (x_get_string_resource): Silence compiler warnings.
8017
5430d399
JB
80182011-10-26 Juanma Barranquero <lekktu@gmail.com>
8019
8020 * w32fns.c (w32_default_color_map): New function,
8021 extracted from Fw32_default_color_map.
a7ef684b 8022 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
5430d399 8023
fe0055fa
PE
80242011-10-25 Paul Eggert <eggert@cs.ucla.edu>
8025
8026 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
8027
e6346438
SM
80282011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
8029
8030 * keyboard.c (test_undefined): New function (bug#9751).
8031 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
8032
e112cc37
ET
80332011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
8034
8035 * sysdep.c (init_sys_modes): Fix the check for the controlling
8036 terminal (Bug#6649).
8037
7b5d6677
EZ
80382011-10-20 Eli Zaretskii <eliz@gnu.org>
8039
8040 * dispextern.h (struct bidi_it): New member next_en_type.
8041
8042 * bidi.c (bidi_line_init): Initialize the next_en_type member.
8043 (bidi_resolve_explicit_1): When next_en_pos is valid for the
8044 current character, check also for next_en_type being WEAK_EN.
8045 (bidi_resolve_weak): Don't enter the expensive loop if the current
8046 position is before next_en_pos. Record the bidi type of the first
8047 non-ET, non-BN character we find, in addition to its position.
8048 (bidi_level_of_next_char): Invalidate next_en_type when
8049 next_en_pos is over-stepped.
8050
7da0b018
PE
80512011-10-20 Paul Eggert <eggert@cs.ucla.edu>
8052
8053 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
8054 * editfns.c: Rewrite current-time-zone so that it invokes
8055 the equivalent of (format-time-string "%Z") to get the time zone name.
8056 This fixes a bug when the time zone name contains characters that
8057 need converting from the system time locale to Emacs internal format.
8058 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
8059 that patch fixed format-time-string to do the conversion, but
8060 I forgot to fix current-time-zone.
8061 (format_time_string): New function, containing most of
8062 what Fformat_time_string used to contain.
8063 (Fformat_time_string): Rewrite in terms of format_time_string.
8064 This doesn't change this function's behavior.
8065 (current-time-zone): Rewrite to use format_time_string.
8066 This fixes the bug reported by Michael Schierl in
8067 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
8068 Jason Rumney's 2007-06-07 change worked around this bug, but
8069 didn't fix it.
8070 * systime.h (tzname, timezone): Remove no-longer-used declarations.
8071
8547b010
EZ
80722011-10-19 Eli Zaretskii <eliz@gnu.org>
8073
8074 * xdisp.c (start_display): If the character at POS is displayed
8075 via a display vector, reset IT->current.dpvec_index to zero.
12b32963
EZ
8076 (try_window_reusing_current_matrix): If a line ends in a display
8077 vector or the next line starts in a display vector, continue
8078 redrawing the window even though the character position of
8079 start_row was reached.
8547b010
EZ
8080 (Bug#9771, part 2)
8081
4e948d15
CY
80822011-10-18 Chong Yidong <cyd@gnu.org>
8083
8084 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
8085 with nobreak-char-display too.
8086
4787455f
EZ
80872011-10-18 Eli Zaretskii <eliz@gnu.org>
8088
8089 Fix part 3 of bug#9771.
8090 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
8091 (bidi_resolve_neutral): Don't enter the expensive loop looking for
8092 non-neutral characters if the current character is a paragraph
8093 separator (a.k.a. Newline). This avoids running the same
8094 expensive loop twice, once when we consume the preceding newline
8095 and the other time when the line actually needs to be displayed.
8096 Avoid the loop when we see neutrals on the base embedding level
8097 following a character whose directionality is the same as the
8098 paragraph's. This avoids running the expensive loop when a line
8099 ends in a long sequence of neutrals, like control characters.
8100 Add assertion against STRONG_AL type. Slightly rearrange code
8101 that determines the type of a neutral given the first non-neutral
8102 that follows it.
8103 (bidi_level_of_next_char): Set next_en_pos to zero when
8104 invalidating its info.
8105
2c91f553
EZ
81062011-10-17 Eli Zaretskii <eliz@gnu.org>
8107
8108 * xdisp.c (push_display_prop): Determine whether to record string
8109 or buffer position by IT->string, not by IT->method. Allow
8110 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
f2ff9e88
EZ
8111 (move_it_vertically_backward): Don't look for character position
8112 immediately after the newline when in a continuation line.
8113 (Bug#9771, part 1)
2c91f553 8114
c7b08b0d
MR
81152011-10-15 Martin Rudalics <rudalics@gmx.at>
8116
8117 * window.c (coordinates_in_window): Rewrite and delabelize
8118 vertical border check. (Bug#5357) (Bug#9618)
8119
6b02f655
SM
81202011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
8121
8122 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
8123 errors in XSetWindowBorder (bug#9310).
8124
81d40c92
DA
81252011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
8126
8127 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
8128 avoid crash when xmalloc overrun checking is enabled.
8129
d4172c3b
EZ
81302011-10-13 Eli Zaretskii <eliz@gnu.org>
8131
8132 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
8133 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
8134 cursor motion with <left> and <right> arrow keys.
8135
8136 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
8137 some callers set that themselves.
8138
b00eea75
EZ
81392011-10-12 Eli Zaretskii <eliz@gnu.org>
8140
8141 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
8142 display string and the previous row comes from the same string and
8143 is empty. (Bug#9739) (Bug#9738)
8144
8fe012c4
SM
81452011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
8146
8147 * doc.c (get_doc_string): Encode file name (bug#9735).
8148
0074aef2
EZ
81492011-10-12 Eli Zaretskii <eliz@gnu.org>
8150
79beb178
EZ
8151 * bidi.c (bidi_level_of_next_char):
8152 * xdisp.c (get_visually_first_element): Remove old incorrect
8153 comments regarding the Unicode Line Separator character.
8154
0074aef2
EZ
8155 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
8156
6e4b3fbe
DA
81572011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
8158
8159 * alloc.c (Fgc_status): Do not access beyond zombies array
8160 boundary if nzombies > MAX_ZOMBIES.
8161 * alloc.c (dump_zombies): Add missing format specifier.
8162
0324f3af
PE
81632011-10-12 Paul Eggert <eggert@cs.ucla.edu>
8164
b5525cac
PE
8165 * xdisp.c (set_cursor_from_row): Simplify conditionals,
8166 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
8167
0324f3af
PE
8168 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
8169 Some packages use them to denote characters with modifiers.
8170
e9b5f888
AS
81712011-10-11 Andreas Schwab <schwab@linux-m68k.org>
8172
8173 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
8174 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
8175 matching a pp-number. Rename parameter var to var1.
8176
127827c0
SM
81772011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
8178
8179 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
8180
c8fd3bd0
GM
81812011-10-08 Glenn Morris <rgm@gnu.org>
8182
8183 * callint.c (Fcall_interactively): Give a more explicit error for the
8184 'c' case with a non-character input. (Bug#8479)
8185
352ec8ff
EZ
81862011-10-08 Eli Zaretskii <eliz@gnu.org>
8187
03669ccb
EZ
8188 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
8189 lines.
7061c986
EZ
8190 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
8191 lines that are hscrolled on the left.
03669ccb 8192
352ec8ff
EZ
8193 * dispnew.c (buffer_posn_from_coords): Account for a possible
8194 presence of header-line. (Bug#4426)
8195
a66cfb1c
SM
81962011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
8197
6b02f655
SM
8198 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
8199 Don't advertise functionality which we discourage or doesn't work.
a66cfb1c 8200
7c5ee88e
PE
82012011-10-07 Paul Eggert <eggert@cs.ucla.edu>
8202
8203 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
8204 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
8205 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
8206 this makes Emacs dump core during garbage collection on rare
8207 occasions. sizeof is obviously inferior to offsetof here, so
8208 stick with offsetof.
8209 (GC_POINTER_ALIGNMENT): New macro.
8210 (mark_memory): Omit 3rd (offset) arg; caller changed.
8211 Don't assume EMACS_INT alignment is the same as pointer alignment.
8212
df1bbe5b
SM
82132011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
8214
8215 * keyboard.c (read_key_sequence_remapped): New var.
8216 (read_key_sequence): Compute remapping in the right buffer.
8217 (command_loop_1): Use read_key_sequence's remapping directly.
8218
51553db6
SM
82192011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
8220
32c1fffd
SM
8221 * dired.c (file_name_completion): Don't expand file name.
8222 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
8223 before checking file name handler.
8224
51553db6
SM
8225 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
8226 they've been requested explicitly (bug#9591).
8227
b6bd1599 82282011-10-01 Andreas Schwab <schwab@linux-m68k.org>
fa2ec41f
AS
8229
8230 * keymap.c (Fsingle_key_description): Use make_specified_string
8231 instead of build_string to build string from push_key_description.
8232 (Bug#5193)
8233
f701dc2a
PE
82342011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8235
4222c55d
PE
8236 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
8237 This fixes a Y2038 bug on 64-bit hosts.
8238 * buffer.c (reset_buffer):
8239 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
8240 (Fclear_buffer_auto_save_failure):
8241 Use 0, not -1, to represent an unset failure time, since time_t
8242 might not be signed.
8243
f701dc2a
PE
8244 Remove dependency on glibc malloc internals.
8245 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8246 Move back here from lisp.h, but with their new implementations.
8247 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8248 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
8249 * charset.c (charset_table_init): New static var.
8250 (syms_of_charset): Use it instead of xmalloc. This removes a
8251 dependency on glibc malloc internals. See Eli Zaretskii's comment in
8252 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
8253 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8254 Move back to alloc.c.
8255 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8256 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
8257
9ceebf39
JD
82582011-09-30 Jan Djärv <jan.h.d@swipnet.se>
8259
8260 * nsterm.m (windowDidResize): Call x_set_window_size only when
8261 ns_in_resize is true. Otherwise set pixelwidth/height and
8262 call change_frame_size (Bug#9628).
8263
cb993c58
PE
82642011-09-30 Paul Eggert <eggert@cs.ucla.edu>
8265
3930c88b
PE
8266 Port --enable-checking=all to Fedora 14 x86-64.
8267 * charset.c (syms_of_charset): Also account for glibc malloc's
8268 internal overhead when calculating the initial malloc maximum.
8269
cb993c58
PE
8270 Port --enable-checking=all to Fedora 14 x86.
8271 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8272 Move to lisp.h.
8273 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
8274 (overrun_check_realloc, overrun_check_free):
8275 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
8276 That way, xmalloc returns a properly-aligned pointer even if
8277 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
8278 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
8279 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
8280 into account when calculating the initial malloc maximum.
8281 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
8282 Move here from alloc.c, so that charset.c can use it too.
8283 Properly align; the old code wasn't right for common 32-bit hosts
8284 when configured with --enable-checking=all.
8285 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
8286 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
8287
31bed486
EZ
82882011-09-29 Eli Zaretskii <eliz@gnu.org>
8289
04c70788 8290 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
31bed486
EZ
8291 use EDOM.
8292
fbcaa2f3
EZ
82932011-09-28 Eli Zaretskii <eliz@gnu.org>
8294
8295 * xdisp.c (compute_display_string_end): If there's no display
8296 string at CHARPOS, return -1.
8297
8298 * bidi.c (bidi_fetch_char): When compute_display_string_end
8299 returns a negative value, treat the character as a normal
8300 character not covered by a display string. (Bug#9624)
8301
a239d4e9
JB
83022011-09-28 Juanma Barranquero <lekktu@gmail.com>
8303
8304 * lread.c (Fread_from_string): Fix typo in docstring.
8305
88652fd5
EZ
83062011-09-27 Eli Zaretskii <eliz@gnu.org>
8307
8308 * xdisp.c (handle_invisible_prop): If invisible text ends on a
8309 newline, reseat the iterator instead of bidi-iterating there one
8310 character at a time. (Bug#9610)
32c1fffd
SM
8311 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
8312 TO_CHARPOS if the bidi iterator is at base embedding level.
88652fd5 8313
ed497dd4
AS
83142011-09-27 Andreas Schwab <schwab@linux-m68k.org>
8315
8316 * lread.c (readevalloop): Use correct code for NBSP.
8317 (read1): Likewise. (Bug#9608)
8318
b2bf61aa
MA
83192011-09-25 Michael Albinus <michael.albinus@gmx.de>
8320
8321 * dbusbind.c (Fdbus_register_signal): When service is not
8322 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
8323
32bbb17c
GM
83242011-09-25 Glenn Morris <rgm@gnu.org>
8325
8326 * buffer.c (truncate-lines): Doc fix.
8327
94e0933e
CY
83282011-09-24 Chong Yidong <cyd@stupidchicken.com>
8329
8330 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
8331 (Fset_window_next_buffers): Doc fix.
8332
cddde921
GM
83332011-09-24 Glenn Morris <rgm@gnu.org>
8334
8335 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
8336
1260aef1
PE
83372011-09-24 Paul Eggert <eggert@cs.ucla.edu>
8338
25b4bfa0
PE
8339 Fix minor problems found by static checking.
8340 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1260aef1
PE
8341 * indent.c (Fvertical_motion): Fix == vs = typo.
8342
e3cbd34b
EZ
83432011-09-24 Eli Zaretskii <eliz@gnu.org>
8344
a66cfb1c
SM
8345 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
8346 Default value is now t. Doc fix.
6bf7006f 8347
e3cbd34b 8348 * indent.c (Fvertical_motion): Compute and apply the overshoot
32c1fffd 8349 logic when moving up, not only when moving down. Fix the
e3cbd34b 8350 confusing name and values of the it_overshoot_expected variable;
32c1fffd 8351 logic changes accordingly. (Bug#9254) (Bug#9549)
e3cbd34b
EZ
8352
8353 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
8354 CHARPOS is covered by a display string which includes newlines.
8355 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
8356 is covered by a display string with embedded newlines.
8357
a3de0cbd
MA
83582011-09-24 Michael Albinus <michael.albinus@gmx.de>
8359
8360 * dbusbind.c (Fdbus_register_signal): Add match rule to
8361 Vdbus_registered_objects_table. (Bug#9581)
a66cfb1c
SM
8362 (Fdbus_register_method, Vdbus_registered_objects_table):
8363 Fix docstring.
a3de0cbd 8364
b260039d
JM
83652011-09-24 Jim Meyering <meyering@redhat.com>
8366
32c1fffd 8367 do not ignore write error for any output size
b260039d
JM
8368 The previous change was incomplete.
8369 While it makes emacs --batch detect the vast majority of stdout
8370 write failures, errors were still ignored whenever the output size is
8371 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
8372 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
8373 && echo FAIL: ignored write error
8374 FAIL: ignored write error
8375 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
8376 && echo FAIL: ignored write error
8377 FAIL: ignored write error
8378 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
8379
8eca8a7c
AS
83802011-09-23 Andreas Schwab <schwab@linux-m68k.org>
8381
8382 * emacs.c (Fkill_emacs): In noninteractive mode exit
8383 non-successfully if a write error occurred on stdout. (Bug#9574)
8384
3341db62
EZ
83852011-09-21 Eli Zaretskii <eliz@gnu.org>
8386
8387 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
8388 the xassert test.
8389
8390 * dispextern.h (struct it): Update the comment documenting what
8391 can it->OBJECT be.
8392
8c203dbf
EZ
83932011-09-20 Eli Zaretskii <eliz@gnu.org>
8394
8395 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
8396 a display string, extend search for cursor position to end of row.
8397 (find_row_edges): If the row ends in a newline from a display
8398 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
8399 Handle the case of a display string with multiple newlines.
fd317ddf
EZ
8400 (Fcurrent_bidi_paragraph_direction): Fix search for previous
8401 non-empty line. Fixes confusing cursor motion with arrow keys at
8402 the beginning of a line that starts with whitespace.
8c203dbf 8403
a4824228
LMI
84042011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
8405
8406 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
8407 (bug#9493).
8408
33ed493b
CY
84092011-09-18 Chong Yidong <cyd@stupidchicken.com>
8410
8411 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
8412 boolean (Bug#9154).
8413
56cd55c8
EZ
84142011-09-18 Eli Zaretskii <eliz@gnu.org>
8415
8416 * xdisp.c (display_line): Record maximum and minimum buffer
8417 positions even if no glyphs were produced (e.g., by a zero-width
8418 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
8419 buffer positions that will be removed from the glyph row because
8420 they don't fit.
c02dcedf
EZ
8421 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
8422 column is beyond frame width: don't subtract 1 "pixel" when
8423 computing width of the stretch.
3e62b7e0
EZ
8424 (reseat_at_next_visible_line_start): Undo the change made on
8425 2011-09-17 that saved paragraph information and restored it after
8426 the call to `reseat'. (Bug#9545)
56cd55c8 8427
5ed99d36 84282011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3390454c
YM
8429
8430 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
8431 and turn window cursor on if cleared (Bug#9415).
8432
5ed99d36 84332011-09-18 Andreas Schwab <schwab@linux-m68k.org>
edb7b4dc
AS
8434
8435 * search.c (boyer_moore): Take unibyte characters from pattern
8436 literally. (Bug#9458)
8437
9bade7b2
EZ
84382011-09-18 Eli Zaretskii <eliz@gnu.org>
8439
8440 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
8441
e5e9d610
PE
84422011-09-18 Paul Eggert <eggert@cs.ucla.edu>
8443
87e4427a
PE
8444 Fix minor problem found by static checking.
8445 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
8446 initialized, to pacify gcc -Wuninitialized.
8447
e5e9d610
PE
8448 * fileio.c: Report proper errno when syscall falls.
8449 (Finsert_file_contents): Save and restore errno,
8450 so that report_file_error outputs the correct diagnostic.
8451 (Fwrite_region) [CLASH_DETECTION]: Likewise.
8452
a1674f0b
EZ
84532011-09-18 Eli Zaretskii <eliz@gnu.org>
8454
8455 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
8456
fbfb6dd4
EZ
84572011-09-17 Eli Zaretskii <eliz@gnu.org>
8458
8459 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
8460 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
8461
bb187662
EZ
84622011-09-17 Eli Zaretskii <eliz@gnu.org>
8463
1137e8b8 8464 * xdisp.c (reseat_at_next_visible_line_start): Keep information
6b02f655 8465 about the current paragraph and restore it after the call to reseat.
1137e8b8
EZ
8466
8467 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
8468 (bidi_find_paragraph_start): Search back for paragraph beginning
8469 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
8470 (bidi_move_to_visually_next): Only trigger paragraph-related
8471 computations when the last character is a newline or at EOB, not
8472 just any NEUTRAL_B. (Bug#9470)
8473
bb187662
EZ
8474 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
8475 truncated lines if point is covered by a display string. (Bug#9524)
8476
2e621251
PE
84772011-09-16 Paul Eggert <eggert@cs.ucla.edu>
8478
8479 * xselect.c: Relax test for outgoing X longs (Bug#9498).
8480 (cons_to_x_long): New function.
8481 (lisp_data_to_selection_data): Use it. Correct the test for
8482 short-versus-long data; it was negated. Break out of vector
8483 loop, for efficiency, when a long datum is discovered.
8484
91a15bc6
SM
84852011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
8486
8487 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
8488
b41c3a35
EZ
84892011-09-16 Eli Zaretskii <eliz@gnu.org>
8490
8491 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
8492 GCC PR/17406) by declaring this function with external scope.
8493
7812ba2d
PE
84942011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8495
8496 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
8497 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
8498
cf7edc2a
AS
84992011-09-15 Andreas Schwab <schwab@linux-m68k.org>
8500
8501 * editfns.c (Fformat): Correctly handle text properties on "%%".
8502
bd01620e
EZ
85032011-09-15 Eli Zaretskii <eliz@gnu.org>
8504
8505 * xterm.c (x_draw_composite_glyph_string_foreground):
8506 * w32term.c (x_draw_composite_glyph_string_foreground):
8507 * term.c (encode_terminal_code):
8508 * composite.c (composition_update_it, get_composition_id):
8509 * xdisp.c (get_next_display_element)
8510 (fill_composite_glyph_string): Add comments about special meaning
8511 of TAB characters in a composition.
8512
a02719a3
PE
85132011-09-15 Paul Eggert <eggert@cs.ucla.edu>
8514
8515 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
4c122725
PE
8516 This occurs when processing a multibyte format.
8517 Problem reported by Wolfgang Jenker.
a02719a3 8518
72589a3c
JB
85192011-09-15 Johan Bockgård <bojohan@gnu.org>
8520
8521 * xdisp.c (try_cursor_movement): Only check for exact match if
8522 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
8523
1c14176c
PE
85242011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8525
8526 Remove unused external symbols.
8527 * dispextern.h (calc_pixel_width_or_height): Remove decl.
8528 * xdisp.c (calc_pixel_width_or_height): Now static.
8529 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
8530 * indent.c (check_display_width):
8531 * w32term.c: Fix comment to match code.
8532 * xterm.c, xterm.h (x_catching_errors): Remove.
8533
d2eea5b5
PE
85342011-09-14 Paul Eggert <eggert@cs.ucla.edu>
8535
8536 * xselect.c: Use signed conversions more consistently (Bug#9498).
8537 (selection_data_to_lisp_data): Assume incoming selection data are
8538 signed integers, not unsigned. This is to be consistent with
8539 outgoing selection data, which was modified to use signed integers
8540 in as part of the fix to Bug#9196 in response to Jan D.'s comment
8541 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
8542 expects long, not unsigned long.
8543
46888499
EZ
85442011-09-14 Eli Zaretskii <eliz@gnu.org>
8545
8546 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
8547 computation of loop end. Reported by Johan Bockgård
8548 <bojohan@gnu.org>.
8549
ef8ef9fb
CY
85502011-09-13 Chong Yidong <cyd@stupidchicken.com>
8551
8552 * frame.c (Fother_visible_frames_p): Function deleted.
8553
fa819fed
EZ
85542011-09-12 Eli Zaretskii <eliz@gnu.org>
8555
8556 * indent.c (compute_motion): Process display vector front to back
8557 rather than the other way around. (Bug#2496)
8558
2ba8e008
SM
85592011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
8560
8561 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
8562
20f53c69
CY
85632011-09-11 Chong Yidong <cyd@stupidchicken.com>
8564
8565 * minibuf.c (Fread_from_minibuffer): Doc fix.
8566
d562d7a4
EZ
85672011-09-11 Eli Zaretskii <eliz@gnu.org>
8568
8569 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
8570 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
8571
1c4d7f3d
LMI
85722011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
8573
8574 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
8575 value for non-existent files.
8576
b885bf36
EZ
85772011-09-11 Eli Zaretskii <eliz@gnu.org>
8578
8579 * fileio.c (Finsert_file_contents): If the file cannot be opened,
8580 set its "size" to -1. This will set the modtime_size field of
8581 the corresponding buffer to -1, which is what
8582 verify-visited-file-modtime expects for files that do not exist.
8583 (Bug#9139)
8584
6612f0bf
PE
85852011-09-11 Paul Eggert <eggert@cs.ucla.edu>
8586
8587 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
8588 here ...
8589 * lisp.h: ... from here. push_key_description is no longer
8590 defined in keyboard.c, so its declaration should not be in
8591 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
8592 logically belongs with push_key_description.
8593
dfb3f755
PE
85942011-09-10 Paul Eggert <eggert@cs.ucla.edu>
8595
8596 * buffer.h: Include <sys/types.h> instead of <time.h>.
8597 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
8598 Problem reported by Herbert J. Skuhra.
8599
3134906c
LMI
86002011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
8601
8602 * xml.c (parse_region): Make the parsing work for
8603 non-comment-starting XML files again (bug#9144).
8604
8d903f4e
AS
86052011-09-10 Andreas Schwab <schwab@linux-m68k.org>
8606
8607 * image.c (gif_load): Fix calculation of bottom and right corner.
8608 (Bug#9468)
8609
80ad64f4
EZ
86102011-09-10 Eli Zaretskii <eliz@gnu.org>
8611
8612 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
8613 redisplay in small windows.
8614
208a048d
EZ
86152011-09-09 Eli Zaretskii <eliz@gnu.org>
8616
8617 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
8618
9b1c252e
MR
86192011-09-08 Martin Rudalics <rudalics@gmx.at>
8620
8621 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
8622 Operate on live windows only.
8623
2949f33b
JB
86242011-09-08 Juanma Barranquero <lekktu@gmail.com>
8625
8626 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
8627
e08dcafd
EZ
86282011-09-07 Eli Zaretskii <eliz@gnu.org>
8629
8630 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
8631 only under bidi iteration.
8632
115b96bd
JD
86332011-09-07 Jan Djärv <jan.h.d@swipnet.se>
8634
8635 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
8636
c8199d0f
PE
86372011-09-06 Paul Eggert <eggert@cs.ucla.edu>
8638
8639 isnan: Fix porting problem to Solaris 10 with bundled gcc.
8640 Without this fix, the command to link temacs failed due to an
8641 undefined symbol __builtin_isnan. This is because
8642 /usr/include/iso/math_c99.h #defines isnan(x) to
8643 __builtin_isnan(x), but the bundled gcc, which identifies itself
8644 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
8645 a __builtin_isnan.
8646 * floatfns.c (isnan): #undef, and then #define to a clone of
8647 what's in data.c.
8648 (Fisnan): Always define, since it's always available now.
8649 (syms_of_floatfns): Always define isnan at the Lisp level.
8650
e39b275c 86512011-09-06 Paul Eggert <eggert@cs.ucla.edu>
1c262cae
PE
8652
8653 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
8654
b2db44d9 86552011-09-06 Paul Eggert <eggert@cs.ucla.edu>
728f8f0a 8656
f4af5137 8657 * fileio.c: Fix bugs with large file offsets (Bug#9428).
728f8f0a
PE
8658 The previous code assumed that file offsets (off_t values) fit in
8659 EMACS_INT variables, which is not true on typical 32-bit hosts.
8660 The code messed up by falsely reporting buffer overflow in cases
8661 such as (insert-file-contents "big" nil 1 2) into an empty buffer
8662 when "big" contains more than 2**29 bytes, even though this
8663 inserts just one byte and does not overflow the buffer.
8664 (Finsert_file_contents): Store file offsets as off_t
8665 values, not as EMACS_INT values. Check for overflow when
8666 converting between EMACS_INT and off_t. When checking for
8667 buffer overflow or for overlap, take the offsets into account.
8668 Don't use EMACS_INT for small values where int suffices.
8669 When checking for overlap, fix a typo: ZV was used where
8670 ZV_BYTE was intended.
8671 (Fwrite_region): Don't assume off_t fits into 'long'.
8672 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
8673
ecfc0a49
MA
86742011-09-05 Michael Albinus <michael.albinus@gmx.de>
8675
8676 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
8677
6511acf2 86782011-09-04 Paul Eggert <eggert@cs.ucla.edu>
61bfeeb7 8679
0999621a 8680 sprintf-related integer and memory overflow issues (Bug#9412).
62f19c19
PE
8681
8682 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
8666506e 8683 (esprintf, exprintf, evxprintf): New functions.
62f19c19 8684 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
6b02f655 8685 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
62f19c19
PE
8686 (modify_event_symbol): Do not assume that the length of
8687 name_alist_or_stem is safe to alloca and fits in int.
8688 (Fexecute_extended_command): Likewise for function name and binding.
8689 (Frecursion_depth): Wrap around reliably on integer overflow.
8690 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
8691 since some callers pass EMACS_INT values.
8692 (Fsingle_key_description): Don't crash if symbol name contains more
8693 than MAX_ALLOCA bytes.
8694 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
8695 (get_minibuffer): Arg is now EMACS_INT, not int.
8696 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
8666506e 8697 (esprintf, exprintf, evxprintf): New decls.
62f19c19
PE
8698 * window.h (command_loop_level, minibuf_level): Reflect API changes.
8699
2be7d702
PE
8700 * dbusbind.c (signature_cat): New function.
8701 (xd_signature, Fdbus_register_signal):
2ea16b89
PE
8702 Do not overrun buffer; instead, report string overflow.
8703
9d1df220
PE
8704 * dispnew.c (add_window_display_history): Don't overrun buffer.
8705 Truncate instead; this is OK since it's just a log.
8706
33ef5c64
PE
8707 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
8708 even if the time zone offset is outlandishly large.
8709 Don't mishandle offset == INT_MIN.
8710
66c6fdd5
PE
8711 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
8712 when creating daemon; the previous buffer-overflow check was incorrect.
8713
d749b01b
PE
8714 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
8715 which has the guts of the old verror function.
8716
b5cd1905
PE
8717 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
8718 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
8719
6e1a67fb
PE
8720 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
8721 (font_unparse_xlfd): Don't blindly alloca long strings.
c21721cc 8722 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
8666506e 8723 fits in int, when using sprintf. Use single snprintf to count
c21721cc
PE
8724 length of string rather than counting it via multiple sprintfs;
8725 that's simpler and more reliable.
c21721cc
PE
8726 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
8727 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
8728 sprintf, in case result does not fit in int.
8729
c57b67fc
PE
8730 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
8731 (fontset_from_font): Print it.
8732
8a401434
PE
8733 * frame.c (tty_frame_count): Now printmax_t, not int.
8734 (make_terminal_frame, set_term_frame_name): Print it.
8735 (x_report_frame_params): In X, window IDs are unsigned long,
8736 not signed long, so print them as unsigned.
8737 (validate_x_resource_name): Check for implausibly long names,
8738 and don't assume name length fits in 'int'.
8739 (x_get_resource_string): Don't blindly alloca invocation name;
8740 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
8741 not fit in int.
8742
6e1a67fb
PE
8743 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
8744 (xg_check_special_colors, xg_set_geometry):
84722b3d
PE
8745 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
8746
0df02bf3
PE
8747 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
8748 Use esprintf, not sprintf, in case result does not fit in int.
8749
48e30793
PE
8750 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
8751 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
8752 it as a large positive number.
8753 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
8754 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
8755
a66ff6d8
PE
8756 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
8757 in case result does not fit in int.
8758
aca216ff
PE
8759 * print.c (float_to_string): Detect width overflow more reliably.
8760 (print_object): Make sprintf buffer a bit bigger, to avoid potential
8761 buffer overrun. Don't assume list length fits in 'int'. Treat
8762 print length of 0 as 0, not as infinity; to be consistent with other
8763 uses of print length in this function. Don't overflow print length
8764 index. Don't assume hash table size fits in 'long', or that
8765 vectorlike size fits in 'unsigned long'.
8766
31c286f7
PE
8767 * process.c (make_process): Use printmax_t, not int, to format
8768 process-name gensyms.
8769
55e5faa1
PE
8770 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
8771
80f2e268
PE
8772 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
8773 to avoid potential buffer overrun.
8774
670741ab
PE
8775 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
8776 if X resource line is longer than 512 bytes.
8777
b7163a50
PE
8778 * xfns.c (x_window): Make sprintf buffer a bit bigger
8779 to avoid potential buffer overrun.
8780
ae58ff1f
PE
8781 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
8782
c43c8a6a
PE
8783 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
8784
3f8236f4
PE
87852011-09-04 Paul Eggert <eggert@cs.ucla.edu>
8786
53e9fe90 8787 Integer overflow fixes for scrolling, etc.
6511acf2
PE
8788 Without these, Emacs silently mishandles large integers sometimes.
8789 For example, "C-u 4294967297 M-x recenter" was treated as if
53e9fe90
PE
8790 it were "C-u 1 M-x recenter" on a typical 64-bit host.
8791
6511acf2
PE
8792 * xdisp.c (try_window_id): Check Emacs fixnum range before
8793 converting to 'int'.
806add1d 8794
6511acf2 8795 * window.c (window_scroll_line_based, Frecenter):
71f02bc5
PE
8796 Check that an Emacs fixnum is in range before assigning it to 'int'.
8797 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
8798 values converted from Emacs fixnums.
8799 (Frecenter): Don't wrap around a line count if it is out of 'int'
8800 range; instead, treat it as an extreme value.
8801 (Fset_window_configuration, compare_window_configurations):
8802 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
8803
6511acf2
PE
8804 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
8805 that can exceed INT_MAX. Check that EMACS_INT value is in range
8806 before assigning it to the (possibly-narrower) index.
a0efffc8
PE
8807 (match_limit): Don't assume that a fixnum can fit in 'int'.
8808
6511acf2 8809 * print.c (print_object): Use ptrdiff_t, not int, for index that can
29ebea3b
PE
8810 exceed INT_MAX.
8811
6511acf2 8812 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
3f8236f4
PE
8813 (Fvertical_motion): Don't wrap around LINES values that don't fit
8814 in 'int'. Instead, treat them as extreme values. This is good
8815 enough for windows, which can't have more than INT_MAX lines anyway.
8816
fcb901a7
LMI
88172011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
8818
0f2f6b6d
LMI
8819 * Require libxml/parser.h to avoid compilation warning.
8820
fcb901a7
LMI
8821 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
8822
8823 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
8824 since this reportedly can destroy thread storage.
8825
6e20a0d4
CY
88262011-08-30 Chong Yidong <cyd@stupidchicken.com>
8827
8828 * syntax.c (find_defun_start): Update all cache variables if
8829 exiting early (Bug#9401).
8830
148ae00e
EZ
88312011-08-30 Eli Zaretskii <eliz@gnu.org>
8832
f6cfbd8f
EZ
8833 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
8834
148ae00e
EZ
8835 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
8836 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
8837 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
8838
8839 * term.c (tty_append_glyph): New function.
8840 (produce_stretch_glyph): Static function and its prototype deleted.
8841
a66cfb1c
SM
8842 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
8843 Add prototypes.
148ae00e 8844
c4a07a4c
PE
88452011-08-29 Paul Eggert <eggert@cs.ucla.edu>
8846
8847 * image.c (parse_image_spec): Check for nonnegative, not for positive,
8848 when checking :margin (Bug#9390).
8849 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
a66cfb1c 8850 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
c4a07a4c
PE
8851 so that the name doesn't mislead. All uses changed.
8852
6bc8cd65
JB
88532011-08-28 Johan Bockgård <bojohan@gnu.org>
8854
8855 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
8856 set_tty_hooks.
8857
dca4927e
EZ
88582011-08-27 Eli Zaretskii <eliz@gnu.org>
8859
8860 * xdisp.c (move_it_to): Don't bail out early when reaching
8861 position beyond to_charpos, if we are scanning backwards.
8862 (move_it_vertically_backward): When DY == 0, make sure we get to
8863 the first character in the line after the newline.
8864
f2cad773
PE
88652011-08-27 Paul Eggert <eggert@cs.ucla.edu>
8866
8867 * ccl.c: Improve and simplify overflow checking (Bug#9196).
8868 (ccl_driver): Do not generate an out-of-range pointer.
8869 (Fccl_execute_on_string): Remove unnecessary check for
8870 integer overflow, noted by Stefan Monnier in
8871 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
8872 Remove a FIXME that didn't need fixing.
8873 Simplify the newly-introduced buffer reallocation code.
8874
0cae2cdb
JB
88752011-08-27 Juanma Barranquero <lekktu@gmail.com>
8876
8877 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
8878
5fc295a4 88792011-08-26 Paul Eggert <eggert@cs.ucla.edu>
ddff3151 8880
70c60eb2 8881 Integer and memory overflow issues (Bug#9196).
726e0ab1 8882
d31850da
PE
8883 * doc.c (get_doc_string): Rework so that
8884 get_doc_string_buffer_size is the actual buffer size, rather than
8885 being 1 less than the actual buffer size; this makes xpalloc more
8886 convenient.
8887
a69fbedb
PE
8888 * image.c (x_allocate_bitmap_record, cache_image):
8889 * xselect.c (Fx_register_dnd_atom):
8890 Simplify previous changes by using xpalloc.
8891
fe5c5d37
PE
8892 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
8893 since either will do and ptrdiff_t is convenient with xpalloc.
8894
0065d054
PE
8895 * charset.c (charset_table_size)
8896 (struct charset_sort_data.priority): Now ptrdiff_t.
8897 (charset_compare): Don't overflow if priorities differ greatly.
8898 (Fsort_charsets): Don't assume list length fits in int.
8899 Check for size-calculation overflow when allocating sort data.
8900 (syms_of_charset): Allocate an initial charset table that is
8901 just under 64 KiB, to avoid problems with glibc malloc and mmap.
8902
8903 * cmds.c (internal_self_insert): Check for size-calculation overflow.
8904
8905 * composite.h (struct composition.glyph_len): Now int, not unsigned.
8906 The actual value is always <= INT_MAX, and leaving it unsigned made
8907 overflow checking harder.
8908
8909 * dispextern.h (struct glyph_matrix.rows_allocated)
8910 (struct face_cache.size): Now ptrdiff_t, for convenience in use
8911 with xpalloc. The values are still always <= INT_MAX.
8912
8913 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
8914
8915 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
8916 (SAFE_NALLOCA): New macro.
8917
8918 * region-cache.c (struct boundary.pos, find_cache_boundary)
8919 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
8920 (set_cache_region, invalidate_region_cache)
8921 (revalidate_region_cache, know_region_cache, region_cache_forward)
8922 (region_cache_backward, pp_cache):
8923 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
8924 so that ptrdiff_t * can be passed to xpalloc.
8925 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
8926 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
8927 (pp_cache): Don't assume cache_len fits in int.
8928 * region-cache.h: Adjust extern decls to match.
8929
8930 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
8931 EMACS_INT, since either will do, for xpalloc.
8932
8933 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
8934 (xnmalloc, xnrealloc, xpalloc): New functions.
8935
726e0ab1
PE
8936 * bidi.c (bidi_shelve_header_size): New constant.
8937 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
8938 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
8939
51f30bc5 8940 * bidi.c (bidi_cache_shrink):
726e0ab1
PE
8941 * buffer.c (overlays_at, overlays_in, record_overlay_string)
8942 (overlay_strings):
8943 Don't update size of array until after memory allocation succeeds,
8944 because xmalloc/xrealloc may not return.
0065d054
PE
8945 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
8946 now that we have proper integer overflow checking.
8947 (record_overlay_string, overlay_strings): Catch overflows when
8948 calculating size of overlay_str_buf.
726e0ab1 8949
0065d054
PE
8950 * callproc.c (Fcall_process): Check for size overflow when
8951 calculating size of args2.
8952 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
8953 Normally we prefer signed values, but sticking with ptrdiff_t would
8954 require adding more-complicated checks.
726e0ab1
PE
8955
8956 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
8957 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
8958 Redo buffer-overflow calculations to avoid integer overflow.
0065d054 8959 Add a FIXME comment where memory seems to be over-allocated.
726e0ab1
PE
8960
8961 * character.c (Fstring): Check for size-calculation overflow.
8962
8963 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
8964 unnecessary integer overflow. Check for size overflow.
8965 (encode_coding_object): Don't update size until xmalloc succeeds.
8966
8967 * composite.c (get_composition_id): Check for overflow in glyph
8968 length calculations.
8969
8970 Integer and memory overflow fixes for display code.
8971 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
8972 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
8973 (scrolling_window): Check for overflow in size calculations.
8974 (line_draw_cost, realloc_glyph_pool, add_row_entry):
8975 Don't assume glyph table len fits in int.
8976 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
8977 (row_table_size): Now ptrdiff_t, not int.
8978 (scrolling_window): Avoid overflow in size calculations.
8979 Don't update size until allocation succeeds.
8980 * fns.c (concat): Check for overflow in size calculations.
8981 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
8982 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
8983 (NEXT_ALMOST_PRIME_LIMIT): New constant.
8984
8985 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
8986 (get_doc_string): Check for size calculation overflow.
8987 Don't update size until allocation succeeds.
8988 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
8989 EMACS_INT, where ptrdiff_t will do.
8990 (Fsubstitute_command_keys): Check for string overflow.
8991
8992 * editfns.c (set_time_zone_rule): Don't assume environment length
8993 fits in int.
8994 (message_length): Now ptrdiff_t, not int.
8995 (Fmessage_box): Don't update size until allocation succeeds.
8996 Don't assume message length fits in int.
8997 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
8998
0065d054
PE
8999 * emacs.c (main): Do not reallocate argv, since there is a null at
9000 the end that can be overwritten, and this way there's no need to
9001 worry about size-calculation overflow.
9002 (sort_args): Check for size-calculation overflow.
726e0ab1
PE
9003
9004 * eval.c (init_eval_once, grow_specpdl): Don't update size until
9005 alloc succeeds.
9006 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
9007
9008 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
9009 (x_set_scroll_bar_width, x_figure_window_size):
9010 Check for integer overflow.
9011 (x_set_alpha): Do not assume XINT fits in int.
9012
9013 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
9014 This is for the members text_lines, text_cols, total_lines, total_cols,
9015 where the system imposes an 'int' limit.
9016
9017 * fringe.c (Fdefine_fringe_bitmap):
9018 Don't update size until alloc works.
9019
9020 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
9021 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
9022
9023 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
9024 Check for size-calculation overflow.
9025 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
9026 do, as we prefer signed integers.
9027 (id_to_widget.max_size, id_to_widget.used)
9028 (xg_store_widget_in_map, xg_remove_widget_from_map)
9029 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
9030 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
9031 Use and return ptrdiff_t, not int.
9032 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
9033 * gtkutil.h: Change prototypes to match the above.
9034
9035 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
9036 are duplicate now that they've been promoted to lisp.h.
9037 (x_allocate_bitmap_record, x_alloc_image_color)
9038 (make_image_cache, cache_image, xpm_load):
9039 Don't update size until alloc is done.
9040 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
9041 (x_detect_edges):
3256efce 9042 Check for size calculation overflow.
726e0ab1
PE
9043 (ct_colors_allocated_max): New constant.
9044 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
9045 overflow.
3256efce 9046
726e0ab1
PE
9047 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
9048 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
9049 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
9050 Use ptrdiff_t, not int, to count maps.
9051 (read_char_minibuf_menu_prompt): Check for overflow in size
a66cfb1c
SM
9052 calculations. Don't update size until allocation succeeds.
9053 Redo calculations to avoid overflow.
726e0ab1
PE
9054 * keyboard.h: Change prototypes to match the above.
9055
9056 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
9057 to count maps.
9058 (current_minor_maps): Check for size calculation overflow.
9059 * keymap.h: Change prototypes to match the above.
9060
9061 * lread.c (read1, init_obarray): Don't update size until alloc done.
9062
9063 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
9064 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
9065
726e0ab1
PE
9066 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
9067 Now ptrdiff_t, not int.
9068 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
9069 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
9070
9071 * process.c (Fnetwork_interface_list): Check for overflow
9072 in size calculation.
9073
9074 * region-cache.c (move_cache_gap): Check for size calculation overflow.
9075
9076 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
9077 overflow. Don't bother calling xmalloc when xrealloc will do.
9078
9079 * search.c (Freplace_match): Check for size calculation overflow.
9080 (Fset_match_data): Don't assume list lengths fit in 'int'.
9081
9082 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
9083 for command line length. Do not attempt to address one before the
9084 beginning of an array, as that's not portable.
9085
9086 * term.c (max_frame_lines): Remove; unused.
9087 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
9088 not int.
9089 (encode_terminal_code, calculate_costs): Check for size
9090 calculation overflow.
9091 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
9092 table lengths and related sizes. Don't update size until alloc
9093 done. Redo calculations to avoid overflow.
9094 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
9095
9096 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
9097 subtracting pointers.
9098 (gobble_line): Check for overflow more carefully. Don't update size
9099 until alloc done.
9100
9101 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
9102 Don't update size until alloc done.
9103 Redo size calculations to avoid overflow.
9104 Check for size calculation overflow.
0065d054 9105 (main) [DEBUG]: Fix typo in invoking tparam1.
726e0ab1
PE
9106
9107 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
9108 Use ptrdiff_t, not int, for sizes.
9109 (store_mode_line_noprop_char): Don't update size until alloc done.
9110
0065d054
PE
9111 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
9112 Use ptrdiff_t, not int, for sizes.
9113 (Finternal_make_lisp_face, cache_face):
9114 Check for size calculation overflow.
9115 (cache_face): Treat size calculation overflows as if they were
9116 memory exhaustion (the usual treatment), rather than aborting.
726e0ab1
PE
9117
9118 * xfns.c (x_encode_text, x_set_name_internal)
9119 (Fx_change_window_property): Use ptrdiff_t, not int, to count
9120 sizes, since they can exceed INT_MAX in size. Check for size
9121 calculation overflow.
9122
0065d054
PE
9123 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
9124 (xg_select): Check for size calculation overflow.
726e0ab1
PE
9125 Don't update size until alloc done.
9126
0065d054 9127 * xrdb.c (get_environ_db): Don't assume path length fits in int,
726e0ab1 9128 as sprintf is limited to int lengths.
1d526e2f 9129
252c5ee1
PE
9130 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
9131 (X_LONG_MIN): New macros.
864d7ce7
PE
9132 Use them to make the following changes clearer.
9133 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
9134 This change doesn't affect the value now, but it may help remind
9135 future maintainers not to raise the value too much later.
9136 (SELECTION_QUANTUM): Remove, replacing with ...
9137 (selection_quantum): ... new function, which avoids overflow.
9138 All uses changed.
9139 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
9140 assumption that selection length fits in 'int'.
9141 (x_reply_selection_request, x_handle_selection_request)
9142 (x_get_window_property, receive_incremental_selection)
9143 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
9144 (lisp_data_to_selection_data, clean_local_selection_data):
9145 Use ptrdiff_t, not int, to record length of selection.
9146 (x_reply_selection_request, x_get_window_property)
9147 (receive_incremental_selection, x_property_data_to_lisp):
9148 Redo calculations to avoid overflow.
9149 (x_reply_selection_request): When sending hint, ceiling it at
252c5ee1 9150 X_LONG_MAX rather than relying on wraparound overflow to send
864d7ce7
PE
9151 something.
9152 (x_get_window_property, receive_incremental_selection)
9153 (lisp_data_to_selection_data, x_property_data_to_lisp):
9154 Check for size-calculation overflow.
9155 (x_get_window_property, receive_incremental_selection)
9156 (lisp_data_to_selection_data, Fx_register_dnd_atom):
9157 Don't store size until memory allocation succeeds.
9158 (x_get_window_property): Plug memory leak on memory exhaustion.
9159 Don't double-block input; malloc is safe here. Don't assume 2**34
9160 - 4 fits in unsigned long. Add an xassert to check
9161 XGetWindowProperty overflow. Be more careful about overflow
9162 calculations, and distinguish size from memory overflow better.
9163 (receive_incremental_selection): When tracing, don't assume
9164 unsigned int is less than INT_MAX.
9165 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
9166 harmful) conversions of unsigned short to int.
9167 (lisp_data_to_selection_data): Don't assume that integers
9168 in the range -65535 through -1 fit in an X unsigned short.
9169 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
9170 result parameters unless successful. Rely on cons_to_unsigned
9171 to report problems with elements; the old code wasn't right anyway.
9172 (x_check_property_data): Check for int overflow; we cannot use
9173 a wider type due to X limits.
9174 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
9175
726e0ab1 9176 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
34db673b 9177
0065d054
PE
9178 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
9179 (x_term_init): Check for size calculation overflow.
726e0ab1
PE
9180 (x_color_cells): Don't store size until memory allocation succeeds.
9181 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
0065d054 9182 Don't assume alloca size is less than MAX_ALLOCA.
726e0ab1
PE
9183 (x_term_init): Don't assume length fits in int (sprintf is limited
9184 to int size).
bc18e09d 9185
ebfa62c0
PE
9186 Use ptrdiff_t for composition IDs.
9187 * character.c (lisp_string_width):
9188 * composite.c (composition_table_size, n_compositions)
9189 (get_composition_id, composition_gstring_from_id):
9190 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
9191 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
9192 * window.c (Frecenter):
9193 Use ptrdiff_t, not int, for composition IDs.
9194 * composite.c (get_composition_id): Check for integer overflow.
9195 * composite.h: Adjust prototypes to match the above changes.
9196
d3411f89
PE
9197 Use ptrdiff_t for hash table indexes.
9198 * category.c (hash_get_category_set):
9199 * ccl.c (ccl_driver):
9200 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
9201 * coding.c (coding_system_charset_list, detect_coding_system):
9202 * coding.h (struct coding_system.id):
9203 * composite.c (get_composition_id, gstring_lookup_cache):
9204 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
9205 * image.c (xpm_get_color_table_h):
9206 * lisp.h (hash_lookup, hash_put):
9207 * minibuf.c (Ftest_completion):
9208 Use ptrdiff_t for hash table indexes, not int (which is too
9209 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
9210 32-bit --with-wide-int hosts).
9211
e097a6fa
PE
9212 * charset.c (Fdefine_charset_internal): Check for integer overflow.
9213 Add a FIXME comment about memory leaks.
9214 (syms_of_charset): Don't assume xmalloc returns.
9215
5637687f
PE
9216 Don't assume that stated character widths fit in int.
9217 * character.c (Fchar_width, c_string_width, lisp_string_width):
9218 * character.h (CHAR_WIDTH):
9219 * indent.c (MULTIBYTE_BYTES_WIDTH):
9220 Use sanitize_char_width to avoid undefined and/or bad behavior
9221 with outlandish widths.
a66cfb1c 9222 * character.h (sanitize_tab_width): Rename from sanitize_width,
5637687f
PE
9223 now that we have two such functions. All uses changed.
9224 (sanitize_char_width): New inline function.
9225
a2271ba2
PE
9226 Don't assume that tab-width fits in int.
9227 * character.h (sanitize_width): New inline function.
9228 (SANE_TAB_WIDTH): New macro.
9229 (ASCII_CHAR_WIDTH): Use it.
9230 * indent.c (sane_tab_width): Remove. All uses replaced by
9231 SANE_TAB_WIDTH (current_buffer).
9232 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
9233
18c52557
PE
9234 * fileio.c: Integer overflow issues with file modes.
9235 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
9236
caeeedc1
PE
9237 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
9238 Remove unreachable code.
9239 (read_hex, load_charset_map_from_file): Check for integer overflow.
9240
6df6ae42 9241 * xterm.c: Don't go over XClientMessageEvent limit.
50849c52
PE
9242 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
9243 (x_send_scroll_bar_event): Likewise. Check that the size does not
9244 exceed limits imposed by XClientMessageEvent, as well as the usual
9245 ptrdiff_t and size_t limits.
9246
b13995db
PE
9247 * keyboard.c: Overflow, signedness and related fixes.
9248 (make_lispy_movement): Use same integer type in forward decl
9249 that is used in the definition.
9250 (read_key_sequence, keyremap_step):
9251 Change bufsize argument back to int, undoing my 2011-03-30 change.
9252 We prefer signed types, and int is wide enough here.
9253 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
9254 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
9255 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
9256 length, not size_t. Use ptrdiff_t for index, not int.
9257 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
9258 possibility of integer overflow.
9259
13464394
PE
9260 Overflow, signedness and related fixes for images.
9261
9262 * dispextern.h (struct it.stack[0].u.image.image_id)
9263 (struct_it.image_id, struct image.id, struct image_cache.size)
9264 (struct image_cache.used, struct image_cache.ref_count):
9265 * gtkutil.c (update_frame_tool_bar):
9266 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
9267 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
9268 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
9269 * nsmenu.m (update_frame_tool_bar):
9270 * xdisp.c (calc_pixel_width_or_height):
9271 * xfns.c (image_cache_refcount):
9272 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
9273 on typical 64-bit hosts.
9274
9275 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
9276 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
9277 Omit unnecessary casts to int.
9278 (parse_image_spec): Check that integers fall into 'int' range
9279 when the callers expect that.
9280 (image_ascent): Redo ascent calculation to avoid int overflow.
9281 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
9282 (lookup_image): Remove unnecessary tests.
9283 (xbm_image_p): Locals are now of int, not EMACS_INT,
9284 since parse_image_check makes sure they fit into int.
9285 (png_load, gif_load, svg_load_image):
9286 Prefer int to unsigned where either will do.
9287 (tiff_handler): New function, combining the cores of the
a66cfb1c
SM
9288 old tiff_error_handler and tiff_warning_handler.
9289 This function is rewritten to use vsnprintf and thereby avoid
13464394
PE
9290 stack buffer overflows. It uses only the features of vsnprintf
9291 that are common to both POSIX and native Microsoft.
9292 (tiff_error_handler, tiff_warning_handler): Use it.
9293 (tiff_load, gif_load, imagemagick_load_image):
9294 Don't assume :index value fits in 'int'.
9295 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
9296 (imagemagick_load_image): Check that crop parameters fit into
9297 the integer types that MagickCropImage accepts. Don't assume
9298 Vimagemagick_render_type has a nonnegative value. Don't assume
9299 size_t fits in 'long'.
9300 (gs_load): Use printmax_t to print the widest integers possible.
9301 Check for integer overflow when computing image height and width.
9302
c11821d4
EZ
93032011-08-26 Eli Zaretskii <eliz@gnu.org>
9304
9305 * xdisp.c (redisplay_window): Don't force window start if point
9306 will be invisible in the resulting window. (Bug#9324)
9307
0c95fcf7
EZ
93082011-08-25 Eli Zaretskii <eliz@gnu.org>
9309
9310 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
9311 the display spec is of the form `(space ...)'.
9312 (handle_display_spec): Return the value returned by
9313 handle_single_display_spec, not just 1 or zero.
9314 (handle_single_display_spec): If the display spec is of the form
9315 `(space ...)', and specifies display in the text area, return 2
9316 rather than 1.
fee65a97 9317 (try_cursor_movement): Check for the need to scroll more
a66cfb1c
SM
9318 accurately, and prefer exact match for point under bidi.
9319 Don't advance `row' beyond the last row of the window.
0c95fcf7
EZ
9320
9321 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
9322 into disp_prop; all users changed.
9323
9324 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
9325 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
9326 for the text covered by the display property.
9327
e4ed06f1
CY
93282011-08-25 Chong Yidong <cyd@stupidchicken.com>
9329
9330 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
9331 Change return value to nil.
9332 (Frecord_buffer): Delete unused function.
9333
f67cdd7f
EZ
93342011-08-24 Eli Zaretskii <eliz@gnu.org>
9335
5980d4c6
EZ
9336 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
9337 buffers, return left-to-right.
8610fe8b
EZ
9338 (set_cursor_from_row): Consider candidate row a win if its glyph
9339 represents a newline and point is on that newline. Fixes cursor
9340 positioning on the newline at EOL of R2L text within L2R
9341 paragraph, and vice versa.
9342 (try_cursor_movement): Check continued rows, in addition to
9343 continuation rows. Fixes unwarranted scroll when point enters a
9344 continued line of R2L text within an L2R paragraph, or vice versa.
9345 (cursor_row_p): Consider the case of point being equal to
9346 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
9347 from the end of a short line to the beginning of a continued line
9348 of R2L text within L2R paragraph.
9349 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
9350 composed characters.
5980d4c6 9351
f67cdd7f
EZ
9352 * bidi.c (bidi_check_type): Use xassert.
9353 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
9354 members.
9355
bca633fb
EZ
93562011-08-23 Eli Zaretskii <eliz@gnu.org>
9357
9358 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
9359 a character.
9360
4a5885a7
CY
93612011-08-23 Chong Yidong <cyd@stupidchicken.com>
9362
9363 * nsfont.m (ns_otf_to_script): Fix typo.
9364
0902a04e
KH
93652011-08-22 Kenichi Handa <handa@m17n.org>
9366
9367 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
9368 extra slot even if the purpose is char-code-property-table.
9369
1a2e6670
EZ
93702011-08-23 Eli Zaretskii <eliz@gnu.org>
9371
8ddde651
EZ
9372 * xdisp.c (redisplay_window): When computing centering_position,
9373 account for the height of the header line. (Bug#8874)
9374
425cc014
EZ
9375 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
9376 instead of CHAR_TO_BYTE. Fixes a crash when a completion
9377 candidate is selected by the mouse, and that candidate has a
9378 composed character under the mouse.
9379
1a2e6670
EZ
9380 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
9381 coordinates reported by pos-visible-in-window-p for a composed
9382 character in column zero.
9383
8b76d6f8
SM
93842011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
9385
9386 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
9387
dac347dd
EZ
93882011-08-22 Eli Zaretskii <eliz@gnu.org>
9389
9390 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
9391 consider it a hit if to_charpos is anywhere in the range of the
9392 composed buffer positions.
9393
e013fb34
CY
93942011-08-22 Chong Yidong <cyd@stupidchicken.com>
9395
9396 * image.c (gif_load): Don't assume that each subimage has the same
9397 dimensions as the base image. Handle disposal method that is
9398 "undefined" by the gif spec (Bug#9335).
9399
bd1ba3e8
CY
94002011-08-20 Chong Yidong <cyd@stupidchicken.com>
9401
9402 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
024a2d76 9403 (Fcondition_case): Document `debug' symbol in error handler.
bd1ba3e8 9404
54a1215b
EZ
94052011-08-19 Eli Zaretskii <eliz@gnu.org>
9406
823564e5
EZ
9407 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
9408 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
9409 from an Org mode buffer to a Speedbar frame.
9410
54a1215b
EZ
9411 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
9412 a composition, take its buffer position from IT->cmp_it.charpos.
9413 Fixes cursor positioning at the beginning of a line that begins
9414 with a composed character.
9415
9778ebcc
EZ
94162011-08-18 Eli Zaretskii <eliz@gnu.org>
9417
0be6ee06
EZ
9418 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
9419 character bidirectional type, use STRONG_L instead. Fixes crashes
9420 in a buffer produced by `describe-categories'.
9421
9778ebcc
EZ
9422 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
9423 members before the level stack, so they would be saved and
9424 restored when copying iterator state. Fixes incorrect reordering
9425 around TABs covered by display properties.
9426
156bffbe
AS
94272011-08-18 Andreas Schwab <schwab@linux-m68k.org>
9428
6b02f655 9429 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
156bffbe 9430
72ad093b
CY
94312011-08-17 Chong Yidong <cyd@stupidchicken.com>
9432
9433 * eval.c (internal_condition_case, internal_condition_case_1)
8b76d6f8
SM
9434 (internal_condition_case_2, internal_condition_case_n):
9435 Remove unnecessary aborts (Bug#9081).
72ad093b 9436
35774242
EZ
94372011-08-17 Eli Zaretskii <eliz@gnu.org>
9438
9439 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
9440 has no `load' handler, try opening the file locally. (Bug#9311)
9441
db76dd85
KB
94422011-08-16 Ken Brown <kbrown@cornell.edu>
9443
9444 * gmalloc.c: Expand comment.
9445
b215eee5
EZ
94462011-08-16 Eli Zaretskii <eliz@gnu.org>
9447
9448 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
9449 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
9450
a4579d33
KB
94512011-08-16 Ken Brown <kbrown@cornell.edu>
9452
9453 Fix memory allocation problems in Cygwin build (Bug#9273).
9454
9455 * unexcw.c ( __malloc_initialized): Declare external variable.
9456 (fixup_executable): Force the dumped emacs to reinitialize malloc.
9457
8b76d6f8
SM
9458 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
9459 New variables.
a4579d33
KB
9460 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
9461 dumped emacs.
9462 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
9463 in the static heap.
9464 [CYGWIN] (special_realloc): New function.
9465 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
9466 requests to realloc storage in the static heap.
9467
3ebec551
PE
94682011-08-15 Paul Eggert <eggert@cs.ucla.edu>
9469
9470 * bidi.c (bidi_initialize): Remove unused local.
9471
9fd8be00
EZ
94722011-08-15 Eli Zaretskii <eliz@gnu.org>
9473
6b02f655
SM
9474 * bidimirror.h:
9475 * biditype.h: Remove file.
9476 * makefile.w32-in ($(BLD)/bidi.$(O)):
9477 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
474a8465
EZ
9478
9479 * dispextern.h: Fix a typo in the comment to bidi_type_t.
9480
9481 * chartab.c: Improve commentary for the uniprop_table API.
9482
32413314
EZ
9483 * bidi.c (bidi_paragraph_init): Support zero value of
9484 bidi_ignore_explicit_marks_for_paragraph_level.
474a8465
EZ
9485 (bidi_initialize): Use uniprop_table instead of including
9486 biditype.h and bidimirror.h.
32413314 9487
9fd8be00
EZ
9488 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
9489 coordinates of the iterator when restoring from ppos_it.
9490 (Bug#9296)
9491
5cf2b69b
KH
94922011-08-14 Kenichi Handa <handa@m17n.org>
9493
9494 * process.c (create_process): Call setup_process_coding_systems
72ad093b 9495 after the pid of the process is set to -1 (Bug#8162).
5cf2b69b 9496
daf17d00
EZ
94972011-08-14 Eli Zaretskii <eliz@gnu.org>
9498
9499 * xdisp.c (move_it_in_display_line_to): Don't invoke
9500 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
9501 ppos_it. Fixes vertical cursor motion when line beginning is
9502 covered by an image. (Bug#9296)
9503
08e3161a
JD
95042011-08-14 Jan Djärv <jan.h.d@swipnet.se>
9505
9506 * nsterm.h (ns_run_ascript): Declare.
9507 (NSAPP_DATA2_RUNASSCRIPT): Define.
9508
9509 * nsfns.m (as_script, as_result, as_status): New static variables.
9510 (ns_run_ascript): New function.
5e617bc2 9511 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
08e3161a
JD
9512 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
9513 the event loop. Get status from as_status (Bug#7276).
9514
9515 * nsterm.m (sendEvent): If event is NSApplicationDefined and
9516 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
9517 the event loop (Bug#7276).
9518
a3720aa2
AS
95192011-08-14 Andreas Schwab <schwab@linux-m68k.org>
9520
9521 * gnutls.c (QCgnutls_bootprop_priority)
9522 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
9523 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
9524 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
9525 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
9526 (QCgnutls_bootprop_verify_hostname_error)
9527 (QCgnutls_bootprop_callbacks_verify): Rename from
9528 Qgnutls_bootprop_..., all uses changed.
9529
9530 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
9531 uses changed.
9532
0a0d27fb
PE
95332011-08-14 Paul Eggert <eggert@cs.ucla.edu>
9534
19d5c50c
PE
9535 * xfaces.c (Qframe_set_background_mode): Now static.
9536 * dispextern.h (Qframe_set_background_mode): Remove decl.
9537
0a0d27fb
PE
9538 * process.c (Fnetwork_interface_info): Declare local only if needed.
9539
377538cb
JD
95402011-08-13 Jan Djärv <jan.h.d@swipnet.se>
9541
9542 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
9543 (Fnetwork_interface_list): Allocate in increments of bytes instead
9544 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
9545 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
9546 sockaddr.
9547 (struct ifflag_def): notrailers is smart on OSX.
9548 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
9549 Get hardware address with getifaddrs if available.
9550
08fff70c
EZ
95512011-08-12 Eli Zaretskii <eliz@gnu.org>
9552
9553 * xdisp.c (iterate_out_of_display_property): xassert that
9554 IT->position is set to within IT->object's boundaries. Break from
9555 the loop as soon as EOB is reached; avoids infloops in redisplay
8b76d6f8
SM
9556 when IT->position is set up wrongly due to some bug.
9557 Set IT->current to match the bidi iterator unconditionally.
08fff70c
EZ
9558 (push_display_prop): Allow GET_FROM_STRING as IT->method on
9559 entry. Force push_it to save on the stack the current
9560 buffer/string position, to be restored by pop_it. Fix flags in
9561 the iterator structure wrt the object coming from a display
9562 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
9563 properties. (Bug#9284)
9564
7be1c708 95652011-08-09 Andreas Schwab <schwab@linux-m68k.org>
aac0c6e3 9566
7be1c708
CY
9567 * fontset.c (fontset_get_font_group): Add proper type checks.
9568 (Bug#9172)
aac0c6e3 9569
7be1c708 95702011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
aac0c6e3 9571
7be1c708
CY
9572 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
9573 and LC_VERSION_MIN_MACOSX.
9574 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
9575 (dump_it) [LC_FUNCTION_STARTS]: Use it.
aac0c6e3 9576
97bb72a6
EZ
95772011-08-08 Eli Zaretskii <eliz@gnu.org>
9578
9579 * xdisp.c (forward_to_next_line_start): Allow to use the
8b76d6f8
SM
9580 no-display-properties-and-no-overlays under bidi display.
9581 Set disp_pos in the bidi iterator to avoid searches for display
757664a4 9582 properties and overlays.
97bb72a6 9583
d5617611
CY
95842011-08-08 Chong Yidong <cyd@stupidchicken.com>
9585
37e11a63
CY
9586 * editfns.c (Fset_time_zone_rule): Document relationship with the
9587 setenv function.
9588
d5617611
CY
9589 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
9590 the font entity extracted from the cache (Bug#8109).
9591
58872834
CY
95922011-08-07 Chong Yidong <cyd@stupidchicken.com>
9593
9594 * composite.c (autocmp_chars): Don't reset point. That is done by
9595 restore_point_unwind (Bug#5984).
9596
75bfc667
JL
95972011-08-07 Juri Linkov <juri@jurta.org>
9598
9599 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
9600 to show the arg `TIME' instead of `TIMEVAL'.
9601
d1410150
EZ
96022011-08-06 Eli Zaretskii <eliz@gnu.org>
9603
9604 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
9605 display property strides EOL and includes a newline, as in
9606 longlines-mode. (Bug#9254)
75b771e4
EZ
9607 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
9608 word-wrap under bidirectional display. (Bug#9224)
d1410150
EZ
9609
9610 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
9611 is non-zero, even if the data buffer is NULL. Fixes a crash in
9612 vertical-motion with longlines-mode. (Bug#9254)
9613
35928349
EZ
96142011-08-05 Eli Zaretskii <eliz@gnu.org>
9615
ec7cc85b
EZ
9616 * bidi.c <bidi_cache_total_alloc>: Now static.
9617 (bidi_initialize): Initialize bidi_cache_total_alloc.
9618
8b76d6f8 9619 * xdisp.c (display_line): Release buffer allocated for shelved bidi
35928349
EZ
9620 cache. (Bug#9221)
9621
9622 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
9623 amount allocated this far in `bidi_cache_total_alloc'.
9624 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
9625 non-zero, only free the data buffer without restoring the cache
9626 contents. All callers changed.
9627
9628 * dispextern.h (bidi_unshelve_cache): Update prototype.
9629
9630 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
9631 (move_it_in_display_line, move_it_to)
9632 (move_it_vertically_backward, move_it_by_lines): Replace the call
9633 to xfree to an equivalent call to bidi_unshelve_cache.
9634 (move_it_in_display_line_to): Fix logic of returning
412b6358 9635 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
35928349 9636
e2e2423b
EZ
96372011-08-05 Eli Zaretskii <eliz@gnu.org>
9638
9639 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
9640 came from a string character with a `cursor' property. (Bug#9229)
9641
ae9e757a
JD
96422011-08-04 Jan Djärv <jan.h.d@swipnet.se>
9643
9644 * Makefile.in (LIB_PTHREAD): New variable.
9645 (LIBES): Add LIB_PTHREAD (Bug#9216).
9646
9647 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
9648 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
9649
213bd7f2
AS
96502011-08-04 Andreas Schwab <schwab@linux-m68k.org>
9651
6b02f655 9652 * regex.c (re_iswctype): Remove some redundant boolean conversions.
213bd7f2 9653
99aaf75f
JD
96542011-08-04 Jan Djärv <jan.h.d@swipnet.se>
9655
9656 * xterm.c (x_find_topmost_parent): New function.
9657 (x_set_frame_alpha): Find topmost parent window with
9658 x_find_topmost_parent and set the property there also (bug#9181).
9659 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
9660
c74e9d86
PE
96612011-08-04 Paul Eggert <eggert@cs.ucla.edu>
9662
9663 * callproc.c (Fcall_process): Avoid vfork clobbering
9664 the local vars buffer, coding_systems, current_dir.
9665
640c8776
SM
96662011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
9667
9668 * keymap.c (Fmake_composed_keymap): Move to subr.el.
9669
f26d0e4c
PE
96702011-08-03 Paul Eggert <eggert@cs.ucla.edu>
9671
8a10d76c
PE
9672 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
9673 so that it is not optimized away.
9674
f26d0e4c
PE
9675 * xdisp.c (compute_display_string_pos): Remove unused local.
9676
55439c61
EZ
96772011-08-02 Eli Zaretskii <eliz@gnu.org>
9678
9679 Fix slow cursor motion and scrolling in large buffers with
9680 selective display, like Org Mode buffers. (Bug#9218)
9681
9682 * dispextern.h (struct bidi_it): New member disp_prop_p.
9683
9684 * xdisp.c: Remove one-slot cache of display string positions.
9685 (compute_display_string_pos): Accept an additional argument
5e617bc2 9686 DISP_PROP_P; callers changed. Scan at most 5K characters forward
55439c61
EZ
9687 for a display string or property. If found, set DISP_PROP_P
9688 non-zero.
9689
9690 * bidi.c (bidi_fetch_char): Accept an additional argument
640c8776
SM
9691 DISP_PROP_P, and pass it to compute_display_string_pos.
9692 Only handle text covered by a display string if DISP_PROP_P is returned
55439c61
EZ
9693 non-zero. All callers of bidi_fetch_char changed.
9694
fb33fa43
SM
96952011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
9696
9697 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
9698
b099e063
DM
96992010-12-03 Don March <don@ohspite.net>
9700
9701 * keymap.c (Fdefine_key): Fix non-prefix key error message when
9702 last character M-[char] is translated to ESC [char] (bug#7541).
9703
5cc7f7af
KH
97042011-08-02 Kenichi Handa <handa@m17n.org>
9705
d0fffa3f 9706 * lisp.h (uniprop_table): Extern it.
5cc7f7af
KH
9707
9708 * chartab.c (uniprop_table): Make it non-static.
9709
525d5e6e
EZ
97102011-08-01 Eli Zaretskii <eliz@gnu.org>
9711
9712 * xdisp.c (forward_to_next_line_start): Accept additional argument
9713 BIDI_IT_PREV, and store into it the state of the bidi iterator had
9714 on the newline.
9715 (reseat_at_next_visible_line_start): Use the bidi iterator state
9716 returned by forward_to_next_line_start to restore the state of
9717 it->bidi_it after backing up to previous newline. (Bug#9212)
9718
31011111
AS
97192011-07-30 Andreas Schwab <schwab@linux-m68k.org>
9720
9721 * regex.c (re_comp): Protoize.
9722 (re_exec): Fix return type.
9723 (regexec): Fix type of `ret'. (Bug#9203)
9724
476371c4
PE
97252011-07-28 Paul Eggert <eggert@cs.ucla.edu>
9726
e5d76069
PE
9727 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
9728 This is needed if max-image-size is a floating-point number.
9729
9a79b20c
AS
97302011-07-28 Andreas Schwab <schwab@linux-m68k.org>
9731
9732 * print.c (print_object): Print empty symbol as ##.
9733
9734 * lread.c (read1): Read ## as empty symbol.
9735
d8c2fa78
AA
97362011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
9737
9738 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
9739 setting frame foreground color (Bug#9175).
9740 (x_set_background_color): Likewise.
9741
ffe57a7a
AA
9742 * nsmenu.m (-setText): Size tooltip dimensions precisely to
9743 contents (Bug#9176).
9744 (EmacsTooltip -init): Remove bezels and add shadows to
9745 tooltip windows.
9746
bf3492a5
AA
9747 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
9748 or scroll bar (Bug#8470).
9749
d55e9c53
AA
9750 * nsfont.m (nsfont_open): Remove assignment to voffset and
9751 unnecessary vars hshink, expand, hd, full_height, min_height.
9752 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
9753
9754 * nsterm.h (nsfont_info): Remove voffset field.
9755
d8c2fa78 97562011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
4843aac3
AA
9757
9758 Implement strike-through and overline on NextStep (Bug#8863).
9759
9760 * nsfont.m (nsfont_open): Use underline position provided by font,
9761 instead of hard-coded value of 2.
9762 (nsfont_draw): Call ns_draw_text_decoration instead.
9763
9764 * nsterm.h: Add declaration for ns_draw_text_decoration.
9765
9766 * nsterm.m (ns_draw_text_decoration): New function for drawing
9767 underline, overline, and strike-through.
9768 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
9769 ns_draw_text_decoration. Change treatment of cursor drawing to
8d5ed899 9770 accommodate underlining, etc.
4843aac3 9771
4cc60b9b
EZ
97722011-07-28 Eli Zaretskii <eliz@gnu.org>
9773
bc7ece87
EZ
9774 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
9775 default.
4cc60b9b 9776
476371c4
PE
97772011-07-28 Paul Eggert <eggert@cs.ucla.edu>
9778
66606eea
PE
9779 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
9780 Without this fix, if a signal arrives just after memory fills up,
9781 'malloc' might be invoked reentrantly.
9782
476371c4
PE
9783 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
9784 In other words, assume that every image size is allowed, on non-X
9785 hosts. This assumption is probably wrong, but it lets Emacs compile.
9786
f3fcc40d
AS
97872011-07-28 Andreas Schwab <schwab@linux-m68k.org>
9788
9789 * regex.c (re_iswctype): Convert return values to boolean.
9790
350c992f
EZ
97912011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
9792
9793 * xdisp.c (compute_display_string_pos): Don't use cached display
9794 string position if the buffer had its restriction changed.
9795 (Bug#9184)
9796
5266b4bb
PE
97972011-07-28 Paul Eggert <eggert@cs.ucla.edu>
9798
9799 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
9800
2573a837 98012011-07-28 Paul Eggert <eggert@cs.ucla.edu>
ca4aa935 9802
41f55ccd 9803 Integer signedness and overflow and related fixes. (Bug#9079)
cf950e6b 9804
39e378da
PE
9805 * bidi.c: Integer size and overflow fixes.
9806 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
9807 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
9808 (bidi_cache_find_level_change, bidi_cache_ensure_space)
9809 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
9810 (bidi_find_other_level_edge):
9811 Use ptrdiff_t instead of EMACS_INT where either will do.
9812 This works better on 32-bit hosts configured --with-wide-int.
9813 (bidi_cache_ensure_space): Check for size-calculation overflow.
9814 Use % rather than repeated addition, for better worst-case speed.
9815 Don't set bidi_cache_size until after xrealloc returns, because it
9816 might not return.
9817 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
f0eb61e9
PE
9818 (bidi_cache_ensure_space): Also check that the bidi cache size
9819 does not exceed that of the largest Lisp string or buffer. See Eli
9820 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
39e378da 9821
5e927815
PE
9822 * alloc.c (__malloc_size_t): Remove.
9823 All uses replaced by size_t. See Andreas Schwab's note
9824 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
9825
ca4aa935
PE
9826 * image.c: Improve checking for integer overflow.
9827 (check_image_size): Assume that f is nonnull, since
9828 it is always nonnull in practice. This is one less thing to
9829 worry about when checking for integer overflow later.
9830 (x_check_image_size): New function, which checks for integer
9831 overflow issues inside X.
9832 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
9833 This removes the need for a memory_full check.
9834 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
9835 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
9836 (xbm_read_bitmap_data): Change locals back to 'int', since
9837 their values must fit in 'int'.
9838 (xpm_load_image, png_load, tiff_load):
9839 Invoke x_create_x_image_and_pixmap earlier,
9840 to avoid much needless work if the image is too large.
9841 (tiff_load): Treat overly large images as if
9842 x_create_x_image_and_pixmap failed, not as malloc failures.
9843 (gs_load): Use x_check_image_size.
9844
5f8f9cc2
PE
9845 * gtkutil.c: Omit integer casts.
9846 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
9847 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
9848
5adf60bc
PE
9849 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
9850
c8907a93
PE
9851 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
9852 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
9853 would wrongly return t on a 64-bit host.
9854
e3c25c68
PE
9855 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
9856 The plain *_OVERFLOW macros run afoul of GCC bug 49705
9857 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
9858 and therefore cause GCC to emit a bogus diagnostic in some cases.
9859
3f791afe
PE
9860 * image.c: Integer signedness and overflow and related fixes.
9861 This is not an exhaustive set of fixes, but it's time to
9862 record what I've got.
9863 (lookup_pixel_color, check_image_size): Remove redundant decls.
9864 (check_image_size): Don't assume that arbitrary EMACS_INT values
9865 fit in 'int', or that arbitrary 'double' values fit in 'int'.
9866 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
9867 (tiff_load, imagemagick_load_image):
9868 Check for overflow in size calculations.
9869 (x_create_x_image_and_pixmap): Remove unnecessary test for
9870 xmalloc returning NULL; that can't happen.
9871 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
9872 (xpm_color_bucket): Use better integer hashing function.
9873 (xpm_cache_color): Don't possibly over-allocate memory.
9874 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
9875 (gif_memory_source):
9876 Use ptrdiff_t, not int or size_t, to record sizes.
9877 (png_load): Don't assume values greater than 2**31 fit in 'int'.
9878 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
9879 either works, as we prefer signed integers.
9880 (tiff_read_from_memory, tiff_write_from_memory):
9881 Return tsize_t, not size_t, since that's what the TIFF API wants.
9882 (tiff_read_from_memory): Don't fail simply because the read would
9883 go past EOF; instead, return a short read.
9884 (tiff_load): Omit no-longer-needed casts.
9885 (Fimagemagick_types): Don't assume size fits into 'int'.
9886
3cc5a532
PE
9887 Improve hashing quality when configured --with-wide-int.
9888 * fns.c (hash_string): New function, taken from sxhash_string.
9889 Do not discard information about ASCII character case; this
9890 discarding is no longer needed.
9891 (sxhash-string): Use it. Change sig to match it. Caller changed.
9892 * lisp.h: Declare it.
9893 * lread.c (hash_string): Remove, since we now use fns.c's version.
9894 The fns.c version returns a wider integer if --with-wide-int is
9895 specified, so this should help the quality of the hashing a bit.
9896
b312a492
PE
9897 * emacs.c: Integer overflow minor fix.
9898 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
9899 Define only if GNU_LINUX.
9900 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
9901
dfd153ae
PE
9902 * dispnew.c: Integer signedness and overflow fixes.
9903 Remove unnecessary forward decls, that were a maintenance hassle.
9904 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
9905 All uses changed.
9906 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
9907 (scrolling_window): Use ptrdiff_t, not int, for byte count.
9908 (prepare_desired_row, line_draw_cost):
9909 Use int, not unsigned, where either works.
9910 (save_current_matrix, restore_current_matrix):
9911 Use ptrdiff_t, not size_t, where either works.
9912 (init_display): Check for overflow more accurately, and without
9913 relying on undefined behavior.
9914
a81d11a3
PE
9915 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
9916 Remove, replacing with the new symbols in lisp.h. All uses changed.
9917 * fileio.c (make_temp_name):
9918 * filelock.c (lock_file_1, lock_file):
9919 * xdisp.c (message_dolog):
9920 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
9921 Use pMd etc. instead.
9922 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
9923 replacing the pWIDE etc. symbols removed from editfns.c.
9924
3300e6fd
PE
9925 * keyboard.h (num_input_events): Now uintmax_t.
9926 This is (very slightly) less likely to mess up due to wraparound.
9927 All uses changed.
9928
fd05c7e9
PE
9929 * buffer.c: Integer signedness fixes.
9930 (alloc_buffer_text, enlarge_buffer_text):
9931 Use ptrdiff_t rather than size_t when either will do, as we prefer
9932 signed integers.
9933
903fe15d
PE
9934 * alloc.c: Integer signedness and overflow fixes.
9935 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
9936 (__malloc_size_t): Default to size_t, not to int.
9937 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
9938 (Fgarbage_collect, mark_object_loop_halt, mark_object):
9939 Prefer ptrdiff_t to size_t when either would do, as we prefer
9940 signed integers.
9941 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
9942 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
9943 Now const. Initialize with values that are in range even if char
9944 is signed.
9945 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
9946 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
9947 These functions do the right thing with sizes > 2**32.
9948 (check_depth): Now ptrdiff_t, not int.
9949 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
9950 Adjust to new way of storing sizes. Check for size overflow bugs
9951 in rest of code.
9952 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
9953 slightly wrong anyway, as it missed one instance of
9954 XMALLOC_OVERRUN_CHECK_OVERHEAD.
9955 (refill_memory_reserve): Omit needless cast to size_t.
9956 (mark_object_loop_halt): Mark as externally visible.
9957
ac82cc6a
PE
9958 * xselect.c: Integer signedness and overflow fixes.
9959 (Fx_register_dnd_atom, x_handle_dnd_message):
9960 Use ptrdiff_t, not size_t, since we prefer signed.
9961 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
9962 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
9963 x_dnd_atoms_size and x_dnd_atoms_length.
9964
c2d1e36d
PE
9965 * doprnt.c: Prefer signed to unsigned when either works.
9966 * eval.c (verror):
9967 * doprnt.c (doprnt):
9968 * lisp.h (doprnt):
9969 * xdisp.c (vmessage):
9970 Use ptrdiff_t, not size_t, when using or implementing doprnt,
9971 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
9972 prefer signed arithmetic to avoid comparison confusion.
9973 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
9974 but is a bit tricky.
9975
0e926e56
PE
9976 Assume freestanding C89 headers, string.h, stdlib.h.
9977 * data.c, doprnt.c, floatfns.c, print.c:
9978 Include float.h unconditionally.
9979 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
9980 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
9981 * regex.c: Likewise for stddef.h, string.h.
9982 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
9983 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
9984 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
9985 (STDC_HEADERS): Remove obsolete defines.
9986 * sysdep.c: Include limits.h unconditionally.
9987
9cfdb3ec
PE
9988 Assume support for memcmp, memcpy, memmove, memset.
9989 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
9990 * regex.c (memcmp, memcpy):
9991 Remove; we assume C89 now.
9992
9993 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
9994 (__malloc_safe_bcopy): Remove; no longer needed.
9995
cf950e6b 9996 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
6089c567
PE
9997 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
9998 well either way, and we prefer signed to unsigned.
9999
dbf38e02
LMI
100002011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
10001
10002 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
10003 closes the connection while we're reading (bug#9182).
10004
d6f0886c 100052011-07-25 Jan Djärv <jan.h.d@swipnet.se>
24e0f6b1 10006
d6f0886c
JD
10007 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
10008 are specified (Bug#9168).
24e0f6b1 10009
2eb1f9e6
PE
100102011-07-25 Paul Eggert <eggert@cs.ucla.edu>
10011
10012 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
10013 Found by GCC static checking and --with-wide-int on a 32-bit host.
10014
22381272 100152011-07-25 Eli Zaretskii <eliz@gnu.org>
7daee910
EZ
10016
10017 * xdisp.c (compute_display_string_pos): Fix logic of caching
10018 previous display string position. Initialize cached_prev_pos to
10019 -1. Fixes slow-down at the beginning of a buffer.
10020
f25e39b4
EZ
100212011-07-24 Eli Zaretskii <eliz@gnu.org>
10022
10023 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
10024 for attrs[LFACE_FONTSET_INDEX].
10025
04c4b52e
PE
100262011-07-23 Paul Eggert <eggert@cs.ucla.edu>
10027
10028 * xml.c (parse_region): Remove unused local
10029 that was recently introduced.
10030
c1734fbd
EZ
100312011-07-23 Eli Zaretskii <eliz@gnu.org>
10032
be18c5a5
EZ
10033 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
10034 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
10035
c1734fbd
EZ
10036 * xdisp.c (move_it_in_display_line_to): Record the best matching
10037 position for TO_CHARPOS while scanning the line, and restore it on
640c8776
SM
10038 exit if none of the characters scanned was an exact match.
10039 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
a9269c18
EZ
10040 when exact match is impossible due to invisible text, and the
10041 lines are truncated.
10042
a258d627
JD
100432011-07-23 Jan Djärv <jan.h.d@swipnet.se>
10044
10045 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
10046 for OSX >= 10.7.
10047
b6d5a689
EZ
100482011-07-22 Eli Zaretskii <eliz@gnu.org>
10049
0f74f785
EZ
10050 Fix a significant slow-down of cursor motion with C-n, C-p,
10051 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
10052 auto-repeat under bidi redisplay in fontified buffers.
b6d5a689 10053 * xdisp.c (compute_stop_pos_backwards): New function.
b6d5a689
EZ
10054 (next_element_from_buffer): Call compute_stop_pos_backwards to
10055 find a suitable prev_stop when we find ourselves before
0f74f785
EZ
10056 base_level_stop.
10057 (reseat): Don't look for prev_stop, as that could mean a very long
10058 run.
10059 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
10060 <cached_disp_overlay_modiff>: Cache for last found display string
10061 position.
551918c1 10062 (compute_display_string_pos): Return the cached position if asked
0f74f785
EZ
10063 about the same buffer in the same area of character positions, and
10064 the buffer wasn't changed since the time the display string
10065 position was cached.
551918c1 10066
b2d0c91a
EZ
100672011-07-22 Eli Zaretskii <eliz@gnu.org>
10068
10069 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
10070 is an integer, which is important for empty lines. (Bug#9149)
10071
043604ee
CY
100722011-07-22 Chong Yidong <cyd@stupidchicken.com>
10073
10074 * frame.c (Fmodify_frame_parameters): In tty case, update the
10075 default face if necessary (Bug#4238).
10076
da4adb04
CY
100772011-07-21 Chong Yidong <cyd@stupidchicken.com>
10078
10079 * editfns.c (Fstring_to_char): No need to explain what a character
10080 is in the docstring (Bug#6576).
10081
9abd0532
LMI
100822011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10083
10084 * xml.c (parse_region): Make sure we always return a tree.
10085
36881d16
HK
100862011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
10087
10088 * xml.c (parse_region): If a document contains only comments,
10089 return that, too.
10090
1e98674d
LMI
100912011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
10092
10093 * xml.c (make_dom): Return comments, too.
10094
590bd467
PE
100952011-07-19 Paul Eggert <eggert@cs.ucla.edu>
10096
10097 Port to OpenBSD.
10098 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
10099 and the surrounding thread.
10100 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
10101 rather than fgets, and retry after EINTR. Otherwise, 'emacs
10102 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
10103 timer goes off.
10104 * s/openbsd.h (BROKEN_SIGIO): Define.
10105 * unexelf.c (unexec) [__OpenBSD__]:
10106 Don't update the .mdebug section of the Alpha COFF symbol table.
10107
f41628b2
LMI
101082011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
10109
10110 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
10111 (bug#8460).
10112
b59b67c5
PE
101132011-07-18 Paul Eggert <eggert@cs.ucla.edu>
10114
15e3a074
PE
10115 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
10116 This fixes some race conditions on the permissions of any newly
10117 created file.
10118
41bed37d
PE
10119 * alloc.c (valid_pointer_p): Use pipe, not open.
10120 This fixes some permissions issues when debugging.
10121
b59b67c5
PE
10122 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
10123 If fchown fails to set both uid and gid, try to set just gid,
10124 as that is sometimes allowed. Adjust the file's mode to eliminate
10125 setuid or setgid bits that are inappropriate if fchown fails.
10126
925a6be7
SM
101272011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
10128
10129 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
10130 to compare Lisp_Objects.
10131 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
10132 global_gnutls_log_level, don't mistake it for a Lisp_Object.
10133 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
10134
52968808
AS
101352011-07-17 Andreas Schwab <schwab@linux-m68k.org>
10136
0a6a104b
AS
10137 * lread.c (read_integer): Unread even EOF character.
10138 (read1): Likewise. Properly record start position of symbol.
10139
52968808
AS
10140 * lread.c (read1): Read `#:' as empty uninterned symbol if no
10141 symbol character follows.
10142
9e381cdd
PE
101432011-07-17 Paul Eggert <eggert@cs.ucla.edu>
10144
10145 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
10146 This works around a problem with the previous change to Fcopy_file.
10147 Recent glibc declares fchown with __attribute__((warn_unused_result)),
10148 and without this change, GCC might complain about discarding
10149 fchown's return value.
10150
b5641435
JB
101512011-07-16 Juanma Barranquero <lekktu@gmail.com>
10152
10153 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
10154
a8031457
PE
101552011-07-16 Paul Eggert <eggert@cs.ucla.edu>
10156
10157 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
10158
dd889327
LMI
101592011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
10160
750c33f7
LMI
10161 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
10162 it's used from the C level.
10163
dd889327
LMI
10164 * process.c: Use the same condition for POLL_FOR_INPUT in both
10165 keyboard.c and process.c (bug#1858).
10166
87e86684
LM
101672011-07-09 Lawrence Mitchell <wence@gmx.li>
10168
10169 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
10170 (Fgnutls_boot): Use it.
10171
64348f40
AS
101722011-07-15 Andreas Schwab <schwab@linux-m68k.org>
10173
10174 * doc.c (Fsubstitute_command_keys): Revert last change.
10175
1d698799
LMI
101762011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
10177
f863868c
LMI
10178 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
10179 quotes the next character, and doesn't affect other longer
10180 sequences (bug#8935).
10181
1d698799
LMI
10182 * lread.c (syms_of_lread): Clarify that is isn't only
10183 `eval-buffer' and `eval-defun' that's affected by
10184 `lexical-binding' (bug#8460).
10185
aa4b6df6
EZ
101862011-07-15 Eli Zaretskii <eliz@gnu.org>
10187
10188 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
6b02f655 10189 bidi redisplay when a line includes both an image and is truncated.
aa4b6df6 10190
5d856da6
PE
101912011-07-14 Paul Eggert <eggert@cs.ucla.edu>
10192
ad6042bb
PE
10193 Fix minor problems found by static checking.
10194 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
10195 (elsz): Now a signed constant, not a size_t var. We prefer signed
10196 types to unsigned, to avoid integer comparison confusion. Without
10197 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
10198 "cannot optimize loop, the loop counter may overflow", a symptom
10199 of the confusion.
f00bbb22 10200 * indent.c (Fvertical_motion): Mark locals as initialized.
5d856da6
PE
10201 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
10202
6468f31c
LMI
102032011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10204
49080b10
LMI
10205 * search.c (Fre_search_backward): Mention `case-fold-search' in
10206 all the re_search_* functions (bug#8138).
10207
6468f31c
LMI
10208 * keyboard.c (Fopen_dribble_file): Document when the file is
10209 closed (bug#8056).
10210
c965adc5
EZ
102112011-07-14 Eli Zaretskii <eliz@gnu.org>
10212
df9733bf
EZ
10213 * bidi.c (bidi_dump_cached_states): Fix format of displaying
10214 bidi_cache_idx.
10215
0bb23927
EZ
10216 Support bidi reordering of display and overlay strings.
10217 * xdisp.c (compute_display_string_pos)
10218 (compute_display_string_end): Accept additional argument STRING.
10219 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
10220 (reseat_to_string): Initialize bidi_it->string.s and
10221 bidi_it->string.schars.
10222 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
640c8776
SM
10223 NULL (avoids a crash in bidi_paragraph_init).
10224 Initialize itb.string.lstring.
0bb23927
EZ
10225 (init_iterator): Call bidi_init_it only of a valid
10226 buffer position was specified. Initialize paragraph_embedding to
10227 L2R.
10228 (reseat_to_string): Initialize the bidi iterator.
10229 (display_string): If we need to ignore text properties of
10230 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
10231 original value of -1 will not work with bidi.)
10232 (compute_display_string_pos): First arg is now struct
10233 `text_pos *'; all callers changed. Support display properties on
10234 Lisp strings.
10235 (compute_display_string_end): Support display properties on Lisp
10236 strings.
10237 (init_iterator, reseat_1, reseat_to_string): Initialize the
10238 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
10239 when iterating on a string not from display properties).
640c8776
SM
10240 (compute_display_string_pos, compute_display_string_end):
10241 Fix calculation of the object to scan. Fixes an error when using
0bb23927
EZ
10242 arrow keys.
10243 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
640c8776
SM
10244 base_level_stop; instead, set base_level_stop to BEGV.
10245 Fixes crashes in vertical-motion.
0bb23927
EZ
10246 (next_element_from_buffer): Improve commentary for when
10247 the iterator is before prev_stop.
10248 (init_iterator): Initialize bidi_p from the default value of
10249 bidi-display-reordering, not from buffer-local value. Use the
10250 buffer-local value only if initializing for buffer iteration.
10251 (handle_invisible_prop): Support invisible properties on strings
10252 that are being bidi-reordered.
10253 (set_iterator_to_next): Support bidi reordering of C strings and
10254 Lisp strings.
10255 (next_element_from_string): Support bidi reordering of Lisp
10256 strings.
10257 (handle_stop_backwards): Support Lisp strings as well.
640c8776
SM
10258 (display_string): Support display of R2L glyph rows.
10259 Use IT_STRING_CHARPOS when displaying from a Lisp string.
0bb23927
EZ
10260 (init_iterator): Don't initialize it->bidi_p for strings
10261 here.
10262 (reseat_to_string): Initialize it->bidi_p for strings here.
10263 (next_element_from_string, next_element_from_c_string)
10264 (next_element_from_buffer): Add xassert's for correspondence
10265 between IT's object being iterated and it->bidi_it.string
10266 structure.
10267 (face_before_or_after_it_pos): Support bidi iteration.
10268 (next_element_from_c_string): Handle the case of the first string
10269 character that is not the first one in the visual order.
10270 (get_visually_first_element): New function, refactored from common
10271 parts of next_element_from_buffer, next_element_from_string, and
10272 next_element_from_c_string.
10273 (tool_bar_lines_needed, redisplay_tool_bar)
10274 (display_menu_bar): Force left-to-right direction. Add a FIXME
10275 comment for making that be controlled by a user option.
10276 (push_it, pop_it): Save and restore the state of the
10277 bidi iterator. Save and restore the bidi_p flag.
10278 (pop_it): Iterate out of display property for string iteration as
10279 well.
10280 (iterate_out_of_display_property): Support iteration over strings.
10281 (handle_single_display_spec): Set up it->bidi_it for iteration
10282 over a display string, and call bidi_init_it.
10283 (handle_single_display_spec, next_overlay_string)
10284 (get_overlay_strings_1, push_display_prop): Set up the bidi
10285 iterator for displaying display or overlay strings.
10286 (forward_to_next_line_start): Don't use the shortcut if
10287 bidi-iterating.
10288 (back_to_previous_visible_line_start): If handle_display_prop
10289 pushed the iterator stack, restore the internal state of the bidi
10290 iterator by calling bidi_pop_it same number of times.
10291 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
10292 and we are bidi-iterating, don't decrement the iterator position;
10293 instead, set the first_elt flag in the bidi iterator, to produce
10294 the same effect.
10295 (reseat_1): Remove redundant setting of string_from_display_prop_p.
10296 (push_display_prop): xassert that we are iterating a buffer.
10297 (push_it, pop_it): Save and restore paragraph_embedding member.
10298 (handle_single_display_spec, next_overlay_string)
10299 (get_overlay_strings_1, reseat_1, reseat_to_string)
10300 (push_display_prop): Set up the `unibyte' member of bidi_it.string
10301 correctly. Don't assume unibyte strings are not bidi-reordered.
10302 (compute_display_string_pos)
10303 (compute_display_string_end): Fix handling the case of C string.
10304 (push_it, pop_it): Save and restore from_disp_prop_p.
10305 (handle_single_display_spec, push_display_prop): Set the
10306 from_disp_prop_p flag.
10307 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
10308 (pop_it): Call iterate_out_of_display_property only if we are
10309 popping after iteration over a string that came from a display
10310 property. Fix a typo in popping stretch info. Add an assertion
10311 for verifying that the iterator position is in sync with the bidi
10312 iterator.
10313 (handle_single_display_spec, get_overlay_strings_1)
10314 (push_display_prop): Fix initialization of paragraph direction for
10315 string when that of the parent object is not yet determined.
10316 (reseat_1): Call bidi_init_it to resync the bidi
10317 iterator with IT's position. (Bug#7616)
10318 (find_row_edges): If ROW->start.pos gives position
10319 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
10320 (handle_stop, back_to_previous_visible_line_start, reseat_1):
10321 Reset the from_disp_prop_p flag.
10322 (SAVE_IT, RESTORE_IT): New macros.
10323 (pos_visible_p, face_before_or_after_it_pos)
10324 (back_to_previous_visible_line_start)
10325 (move_it_in_display_line_to, move_it_in_display_line)
10326 (move_it_to, move_it_vertically_backward, move_it_by_lines)
10327 (try_scrolling, redisplay_window, display_line): Use them when
10328 saving a temporary copy of the iterator and restoring it back.
10329 (back_to_previous_visible_line_start, reseat_1)
10330 (init_iterator): Empty the bidi cache "stack".
10331 (move_it_in_display_line_to): If iterator ended up at
10332 EOL, but we never saw any buffer positions smaller than
10333 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
10334 motion in bidi-reordered lines.
10335 (move_it_in_display_line_to): Record prev_method and prev_pos
10336 immediately before the call to set_iterator_to_next. Fixes cursor
10337 motion in bidi-reordered lines with stretch glyphs and strings
10338 displayed in margins. (Bug#8133) (Bug#8867)
10339 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
10340 TO_CHARPOS.
640c8776
SM
10341 (pos_visible_p): Support positions in bidi-reordered lines.
10342 Save and restore bidi cache.
0bb23927
EZ
10343
10344 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
10345 (bidi_paragraph_info): Delete unused struct.
10346 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
10347 (bidi_cache_start): New variable.
10348 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
10349 to zero.
10350 (bidi_cache_fetch_state, bidi_cache_search)
10351 (bidi_cache_find_level_change, bidi_cache_iterator_state)
10352 (bidi_cache_find, bidi_peek_at_next_level)
10353 (bidi_level_of_next_char, bidi_find_other_level_edge)
10354 (bidi_move_to_visually_next): Compare cache index with
10355 bidi_cache_start rather than with zero.
10356 (bidi_fetch_char): Accept new argument STRING; all callers
10357 changed. Support iteration over a string. Support strings with
10358 display properties. Support unibyte strings. Fix the type of
10359 `len' according to what STRING_CHAR_AND_LENGTH expects.
10360 (bidi_paragraph_init, bidi_resolve_explicit_1)
10361 (bidi_resolve_explicit, bidi_resolve_weak)
640c8776
SM
10362 (bidi_level_of_next_char, bidi_move_to_visually_next):
10363 Support iteration over a string.
0bb23927
EZ
10364 (bidi_set_sor_type, bidi_resolve_explicit_1)
10365 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
10366 can now be zero (for strings); special values 0 and -1 were
10367 changed to -1 and -2, respectively.
10368 (bidi_char_at_pos): New function.
10369 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
10370 Call it instead of FETCH_MULTIBYTE_CHAR.
10371 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
10372 initialized to valid values.
10373 (bidi_init_it): Don't initialize charpos and bytepos with invalid
10374 values.
10375 (bidi_level_of_next_char): Allow the sentinel "position" to pass
10376 the test for valid cached positions. Fix the logic for looking up
10377 the sentinel state in the cache. GCPRO the Lisp string we are
10378 iterating.
10379 (bidi_push_it, bidi_pop_it): New functions.
10380 (bidi_initialize): Initialize the bidi cache start stack pointer.
10381 (bidi_cache_ensure_space): New function, refactored from part of
10382 bidi_cache_iterator_state. Don't assume the required size is just
10383 one BIDI_CACHE_CHUNK away.
10384 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
10385 (bidi_count_bytes, bidi_char_at_pos): New functions.
10386 (bidi_cache_search): Don't assume bidi_cache_last_idx is
10387 always valid if bidi_cache_idx is valid.
10388 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
10389 is valid if it's going to be used.
10390 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
10391 (bidi_cache_fetch_state, bidi_cache_search)
c965adc5
EZ
10392 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10393 (bidi_cache_iterator_state, bidi_cache_find)
640c8776
SM
10394 (bidi_find_other_level_edge, bidi_cache_start_stack):
10395 All variables related to cache indices are now EMACS_INT.
c965adc5 10396
0bb23927
EZ
10397 * dispextern.h (struct bidi_string_data): New structure.
10398 (struct bidi_it): New member `string'. Make flag members be 1-bit
10399 fields, and put them last in the struct.
640c8776
SM
10400 (compute_display_string_pos, compute_display_string_end):
10401 Update prototypes.
0bb23927
EZ
10402 (bidi_push_it, bidi_pop_it): Add prototypes.
10403 (struct iterator_stack_entry): New members bidi_p,
10404 paragraph_embedding, and from_disp_prop_p.
10405 (struct it): Member bidi_p is now a bit field 1 bit wide.
640c8776
SM
10406 (bidi_shelve_cache, bidi_unshelve_cache):
10407 Declare prototypes.
0bb23927
EZ
10408
10409 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
10410 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
10411 and vector-like objects.
10412
10413 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
10414 cache around display iteration.
10415
10416 * window.c (Fwindow_end, window_scroll_pixel_based)
10417 (displayed_window_lines, Frecenter): Save and restore the bidi
10418 cache around display iteration.
10419
3bbd2265
LMI
104202011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
10421
10422 * editfns.c (Fdelete_region): Clarify the use of the named
10423 parameters (bug#6788).
10424
adc47434
MR
104252011-07-14 Martin Rudalics <rudalics@gmx.at>
10426
10427 * indent.c (Fvertical_motion): Set and restore w->pointm when
10428 saving and restoring the window's buffer (Bug#9006).
10429
837c31f8
LMI
104302011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
10431
10432 * editfns.c (Fstring_to_char): Clarify just what is returned
10433 (bug#6576). Text by Eli Zaretskii.
10434
ac389d0c
JB
104352011-07-13 Juanma Barranquero <lekktu@gmail.com>
10436
10437 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
10438
0be0ce47
EZ
104392011-07-13 Eli Zaretskii <eliz@gnu.org>
10440
10441 * buffer.c (mmap_find): Fix a typo.
10442
cd18e7e3
JB
104432011-07-13 Johan Bockgård <bojohan@gnu.org>
10444
10445 Fix execution of x selection hooks.
10446 * xselect.c (Qx_lost_selection_functions)
10447 (Qx_sent_selection_functions): New vars.
10448 (syms_of_xselect): DEFSYM them.
10449 (x_handle_selection_request): Pass Qx_sent_selection_functions
10450 rather than Vx_sent_selection_functions to Frun_hook_with_args.
10451 (x_handle_selection_clear,x_clear_frame_selections):
10452 Pass Qx_lost_selection_functions rather than
10453 Vx_lost_selection_functions to Frun_hook_with_args.
10454
47ea7f44
PE
104552011-07-13 Paul Eggert <eggert@cs.ucla.edu>
10456
ac389d0c 10457 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
2941c447
PE
10458 The old code sometimes used this field without initializing it.
10459
47ea7f44
PE
10460 * alloc.c (gc_sweep): Don't read past end of array.
10461 In theory, the old code could also have corrupted Emacs internals,
10462 though it'd be very unlikely.
10463
bc985c87
AS
104642011-07-12 Andreas Schwab <schwab@linux-m68k.org>
10465
10466 * character.c (Fcharacterp): Don't advertise optional ignored
ac389d0c 10467 argument. (Bug#4026)
bc985c87 10468
0cf34688
LMI
104692011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
10470
b3dadd76
LMI
10471 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
10472 key" (bug#4257).
10473
0cf34688
LMI
10474 * window.c (Fset_window_start): Doc fix (bug#4199).
10475 (Fset_window_hscroll): Ditto.
10476
270768cd
PE
104772011-07-12 Paul Eggert <eggert@cs.ucla.edu>
10478
077e3dda 10479 Fix minor new problems caught by GCC 4.6.1.
270768cd 10480 * term.c (init_tty): Remove unused local.
490011a6 10481 * xsettings.c (store_monospaced_changed): Define this function only
077e3dda 10482 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
490011a6 10483 not used otherwise.
270768cd 10484
b1f58454
CY
104852011-07-12 Chong Yidong <cyd@stupidchicken.com>
10486
10487 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
10488
22b9578d
LMI
104892011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
10490
6e70ab07
LMI
10491 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
10492 are the mini-buffer and the echo area (bug#3320).
10493
22b9578d
LMI
10494 * term.c (init_tty): Remove support for supdup, c10 and perq
10495 terminals, which are no longer supported (bug#1482).
10496
8974cc9f
JB
104972011-07-10 Johan Bockgård <bojohan@gnu.org>
10498
10499 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
10500
a560d974
JD
105012011-07-10 Jan Djärv <jan.h.d@swipnet.se>
10502
10503 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
10504 for non-popups (Bug#3642).
10505
1dae0f0a
AS
105062011-07-10 Andreas Schwab <schwab@linux-m68k.org>
10507
268c2c36 10508 * alloc.c (reset_malloc_hooks): Protoize.
1dae0f0a 10509 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
268c2c36
AS
10510 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
10511 * cm.c (losecursor): Likewise.
1dae0f0a
AS
10512 * data.c (fmod): Likewise.
10513 * dispnew.c (swap_glyphs_in_rows): Likewise.
10514 * emacs.c (memory_warning_signal): Likewise.
10515 * floatfns.c (float_error): Likewise.
10516 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
10517 (otf_open, font_otf_capability, generate_otf_features)
10518 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
10519 Likewise.
10520 * image.c (pbm_read_file): Likewise.
10521 * indent.c (string_display_width): Likewise.
10522 * intervals.c (check_for_interval, search_for_interval)
10523 (inc_interval_count, count_intervals, root_interval)
10524 (adjust_intervals_for_insertion, make_new_interval): Likewise.
10525 * lread.c (defalias): Likewise.
268c2c36 10526 * ralloc.c (r_alloc_check): Likewise.
1dae0f0a
AS
10527 * regex.c (set_image_of_range_1, set_image_of_range)
10528 (regex_grow_registers): Likewise.
10529 * sysdep.c (strerror): Likewise.
10530 * termcap.c (valid_filename_p, tprint, main): Likewise.
10531 * tparam.c (main): Likewise.
10532 * unexhp9k800.c (run_time_remap, save_data_space)
10533 (update_file_ptrs, read_header, write_header, calculate_checksum)
10534 (copy_file, copy_rest, display_header): Likewise.
10535 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
10536 Likewise.
10537 * xdisp.c (check_it): Likewise.
10538 * xfaces.c (register_color, unregister_color, unregister_colors):
10539 Likewise.
10540 * xfns.c (print_fontset_result): Likewise.
10541 * xrdb.c (member, fatal, main): Likewise.
10542
99033785
PE
105432011-07-10 Paul Eggert <eggert@cs.ucla.edu>
10544
10545 Fix minor problems found by static checking (Bug#9031).
10546 * chartab.c (char_table_set_range, map_sub_char_table):
10547 Remove unused locals.
10548 (uniprop_table): Now static.
10549 * composite.c (_work_char): Remove unused static var.
10550
9cb2ac56
JB
105512011-07-09 Juanma Barranquero <lekktu@gmail.com>
10552
10553 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
10554
f25661f0
JD
105552011-07-09 Jan Djärv <jan.h.d@swipnet.se>
10556
10557 * gtkutil.c (qttip_cb): Remove code without function.
10558
8278c4fe
EZ
105592011-07-09 Eli Zaretskii <eliz@gnu.org>
10560
10561 * w32.c (pthread_sigmask): New stub.
10562
1692ae2d 105632011-07-08 Paul Eggert <eggert@cs.ucla.edu>
123403e4 10564
8a6ebd58 10565 Use pthread_sigmask, not sigprocmask (Bug#9010).
123403e4
PE
10566 sigprocmask is portable only for single-threaded applications, and
10567 Emacs can be multi-threaded when it uses GTK.
1301ac26
PE
10568 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
10569 (LIBES): Use it.
10570 * callproc.c (Fcall_process):
10571 * process.c (create_process):
10572 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
10573 Use pthread_sigmask, not sigprocmask.
123403e4 10574
1b854618
JD
105752011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10576
10577 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
10578 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
10579 wrong (Bug#8591).
10580
3fe4b549
JD
105812011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10582
0ce7e563
JD
10583 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
10584 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
10585 (xg_hide_tooltip): Fix comment.
10586
3fe4b549
JD
10587 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
10588 in registerServicesMenuSendTypes.
10589 (validRequestorForSendType): Don't check ns_return_types.
10590
10591 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
10592 ns_return_type.
10593
5df75e47
JR
105942011-07-08 Jason Rumney <jasonr@gnu.org>
10595
22610910
JR
10596 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
10597 SH_SHOW for hidden windows (Bug#5482).
10598
5df75e47
JR
10599 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
10600 frame struct members of non-existent frames (Bug#6284).
10601
699c10bd
JD
106022011-07-08 Jan Djärv <jan.h.d@swipnet.se>
10603
4393663b
JD
10604 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
10605 variable firstTime not needed on OSX >= 10.6.
10606 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
10607 >= 10.5. Use setKnobProportion, setDoubleValue.
10608
10609 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
10610 (MAC_OS_X_VERSION_10_5): Define if not defined.
10611 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
10612 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
10613 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
10614
10615 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
090bd7cb 10616 cString and lossyCString on OSX >= 10.4.
4393663b 10617
58179cce 10618 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
4393663b
JD
10619 sizeToFit on OSX >= 10.2.
10620
10621 * nsimage.m (allocInitFromFile): Don't use deprecated method
10622 bestRepresentationForDevice on OSX >= 10.6.
10623
10624 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
10625 to avoid warning.
10626
10627 * emacs.c: Declare unexec_init_emacs_zone.
10628
a63e0781
JD
10629 * nsgui.h: Fix compiler warning about gnulib redefining verify.
10630
699c10bd
JD
10631 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
10632
10633 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
10634 on svcsMenu (Bug#8842).
10635
10636 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
10637 ns_return_types.
10638 (Fns_list_services): Just return Qnil on 10.6, code not working there.
10639
10640 * nsterm.m (QUTF8_STRING): Declare.
10641 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
10642 (validRequestorForSendType): Return type is (id).
10643 Change indexOfObjectIdenticalTo to indexOfObject.
10644 Check if we have local selection before returning self (Bug#8842).
10645 (writeSelectionToPasteboard): Put local selection into paste board
10646 if we have a local selection (Bug#8842).
10647 (syms_of_nsterm): DEFSYM QUTF8_STRING.
10648
10649 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
10650 (ns_get_local_selection): Declare.
10651
54e10184
LMI
106522011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
10653
9888ff71
LMI
10654 * keymap.c (describe_map_tree): Don't insert a double newline at
10655 the end of the buffer (bug#1169) and return whether we inserted
10656 something.
10657
54e10184
LMI
10658 * callint.c (Fcall_interactively): Change "reading args" to
10659 "providing args" to try to clarify what it does (bug#1010).
10660
15fa4783
KH
106612011-07-07 Kenichi Handa <handa@m17n.org>
10662
10663 * composite.c (composition_compute_stop_pos): Ignore a static
10664 composition starting before CHARPOS (Bug#8915).
10665
10666 * xdisp.c (handle_composition_prop): Likewise.
10667
a8815b00
EZ
106682011-07-07 Eli Zaretskii <eliz@gnu.org>
10669
10670 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
10671 (Bug#9015)
10672
ef7b981d 106732011-07-07 Kenichi Handa <handa@m17n.org>
c805dec0
KH
10674
10675 * character.h (unicode_category_t): New enum type.
10676
10677 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
10678 (Qchar_code_property_table): New variable.
10679 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
10680 (UNIPROP_COMPRESSED_FORM_P): New macros.
10681 (char_table_ascii): Uncompress the compressed values.
10682 (sub_char_table_ref): New arg is_uniprop. Callers changed.
10683 Uncompress the compressed values.
ac389d0c 10684 (sub_char_table_ref_and_range): Likewise.
c805dec0
KH
10685 (char_table_ref_and_range): Uncompress the compressed values.
10686 (sub_char_table_set): New arg is_uniprop. Callers changed.
10687 Uncompress the compressed values.
10688 (sub_char_table_set_range): Args changed. Callers changed.
10689 (char_table_set_range): Adjuted for the above change.
10690 (map_sub_char_table): Delete args default_val and parent. Add arg
10691 top. Give decoded values to a Lisp function.
640c8776 10692 (map_char_table): Adjust for the above change. Give decoded
c805dec0
KH
10693 values to a Lisp function. Gcpro more variables.
10694 (uniprop_table_uncompress)
10695 (uniprop_decode_value_run_length): New functions.
10696 (uniprop_decoder, uniprop_decoder_count): New variables.
10697 (uniprop_get_decoder, uniprop_encode_value_character)
10698 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
10699 New functions.
10700 (uniprop_encoder, uniprop_encoder_count): New variables.
10701 (uniprop_get_encoder, uniprop_table)
10702 (Funicode_property_table_internal, Fget_unicode_property_internal)
10703 (Fput_unicode_property_internal): New functions.
10704 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
10705 Sunicode_property_table_internal, Sget_unicode_property_internal,
5e617bc2 10706 and Sput_unicode_property_internal. Defvar_lisp
c805dec0
KH
10707 char-code-property-alist.
10708
640c8776 10709 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
c805dec0
KH
10710 Vunicode_category_table.
10711
640c8776 10712 * font.c (font_range): Adjust for the change of
c805dec0
KH
10713 Vunicode_category_table.
10714
76b397fb
DN
107152011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
10716
10717 * m/iris4d.h: Remove file, move contents ...
10718 * s/irix6-5.h: ... here.
10719
22b4128e
PE
107202011-07-06 Paul Eggert <eggert@cs.ucla.edu>
10721
10722 Remove unportable assumption about struct layout (Bug#8884).
8a5c77bb
PE
10723 * alloc.c (mark_buffer):
10724 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
10725 (clone_per_buffer_values): Don't assume that
22b4128e
PE
10726 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
10727 This isn't true in general, and it's particularly not true
10728 if Emacs is configured with --with-wide-int.
10729 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
10730 New macros, used in the buffer.c change.
10731
869795d6
JD
107322011-07-05 Jan Djärv <jan.h.d@swipnet.se>
10733
10734 * xsettings.c: Use both GConf and GSettings if both are available.
10735 (store_config_changed_event): Add comment.
10736 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
10737 (store_tool_bar_style_changed): New functions.
5e617bc2 10738 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
869795d6
JD
10739 (struct xsettings): Move font inside HAVE_XFT.
10740 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
640c8776 10741 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
869795d6 10742 Move inside HAVE_XFT.
640c8776 10743 (something_changed_gsettingsCB): Rename from something_changedCB.
869795d6
JD
10744 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
10745 also.
10746 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
5e617bc2 10747 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
640c8776 10748 (something_changed_gconfCB): Rename from something_changedCB.
869795d6
JD
10749 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
10750 (parse_settings): Move check for font inside HAVE_XFT.
10751 (read_settings, apply_xft_settings): Add comment.
10752 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
10753 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
10754 call store_font_name_changed.
10755 (xft_settings_event): Add comment.
10756 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
10757 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
10758 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
10759 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
10760 (xsettings_initialize): Call init_gsettings last.
640c8776
SM
10761 (xsettings_get_system_font, xsettings_get_system_normal_font):
10762 Add comment.
869795d6 10763
d8ed26bd
PE
107642011-07-05 Paul Eggert <eggert@cs.ucla.edu>
10765
10766 Random fixes. E.g., (random) never returned negative values.
10767 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
10768 subseconds part to the entropy, as that's a bit more random.
10769 Prefer signed to unsigned, since the signedness doesn't matter and
10770 in general we prefer signed. When given a limit, use a
10771 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
10772 latter isn't right if USE_2_TAGS_FOR_INTS.
10773 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
10774 not 0..VALMASK. Don't discard "excess" bits that random () returns.
10775
cabf1cac
SM
107762011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
10777
10778 * textprop.c (text_property_stickiness):
10779 Obey Vtext_property_default_nonsticky.
10780 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
10781 * w32fns.c (syms_of_w32fns):
10782 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
10783
6e9b2be9
PE
107842011-07-04 Paul Eggert <eggert@cs.ucla.edu>
10785
10786 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
10787 This is more efficient than Ffile_directory_p and avoids a minor race.
10788
90186c68
LMI
107892011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
10790
7c301272
LMI
10791 * buffer.c (Foverlay_put): Say what the return value is
10792 (bug#7835).
10793
c4f2d8d4
LMI
10794 * fileio.c (barf_or_query_if_file_exists): Check first if the file
10795 is a directory before asking whether to use the file name
10796 (bug#7564).
ad637907
LMI
10797 (barf_or_query_if_file_exists): Make the "File is a directory"
10798 error be more correct.
c4f2d8d4 10799
90186c68
LMI
10800 * fns.c (Frequire): Remove the mention of the .gz files, since
10801 that's installation-specific, but keep the mention of
10802 `get-load-suffixes'.
10803
da64016e
PE
108042011-07-04 Paul Eggert <eggert@cs.ucla.edu>
10805
10806 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
10807 Report string overflow if the output is too long.
10808
7d47b580
JB
108092011-07-04 Juanma Barranquero <lekktu@gmail.com>
10810
a555cb87
JB
10811 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
10812 (syms_of_gnutls): Remove duplicate DEFSYM for
10813 Qgnutls_bootprop_verify_hostname_error, an error for
10814 Qgnutls_bootprop_verify_error (which is no longer used).
10815
7d47b580
JB
10816 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
10817 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
10818 Also (re)move comments that are misplaced or no longer relevant.
10819
1e49bfab
LMI
108202011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
10821
10822 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
10823
1485f4c0
CY
108242011-07-03 Chong Yidong <cyd@stupidchicken.com>
10825
10826 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
10827 and background color parameters if they have been changed.
10828
a9ab721e
LMI
108292011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
10830
10831 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
10832
cf7cff57
PE
108332011-07-03 Paul Eggert <eggert@cs.ucla.edu>
10834
2e13213d
PE
10835 * xsettings.c (SYSTEM_FONT): Define only when used.
10836 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
10837
cf7cff57
PE
10838 * keymap.c (access_keymap_1): Now static.
10839
7a8e04f7
CY
108402011-07-02 Chong Yidong <cyd@stupidchicken.com>
10841
10842 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
10843 leave any prefix arg for the up event (Bug#1586).
10844
61352f62
LMI
108452011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
10846
69bb1ef7
LMI
10847 * lread.c (syms_of_lread): Mention single symbols defined by
10848 `defvar' or `defconst' (bug#7154).
10849
61352f62 10850 * fns.c (Frequire): Mention .el.gz files (bug#7314).
7b3747f9 10851 (Frequire): Mention get-load-suffixes.
61352f62 10852
28545e04
MR
108532011-07-02 Martin Rudalics <rudalics@gmx.at>
10854
10855 * window.h (window): Remove clone_number slot.
10856 * window.c (Fwindow_clone_number, Fset_window_clone_number):
10857 Remove.
10858 (make_parent_window, make_window, saved_window)
10859 (Fset_window_configuration, save_window_save): Don't deal with
10860 clone numbers.
10861 * buffer.c (Qclone_number): Remove declaration.
10862 (sort_overlays, overlay_strings): Don't deal with clone numbers.
10863
3349e122
SM
108642011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
10865
10866 Add multiple inheritance to keymaps.
10867 * keymap.c (Fmake_composed_keymap): New function.
10868 (Fset_keymap_parent): Simplify.
10869 (fix_submap_inheritance): Remove.
10870 (access_keymap_1): New function extracted from access_keymap to handle
10871 embedded parents and handle lists of maps.
10872 (access_keymap): Use it.
10873 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
10874 (Fcopy_keymap): Handle embedded parents.
10875 (Fcommand_remapping, define_as_prefix): Simplify.
10876 (Fkey_binding): Simplify.
10877 (syms_of_keymap): Move minibuffer-local-completion-map,
10878 minibuffer-local-filename-completion-map,
10879 minibuffer-local-must-match-map, and
10880 minibuffer-local-filename-must-match-map to Elisp.
10881 (syms_of_keymap): Defsubr make-composed-keymap.
10882 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
10883 (parse_menu_item): Trivial simplification.
10884
3279eb87
GM
108852011-07-01 Glenn Morris <rgm@gnu.org>
10886
10887 * Makefile.in (SETTINGS_LIBS): Fix typo.
10888
39cb9e56 108892011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
4550efdf
KI
10890
10891 * coding.c (Fencode_coding_string): Record the last coding system
10892 used, as the function doc string says (bug#8738).
10893
0949d2b6
JD
108942011-07-01 Jan Djärv <jan.h.d@swipnet.se>
10895
10896 * xsettings.c (store_monospaced_changed): Take new font as arg and
10897 check for change against current_mono_font.
10898 (EMACS_TYPE_SETTINGS): Remove this and related defines.
10899 (emacs_settings_constructor, emacs_settings_get_property)
10900 (emacs_settings_set_property, emacs_settings_class_init)
10901 (emacs_settings_init, gsettings_obj): Remove.
10902 (something_changedCB): New function for HAVE_GSETTINGS.
10903 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
10904 with value as argument.
10905 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
10906 g_settings_new (Bug#8967). Do not create gsettings_obj.
9173deec 10907 Remove calls to g_settings_bind. Connect something_changedCB to
0949d2b6
JD
10908 "changed".
10909
10910 * xgselect.c: Add defined (HAVE_GSETTINGS).
10911 (xgselect_initialize): Ditto.
10912
10913 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
10914 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
10915 xg_select.
10916
bbc6b304
PE
109172011-07-01 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 * eval.c (struct backtrace): Simplify and port the data structure.
10920 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
10921 signed bit field, as this assumption is not portable and it makes
10922 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
10923 "char debug_on_exit : 1" as this is not portable either; instead,
10924 use the portable "unsigned int debug_on_exit : 1". Remove unused
10925 member evalargs. Remove obsolete comments about cc bombing out.
10926
9851bfc5
JD
109272011-06-30 Jan Djärv <jan.h.d@swipnet.se>
10928
51bb811f 10929 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
9851bfc5
JD
10930 Let HAVE_GSETTINGS override HAVE_GCONF.
10931 (store_monospaced_changed): New function.
10932 (EMACS_SETTINGS): A new type derived from GObject to handle
10933 GSettings notifications.
10934 (emacs_settings_constructor, emacs_settings_get_property)
10935 (emacs_settings_set_property, emacs_settings_class_init):
10936 New functions.
10937 (gsettings_client, gsettings_obj): New variables.
10938 (GSETTINGS_SCHEMA): New define.
10939 (something_changedCB): Call store_monospaced_changed.
10940 (init_gsettings): New function.
10941 (xsettings_initialize): Call init_gsettings.
10942 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
10943 to NULL.
10944
640c8776 10945 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
9851bfc5
JD
10946 GCONF_CFLAGS/LIBS.
10947
5386012d
MR
109482011-06-29 Martin Rudalics <rudalics@gmx.at>
10949
10950 * window.c (resize_root_window, grow_mini_window)
10951 (shrink_mini_window): Rename Qresize_root_window to
10952 Qwindow_resize_root_window and Qresize_root_window_vertically to
10953 Qwindow_resize_root_window_vertically.
10954
f13e0b08
PE
109552011-06-28 Paul Eggert <eggert@cs.ucla.edu>
10956
10957 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
10958
94515237
JB
109592011-06-27 Juanma Barranquero <lekktu@gmail.com>
10960
10961 * makefile.w32-in: Redesign dependencies so they reflect more
10962 clearly which files are directly included by each source file,
10963 and not through other includes.
10964
e43b6e43
MR
109652011-06-27 Martin Rudalics <rudalics@gmx.at>
10966
10967 * buffer.c (Qclone_number): Declare static and DEFSYM it.
10968 (sort_overlays, overlay_strings): When an overlay's clone number
10969 matches the window's clone number process the overlay even if
10970 the overlay's window property doesn't match the current window.
10971
d68443dc
MR
10972 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
10973 (Fwindow_hchild): Rename to Fwindow_left_child.
10974 (Fwindow_next): Rename to Fwindow_next_sibling.
10975 (Fwindow_prev): Rename to Fwindow_prev_sibling.
d615d6d2
MR
10976 (resize_window_check): Rename to window_resize_check.
10977 (resize_window_apply): Rename to window_resize_apply.
10978 (Fresize_window_apply): Rename to Fwindow_resize_apply.
10979 (Fdelete_other_windows_internal, resize_frame_windows)
10980 (Fsplit_window_internal, Fdelete_window_internal)
10981 (grow_mini_window, shrink_mini_window)
10982 (Fresize_mini_window_internal): Fix callers accordingly.
d68443dc 10983
c7e73be5
JD
109842011-06-26 Jan Djärv <jan.h.d@swipnet.se>
10985
10986 * emacsgtkfixed.h: State that this is only used with Gtk+3.
10987 (emacs_fixed_set_min_size): Remove.
10988 (emacs_fixed_new): Take frame as argument.
10989
10990 * emacsgtkfixed.c: State that this is only used with Gtk+3.
10991 (_EmacsFixedPrivate): Remove minwidth/height.
10992 Add struct frame *f.
10993 (emacs_fixed_init): Initialize priv->f.
10994 (get_parent_class, emacs_fixed_set_min_size): Remove.
10995 (emacs_fixed_new): Set priv->f to argument.
10996 (emacs_fixed_get_preferred_width)
10997 (emacs_fixed_get_preferred_height): Use min_width/height from
10998 frames size_hint to set minimum and natural (Bug#8919).
10999 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
11000 and use min_width/height from frames size_hint to set
11001 min_width/height (Bug#8919).
11002
11003 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
9173deec
JB
11004 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
11005 Fix indentation.
c7e73be5 11006
cf99dcf8
EZ
110072011-06-26 Eli Zaretskii <eliz@gnu.org>
11008
11009 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
11010 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
11011 called at ZV.
11012
029529ac
CY
110132011-06-26 Chong Yidong <cyd@stupidchicken.com>
11014
11015 * process.c (wait_reading_process_output): Bypass select if
11016 waiting for a cell while ignoring keyboard input, and input is
11017 pending. Suggested by Jan Djärv (Bug#8869).
11018
7a7ef429
PE
110192011-06-25 Paul Eggert <eggert@cs.ucla.edu>
11020
11021 Use gnulib's dup2 module instead of rolling our own.
11022 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
11023
11fdef7d 110242011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
989b42d2
YM
11025
11026 * dispnew.c (scrolling_window): Before scrolling, turn off a
11027 mouse-highlight in the window being scrolled.
11028
cd3520a4
JB
110292011-06-24 Juanma Barranquero <lekktu@gmail.com>
11030
11031 Move DEFSYM to lisp.h and use everywhere.
11032
11033 * character.h (DEFSYM): Move declaration...
11034 * lisp.h (DEFSYM): ...here.
11035
11036 * gnutls.c:
11037 * minibuf.c:
11038 * w32menu.c:
11039 * w32proc.c:
11040 * w32select.c: Don't include character.h.
11041
11042 * alloc.c (syms_of_alloc):
11043 * buffer.c (syms_of_buffer):
11044 * bytecode.c (syms_of_bytecode):
11045 * callint.c (syms_of_callint):
11046 * casefiddle.c (syms_of_casefiddle):
11047 * casetab.c (init_casetab_once):
11048 * category.c (init_category_once, syms_of_category):
11049 * ccl.c (syms_of_ccl):
11050 * cmds.c (syms_of_cmds):
11051 * composite.c (syms_of_composite):
11052 * dbusbind.c (syms_of_dbusbind):
11053 * dired.c (syms_of_dired):
11054 * dispnew.c (syms_of_display):
11055 * doc.c (syms_of_doc):
11056 * editfns.c (syms_of_editfns):
11057 * emacs.c (syms_of_emacs):
11058 * eval.c (syms_of_eval):
11059 * fileio.c (syms_of_fileio):
11060 * fns.c (syms_of_fns):
11061 * frame.c (syms_of_frame):
11062 * fringe.c (syms_of_fringe):
11063 * insdel.c (syms_of_insdel):
11064 * keymap.c (syms_of_keymap):
11065 * lread.c (init_obarray, syms_of_lread):
11066 * macros.c (syms_of_macros):
11067 * msdos.c (syms_of_msdos):
11068 * print.c (syms_of_print):
11069 * process.c (syms_of_process):
11070 * search.c (syms_of_search):
11071 * sound.c (syms_of_sound):
11072 * syntax.c (init_syntax_once, syms_of_syntax):
11073 * terminal.c (syms_of_terminal):
11074 * textprop.c (syms_of_textprop):
11075 * undo.c (syms_of_undo):
11076 * w32.c (globals_of_w32):
11077 * window.c (syms_of_window):
11078 * xdisp.c (syms_of_xdisp):
11079 * xfaces.c (syms_of_xfaces):
11080 * xfns.c (syms_of_xfns):
11081 * xmenu.c (syms_of_xmenu):
11082 * xsettings.c (syms_of_xsettings):
11083 * xterm.c (syms_of_xterm): Use DEFSYM.
11084
4228cf16
TZ
110852011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
11086
cd3520a4 11087 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
4228cf16 11088
7fcccf1e
PE
110892011-06-23 Paul Eggert <eggert@cs.ucla.edu>
11090
7efb4e0e
PE
11091 Integer and buffer overflow fixes (Bug#8873).
11092
ff5844ad
PE
11093 * print.c (printchar, strout): Check for string overflow.
11094 (PRINTPREPARE, printchar, strout):
11095 Don't set size unless allocation succeeds.
11096
90532f02
PE
11097 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
11098 for sizes. Check for string overflow more accurately.
11099 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
11100
6d84508d
PE
11101 * macros.c: Integer and buffer overflow fixes.
11102 * keyboard.h (struct keyboard.kbd_macro_bufsize):
11103 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
11104 Use ptrdiff_t, not int, for sizes.
11105 Don't increment bufsize until after realloc succeeds.
11106 Check for size-calculation overflow.
11107 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
11108
437b2cb4
PE
11109 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
11110
8b9ac8b4
PE
11111 * lread.c: Integer overflow fixes.
11112 (read_integer): Radix is now EMACS_INT, not int,
11113 to improve quality of diagnostics for out-of-range radices.
11114 Calculate buffer size correctly for out-of-range radices.
11115 (read1): Check for integer overflow in radices, and in
11116 read-circle numbers.
82cb60d3
PE
11117 (read_escape): Avoid int overflow.
11118 (Fload, openp, read_buffer_size, read1)
11119 (substitute_object_recurse, read_vector, read_list, map_obarray):
11120 Use ptrdiff_t, not int, for sizes.
11121 (read1): Use EMACS_INT, not int, for sizes.
20270765 11122 Check for size overflow.
8b9ac8b4 11123
7fcccf1e
PE
11124 * image.c (cache_image): Check for size arithmetic overflow.
11125
bfbbd7e7
PE
11126 * lread.c: Integer overflow issues.
11127 (saved_doc_string_size, saved_doc_string_length)
11128 (prev_saved_doc_string_size, prev_saved_doc_string_length):
11129 Now ptrdiff_t, not int.
11130 (read1): Don't assume doc string length fits in int. Check for
11131 out-of-range doc string lengths.
11132 (read_list): Don't assume file position fits in int.
39019e54 11133 (read_escape): Check for hex character overflow.
bfbbd7e7 11134
4e323265
LL
111352011-06-22 Leo Liu <sdl.web@gmail.com>
11136
11137 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
11138 Move to minibuffer.el.
11139
85fece3e
PE
111402011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11141
20b84ce9 11142 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
85fece3e
PE
11143 The following patches are for when GLYPH_DEBUG && !XASSERT.
11144 * dispextern.h (trace_redisplay_p, dump_glyph_string):
11145 * dispnew.c (flush_stdout):
11146 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
11147 Mark as externally visible.
11148 * dispnew.c (check_window_matrix_pointers): Now static.
11149 * dispnew.c (window_to_frame_vpos):
11150 * xfns.c (unwind_create_frame):
11151 * xterm.c (x_check_font): Remove unused local.
11152 * scroll.c (CHECK_BOUNDS):
11153 * xfaces.c (cache_fache): Rename local to avoid shadowing.
11154 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
11155 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
11156 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
11157 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
11158 Now static.
11159 (debug_method_add): Use va_list and vsprintf rather than relying
11160 on undefined behavior with wrong number of arguments.
11161 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
11162 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
11163 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
11164 since we're not interested in debugging glyphs with old libraries.
11165 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
11166 GCC 4.6.0's static checking.
11167
0766b489
PE
111682011-06-22 Paul Eggert <eggert@cs.ucla.edu>
11169
31fd4b32
PE
11170 Integer overflow and signedness fixes (Bug#8873).
11171 A few related buffer overrun fixes, too.
11172
b79e8648
PE
11173 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
11174
0766b489
PE
11175 * dispextern.h (struct face.stipple):
11176 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
11177 (x_bitmap_mask, x_allocate_bitmap_record)
11178 (x_create_bitmap_from_data, x_create_bitmap_from_file)
11179 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
11180 (x_create_bitmap_from_xpm_data):
11181 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
11182 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
11183 (.bitmaps_last):
11184 * xfaces.c (load_pixmap):
11185 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
11186 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
11187 (.bitmaps_last, struct x_output.icon_bitmap):
11188 Use ptrdiff_t, not int, for bitmap indexes.
11189 (x_allocate_bitmap_record): Check for size overflow.
11190 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
11191
b081724f
PE
11192 Use ptrdiff_t, not int, for overlay counts.
11193 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
11194 * editfns.c (overlays_around, get_pos_property):
11195 * textprop.c (get_char_property_and_overlay):
11196 * xdisp.c (next_overlay_change, note_mouse_highlight):
11197 * xfaces.c (face_at_buffer_position):
21514da7
PE
11198 * buffer.c (OVERLAY_COUNT_MAX): New macro.
11199 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
11200 (Fnext_overlay_change, Fprevious_overlay_change)
11201 (mouse_face_overlay_overlaps, Foverlays_in):
b081724f 11202 Use ptrdiff_t, not int, for sizes.
21514da7 11203 (overlays_at, overlays_in): Check for size-calculation overflow.
b081724f 11204
3de73e5e
PE
11205 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
11206
2606c57b
PE
11207 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
11208 (x_session_initialize): Do not assume string length fits in int.
11209
aaafe47a
PE
11210 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
11211 This is unlikely, but can occur if DPI is outlandish.
11212
2674ddc8 11213 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
3a5077c5
PE
11214 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
11215
28154962
PE
11216 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
11217 * xrdb.c (magic_file_p, search_magic_path):
11218 Omit last arg SUFFIX; it was always 0. All callers changed.
11219 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
11220
7de51af5
PE
11221 * xfont.c (xfont_match): Avoid need for strlen.
11222
25ed6cc3
PE
11223 * xfns.c: Don't assume strlen fits in int.
11224 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
11225
4eab31dd
PE
11226 * xdisp.c (message_log_check_duplicate): Return intmax_t,
11227 not unsigned long, as we prefer signed integers. All callers changed.
11228 Detect integer overflow in repeat count.
11229 (message_dolog): Don't assume print length fits in 39 bytes.
df1f27af 11230 (display_mode_element): Don't assume strlen fits in int.
4eab31dd 11231
171e2a58
PE
11232 * termcap.c: Don't assume sizes fit in int and never overflow.
11233 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
11234 (gobble_line): Check for size-calculation overflow.
11235
ad39faca 11236 * minibuf.c (Fread_buffer):
6e5bb2dc 11237 * lread.c (intern, intern_c_string):
74ca2eb3
PE
11238 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
11239 Don't assume string length fits in int.
11240
52c61c22 11241 * keyboard.c (parse_tool_bar_item):
9bda3520
PE
11242 * gtkutil.c (style_changed_cb): Avoid need for strlen.
11243
b5b8c9e5
PE
11244 * font.c: Don't assume string length fits in int.
11245 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
11246 Use ptrdiff_t, not int.
ccd6111c
PE
11247 (font_intern_prop): Don't assume string length fits in int.
11248 Don't assume integer property fits in fixnum.
11249 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
b5b8c9e5 11250
882f0d81 11251 * filelock.c: Fix some buffer overrun and integer overflow issues.
51cab52b 11252 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
882f0d81
PE
11253 Reformulate so as not to need the command string.
11254 Invoke gzip -cd rather than gunzip, as it's more portable.
11255 (lock_info_type, lock_file_1, lock_file):
11256 Don't assume pid_t and time_t fit in unsigned long.
11257 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
11258 (current_lock_owner): Prefer signed type for sizes.
11259 Use memcpy, not strncpy, where memcpy is what is really wanted.
11260 Don't assume (via atoi) that time_t and pid_t fit in int.
11261 Check for time_t and/or pid_t out of range, e.g., via a network share.
11262 Don't alloca where an auto var works fine.
11263
93f4cf88
PE
11264 * fileio.c: Fix some integer overflow issues.
11265 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
11266 Don't assume string length fits in int.
11267 (directory_file_name): Don't assume string length fits in long.
11268 (make_temp_name): Don't assume pid fits in int, or that its print
11269 length is less than 20.
11270
f3e92b69
PE
11271 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
11272
1bfdaf10
PE
11273 * coding.c (make_subsidiaries): Don't assume string length fits in int.
11274
35016e9a
PE
11275 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
11276
3d1e65a1
PE
11277 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
11278 We prefer signed integers, even for size calculations.
11279
0b963a93
PE
11280 * emacs.c: Don't assume string length fits in 'int'.
11281 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
11282 (main): Don't invoke strlen when not needed.
11283
573f4b54
PE
11284 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
11285 (XD_DEBUG_MESSAGE): Don't waste a byte.
11286
989f33ba
PE
11287 * callproc.c (getenv_internal_1, getenv_internal)
11288 (Fgetenv_internal):
965d34eb
PE
11289 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
11290
e4d29b33
PE
11291 * lread.c (invalid_syntax): Omit length argument.
11292 All uses changed. This doesn't fix a bug, but it simplifies the
11293 code away from its former Hollerith-constant appearance, and it's
11294 one less 'int' to worry about when looking at integer-overflow issues.
51cab52b 11295 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
e4d29b33 11296
eb49b136
PE
11297 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
11298 This didn't break anything, but it didn't help either.
11299 It's confusing to put a bogus integer in a place where the actual
11300 value does not matter.
9f62aeb1 11301 (LIST_END_P): Remove unused macro and its bogus comment.
cbeff735 11302 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
eb49b136 11303
15375a22
PE
11304 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
11305 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
11306 implementation.
b61cc01c
PE
11307 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
11308 We prefer signed types, and the value cannot exceed the EMACS_INT
11309 range anyway (because otherwise the length would not be representable).
9a8e8d9b
PE
11310 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
11311 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
11312 This avoids a GCC warning when WIDE_EMACS_INT.
15375a22 11313
53b2623d
PE
11314 * indent.c (sane_tab_width): New function.
11315 (current_column, scan_for_column, Findent_to, position_indentation)
11316 (compute_motion): Use it. This is just for clarity.
8fcaf9cc 11317 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
53b2623d 11318
51cab52b 11319 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
45aebb64 11320
f2ed8a70
PE
11321 * lisp.h (lint_assume): New macro.
11322 * composite.c (composition_gstring_put_cache):
11323 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
11324
abe80cc6
PE
11325 * editfns.c, insdel.c:
11326 Omit unnecessary forward decls, to simplify future changes.
a9e860e1 11327
b02c740e
PE
11328 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
11329
ebc96716
PE
11330 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
11331
b4e50fa0 11332 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
f03dc6ef 11333 Use much-faster test for byte-length change.
311d5d7c 11334 Don't assume string byte-length fits in 'int'.
a4cf38e4 11335 Check that character arg fits in 'int'.
85461888 11336 (mapcar1): Declare byte as byte, for clarity.
b4e50fa0 11337
c0c1ee9f
PE
11338 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
11339
a498d7f4
PE
11340 * fns.c (concat): Catch string overflow earlier.
11341 Do not rely on integer wraparound.
11342
51cab52b
PE
11343 * dispextern.h (struct it.overlay_strings_charpos)
11344 (struct it.selective): Now EMACS_INT, not int.
87830974
PE
11345 * xdisp.c (forward_to_next_line_start)
11346 (back_to_previous_visible_line_start)
11347 (reseat_at_next_visible_line_start, next_element_from_buffer):
11348 Don't arbitrarily truncate the value of 'selective' to int.
11349
76031fad
PE
11350 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
11351
5eb55db9
PE
11352 * composite.c: Don't truncate sizes to 'int'.
11353 (composition_gstring_p, composition_reseat_it)
11354 (composition_adjust_point): Use EMACS_INT, not int.
7d100a81
PE
11355 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
11356 not EMACS_UINT, for indexes.
5eb55db9 11357
0703a717
PE
11358 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
11359
d6202519
PE
11360 * buffer.c: Include <verify.h>.
11361 (struct sortvec.priority, struct sortstr.priority):
8961a454 11362 Now EMACS_INT, not int.
c20998a7 11363 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
67c36fce
PE
11364 (struct sortstr.size, record_overlay_string)
11365 (struct sortstrlist.size, struct sortlist.used):
11366 Don't truncate size to int.
11367 (record_overlay_string): Check for size-calculation overflow.
d6202519 11368 (init_buffer_once): Check at compile-time, not run-time.
fadf4e30 11369
d5a19415
JM
113702011-06-22 Jim Meyering <meyering@redhat.com>
11371
029529ac 11372 Don't leak an XBM-image-sized buffer
d5a19415
JM
11373 * image.c (xbm_load): Free the image buffer after using it.
11374
a9041e6c
PE
113752011-06-21 Paul Eggert <eggert@cs.ucla.edu>
11376
11377 Port to Sun C.
11378 * composite.c (find_automatic_composition): Omit needless 'return 0;'
11379 that Sun C diagnosed.
11380 * fns.c (secure_hash): Fix pointer signedness issue.
11381 * intervals.c (static_offset_intervals): New function.
11382 (offset_intervals): Use it.
11383
7f3f739f
LL
113842011-06-21 Leo Liu <sdl.web@gmail.com>
11385
11386 * deps.mk (fns.o):
11387 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
11388 sha512.h.
11389
11390 * fns.c (secure_hash): Rename from crypto_hash_function and change
11391 the first arg to accept symbols.
5b66d427 11392 (Fsecure_hash): New primitive.
7f3f739f
LL
11393 (syms_of_fns): New symbols.
11394
76147d94
DD
113952011-06-20 Deniz Dogan <deniz@dogan.se>
11396
11397 * process.c (Fset_process_buffer): Clarify return value in
11398 docstring.
11399
7d7d0045
CY
114002011-06-18 Chong Yidong <cyd@stupidchicken.com>
11401
11402 * dispnew.c (add_window_display_history): Use BVAR.
11403
11404 * xdisp.c (debug_method_add): Use BVAR.
11405 (check_window_end, dump_glyph_matrix, dump_glyph)
11406 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
11407
11408 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
11409 Likewise.
11410
11411 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
11412 check till after the cache is created in init_frame_faces.
11413
ff2bc410
SM
114142011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
11415
11416 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
11417
28177add
PE
114182011-06-16 Paul Eggert <eggert@cs.ucla.edu>
11419
dd3482fe
PE
11420 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
11421 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
11422 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
11423
393d71f3 11424 Improve buffer-overflow checking (Bug#8873).
1c8e352f
PE
11425 * fileio.c (Finsert_file_contents):
11426 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
11427 Remove the old (too-loose) buffer overflow checks.
11428 They weren't needed, since make_gap checks for buffer overflow.
11429 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
11430 The old code merely checked for Emacs fixnum overflow, and relied
11431 on undefined (wraparound) behavior. The new code avoids undefined
11432 behavior, and also checks for ptrdiff_t and/or size_t overflow.
11433
2e6813b0 11434 * editfns.c (Finsert_char): Don't dump core with very negative counts.
21d890a4
PE
11435 Tune. Don't use wider integers than needed. Don't use alloca.
11436 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
2e6813b0 11437
599a9e4f
PE
11438 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
11439
99561444
PE
11440 * insdel.c, lisp.h (buffer_overflow): New function.
11441 (insert_from_buffer_1, replace_range, replace_range_2):
11442 * insdel.c (make_gap_larger):
11443 * editfns.c (Finsert_char):
11444 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
11445
28177add
PE
11446 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
11447
e69dafad
PE
114482011-06-15 Paul Eggert <eggert@cs.ucla.edu>
11449
4baa020d 11450 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
ff672d2c 11451
b1c46f02
PE
11452 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
11453 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
11454
e69dafad
PE
11455 * fileio.c: Don't assume EMACS_INT fits in off_t.
11456 (emacs_lseek): New static function.
11457 (Finsert_file_contents, Fwrite_region): Use it.
11458 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
11459
566684ea
PE
11460 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
11461
e6966cd6
PE
11462 * fns.c: Don't overflow int when computing a list length.
11463 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
11464 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
11465 truncation on 64-bit hosts. Check for QUIT every
11466 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
11467 faster and is responsive enough.
11468 (Flength): Report an error instead of overflowing an integer.
11469 (Fsafe_length): Return a float if the value is not representable
11470 as a fixnum. This shouldn't happen except in contrived situations.
6346d301 11471 (Fnthcdr, Fsort): Don't assume list length fits in int.
de41a810 11472 (Fcopy_sequence): Don't assume vector length fits in int.
00c604f2 11473
dd0b0efb
PE
11474 * alloc.c: Check that resized vectors' lengths fit in fixnums.
11475 (header_size, word_size): New constants.
11476 (allocate_vectorlike): Don't check size overflow here.
11477 (allocate_vector): Check it here instead, since this is the only
11478 caller of allocate_vectorlike that could cause overflow.
11479 Check that the new vector's length is representable as a fixnum.
11480
86fe5cfe
PE
11481 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
11482 The previous code was bogus. For example, next_almost_prime (32)
11483 returned 39, which is undesirable as it is a multiple of 3; and
11484 next_almost_prime (24) returned 25, which is a multiple of 5 so
11485 why was the code bothering to check for multiples of 7?
11486
80e88859
PE
11487 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
11488
4a2f0ad6
PE
11489 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
11490
f66c7cf8
PE
11491 Variadic C functions now count arguments with ptrdiff_t.
11492 This partly undoes my 2011-03-30 change, which replaced int with size_t.
11493 Back then I didn't know that the Emacs coding style prefers signed int.
11494 Also, in the meantime I found a few more instances where arguments
4a2f0ad6
PE
11495 were being counted with int, which may truncate counts on 64-bit
11496 machines, or EMACS_INT, which may be unnecessarily wide.
f66c7cf8
PE
11497 * lisp.h (struct Lisp_Subr.function.aMANY)
11498 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
11499 Arg counts are now ptrdiff_t, not size_t.
11500 All variadic functions and their callers changed accordingly.
11501 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
11502 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
11503 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
11504 * callint.c (Fcall_interactively): Check arg count for overflow,
11505 to avoid potential buffer overrun. Use signed char, not 'int',
11506 for 'varies' array, so that we needn't bother to check its size
11507 calculation for overflow.
11508 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
11509 * eval.c (apply_lambda):
11510 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
11511 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
11512 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
11513
a1759b76
PE
11514 * callint.c (Fcall_interactively): Don't use index var as event count.
11515
d96be9fc
PE
11516 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
11517 * mem-limits.h (SIZE): Remove; no longer used.
11518
a690a978 11519 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
5efd304b 11520
578c21e6
PE
11521 Remove unnecessary casts.
11522 * xterm.c (x_term_init):
11523 * xfns.c (x_set_border_pixel):
11524 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
11525 These aren't needed now that we assume ANSI C.
11526
96f53c6c
PE
11527 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
11528 It's more likely to cause problems (due to unsigned overflow)
11529 than to cure them.
11530
83c77d31
PE
11531 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
11532
ee2079f1
PE
11533 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
11534
6da65536
PE
11535 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
11536
7147c4a4
PE
11537 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
11538
193e32d9
PE
11539 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
11540
e5533da6
PE
11541 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
11542
9910e595
PE
11543 GLYPH_CODE_FACE returns EMACS_INT, not int.
11544 * dispextern.h (merge_faces):
11545 * xfaces.c (merge_faces):
01103c44
PE
11546 * xdisp.c (get_next_display_element, next_element_from_display_vector):
11547 Don't assume EMACS_INT fits in int.
9910e595 11548
2638320e
PE
11549 * character.h (CHAR_VALID_P): Remove unused parameter.
11550 * fontset.c, lisp.h, xdisp.c: All uses changed.
11551
045eb8d9
PE
11552 * editfns.c (Ftranslate_region_internal): Omit redundant test.
11553
c1f134b5
PE
11554 * fns.c (concat): Minor tuning based on overflow analysis.
11555 This doesn't fix any bugs. Use int to hold character, instead
11556 of constantly refetching from Emacs object. Use XFASTINT, not
11557 XINT, for value known to be a character. Don't bother comparing
11558 a single byte to 0400, as it's always less.
11559
395fcb93 11560 * floatfns.c (Fexpt):
327eeec8
PE
11561 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
11562
abbd3d23
PE
11563 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
11564 for characters.
11565
684a03ef
PE
11566 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
11567
0fed43f3
PE
11568 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
11569 Without this fix, on a 64-bit host (aset S 0 4294967386) would
11570 incorrectly succeed when S was a string, because 4294967386 was
11571 truncated before it was used.
11572
8fd02eb7
PE
11573 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
11574 Otherwise, an out-of-range integer could cause undefined behavior
11575 on a 64-bit host.
11576
f8c86b69
PE
11577 * composite.c: Use int, not EMACS_INT, for characters.
11578 (fill_gstring_body, composition_compute_stop_pos): Use int, not
11579 EMACS_INT, for values that are known to be in character range.
11580 This doesn't fix any bugs but is the usual style inside Emacs and
11581 may generate better code on 32-bit machines.
11582
34206dd2
PE
11583 Make sure a 64-bit char is never passed to ENCODE_CHAR.
11584 This is for reasons similar to the recent CHAR_STRING fix.
11585 * charset.c (Fencode_char): Check that character arg is actually
11586 a character. Pass an int to ENCODE_CHAR.
11587 * charset.h (ENCODE_CHAR): Verify that the character argument is no
11588 wider than 'int', as a compile-time check to prevent future regressions
11589 in this area.
11590
c5958d4c 11591 * character.c (char_string): Remove unnecessary casts.
13bdea59
PE
11592
11593 Make sure a 64-bit char is never passed to CHAR_STRING.
11594 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
11595 by silently ignoring the top 32 bits, allowing some values
11596 that were far too large to be valid characters.
11597 * character.h: Include <verify.h>.
11598 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
11599 arguments are no wider than unsigned, as a compile-time check
11600 to prevent future regressions in this area.
11601 * data.c (Faset):
01103c44 11602 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
13bdea59
PE
11603 (Fsubst_char_in_region):
11604 * fns.c (concat):
11605 * xdisp.c (decode_mode_spec_coding):
11606 Adjust to CHAR_STRING's new requirement.
11607 * editfns.c (Finsert_char, Fsubst_char_in_region):
11608 * fns.c (concat): Check that character args are actually
11609 characters. Without this test, these functions did the wrong
11610 thing with wildly out-of-range values on 64-bit hosts.
11611
d37ca623
PE
11612 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
11613 These casts should not be needed on 32-bit hosts, either.
11614 * keyboard.c (read_char):
11615 * lread.c (Fload): Remove casts to unsigned.
11616
ea204efb
PE
11617 * lisp.h (UNSIGNED_CMP): New macro.
11618 This fixes comparison bugs on 64-bit hosts.
11619 (ASCII_CHAR_P): Use it.
11620 * casefiddle.c (casify_object):
01103c44 11621 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
ea204efb
PE
11622 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
11623 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
11624 * dispextern.h (FACE_FROM_ID):
11625 * keyboard.c (read_char): Use UNSIGNED_CMP.
11626
41cb286c
PE
11627 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
11628 not to EMACS_INT, to avoid GCC warning.
11629
4a1b9832
PE
11630 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
11631
55daad71
PE
11632 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
11633 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
11634 isn't needed on 32-bit machines.
8f95c75c 11635
01103c44
PE
11636 * buffer.c (Fgenerate_new_buffer_name):
11637 Use EMACS_INT for count, not int.
0ceccced 11638 (advance_to_char_boundary): Return EMACS_INT, not int.
e762cafe
PE
11639
11640 * data.c (Qcompiled_function): Now static.
11641
c6f072e7
PE
11642 * window.c (window_body_lines): Now static.
11643
20ce5912
PE
11644 * image.c (gif_load): Rename local to avoid shadowing.
11645
9c4c5f81
PE
11646 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
11647 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
11648 * alloc.c (make_save_value): Integer argument is now of type
11649 ptrdiff_t, not int.
11650 (mark_object): Use ptrdiff_t, not int.
11651 * lisp.h (pD): New macro.
11652 * print.c (print_object): Use it.
11653
c0c5c8ae
PE
11654 * alloc.c: Use EMACS_INT, not int, to count objects.
11655 (total_conses, total_markers, total_symbols, total_vector_size)
11656 (total_free_conses, total_free_markers, total_free_symbols)
01103c44
PE
11657 (total_free_floats, total_floats, total_free_intervals)
11658 (total_intervals, total_strings, total_free_strings):
c0c5c8ae
PE
11659 Now EMACS_INT, not int. All uses changed.
11660 (Fgarbage_collect): Compute overall total using a double, so that
11661 integer overflow is less likely to be a problem. Check for overflow
11662 when converting back to an integer.
5a25e253
PE
11663 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
11664 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
11665 These were 'int' variables that could overflow on 64-bit hosts;
11666 they were never used, so remove them instead of repairing them.
211a0b2a 11667 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
6349ae4d
PE
11668 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
11669 Previously, this ceilinged at INT_MAX, but that doesn't work on
11670 64-bit machines.
e46bb31a 11671 (allocate_pseudovector): Don't use EMACS_INT when int would do.
c0c5c8ae 11672
c78baabf 11673 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
86f61a15 11674 (allocate_vectorlike): Check for ptrdiff_t overflow.
b6439961
PE
11675 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
11676 when a (possibly-narrower) signed value would do just as well.
11677 We prefer using signed arithmetic, to avoid comparison confusion.
c78baabf 11678
c9d624c6
PE
11679 * alloc.c: Catch some string size overflows that we were missing.
11680 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
11681 for convenience in STRING_BYTES_MAX.
11682 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
11683 The definition here is exact; the one in lisp.h was approximate.
11684 (allocate_string_data): Check for string overflow. This catches
11685 some instances we weren't catching before. Also, it catches
11686 size_t overflow on (unusual) hosts where SIZE_MAX <= min
11687 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
11688 and ptrdiff_t and EMACS_INT are both 64 bits.
c78baabf 11689
c9d624c6
PE
11690 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
11691 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
640c8776 11692 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
c9d624c6 11693
353032ce
PE
11694 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
11695
2bccce07
PE
11696 * alloc.c (Fmake_string): Check for out-of-range init.
11697
0ac30604
SM
116982011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
11699
11700 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
11701
c195f2de
JD
117022011-06-14 Jan Djärv <jan.h.d@swipnet.se>
11703
11704 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
11705 xg_get_default_scrollbar_width.
11706
11707 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
11708 (int_gtk_range_get_value): Move to the scroll bar part of the file.
11709 (style_changed_cb): Call update_theme_scrollbar_width and call
11710 x_set_scroll_bar_default_width and xg_frame_set_char_size for
11711 all frames (Bug#8505).
11712 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
11713 Call gtk_window_set_resizable if HAVE_GTK3.
11714 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
11715 and height if HAVE_GTK3 (Bug#8505).
11716 (scroll_bar_width_for_theme): New variable.
11717 (update_theme_scrollbar_width): New function.
11718 (xg_get_default_scrollbar_width): Move code to
11719 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
11720 (xg_initialize): Call update_theme_scrollbar_width.
11721
11722 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
11723
11724 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
11725
e10ac9f1
MR
117262011-06-12 Martin Rudalics <rudalics@gmx.at>
11727
11728 * frame.c (make_frame): Call other_buffer_safely instead of
11729 other_buffer.
11730
11731 * window.c (temp_output_buffer_show): Call display_buffer with
11732 second argument Vtemp_buffer_show_specifiers and reset latter
11733 immediately after the call.
11734 (Vtemp_buffer_show_specifiers): New variable.
11735 (auto_window_vscroll_p, next_screen_context_lines)
11736 (Vscroll_preserve_screen_position): Remove leading asterisks from
11737 doc-strings.
11738
2d3c217e 117392011-06-12 Paul Eggert <eggert@cs.ucla.edu>
4475bec4 11740
7b7f97e8 11741 Fix minor problems found by GCC 4.6.0 static checking.
4475bec4
PE
11742 * buffer.c (Qclone_number): Remove for now, as it's unused.
11743 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
11744 (record_buffer): Remove unused local.
11745 * frame.c (other_visible_frames, frame_buffer_list): Now static.
11746 (set_frame_buffer_list): Remove; unused.
11747 * frame.h (other_visible_frames): Remove decl.
11748 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
11749 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
11750 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
11751 if HAVE_GPM.
11752 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
11753 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
11754 Define only if HAVE_GPM.
11755 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
11756 (update_hints_inhibit): Remove; never set. All uses removed.
11757 * widgetprv.h (emacsFrameClassRec): Remove decl.
11758 * window.c (delete_deletable_window): Now returns void, since it
11759 wasn't returning anything.
11760 (compare_window_configurations): Remove unused locals.
11761 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
11762 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
4475bec4
PE
11763 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
11764 the same widths as pointers. This follows up on the 2011-05-06 patch.
11765 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
11766 * xterm.h: Likewise.
11767 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
11768
1384b89e
JB
117692011-06-12 Juanma Barranquero <lekktu@gmail.com>
11770
11771 * makefile.w32-in: Update dependencies.
11772 (LISP_H): Add lib/intprops.h.
11773
1100a63c
CY
117742011-06-11 Chong Yidong <cyd@stupidchicken.com>
11775
11776 * image.c (gif_load): Add animation frame delay to the metadata.
11777 (syms_of_image): Use DEFSYM. New symbol `delay'.
11778
6198ccd0
MR
117792011-06-11 Martin Rudalics <rudalics@gmx.at>
11780
11781 * window.c (delete_deletable_window): Re-add.
11782 (Fset_window_configuration): Rewrite to handle dead buffers and
11783 consequently deletable windows.
11784 (window_tree, Fwindow_tree): Remove. Supply functionality in
11785 window.el.
11786 (compare_window_configurations): Simplify code.
11787
b6e3633c
AS
117882011-06-11 Andreas Schwab <schwab@linux-m68k.org>
11789
1ab0dee5
AS
11790 * image.c (imagemagick_load_image): Fix type mismatch.
11791 (Fimagemagick_types): Likewise.
11792
b6e3633c
AS
11793 * window.h (replace_buffer_in_windows): Declare.
11794
9397e56f
MR
117952011-06-11 Martin Rudalics <rudalics@gmx.at>
11796
11797 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
11798 Qclone_number. Remove external declaration of Qdelete_window.
11799 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
11800 code.
640c8776
SM
11801 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
11802 Run Qbuffer_list_update_hook if allowed.
9397e56f
MR
11803 (Fother_buffer): Rewrite doc-string. Major rewrite for new
11804 buffer list implementation.
11805 (other_buffer_safely): New function.
11806 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
11807 calls to replace_buffer_in_windows and
11808 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
11809 if allowed.
11810 (record_buffer): Inhibit quitting and rewrite using quittable
11811 functions. Run Qbuffer_list_update_hook if allowed.
11812 (Frecord_buffer, Funrecord_buffer): New functions.
640c8776
SM
11813 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
11814 Move switch-to-buffer to window.el.
9397e56f
MR
11815 (bury-buffer): Move to window.el.
11816 (Vbuffer_list_update_hook): New variable.
11817
11818 * lisp.h (other_buffer_safely): Add prototype in buffer.c
11819 section.
11820
11821 * window.h (resize_frame_windows): Move up in code.
11822 (Fwindow_frame): Remove EXFUN.
11823 (replace_buffer_in_all_windows): Remove prototype.
11824 (replace_buffer_in_windows_safely): Add prototype.
11825
11826 * window.c: Declare Qdelete_window static again. Move down
11827 declaration of select_count.
11828 (Fnext_window, Fprevious_window): Rewrite doc-strings.
11829 (Fother_window): Move to window.el.
11830 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
11831 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
11832 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
11833 window.el.
11834 (replace_buffer_in_windows): Implement by calling
11835 Qreplace_buffer_in_windows.
11836 (replace_buffer_in_all_windows): Remove with some functionality
11837 moved into replace_buffer_in_windows_safely.
11838 (replace_buffer_in_windows_safely): New function.
11839 (select_window_norecord, select_frame_norecord): Move in front
11840 of run_window_configuration_change_hook. Remove now obsolete
11841 declarations.
640c8776
SM
11842 (Fset_window_buffer): Rewrite doc-string.
11843 Call Qrecord_window_buffer.
9397e56f
MR
11844 (keys_of_window): Move binding for other-window to window.el.
11845
b50691aa
CY
118462011-06-11 Chong Yidong <cyd@stupidchicken.com>
11847
11848 * dispextern.h (struct image): Replace data member, whose int_val
11849 and ptr_val fields were not used by anything, with a single
11850 lisp_val object.
11851
11852 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
11853 (gif_clear_image, gif_load, imagemagick_load_image)
11854 (gs_clear_image, gs_load): Callers changed.
11855
3f754b86
PE
118562011-06-10 Paul Eggert <eggert@cs.ucla.edu>
11857
cca69397
PE
11858 * buffer.h: Include <time.h>, for time_t.
11859 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
11860
109e28d0
PE
11861 Fix minor problems found by static checking.
11862
60737f02
PE
11863 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
11864
4b66faf3
PE
11865 Make identifiers static if they are not used in other modules.
11866 * data.c (Qcompiled_function, Qframe, Qvector):
11867 * image.c (QimageMagick, Qsvg):
11868 * minibuf.c (Qmetadata):
11869 * window.c (resize_window_check, resize_root_window): Now static.
11870 * window.h (resize_window_check, resize_root_window): Remove decls.
11871
109e28d0
PE
11872 * window.c (window_deletion_count, delete_deletable_window):
11873 Remove; unused.
46a4ce9e
PE
11874 (window_body_lines): Now static.
11875 (Fdelete_other_windows_internal): Mark vars as initialized.
11876 Make sure 'resize_failed' is initialized.
11877 (run_window_configuration_change_hook): Rename local to avoid shadowing.
11878 (resize_window_apply): Remove unused local.
11879 * window.h (delete_deletable_window): Remove decl.
11880
109e28d0 11881 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
33290528
PE
11882 (imagemagick_load_image): Fix pointer signedness problem by changing
11883 last arg from unsigned char * to char *. All uses changed.
11884 Also, fix a local for similar reasons.
11885 Remove unused locals. Remove locals to avoid shadowing.
11886 (fn_rsvg_handle_free): Remove; unused.
11887 (svg_load, svg_load_image): Fix pointer signedness problem.
f7e13da3 11888 (imagemagick_load_image): Don't use garbage pointer image_wand.
33290528 11889
3f754b86
PE
11890 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
11891
2547adb1
CY
118922011-06-10 Chong Yidong <cyd@stupidchicken.com>
11893
11894 * image.c (gif_load): Fix omitted cast error introduced by
11895 2011-06-06 change.
11896
2c8e37d4
MR
118972011-06-10 Martin Rudalics <rudalics@gmx.at>
11898
11899 * window.h (resize_proportionally, orig_total_lines)
11900 (orig_top_line): Remove from window structure.
11901 (set_window_height, set_window_width, change_window_heights)
11902 (Fdelete_window): Remove prototypes.
11903 (resize_frame_windows): Remove duplicate declaration.
11904
440a42e3
EZ
119052011-06-10 Eli Zaretskii <eliz@gnu.org>
11906
11907 * window.h (resize_frame_windows, resize_window_check)
11908 (delete_deletable_window, resize_root_window)
11909 (resize_frame_windows): Declare prototypes.
11910
11911 * window.c (resize_window_apply): Make definition be "static" to
11912 match the prototype.
11913
562dd5e9
MR
119142011-06-10 Martin Rudalics <rudalics@gmx.at>
11915
11916 * window.c: Remove declarations of Qwindow_size_fixed,
11917 window_min_size_1, window_min_size_2, window_min_size,
11918 size_window, window_fixed_size_p, enlarge_window, delete_window.
11919 Remove static from declaration of Qdelete_window, it's
11920 temporarily needed by Fbury_buffer.
11921 (replace_window): Don't assign orig_top_line and
11922 orig_total_lines.
11923 (Fdelete_window, delete_window): Remove. Window deletion is
11924 handled by window.el.
640c8776
SM
11925 (window_loop): Remove DELETE_OTHER_WINDOWS case.
11926 Replace Fdelete_window calls with calls to Qdelete_window.
562dd5e9
MR
11927 (Fdelete_other_windows): Remove. Deleting other windows is
11928 handled by window.el.
11929 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
11930 handled in window.el.
11931 (window_min_size_2, window_min_size_1, window_min_size): Remove.
11932 Window minimum sizes are handled in window.el.
11933 (shrink_windows, size_window, set_window_height)
11934 (set_window_width, change_window_heights, window_height)
11935 (window_width, CURBEG, CURSIZE, enlarge_window)
11936 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
11937 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
11938 handled in window.el.
11939 (make_dummy_parent): Rename to make_parent_window and give it a
11940 second argument horflag.
11941 (make_window): Don't set resize_proportionally any more.
11942 (Fsplit_window): Remove. Windows are split in window.el.
11943 (save_restore_action, save_restore_orig_size)
11944 (shrink_window_lowest_first, save_restore_orig_size): Remove.
11945 Resize mini windows in window.el.
11946 (grow_mini_window, shrink_mini_window): Implement by calling
11947 Qresize_root_window_vertically, resize_window_check and
11948 resize_window_apply.
640c8776
SM
11949 (saved_window, Fset_window_configuration, save_window_save):
11950 Do not handle orig_top_line, orig_total_lines, and
562dd5e9
MR
11951 resize_proportionally.
11952 (window_min_height, window_min_width): Move to window.el.
11953 (keys_of_window): Move bindings for delete-other-windows,
11954 split-window, delete-window and enlarge-window to window.el.
11955
11956 * buffer.c: Temporarily extern Qdelete_window.
11957 (Fbury_buffer): Temporarily call Qdelete_window instead of
11958 Fdelete_window (Fbury_buffer will move to window.el soon).
11959
11960 * frame.c (set_menu_bar_lines_1): Remove code handling
11961 orig_top_line and orig_total_lines.
11962
11963 * dispnew.c (adjust_frame_glyphs_initially): Don't use
11964 set_window_height but set heights directly.
11965 (change_frame_size_1): Use resize_frame_windows.
11966
11967 * xdisp.c (init_xdisp): Don't use set_window_height but set
11968 heights directly.
11969
640c8776
SM
11970 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
11971 Use resize_frame_windows instead of change_window_heights and run
562dd5e9
MR
11972 run_window_configuration_change_hook.
11973
11974 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
11975 instead of change_window_heights and run
11976 run_window_configuration_change_hook.
11977
1a13852e
MR
119782011-06-09 Martin Rudalics <rudalics@gmx.at>
11979
11980 * window.c (replace_window): Rename second argument REPLACEMENT to
11981 NEW. New third argument SETFLAG. Rewrite.
11982 (delete_window, make_dummy_parent): Call replace_window with
11983 third argument 1.
11984 (window_list_1): Move down in code.
11985 (run_window_configuration_change_hook): Move set_buffer part
11986 before select_frame_norecord part in order to unwind correctly.
11987 Rename count1 to count.
11988 (recombine_windows, delete_deletable_window, resize_root_window)
11989 (Fdelete_other_windows_internal)
11990 (Frun_window_configuration_change_hook, make_parent_window)
11991 (resize_window_check, resize_window_apply, Fresize_window_apply)
11992 (resize_frame_windows, Fsplit_window_internal)
640c8776
SM
11993 (Fdelete_window_internal, Fresize_mini_window_internal):
11994 New functions.
1a13852e
MR
11995 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
11996
f3d1777e
MR
119972011-06-08 Martin Rudalics <rudalics@gmx.at>
11998
496e208e
MR
11999 * window.h (window): Add some new members to window structure -
12000 normal_lines, normal_cols, new_total, new_normal, clone_number,
12001 splits, nest, prev_buffers, next_buffers.
12002 (WINDOW_TOTAL_SIZE): Move here from window.c.
b9e809c2 12003 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
496e208e 12004
f3d1777e
MR
12005 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
12006 Remove.
496e208e
MR
12007 (make_dummy_parent): Set new members of windows structure.
12008 (make_window): Move down in code. Handle new members of window
12009 structure.
12010 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
12011 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
12012 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
12013 (Fset_window_prev_buffers, Fwindow_next_buffers)
640c8776
SM
12014 (Fset_window_next_buffers, Fset_window_clone_number):
12015 New functions.
496e208e
MR
12016 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
12017 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
12018 Doc-string fixes.
12019 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
12020 Argument WINDOW can be now internal window too.
12021 (Fwindow_use_time): Move up in code.
12022 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
12023 Rewrite doc-string.
12024 (Fset_window_configuration, saved_window)
12025 (Fcurrent_window_configuration, save_window_save): Handle new
12026 members of window structure.
b9e809c2
MR
12027 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
12028 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
12029 (syms_of_window): New Lisp objects Qrecord_window_buffer,
12030 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
12031 Qget_mru_window, Qresize_root_window,
12032 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
12033 Qauto_buffer_name; staticpro them.
f3d1777e 12034
abde8f8c
MR
120352011-06-07 Martin Rudalics <rudalics@gmx.at>
12036
12037 * window.c (Fwindow_total_size, Fwindow_left_column)
12038 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
12039 (Fwindow_list_1): New functions.
12040 (window_box_text_cols): Replace with window_body_cols.
640c8776
SM
12041 (Fwindow_width, Fscroll_left, Fscroll_right):
12042 Use window_body_cols instead of window_box_text_cols.
12043 (delete_window, Fset_window_configuration):
12044 Call delete_all_subwindows with window as argument.
fa8a67e6
MR
12045 (delete_all_subwindows): Take a window as argument and not a
12046 structure. Rewrite.
190b47e6
MR
12047 (window_loop): Remove handling of GET_LRU_WINDOW and
12048 GET_LARGEST_WINDOW.
12049 (Fget_lru_window, Fget_largest_window): Move to window.el.
abde8f8c
MR
12050
12051 * window.h: Extern window_body_cols instead of
fa8a67e6
MR
12052 window_box_text_cols. delete_all_subwindows now takes a
12053 Lisp_Object as argument.
abde8f8c 12054
640c8776
SM
12055 * indent.c (compute_motion, Fcompute_motion):
12056 Use window_body_cols instead of window_box_text_cols.
abde8f8c 12057
fa8a67e6
MR
12058 * frame.c (delete_frame): Call delete_all_subwindows with root
12059 window as argument.
12060
a54e3482
DC
120612011-06-07 Daniel Colascione <dan.colascione@gmail.com>
12062
12063 * fns.c (Fputhash): Document return value.
12064
60002bf5
CY
120652011-06-06 Chong Yidong <cyd@stupidchicken.com>
12066
12067 * image.c (gif_load): Implement gif89a spec "no disposal" method.
12068
0c671da6 120692011-06-06 Paul Eggert <eggert@cs.ucla.edu>
ccd9a01a 12070
b862a52a 12071 Cons<->int and similar integer overflow fixes (Bug#8794).
77984278 12072
be44ca6c
PE
12073 Check for overflow when converting integer to cons and back.
12074 * charset.c (Fdefine_charset_internal, Fdecode_char):
12075 Use cons_to_unsigned to catch overflow.
12076 (Fencode_char): Use INTEGER_TO_CONS.
12077 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
12078 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
12079 * data.c (long_to_cons, cons_to_long): Remove.
12080 (cons_to_unsigned, cons_to_signed): New functions.
12081 These signal an error for invalid or out-of-range values.
12082 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
12083 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
12084 * font.c (Ffont_variation_glyphs):
12085 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
12086 * lisp.h: Include <intprops.h>.
12087 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
12088 (cons_to_signed, cons_to_unsigned): New decls.
12089 (long_to_cons, cons_to_long): Remove decls.
12090 * undo.c (record_first_change): Use INTEGER_TO_CONS.
12091 (Fprimitive_undo): Use CONS_TO_INTEGER.
12092 * xfns.c (Fx_window_property): Likewise.
12093 * xselect.c: Include <limits.h>.
12094 (x_own_selection, selection_data_to_lisp_data):
12095 Use INTEGER_TO_CONS.
12096 (x_handle_selection_request, x_handle_selection_clear)
12097 (x_get_foreign_selection, Fx_disown_selection_internal)
12098 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
12099 (lisp_data_to_selection_data): Use cons_to_unsigned.
12100 (x_fill_property_data): Use cons_to_signed.
12101 Report values out of range.
12102
d1f3d2af
PE
12103 Check for buffer and string overflow more precisely.
12104 * buffer.h (BUF_BYTES_MAX): New macro.
12105 * lisp.h (STRING_BYTES_MAX): New macro.
12106 * alloc.c (Fmake_string):
12107 * character.c (string_escape_byte8):
12108 * coding.c (coding_alloc_by_realloc):
12109 * doprnt.c (doprnt):
12110 * editfns.c (Fformat):
12111 * eval.c (verror):
12112 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
12113 since they may not be the same number.
12114 * editfns.c (Finsert_char):
12115 * fileio.c (Finsert_file_contents):
12116 Likewise for BUF_BYTES_MAX.
12117
dd52fcea
PE
12118 * image.c: Use ptrdiff_t, not int, for sizes.
12119 (slurp_file): Switch from int to ptrdiff_t.
12120 All uses changed.
12121 (slurp_file): Check that file size fits in both size_t (for
12122 malloc) and ptrdiff_t (for sanity and safety).
12123
7f9bbdbb
PE
12124 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
12125 if b->modtime has its maximal value.
12126
dfe18f82
PE
12127 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
12128
84acfcf0
PE
12129 Don't assume time_t can fit into int.
12130 * buffer.h (struct buffer.modtime): Now time_t, not int.
12131 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
12132 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
12133
ccd9a01a
PE
12134 Minor fixes for signed vs unsigned integers.
12135 * character.h (MAYBE_UNIFY_CHAR):
12136 * charset.c (maybe_unify_char):
12137 * keyboard.c (read_char, reorder_modifiers):
12138 XINT -> XFASTINT, since the integer must be nonnegative.
12139 * ftfont.c (ftfont_spec_pattern):
12140 * keymap.c (access_keymap, silly_event_symbol_error):
12141 XUINT -> XFASTINT, since the integer must be nonnegative.
12142 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
12143 since it makes no difference and we prefer signed.
12144 * keyboard.c (record_char): Use XUINT when all the neighbors do.
12145 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
12146 nonnegative.
12147
d6d100dd
SM
121482011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
12149
12150 * window.h (Fwindow_frame): Declare.
12151
2b6148e4
PE
121522011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12153
12154 * alloc.c: Simplify handling of large-request failures (Bug#8800).
12155 (SPARE_MEMORY): Always define.
12156 (LARGE_REQUEST): Remove.
12157 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
12158
f230ecc9
MR
121592011-06-06 Martin Rudalics <rudalics@gmx.at>
12160
727e958e
MR
12161 * lisp.h: Move EXFUNS for Fframe_root_window,
12162 Fframe_first_window and Fset_frame_selected_window to window.h.
12163
12164 * window.h: Move EXFUNS for Fframe_root_window,
12165 Fframe_first_window and Fset_frame_selected_window here from
12166 lisp.h.
12167
12168 * frame.c (Fwindow_frame, Fframe_first_window)
12169 (Fframe_root_window, Fframe_selected_window)
12170 (Fset_frame_selected_window): Move to window.c.
12171 (Factive_minibuffer_window): Move to minibuf.c.
12172 (Fother_visible_frames_p): New function.
12173
12174 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
12175
f230ecc9
MR
12176 * window.c (decode_window, decode_any_window): Move up in code.
12177 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
12178 (inhibit_frame_unsplittable): Remove unused variable.
bf60a96b
MR
12179 (Fwindow_buffer): Move up and rewrite doc-string.
12180 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
12181 (Fwindow_prev): New functions.
727e958e
MR
12182 (Fwindow_frame): Move here from frame.c. Accept any window as
12183 argument.
12184 (Fframe_root_window, Fframe_first_window)
12185 (Fframe_selected_window): Move here from frame.c. Accept frame
12186 or arbitrary window as argument. Update doc-strings.
12187 (Fminibuffer_window): Move up in code.
12188 (Fwindow_minibuffer_p): Move up in code and simplify.
d6d100dd
SM
12189 (Fset_frame_selected_window): Move here from frame.c.
12190 Marginal rewrite.
727e958e
MR
12191 (Fselected_window, select_window, Fselect_window): Move up in
12192 code. Minor doc-string fixes.
f230ecc9 12193
4d09bcf6
PE
121942011-06-06 Paul Eggert <eggert@cs.ucla.edu>
12195
12196 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
12197 Do not assume that spare memory exists; that assumption is valid
12198 only if SYSTEM_MALLOC.
12199 (LARGE_REQUEST): New macro, so that the issue of large requests
12200 is separated from the issue of spare memory.
12201
810928a2
AS
122022011-06-05 Andreas Schwab <schwab@linux-m68k.org>
12203
172418ad
AS
12204 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
12205 format. (Bug#8806)
12206
43f862f7
AS
12207 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
12208
810928a2
AS
12209 * xfns.c (x_set_scroll_bar_default_width): Move declarations
12210 before statements.
12211
a059fe24
JD
122122011-06-05 Jan Djärv <jan.h.d@swipnet.se>
12213
12214 * gtkutil.c (xg_get_default_scrollbar_width): New function.
12215
12216 * gtkutil.h: Declare xg_get_default_scrollbar_width.
12217
12218 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
12219 min width by calling x_set_scroll_bar_default_width (Bug#8505).
12220
989bf368
JB
122212011-06-05 Juanma Barranquero <lekktu@gmail.com>
12222
12223 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
12224
4b80f674
CY
122252011-06-04 Chong Yidong <cyd@stupidchicken.com>
12226
12227 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
12228 (x_clipboard_manager_save): Add return value.
d6d100dd
SM
12229 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
12230 New error handlers.
4b80f674
CY
12231 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
12232 Obey Vx_select_enable_clipboard_manager. Catch errors in
12233 x_clipboard_manager_save (Bug#8779).
12234 (Vx_select_enable_clipboard_manager): New variable.
de65b42c 12235 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
4b80f674 12236
99a33b77 122372011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
8b3115e7
DN
12238
12239 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
12240
99a33b77 122412011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14eca62f
YM
12242
12243 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
12244 in the current matrix if keep_current_p is non-zero.
12245
8264569d
EZ
122462011-06-04 Eli Zaretskii <eliz@gnu.org>
12247
12248 * bidi.c (bidi_level_of_next_char): Fix last change.
12249
57f97249
EZ
122502011-06-03 Eli Zaretskii <eliz@gnu.org>
12251
fec2107c 12252 Support bidi reordering of text covered by display properties.
57f97249 12253
fec2107c
EZ
12254 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
12255 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
12256 (bidi_cache_search, bidi_cache_iterator_state)
12257 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
d6d100dd
SM
12258 (bidi_level_of_next_char, bidi_move_to_visually_next):
12259 Support character positions inside a run of characters covered by a
fec2107c
EZ
12260 display string.
12261 (bidi_paragraph_init, bidi_resolve_explicit_1)
12262 (bidi_level_of_next_char): Call bidi_fetch_char and
12263 bidi_fetch_char_advance instead of FETCH_CHAR and
12264 FETCH_CHAR_ADVANCE.
12265 (bidi_init_it): Initialize new members.
12266 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
12267 definitions.
12268 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
12269 instead of using explicit *_CHAR codes.
d6d100dd
SM
12270 (bidi_resolve_explicit, bidi_resolve_weak):
12271 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
fec2107c
EZ
12272 bidirectional text is supported only in multibyte buffers.
12273 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
12274 it to initialize the frame_window_p member of struct bidi_it.
12275 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
12276 (bidi_resolve_explicit, bidi_resolve_weak)
12277 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
12278 bidi_it->nchars is non-positive.
12279 (bidi_level_of_next_char): Don't try to lookup the cache for the
12280 next/previous character if nothing is cached there yet, or if we
12281 were just reseat()'ed to a new position.
c40e2fb2 12282
0e14fe90
EZ
12283 * xdisp.c (set_cursor_from_row): Set start and stop points
12284 according to the row's direction when priming the loop that looks
12285 for the glyph on which to display cursor.
12286 (single_display_spec_intangible_p): Function deleted.
12287 (display_prop_intangible_p): Reimplement to call
12288 handle_display_spec instead of single_display_spec_intangible_p.
d6d100dd
SM
12289 Accept 3 additional arguments needed by handle_display_spec.
12290 This fixes incorrect cursor motion across display property with complex
0e14fe90
EZ
12291 values: lists, `(when COND...)' forms, etc.
12292 (single_display_spec_string_p): Support property values that are
12293 lists with the argument STRING its top-level element.
12294 (display_prop_string_p): Fix the condition for processing a
12295 property that is a list to be consistent with handle_display_spec.
fec2107c 12296 (handle_display_spec): New function, refactored from the
fc6f18ce
EZ
12297 last portion of handle_display_prop.
12298 (compute_display_string_pos): Accept additional argument
12299 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
12300 value of a `display' property is a "replacing spec".
12301 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
12302 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
12303 the display property, but just return a value indicating whether
12304 the display property will replace the characters it covers.
12305 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
12306 frame_window_p members of struct bidi_it.
d6d100dd
SM
12307 (compute_display_string_pos, compute_display_string_end):
12308 New functions.
fec2107c
EZ
12309 (push_it): Accept second argument POSITION, where pop_it should
12310 jump to continue iteration.
12311 (reseat_1): Initialize bidi_it.disp_pos.
fc6f18ce 12312
fec2107c
EZ
12313 * keyboard.c (adjust_point_for_property): Adjust the call to
12314 display_prop_intangible_p to its new signature.
fc6f18ce
EZ
12315
12316 * dispextern.h (struct bidi_it): New member frame_window_p.
fec2107c
EZ
12317 (bidi_init_it): Update prototypes.
12318 (display_prop_intangible_p): Update prototype.
d6d100dd
SM
12319 (compute_display_string_pos, compute_display_string_end):
12320 Declare prototypes.
fec2107c
EZ
12321 (struct bidi_it): New members nchars and disp_pos. ch_len is now
12322 EMACS_INT.
fc6f18ce 12323
40087514 123242011-06-02 Paul Eggert <eggert@cs.ucla.edu>
0de4bb68 12325
57f53182
PE
12326 Malloc failure behavior now depends on size of allocation.
12327 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
12328 * lisp.h: Change signatures accordingly.
12329 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
12330 All callers changed. (Bug#8762)
12331
12332 * gnutls.c: Use Emacs's memory allocators.
12333 Without this change, the gnutls library would invoke malloc etc.
12334 directly, which causes problems on non-SYNC_INPUT hosts, and which
12335 runs afoul of improving memory_full behavior. (Bug#8761)
12336 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
12337 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
12338 xfree instead of the default malloc, realloc, free.
12339 (Fgnutls_boot): No need to check for memory allocation failure,
12340 since xmalloc does that for us.
12341
ac32cd99 12342 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
3870d916
PE
12343 * category.c (hash_get_category_set):
12344 * ccl.c (ccl_driver):
12345 * charset.c (Fdefine_charset_internal):
12346 * charset.h (struct charset.hash_index):
12347 * composite.c (get_composition_id, gstring_lookup_cache)
12348 (composition_gstring_put_cache):
12349 * composite.h (struct composition.hash_index):
12350 * dispextern.h (struct image.hash):
12351 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
12352 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
12353 (hashfn_equal, hashfn_user_defined, make_hash_table)
12354 (maybe_resize_hash_table, hash_lookup, hash_put)
12355 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
12356 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
12357 (Fsxhash, Fgethash, Fputhash, Fmaphash):
12358 * image.c (make_image, search_image_cache, lookup_image)
12359 (xpm_put_color_table_h):
12360 * lisp.h (struct Lisp_Hash_Table):
0de4bb68 12361 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
ac389d0c 12362 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
3870d916 12363 for hashes and hash indexes, instead of 'unsigned' and 'int'.
40087514
PE
12364 * alloc.c (allocate_vectorlike):
12365 Check for overflow in vector size calculations.
12366 * ccl.c (ccl_driver):
12367 Check for overflow when converting EMACS_INT to int.
0de4bb68
PE
12368 * fns.c, image.c: Remove unnecessary static decls that would otherwise
12369 need to be updated by these changes.
40087514
PE
12370 * fns.c (make_hash_table, maybe_resize_hash_table):
12371 Check for integer overflow with large hash tables.
0de4bb68
PE
12372 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
12373 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
12374 (SXHASH_REDUCE): New macro.
12375 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
12376 Use it instead of discarding useful hash info with large hash values.
12377 (sxhash_float): New function.
12378 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
12379 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
40087514
PE
12380 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
12381 Rewrite to use FIXNUM_BITS, as this simplifies things.
0de4bb68
PE
12382 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
12383 Adjust signatures to match updated version of code.
12384 (consing_since_gc): Now EMACS_INT, since a single hash table can
12385 use more than INT_MAX bytes.
12386
698d32e2
DN
123872011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
12388
12389 Make it possible to build with GCC-4.6+ -O2 -flto.
12390
12391 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
12392
fd6fa53f
SM
123932011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
12394
12395 * minibuf.c (get_minibuffer, read_minibuf_unwind):
12396 Call minibuffer-inactive-mode.
12397
864db017
JB
123982011-05-31 Juanma Barranquero <lekktu@gmail.com>
12399
12400 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
12401 Update dependencies.
12402
2ad0baf4
DN
124032011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12404
12405 * data.c (init_data): Remove code for UTS, this system is not
12406 supported anymore.
12407
4fcc2638
DN
124082011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12409
12410 Don't force ./temacs to start in terminal mode.
12411
12412 * frame.c (make_initial_frame): Initialize faces in all cases, not
12413 only when CANNOT_DUMP is defined.
12414 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
12415
c56e0fd5
DN
124162011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12417
12418 * dispnew.c (add_window_display_history): Use const for the string
12419 pointer. Remove declaration, not needed.
12420
333d54da 124212011-05-31 Paul Eggert <eggert@cs.ucla.edu>
9cf9f756 12422
55d4c1b2 12423 Use 'inline', not 'INLINE'.
333d54da 12424 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
55d4c1b2
PE
12425 * alloc.c, fontset.c (INLINE): Remove.
12426 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
12427 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
12428 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
12429 * gmalloc.c (register_heapinfo): Use inline unconditionally.
12430 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
12431
738db178
DN
124322011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
12433
12434 Make it possible to run ./temacs.
12435
12436 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
12437 syms_of_callproc does the same thing. Remove test for
12438 "initialized", do it in the caller.
12439 * emacs.c (main): Avoid calling set_initial_environment when dumping.
12440
620c53a6
SM
124412011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
12442
12443 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
12444 (read_minibuf): Use get_minibuffer.
12445 (syms_of_minibuf): Use DEFSYM.
12446 (Qmetadata): New var.
12447 * data.c (Qbuffer): Don't make it static.
12448 (syms_of_data): Use DEFSYM.
12449
e003a292
PE
124502011-05-31 Paul Eggert <eggert@cs.ucla.edu>
12451
12452 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
12453 (CCL_CODE_MIN): New macro.
12454
ed008a6d
PE
124552011-05-30 Paul Eggert <eggert@cs.ucla.edu>
12456
3687c2ef
PE
12457 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
12458
ed008a6d
PE
12459 * eval.c (Qdebug): Now static.
12460 * lisp.h (Qdebug): Remove decl. This reverts a part of the
12461 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
12462 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
12463
d66c4c7c
CY
124642011-05-29 Chong Yidong <cyd@stupidchicken.com>
12465
12466 * image.c: Various fixes to ImageMagick code comments.
12467 (Fimagemagick_types): Doc fix.
12468
5fbc2025
PE
124692011-05-29 Paul Eggert <eggert@cs.ucla.edu>
12470
0196f88a
PE
12471 Minor fixes prompted by GCC 4.6.0 warnings.
12472
12473 * xselect.c (converted_selections, conversion_fail_tag): Now static.
12474
5fbc2025
PE
12475 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
12476 (x_clipboard_manager_save_all): Move extern decl to ...
12477 * xterm.h: ... here, so that it can be checked for consistency.
12478
1dd3c2d9
CY
124792011-05-29 Chong Yidong <cyd@stupidchicken.com>
12480
12481 * xselect.c (x_clipboard_manager_save_frame)
12482 (x_clipboard_manager_save_all): New functions.
12483 (Fx_clipboard_manager_save): Lisp function deleted.
12484
12485 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
12486 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
12487
12488 * xterm.h: Update prototype.
12489
5ba6571d
WX
124902011-05-28 William Xu <william.xwl@gmail.com>
12491
12492 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
12493 exiting (Bug#8239).
12494
3eaff834
JM
124952011-05-28 Jim Meyering <meyering@redhat.com>
12496
e1900994 12497 Avoid a sign-extension bug in crypto_hash_function.
3eaff834
JM
12498 * fns.c (to_uchar): Define.
12499 (crypto_hash_function): Use it to convert some newly-signed
12500 variables to unsigned, to avoid sign-extension bugs. For example,
12501 without this change, (md5 "truc") would evaluate to
12502 45723a2aff78ff4fff7fff1114760e62 rather than the expected
12503 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
e1900994 12504 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
3eaff834 12505
0f6990a7
PE
125062011-05-27 Paul Eggert <eggert@cs.ucla.edu>
12507
12508 Integer overflow fixes.
c8a9ca5a 12509
08686060
PE
12510 * dbusbind.c: Serial number integer overflow fixes.
12511 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
08686060
PE
12512 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
12513 to hold a serial number that is too large for a fixnum.
12514 (Fdbus_method_return_internal, Fdbus_method_error_internal):
12515 Check for serial numbers out of range. Decode any serial number
59568bf0 12516 that was so large that it became a float. (Bug#8722)
08686060 12517
2d1fc3c7
PE
12518 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
12519 (Fdbus_call_method, Fdbus_call_method_asynchronously):
12520 Use XFASTINT rather than XUINT when numbers are nonnegative.
12521 (xd_append_arg, Fdbus_method_return_internal):
12522 (Fdbus_method_error_internal): Likewise. Also, for unsigned
12523 arguments, check that Lisp number is nonnegative, rather than
59568bf0 12524 silently wrapping negative numbers around. (Bug#8722)
30217ff0 12525 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
59568bf0 12526 (Bug#8722)
2d1fc3c7 12527
c8a9ca5a
PE
12528 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
12529
519e1d69
PE
12530 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
12531
6df6ae42 12532 ccl: Add integer overflow checks.
30569699
PE
12533 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
12534 (IN_INT_RANGE): New macros.
12535 (ccl_driver): Use them to check for integer overflow when
12536 decoding a CCL program. Many of the new checks are whether XINT (x)
12537 fits in int; it doesn't always, on 64-bit hosts. The new version
12538 doesn't catch all possible integer overflows, but it's an
847044ea 12539 improvement. (Bug#8719)
30569699 12540
c11285dc
PE
12541 * alloc.c (make_event_array): Use XINT, not XUINT.
12542 There's no need for unsigned here.
12543
fdccd48e
PE
12544 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
12545 This follows up to the 2011-05-06 change that substituted uintptr_t
12546 for EMACS_INT. This case wasn't caught back then.
12547
37910ab2
PE
12548 Rework Fformat to avoid integer overflow issues.
12549 * editfns.c: Include <float.h> unconditionally, as it's everywhere
12550 now (part of C89). Include <verify.h>.
12551 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
12552 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
12553 (Fformat): Avoid the prepass trying to compute sizes; it was only
12554 approximate and thus did not catch overflow reliably. Instead, walk
12555 through the format just once, formatting and computing sizes as we go,
12556 checking for integer overflow at every step, and allocating a larger
12557 buffer as needed. Keep track separately whether the format is
12558 multibyte. Keep only the most-recently calculated precision, rather
12559 than them all. Record whether each argument has been converted to
12560 string. Use EMACS_INT, not int, for byte and char and arg counts.
12561 Support field widths and precisions larger than INT_MAX. Avoid
12562 sprintf's undefined behavior with conversion specifications such as %#d
12563 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
12564 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
12565 formatting out-of-range floating point numbers with int
9173deec 12566 formats. (Bug#8668)
37910ab2 12567
2e6578fb
PE
12568 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
12569
0ae6bdee
PE
12570 * data.c: Avoid integer truncation in expressions involving floats.
12571 * data.c: Include <intprops.h>.
12572 (arith_driver): When there's an integer overflow in an expression
12573 involving floating point, convert the integers to floating point
12574 so that the resulting value does not suffer from catastrophic
12575 integer truncation. For example, on a 64-bit host (* 4
12576 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
12577 Do not rely on undefined behavior after integer overflow.
12578
de883a70
PE
12579 merge count_size_as_multibyte, parse_str_to_multibyte
12580 * character.c, character.h (count_size_as_multibyte):
fd6fa53f 12581 Rename from parse_str_to_multibyte; all uses changed.
de883a70
PE
12582 Check for integer overflow.
12583 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
12584 since it's now a duplicate of the other. This is more of
12585 a character than a buffer op, so better that it's in character.c.
12586 * fns.c, print.c: Adjust to above changes.
12587
2ff916cb
PE
125882011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
12589
12590 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
12591
f1b54466
PE
125922011-05-27 Paul Eggert <eggert@cs.ucla.edu>
12593
fb1ac845
PE
12594 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
12595 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
12596 (x_clipboard_manager_save): Now static.
12597 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
12598
f1b54466
PE
12599 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
12600 (crypto_hash_function): Now static.
12601 Fix pointer signedness problems. Avoid unnecessary initializations.
12602
a9f737ee
CY
126032011-05-27 Chong Yidong <cyd@stupidchicken.com>
12604
12605 * termhooks.h (Vselection_alist): Make it terminal-local.
12606
12607 * terminal.c (create_terminal): Initialize it.
12608
12609 * xselect.c: Support for clipboard managers.
12610 (Vselection_alist): Move to termhooks.h as terminal-local var.
12611 (LOCAL_SELECTION): New macro.
12612 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
12613 (symbol_to_x_atom): Remove gratuitous arg.
12614 (x_handle_selection_request, lisp_data_to_selection_data)
12615 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
620c53a6
SM
12616 (x_own_selection, x_get_local_selection, x_convert_selection):
12617 New arg, specifying work frame. Use terminal-local Vselection_alist.
a9f737ee
CY
12618 (some_frame_on_display): Delete unused function.
12619 (Fx_own_selection_internal, Fx_get_selection_internal)
12620 (Fx_disown_selection_internal, Fx_selection_owner_p)
12621 (Fx_selection_exists_p): New optional frame arg.
12622 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
12623 (x_handle_selection_clear): Don't treat other terminals with the
12624 same keyboard specially. Use the terminal-local Vselection_alist.
12625 (x_clear_frame_selections): Use Frun_hook_with_args.
12626
12627 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
12628
12629 * xterm.h: Add support for those atoms.
12630
e067f0c1
CY
126312011-05-26 Chong Yidong <cyd@stupidchicken.com>
12632
12633 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
12634 (converted_selections, conversion_fail_tag): New global variables.
12635 (x_selection_request_lisp_error): Free the above.
12636 (x_get_local_selection): Remove unnecessary code.
12637 (x_reply_selection_request): Args changed; handle arbitrary array
620c53a6
SM
12638 of converted selections stored in converted_selections.
12639 Separate the XChangeProperty and SelectionNotify steps.
e067f0c1
CY
12640 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
12641 (x_convert_selection): New function.
12642 (x_handle_selection_event): Simplify.
12643 (x_get_foreign_selection): Don't ignore incoming requests while
12644 waiting for an answer; this will fail when we implement
12645 SAVE_TARGETS, and seems unnecessary anyway.
12646 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
12647 (Vx_sent_selection_functions): Doc fix.
12648
0f4aebc0
LL
126492011-05-26 Leo Liu <sdl.web@gmail.com>
12650
12651 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
12652
e61124cd
YM
126532011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12654
12655 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
12656
12657 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
12658 for fringe update if it has periodic bitmap.
ac389d0c 12659 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
e61124cd
YM
12660 and fringe_bitmap_periodic_p.
12661
12662 * fringe.c (get_fringe_bitmap_data): New function.
12663 (draw_fringe_bitmap_1, update_window_fringes): Use it.
12664 (update_window_fringes): Record periodicity of fringe bitmap in glyph
12665 row. Mark glyph row for fringe update if periodicity changed.
12666
12667 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
12668 for fringe update unless it has periodic bitmap.
12669
f16d9837
KH
126702011-05-25 Kenichi Handa <handa@m17n.org>
12671
12672 * xdisp.c (get_next_display_element): Set correct it->face_id for
12673 a static composition.
12674
e1b90ef6
LL
126752011-05-24 Leo Liu <sdl.web@gmail.com>
12676
12677 * deps.mk (fns.o):
12678 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
12679
12680 * fns.c (crypto_hash_function, Fsha1): New function.
12681 (Fmd5): Use crypto_hash_function.
12682 (syms_of_fns): Add Ssha1.
12683
7400048f
PE
126842011-05-22 Paul Eggert <eggert@cs.ucla.edu>
12685
12686 * gnutls.c: Remove unused macros.
12687 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
12688 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
12689 Remove macros that are defined and never used.
12690 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
12691
abb71cf4
CY
126922011-05-22 Chong Yidong <cyd@stupidchicken.com>
12693
12694 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
12695 (Fx_get_selection_internal): Minor cleanup.
12696 (Fx_own_selection_internal): Rename arguments for consistency with
12697 select.el.
12698
6307db39
PE
126992011-05-22 Paul Eggert <eggert@cs.ucla.edu>
12700
12701 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
12702
f3d4e0a4
CY
127032011-05-22 Chong Yidong <cyd@stupidchicken.com>
12704
12705 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
12706
4d8ade89
YM
127072011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12708
12709 * dispnew.c (scrolling_window): Don't exclude the case that the
12710 last enabled row in the desired matrix touches the bottom boundary.
12711
32078c8d
GM
127122011-05-21 Glenn Morris <rgm@gnu.org>
12713
12714 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
33cf345f
GM
12715 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
12716 and add some more files.
32078c8d 12717
7285dc67
EZ
127182011-05-20 Eli Zaretskii <eliz@gnu.org>
12719
12720 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
12721 report_file_error introduced by the change from 2011-05-07.
12722
89d1bd22
PE
127232011-05-20 Paul Eggert <eggert@cs.ucla.edu>
12724
12725 * systime.h (Time): Define only if emacs is defined.
12726 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
12727 where the include path doesn't have X11/X.h by default. See
12728 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
12729
cd394be1 127302011-05-20 Kenichi Handa <handa@m17n.org>
31bfc35c
KH
12731
12732 * composite.c (find_automatic_composition): Fix previous change.
12733
b9704ad9
GM
127342011-05-20 Glenn Morris <rgm@gnu.org>
12735
12736 * lisp.mk: New file, split from Makefile.in.
12737 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
12738 (shortlisp): Remove.
12739 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
12740
4a720484
GM
127412011-05-19 Glenn Morris <rgm@gnu.org>
12742
12743 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
12744 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
12745 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
12746 (lisp): Set the order to that of loadup.el.
12747 (shortlisp): Make it a copy of $lisp.
12748 (SOME_MACHINE_LISP): Remove.
12749 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
12750 Use just $shortlisp, not $SOME_MACHINE_LISP too.
12751
a28d4396
KH
127522011-05-18 Kenichi Handa <handa@m17n.org>
12753
12754 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
12755 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
12756 (find_automatic_composition): Mostly rewrite for efficiency.
12757
a2b1fa8e
JB
127582011-05-18 Juanma Barranquero <lekktu@gmail.com>
12759
12760 * makefile.w32-in: Update dependencies.
12761
8e1f5610
CS
127622011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
12763
12764 * menu.c: Include limits.h (fixes the MS-Windows build broken by
7d7d0045 12765 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
8e1f5610 12766
7025ee00 127672011-05-18 Paul Eggert <eggert@cs.ucla.edu>
cb93f9be 12768
cdfa6eab
PE
12769 Fix some integer overflow issues, such as string length overflow.
12770
06d6db33
PE
12771 * insdel.c (count_size_as_multibyte): Check for string overflow.
12772
2b4560a8
PE
12773 * character.c (lisp_string_width): Check for string overflow.
12774 Use EMACS_INT, not int, for string indexes and lengths; in
12775 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
12776 the resulting string length overflows an EMACS_INT; instead,
12777 report a string overflow if no precision given. When checking for
12778 precision exhaustion, use a check that cannot possibly have
12779 integer overflow. (Bug#8675)
12780 * character.h (lisp_string_width): Adjust to new signature.
12781
cb93f9be
PE
12782 * alloc.c (string_overflow): New function.
12783 (Fmake_string): Use it. This doesn't change behavior, but saves
12784 a few bytes and will simplify future changes.
12785 * character.c (string_escape_byte8): Likewise.
12786 * lisp.h (string_overflow): New decl.
12787
1a1f3366
PE
12788 Fixups, following up to the user-interface timestamp change.
12789 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
12790 for UI timestamps, instead of unsigned long.
9fbd6841
PE
12791 * msdos.c (mouse_get_pos): Likewise.
12792 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
1a1f3366
PE
12793 * w32gui.h (Time): Define by including "systime.h" rather than by
12794 declaring it ourselves. (Bug#8664)
12795
d4e3e4d3
PE
12796 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
12797 * image.c (clear_image_cache): Likewise.
12798
f6a24d19
PE
12799 * term.c (term_mouse_position): Don't assume time_t wraparound.
12800
08dc5ae6
PE
12801 Be more systematic about user-interface timestamps.
12802 Before, the code sometimes used 'Time', sometimes 'unsigned long',
620c53a6
SM
12803 and sometimes 'EMACS_UINT', to represent these timestamps.
12804 This change causes it to use 'Time' uniformly, as that's what X uses.
08dc5ae6
PE
12805 This makes the code easier to follow, and makes it easier to catch
12806 integer overflow bugs such as Bug#8664.
12807 * frame.c (Fmouse_position, Fmouse_pixel_position):
12808 Use Time, not unsigned long, for user-interface timestamps.
12809 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
12810 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
12811 * keyboard.h (last_event_timestamp): Likewise.
12812 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
12813 * menu.h (xmenu_show): Likewise.
12814 * term.c (term_mouse_position): Likewise.
12815 * termhooks.h (struct input_event.timestamp): Likewise.
12816 (struct terminal.mouse_position_hook): Likewise.
12817 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
12818 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
12819 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
12820 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
12821 what it was before.
12822 * menu.h, termhooks.h: Include "systime.h", for Time.
12823
8e55734a
PE
12824 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
12825 Don't assume that the difference between two unsigned long values
12826 can fit into an integer. At this point, we know button_down_time
12827 <= event->timestamp, so the difference must be nonnegative, so
12828 there's no need to cast the result if double-click-time is
12829 nonnegative, as it should be; check that it's nonnegative, just in
12830 case. This bug is triggered when events are more than 2**31 ms
86db42d2 12831 apart (about 25 days). (Bug#8664)
8e55734a 12832
841f1b75 12833 * xselect.c (last_event_timestamp): Remove duplicate decl.
6434756c 12834 (x_own_selection): Remove needless cast to unsigned long.
841f1b75 12835
3e26f69c
PE
12836 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
12837 that always fit in int. Use a sentinel instead of a counter, to
12838 avoid a temp and to allay GCC's concerns about possible int overflow.
d230cb74
PE
12839 * frame.h (struct frame): Use int for menu_bar_items_used
12840 instead of EMACS_INT, since it always fits in int.
3e26f69c 12841
5cc152c0
PE
12842 * menu.c (grow_menu_items): Check for int overflow.
12843
d89eb65e
PE
12844 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
12845
5235bd3e
PE
12846 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
12847 Before, the code was not consistent. These values cannot exceed
12848 2**31 - 1 so there's no need to make them unsigned.
12849 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
12850 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
12851 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
12852 as modifiers.
12853 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
12854
bc827e23
PE
12855 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
12856 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
12857 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
12858 presumably because the widths might not match.
12859
78eb494e
PE
12860 * window.c (size_window): Avoid needless test at loop start.
12861
04f2d78b
CB
128622011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
12863
12864 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
12865
d2fc7e3d 128662011-05-12 Drew Adams <drew.adams@oracle.com>
e531bdff
DA
12867
12868 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
12869
d2fc7e3d 128702011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7db47798
YM
12871
12872 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
12873 `width' to `bar_area_x' and `bar_area_width', respectively.
12874 (x_scroll_run): Take account of fringe background extension.
12875
04f2d78b
CB
12876 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
12877 Rename local vars `left' and `width' to `bar_area_x' and
7db47798
YM
12878 `bar_area_width', respectively.
12879 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
12880 background extension.
12881
79b70037
GM
128822011-05-10 Jim Meyering <meyering@redhat.com>
12883
12884 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
12885
2f142cc5
JB
128862011-05-10 Juanma Barranquero <lekktu@gmail.com>
12887
12888 * image.c (Finit_image_library): Return t for built-in image types,
12889 like pbm and xbm. (Bug#8640)
12890
57679c86
AS
128912011-05-09 Andreas Schwab <schwab@linux-m68k.org>
12892
12893 * w32menu.c (set_frame_menubar): Fix submenu allocation.
12894
888c9e86
EZ
128952011-05-07 Eli Zaretskii <eliz@gnu.org>
12896
b0512a1d
EZ
12897 * w32console.c (Fset_screen_color): Doc fix.
12898 (Fget_screen_color): New function.
12899 (syms_of_ntterm): Defsubr it.
12900
7285dc67
EZ
12901 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
12902 unlink the temporary file if Fcall_process didn't create it in the
12903 first place.
12904 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
12905 child process will be redirected to a file specified with `:file'.
888c9e86
EZ
12906 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
12907 cue to call_process_cleanup not to close that handle.
12908
4d3fcc8e
BK
129092011-05-07 Ben Key <bkey76@gmail.com>
12910
12911 * makefile.w32-in: The bootstrap-temacs rule now makes use of
12912 one of two shell specific rules, either bootstrap-temacs-CMD or
12913 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
12914 to the previous implementation of the bootstrap-temacs rule.
12915 The bootstrap-temacs-CMD rule is similar to the previous
12916 implementation of the bootstrap-temacs rule except that it
12917 makes use of the ESC_CFLAGS variable instead of the CFLAGS
12918 variable.
12919
12920 These changes, along with some changes to nt/configure.bat,
12921 nt/gmake.defs, and nt/nmake.defs, are required to extend my
12922 earlier fix to add support for --cflags and --ldflags options
12923 that include quotes so that it works whether make uses cmd or
12924 sh as the shell.
12925
b4289b64
MA
129262011-05-06 Michael Albinus <michael.albinus@gmx.de>
12927
12928 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
12929 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
12930 is a constant.
12931 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
12932 a string. Handle both cases.
12933 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
12934 (Fdbus_register_method): Use Qinvalid_function.
12935
af4c0e28
JB
129362011-05-06 Juanma Barranquero <lekktu@gmail.com>
12937
12938 * makefile.w32-in: Update dependencies.
12939 (LISP_H): Add inttypes.h and stdin.h.
12940 (PROCESS_H): Add unistd.h.
12941
c51453d9
EZ
129422011-05-06 Eli Zaretskii <eliz@gnu.org>
12943
12944 * lread.c: Include limits.h (fixes the MS-Windows build broken by
12945 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
12946
8ff0ac3c 129472011-05-06 Paul Eggert <eggert@cs.ucla.edu>
c032b5f8 12948
4c4b566b
PE
12949 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
12950
aab2b9b5
PE
12951 * term.c (vfatal): Remove stray call to va_end.
12952 It's not needed and the C Standard doesn't allow it here anyway.
12953
c378da0b
PE
12954 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
12955 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
12956
288b08c7
PE
12957 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
12958 bytes.
12959
e3601888
PE
12960 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
12961
db6c0e74
PE
12962 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
12963
dd5963ea
PE
12964 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
12965
88c9450f
PE
12966 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
12967
2f9442b8
PE
12968 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
12969
c032b5f8
PE
12970 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
12971 * charset.c (Fdefine_charset_internal): Don't initialize
12972 charset.code_space[15]. The value was garbage, on hosts with
2d38271b 12973 32-bit int (Bug#8600).
a108c10b
PE
12974
12975 * lread.c (read_integer): Be more consistent with string-to-number.
12976 Use string_to_number to do the actual conversion; this avoids
12977 rounding errors and fixes some other screwups. Without this fix,
12978 for example, #x1fffffffffffffff was misread as -2305843009213693952.
12979 (digit_to_number): Move earlier, for benefit of read_integer.
12980 Return -1 if the digit is out of range for the base, -2 if it is
48e400f0 12981 not a digit in any supported base. (Bug#8602)
a108c10b 12982
ad5f9eea
PE
12983 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
12984
aec1708a
PE
12985 * dispnew.c (scrolling_window): Return 1 if we scrolled,
12986 to match comment at start of function. This also removes a
12987 GCC warning about overflow in a 32+64-bit port.
12988
47be4ab5
PE
12989 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
12990
371cac43
PE
12991 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
12992 Reported by Stefan Monnier in
12993 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
04f2d78b
CB
12994 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
12995 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
371cac43 12996
d01a7826
PE
12997 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
12998 (EMACS_UINTPTR): Likewise, with uintptr_t.
12999
7fd47d5c
PE
13000 * lisp.h: Prefer 64-bit EMACS_INT if available.
13001 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
13002 on 32-bit hosts that have 64-bit int, so that they can access
13003 large files.
122b0c86
PE
13004 However, temporarily disable this change unless the temporary
13005 symbol WIDE_EMACS_INT is defined.
7fd47d5c 13006
8727937b
PE
13007 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
13008
8ac068ac
PE
13009 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
13010 This removes an assumption that EMACS_INT and long are the same
13011 width as pointers. The assumption is true for Emacs porting targets
13012 now, but we want to make other targets possible.
13013 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
13014 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
13015 In the rest of the code, change types of integers that hold casted
13016 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
13017 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
13018 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
13019 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
13020 No need to cast type when ORing.
13021 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
13022 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
13023 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
13024 assume EMACS_INT is the same width as char *.
13025 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
13026 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
13027 Remove no-longer-needed casts.
13028 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
13029 (xg_tool_bar_help_callback, xg_make_tool_item):
13030 Use EMACS_INTPTR to hold an integer
13031 that will be cast to void *; this can avoid a GCC warning
13032 if EMACS_INT is not the same width as void *.
13033 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
13034 * xdisp.c (display_echo_area_1, resize_mini_window_1):
13035 (current_message_1, set_message_1):
13036 Use a local to convert to proper width without a cast.
13037 * xmenu.c (dialog_selection_callback): Likewise.
13038
ede49d71
PE
13039 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
13040 Also, don't assume VALBITS / RAND_BITS is less than 5,
13041 and don't rely on undefined behavior when shifting a 1 left into
13042 the sign bit.
13043 * lisp.h (get_random): Change signature to match.
13044
2f30ecd0
PE
13045 * lread.c (hash_string): Use size_t, not int, for hash computation.
13046 Normally we prefer signed values; but hashing is special, because
13047 it's better to use unsigned division on hash table sizes so that
13048 the remainder is nonnegative. Also, size_t is the natural width
13049 for hashing into memory. The previous code used 'int', which doesn't
13050 retain enough info to hash well into very large tables.
13051 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
13052
2a866e7b
PE
13053 * dbusbind.c: Don't possibly lose pointer info when converting.
13054 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
13055 Use XPNTR rather than XHASH, so that the high-order bits of
13056 the pointer aren't lost when converting through void *.
13057
51639eac
PE
13058 * eval.c (Fautoload): Don't double-shift a pointer.
13059
92394119
PE
13060 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
13061
dbdb9a7c
JB
130622011-05-06 Juanma Barranquero <lekktu@gmail.com>
13063
13064 * gnutls.c (DEF_GNUTLS_FN):
13065 * image.c (DEF_IMGLIB_FN): Make function pointers static.
13066
db7a0b4f
AS
130672011-05-05 Andreas Schwab <schwab@linux-m68k.org>
13068
13069 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
13070 marker. (Bug#8610)
13071
cd394be1 130722011-05-05 Eli Zaretskii <eliz@gnu.org>
fab624aa
EZ
13073
13074 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
13075 New version that can reserve upto 2GB of heap space.
13076
f7ff1b0f 130772011-05-05 Chong Yidong <cyd@stupidchicken.com>
45cb8994
CY
13078
13079 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
13080
639c109b
TZ
130812011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
13082
13083 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
13084 `gnutls_certificate_set_x509_key_file'.
13085
d2127135
JB
130862011-05-05 Juanma Barranquero <lekktu@gmail.com>
13087
13088 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
13089 Update dependencies.
13090
e968f4f3
JB
130912011-05-04 Juanma Barranquero <lekktu@gmail.com>
13092
13093 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
13094 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
13095 Remove unused parameter `fildes'.
13096 * process.c (read_process_output, send_process): Don't pass it.
13097
84d358f0
JB
130982011-05-04 Juanma Barranquero <lekktu@gmail.com>
13099
13100 Fix previous change: the library cache is defined in w32.c.
13101 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
13102 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
13103
0898ca10
JB
131042011-05-04 Juanma Barranquero <lekktu@gmail.com>
13105
13106 Implement dynamic loading of GnuTLS on Windows.
13107
13108 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
13109 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
13110 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13111 Declare.
13112
13113 * gnutls.c (Qgnutls_dll): Define.
13114 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
13115 (gnutls_*): Declare function pointers.
13116 (init_gnutls_functions): New function to initialize function pointers.
13117 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
13118 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
13119 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
13120 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
13121 (emacs_gnutls_write, emacs_gnutls_read)
13122 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
13123 (Fgnutls_available_p): New function.
13124 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
13125 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
13126 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
13127
13128 * image.c: Include w32.h.
13129 (Vimage_type_cache): Delete.
13130 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
13131 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
13132 (w32_delayed_load): Move to w32.c.
13133
13134 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
13135
13136 * w32.c (QCloaded_from, Vlibrary_cache): Define.
13137 (w32_delayed_load): Move from image.c. When loading a library, record
13138 its filename in the :loaded-from property of the library id.
13139 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
13140 Initialize and staticpro them.
13141 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
13142
13143 * process.c: Include lisp.h before w32.h, not after.
13144 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
13145 instead of gnutls_record_check_pending.
13146
13147 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
13148
ff4de4aa
TZ
131492011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
13150
13151 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
13152 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
13153 as passed in.
13154
abe95abb
JD
131552011-05-03 Jan Djärv <jan.h.d@swipnet.se>
13156
13157 * xterm.c (x_set_frame_alpha): Do not set property on anything
13158 else than FRAME_X_OUTER_WINDOW (Bug#8608).
13159
e16e55d4
JB
131602011-05-02 Juanma Barranquero <lekktu@gmail.com>
13161
13162 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
13163
bafcf6a5
JB
131642011-05-02 Juanma Barranquero <lekktu@gmail.com>
13165
13166 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
13167 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
13168 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
13169 (gnutls_global_initialized, Qgnutls_bootprop_priority)
13170 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
13171 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
13172 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
13173 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
13174 (Qgnutls_bootprop_callbacks_verify): Make static.
13175
e7a6747f
AS
131762011-05-01 Andreas Schwab <schwab@linux-m68k.org>
13177
19ed11ba
AS
13178 * callproc.c: Indentation fixup.
13179
e7a6747f 13180 * sysdep.c (wait_for_termination_1): Make static.
04f2d78b
CB
13181 (wait_for_termination, interruptible_wait_for_termination):
13182 Move after wait_for_termination_1.
e7a6747f 13183
1ef14cb4
LMI
131842011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
13185
13186 * sysdep.c (interruptible_wait_for_termination): New function
13187 which is like wait_for_termination, but allows keyboard
13188 interruptions.
13189
13190 * callproc.c (Fcall_process): Add (:file "file") as an option for
13191 the STDOUT buffer.
13192 (Fcall_process_region): Ditto.
13193
330d880c
EZ
131942011-04-30 Eli Zaretskii <eliz@gnu.org>
13195
8db90b73
EZ
13196 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
13197 rather than `XVECTOR (FOO)->size'.
13198
330d880c
EZ
13199 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
13200 inttypes.h, as a gnulib replacement is used if it not available in
13201 system headers.
13202
15cbd324
EZ
132032011-04-21 Eli Zaretskii <eliz@gnu.org>
13204
13205 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
13206 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
13207 of MOST_POSITIVE_FIXNUM. (Bug#8528)
13208
13209 * coding.c (coding_alloc_by_realloc): Error out if destination
13210 will grow beyond MOST_POSITIVE_FIXNUM.
13211 (decode_coding_emacs_mule): Abort if there isn't enough place in
13212 charbuf for the composition carryover bytes. Reserve an extra
13213 space for up to 2 characters produced in a loop.
13214 (decode_coding_iso_2022): Abort if there isn't enough place in
13215 charbuf for the composition carryover bytes.
13216
132172011-04-21 Eli Zaretskii <eliz@gnu.org>
afda1437 13218
ae940cca
EZ
13219 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
13220 aborting when %lld or %lll format is passed.
13221 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
13222 %llo or %llx format is passed. (Bug#8545)
13223
03ab8921
EZ
13224 * window.c (window_scroll_line_based): Use a marker instead of
13225 simple variables to record original value of point. (Bug#7952)
13226
afda1437
EZ
13227 * doprnt.c (doprnt): Fix the case where a multibyte sequence
13228 produced by %s or %c overflows available buffer space. (Bug#8545)
13229
f76dee0c
PE
132302011-04-28 Paul Eggert <eggert@cs.ucla.edu>
13231
13232 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
283cdbef 13233 (SIZE_MAX): Move defn after all includes, as they might #define it.
f76dee0c 13234
fdc5744d
JB
132352011-04-28 Juanma Barranquero <lekktu@gmail.com>
13236
13237 * w32.c (init_environment): Warn about defaulting HOME to C:\.
13238
638f053a
JB
132392011-04-28 Juanma Barranquero <lekktu@gmail.com>
13240
13241 * keyboard.c (Qdelayed_warnings_hook): Define.
13242 (command_loop_1): Run `delayed-warnings-hook'
13243 if Vdelayed_warnings_list is non-nil.
13244 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
13245 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
13246
d178f871
EZ
132472011-04-28 Eli Zaretskii <eliz@gnu.org>
13248
13249 * doprnt.c (doprnt): Don't return value smaller than the buffer
13250 size if the message was truncated. (Bug#8545).
13251
b124fd93
JB
132522011-04-28 Juanma Barranquero <lekktu@gmail.com>
13253
13254 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
13255 (Fx_window_property): #if-0 the whole functions, not just the bodies.
13256
e810457d
PE
132572011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13258
13259 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
13260
ea51cceb
JB
132612011-04-27 Juanma Barranquero <lekktu@gmail.com>
13262
13263 * makefile.w32-in: Update dependencies.
13264
94dcfacf
EZ
132652011-04-27 Eli Zaretskii <eliz@gnu.org>
13266
13267 Improve `doprnt' and its usage. (Bug#8545)
13268 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
13269 `format_end'. Remove support for %l as a conversion specifier.
13270 Don't use xrealloc. Improve diagnostics when the %l size modifier
13271 is used. Update the commentary.
13272
13273 * eval.c (verror): Simplify calculation of size_t.
13274
13275 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
13276 messages.
13277
f61f41d7
PE
132782011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
13279
13280 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
13281 change.
13282
96fb4434
PE
132832011-04-27 Paul Eggert <eggert@cs.ucla.edu>
13284
13285 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
13286 This makes this file independent of the recent pseudovector change.
13287
671875da 132882011-04-26 Paul Eggert <eggert@cs.ucla.edu>
eab3844f 13289
69e9b5a3
PE
13290 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
13291
b5f869a7 13292 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
7754e151 13293 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
8d4c3955 13294 Remove unused local.
c8926152 13295 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
080e5a8d 13296
841a1577 13297 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
04f2d78b
CB
13298 GCC 4.6.0 optimizes based on type-based alias analysis.
13299 For example, if b is of type struct buffer * and v of type struct
eab3844f
PE
13300 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
13301 != &v->size, and therefore "v->size = 1; b->size = 2; return
13302 v->size;" must therefore return 1. This assumption is incorrect
13303 for Emacs, since it type-puns struct Lisp_Vector * with many other
13304 types. To fix this problem, this patch adds a new type struct
f904488f 13305 vectorlike_header that documents the constraints on layout of vectors
eab3844f
PE
13306 and pseudovectors, and helps optimizing compilers not get fooled
13307 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
13308 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
f904488f
PE
13309 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
13310 the size member.
eab3844f
PE
13311 (XSETPVECTYPE): Rewrite in terms of new macro.
13312 (XSETPVECTYPESIZE): New macro, specifying both type and size.
13313 This is a bit clearer, and further avoids the possibility of
13314 undesirable aliasing.
13315 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
f904488f 13316 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
eab3844f
PE
13317 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
13318 since Lisp_Subr is a special case (no "next" field).
04f2d78b
CB
13319 (ASIZE): Now uses header.size rather than size.
13320 All previous uses of XVECTOR (foo)->size replaced to use this macro,
f904488f
PE
13321 to avoid the hassle of writing XVECTOR (foo)->header.size.
13322 (struct vectorlike_header): New type.
eab3844f
PE
13323 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
13324 object, to help avoid aliasing.
13325 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
13326 (SUBRP): Likewise, since Lisp_Subr is a special case.
13327 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
13328 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
13329 (struct Lisp_Hash_Table): Combine first two members into a single
f904488f 13330 struct vectorlike_header member. All uses of "size" and "next" members
eab3844f
PE
13331 changed to be "header.size" and "header.next".
13332 * buffer.h (struct buffer): Likewise.
13333 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
13334 * frame.h (struct frame): Likewise.
13335 * process.h (struct Lisp_Process): Likewise.
13336 * termhooks.h (struct terminal): Likewise.
13337 * window.c (struct save_window_data, struct saved_window): Likewise.
13338 * window.h (struct window): Likewise.
13339 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
13340 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
13341 * buffer.c (init_buffer_once): Likewise.
13342 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
13343 special case.
13344 * process.c (Fformat_network_address): Use local var for size,
13345 for brevity.
13346
0df1eac5
PE
13347 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
13348
847ab9d1 13349 Make the Lisp reader and string-to-float more consistent (Bug#8525)
452f4150
PE
13350 * data.c (atof): Remove decl; no longer used or needed.
13351 (digit_to_number): Move to lread.c.
13352 (Fstring_to_number): Use new string_to_number function, to be
13353 consistent with how the Lisp reader treats infinities and NaNs.
13354 Do not assume that floating-point numbers represent EMACS_INT
13355 without losing information; this is not true on most 64-bit hosts.
13356 Avoid double-rounding errors, by insisting on integers when
13357 parsing non-base-10 numbers, as the documentation specifies.
13358 * lisp.h (string_to_number): New decl, replacing ...
13359 (isfloat_string): Remove.
bc0a5c13 13360 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
d78050d6 13361 (read1): Do not accept +. and -. as integers; this
452f4150
PE
13362 appears to have been a coding error. Similarly, do not accept
13363 strings like +-1e0 as floating point numbers. Do not report
13364 overflow for integer overflows unless the base is not 10 which
13365 means we have no simple and reliable way to continue.
13366 Break out the floating-point parsing into a new
13367 function string_to_number, so that Fstring_to_number parses
13368 floating point numbers consistently with the Lisp reader.
04f2d78b 13369 (digit_to_number): Move here from data.c. Make it static inline.
452f4150
PE
13370 (E_CHAR, EXP_INT): Remove, replacing with ...
13371 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
13372 (string_to_number): New function, replacing isfloat_string.
13373 This function checks for valid syntax and produces the resulting
13374 Lisp float number too. Rework it so that string-to-number
bc0a5c13 13375 no longer mishandles examples like "1.0e+". Use strtoumax,
d78050d6
PE
13376 so that overflow for non-base-10 numbers is reported only when
13377 there's no portable and simple way to convert to floating point.
452f4150 13378
67769ffc
PE
13379 * textprop.c (set_text_properties_1): Rewrite for clarity,
13380 and to avoid GCC warning about integer overflow.
13381
c20db43f
PE
13382 * intervals.h (struct interval): Use EMACS_INT for members
13383 where EMACS_UINT might cause problems. See
13384 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
13385 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
13386 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
13387 All uses changed.
37aa2f85
PE
13388 (offset_intervals): Tell GCC not to worry about length overflow
13389 when negating a negative length.
c20db43f 13390
2538aa2f
PE
13391 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
13392 (overrun_check_free): Likewise.
13393
f2d3008d
PE
13394 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
13395 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
13396 word size.
13397
ec8df744
PE
13398 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13399 (gnutls_make_error): Rename local to avoid shadowing.
13400 (gnutls_emacs_global_deinit): ifdef out; not used.
13401 (Fgnutls_boot): Use const for pointer to readonly storage.
13402 Comment out unused local. Fix pointer signedness problems.
13403
640ee02d
PE
13404 * lread.c (openp): Don't stuff size_t into an 'int'.
13405 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
13406 about possible signed overflow.
13407
6048fb2a
PE
13408 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
13409 (GDK_KEY_g): Don't define if already defined.
13410 (xg_prepare_tooltip): Avoid pointer signedness problem.
13411 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
13412
fa3c87e1
PE
13413 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
13414 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
13415
2172544b
PE
13416 * xfns.c (Fx_window_property): Simplify a bit,
13417 to make a bit faster and to avoid GCC 4.6.0 warning.
13418 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
13419
9b821a21
PE
13420 * fns.c (internal_equal): Don't assume size_t fits in int.
13421
3c616cfa
PE
13422 * alloc.c (compact_small_strings): Tighten assertion a little.
13423
c2982e87
PE
13424 Replace pEd with more-general pI, and fix some printf arg casts.
13425 * lisp.h (pI): New macro, generalizing old pEd macro to other
13426 conversion specifiers. For example, use "...%"pI"d..." rather
13427 than "...%"pEd"...".
13428 (pEd): Remove. All uses replaced with similar uses of pI.
61bdb816 13429 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
c2982e87
PE
13430 * alloc.c (check_pure_size): Don't overflow by converting size to int.
13431 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
13432 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
13433 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
13434 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
13435 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
13436 64-bit hosts.
13437 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
13438 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
13439 * print.c (safe_debug_print, print_object): Likewise.
13440 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
13441 to int.
6f04d126
PE
13442 Use pI instead of if-then-else-abort. Use %p to avoid casts,
13443 avoiding the 0 flag, which is not portable.
c2982e87
PE
13444 * process.c (Fmake_network_process): Use pI to avoid cast.
13445 * region-cache.c (pp_cache): Likewise.
13446 * xdisp.c (decode_mode_spec): Likewise.
13447 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
13448 behavior on 64-bit hosts with printf arg.
6f04d126 13449 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
c2982e87
PE
13450 (x_stop_queuing_selection_requests): Likewise.
13451 (x_get_window_property): Don't truncate byte count to an 'int'
13452 when tracing.
0b432f21 13453
5e073ec7
PE
13454 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
13455 here, since it parses constructs like leading '-' and spaces,
13456 which are not wanted; and it overflows with large numbers.
13457 Instead, simply match F[0-9]+, which is what is wanted anyway.
13458
36372bf9
PE
13459 * alloc.c: Remove unportable assumptions about struct layout.
13460 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
13461 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
13462 (allocate_vectorlike, make_pure_vector): Use the new macros,
13463 plus offsetof, to remove unportable assumptions about struct layout.
13464 These assumptions hold on all porting targets that I know of, but
13465 they are not guaranteed, they're easy to remove, and removing them
13466 makes further changes easier.
13467
0b432f21
PE
13468 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
13469 This doesn't fix a bug but makes the code clearer.
bfd1c781
PE
13470 (string_overrun_cookie): Now const. Use initializers that
13471 don't formally overflow signed char, to avoid warnings.
000098c1
PE
13472 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
13473 can cause Emacs to crash when string overrun checking is enabled.
c7bda33c
PE
13474 (allocate_buffer): Don't assume sizeof (struct buffer) is a
13475 multiple of sizeof (EMACS_INT); it need not be, if
13476 alignof(EMACS_INT) < sizeof (EMACS_INT).
d0f4e1f5 13477 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
0b432f21 13478
895009e1
JB
134792011-04-26 Juanma Barranquero <lekktu@gmail.com>
13480
13481 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
13482
6a7a1b0b
TZ
134832011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
13484
13485 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
b5f869a7 13486 supposed to be handshaking. (Bug#8556)
6a7a1b0b
TZ
13487 Reported by Paul Eggert <eggert@cs.ucla.edu>.
13488
841a1577 134892011-04-26 Daniel Colascione <dan.colascione@gmail.com>
0438ce91
DC
13490
13491 * lisp.h (Qdebug): List symbol.
895009e1 13492 * eval.c (Qdebug): Restore global linkage.
0438ce91
DC
13493 * keyboard.c (debug-on-event): New variable.
13494 (handle_user_signal): Break into debugger when debug-on-event
13495 matches the current signal symbol.
13496
f2d3ba6f
DN
134972011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
13498
13499 * alloc.c (check_sblock, check_string_bytes)
13500 (check_string_free_list): Convert to standard C.
13501
42ce4c63
TZ
135022011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
13503
13504 * w32.c (emacs_gnutls_push): Fix typo.
13505
825cd63c
EZ
135062011-04-25 Eli Zaretskii <eliz@gnu.org>
13507
fb11d64d
EZ
13508 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
13509 "cast to pointer from integer of different size".
13510
825cd63c
EZ
13511 Improve doprnt and its use in verror. (Bug#8545)
13512 * doprnt.c (doprnt): Document the set of format control sequences
13513 supported by the function. Use SAFE_ALLOCA instead of always
13514 using `alloca'.
13515
13516 * eval.c (verror): Don't limit the buffer size at size_max-1, that
13517 is one byte too soon. Don't use xrealloc; instead xfree and
13518 xmalloc anew.
13519
e061a11b
TZ
135202011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
13521
13522 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
13523 callbacks stage.
13524
13525 * gnutls.c: Renamed global_initialized to
13526 gnutls_global_initialized. Added internals for the
13527 :verify-hostname-error, :verify-error, and :verify-flags
13528 parameters of `gnutls-boot' and documented those parameters in the
13529 docstring. Start callback support.
9173deec
JB
13530 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
13531 unless a fatal error occurred. Call gnutls_alert_send_appropriate
13532 on error. Return error code.
e061a11b
TZ
13533 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
13534 (emacs_gnutls_read): Likewise.
13535 (Fgnutls_boot): Return handshake error code.
13536 (emacs_gnutls_handle_error): New function.
13537 (wsaerror_to_errno): Likewise.
13538
13539 * w32.h (emacs_gnutls_pull): Add prototype.
13540 (emacs_gnutls_push): Likewise.
13541
13542 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
13543 (emacs_gnutls_push): Likewise.
13544
135452011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
13546
13547 * process.c (wait_reading_process_output): Check if GnuTLS
13548 buffered some data internally if no FDs are set for TLS
13549 connections.
13550
13551 * makefile.w32-in (OBJ2): Add gnutls.$(O).
13552 (LIBS): Link to USER_LIBS.
13553 ($(BLD)/gnutls.$(0)): New target.
13554
fa6996bc
EZ
135552011-04-24 Eli Zaretskii <eliz@gnu.org>
13556
eb35682e
EZ
13557 * xdisp.c (handle_single_display_spec): Rename the
13558 display_replaced_before_p argument into display_replaced_p, to
13559 make it consistent with the commentary. Fix typos in the
13560 commentary.
13561
e2ad650c
EZ
13562 * textprop.c (syms_of_textprop): Remove dead code.
13563 (copy_text_properties): Delete obsolete commentary about an
13564 interface that was deleted long ago. Fix typos in the description
13565 of arguments.
13566
1b2de274
EZ
13567 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
13568 to changes in oldXMenu/XMenu.h from 2011-04-16.
13569 <menu_help_message, prev_menu_help_message>: Constify.
13570 (IT_menu_make_room): menu->help_text is now `const char **';
13571 adjust.
13572
13573 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
13574 to changes in oldXMenu/XMenu.h from 2011-04-16.
13575 (struct XMenu): Declare `help_text' `const char **'.
13576
13577 * xfaces.c <Qunspecified>: Make extern again.
13578
13579 * syntax.c: Include sys/types.h before including regex.h, as
75f1671a 13580 required by POSIX.
1b2de274 13581
762b15be
EZ
13582 * doc.c (get_doc_string): Improve the format passed to `error'.
13583
13584 * doprnt.c (doprnt): Improve commentary.
13585
13586 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
13587
13588 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
13589 them with etags.
13590
f1052e5d
EZ
13591 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
13592 changes in globals.h immediately force recompilation.
762b15be
EZ
13593 (TAGS): Depend on $(CURDIR)/m/intel386.h and
13594 $(CURDIR)/s/ms-w32.h.
13595 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
f1052e5d 13596
fa6996bc
EZ
13597 * character.c (Fchar_direction): Function deleted.
13598 (syms_of_character): Don't defsubr it.
13599 <char-direction-table>: Deleted.
13600
e6c3da20
EZ
136012011-04-23 Eli Zaretskii <eliz@gnu.org>
13602
13603 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
13604 * doprnt.c: Include limits.h.
13605 (SIZE_MAX): New macro.
04f2d78b
CB
13606 (doprnt): Return a size_t value. 2nd arg is now size_t.
13607 Many local variables are now size_t instead of int or unsigned.
e6c3da20
EZ
13608 Improve overflow protection. Support `l' modifier for integer
13609 conversions. Support %l conversion. Don't assume an EMACS_INT
13610 argument for integer conversions and for %c.
13611
13612 * lisp.h (doprnt): Restore prototype.
13613
13614 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
13615 $(SRC)/character.h.
13616
13617 * Makefile.in (base_obj): Add back doprnt.o.
13618
13619 * deps.mk (doprnt.o): Add back prerequisites.
13620 (callint.o): Depend on character.h.
13621
13622 * eval.c (internal_lisp_condition_case): Include the handler
13623 representation in the error message.
13624 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
13625 when breaking from the loop.
13626
13627 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
13628
13629 * callint.c (Fcall_interactively): When displaying error message
13630 about invalid control letter, pass the character's codepoint, not
13631 a pointer to its multibyte form. Improve display of the character
13632 in octal and display also its hex code.
13633
13634 * character.c (char_string): Use %x to display the (unsigned)
13635 codepoint of an invalid character, to avoid displaying a bogus
13636 negative value.
13637
13638 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
13639 `error', not SYMBOL_NAME itself.
13640
13641 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
13642 character arguments to `error'.
13643
13644 * charset.c (check_iso_charset_parameter): Fix incorrect argument
13645 to `error' in error message about FINAL_CHAR argument. Make sure
13646 FINAL_CHAR is a character, and use %c when it is passed as
13647 argument to `error'.
13648
4ffd0d6b 136492011-04-23 Eli Zaretskii <eliz@gnu.org>
97a93095
EZ
13650
13651 * s/ms-w32.h (localtime): Redirect to sys_localtime.
13652
13653 * w32.c: Include <time.h>.
13654 (sys_localtime): New function.
13655
4ffd0d6b 136562011-04-23 Chong Yidong <cyd@stupidchicken.com>
c17819f4
CY
13657
13658 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
13659
4ffd0d6b 13660 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
aac0c6e3 13661
4ffd0d6b 136622011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
aac0c6e3 13663
4ffd0d6b
GM
13664 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
13665 zombies (Bug#8467).
aac0c6e3 13666
04c56954
EZ
136672011-04-19 Eli Zaretskii <eliz@gnu.org>
13668
13669 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
13670 gl_state.e_property when gl_state.object is Qt.
13671
13672 * insdel.c (make_gap_larger): Remove limitation of buffer size
13673 to <= INT_MAX.
13674
16a43933
CY
136752011-04-18 Chong Yidong <cyd@stupidchicken.com>
13676
13677 * xdisp.c (lookup_glyphless_char_display)
13678 (produce_glyphless_glyph): Handle cons cell entry in
13679 glyphless-char-display.
13680 (Vglyphless_char_display): Document it.
13681
13682 * term.c (produce_glyphless_glyph): Handle cons cell entry in
13683 glyphless-char-display.
13684
4581706e
CY
136852011-04-17 Chong Yidong <cyd@stupidchicken.com>
13686
13687 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
13688
13689 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
13690
13691 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
13692 definition for no-X builds.
13693
4887c6e2 136942011-04-16 Paul Eggert <eggert@cs.ucla.edu>
764430a3 13695
fd35b6f9
PE
13696 Static checks with GCC 4.6.0 and non-default toolkits.
13697
5c1ccb01
PE
13698 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
13699
006c5daa
PE
13700 * process.c (keyboard_bit_set): Define only if SIGIO.
13701 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
13702 (send_process): Repair possible setjmp clobbering.
13703
efc736d3
PE
13704 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
13705
4e2fe2e6
PE
13706 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
13707
f97334a2
PE
13708 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
13709
4e75f29d
PE
13710 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
13711 Define only if needed.
13712
90efadd1
PE
13713 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
13714 by pacifying GCC about it. Maybe it's time to retire it?
875975e9 13715 * xfaces.c (USG, __TIMEVAL__): Likewise.
90efadd1 13716
3c647824
PE
13717 * dispextern.h (struct redisplay_interface): Rename param
13718 to avoid shadowing.
e264f262 13719 * termhooks.h (struct terminal): Likewise.
761383f4 13720 * xterm.c (xembed_send_message): Likewise.
3c647824 13721
b58c5c4a
PE
13722 * insdel.c (make_gap_smaller): Define only if
13723 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
13724
cad59032
PE
13725 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
13726 it.
13727
c339dc2e
PE
13728 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
13729 so that we aren't warned about unused symbols.
13730
91a3e27b
PE
13731 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
13732
399c71d3 13733 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
7a3fb125 13734
8ffc96f5
PE
13735 * xfns.c (x_real_positions): Mark locals as initialized.
13736
eef9bc79
PE
13737 * xmenu.c (xmenu_show): Don't use uninitialized vars.
13738
098db9dd
PE
13739 * xterm.c: Fix problems found by static analysis with other toolkits.
13740 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
dda3aedd
PE
13741 (x_dispatch_event): Declare static if USE_GTK, and
13742 define if USE_GTK || USE_X_TOOLKIT.
098db9dd 13743 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
dda3aedd 13744 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
841a1577
JB
13745 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
13746 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
098db9dd 13747
eb18f6cc
PE
13748 * xmenu.c (menu_help_callback): Pointer type fixes.
13749 Use const pointers when pointing at readonly data. Avoid pointer
13750 signedness clashes.
13751 (FALSE): Remove unused macro.
13752 (update_frame_menubar): Remove unused decl.
13753
1fe72bf8
PE
13754 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
13755
60d9e1db
PE
13756 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
13757 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
13758 (single_menu_item): Rename local to avoid shadowing.
13759
39261c26
PE
13760 * keyboard.c (make_lispy_event): Remove unused local var.
13761
018c5e19
PE
13762 * frame.c, frame.h (x_get_resource_string): Bring this back, but
13763 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
13764
63d2b86e
PE
13765 * bitmaps: Change bitmaps from unsigned char back to the X11
13766 compatible char. Avoid the old compiler warnings about
13767 out-of-range initializers by using, for example, '\xab' rather
13768 than 0xab.
13769
aefd87e1
PE
13770 * xgselect.c (xgselect_initialize): Check vs interface
13771 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
13772
bf501fb9
PE
13773 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
13774
e9829fdf
PE
13775 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
13776 to read-only memory.
13777
1086c095
PE
13778 * fns.c (vector): Remove; this old hack is no longer needed.
13779
2baccd04 13780 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
401f10cb 13781 Remove unused var.
dde42981 13782 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
2baccd04 13783
72391843 13784 * xrdb.c (x_load_resources): Omit unused local.
3565b346 13785
436c16df 13786 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
8a94ea33 13787 (x_window): Rename locals to avoid shadowing.
dc5ddd85 13788 (USG): Use the kludged USG macro, to pacify gcc.
436c16df 13789
92bb796d 13790 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
bbbef9e1 13791 (x_term_init): Remove local to avoid shadowing.
92bb796d 13792
764430a3 13793 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
4887c6e2
PE
13794
13795 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
13796 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
13797
d1dfb56c
EZ
137982011-04-16 Eli Zaretskii <eliz@gnu.org>
13799
c4354cb4
EZ
13800 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
13801
d1dfb56c
EZ
13802 Fix regex.c, syntax.c and friends for buffers > 2GB.
13803 * syntax.h (struct gl_state_s): Declare character position members
13804 EMACS_INT.
13805
13806 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
13807
04f2d78b
CB
13808 * textprop.c (verify_interval_modification, interval_of):
13809 Declare arguments EMACS_INT.
d1dfb56c
EZ
13810
13811 * intervals.c (adjust_intervals_for_insertion): Declare arguments
13812 EMACS_INT.
13813
13814 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
13815
13816 * indent.c (Fvertical_motion): Local variable it_start is now
13817 EMACS_INT.
13818
13819 * regex.c (re_match, re_match_2, re_match_2_internal)
13820 (bcmp_translate, regcomp, regexec, print_double_string)
13821 (group_in_compile_stack, re_search, re_search_2, regex_compile)
13822 (re_compile_pattern, re_exec): Declare arguments and local
13823 variables `size_t' and `ssize_t' and return values `regoff_t', as
13824 appropriate.
13825 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
13826 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
13827 <compile_stack_type>: `size' and `avail' are now `size_t'.
13828
13829 * regex.h <regoff_t>: Use ssize_t, not int.
13830 (re_search, re_search_2, re_match, re_match_2): Arguments that
13831 specify buffer/string position and length are now ssize_t and
13832 size_t. Return type is regoff_t.
13833
613052cd
BK
138342011-04-16 Ben Key <bkey76@gmail.com>
13835
13836 * nsfont.m: Fixed bugs in ns_get_family and
13837 ns_descriptor_to_entity that were caused by using free to
13838 deallocate memory blocks that were allocated by xmalloc (via
13839 xstrdup). This caused Emacs to crash when compiled with
13840 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
13841 --enable-checking=xmallocoverrun). xfree is now used to
13842 deallocate these memory blocks.
13843
4170f62f 138442011-04-15 Paul Eggert <eggert@cs.ucla.edu>
3e047f51 13845
71b41406
PE
13846 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
13847
9587a89d
PE
13848 emacs_write: Accept and return EMACS_INT for sizes.
13849 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
13850 et seq.
13851 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
13852 Accept and return EMACS_INT.
13853 (emacs_gnutls_write): Return the number of bytes written on
13854 partial writes.
13855 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
273a5f82
PE
13856 (emacs_read, emacs_write): Remove check for negative size, as the
13857 Emacs source code has been audited now.
9587a89d
PE
13858 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
13859 (emacs_read, emacs_write): Use it.
273a5f82
PE
13860 * process.c (send_process): Adjust to the new signatures of
13861 emacs_write and emacs_gnutls_write. Do not attempt to store
13862 a byte offset into an 'int'; it might overflow.
9587a89d 13863 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
273a5f82 13864
3e047f51
PE
13865 * sound.c: Don't assume sizes fit in 'int'.
13866 (struct sound_device.period_size, alsa_period_size):
9c3c56a7 13867 Return EMACS_INT, not int.
3e047f51 13868 (struct sound_device.write, vox_write, alsa_write):
9c3c56a7
PE
13869 Accept EMACS_INT, not int.
13870 (wav_play, au_play): Use EMACS_INT to store sizes and to
3e047f51
PE
13871 record read return values.
13872
cc39a9db
BK
138732011-04-15 Ben Key <bkey76@gmail.com>
13874
c9d0ec6d
JB
13875 * keyboard.c (Qundefined): Don't declare static since it is used
13876 in nsfns.m.
13877 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
13878 static since they are used in nsfont.m.
cc39a9db 13879
6c60eb9f
SM
138802011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
13881
13882 * process.c (Qprocessp): Don't declare static.
13883 * lisp.h (Qprocessp): Declare again.
13884
7990b61a
JB
138852011-04-15 Juanma Barranquero <lekktu@gmail.com>
13886
13887 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
13888
5d4cb038
PE
138892011-04-14 Paul Eggert <eggert@cs.ucla.edu>
13890
8bd7b830 13891 Improve C-level modularity by making more things 'static'.
cd64ea1d 13892
e3b27b31
PE
13893 Don't publish debugger-only interfaces to other modules.
13894 * lisp.h (safe_debug_print, debug_output_compilation_hack):
13895 (verify_bytepos, count_markers): Move decls to the only modules
13896 that need them.
13897 * region-cache.h (pp_cache): Likewise.
13898 * window.h (check_all_windows): Likewise.
13899 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
13900
5d4cb038
PE
13901 * sysdep.c (croak): Now static, if
13902 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
13903 * syssignal.h (croak): Declare only if not static.
69003fd8
PE
13904
13905 * alloc.c (refill_memory_reserve): Now static if
13906 !defined REL_ALLOC || defined SYSTEM_MALLOC.
13907 * lisp.h (refill_memory_reserve): Declare only if not static.
93ea6e8f 13908
e87b6180
PE
13909 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
13910 Define only if USE_LUCID.
13911
ac64929e
PE
13912 * xrdb.c (x_customization_string, x_rm_string): Now static.
13913
6f37259d
PE
13914 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
13915 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
13916
1683e3ab
PE
13917 * xdisp.c (draw_row_with_mouse_face): Now static.
13918 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
13919
de9c2632
PE
13920 * window.h (check_all_windows): Mark externally visible.
13921
2b96acb7
PE
13922 * window.c (window_deletion_count): Now static.
13923
13924 * undo.c: Make symbols static if they're not exported.
13925 (last_undo_buffer, last_boundary_position, pending_boundary):
13926 Now static.
13927
50436f33
PE
13928 * textprop.c (interval_insert_behind_hooks): Now static.
13929 (interval_insert_in_front_hooks): Likewise.
13930
64520e5c
PE
13931 * term.c: Make symbols static if they're not exported.
13932 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
13933 (max_frame_lines, tty_set_terminal_modes):
13934 (tty_reset_terminal_modes, tty_turn_off_highlight):
13935 (get_tty_terminal): Now static.
13936 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
13937 * termhooks.h (term_mouse_moveto): Do not declare if
8bd7b830 13938 HAVE_WINDOW_SYSTEM.
64520e5c
PE
13939 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
13940 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
13941
1fa53021
PE
13942 * sysdep.c: Make symbols static if they're not exported.
13943 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
13944 Now static.
13945 (sigprocmask_set, full_mask): Remove; unused.
13946 (wait_debugging): Mark as visible.
13947 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
13948 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
13949
d4b43b22
PE
13950 * syntax.c (syntax_temp): Define only if !__GNUC__.
13951
b7c513d0
PE
13952 * sound.c (current_sound_device, current_sound): Now static.
13953
989b29ad
PE
13954 * search.c (searchbufs, searchbuf_head): Now static.
13955
13a55a78
PE
13956 * scroll.c (scroll_cost): Remove; unused.
13957 * dispextern.h (scroll_cost): Remove decl.
13958
de68a1fc
PE
13959 * region-cache.h (pp_cache): Mark as externally visible.
13960
40ccffa6
PE
13961 * process.c: Make symbols static if they're not exported.
13962 (process_tick, update_tick, create_process, chan_process):
13963 (Vprocess_alist, proc_buffered_char, datagram_access):
13964 (fd_callback_data, send_process_frame, process_sent_to): Now static.
13965 (deactivate_process): Mark defn as static, as well as decl.
13966 * lisp.h (create_process): Remove decl.
13967 * process.h (chan_process, Vprocess_alist): Remove decls.
13968
ad64fc97
PE
13969 * print.c: Make symbols static if they're not exported.
13970 (print_depth, new_backquote_output, being_printed, print_buffer):
13971 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
13972 (print_interval, print_number_index, initial_stderr_stream):
13973 Now static.
13974 * lisp.h (Fprinc): Remove decl.
13975 (debug_output_compilation_hack): Mark as externally visible.
13976
adddb265
PE
13977 * sysdep.c (croak): Move decl from here to syssignal.h.
13978 * syssignal.h (croak): Put it here, so the API can be checked when
13979 'croak' is called from dissociate_if_controlling_tty.
13980
1717ede2
PE
13981 * minibuf.c: Make symbols static if they're not exported.
13982 (minibuf_save_list, choose_minibuf_frame): Now static.
13983 * lisp.h (choose_minibuf_frame): Remove decl.
13984
fa5fb2bc
PE
13985 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
13986
1e3890d1
PE
13987 * lread.c: Make symbols static if they're not exported.
13988 (read_objects, initial_obarray, oblookup_last_bucket_number):
13989 Now static.
13990 (make_symbol): Remove; unused.
13991 * lisp.h (initial_obarray, make_symbol): Remove decls.
13992
8a1414fa
PE
13993 * keyboard.c: Make symbols static if they're not exported.
13994 (single_kboard, recent_keys_index, total_keys, recent_keys):
13995 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
13996 (this_single_command_key_start, echoing, last_auto_save):
13997 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
13998 (command_loop, echo_now, keyboard_init_hook, help_char_p):
13999 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
14000 (Vlispy_mouse_stem, double_click_count):
14001 Now static.
14002 (force_auto_save_soon): Define only if SIGDANGER.
14003 (ignore_mouse_drag_p): Now static if
14004 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
14005 (print_help): Remove; unused.
14006 (stop_character, last_timer_event): Mark as externally visible.
14007 * keyboard.h (ignore_mouse_drag_p): Declare only if
14008 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
14009 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
14010 * lisp.h (echoing): Remove decl.
14011 (force_auto_save_soon): Declare only if SIGDANGER.
14012 * xdisp.c (redisplay_window): Simplify code, to make it more
14013 obvious that ignore_mouse_drag_p is not accessed if !defined
14014 USE_GTK && !defined HAVE_NS.
14015
93ea6e8f
PE
14016 * intervals.c: Make symbols static if they're not exported.
14017 (merge_properties_sticky, merge_interval_right, delete_interval):
14018 Now static.
14019 * intervals.h (merge_interval_right, delete_interval): Remove decls.
14020
77382fcc
PE
14021 * insdel.c: Make symbols static if they're not exported.
14022 However, leave prepare_to_modify_buffer alone. It's never
14023 called from outside this function, but that appears to be a bug.
14024 (combine_after_change_list, combine_after_change_buffer):
4889fc82 14025 (adjust_after_replace, signal_before_change): Now static.
77382fcc
PE
14026 (adjust_after_replace_noundo): Remove; unused.
14027 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
4889fc82 14028 (signal_before_change): Remove decls.
77382fcc 14029
9306c32e
PE
14030 * indent.c (val_compute_motion, val_vmotion): Now static.
14031
cd44d2eb
PE
14032 * image.c: Make symbols static if they're not exported.
14033 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
14034 if USE_GTK.
14035 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
14036 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
14037
ad9a7a06
PE
14038 * fringe.c (standard_bitmaps): Now static.
14039 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
14040
81626931
PE
14041 * frame.c: Make symbols static if they're not exported.
14042 (x_report_frame_params, make_terminal_frame): Now static.
14043 (get_frame_param): Now static, unless HAVE_NS.
14044 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
14045 (x_get_resource_string): Remove; not used.
14046 * frame.h (make_terminal_frame, x_report_frame_params):
14047 (x_get_resource_string); Remove decls.
14048 (x_fullscreen_adjust): Declare only if WINDOWSNT.
14049 * lisp.h (get_frame_param): Declare only if HAVE_NS.
14050
239f9db9
PE
14051 * font.c, fontset.c: Make symbols static if they're not exported.
14052 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
14053 (FACE_SUITABLE_FOR_CHAR_P): Use it.
14054 * font.c (font_close_object): Now static.
14055 * font.h (font_close_object): Remove.
14056 * fontset.c (FONTSET_OBJLIST): Remove.
14057 (free_realized_fontset) #if-0 the body, which does nothing.
14058 (face_suitable_for_char_p): #if-0, as it's never called.
14059 * fontset.h (face_suitable_for_char_p): Remove decl.
04f2d78b
CB
14060 * xfaces.c (face_at_string_position):
14061 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
239f9db9
PE
14062 since 0 is always ASCII.
14063
dfcf3579
PE
14064 * fns.c (weak_hash_tables): Now static.
14065
5045092b
PE
14066 * fileio.c: Make symbols static if they're not exported.
14067 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
14068 (Vwrite_region_annotation_buffers): Now static.
14069
57a96f5c
PE
14070 * eval.c: Make symbols static if they're not exported.
14071 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
14072 * lisp.h (backtrace_list): Remove decl.
14073
35f08c38
PE
14074 * emacs.c: Make symbols static if they're not exported.
14075 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
14076 (fatal_error_code, fatal_error_signal_hook, standard_args):
14077 Now static.
14078 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
14079 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
14080 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
14081 * lisp.h (fatal_error_signal_hook): Remove decl.
14082 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
14083
f44bd759
PE
14084 * editfns.c: Move a (normally-unused) function to its only use.
14085 * editfns.c, lisp.h (get_operating_system_release): Remove.
14086 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
14087 worth the hassle of breaking this out.
14088
b532497d
PE
14089 * xterm.c: Make symbols static if they're not exported.
14090 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
14091 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
14092 (x_destroy_window, x_delete_display):
14093 Now static.
14094 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
14095 (x_mouse_leave): Remove; unused.
14096 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
14097 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
14098 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
14099 Remove decls.
14100 (x_mouse_leave): Declare only if WINDOWSNT.
14101 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
14102 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
14103 USE_X_TOOLKIT.
14104
1675728f
PE
14105 * ftxfont.c: Make symbols static if they're not exported.
14106 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
14107 HAVE_FREETYPE.
14108 * font.h (ftxfont_driver): Likewise.
14109
e4cebfca
PE
14110 * xfns.c: Make symbols static if they're not exported.
14111 (x_last_font_name, x_display_info_for_name):
14112 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
14113 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
14114 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
14115 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
14116 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
14117 (last_show_tip_args): Now static.
14118 (xic_defaut_fontset, xic_create_fontsetname): Define only if
14119 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
14120 (x_screen_planes): Remove; unused.
14121 * dispextern.h (x_screen_planes): Remove decl.
14122
5bf46f05
PE
14123 * dispnew.c: Make symbols static if they're not exported.
14124 * dispextern.h (redraw_garbaged_frames, scrolling):
14125 (increment_row_positions): Remove.
14126 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
14127 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
14128 Now static.
14129 (redraw_garbaged_frames): Remove; unused.
14130
435f4c28
PE
14131 * xfaces.c: Make symbols static if they're not exported.
14132 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
14133 Remove decls.
14134 * xterm.h (defined_color): Remove decls.
14135 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
14136 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
14137 (menu_face_changed_default, defined_color, free_realized_face):
14138 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
14139 (ascii_face_of_lisp_face): Remove; unused.
14140
8524aef3
PE
14141 * xdisp.c: Make symbols static if they're not exported.
14142 * dispextern.h (scratch_glyph_row, window_box_edges):
14143 (glyph_to_pixel_coords, set_cursor_from_row):
14144 (get_next_display_element, set_iterator_to_next):
14145 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
14146 (show_mouse_face): Remove decls
14147 * frame.h (message_buf_print): Likewise.
14148 * lisp.h (pop_message, set_message, check_point_in_composition):
14149 Likewise.
14150 * xterm.h (set_vertical_scroll_bar): Likewise.
14151 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
14152 (message_buf_print, scratch_glyph_row, displayed_buffer):
14153 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
14154 (get_next_display_element, show_mouse_face, window_box_edges):
14155 (frame_to_window_pixel_xy, check_point_in_composition):
14156 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
14157 (glyph_to_pixel_coords): Remove; unused.
14158
16390cd2
PE
14159 * dired.c (file_name_completion): Now static.
14160
14161 * dbusbind.c (xd_in_read_queued_messages): Now static.
14162
a25f4dfa
PE
14163 * lisp.h (circular_list_error, FOREACH): Remove; unused.
14164 * data.c (circular_list_error): Remove.
14165
14a9c8df
PE
14166 * commands.h (last_point_position, last_point_position_buffer):
14167 (last_point_position_window): Remove decls.
14168 * keyboard.c: Make these variables static.
14169
04f2d78b
CB
14170 * coding.h (coding, code_convert_region, encode_coding_gap):
14171 Remove decls.
74ab6df5
PE
14172 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
14173 (iso_code_class, detect_coding, code_convert_region): Now static.
14174 (encode_coding_gap): Remove; unused.
14175
38dfbee1
PE
14176 * chartab.c (chartab_chars, chartab_bits): Now static.
14177
a2cb4e63
PE
14178 * charset.h (charset_iso_8859_1): Remove decl.
14179 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
14180 Now static.
14181
127198fd
PE
14182 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
14183 * ccl.c (Vccl_program_table): Now static.
14184 (check_ccl_update): Remove; unused.
14185
d85b608f
PE
14186 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
14187 * category.h: ... from here.
14188 * category.c (check_category_table, set_category_set): Now static.
14189
31cd66f3
PE
14190 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
14191 * lisp.h: Remove these decls.
14192
c358e587
PE
14193 * buffer.c (buffer_count): Remove unused var.
14194
e78aecca
PE
14195 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
14196 so that it's not optimized away.
14197 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
14198 * dispextern.h (bidi_dump_cached_states): Remove, since it's
14199 exported only to the debugger.
14200
e192d7d3 14201 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
04f2d78b 14202 * atimer.h (run_all_atimers): Remove; not exported.
e192d7d3 14203
92470028
PE
14204 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
14205 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
14206 was inaccessible from Lisp.
14207 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
14208 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
14209
244ed907
PE
14210 alloc.c: Import and export fewer symbols, and remove unused items.
14211 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
14212 is defined.
14213 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
14214 it's not optimized away by whole-program optimization.
14215 (message_enable_multibyte, free_misc): Remove.
14216 (catchlist, handlerlist, mark_backtrace):
14217 Declare only if BYTE_MARK_STACK.
14218 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
14219 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
14220 (message_enable_multibyte): Remove decl.
14221 (free_misc, interval_free_list, float_block, float_block_index):
14222 (n_float_blocks, float_free_list, cons_block, cons_block_index):
14223 (cons_free_list, last_marked_index):
14224 Now static.
14225 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
14226 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
14227 (mark_backtrace): Define only if BYTE_MARK_STACK.
14228 * xdisp.c (message_enable_multibyte): Now static.
14229
61c2b50e 14230 Declare Lisp_Object Q* variables to be 'static' if not exported.
955cbe7b
PE
14231 This makes it easier for human readers (and static analyzers)
14232 to see whether these variables are used from other modules.
14233 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
14234 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
14235 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
14236 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
14237 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
14238 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
14239 * xmenu.c, xselect.c:
14240 Declare Q* vars static if they are not used in other modules.
14241 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
14242 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
14243 Remove decls of unexported vars.
14244 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
14245
95c82688
PE
14246 * lisp.h (DEFINE_FUNC): Make sname 'static'.
14247
16a97296
PE
14248 Make Emacs functions such as Fatom 'static' by default.
14249 This makes it easier for human readers (and static analyzers)
14250 to see whether these functions can be called from other modules.
14251 DEFUN now defines a static function. To make the function external
14252 so that it can be used in other C modules, use the new macro DEFUE.
8bd7b830
PE
14253 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
14254 (Finit_image_library):
16a97296
PE
14255 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
14256 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
14257 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
14258 Remove decls, since these functions are now static.
14259 (Funintern, Fget_internal_run_time): New decls, since these functions
14260 were already external.
95c82688 14261
16a97296
PE
14262 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
14263 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
14264 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
14265 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
14266 * keyboard.c, keymap.c, lread.c:
14267 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
14268 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
14269 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
14270 Mark functions with DEFUE instead of DEFUN,
14271 if they are used in other modules.
14272 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
14273 decls for now-static functions.
14274 * buffer.h (Fdelete_overlay): Remove decl.
14275 * callproc.c (Fgetenv_internal): Mark as internal.
14276 * composite.c (Fremove_list_of_text_properties): Remove decl.
14277 (Fcomposition_get_gstring): New forward static decl.
14278 * composite.h (Fcomposite_get_gstring): Remove decl.
14279 * dired.c (Ffile_attributes): New forward static decl.
14280 * doc.c (Fdocumntation_property): New forward static decl.
14281 * eval.c (Ffetch_bytecode): New forward static decl.
14282 (Funintern): Remove extern decl; now in .h file where it belongs.
14283 * fileio.c (Fmake_symbolic_link): New forward static decl.
14284 * image.c (Finit_image_library): New forward static decl.
14285 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
14286 * intervals.h (Fprevious_property_change):
14287 (Fremove_list_of_text_properties): Remove decls.
14288 * keyboard.c (Fthis_command_keys): Remove decl.
14289 (Fcommand_execute): New forward static decl.
14290 * keymap.c (Flookup_key): New forward static decl.
14291 (Fcopy_keymap): Now static.
14292 * keymap.h (Flookup_key): Remove decl.
14293 * process.c (Fget_process): New forward static decl.
14294 (Fprocess_datagram_address): Mark as internal.
14295 * syntax.c (Fsyntax_table_p): New forward static decl.
14296 (skip_chars): Remove duplicate decl.
14297 * textprop.c (Fprevious_property_change): New forward static decl.
14298 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
14299 Now internal.
14300 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
14301 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
14302
785bbd42
PE
14303 * editfns.c (Fformat): Remove unreachable code.
14304
8b913b57
AS
143052011-04-14 Andreas Schwab <schwab@linux-m68k.org>
14306
14307 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
14308 change. (Bug#8496)
14309
a6744a35
EZ
143102011-04-13 Eli Zaretskii <eliz@gnu.org>
14311
14312 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
14313 when at ZV. (Bug#8487)
14314
e7974947
AS
143152011-04-12 Andreas Schwab <schwab@linux-m68k.org>
14316
baad03f0
AS
14317 * charset.c (Fclear_charset_maps): Use xfree instead of free.
14318 (Bug#8437)
14319 * keyboard.c (parse_tool_bar_item): Likewise.
14320 * sound.c (sound_cleanup, alsa_close): Likewise.
14321 * termcap.c (tgetent): Likewise.
14322 * xfns.c (x_default_font_parameter): Likewise.
14323 * xsettings.c (read_and_apply_settings): Likewise.
14324
e7974947
AS
14325 * alloc.c (overrun_check_malloc, overrun_check_realloc)
14326 (overrun_check_free): Protoize.
14327
28272684
PE
143282011-04-12 Paul Eggert <eggert@cs.ucla.edu>
14329
14330 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
14331 since callers should never pass a negative size.
14332 Change the signature to match that of plain 'read' and 'write'; see
14333 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
14334 * lisp.h: Update prototypes of emacs_write and emacs_read.
14335
11997c76
EZ
143362011-04-11 Eli Zaretskii <eliz@gnu.org>
14337
14338 * xdisp.c (redisplay_window): Don't try to determine the character
14339 position of the scroll margin if the window start point w->startp
e896f03c 14340 is outside the buffer's accessible region. (Bug#8468)
11997c76 14341
8a2cbd72
EZ
143422011-04-10 Eli Zaretskii <eliz@gnu.org>
14343
14344 Fix write-region and its subroutines for buffers > 2GB.
14345 * fileio.c (a_write, e_write): Modify declaration of arguments and
14346 local variables to support buffers larger than 2GB.
14347 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
14348
14349 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
14350 argument, local variables, and return value.
14351
14352 * lisp.h: Update prototypes of emacs_write and emacs_read.
14353
14354 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
14355
4073e537 143562011-04-10 Paul Eggert <eggert@cs.ucla.edu>
eb3f1cc8 14357
1ebfdcb6
PE
14358 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
14359
b2ded58d
PE
14360 Fix more problems found by GCC 4.6.0's static checks.
14361
7d66342c
PE
14362 * xdisp.c (vmessage): Use a better test for character truncation.
14363
bbf47d44
PE
14364 * charset.c (load_charset_map): <, not <=, for optimization,
14365 and to avoid potential problems with integer overflow.
9248994d 14366 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
f9a68bc5 14367 * casetab.c (set_identity, shuffle): Likewise.
3ab1c7ce 14368 * editfns.c (Fformat): Likewise.
1e69125e 14369 * syntax.c (skip_chars): Likewise.
3befa583 14370
e3019616
PE
14371 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
14372 This also lets GCC 4.6.0 generate slightly better loop code.
14373
becfa255
PE
14374 * callint.c (Fcall_interactively): <, not <=, for optimization.
14375 (Fcall_interactively): Count the number of arguments produced,
14376 not the number of arguments given. This is simpler and lets GCC
14377 4.6.0 generate slightly better code.
14378
dae0cd48
PE
14379 * ftfont.c: Distingish more carefully between FcChar8 and char.
14380 The previous code passed unsigned char * to a functions like
14381 strlen and xstrcasecmp that expect char *, which does not
14382 conform to the C standard.
14383 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
14384 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
14385 char * when the C standard requires it.
14386
76032d70
PE
14387 * keyboard.c (read_char): Remove unused var.
14388
eb3f1cc8
PE
14389 * eval.c: Port to Windows vsnprintf (Bug#8435).
14390 Include <limits.h>.
14391 (SIZE_MAX): Define if the headers do not.
14392 (verror): Do not give up if vsnprintf returns a negative count.
14393 Instead, grow the buffer. This ports to Windows vsnprintf, which
14394 does not conform to C99. Problem reported by Eli Zaretskii.
14395 Also, simplify the allocation scheme, by avoiding the need for
14396 calling realloc, and removing the ALLOCATED variable.
14397
70476b54
PE
14398 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
14399
12020a9e
PE
14400 Remove invocations of doprnt, as Emacs now uses vsnprintf.
14401 But keep the doprint source code for now, as we might revamp it
14402 and use it again (Bug#8435).
ea6c7ae6
PE
14403 * lisp.h (doprnt): Remove.
14404 * Makefile.in (base_obj): Remove doprnt.o.
14405 * deps.mk (doprnt.o): Remove.
14406
5fdb398c
PE
14407 error: Print 32- and 64-bit integers portably (Bug#8435).
14408 Without this change, on typical 64-bit hosts error ("...%d...", N)
14409 was used to print both 32- and 64-bit integers N, which relied on
14410 undefined behavior.
61bdb816 14411 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
5fdb398c
PE
14412 * lisp.h (error, verror): Mark as printf-like functions.
14413 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
14414 Report overflow in size calculations when allocating printf buffer.
14415 Do not truncate output string at its first null byte.
14416 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
14417 Truncate the output at a character boundary, since vsnprintf does not
14418 do that.
14419 * charset.c (check_iso_charset_parameter): Convert internal
14420 character to string before calling 'error', since %c now has the
14421 printf meaning.
14422 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
14423 overflow when computing char to be passed to 'error'. Do not
14424 pass Lisp_Object to 'error'; pass the integer instead.
14425 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
14426 formatted with plain %d.
14427
b189fa66
PE
14428 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
14429
bff87ef0
PE
14430 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
14431
7e2cac20
PE
14432 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
14433
ce4d90b5
PE
14434 * xterm.c (x_catch_errors): Remove duplicate declaration.
14435
266c9547
PE
14436 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
14437
79c49ad2
PE
14438 * xdisp.c, lisp.h (message_nolog): Remove; unused.
14439
368f4090
JM
144402011-04-10 Jim Meyering <meyering@redhat.com>
14441
14442 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
14443 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
14444 return ssize_t not "int", and use size_t as the buffer length.
14445 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
14446 * gnutls.h: Update declarations.
14447 * process.c (read_process_output): Use ssize_t, to match.
14448 (send_process): Likewise.
14449
a32d4040
CY
144502011-04-09 Chong Yidong <cyd@stupidchicken.com>
14451
14452 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
14453
8546720e 144542011-04-09 Chong Yidong <cyd@stupidchicken.com>
aac0c6e3 14455
04f2d78b
CB
14456 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
14457 Use unsigned char, to match FcChar8 type definition.
aac0c6e3 14458
8546720e
GM
14459 * xterm.c (handle_one_xevent):
14460 * xmenu.c (create_and_show_popup_menu):
14461 * xselect.c (x_decline_selection_request)
14462 (x_reply_selection_request): Avoid type-punned deref of X events.
aac0c6e3 14463
0a2f5c1a 144642011-04-09 Eli Zaretskii <eliz@gnu.org>
a53e2e89
EZ
14465
14466 Fix some uses of `int' instead of EMACS_INT.
14467 * search.c (string_match_1, fast_string_match)
14468 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
14469 (scan_buffer, find_next_newline_no_quit)
14470 (find_before_next_newline, search_command, Freplace_match)
14471 (Fmatch_data): Make some `int' variables be EMACS_INT.
14472
14473 * xdisp.c (display_count_lines): 3rd argument and return value now
14474 EMACS_INT. All callers changed.
14475 (pint2hrstr): Last argument is now EMACS_INT.
14476
14477 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
14478 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
14479 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
14480 (decode_coding_utf_16, decode_coding_emacs_mule)
14481 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
14482 (decode_coding_ccl, decode_coding_charset)
14483 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
14484 (decode_coding_iso_2022, decode_coding_emacs_mule)
14485 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
14486 <char_offset, last_offset>: Declare EMACS_INT.
14487 (encode_coding_utf_8, encode_coding_utf_16)
14488 (encode_coding_emacs_mule, encode_invocation_designation)
14489 (encode_designation_at_bol, encode_coding_iso_2022)
14490 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
14491 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
14492 Declare EMACS_INT.
14493 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
14494 (encode_invocation_designation): Last argument P_NCHARS is now
14495 EMACS_INT.
14496 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
14497 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
14498
14499 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
14500 All users changed.
14501
14502 * ccl.c (Fccl_execute_on_string): Declare some variables
14503 EMACS_INT.
14504
8546720e 145052011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
0080dc6b
SS
14506
14507 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
14508
4e19a977
CS
145092011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
14510
14511 * process.c (Fformat_network_address): Doc fix.
14512
87302331
R
145132011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
14514
ee7683eb 14515 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
87302331 14516
cbb59342
CY
145172011-04-08 Chong Yidong <cyd@stupidchicken.com>
14518
14519 * keyboard.c (read_char): Call Lisp function help-form-show,
14520 instead of using internal_with_output_to_temp_buffer.
14521 (Qhelp_form_show): New var.
e0d38eeb 14522 (syms_of_keyboard): Use DEFSYM macro.
cbb59342
CY
14523
14524 * print.c (internal_with_output_to_temp_buffer): Function deleted.
14525
14526 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
14527
e67a13ab
CY
145282011-04-06 Chong Yidong <cyd@stupidchicken.com>
14529
04f2d78b
CB
14530 * process.c (Flist_processes): Remove to Lisp.
14531 (list_processes_1): Delete.
e67a13ab 14532
973f782d
EZ
145332011-04-06 Eli Zaretskii <eliz@gnu.org>
14534
7c106b1e
EZ
14535 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
14536
973f782d
EZ
14537 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
14538
41cf7d1a 145392011-04-06 Paul Eggert <eggert@cs.ucla.edu>
27ccc379 14540
ca23cc88
PE
14541 Fix more problems found by GCC 4.6.0's static checks.
14542
f390e2d5
PE
14543 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
14544
42eea0d0
PE
14545 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
14546
b69769da 14547 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
1e973bc7 14548
f9541e84
PE
14549 * xdisp.c (vmessage): Mark as a printf-like function.
14550
13841b55
PE
14551 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
14552
c136c10f
PE
14553 * sound.c (sound_warning): Don't crash if arg contains a printf format.
14554
5e2d4a30
PE
14555 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
14556 printf-like functions.
14557 (tiff_load): Add casts to remove these marks before passing them
14558 to system-supplied API.
14559
583f48b9
PE
14560 * eval.c (Fsignal): Remove excess argument to 'fatal'.
14561
b25d760e
PE
14562 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
14563 This avoids several warnings with gcc -Wstrict-overflow.
d5efd1d1
PE
14564 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
14565 directly, rather than having caller test rule sign. This avoids
14566 some unnecessary tests.
14567 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
14568 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
14569 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
b25d760e 14570
bc7b6697 14571 * xfont.c (xfont_text_extents): Remove var that was set but not used.
625a3eb1 14572 (xfont_open): Avoid unnecessary tests.
bc7b6697 14573
27ccc379
PE
14574 * composite.c (composition_gstring_put_cache): Use unsigned integer.
14575
dcd5c89a
PE
14576 * composite.h, composite.c (composition_gstring_put_cache):
14577 Use EMACS_INT, not int, for length.
14578
b13a45c6
PE
14579 * composite.h (COMPOSITION_DECODE_REFS): New macro,
14580 breaking out part of COMPOSITION_DECODE_RULE.
14581 (COMPOSITION_DECODE_RULE): Use it.
14582 * composite.c (get_composition_id): Remove unused local vars,
14583 by using the new macro.
14584
1e792e4d
PE
14585 * textprop.c (set_text_properties_1): Change while to do-while,
14586 since the condition is always true at first.
14587
dc6c6455 14588 * intervals.c (graft_intervals_into_buffer): Mark var as used.
aa86731f
PE
14589 (interval_deletion_adjustment): Return unsigned value.
14590 All uses changed.
dc6c6455 14591
aba7731a
PE
14592 * process.c (list_processes_1, create_pty, read_process_output):
14593 (exec_sentinel): Remove vars that were set but not used.
afd4052b 14594 (create_pty): Remove unnecessary "volatile"s.
bc57d757 14595 (Fnetwork_interface_info): Avoid possibility of int overflow.
82eaa333 14596 (read_process_output): Do adaptive read buffering even if carryover.
fe07cdfa 14597 (read_process_output): Simplify nbytes computation if buffered.
aba7731a 14598
fdfc4bf3
PE
14599 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
14600
fca8fe46 14601 * syntax.c (scan_words): Remove var that was set but not used.
12cbf13f 14602 (update_syntax_table): Use unsigned instead of int.
fca8fe46 14603
06a0259a 14604 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
3c346cc3 14605 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
e6eb4e9e 14606 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
06a0259a 14607
e7b9e80f
PE
14608 * print.c (print_error_message): Avoid int overflow.
14609
56201685
PE
14610 * font.c (font_list_entities): Redo for clarity,
14611 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
14612
78834453 14613 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
790771b1 14614 (font_score): Avoid potential overflow in diff calculation.
78834453 14615
0bc0b309 14616 * fns.c (substring_both): Remove var that is set but not used.
8cd55cb4 14617 (sxhash): Redo loop for clarity and to avoid wraparound warning.
0bc0b309 14618
e610eaca
PE
14619 * eval.c (funcall_lambda): Rename local to avoid shadowing.
14620
b895abce
PE
14621 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
14622 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
14623 can always succeed if overflow has undefined behavior.
14624
1f1d9321 14625 * search.c (boyer_moore, wordify): Remove vars set but not used.
6f076cc7 14626 (wordify): Omit three unnecessary tests.
1f1d9321 14627
c59478bc
PE
14628 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
14629 All callers changed. This avoids the need for an unused var.
14630
79b73827
PE
14631 * casefiddle.c (casify_region): Remove var that is set but not used.
14632
a4db5dfe
PE
14633 * dired.c (file_name_completion): Remove var that is set but not used.
14634
43aae36e
PE
14635 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
14636
2a47c44d 14637 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
163c5f32 14638 (Finsert_file_contents): Remove unnecessary code checking fd.
2a47c44d 14639
a37c69bf
PE
14640 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
14641 Check for integer overflow on size calculations.
14642
328ab8e7
PE
14643 * buffer.c (Fprevious_overlay_change): Remove var that is set
14644 but not used.
14645
e5a2a5cb
PE
14646 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
14647 Remove vars that are set but not used.
8d84a6eb 14648 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
6b043475 14649 (timer_check_2): Mark vars as initialized.
e5a2a5cb 14650
a60e5f68
PE
14651 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
14652
f661cb61 14653 * image.c (lookup_image): Remove var that is set but not used.
35fa624f 14654 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
f661cb61 14655
f0397f5a
PE
14656 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
14657 that are set but not used.
14658
8664db06 14659 * xfns.c (make_invisible_cursor): Don't return garbage
03733ee7 14660 if XCreateBitmapFromData fails (Bug#8410).
8664db06 14661
6abdaa4a
PE
14662 * xselect.c (x_get_local_selection, x_handle_property_notify):
14663 Remove vars that are set but not used.
14664
0ce7538d 14665 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
6abdaa4a 14666 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
0ce7538d 14667
9ae848fc
PE
14668 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
14669 Remove var that is set but not used.
0b918413
PE
14670 (scroll_bar_windows_size): Now size_t, not int.
14671 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
14672 Check for overflow.
9ae848fc 14673
a5a62657
PE
14674 * xfaces.c (realize_named_face): Remove vars that are set but not used.
14675 (map_tty_color) [!defined MSDOS]: Likewise.
14676
5c5cdd39
PE
14677 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
14678
66ebf983
PE
14679 * coding.c: Remove vars that are set but not used.
14680 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
14681 All callers changed.
14682 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
14683 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
14684 (decode_coding_charset): Remove vars that are set but not used.
14685
1be4d761
PE
14686 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
14687 that is set but not used.
14688
47553fa8
PE
14689 * print.c (print_object): Remove var that is set but not used.
14690
1f7196bf 14691 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
d1fdcab7
PE
14692 The gnulib version avoids calling malloc in the usual case,
14693 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
14694 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
14695 * filelock.c (current_lock_owner): Likewise.
14696 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
14697 * sysdep.c: Include allocator.h, careadlinkat.h.
14698 (emacs_no_realloc_allocator): New static constant.
14699 (emacs_readlink): New function.
fdb61804
PE
14700 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
14701 ../lib/careadlinkat.h.
d1fdcab7 14702
f84c17c7
SM
147032011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
14704
14705 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
14706 first non-nil return value).
14707
ef3862ad
JD
147082011-04-03 Jan Djärv <jan.h.d@swipnet.se>
14709
14710 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
14711 if not defined (Bug#8403).
14712
376a7006
JB
147132011-04-02 Juanma Barranquero <lekktu@gmail.com>
14714
14715 * xdisp.c (display_count_lines): Remove parameter `start',
14716 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
14717 (get_char_face_and_encoding): Remove parameter `multibyte_p',
14718 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
14719 (fill_stretch_glyph_string): Remove parameters `row' and `area',
14720 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
14721 and thereabouts. All callers changed.
14722 (get_per_char_metric): Remove parameter `f', unused since
14723 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
14724
6ca3801d
JM
147252011-04-02 Jim Meyering <meyering@redhat.com>
14726
14727 do not dereference NULL upon failed strdup
14728 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
14729 (ns_get_family): Likewise.
14730
d8e2b5ba
JB
147312011-04-02 Juanma Barranquero <lekktu@gmail.com>
14732
14733 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
14734
8c74fcbd
JD
147352011-04-02 Jan Djärv <jan.h.d@swipnet.se>
14736
14737 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
14738 later (Bug#8403).
14739
7200d79c
SM
147402011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
14741
03408648 14742 Add lexical binding.
7200d79c 14743
03408648
SM
14744 * window.c (Ftemp_output_buffer_show): New fun.
14745 (Fsave_window_excursion):
14746 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
14747
14748 * lread.c (lisp_file_lexically_bound_p): New function.
14749 (Fload): Bind Qlexical_binding.
14750 (readevalloop): Remove `evalfun' arg.
14751 Bind Qinternal_interpreter_environment.
14752 (Feval_buffer): Bind Qlexical_binding.
14753 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
14754 Mark as dynamic.
14755 (syms_of_lread): Declare `lexical-binding'.
14756
14757 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
14758
14759 * keyboard.c (eval_dyn): New fun.
14760 (menu_item_eval_property): Use it.
ca105506
SM
14761
14762 * image.c (parse_image_spec): Use Ffunctionp.
ca105506 14763
03408648
SM
14764 * fns.c (concat, mapcar1): Accept byte-code-functions.
14765
14766 * eval.c (Fsetq): Handle lexical vars.
14767 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
14768 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
14769 (FletX, Flet): Obey lexical binding.
14770 (Fcommandp): Handle closures.
14771 (Feval): New `lexical' arg.
14772 (eval_sub): New function extracted from Feval. Use it almost
14773 everywhere where Feval was used. Look up vars in lexical env.
14774 Handle closures.
14775 (Ffunctionp): Move from subr.el.
14776 (Ffuncall): Handle closures.
14777 (apply_lambda): Remove `eval_flags'.
14778 (funcall_lambda): Handle closures and new byte-code-functions.
14779 (Fspecial_variable_p): New function.
14780 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
14781 but without exporting it to Lisp.
23aba0ea 14782
23aba0ea 14783 * doc.c (Fdocumentation, store_function_docstring):
03408648 14784 * data.c (Finteractive_form): Handle closures.
23aba0ea 14785
03408648
SM
14786 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
14787 interactive spec.
ba83908c 14788
04f2d78b
CB
14789 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
14790 New byte-codes.
03408648
SM
14791 (exec_byte_code): New function extracted from Fbyte_code to handle new
14792 calling convention for byte-code-functions. Add new byte-codes.
ba83908c 14793
03408648 14794 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
e2abe5a1 14795
03408648 14796 * alloc.c (Fmake_symbol): Init new `declared_special' field.
e2abe5a1 14797
e2abce01
JB
147982011-03-31 Juanma Barranquero <lekktu@gmail.com>
14799
14800 * xdisp.c (redisplay_internal): Fix prototype.
14801
63696a73 148022011-03-31 Eli Zaretskii <eliz@gnu.org>
09725d26 14803
63696a73 14804 * xdisp.c (SCROLL_LIMIT): New macro.
04f2d78b
CB
14805 (try_scrolling): Use it when setting scroll_limit.
14806 Limit scrolling to 100 screen lines.
63696a73
EZ
14807 (redisplay_window): Even when falling back on "recentering",
14808 position point in the window according to scroll-conservatively,
14809 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
14810
14811 (try_scrolling): When point is above the window, allow searching
14812 as far as scroll_max, or one screenful, to compute vertical
14813 distance from PT to the scroll margin position. This prevents
14814 try_scrolling from unnecessarily failing when
14815 scroll-conservatively is set to a value slightly larger than the
14816 window height. Clean up the case of PT below the margin at bottom
14817 of window: scroll_max can no longer be INT_MAX. When aggressive
14818 scrolling is in use, don't let point enter the opposite scroll
14819 margin as result of the scroll.
14820 (syms_of_xdisp) <scroll-conservatively>: Document the
09725d26
EZ
14821 threshold of 100 lines for never-recentering scrolling.
14822
e4cc2dfc
JB
148232011-03-31 Juanma Barranquero <lekktu@gmail.com>
14824
14825 * dispextern.h (move_it_by_lines):
14826 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
14827 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
14828 (message_log_check_duplicate): Remove parameters `prev_bol' and
14829 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
14830 (redisplay_internal): Remove parameter `preserve_echo_area',
14831 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
14832
14833 * indent.c (Fvertical_motion):
14834 * window.c (window_scroll_pixel_based, Frecenter):
14835 Don't pass `need_y_p' to `move_it_by_lines'.
14836
1c470562
SM
148372011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
14838
44f230aa
SM
14839 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
14840 steal a few bits to be more compact.
14841 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
14842 Remove unneeded casts.
14843
1c470562
SM
14844 * bytecode.c (Fbyte_code): CAR and CDR can GC.
14845
888adce9
ZK
148462011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
14847
14848 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
14849 binding" message (bug#7967).
14850
f838ed7b
PE
148512011-03-30 Paul Eggert <eggert@cs.ucla.edu>
14852
77861b95
PE
14853 Fix more problems found by GCC 4.6.0's static checks.
14854
de6dbc14
PE
14855 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
14856 Remove unused local var.
14857
f838ed7b
PE
14858 * editfns.c (Fmessage_box): Remove unused local var.
14859
792c7b2b
PE
14860 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
14861 (note_mode_line_or_margin_highlight, note_mouse_highlight):
14862 Omit unused local vars.
c499e557 14863 * window.c (shrink_windows): Omit unused local var.
b01a1c29 14864 * menu.c (digest_single_submenu): Omit unused local var.
0bc32927
PE
14865 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
14866 Omit unused local var.
14867
ba0165e1
PE
14868 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
14869 Don't assume string length fits in int.
32ad8845 14870 (keyremap_step, read_key_sequence): Use size_t for sizes.
48011560 14871 (read_key_sequence): Don't check last_real_key_start redundantly.
ba0165e1 14872
3c59b4c9
PE
14873 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
14874 instead of alloca (Bug#8344).
14875
a3eed478 14876 * eval.c (Fbacktrace): Don't assume nargs fits in int.
5d5d959d 14877 (Fbacktrace_frame): Don't assume nframes fits in int.
a3eed478 14878
eb4d412d
PE
14879 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
14880
1658b401
PE
14881 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
14882 concerns.
14883
14884 * term.c (produce_glyphless_glyph): Remove unnecessary test.
14885
14886 * cm.c (calccost): Turn while-do into do-while, for clarity.
44f730c8 14887
9a2c6e05
PE
14888 * keyboard.c (syms_of_keyboard): Use the same style as later
14889 in this function when indexing through an array. This also
14890 works around GCC bug 48267.
14891
03d0a109
PE
14892 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
14893
44f730c8
PE
14894 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
14895
fe75f926
PE
14896 * chartab.c (sub_char_table_ref_and_range): Redo for slight
14897 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
14898
ffa8c828
PE
14899 * keyboard.c, keyboard.h (num_input_events): Now size_t.
14900 This avoids undefined behavior on integer overflow, and is a bit
14901 more convenient anyway since it is compared to a size_t variable.
14902
c5101a77
PE
14903 Variadic C functions now count arguments with size_t, not int.
14904 This avoids an unnecessary limitation on 64-bit machines, which
14905 caused (substring ...) to crash on large vectors (Bug#8344).
14906 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
14907 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
77861b95 14908 All variadic functions and their callers changed accordingly.
c5101a77
PE
14909 (struct gcpro.nvars): Now size_t, not int. All uses changed.
14910 * data.c (arith_driver, float_arith_driver): Likewise.
14911 * editfns.c (general_insert_function): Likewise.
14912 * eval.c (struct backtrace.nargs, interactive_p)
14913 (internal_condition_case_n, run_hook_with_args, apply_lambda)
14914 (funcall_lambda, mark_backtrace): Likewise.
14915 * fns.c (concat): Likewise.
14916 * frame.c (x_set_frame_parameters): Likewise.
14917 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
14918 0 if not found, not -1. All callers changed.
14919
dd3f25f7
PE
14920 * alloc.c (garbage_collect): Don't assume stack size fits in int.
14921 (stack_copy_size): Now size_t, not int.
14922 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
14923
461c2ab9
JB
149242011-03-28 Juanma Barranquero <lekktu@gmail.com>
14925
14926 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
14927 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
14928 All callers changed.
14929
14930 * lisp.h (multibyte_char_to_unibyte):
14931 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
14932 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
14933 * character.h (CHAR_TO_BYTE8):
14934 * cmds.c (internal_self_insert):
14935 * editfns.c (general_insert_function):
14936 * keymap.c (push_key_description):
14937 * search.c (Freplace_match):
14938 * xdisp.c (message_dolog, set_message_1): All callers changed.
14939
f6d62986
SM
149402011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
14941
14942 * keyboard.c (safe_run_hook_funcall): New function.
14943 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
14944 don't set the hook to nil, but remove the offending function instead.
14945 (Qcommand_hook_internal): Remove, unused.
14946 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
14947 Vcommand_hook_internal.
14948
14949 * eval.c (enum run_hooks_condition): Remove.
14950 (funcall_nil, funcall_not): New functions.
14951 (run_hook_with_args): Call each function through a `funcall' argument.
14952 Remove `cond' argument, now redundant.
14953 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
14954 (Frun_hook_with_args_until_failure): Adjust accordingly.
14955 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
14956
1db5b1ad
JB
149572011-03-28 Juanma Barranquero <lekktu@gmail.com>
14958
14959 * dispextern.h (string_buffer_position): Remove declaration.
14960
14961 * print.c (strout): Remove parameter `multibyte', unused since
14962 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
14963
14964 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
14965 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
14966 All callers changed.
14967
14968 * w32.c (_wsa_errlist): Use braces for struct initializers.
14969
14970 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
14971 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
14972 All callers changed.
14973 (string_buffer_position): Likewise. Also, make static (it's never
14974 used outside xdisp.c).
14975 (cursor_row_p): Remove parameter `w', unused since
14976 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
14977 (decode_mode_spec): Remove parameter `precision', introduced during
14978 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
14979 All callers changed.
14980
5ffb62aa
JD
149812011-03-27 Jan Djärv <jan.h.d@swipnet.se>
14982
14983 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
14984
461c2ab9 149852011-03-27 Anders Lindgren <andlind@gmail.com>
f0a1382a
JD
14986
14987 * nsterm.m (ns_menu_bar_is_hidden): New variable.
14988 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
14989 (ns_update_auto_hide_menu_bar): New functions.
14990 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
14991 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
14992 ns_constrain_all_frames.
14993 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
14994 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
14995
5c380ffb
JD
149962011-03-27 Jan Djärv <jan.h.d@swipnet.se>
14997
14998 * nsmenu.m (runDialogAt): Remove argument to timer_check.
14999
9af30bdf
GM
150002011-03-27 Glenn Morris <rgm@gnu.org>
15001
15002 * syssignal.h: Replace RETSIGTYPE with void.
15003 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
15004 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
15005 Replace SIGTYPE with void everywhere.
15006 * s/usg5-4-common.h (SIGTYPE): Remove definition.
15007 * s/template.h (SIGTYPE): Remove commented out definition.
15008
e2abce01
JB
150092011-03-26 Eli Zaretskii <eliz@gnu.org>
15010
15011 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
15012 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
15013
f868cd8a
JB
150142011-03-26 Juanma Barranquero <lekktu@gmail.com>
15015
59eb0929
JB
15016 * w32.c (read_unc_volume): Use parameter `henum', instead of
15017 global variable `wget_enum_handle'.
15018
15019 * keymap.c (describe_vector): Remove parameters `indices' and
15020 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
15021 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
15022
f868cd8a
JB
15023 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
15024
15025 * keyboard.c (timer_check): Remove parameter `do_it_now',
15026 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
15027 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
15028 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
15029
15030 * keyboard.c (read_char):
15031 * w32menu.c (w32_menu_display_help):
15032 * xmenu.c (show_help_event, menu_help_callback):
15033 Adjust calls to `show_help_echo'.
15034
15035 * gtkutil.c (xg_maybe_add_timer):
15036 * keyboard.c (readable_events):
15037 * process.c (wait_reading_process_output):
15038 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
15039
15040 * insdel.c (adjust_markers_gap_motion):
15041 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
15042 (gap_left, gap_right): Don't call it.
15043
2ecf6fdb
CY
150442011-03-25 Chong Yidong <cyd@stupidchicken.com>
15045
15046 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
15047 incurred during fontification.
15048
6b1f9ba4
JB
150492011-03-25 Juanma Barranquero <lekktu@gmail.com>
15050
15051 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
15052 (DEFVAR_PER_BUFFER): Don't pass it.
15053
15054 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
15055 (scrolling_window): Don't pass it.
15056
0f4a96b5
JB
150572011-03-25 Juanma Barranquero <lekktu@gmail.com>
15058
15059 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
15060
15061 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
15062 and `suffix'.
15063 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
15064 of variables specific to SELinux and computation of `encoded_absname'.
15065
15066 * image.c (XPutPixel): Remove unused variable `height'.
15067
15068 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
15069
15070 * unexw32.c (get_section_info): Remove unused variable `section'.
15071
15072 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
15073 (system_process_attributes): Remove unused variable `sess'.
15074 (sys_read): Remove unused variable `err'.
15075
15076 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
15077 (w32_wnd_proc): Remove unused variable `isdead'.
15078 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
15079 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
15080 (x_create_tip_frame): Remove unused variable `tem'.
15081
15082 * w32inevt.c (w32_console_read_socket):
15083 Remove unused variable `no_events'.
15084
15085 * w32term.c (x_draw_composite_glyph_string_foreground):
15086 Remove unused variable `width'.
15087
1149507c
JB
150882011-03-24 Juanma Barranquero <lekktu@gmail.com>
15089
15090 * w32term.c (x_set_glyph_string_clipping):
15091 Don't pass uninitialized region to CombineRgn.
15092
9c88f339
JB
150932011-03-23 Juanma Barranquero <lekktu@gmail.com>
15094
15095 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
15096 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
15097 (Fx_close_connection): Remove unused variable `i'.
15098
15099 * w32font.c (w32font_draw): Return number of glyphs.
15100 (w32font_open_internal): Remove unused variable `i'.
15101 (w32font_driver): Add missing initializer.
15102
15103 * w32menu.c (utf8to16): Remove unused variable `utf16'.
15104 (fill_in_menu): Remove unused variable `items_added'.
15105
15106 * w32term.c (last_mouse_press_frame): Remove static global variable.
15107 (w32_clip_to_row): Remove unused variable `f'.
15108 (x_delete_terminal): Remove unused variable `i'.
15109
15110 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
15111 (NOTHING): Remove unused static global variable.
15112 (uniscribe_check_otf): Remove unused variable `table'.
15113 (uniscribe_font_driver): Add missing initializers.
15114
dee091a3
JD
151152011-03-23 Julien Danjou <julien@danjou.info>
15116
15117 * term.c (Fsuspend_tty, Fresume_tty):
15118 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
15119 * window.c (temp_output_buffer_show):
15120 * insdel.c (signal_before_change):
15121 * frame.c (Fhandle_switch_frame):
15122 * fileio.c (Fdo_auto_save):
15123 * emacs.c (Fkill_emacs):
15124 * editfns.c (save_excursion_restore):
15125 * cmds.c (internal_self_insert):
15126 * callint.c (Fcall_interactively):
15127 * buffer.c (Fkill_all_local_variables):
15128 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
15129 Use Frun_hooks.
0f4a96b5 15130 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
e9fce1ac 15131 unconditionally since it does the check itself.
dee091a3 15132
2c520ab5 151332011-03-23 Paul Eggert <eggert@cs.ucla.edu>
f0641eff 15134
c9c49752
PE
15135 Fix more problems found by GCC 4.5.2's static checks.
15136
8abc3f12
PE
15137 * coding.c (encode_coding_raw_text): Avoid unnecessary test
15138 the first time through the loop, since we know p0 < p1 then.
15139 This also avoids a gcc -Wstrict-overflow warning.
15140
a2d26660
PE
15141 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
15142 leading to a memory leak, possible in functions like
15143 load_charset_map_from_file that can allocate an unbounded number
b12ef411 15144 of objects (Bug#8318).
a2d26660 15145
916c72e9
PE
15146 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
15147 that could (at least in theory) be that large.
15148
19ab8a18
PE
15149 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
15150 This is less likely to overflow, and avoids undefined behavior if
15151 overflow does occur. All callers changed. Use strtoul to scan
15152 for the unsigned long integer.
b7cbbd6f
PE
15153 (pint2hrstr): Simplify and tune code slightly.
15154 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
19ab8a18 15155
f0641eff
PE
15156 * scroll.c (do_scrolling): Work around GCC bug 48228.
15157 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
15158
7f650bb9
PE
15159 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
15160 This also avoids a warning with gcc -Wstrict-overflow.
39f5e519
PE
15161 (validate_x_resource_name): Simplify count usage.
15162 This also avoids a warning with gcc -Wstrict-overflow.
7f650bb9 15163
37dd57d1
PE
15164 * fileio.c (Fcopy_file): Report error if fchown or fchmod
15165 fail (Bug#8306).
81e56e61 15166
699979fc 15167 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
dc1ca6a8 15168
401bf9b4
PE
15169 * process.c (Fmake_network_process): Use socklen_t, not int,
15170 where POSIX says socklen_t is required in portable programs.
15171 This fixes a porting bug on hosts like 64-bit HP-UX, where
591b2973 15172 socklen_t is wider than int (Bug#8277).
401bf9b4
PE
15173 (Fmake_network_process, server_accept_connection):
15174 (wait_reading_process_output, read_process_output):
15175 Likewise.
15176
b93aacde
PE
15177 * process.c: Rename or move locals to avoid shadowing.
15178 (list_processes_1, Fmake_network_process):
15179 (read_process_output_error_handler, exec_sentinel_error_handler):
15180 Rename or move locals.
4dc343ee 15181 (Fmake_network_process): Define label "retry_connect" only if needed.
0da49335 15182 (Fnetwork_interface_info): Fix pointer signedness.
f990b4e5 15183 (process_send_signal): Add cast to avoid pointer signedness problem.
7b808126 15184 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
c939f91b 15185 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
b93aacde 15186
af8a867c 15187 Make tparam.h and terminfo.c consistent.
44f230aa
SM
15188 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
15189 Include tparam.h instead, since it declares them.
af8a867c
PE
15190 * cm.h (PC): Remove extern decl; tparam.h now does this.
15191 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
15192 * terminfo.c: Include tparam.h, to check interfaces.
15193 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
15194 (tparam): Adjust signature to match interface in tparam.h;
15195 this removes some undefined behavior. Check that outstring and len
15196 are zero, which they always are with Emacs.
15197 * tparam.h (PC, BC, UP): New extern decls.
15198
0248044d 15199 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
001a7ab4 15200 (xftfont_open): Rename locals to avoid shadowing.
0248044d 15201
8ff096c1 15202 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
a00924bb
PE
15203 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
15204 (OTF_TAG_SYM): Omit macro if not needed.
e932860f 15205 (ftfont_list): Remove unused local.
49eaafba
PE
15206 (get_adstyle_property, ftfont_pattern_entity):
15207 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
15208 Rename locals to avoid shadowing.
8ff096c1 15209
e2be39f6
PE
15210 * xfont.c (xfont_list_family): Mark var as initialized.
15211
c9735e30
PE
15212 * xml.c (make_dom): Now static.
15213
8f5201ae
PE
15214 * composite.c (composition_compute_stop_pos): Rename local to
15215 avoid shadowing.
b246f932
PE
15216 (composition_reseat_it): Remove unused locals.
15217 (find_automatic_composition, composition_adjust_point): Likewise.
80e079b2 15218 (composition_update_it): Mark var as initialized.
11b61122
PE
15219 (find_automatic_composition): Mark vars as initialized,
15220 with a FIXME (Bug#8290).
8f5201ae 15221
760fbc2c
PE
15222 character.h: Rename locals to avoid shadowing.
15223 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
15224 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
15225 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
15226 (BUF_DEC_POS): Be more systematic about renaming local temporaries
15227 to avoid shadowing.
15228
ff08eb85
PE
15229 * textprop.c (property_change_between_p): Remove; unused.
15230
fc7bf025
PE
15231 * intervals.c (interval_start_pos): Now static.
15232
235d7abc
PE
15233 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
15234
44f230aa
SM
15235 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
15236 Rename locals to avoid shadowing.
3e7d6594 15237
50060332
PE
15238 * sound.c (wav_play, au_play, Fplay_sound_internal):
15239 Fix pointer signedness.
d01f234b 15240 (alsa_choose_format): Remove unused local var.
c83b8872
PE
15241 (wav_play): Initialize a variable to 0, to prevent undefined
15242 behavior (Bug#8278).
50060332 15243
c4fc4e30
PE
15244 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
15245
918436ed
PE
15246 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
15247
c939f91b
PE
15248 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
15249 clobbering (Bug#8298).
b9c7f648
PE
15250 * sysdep.c (sys_subshell): Likewise.
15251 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
7e9123a2 15252
6bd8c144
PE
15253 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
15254 This should get cleaned up, so that child_setup has the
15255 same signature on all platforms.
15256
7710357c 15257 * callproc.c (call_process_cleanup): Now static.
cb1d0ef7 15258 (relocate_fd): Rename locals to avoid shadowing.
7710357c 15259
c59da222
CY
152602011-03-22 Chong Yidong <cyd@stupidchicken.com>
15261
15262 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
15263 not to be necessary, and produces flickering.
15264
66b87493
GM
152652011-03-20 Glenn Morris <rgm@gnu.org>
15266
15267 * config.in: Remove file.
15268
45b6f6d5
JB
152692011-03-20 Juanma Barranquero <lekktu@gmail.com>
15270
15271 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
15272 are now in src/globals.h.
15273 (syms_of_minibuf): Remove spurious & from previous change.
15274
cd394be1 152752011-03-20 Leo Liu <sdl.web@gmail.com>
3ec03f7e
LL
15276
15277 * minibuf.c (completing-read-function): New variable.
15278 (completing-read-default): Rename from completing-read.
15279 (completing-read): Call completing-read-function.
15280
b14e3e21
CY
152812011-03-19 Juanma Barranquero <lekktu@gmail.com>
15282
15283 * xfaces.c (Fx_load_color_file):
15284 Read color file from absolute filename (bug#8250).
15285
f2b726e6
JB
152862011-03-19 Juanma Barranquero <lekktu@gmail.com>
15287
15288 * makefile.w32-in: Update dependencies.
15289
09f6ff02
EZ
152902011-03-17 Eli Zaretskii <eliz@gnu.org>
15291
15292 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
15293
29a6015a
PE
152942011-03-17 Paul Eggert <eggert@cs.ucla.edu>
15295
a3a6c54e
PE
15296 Fix more problems found by GCC 4.5.2's static checks.
15297
b766f867
PE
15298 * process.c (make_serial_process_unwind, send_process_trap):
15299 (sigchld_handler): Now static.
15300
be02381c
PE
15301 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
15302 That way, the code declares only the vars that it needs.
15303 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
15304 * s/cygwin.h (PTY_ITERATION): Likewise.
15305 * s/darwin.h (PTY_ITERATION): Likewise.
15306 * s/gnu-linux.h (PTY_ITERATION): Likewise.
15307
57048744
PE
15308 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
15309 * process.c (allocate_pty): Don't declare stb unless it's needed.
15310
7914961c 15311 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
615f2d59
PE
15312 (CONSTANTLIM): Remove; unused.
15313 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
15314 Define only if needed.
7914961c 15315
b3967b18
PE
15316 * unexelf.c (unexec): Name an expression,
15317 to avoid gcc -Wbad-function-cast warning.
9ae71512
PE
15318 Use a different way to cause a compilation error if anyone uses
15319 n rather than nn, a way that does not involve shadowing.
73366a00 15320 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
b3967b18 15321
29a6015a
PE
15322 * deps.mk (unexalpha.o): Remove; unused.
15323
43cfc33e 15324 New file unexec.h, the (simple) interface for unexec (Bug#8267).
7feda0d2 15325 * unexec.h: New file.
ce701a33
PE
15326 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
15327 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
15328 Depend on unexec.h.
15329 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
15330 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
15331 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
381259ef 15332 Change as necessary to match prototype in unexec.h.
ce701a33 15333
01f44d5a
PE
15334 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
15335 shadowing.
4f63c6bb 15336 (back_comment, skip_chars): Mark vars as initialized.
01f44d5a 15337
a6670b0b
PE
15338 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
15339 Rename locals to avoid shadowing.
15340
cef2010d 15341 * lread.c (read1): Rewrite so as not to use empty "else".
0902fe45 15342 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
cef2010d 15343
d4d7173a
PE
15344 * print.c (Fredirect_debugging_output): Fix pointer signedess.
15345
f08b802a
PE
15346 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
15347 warning when compiling print.c.
15348
3ddb0639
PE
15349 * font.c (font_unparse_fcname): Abort in an "impossible" situation
15350 instead of using an uninitialized var.
5ad03b97 15351 (font_sort_entities): Mark var as initialized.
3ddb0639 15352
170a2692
PE
15353 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
15354
e663c700
PE
15355 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
15356 pointers to constants.
89bc529a 15357 (font_parse_fcname): Remove unused vars.
7b81e2d0 15358 (font_delete_unmatched): Now static.
ea838e10 15359 (font_get_spec): Remove; unused.
13a547c6
PE
15360 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
15361 (font_update_drivers, Ffont_get_glyphs, font_add_log):
15362 Rename or move locals to avoid shadowing.
e663c700 15363
2a80c887 15364 * fns.c (require_nesting_list, require_unwind): Now static.
612f56df 15365 (Ffillarray): Rename locals to avoid shadowing.
2a80c887 15366
1384fa33 15367 * floatfns.c (domain_error2): Define only if needed.
a885e2ed 15368 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
1384fa33 15369
8b2c52e9
PE
15370 * alloc.c (mark_backtrace): Move decl from here ...
15371 * lisp.h: ... to here, so that it can be checked.
15372
475545b5 15373 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
d28a2170 15374 (Fdefvar): Rewrite so as not to use empty "else".
cfcbfb1a
PE
15375 (lisp_indirect_variable): Name an expression,
15376 to avoid gcc -Wbad-function-cast warning.
1faed8ae 15377 (Fdefvar): Rename locals to avoid shadowing.
475545b5 15378
b1349114 15379 * callint.c (quotify_arg, quotify_args): Now static.
a3e8cbda 15380 (Fcall_interactively): Rename locals to avoid shadowing.
b0e80955 15381 Use const pointer when appropriate.
b1349114 15382
a2928364
PE
15383 * lisp.h (get_system_name, get_operating_system_release):
15384 Move decls here, to check interfaces.
15385 * process.c (get_operating_system_release): Move decl to lisp.h.
15386 * xrdb.c (get_system_name): Likewise.
63c5d10b
PE
15387 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
15388 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
15389 some of which prompt warnings from gcc -Wbad-function-cast.
545b49b4
PE
15390 (Fformat_time_string, Fencode_time, Finsert_char):
15391 (Ftranslate_region_internal, Fformat):
15392 Rename or remove local vars to avoid shadowing.
9710023e 15393 (Ftranslate_region_internal): Mark var as initialized.
63c5d10b 15394
a415e694
PE
15395 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
15396 avoid shadowing.
15397
8ef4622d
PE
15398 * lisp.h (eassert): Check that the argument compiles, even if
15399 ENABLE_CHECKING is not defined.
15400
946f9a5b
PE
15401 * data.c (Findirect_variable): Name an expression, to avoid
15402 gcc -Wbad-function-cast warning.
112396d6 15403 (default_value, arithcompare, arith_driver, arith_error): Now static.
b9b84fa9 15404 (store_symval_forwarding): Rename local to avoid shadowing.
44f230aa
SM
15405 (Fmake_variable_buffer_local, Fmake_local_variable):
15406 Mark variables as initialized.
52746918 15407 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
946f9a5b 15408
e5aab7e7 15409 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
ae35e756
PE
15410 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
15411 Rename locals to avoid shadowing.
dff45157
PE
15412 (mark_stack): Move local variables into the #ifdef region where
15413 they're used.
7bc26fdb
PE
15414 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
15415 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
15416 needed otherwise.
15417 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
15418 (GC_STRING_CHARS): Remove; not used.
d40d4be1 15419 (Fmemory_limit): Cast sbrk's returned value to char *.
ae35e756 15420
e5aab7e7
PE
15421 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
15422 avoids undefined behavior in theory.
15423
4da60324
PE
15424 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
15425
88043301
PE
15426 Use functions, not macros, for up- and down-casing (Bug#8254).
15427 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15428 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
15429 to use the following functions instead of these macros.
15430 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
15431 EMACS_INT, since callers assume the returned value fits in int.
15432 (upcase1): Likewise, for UPCASE_TABLE.
15433 (uppercasep, lowercasep, upcase): New static inline functions.
0da09c43 15434 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
db69b0cd 15435 the race-condition problem in the old DOWNCASE.
88043301 15436
19ed5445
PE
15437 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
15438 Rename locals to avoid shadowing.
15439 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
abbd1bcf
PE
15440 (regex_compile, re_search_2, re_match_2_internal):
15441 Remove unused local vars.
952db0d7
PE
15442 (FREE_VAR): Rewrite so as not to use empty "else",
15443 which gcc can warn about.
da053e48 15444 (regex_compile, re_match_2_internal): Mark locals as initialized.
b313f9d8
PE
15445 (RETALLOC_IF): Define only if needed.
15446 (WORDCHAR_P): Likewise. This one is never needed, but is used
15447 only in a comment talking about a compiler bug, so put inside
15448 the #if 0 of that comment.
15449 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
15450 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
15451 Remove; unused.
19ed5445 15452
1f3561e4 15453 * search.c (boyer_moore): Rename locals to avoid shadowing.
76ef09b7
PE
15454 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
15455 (PREV_CHAR_BOUNDARY): Likewise.
1f3561e4 15456
ded6f8f7
PE
15457 * search.c (simple_search): Remove unused var.
15458
dbd37a95
PE
15459 * dired.c (compile_pattern): Move decl from here ...
15460 * lisp.h: ... to here, so that it can be checked.
15461 (struct re_registers): New forward decl.
15462
7e47afad
PE
15463 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
15464
85f24f61
PE
15465 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
15466 All uses changed.
15467 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
15468 Rename locals to avoid shadowing.
5671df8f 15469 (Fvertical_motion): Mark locals as initialized.
85f24f61 15470
181aa2be 15471 * casefiddle.c (casify_object, casify_region): Now static.
e45a141a 15472 (casify_region): Mark local as initialized.
181aa2be 15473
930d429c
PE
15474 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
15475
7082eac6
PE
15476 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
15477 New macros, so that the caller can use some names other than
15478 gcpro1, gcpro2, etc.
15479 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
15480 of the new macros.
15481 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
15482 argument, for consistency with GCPRO2_VAR, etc: it is now the
15483 prefix of the variable, not the variable itself. All uses
15484 changed.
38b2c076
PE
15485 * dired.c (directory_files_internal, file_name_completion):
15486 Rename locals to avoid shadowing.
15487
15206ed9
PE
15488 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
15489 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
15490 dired.c's scmp function, had undefined behavior.
15491 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
15492 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
15493 * buffer.h: ... to here, because these macros use current_buffer,
15494 and the new implementation with inline functions needs to have
15495 current_buffer in scope now, rather than later when the macros
15496 are used.
15497 (downcase, upcase1): New static inline functions.
15498 (DOWNCASE, UPCASE1): Reimplement using these functions.
15499 This avoids undefined behavior in expressions like
15500 DOWNCASE (x) == DOWNCASE (y), which previously suffered
15501 from race conditions in accessing the global variables
15502 case_temp1 and case_temp2.
15503 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
15504 * lisp.h (case_temp1, case_temp2): Remove their decls.
15505 * character.h (ASCII_CHAR_P): Move from here ...
15506 * lisp.h: ... to here, so that the inline functions mentioned
15507 above can use them.
15508
4a6bea26
PE
15509 * dired.c (directory_files_internal_unwind): Now static.
15510
f14b7e14
PE
15511 * fileio.c (file_name_as_directory, directory_file_name):
15512 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
15513 Now static.
2893f146
PE
15514 (file_name_as_directory): Use const pointers when appropriate.
15515 (Fexpand_file_name): Likewise. In particular, newdir might
15516 point at constant storage, so make it a const pointer.
fd4ead52 15517 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
b14aac08
PE
15518 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
15519 signedness issues.
f839df0c
PE
15520 (Fset_file_times, Finsert_file_contents, auto_save_error):
15521 Rename locals to avoid shadowing.
f14b7e14 15522
5716756e 15523 * minibuf.c (choose_minibuf_frame_1): Now static.
62137a95
PE
15524 (Ftry_completion, Fall_completions): Rename or remove locals
15525 to avoid shadowing.
5716756e 15526
b4c3046a
PE
15527 * marker.c (bytepos_to_charpos): Remove; unused.
15528
b45db522
PE
15529 * lisp.h (verify_bytepos, count_markers): New decls,
15530 so that gcc does not warn that these functions aren't declared.
15531
85876d07
PE
15532 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
15533 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
f0cb4a60 15534 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
40ef059e 15535 (copy_text): Remove unused local var.
85876d07 15536
03d78a21 15537 * filelock.c (within_one_second): Now static.
b3dd38ab 15538 (lock_file_1): Rename local to avoid shadowing.
03d78a21 15539
5df8f01b
PE
15540 * buffer.c (fix_overlays_before): Mark locals as initialized.
15541 (fix_start_end_in_overlays): Likewise. This function should be
15542 simplified by using pointers-to-pointers, but that's a different
15543 matter.
b1d876f1 15544 (switch_to_buffer_1): Now static.
8f54f30a
PE
15545 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
15546 (report_overlay_modification): Rename locals to avoid shadowing.
c3bd59b5 15547
a70072c9 15548 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
fbd02d7b 15549 Fix pointer signedness issue.
edced198
PE
15550 (sys_subshell): Mark local as volatile if checking for lint,
15551 to suppress a gcc -Wclobbered warning that does not seem to be right.
15dfd3d9 15552 (MAXPATHLEN): Define only if needed.
a70072c9 15553
a0977c44
PE
15554 * process.c (serial_open, serial_configure): Move decls from here ...
15555 * systty.h: ... to here, so that they can be checked.
15556
a884fdcc
PE
15557 * fns.c (get_random, seed_random): Move extern decls from here ...
15558 * lisp.h: ... to here, so that they can be checked.
15559
604efe86 15560 * sysdep.c (reset_io): Now static.
b8950c94 15561 (wait_for_termination_signal): Remove; unused.
604efe86 15562
38fc62d9
PE
15563 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
15564 (copy_keymap_item, append_key, push_text_char_description):
15565 Now static.
1004a21a 15566 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
dbbb8427 15567 (DENSE_TABLE_SIZE): Remove; unused.
c1141155
PE
15568 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
15569 (describe_map_tree):
15570 Rename locals to avoid shadowing.
38fc62d9 15571
2f2650da
PE
15572 * keyboard.c: Declare functions static if they are not used elsewhere.
15573 (echo_char, echo_dash, cmd_error, top_level_2):
15574 (poll_for_input, handle_async_input): Now static.
69a058fa
PE
15575 (read_char, kbd_buffer_get_event, make_lispy_position):
15576 (make_lispy_event, make_lispy_movement, apply_modifiers):
15577 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
15578 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
15579 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
c8a06054 15580 (read_key_sequence, read_char): Mark locals as initialized.
3ac94672 15581 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
2f2650da 15582
a053e86c 15583 * keyboard.h (make_ctrl_char): New decl.
da2f2dd9
PE
15584 (mark_kboards): Move decl here ...
15585 * alloc.c (mark_kboards): ... from here.
a053e86c 15586
4752793e
PE
15587 * lisp.h (force_auto_save_soon): New decl.
15588
74f10ca7 15589 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
244fc23d
PE
15590 (DEFINE_DUMMY_FUNCTION): New macro.
15591 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
15592 Use it.
c03cd23f
PE
15593 (main): Add casts to avoid warnings
15594 if GCC considers string literals to be constants.
74f10ca7 15595
022e70d4
PE
15596 * lisp.h (fatal_error_signal): Add decl, since it's exported.
15597
59d6fe83
PE
15598 * dbusbind.c: Pointer signedness fixes.
15599 (xd_signature, xd_append_arg, xd_initialize):
15600 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15601 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15602 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
15603 (Fdbus_register_signal): Use SSDATA when the context wants char *.
15604
78320123
PE
15605 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
15606 if GCC considers string literals to be constants.
49cebcca 15607 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
78320123 15608
35ac2a97
SM
156092011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
15610
fb103ca9
SM
15611 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
15612 (print_preprocess, print_object): New macro to fix last change.
15613
35ac2a97
SM
15614 * print.c (print_preprocess): Don't forget font objects.
15615
62973b41
JB
156162011-03-16 Juanma Barranquero <lekktu@gmail.com>
15617
15618 * emacs.c (USAGE3): Doc fixes.
15619
0e48bb22
AS
156202011-03-15 Andreas Schwab <schwab@linux-m68k.org>
15621
15622 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
15623 structure.
15624
7684e57b
JB
156252011-03-14 Juanma Barranquero <lekktu@gmail.com>
15626
15627 * lisp.h (VWindow_system, Qfile_name_history):
15628 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
15629 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
15630 (w32_system_caret_x, w32_system_caret_y): Declare extern.
15631
15632 * w32select.c: Don't #include "keyboard.h".
c96bbc66 15633 (run_protected): Add extern declaration for waiting_for_input.
7684e57b
JB
15634
15635 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
15636 * w32console.c (detect_input_pending, read_input_pending)
15637 (encode_terminal_code):
15638 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
15639 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
15640 (w32_system_caret_y, Qfile_name_history):
15641 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
15642 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
15643 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
15644 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
15645 * w32proc.c (Qlocal, report_file_error):
15646 * w32term.c (Vwindow_system, updating_frame):
15647 * w32uniscribe.c (initialized, uniscribe_font_driver):
15648 Remove unneeded extern declarations.
15649
2aa46d6c
CY
156502011-03-14 Chong Yidong <cyd@stupidchicken.com>
15651
c96bbc66 15652 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
2aa46d6c 15653
cffc6f3b
CY
156542011-03-13 Chong Yidong <cyd@stupidchicken.com>
15655
15656 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
15657 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
15658 These macros can no longer be used for assignment.
15659
44f230aa
SM
15660 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
15661 Assign struct members directly, instead of using BUF_BEGV etc.
cffc6f3b
CY
15662 (record_buffer_markers, fetch_buffer_markers): New functions for
15663 recording and fetching special buffer markers.
15664 (set_buffer_internal_1, set_buffer_temp): Use them.
15665
15666 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
15667
15668 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
15669
15670 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
15671 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
15672
15673 * xdisp.c (hscroll_window_tree):
15674 (reconsider_clip_changes): Use PT instead of BUF_PT.
15675
d251f04b
EZ
156762011-03-13 Eli Zaretskii <eliz@gnu.org>
15677
15678 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
15679 $(EMACS_ROOT)/lib/intprops.h.
15680
f0c77cd1
PE
156812011-03-13 Paul Eggert <eggert@cs.ucla.edu>
15682
3eca4629
PE
15683 Fix more problems found by GCC 4.5.2's static checks.
15684
7c86ee98
PE
15685 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
15686 to unsigned char * to avoid compiler diagnostic.
b0afc268
PE
15687 (xg_free_frame_widgets): Make it clear that a local variable is
15688 needed only if USE_GTK_TOOLTIP.
01e0b5ad
PE
15689 (gdk_window_get_screen): Make it clear that this macro is needed
15690 only if USE_GTK_TOOLTIP.
1e5524e7
PE
15691 (int_gtk_range_get_value): New function, which avoids a diagnostic
15692 from gcc -Wbad-function-cast.
15693 (xg_set_toolkit_scroll_bar_thumb): Use it.
15694 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
15695 diagnostic from gcc -Wbad-function-cast.
65dc836c
PE
15696 (get_utf8_string, xg_get_file_with_chooser):
15697 Rename locals to avoid shadowing.
15698 (create_dialog): Move locals to avoid shadowing.
7c86ee98 15699
41729b81
PE
15700 * xgselect.c (xg_select): Remove unused var.
15701
f0c77cd1
PE
15702 * image.c (four_corners_best): Mark locals as initialized.
15703 (gif_load): Initialize transparent_p to zero (Bug#8238).
15704 Mark another local as initialized.
ec6cf4c6 15705 (my_png_error, my_error_exit): Mark with NO_RETURN.
f0c77cd1 15706
ce0ad53d 15707 * image.c (clear_image_cache): Now static.
d5d5a617 15708 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
e22cffbc 15709 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
77a765fd
PE
15710 (x_edge_detection): Remove unnecessary cast that
15711 gcc -Wbad-function-cast diagnoses.
2037898d 15712 (gif_load): Fix pointer signedness.
6ae141d6
PE
15713 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
15714 (jpeg_load, gif_load): Rename locals to avoid shadowing.
ce0ad53d 15715
33383987 157162011-03-12 Paul Eggert <eggert@cs.ucla.edu>
3eca4629 15717
d32df629
PE
15718 Improve quality of tests for time stamp overflow.
15719 For example, without this patch (encode-time 0 0 0 1 1
15720 1152921504606846976) returns the obviously-bogus value (-948597
15721 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
15722 reports time overflow. See
15723 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
b8d9bd41
PE
15724 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
15725 * editfns.c: Include limits.h and intprops.h.
15726 (TIME_T_MIN, TIME_T_MAX): New macros.
15727 (time_overflow): Move earlier, to before first use.
15728 (hi_time, lo_time): New functions, for an accurate test for
15729 out-of-range times.
15730 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
15731 (Fget_internal_run_time): Don't assume time_t fits in int.
15732 (make_time): Use list2 instead of Fcons twice.
15733 (Fdecode_time): More accurate test for out-of-range times.
15734 (check_tm_member): New function.
15735 (Fencode_time): Use it, to test for out-of-range times.
d32df629
PE
15736 (lisp_time_argument): Don't rely on undefined left-shift and
15737 right-shift behavior when checking for time stamp overflow.
8be6f318 15738
fe31d94c
PE
15739 * editfns.c (time_overflow): New function, refactoring common code.
15740 (Fformat_time_string, Fdecode_time, Fencode_time):
15741 (Fcurrent_time_string): Use it.
15742
8be6f318
PE
15743 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
15744 * dired.c (make_time): Move to ...
15745 * editfns.c (make_time): ... here.
15746 * systime.h: Note the move.
15747
09d9db2c 157482011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
c47cbdfd 15749
126bc0dc
YM
15750 * fringe.c (update_window_fringes): Remove unused variables.
15751
c47cbdfd
YM
15752 * unexmacosx.c (copy_data_segment): Also copy __got section.
15753 (Bug#8223)
15754
7ac80be9
EZ
157552011-03-12 Eli Zaretskii <eliz@gnu.org>
15756
c96bbc66 15757 * termcap.c [MSDOS]: Include "msdos.h".
058e5dad
EZ
15758 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
15759 Constify `char *' arguments and their references according to
15760 prototypes in tparam.h.
15761
ecb0f94d 15762 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
058e5dad 15763
7ac80be9
EZ
15764 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
15765 Adapt all references accordingly.
15766
15767 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
15768
ef1fd07e
TT
157692011-03-11 Tom Tromey <tromey@redhat.com>
15770
15771 * buffer.c (syms_of_buffer): Remove obsolete comment.
15772
7ef4b50c
EZ
157732011-03-11 Eli Zaretskii <eliz@gnu.org>
15774
15775 * termhooks.h (encode_terminal_code): Declare prototype.
15776
15777 * msdos.c (encode_terminal_code): Don't declare prototype.
15778
15779 * term.c (encode_terminal_code): Now external again, used by
15780 w32console.c and msdos.c.
15781
44f230aa
SM
15782 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
15783 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
7ef4b50c 15784
4b1ec863 157852011-03-11 Paul Eggert <eggert@cs.ucla.edu>
f78faa98 15786
1714f52b 15787 Fix some minor problems found by GCC 4.5.2's static checks.
83316bf4 15788
4b1ec863
PE
15789 * fringe.c (update_window_fringes): Mark locals as initialized
15790 (Bug#8227).
15791 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
bf60f616 15792
524c7aa6
PE
15793 * alloc.c (mark_fringe_data): Move decl from here ...
15794 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
15795 to check its interface.
15796 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
15797
a5c0af81 15798 * fontset.c (free_realized_fontset): Now static.
7519b8cd 15799 (Fset_fontset_font): Rename local to avoid shadowing.
cc6e5db1 15800 (fontset_font): Mark local as initialized.
a9a06e0b 15801 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
a5c0af81 15802
b4716021
PE
15803 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
15804
811e9bac 15805 * xselect.c (x_disown_buffer_selections): Remove; not used.
7b83e2f1 15806 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
aa0daa9f
PE
15807 (x_own_selection, Fx_disown_selection_internal): Rename locals
15808 to avoid shadowing.
15809 (x_handle_dnd_message): Remove local to avoid shadowing.
811e9bac 15810
7e3ab302
PE
15811 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
15812 so that the caller can use some name other than gcpro1.
15813 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
58d2d479
PE
15814 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
15815 (Fx_backspace_delete_keys_p):
15816 Use them to avoid shadowing, and rename vars to avoid shadowing.
15817 (x_decode_color, x_set_name, x_window): Now static.
6b437900 15818 (Fx_create_frame): Add braces to silence GCC warning.
c0951e53 15819 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
06b0c8a0
PE
15820 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
15821 Remove unused locals.
7e3ab302
PE
15822 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
15823 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
15824 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
15825 macros.
f78faa98 15826
e2b13473
PE
15827 * xterm.h (x_mouse_leave): New decl.
15828
77f23912
PE
15829 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
15830 Remove unused functions.
cdf4ba58
PE
15831 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
15832 (x_calc_absolute_position): Now static.
7411c686 15833 (XTread_socket): Don't define label "out" unless it's used.
2b07bcff 15834 Don't declare local "event" unless it's used.
ed7bf3a5
PE
15835 (x_iconify_frame, x_free_frame_resources): Don't declare locals
15836 unless they are used.
38d0b34a
PE
15837 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
15838 (x_fatal_error_signal): Remove; not used.
a6067996
PE
15839 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
15840 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
15841 (x_error_catcher, x_connection_closed, x_error_handler):
15842 (x_error_quitter, xembed_send_message, x_iconify_frame):
15843 (my_log_handler): Rename locals to avoid shadowing.
28f1c698 15844 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
2a8fade0 15845 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
77f23912 15846
44f230aa
SM
15847 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
15848 Rename or move locals to avoid shadowing.
6b463e58 15849 (tty_defined_color, merge_face_heights): Now static.
5967d051 15850 (free_realized_faces_for_fontset): Remove; not used.
1e9966ea
PE
15851 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
15852 does not deduce is never used uninitialized.
73719eba
PE
15853 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
15854 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
071048a3 15855
426994c3 15856 * terminal.c (store_terminal_param): Now static.
5489860b 15857
032f1620 15858 * xmenu.c (menu_highlight_callback): Now static.
9d66f88e 15859 (set_frame_menubar): Remove unused local.
d4323972 15860 (xmenu_show): Rename parameter to avoid shadowing.
6d1f7fee
PE
15861 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
15862 since they might point to immutable storage.
281585b0
PE
15863 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
15864 since it's unused otherwise.
032f1620 15865
367c19e5 15866 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
53df7c11 15867 Add a FIXME, since the code still doesn't look right. (Bug#8215)
9f36b9fd
PE
15868 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
15869 avoids a gcc -Wuninitialized diagnostic.
0e086e8f 15870 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
44a3a108
PE
15871 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
15872 does not deduce are never used uninitialized.
70739cbe 15873
07b48fa9
PE
15874 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
15875
8868a238 15876 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
4554d213
PE
15877 * window.c (window_loop, size_window):
15878 (run_window_configuration_change_hook, enlarge_window): Likewise.
8868a238 15879
7e5cf297 15880 * window.c (display_buffer): Now static.
d6550a9f
PE
15881 (size_window): Mark variables that gcc -Wuninitialized
15882 does not deduce are never used uninitialized.
a586633d
PE
15883 * window.h (check_all_windows): New decl, to forestall
15884 gcc -Wmissing-prototypes diagnostic.
5b555da1 15885 * dispextern.h (bidi_dump_cached_states): Likewise.
7e5cf297 15886
f6095868
PE
15887 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
15888 shadowing.
15889 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
726929c4
PE
15890 Include <limits.h>.
15891 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
15892 and to avoid gcc -Wuninitialized warning.
89ef49df
PE
15893 (load_charset_map): Mark variables that gcc -Wuninitialized
15894 does not deduce are never used uninitialized.
53df7c11 15895 (load_charset): Abort instead of using uninitialized var (Bug#8229).
f6095868 15896
f38b440c
PE
15897 * coding.c (coding_set_source, coding_set_destination):
15898 Use "else { /* comment */ }" rather than "else /* comment */;"
15899 for clarity, and to avoid gcc -Wempty-body warning.
2735d060
PE
15900 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
15901 a block, when the outer 'i' will do.
15902 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
15903 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
15904 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
15905 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
15906 (Fdecode_sjis_char, Fdefine_coding_system_internal):
15907 Rename locals to avoid shadowing.
15908 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
e2f1bab9
PE
15909 * coding.c (emacs_mule_char, encode_invocation_designation):
15910 Now static, since they're not used elsewhere.
413bb2db 15911 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
c4a63b12 15912 (decode_coding_object, encode_coding_object, detect_coding_system):
ee05f961
PE
15913 (decode_coding_emacs_mule): Mark variables that gcc
15914 -Wuninitialized does not deduce are never used uninitialized.
160b01f6
PE
15915 (detect_coding_iso_2022): Initialize a local variable that might
15916 be used uninitialized. Leave a FIXME because it's not clear that
53df7c11 15917 this initialization is needed. (Bug#8211)
5f58e762
PE
15918 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
15919 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
15920 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
15921 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
15922 Remove unused macros.
f38b440c 15923
232b38b9 15924 * category.c (hash_get_category_set): Remove unused local var.
9f3b5e69 15925 (copy_category_table): Now static, since it's not used elsewhere.
d0891610 15926 * character.c (string_count_byte8): Likewise.
232b38b9 15927
fb90da1b
PE
15928 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
15929 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
15930
fb93dbc2
PE
15931 * chartab.c (copy_sub_char_table): Now static, since it's not used
15932 elsewhere.
5c156ace
PE
15933 (sub_char_table_ref_and_range, char_table_ref_and_range):
15934 Rename locals to avoid shadowing.
bbcd0949 15935 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
fb93dbc2 15936
7d3b3862 15937 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
630d6892 15938 (BIDI_BOB): Remove unused macro.
7d3b3862 15939
6be7d3da
PE
15940 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
15941 deduce are never used uninitialized.
c2ed9c8b 15942 * term.c (encode_terminal_code): Likewise.
6be7d3da 15943
75f8807f 15944 * term.c (encode_terminal_code): Now static. Remove unused local.
72abad34 15945
50938595
PE
15946 * tparam.h: New file.
15947 * term.c, tparam.h: Include it.
15948 * deps.mk (term.o, tparam.o): Depend on tparam.h.
15949 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
15950 Move these decls to tparam.h, and make them agree with what
15951 is actually in tparam.c. The previous trick of using incompatible
15952 decls in different modules does not conform to the C standard.
15953 All callers of tparam changed to use tparam's actual API.
15954 * tparam.c (tparam1, tparam, tgoto):
15955 Use const pointers where appropriate.
15956
fbceeba2
PE
15957 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
15958 * cm.h (struct cm): Likewise.
15959 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
15960 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
15961 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
15962 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
15963 (turn_on_face, init_tty): Likewise.
15964 * termchar.h (struct tty_display_info): Likewise.
fbceeba2 15965
7f3f1250
PE
15966 * term.c (term_mouse_position): Rename local to avoid shadowing.
15967
e6ca6543
PE
15968 * alloc.c (mark_ttys): Move decl from here ...
15969 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
15970
c40f8d15
AS
159712011-03-11 Andreas Schwab <schwab@linux-m68k.org>
15972
15973 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
15974
cfe0661d
JB
159752011-03-09 Juanma Barranquero <lekktu@gmail.com>
15976
15977 * search.c (compile_pattern_1): Remove argument regp, unused since
15978 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
15979 (compile_pattern): Don't pass it.
15980
0afb4571
J
159812011-03-08 Jan Djärv <jan.h.d@swipnet.se>
15982
15983 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
15984 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
15985 for ! HAVE_GTK3.
15986 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
15987
15988 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
15989
15990 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
15991 gdk_window_get_screen, gdk_window_get_geometry,
15992 gdk_x11_window_lookup_for_display and GDK_KEY_g.
15993 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
15994 (xg_get_pixbuf_from_pixmap): New function.
15995 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
15996 to Pixmap, take frame as parameter, remove GdkColormap parameter.
15997 Call xg_get_pixbuf_from_pixmap instead of
15998 gdk_pixbuf_get_from_drawable.
15999 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
16000 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
16001 (xg_check_special_colors): Use GtkStyleContext and its functions
16002 for HAVE_GTK3.
16003 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
16004 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
16005 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
44f230aa
SM
16006 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
16007 Call gtk_widget_get_preferred_size.
0afb4571
J
16008 (xg_frame_resized): gdk_window_get_geometry only takes 5
16009 parameters.
44f230aa
SM
16010 (xg_win_to_widget, xg_event_is_for_menubar):
16011 Call gdk_x11_window_lookup_for_display.
0afb4571
J
16012 (xg_set_widget_bg): New function.
16013 (delete_cb): New function.
895009e1 16014 (xg_create_frame_widgets): Connect delete-event to delete_cb.
5c32d3f2 16015 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
0afb4571
J
16016 (xg_set_background_color): Call xg_set_widget_bg.
16017 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
16018 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
16019 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
16020 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
16021 if ! HAVE_GTK3.
16022 (update_frame_tool_bar): Call gtk_widget_hide.
16023 (xg_initialize): Use GDK_KEY_g.
16024
16025 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
16026 if ! HAVE_GTK3
16027 (x_session_initialize): Call gdk_x11_set_sm_client_id.
16028
16029 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
16030 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
16031 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
16032
1c2cc4ef
JB
160332011-03-08 Juanma Barranquero <lekktu@gmail.com>
16034
16035 * w32xfns.c (select_palette): Check success of RealizePalette against
16036 GDI_ERROR, not zero.
16037
33383987 16038See ChangeLog.11 for earlier changes.
aac0c6e3
MR
16039
16040;; Local Variables:
16041;; coding: utf-8
aac0c6e3
MR
16042;; End:
16043
2f097256 16044 Copyright (C) 2011-2012 Free Software Foundation, Inc.
aac0c6e3
MR
16045
16046 This file is part of GNU Emacs.
16047
16048 GNU Emacs is free software: you can redistribute it and/or modify
16049 it under the terms of the GNU General Public License as published by
16050 the Free Software Foundation, either version 3 of the License, or
16051 (at your option) any later version.
16052
16053 GNU Emacs is distributed in the hope that it will be useful,
16054 but WITHOUT ANY WARRANTY; without even the implied warranty of
16055 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16056 GNU General Public License for more details.
16057
16058 You should have received a copy of the GNU General Public License
16059 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.