]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Report readdir failures
[gnu-emacs] / src / ChangeLog
1 2015-01-29 Paul Eggert <eggert@cs.ucla.edu>
2
3 Report readdir failures
4 Previously, on non-MS-Windows platforms the code treated most
5 readdir failures as EOF. This was incorrect, e.g., when readdir
6 fails with errno == EOVERFLOW. Signal an error instead.
7 * dired.c (read_dirent):
8 New function, which signals an error when readdir fails.
9 (directory_files_internal, file_name_completion): Use it.
10
11 2015-01-29 Eli Zaretskii <eliz@gnu.org>
12
13 * dired.c (directory_files_internal, file_name_completion)
14 [WINDOWSNT]: Signal an error when errno is set non-zero by
15 'readdir', regardless of its value.
16
17 * w32.c (sys_readdir): Set errno to ENOENT when the directory
18 doesn't exist and to EACCES when it's not accessible to the
19 current user. Set errno to zero when FindNextFile exhausts the
20 directory, so that callers don't interpret that as an error and
21 don't signal a file-error.
22 (open_unc_volume): Set errno to ENOENT if WNetOpenEnum fails.
23 2015-01-29 Eli Zaretskii <eliz@gnu.org>
24
25 Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c.
26 * w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where
27 appropriate.
28
29 * w32font.c (struct font_callback_data, w32font_list_internal)
30 (w32font_driver, w32font_match_internal): Use bool where appropriate.
31
32 * w32menu.c (x_activate_menubar, set_frame_menubar)
33 (w32_dialog_show, initialize_frame_menubar, w32_menu_show)
34 (is_simple_dialog): Use bool where appropriate.
35
36 2015-01-28 Paul Eggert <eggert@cs.ucla.edu>
37
38 Use bool, not int, to track face changes
39 * xfaces.c (face_change): Rename from face_change_count, and
40 change from int to bool. The var is now true (instead of nonzero)
41 if attributes have changed; this is simpler. All uses changed.
42 Fixes: bug#19698
43
44 2015-01-27 Eli Zaretskii <eliz@gnu.org>
45
46 * dired.c (directory_files_internal) [WINDOWSNT]: If readdir
47 returns NULL and errno is ENOTDIR, behave as if opendir failed to
48 open the directory. (Bug#19701)
49
50 * w32.c (sys_readdir): If FindFirstFile fails because the
51 directory doesn't exist, set errno to ENOTDIR.
52
53 2015-01-24 Jan Djärv <jan.h.d@swipnet.se>
54
55 * nsterm.m (drawRect:): Add block/unblock_input (Bug#19660).
56
57 2015-01-21 Paul Eggert <eggert@cs.ucla.edu>
58
59 Fix coding.c subscript error
60 * coding.c (CODING_ISO_INVOKED_CHARSET):
61 Avoid undefined behavior if CODING_ISO_INVOCATION returns negative.
62
63 2015-01-17 Eli Zaretskii <eliz@gnu.org>
64
65 * xdisp.c (produce_image_glyph): Fix display of images in R2L
66 screen lines: prepend the new glyph to the ones already there
67 instead of appending it.
68
69 2015-01-14 Eli Zaretskii <eliz@gnu.org>
70
71 * w32fns.c (w32_set_title_bar_text): New function, including
72 support for titles with non-ASCII characters outside of the
73 current system codepage.
74 (x_set_name, x_set_title): Use it. (Bug#19590)
75
76 2015-01-10 Eli Zaretskii <eliz@gnu.org>
77
78 * indent.c (Fvertical_motion): Return zero if we started from ZV
79 and there's an overlay after-string there. (Bug#19553)
80
81 2015-01-09 Eli Zaretskii <eliz@gnu.org>
82
83 * emacs.c (usage_message): Fix the description of the -nl switch.
84 (Bug#19542)
85
86 2015-01-05 Eli Zaretskii <eliz@gnu.org>
87
88 * xdisp.c (move_it_to, try_cursor_movement): Don't use the window
89 end information if the window_end_valid flag is unset.
90 (try_window_id): If the call to display_line invalidated the
91 window end information, give up the try_window_id optimization.
92 (Bug#19511)
93
94 2015-01-04 Eli Zaretskii <eliz@gnu.org>
95
96 * w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix.
97
98 * xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.
99
100 * emacs.c (syms_of_emacs) <system-configuration>: Doc fix.
101 (Bug#19502)
102
103 2015-01-28 Stefan Monnier <monnier@iro.umontreal.ca>
104
105 * lisp.mk (lisp): Add cl-preloaded.
106
107 2015-01-27 Paul Eggert <eggert@cs.ucla.edu>
108
109 Use bool for boolean in xfaces.c
110 * dispextern.h: Adjust to signature changes.
111 * font.c (font_at, font_range):
112 * fontset.c (Finternal_char_font):
113 * fringe.c (draw_fringe_bitmap_1):
114 * xdisp.c (handle_face_prop, face_before_or_after_it_pos)
115 (get_next_display_element, highlight_trailing_whitespace)
116 (display_string, calc_line_height_property)
117 (note_mode_line_or_margin_highlight, note_mouse_highlight):
118 * xfaces.c (tty_suppress_bold_inverse_default_colors_p)
119 (menu_face_changed_default, recompute_basic_faces)
120 (Fbitmap_spec_p, parse_rgb_list, tty_lookup_color)
121 (tty_defined_color, defined_color, face_color_gray_p)
122 (face_color_supported_p, load_color2, load_face_colors)
123 (Fx_list_fonts, LFACEP, push_named_merge_point)
124 (resolve_face_name, lface_from_face_name_no_resolve)
125 (lface_from_face_name, get_lface_attributes_no_remap)
126 (get_lface_attributes, lface_fully_specified_p)
127 (set_lface_from_font, merge_face_vectors, merge_named_face)
128 (merge_face_ref, Finternal_make_lisp_face)
129 (Finternal_lisp_face_p, Finternal_copy_lisp_face)
130 (Finternal_set_lisp_face_attribute)
131 (update_face_from_frame_parameter, set_font_frame_param)
132 (face_boolean_x_resource_value)
133 (Finternal_set_lisp_face_attribute_from_resource)
134 (x_update_menu_appearance, Finternal_get_lisp_face_attribute)
135 (Finternal_merge_in_global_face, Fface_font, face_attr_equal_p)
136 (lface_equal_p, Finternal_lisp_face_equal_p)
137 (Finternal_lisp_face_empty_p, lface_same_font_attributes_p)
138 (Fcolor_distance, lookup_named_face, lookup_basic_face)
139 (lookup_derived_face, Fface_attributes_as_vector)
140 (x_supports_face_attributes_p, tty_supports_face_attributes_p)
141 (Fdisplay_supports_face_attributes_p, realize_basic_faces)
142 (realize_default_face, realize_named_face)
143 (realize_non_ascii_face, realize_x_face, map_tty_color)
144 (realize_tty_face, compute_char_face, face_at_buffer_position)
145 (face_for_overlay_string, face_at_string_position):
146 Use bool for boolean.
147 * xfaces.c (set_lface_from_font):
148 Return void, since callers never use the result.
149
150 2015-01-26 Andreas Schwab <schwab@linux-m68k.org>
151
152 * image.c (lookup_pixel_color): Reorder conditions that are
153 written backwards.
154 (x_to_xcolors): Likewise.
155 (x_detect_edges): Likewise.
156 (png_load_body): Likewise.
157 (gif_close): Likewise.
158 (gif_load): Likewise.
159
160 2015-01-25 Eli Zaretskii <eliz@gnu.org>
161
162 Use bool for boolean in w32term.c
163 * w32term.c (x_update_window_begin, x_update_window_end)
164 (x_update_end, x_after_update_window_line)
165 (x_set_glyph_string_gc, x_draw_glyph_string_background)
166 (x_draw_glyph_string_foreground)
167 (x_draw_composite_glyph_string_foreground)
168 (x_draw_glyphless_glyph_string_foreground)
169 (x_draw_image_glyph_string, x_draw_glyph_string)
170 (x_draw_stretch_glyph_string, note_mouse_movement)
171 (w32_mouse_position, x_scroll_bar_report_motion)
172 (x_horizontal_scroll_bar_report_motion, w32_read_socket)
173 (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
174 (w32_draw_window_cursor, x_new_font, x_set_offset)
175 (x_set_window_size, x_make_frame_invisible, x_iconify_frame): Use
176 bool where appropriate.
177
178 Use bool for boolean in w32fns.c
179 * w32fns.c (w32_defined_color, x_decode_color)
180 (Fxw_color_defined_p, Fxw_color_values, x_set_icon_type)
181 (x_set_menu_bar_lines, x_change_tool_bar_height)
182 (x_set_internal_border_width, x_explicitly_set_name)
183 (x_implicitly_set_name, Fx_create_frame, w32_window)
184 (x_create_tip_frame, Fx_show_tip): Use bool where appropriate.
185
186 2015-01-25 Paul Eggert <eggert@cs.ucla.edu>
187
188 Use bool for boolean in xfns.c
189 * xfaces.c (x_update_menu_appearance):
190 * xfns.c (x_real_positions, x_defined_color, x_decode_color)
191 (xg_set_icon, xg_set_icon_from_xpm_data, x_set_cursor_color)
192 (x_set_icon_type, x_set_icon_name, x_set_menu_bar_lines)
193 (x_change_tool_bar_height, x_set_internal_border_width)
194 (x_encode_text, x_set_name_internal, x_explicitly_set_name)
195 (x_implicitly_set_name, x_default_scroll_bar_color_parameter)
196 (hack_wm_protocols, xic_create_fontsetname, xic_free_xfontset)
197 (x_window, x_icon, Fx_wm_set_size_hint, Fx_create_frame)
198 (Fxw_color_defined_p, Fxw_color_values, x_create_tip_frame)
199 (Fx_show_tip, clean_up_file_dialog, Fx_file_dialog)
200 (clean_up_dialog, syms_of_xfns):
201 * xterm.h (xg_set_icon, xg_set_icon_from_xpm_data)
202 (xic_create_fontsetname):
203 Use bool for boolean.
204 * xfns.c: Include bitmaps/gray.xbm unconditionally.
205
206 Count MANY function args more reliably
207 * alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
208 * buffer.c (Fbuffer_list, Fkill_buffer):
209 * callint.c (read_file_name, Fcall_interactively):
210 * charset.c (Fset_charset_priority, syms_of_charset):
211 * chartab.c (uniprop_encode_value_numeric):
212 * coding.c (syms_of_coding):
213 * composite.c (syms_of_composite):
214 * data.c (wrong_range):
215 * dbusbind.c (syms_of_dbusbind):
216 * dired.c (file_attributes):
217 * editfns.c (Fdecode_time, update_buffer_properties, format2):
218 * eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
219 (call4, call5, call6, call7):
220 * fileio.c (Finsert_file_contents, choose_write_coding_system)
221 (Fcar_less_than_car, build_annotations, auto_save_error):
222 * filelock.c (get_boot_time):
223 * fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
224 (maybe_resize_hash_table, secure_hash):
225 * font.c (font_style_to_value, font_open_by_name, Flist_fonts):
226 * fontset.c (fontset_add, Fset_fontset_font):
227 * ftfont.c (ftfont_lookup_cache):
228 * gtkutil.c (xg_get_font):
229 * insdel.c (signal_before_change, signal_after_change):
230 * keymap.c (append_key):
231 * lread.c (load_warn_old_style_backquotes, Fload, init_lread):
232 * minibuf.c (Fread_buffer):
233 * print.c (print_preprocess):
234 * process.c (Fformat_network_address, Fmake_network_process)
235 (server_accept_connection):
236 * sound.c (Fplay_sound_internal):
237 * term.c (Fsuspend_tty, Fresume_tty):
238 * window.c (window_list):
239 * xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
240 (message_with_string):
241 * xfaces.c (Fx_list_fonts):
242 * xfont.c (syms_of_xfont):
243 * xselect.c (x_handle_selection_request)
244 (x_handle_selection_clear, x_clear_frame_selections)
245 (x_clipboard_manager_error_1):
246 Prefer CALLMANY and CALLN to counting args by hand.
247 * doc.c (reread_doc_file): Remove unused code.
248 * fns.c (concat2, concat3): Redo to avoid need for local-var vector.
249 (cmpfn_user_defined, hashfn_user_defined, Fmaphash):
250 Prefer call1 and call2 to Ffuncall.
251 * keyboard.c (safe_run_hook_funcall, safe_run_hooks):
252 Use struct literal rather than a local var, for simplicity.
253 * keymap.c (where_is_internal): Use NULL rather than a pointer
254 to unused args.
255 * lisp.h (CALLMANY, CALLN): New macros.
256 * sound.c (Fplay_sound_internal): Coalesce duplicate code.
257 Fixes: bug#19634
258
259 Use gnustep-config if available
260 * emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
261 It doesn't appear to be needed, and the inclusion breaks on
262 Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
263
264 2015-01-22 Eli Zaretskii <eliz@gnu.org>
265
266 * xdisp.c (init_iterator): Restore a comment lost in transition.
267
268 2015-01-22 Paul Eggert <eggert@cs.ucla.edu>
269
270 Use bool for boolean in xfont.c, xftfont.c, xgselect.c
271 * xfont.c (xfont_driver, xfont_chars_supported)
272 (xfont_text_extents):
273 * xftfont.c (xftfont_get_colors, xftfont_open)
274 (xftfont_prepare_face, xftfont_done_face)
275 (xftfont_cached_font_ok):
276 * xgselect.c (xg_select):
277 Use bool for boolean.
278
279 Don't downcase system diagnostics' first letters
280 * fileio.c (report_file_errno): Don't downcase, and simplify.
281 Fixes: bug#19642
282
283 Isolate NIL_IS_ZERO-assuming code better
284 Suggested by Stefan Monnier in:
285 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
286 * alloc.c (allocate_pseudovector):
287 Use memclear, not memsetnil, to remove a 'verify'.
288 * callint.c (Fcall_interactively):
289 * dispnew.c (realloc_glyph_pool):
290 * xdisp.c (init_iterator):
291 Use memclear, not memset, to remove a 'verify'.
292 * lisp.h (memclear): Rename from memsetnil, and take a byte
293 count rather than a word count. All callers changed.
294
295 2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
296
297 Undo port to hypothetical nonzero Qnil case
298 This mostly undoes the previous change in this area. See:
299 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00570.html
300 * alloc.c (allocate_pseudovector):
301 * callint.c (Fcall_interactively):
302 * dispnew.c (realloc_glyph_pool):
303 * fringe.c (init_fringe):
304 * lisp.h (memsetnil):
305 * xdisp.c (init_iterator):
306 Simplify by assuming that Qnil is zero, but verify the assumption.
307 * lisp.h (NIL_IS_ZERO): Revert back to this symbol, removing
308 NIL_IS_NONZERO. All uses changed.
309
310 2015-01-20 Jan Djärv <jan.h.d@swipnet.se>
311
312 * nsterm.m (EV_TRAILER2): Set Vinhibit_quit to Qt (Bug#19531).
313
314 2015-01-20 Dmitry Antipov <dmantipov@yandex.ru>
315
316 Prefer xlispstrdup to avoid dumb calls to strlen.
317 * nsfont.m (ns_get_family):
318 * nsterm.m (ns_term_init):
319 * w32fns.c (w32_window):
320 * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
321
322 2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
323
324 Correct an old fix for GTK font selection
325 * gtkutil.c (xg_get_font): Fix off-by-2 typo.
326 Fixes: bug#3228
327
328 Fix minor bugs with printing null bytes
329 * minibuf.c (read_minibuf_noninteractive):
330 * xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
331 Work even if the Lisp string contains a null byte.
332
333 Port to hypothetical case where Qnil is nonzero
334 * alloc.c (allocate_pseudovector):
335 * callint.c (Fcall_interactively):
336 * coding.c (syms_of_coding):
337 * dispnew.c (realloc_glyph_pool):
338 * fringe.c (init_fringe):
339 * lisp.h (memsetnil):
340 * xdisp.c (init_iterator):
341 Port to the currently-hypothetical case where Qnil is nonzero.
342 * dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
343 as there are no Lisp_Object values in the data here.
344 * lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
345 All uses changed. Define only if not already defined, so that one
346 can debug with -DNIL_IS_NONZERO.
347 * xdisp.c (init_iterator): Remove unnecessary initializations to 0.
348
349 2015-01-19 Eli Zaretskii <eliz@gnu.org>
350
351 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
352 Qnil is represented as zero, before using that to initialize parts
353 of the glyph structure.
354
355 * xdisp.c (init_iterator): Verify that Qnil is represented as
356 zero, before using that to initialize parts of the iterator
357 structure.
358
359 2015-01-19 Paul Eggert <eggert@cs.ucla.edu>
360
361 Prefer memset to repeatedly assigning Qnil
362 * alloc.c (allocate_pseudovector): Catch more bogus values.
363 * alloc.c (allocate_pseudovector):
364 * callint.c (Fcall_interactively):
365 * coding.c (syms_of_coding):
366 * fringe.c (init_fringe):
367 Verify that Qnil == 0.
368 * callint.c (Fcall_interactively):
369 * eval.c (Fapply, Ffuncall):
370 * fns.c (mapcar1, larger_vector):
371 * font.c (font_expand_wildcards):
372 * fringe.c (init_fringe):
373 Prefer memset to assigning zeros by hand.
374 * callint.c (Fcall_interactively):
375 Remove duplicate assignment of Qnil to args[i].
376 * coding.c (syms_of_coding):
377 Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
378 * fileio.c (Ffile_selinux_context):
379 Rewrite to avoid need for Lisp_Object array.
380 * lisp.h (XLI_BUILTIN_LISPSYM): New macro.
381 (DEFINE_LISP_SYMBOL_END): Use it.
382 (NIL_IS_ZERO): New constant.
383 (memsetnil): New function.
384
385 2015-01-16 Dmitry Antipov <dmantipov@yandex.ru>
386
387 Tune pseudovector allocation assuming Qnil == 0.
388 * alloc.c (allocate_pseudovector): Use memset for both
389 Lisp_Objects and regular slots. Add zerolen arg.
390 * lisp.h (allocate_pseudovector): Adjust prototype.
391 (ALLOCATE_PSEUDOVECTOR): Adjust user.
392 (ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
393 (allocate_hash_table, allocate_window, allocate_frame)
394 (allocate_process, allocate_terminal): Remove prototypes.
395 * fns.c (allocate_hash_table): Now static here.
396 * frame.c (allocate_frame):
397 * process.c (allocate_process):
398 * terminal.c (allocate_terminal):
399 * window.c (allocate_window): Now static here.
400 Use ALLOCATE_ZEROED_PSEUDOVECTOR. Add comment.
401
402 * lisp.h (XTERMINAL): Add eassert.
403 * process.c (make_lisp_proc): Now static here.
404
405 Prefer INLINE functions in font.h to match style used in lisp.h.
406 * font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
407 (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
408 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
409 Now functions.
410 * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
411 * ftfont.c (ftfont_shape):
412 * macfont.m (macfont_shape):
413 * w32uniscribe.c (uniscribe_shape):
414 * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
415
416 2015-01-16 Paul Eggert <eggert@cs.ucla.edu>
417
418 Give up on -Wsuggest-attribute=const
419 * decompress.c (Fzlib_available_p):
420 * gnutls.c (Fgnutls_available_p):
421 * gtkutil.h (xg_uses_old_file_dialog):
422 * xdisp.c (Ftool_bar_height):
423 * xmenu.c (popup_activated):
424 No longer const, since it's not const on at lest some
425 configurations, and we shouldn't lie to the compiler.
426
427 2015-01-15 Eli Zaretskii <eliz@gnu.org>
428
429 * fileio.c: Include binary-io.h.
430 (Fset_binary_mode): New function.
431 (syms_of_fileio): Defsubr it.
432 (syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.
433
434 2015-01-15 Teodor Zlatanov <tzz@lifelogs.com>
435
436 * gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
437 (Fgnutls_peer_status): Use it to set the :self-signed flag.
438 Rename the previous :self-signed to :unknown-ca. (Bug#19404)
439 (Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.
440
441 2015-01-14 Eli Zaretskii <eliz@gnu.org>
442
443 * w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
444 when FLAGS indicate the item is not highlighted. (Bug#19596)
445
446 2015-01-14 Martin Rudalics <rudalics@gmx.at>
447
448 * xmenu.c (update_frame_menubar): Remove garbaged code.
449
450 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
451
452 remove_slash_colon need not be inline
453 * process.c, process.h (remove_slash_colon): No longer inline.
454 This saves text bytes without hurting runtime performance.
455
456 2015-01-14 Dmitry Antipov <dmantipov@yandex.ru>
457
458 Avoid extra multibyteness check in ENCODE_FILE users.
459 * callproc.c (encode_current_directory, Fcall_process, call_process):
460 * dired.c (directory_files_internal, file_name_completion):
461 Do not check for STRING_MULTIBYTE because encode_file_name
462 is a no-op for unibyte strings.
463
464 * process.h (remove_slash_colon): New function.
465 * callproc.c (encode_current_directory, call_process):
466 * process.c (Fstart_process): Use it.
467
468 Consistently handle time zone specification.
469 * editfns.c (decode_time_zone): New function, refactored out from ...
470 (Fencode_time): ... adjusted user.
471 (Fset_time_zone_rule): Use decode_time_zone.
472
473 * editfns.c (make_buffer_string_both): If requested range intersects
474 the gap, don't move the latter but copy in two regions, thus avoiding
475 unnecessary relocation of buffer data.
476
477 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
478
479 Use bool for boolean in xmenu.c, xml.c
480 * xmenu.c (x_menu_set_in_use, popup_get_selection)
481 (Fx_menu_bar_open_internal, popup_widget_loop)
482 (x_activate_menubar, xg_crazy_callback_abort)
483 (update_frame_menubar, set_frame_menubar)
484 (initialize_frame_menubar, free_frame_menubar)
485 (create_and_show_popup_menu, x_menu_show)
486 (create_and_show_dialog, x_dialog_show):
487 * xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
488 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
489 * xrdb.c (main) [TESTRM]:
490 * xsettings.c (init_gsettings):
491 * xterm.c (XFillRectangle, xg_scroll_callback)
492 (xg_end_scroll_callback):
493 * xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
494 Use bool for boolean.
495 * xmenu.c (TRUE): Remove; no longer used.
496 (show_help_event): Remove long-unused code.
497 (set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.
498
499 2015-01-13 Paul Eggert <eggert@cs.ucla.edu>
500
501 Don't say Fnext_read_file_uses_dialog_p is const
502 It's const only if a windowing system is not used; don't say it's
503 const otherwise. See:
504 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
505 * fileio.c (next_read_file_uses_dialog_p): Remove.
506 Move guts back to ...
507 (Fnext_read_file_uses_dialog_p): ... here.
508 Don't declare as const, as make-docfile.c now has a special case
509 for this function. This is an ugly hack, but it's better than
510 lying to the compiler.
511
512 Remove now-unnecessary forward XTYPE decl
513 * lisp.h (XTYPE): Remove forward declaration. The recent merge
514 from emacs-24 fixed the problem in a better way, by moving XPNTR's
515 definition to after XTYPE's.
516
517 2015-01-13 Eli Zaretskii <eliz@gnu.org>
518
519 Fix problems with 32-bit wide-int build exposed by MinGW.
520 * lisp.h (XPNTR): Move definition to after XTYPE, to avoid
521 compilation error in an unoptimized build when !USE_LSB_TAG.
522
523 * w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
524 same larger value as for the 64-bit build.
525
526 * w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
527 avoid compiler warnings.
528
529 * w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
530 Avoid compiler warnings about cast from integer to pointer of
531 different size.
532
533 * w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
534 UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
535 casting from integer to pointer of different size.
536 (add_menu_item): Pass the help-echo string as a pointer to
537 Lisp_String, not as a Lisp_Object.
538 (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
539 string object from its C pointer.
540
541 * w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
542 make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
543 C pointer.
544 <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
545 (Fx_create_frame): Type-cast the result of XFASTINT to avoild
546 compiler warnings about size differences.
547 (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
548 pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
549 (Fw32_toggle_lock_key): Pass the new state of the key as a C
550 integer; use -1 for nil. Doc fix.
551
552 * .gdbinit (xgetsym): New subroutine.
553 (xsymname, xsymbol): Use it.
554 (xprintsym): No need to call xgetptr.
555
556 2015-01-13 Martin Rudalics <rudalics@gmx.at>
557
558 * frame.c (adjust_frame_size): Make sure new numbers of
559 lines/columns get installed after font size change (Bug#19575).
560
561 2015-01-13 Dmitry Antipov <dmantipov@yandex.ru>
562
563 Add DEFUN attributes.
564 * callint.c (Finteractive):
565 * character.c (Fcharacterp, Fmax_char):
566 * data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
567 (Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
568 (Ffloatp, Fbyteorder):
569 * decompress.c (Fzlib_available_p):
570 * fns.c (Fidentity):
571 * frame.c (Fframe_windows_min_size):
572 * gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
573 * window.c (Fwindow__sanitize_window_sizes):
574 * xdisp.c (Ftool_bar_height):
575 * xfaces.c (Fface_attribute_relative_p): Add const attribute.
576 * emacs.c (Fkill_emacs):
577 * eval.c (Fthrow):
578 * keyboard.c (Ftop_level, Fexit_recursive_edit)
579 (Fabor_recursive_edit): Add noreturn attribute.
580
581 * search.c (fast_string_match_internal): New function,
582 consolidated from...
583 (fast_string_match, fast_string_match_ignore_case): ...functions
584 which are...
585 * lisp.h (fast_string_match, fast_string_match_ignore_case):
586 inlined from here now.
587 (fast_string_match_internal): Add prototype.
588 * dired.c (file_name_completion): Use fast_string_match_internal.
589
590 * fileio.c (next_read_file_uses_dialog_p): New workaround ...
591 (Fnext_read_file_uses_dialog_p): ... called from here to avoid
592 ATTRIBUTE_CONST dependency from #ifdefs. For details, see
593 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.
594
595 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
596
597 Port to 32-bit MingGW --with-wide-int
598 Problem reported by Eli Zaretskii in:
599 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
600 * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
601 what we think it is, rather than checking only its alignment (and
602 doing so incorrectly on MinGW).
603
604 2015-01-12 Dmitry Antipov <dmantipov@yandex.ru>
605
606 * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
607 Remove dead NILP check.
608 * image.c (Flookup_image): Use regular format for docstring.
609 * keyboard.c (apply_modifiers_uncached): Use stpcpy.
610
611 2015-01-12 Martin Rudalics <rudalics@gmx.at>
612
613 * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
614 adjust_frame_size.
615 * frame.c (frame_default_tool_bar_height): New variable.
616 (adjust_frame_size): Possibly add requested adjustment to
617 Vframe_adjust_size_history.
618 (make_frame): Initialize tool_bar_redisplayed_once slot.
619 (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
620 doc-string. Call adjust_frame_size unconditionally (the frame's
621 text size may remain unaltered but the pixel size may change).
622 (x_figure_window_size): If frame_default_tool_bar_height was
623 set, use it instead of calculating the tool bar height from
624 DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set
625 Vframe_initial_frame_tool_bar_height.
626 (Qchange_frame_size, Qxg_frame_set_char_size)
627 (Qset_window_configuration, Qx_create_frame_1)
628 (Qx_create_frame_2): New symbols.
629 (Vframe_initial_frame_tool_bar_height): Remove.
630 (Vframe_adjust_size_history): New history variable for debugging
631 frame size adjustments.
632 * frame.h (struct frame): New boolean slot
633 tool_bar_redisplayed_once.
634 (frame_default_tool_bar_height): Extern.
635 * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
636 to adjust_frame_size.
637 * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
638 Qx_create_frame_2 to adjust_frame_size.
639 * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
640 inhibit 1 when we have not redisplayed the tool bar yet.
641 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
642 Qx_create_frame_2 to adjust_frame_size.
643 * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
644 call.
645 * window.c (Fset_window_configuration): Pass
646 Qset_window_configuration to adjust_frame_size.
647 * xdisp.c (redisplay_tool_bar): Assign new height to
648 frame_default_tool_bar_height.
649 (redisplay_internal): If we haven't redisplayed this frame's
650 tool bar, call redisplay_tool_bar early so we can adjust the
651 frame size accordingly.
652 * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
653 inhibit 1 when we have not redisplayed the tool bar yet.
654 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
655 Qx_create_frame_2 to adjust_frame_size.
656
657 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
658
659 Have 'make' output better GEN names
660 * Makefile.in (gl-stamp, globals.h): Simplify by putting the new
661 contents of globals.h into gl-stamp. This lets us use AM_V_GEN
662 more naturally so that 'make' can output more-accurate names.
663
664 2015-01-11 Stefan Monnier <monnier@iro.umontreal.ca>
665
666 * buffer.c (init_buffer_once): Initialize buffer_local_flags before
667 calling reset_buffer_local_variables, and make sure we initialize
668 it completely.
669
670 2015-01-11 Dmitry Antipov <dmantipov@yandex.ru>
671
672 * coding.c (Fcoding_system_plist): Use common style for docstring.
673
674 2015-01-11 Paul Eggert <eggert@cs.ucla.edu>
675
676 Port to MSB hosts without optimization
677 E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
678 the inline function XTYPE needs to be declared before being used.
679 * lisp.h (XTYPE): New forward declaration.
680
681 2015-01-10 Paul Eggert <eggert@cs.ucla.edu>
682
683 Port to 32-bit --with-wide-int
684 Prefer symbol indexes to struct Lisp_Symbol * casted and then
685 widened, as the latter had trouble with GCC on Fedora 21 when
686 configured --with-wide-int and when used in static initializers.
687 * alloc.c (garbage_collect_1, which_symbols):
688 * lread.c (init_obarray):
689 Prefer builtin_lisp_symbol when it can be used.
690 * dispextern.h (struct image_type.type):
691 * font.c (font_property_table.key):
692 * frame.c (struct frame_parm_table.sym):
693 * keyboard.c (scroll_bar_parts, struct event_head):
694 * xdisp.c (struct props.name):
695 Use the index of a builtin symbol rather than its address.
696 All uses changed.
697 * lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
698 (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
699 symbol indexes rather than pointers, and which work better on MSB
700 hosts because they shift right before tagging. All uses changed.
701 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
702 No longer noops on wide-int hosts, since they work now.
703 (builtin_lisp_symbol): New function.
704
705 Port to HAVE_FREETYPE && !HAVE_XFT
706 * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
707 * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
708 Declare in this case too.
709
710 2015-01-10 Eli Zaretskii <eliz@gnu.org>
711
712 * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
713
714 * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
715 make_pointer_integer instead of XIL.
716 (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
717
718 * w32inevt.c (handle_file_notifications): Use make_pointer_integer
719 instead of XIL. Put a list of the descriptor, action, and file
720 name in event->arg, instead of spreading them between event->code
721 and event->arg.
722
723 * w32term.c (queue_notifications): Use make_pointer_integer
724 instead of XIL. Put a list of the descriptor, action, and file
725 name in event->arg, instead of spreading them between event->code
726 and event->arg.
727
728 * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
729 event creation to changes in w32term.c and w32inevt.c above.
730
731 2015-01-09 Paul Eggert <eggert@cs.ucla.edu>
732
733 Port Qnil==0 changes to 32-bit --with-wide-int
734 * lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
735 macro-implemented version. For the non-USE_LSB_TAG case, supply
736 a new inline function that is the inverse of the new TAG_SYMPTR.
737 (lisp_h_XUNTAGBASE, XUNTAGBASE): Remove. All uses removed.
738 (TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
739 negative number, don't allow sign bits to bleed into the encoded
740 value. Shift in zero bits instead.
741
742 Refactor pointer-to-integer conversion
743 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
744 Rename and move to lisp.h. All uses changed.
745 * lisp.h (XINTPTR, make_pointer_integer): New inline functions,
746 which are renamed from gfilenotify.c's lisp_to_monitor and
747 monitor_to_lisp, and with more-generic void * signatures.
748
749 2015-01-08 Eli Zaretskii <eliz@gnu.org>
750
751 * dispnew.c (buffer_posn_from_coords): Fix the value of the column
752 returned for right-to-left screen lines. (Before the change on
753 2014-12-30, the incorrectly-computed X pixel coordinate concealed
754 this bug.)
755
756 * .gdbinit (xsymname): New subroutine.
757 (xprintsym, initial-tbreak): Use it to access the name of a symbol
758 in a way that doesn't cause GDB to barf when it tries to
759 dereference a NULL pointer.
760
761 * xdisp.c (next_element_from_c_string): Use Lisp integer zero as
762 the object.
763 (set_cursor_from_row, try_cursor_movement, dump_glyph)
764 (insert_left_trunc_glyphs, append_space_for_newline)
765 (extend_face_to_end_of_line, highlight_trailing_whitespace)
766 (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
767 (Fbidi_resolved_levels, produce_special_glyphs)
768 (rows_from_pos_range, mouse_face_from_buffer_pos)
769 (note_mouse_highlight): Use nil as the object for glyphs inserted
770 by the display engine, and test with NILP instead of INTEGERP.
771 (Bug#19535)
772
773 * w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
774 the display engine.
775
776 * xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
777 the display engine.
778
779 * dispextern.h (struct glyph, struct it): Update comments for the
780 OBJECT members.
781
782 2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
783
784 Port new Lisp symbol init to x86 --with-wide-int
785 * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
786 Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
787 GCC (at least) does not allow a constant initializer to widen an
788 address constant.
789
790 * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
791 This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
792 Although clang doesn't need it, some other compiler might, and
793 it's easy enough to be safe.
794
795 * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
796 Apparently clang removed support for the alloc_size attribute.
797
798 Port Qnil==0 XUNTAG to clang
799 clang has undefined behavior if the program subtracts an integer
800 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
801 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
802 * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
803 (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.
804
805 Port GFileMonitor * hack to Qnil==0 platforms
806 Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
807 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
808 (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
809
810 2015-01-06 Jan Djärv <jan.h.d@swipnet.se>
811
812 * nsterm.m (x_set_window_size): Call updateFrameSize to get real
813 size instead of using widht/height. The frame may be constrained.
814
815 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
816
817 * lisp.h (XSYMBOL): Parenthesize id in forward decl.
818 Needed when neither optimizing nor inlining.
819 Also, sort decls alphabetically.
820
821 2015-01-05 Eli Zaretskii <eliz@gnu.org>
822
823 * w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
824 * w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove
825 declarations of Q* variables that represent symbols.
826
827 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
828
829 Use 0 for Qnil
830 Fixes Bug#15880.
831 If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
832 that NILP (x) is equivalent to testing whether x is 0 at the
833 machine level. The overall effects of this and the previous patch
834 shrink the size of the text segment by 2.3% and speeds up
835 compilation of all the .elc files by about 0.5% on my platform,
836 which is Fedora 20 x86-64.
837 * lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
838 (make_lisp_symbol) [USE_LSB_TAG]:
839 Symbols now tag the difference from lispsym, not the pointer.
840 (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
841 (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
842 Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
843 (XSYMBOL): New forward decl.
844 (XUNTAGBASE): New function.
845 (XUNTAG): Use it.
846
847 Compute C decls for DEFSYMs automatically
848 Fixes Bug#15880.
849 This patch also makes Q constants (e.g., Qnil) constant addresses
850 from the C point of view.
851 * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c:
852 * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
853 * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
854 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
855 * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
856 * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
857 * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
858 * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
859 * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
860 * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
861 * xselect.c, xsettings.c, xterm.c:
862 Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
863 These names are now defined automatically by make-docfile.
864 * alloc.c (init_symbol): New function.
865 (Fmake_symbol): Use it.
866 (c_symbol_p): New function.
867 (valid_lisp_object_p, purecopy): Use it.
868 * alloc.c (marked_pinned_symbols):
869 Use make_lisp_symbol instead of make_lisp_ptr.
870 (garbage_collect_1): Mark lispsym symbols.
871 (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
872 (mark_object): Use it.
873 (sweep_symbols): Sweep lispsym symbols.
874 (symbol_uses_obj): New function.
875 (which_symbols): Use it. Work for lispsym symbols, too.
876 (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
877 since Qt's address is already known now.
878 (syms_of_alloc): Add lispsym count to symbols_consed.
879 * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
880 when testing whether storage is all bits zero.
881 * dispextern.h (struct image_type):
882 * font.c (font_property_table):
883 * frame.c (struct frame_parm_table, frame_parms):
884 * keyboard.c (scroll_bar_parts, struct event_head):
885 * xdisp.c (struct props):
886 Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
887 Lisp_Object *, since Qfoo is no longer an object whose address can be
888 taken. All uses changed.
889 * eval.c (run_hook): New function. Most uses of Frun_hooks changed to
890 use it, so that they no longer need to take the address of a Lisp sym.
891 (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
892 * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
893 * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
894 DEFSYM Qdeactivate_mark before the corresponding var.
895 * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
896 instead of interning their symbols; this avoids duplicates.
897 (LISP_INITIALLY, TAG_PTR)
898 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
899 New macros.
900 (LISP_INITIALLY_ZERO): Use it.
901 (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
902 (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
903 Move decls up, to avoid forward uses. Include globals.h earlier, too.
904 (make_lisp_symbol): New function.
905 (XSETSYMBOL): Use it.
906 (DEFSYM): Now just a placeholder for make-docfile.
907 * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
908 (intern_sym): New function, with body taken from old intern_driver.
909 (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
910 All uses changed.
911 (define_symbol): New function.
912 (init_obarray): Define the C symbols taken from lispsym.
913 Use plain DEFSYM for Qt and Qnil.
914 * syntax.c (init_syntax_once): No need to worry about
915 Qchar_table_extra_slots.
916
917 2015-01-04 Paul Eggert <eggert@cs.ucla.edu>
918
919 'temacs -nw' should not call missing functions
920 Without this patch, "temacs -nw" fails with the diagnostic
921 "emacs: Symbol's function definition is void: frame-windows-min-size"
922 and messes up the tty's state.
923 * frame.c (Fframe_windows_min_size): New placeholder function.
924 (syms_of_frame): Define it.
925 * window.c (Fwindow__sanitize_window_sizes): New placeholder.
926 (syms_of_window): Define it.
927
928 Less 'make' chatter for lisp dir
929 * Makefile.in (%.elc): Adjust to compile-onefile change in
930 ../lisp/Makefile.in.
931
932 batch write-region no longer says "Wrote FOO"
933 This cuts down on 'make' chatter a bit.
934 * fileio.c (Fwrite_region):
935 Don't output "Wrote /whatever/foo.elc" if noninteractive.
936
937 2015-01-03 Paul Eggert <eggert@cs.ucla.edu>
938
939 Revert previous change to produce_composite_glyph
940 * term.c (produce_composite_glyph): Revert previous change (Bug#19496).
941
942 Pacify gcc -Wparentheses
943 * frame.c (x_set_frame_parameters): Add parens (Bug#19428).
944
945 2015-01-03 Martin Rudalics <rudalics@gmx.at>
946
947 * frame.c (x_set_frame_parameters): Call Fset_frame_size only if
948 f->can_x_set_window_size is true.
949 * xterm.c (x_set_window_size_1): Call change_frame_size with
950 text sizes instead of pixel sizes (Bug#19428).
951
952 2015-01-01 Eli Zaretskii <eliz@gnu.org>
953
954 * xdisp.c (pos_visible_p): Fix up the X coordinate for
955 right-to-left screen lines. (Bug#19473)
956
957 2015-01-01 Eli Zaretskii <eliz@gnu.org>
958
959 * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
960
961 2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
962
963 Simplify setfattr use by assuming GNU make
964 * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
965 (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
966 Simplify by using GNU make rather than shell conditionals,
967 by using ln -f rather than rm -f followed by ln,
968 and by preferring $@ to spelling out the destination.
969
970 2014-12-29 Eli Zaretskii <eliz@gnu.org>
971
972 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
973 file doesn't compile on MS-Windows.
974
975 2014-12-29 Paul Eggert <eggert@cs.ucla.edu>
976
977 Allow return value of system-name to vary. (Bug#19438)
978 * filelock.c (current_lock_owner):
979 * xrdb.c (get_environ_db):
980 * xterm.c (same_x_server):
981 * xterm.c (x_term_init):
982 Prefer (system-name) to system-name, and avoid naming
983 locals 'system-name'.
984 * editfns.c (cached_system_name): New static var.
985 (init_and_cache_system_name): New function.
986 (init_editfns, Fsystem_name): Use it.
987 (syms_of_editfns): Initialize it and Vsystem_name to the same value.
988 * sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
989 (h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
990 (init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
991 Don't create a new string if the current value is already correct.
992
993 2014-12-28 Paul Eggert <eggert@cs.ucla.edu>
994
995 Fix produce_composite_width typo
996 * term.c (produce_composite_glyph):
997 Fix typo that confused number of columns for pixel width.
998
999 2014-12-28 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
1000
1001 Wrap dll functions more simply
1002 * decompress.c, gnutls.c, image.c, xml.c:
1003 If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
1004 rather than the inverse when not WINDOWSNT. This isolates the
1005 fn_* business into the WINDOWSNT-specific section of the code,
1006 which makes it easier to maintain the generic code.
1007 * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
1008 * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
1009 * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
1010 * xml.c (DEF_XML2_FN, LOAD_XML2_FN):
1011 Remove. All uses replaced by DEF_DLL_FN.
1012 * decompress.c (inflateInit2): Remove; no longer needed.
1013 * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
1014
1015 Port memory-full checking to GnuTLS 3.3
1016 Instead of using gnutls_global_set_mem_functions, check every call
1017 to a GnuTLS function that might return an indication of memory
1018 exhaustion. Suggested by Dmitry Antipov in:
1019 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
1020 * gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
1021 (init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
1022 (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
1023 All uses removed.
1024 (check_memory_full): New function.
1025 (emacs_gnutls_handshake, emacs_gnutls_handle_error)
1026 (gnutls_make_error, gnutls_certificate_details, Fgnutls_peer_status)
1027 (Fgnutls_boot): Use it.
1028 (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
1029
1030 2014-12-27 Paul Eggert <eggert@cs.ucla.edu>
1031
1032 Fix parse_settings to match internal documentation
1033 * xsettings.c (parse_settings): Return the number of settings seen.
1034 Count the settings changes accurately.
1035 (read_settings): Don't confuse number of settings changes with
1036 the return code from XGetWindowProperty.
1037
1038 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1039
1040 * xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
1041 composition_compute_stop_pos to the number of characters in the
1042 string. (Bug#19435)
1043 <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
1044
1045 * composite.c (composition_compute_stop_pos): If no composition
1046 was found in a string before ENDPOS, and ENDPOS is the string end,
1047 no need to back up to a safe point.
1048
1049 * dispextern.h (struct it) <end_charpos>: Improve commentary.
1050
1051 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
1052
1053 * nsimage.m (allocInitFromFile:): Initialize bmRep.
1054 (dealloc): Release bmRep.
1055 (setPixmapData): Make bmRep local so class member is not
1056 set (Bug#19133).
1057 (setPixmapData): Rename local variable bmRep to avoid compiler
1058 warning.
1059
1060 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
1061
1062 * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
1063 when going to fullscreen (Bug#0x180004f).
1064
1065 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1066
1067 * window.c (Fwindow_body_width): Doc fix. (Bug#19395)
1068
1069 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
1070
1071 * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
1072
1073 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1074
1075 * gnutls.c (gnutls_init): Fix deprecation warning from GCC.
1076
1077 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
1078
1079 Use bool for boolean in xselect.c, xsettings.c
1080 * xselect.c (x_get_local_selection, struct selection_data)
1081 (x_selection_request_lisp_error, struct prop_location)
1082 (x_handle_selection_request, x_convert_selection)
1083 (waiting_for_other_props_on_window, expect_property_change)
1084 (wait_for_property_change, x_handle_property_notify)
1085 (x_get_foreign_selection, x_get_window_property)
1086 (receive_incremental_selection)
1087 (x_get_window_property_as_lisp_data)
1088 (lisp_data_to_selection_data, Fx_get_selection_internal)
1089 (x_send_client_event):
1090 * xselect.c, xterm.h (x_handle_dnd_message):
1091 * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
1092 (apply_xft_settings, read_and_apply_settings)
1093 (xft_settings_event, init_gsettings, init_xsettings)
1094 (syms_of_xsettings):
1095 Use bool for boolean.
1096 * xselect.c (x_get_window_property): Omit last arg, which was an
1097 unused boolean.
1098 * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
1099 always true. All callers changed.
1100
1101 2014-12-26 Eli Zaretskii <eliz@gnu.org>
1102
1103 * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
1104 of strcat.
1105
1106 * w32menu.c (add_menu_item): Use stpcpy instead of strcat.
1107
1108 * w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
1109 strcat.
1110
1111 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
1112
1113 Use bool for boolean in xsmfns.c
1114 * xsmfns.c, xterm.h (x_session_have_connection):
1115 * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
1116 Use bool for boolean.
1117 (x_session_initialize, Fhandle_save_session):
1118 Prefer NILP (x) to EQ (x, Qnil).
1119
1120 2014-12-25 Paul Eggert <eggert@cs.ucla.edu>
1121
1122 * callproc.c (child_setup):
1123 * dbusbind.c (xd_signature_cat):
1124 * doc.c (get_doc_string, Fsnarf_documentation):
1125 * editfns.c (Fuser_full_name):
1126 * frame.c (xrdb_get_resource):
1127 * gtkutil.c (xg_get_file_with_chooser):
1128 * tparam.c (tparam1):
1129 * xfns.c (xic_create_fontsetname):
1130 * xrdb.c (gethomedir, get_user_db, get_environ_db):
1131 * xsmfns.c (smc_save_yourself_CB):
1132 Rewrite to avoid the need for strcat, typically by using stpcpy
1133 and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms.
1134 * doc.c (sibling_etc):
1135 * xrdb.c (xdefaults):
1136 Now a top-level static constant.
1137
1138 2014-12-23 Didier Verna <didier@didierverna.net> (tiny change).
1139
1140 * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
1141 C one (Bug#19396).
1142
1143 2014-12-22 Jan Djärv <jan.h.d@swipnet.se>
1144
1145 * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
1146 breaks icon setting for Gtk+ except for initial frame (Bug#19403).
1147
1148 2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
1149
1150 Use bool for boolean in xterm.c
1151 * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
1152 (x_set_window_size, x_bitmap_icon):
1153 * nsterm.m (ns_frame_raise_lower, x_new_font):
1154 * termhooks.h (struct terminal.toggle_invisible_pointer_hook)
1155 (struct terminal.frame_raise_lower_hook):
1156 * w32term.c (w32_frame_raise_lower):
1157 * xterm.c, xterm.h (x_text_icon):
1158 * xterm.c (x_update_window_begin, x_update_window_end)
1159 (x_update_end, x_after_update_window_line)
1160 (x_set_glyph_string_gc, x_draw_glyph_string_background)
1161 (x_draw_glyph_string_foreground)
1162 (x_draw_composite_glyph_string_foreground)
1163 (x_alloc_lighter_color, x_draw_relief_rect)
1164 (x_draw_glyph_string_box, x_draw_image_relief)
1165 (x_draw_image_glyph_string, x_draw_stretch_glyph_string)
1166 (x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
1167 (x_hide_hourglass):
1168 (XFillRectangle) [HAVE_GTK3]:
1169 (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
1170 (x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
1171 (XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
1172 (x_send_scroll_bar_event, xm_scroll_callback)
1173 (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
1174 (x_create_toolkit_scroll_bar)
1175 (x_create_horizontal_toolkit_scroll_bar)
1176 (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
1177 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
1178 (XTset_horizontal_scroll_bar, x_scroll_bar_expose)
1179 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
1180 (x_scroll_bar_report_motion)
1181 (x_horizontal_scroll_bar_report_motion, x_net_wm_state)
1182 (handle_one_xevent, XTread_socket, x_draw_bar_cursor)
1183 (x_draw_window_cursor, x_clear_errors)
1184 (x_trace_wire, x_new_font, x_set_offset, wm_supports)
1185 (set_wm_state, x_set_sticky, get_current_wm_state)
1186 (do_ewmh_fullscreen, x_handle_net_wm_state)
1187 (x_check_expected_move, x_sync_with_move, x_wait_for_event)
1188 (x_set_window_size_1, XTframe_raise_lower)
1189 (x_make_frame_visible, x_iconify_frame)
1190 (x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
1191 (x_term_init, x_process_timeouts, x_activate_timeout_atimer)
1192 (x_delete_terminal, x_initialize, syms_of_xterm):
1193 Use bool for boolean.
1194
1195 2014-12-20 Paul Eggert <eggert@cs.ucla.edu>
1196
1197 * composite.h (struct composition.width): Now int
1198 instead of unsigned short, as we prefer signed integers.
1199
1200 Let charset tick grow past USHRT_MAX
1201 * charset.c, charset.h (charset_ordered_list_tick):
1202 Now EMACS_UINT, not unsigned short.
1203 * fontset.c (reorder_font_vector): Allow the tick to grow to the
1204 maximum representable Emacs integer value before wrapping it around.
1205
1206 Simplify unexec file mode setting
1207 * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
1208 Don't include <sys/stat.h> when no longer needed.
1209 (unexec): Create file with correct mode in the first place,
1210 rather than overwriting the mode later and fiddling with the
1211 global umask in the mean time. Avoid bogus usage like
1212 'umask (777)', which should have been 'umask (0777)'.
1213 (mark_x): Remove. All callers removed.
1214
1215 2014-12-19 Paul Eggert <eggert@cs.ucla.edu>
1216
1217 Minor cleanups for Lisp objects and symbols
1218 * alloc.c (next_vector, set_next_vector):
1219 * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
1220 (lisp_h_make_number) [USE_LSB_TAG]:
1221 Use Lisp_Int0 instead of the mystery constant 0.
1222 * alloc.c (mark_object): Always set and use po; that's simpler.
1223 (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
1224 Properly parenthesize definientia.
1225 * bidi.c (bidi_initialize):
1226 * buffer.c (init_buffer_once):
1227 * nsfns.m (syms_of_nsfns):
1228 * nsmenu.m (syms_of_nsmenu):
1229 * nsselect.m (syms_of_nsselect):
1230 Prefer DEFSYM to defining by hand.
1231 * buffer.c (syms_of_buffer): Omit unneeded staticpros.
1232 * data.c: Fix too-long line.
1233 * lisp.h (DECLARE_GDB_SYM): New macro.
1234 (DEFINE_GDB_SYMBOL_BEGIN): Use it.
1235 (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
1236 Declare the symbol, so it's visible to everywhere lisp.h is included.
1237 Move forward decls as far forward as they can go,
1238 to allow future changes to use them.
1239
1240 2014-12-18 Paul Eggert <eggert@cs.ucla.edu>
1241
1242 * gnutls.c: Include gnutls.h.
1243 This to check syms_of_gnutls's API even when !HAVE_GNUTLS.
1244 * image.c (svg_load): Fix pointer signedness.
1245
1246 2014-12-18 Martin Rudalics <rudalics@gmx.at>
1247
1248 * frame.c (frame_windows_min_size): New argument IGNORE.
1249 (adjust_frame_size): When called from change_frame_size call
1250 frame_windows_min_size with IGNORE Qt so we can ignore size
1251 restrictions.
1252
1253 2014-12-18 Eli Zaretskii <eliz@gnu.org>
1254
1255 * font.c (Ffont_info): Add more font information to the vector
1256 returned by the function, inspired by query-font. Doc fix.
1257 (Bug#19395)
1258
1259 2014-12-18 Stefan Monnier <monnier@iro.umontreal.ca>
1260
1261 * keyboard.c (input_was_pending): New var.
1262 (read_char): Use it to make sure we only skip redisplay when we can't
1263 keep up with the repeat rate.
1264
1265 2014-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
1266
1267 * keyboard.c (swallow_events): Don't redisplay if there's input pending.
1268
1269 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1270
1271 * image.c (svg_load): Watch out for nil value of current buffer's
1272 filename. Re-enable filename thing for not-a-file case.
1273
1274 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1275
1276 Partially disabled previous change.
1277
1278 * image.c (svg_load): Temporarily disabled filename thing for
1279 not-a-file case as it can cause crashs.
1280
1281 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1282
1283 Fix problem with images referenced within svg files. (bug#19373)
1284
1285 * image.c: Additional parameter 'filename' for
1286 svg_load_image. Include "buffer.h". Define library function
1287 rsvg_handle_set_base_uri for WINDOWSNT.
1288 (init_svg_functions): Initialize rsvg_handle_set_base_uri.
1289 (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
1290 (svg_load): Pass a filename to svg_load_image: either name of
1291 actual file or of current buffer's file.
1292 (svg_load_image): New parameter 'filename', used for setting
1293 base_uri, necessary for loading referenced images. (bug#19373)
1294
1295 2014-12-16 Paul Eggert <eggert@cs.ucla.edu>
1296
1297 * lread.c (init_obarray): Declare Qt as special.
1298 This fixes a typo in the 2012-05-15 patch that
1299 tried to declare Qt as special.
1300
1301 2014-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
1302
1303 Various fixes to use bool type and constants.
1304 * dispnew.c (update_single_window): Remove arg `force_p' since it's
1305 always true.
1306 * xfaces.c (clear_face_cache): Use bool for the argument type.
1307
1308 2014-12-15 Paul Eggert <eggert@cs.ucla.edu>
1309
1310 Correct same_at_end when restoring window points
1311 * fileio.c (Finsert_file_contents): Compute same_at_end character
1312 position using the old buffer size, not the new one, since
1313 restore_window_points wants the old size.
1314 Fixes: debbugs:19161
1315
1316 2014-12-14 Alan Mackenzie <acm@muc.de>
1317
1318 New feature optionally to accelerate auto-repeated scrolling.
1319
1320 * xdisp.c: Remove "static" from declaration of Qfontification_functions.
1321
1322 * window.c (window_scroll): Bind fontification-functions to nil
1323 when scrolling by whole screens and
1324 fast-but-imprecise-scrolling is non-nil.
1325 (syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.
1326
1327 * lisp.h (bool): Declare Qfontification_functions extern.
1328
1329 2014-12-14 Eli Zaretskii <eliz@gnu.org>
1330
1331 Load system's default trusted Certificate Authorities if available.
1332 * gnutls.c (gnutls_certificate_set_x509_system_trust)
1333 [GNUTLS >= 3.0.20]: Declare for WINDOWSNT.
1334 (init_gnutls_functions)(gnutls_certificate_set_x509_system_trust)
1335 [GNUTLS >= 3.0.20]: Load from shared library for WINDOWSNT.
1336 (fn_gnutls_certificate_set_x509_system_trust) [!WINDOWSNT]:
1337 Define new macro.
1338 (Fgnutls_boot) [GNUTLS >= 3.0.20]:
1339 Call gnutls_certificate_set_x509_system_trust. Log an error message if
1340 it fails.
1341
1342 2014-12-14 Paul Eggert <eggert@cs.ucla.edu>
1343
1344 * regex.c (analyze_first): Rename from analyze_first.
1345
1346 2014-12-13 Paul Eggert <eggert@cs.ucla.edu>
1347
1348 * alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
1349 a hack involving a union.
1350
1351 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1352
1353 * gnutls.c (Fgnutls_available_p, syms_of_gnutls):
1354 Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
1355 them only once.
1356
1357 2014-12-13 Teodor Zlatanov <tzz@lifelogs.com>
1358
1359 * emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
1360
1361 * gnutls.h: Always declare syms_of_gnutls.
1362
1363 * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
1364 clarity. Let the availability check return Qnil when the GnuTLS
1365 integration is not available, instead of erroring out.
1366 (Bug#19346)
1367
1368 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1369
1370 * xdisp.c (move_it_in_display_line_to, display_line):
1371 Don't disallow overflow-newline-into-fringe when word-wrap is in
1372 effect. (Bug#19300)
1373
1374 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
1375
1376 * fileio.c: Better preserve window-points during revert (bug#19161).
1377 (Qget_buffer_window_list): New var.
1378 (get_window_points_and_markers, restore_window_points): New functions.
1379 (Finsert_file_contents): Use them to save and restore window-points.
1380
1381 2014-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1382
1383 * xterm.c (x_delete_terminal): Call emacs_close for X connection
1384 descriptor if called from x_connection_closed and always delete
1385 this descriptor from keyboard waiting set (Bug#19147).
1386
1387 2014-12-10 Eli Zaretskii <eliz@gnu.org>
1388
1389 * bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
1390 (bidi_cache_max_elts): New global variable.
1391 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
1392 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
1393 its initial value.
1394 (bidi_cache_search): Handle overflown cache. Improve commentary.
1395 (bidi_cache_ensure_space): Limit allocations to the current value
1396 of bidi_cache_max_elts. Force xpalloc not to over-allocate.
1397 If less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
1398 the increment to not exceed the limit.
1399 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
1400 cache, zero otherwise (meaning the cache overflowed). In the
1401 latter case, set bidi_cache_last_idx to -1.
1402 (bidi_peek_at_next_level): Handle overflown cache.
1403 (bidi_push_it): Increase the cache limit for iterating the new object.
1404 (bidi_pop_it): Decrease the cache limit back to previous value.
1405 (bidi_shelve_cache): Shelve the current value of the cache limit.
1406 (bidi_unshelve_cache): Restore the value of cache limit.
1407 (bidi_find_bracket_pairs): If the cache overflows while looking
1408 for the paired bracket, give up and let bidi_resolve_neutrals
1409 process the bracket as a simple neutral. (Bug#19322)
1410 (bidi_find_other_level_edge): If the cache overflows, fall back on
1411 Plan B, which effectively stops the reordering and restarts it on
1412 the next character (after resetting the cache).
1413 (bidi_move_to_visually_next): When the cache overflows, reset it
1414 after processing the last cached character.
1415
1416 2014-12-10 Paul Eggert <eggert@cs.ucla.edu>
1417
1418 Fix glitches in gnutls.c, mostly memory-related
1419 * gnutls.c: Sort macro definitions by name.
1420 (fn_gnutls_transport_set_errno): Omit unreachable definition.
1421 (fn_gnutls_x509_crt_get_signature): Omit unused symbol.
1422 (gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
1423 Prefer ptrdiff_t for sizes. Check for arithmetic overflow when
1424 calculating string length. Use make_uninit_string, to avoid
1425 copying the string. Cast the char, not the pointer.
1426 (gnutls_certificate_details): Use xmalloc and xfree, not malloc
1427 and free. Work even for dates past the year 9999. Use void *
1428 for buffers, to avoid casts.
1429
1430 2014-12-09 Andy Moreton <andrewjmoreton@gmail.com> (tiny change)
1431
1432 * gnutls.c (gnutls_protocol_get_name): Fix a copy/paste typo.
1433
1434 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1435
1436 * gnutls.c (Fgnutls_peer_status): Return the key exchange, cipher
1437 and MAC algorithms.
1438
1439 2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
1440
1441 * process.c: Whitespace and line-break nitpicks.
1442
1443 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1444
1445 * gnutls.c (gnutls_certificate_details): The :signature isn't
1446 that useful, so remove it.
1447 (gnutls_certificate_details): Clean up whitespace slightly.
1448 (Fgnutls_peer_status): Return the Diffie-Hellman prime bits for
1449 the connection.
1450 (gnutls_certificate_details): Put :signature-algorithm back again,
1451 which was removed by mistake.
1452 (emacs_gnutls_handle_error): Fatal errors should be on level 1, so
1453 that they are not messaged by default (bug#16253).
1454 (Fgnutls_error_fatalp): Doc fix (bug#18210).
1455
1456 * gnutls.c: Add Windows specs for gnutls_dh_get_prime_bits.
1457
1458 2014-12-07 Jan Djärv <jan.h.d@swipnet.se>
1459
1460 * nsimage.m (setPixmapData): Make bmRep local so class member is not
1461 set (Bug#19133).
1462
1463 2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
1464
1465 * eval.c (Fsignal): Remove duplicate test.
1466 (Fautoload_do_load): Fix up docstring.
1467
1468 2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
1469
1470 * nsterm.m (represented_filename, represented_frame): New variables.
1471 (ns_set_represented_filename): New function.
1472 (sendEvent:): Set represented filename here to avoid flicker,
1473 related to Bug#18757.
1474
1475 * nsterm.h: Declare ns_set_represented_filename.
1476
1477 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
1478 at once, call ns_set_represented_filename instead.
1479
1480 2014-12-05 Eli Zaretskii <eliz@gnu.org>
1481
1482 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
1483 (struct bidi_stack): Reduce size by using bit fields and by
1484 packing sos, override, and isolate_status into a single 8-bit
1485 byte called 'flags'.
1486
1487 * bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
1488 (bidi_push_embedding_level): Construct flags from individual
1489 bits. Adapt to changes in prev_for_neutral and next_for_neutral
1490 members.
1491 (bidi_pop_embedding_level): Use ISOLATE_STATUS. Extract 'sos'
1492 from flags. Adapt to changes in prev_for_neutral,
1493 next_for_neutral, and last_strong members.
1494 (bidi_line_init): Initialize flags to zero.
1495 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
1496 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
1497
1498 2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
1499
1500 * eval.c (backtrace_eval_unrewind): Rewind also the excursions.
1501 (Fapply): Try and simplify the control flow.
1502
1503 2014-12-03 Chris Zheng <chriszheng99@gmail.com> (tiny change)
1504
1505 * gnutls.c (init_gnutls_functions, gnutls_certificate_details):
1506 Use gnutls_sign_get_name directly because
1507 gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231).
1508 (init_gnutls_functions): Load missing gnutls_server_name_set.
1509
1510 2014-12-02 Eli Zaretskii <eliz@gnu.org>
1511
1512 * bidi.c (bidi_find_first_overridden): New function.
1513
1514 * xdisp.c (Fbidi_find_overridden_directionality): New function.
1515 (syms_of_xdisp): Defsubr it.
1516
1517 * dispextern.h (bidi_find_first_overridden): Add prototype.
1518
1519 2014-12-02 Jan Djärv <jan.h.d@swipnet.se>
1520
1521 * nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
1522 to nil after release (Bug#9133).
1523
1524 2014-11-30 Paul Eggert <eggert@cs.ucla.edu>
1525
1526 Port better to AddressSanitizer.
1527 These changes suffice for temacs on x86-64 with GCC 4.9.2 and
1528 -fsanitize=address.
1529 * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
1530 Return -1 or 0, as the pipe trick doesn't work.
1531 * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
1532 * data.c (Ffset):
1533 * print.c (print_object):
1534 When a pointer-check primitive returns -1, do not assume this
1535 means the pointer is valid or that the underlying system has failed.
1536 It could just be that addresses are being sanitized so Emacs can't
1537 test for pointer validity.
1538 * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
1539 (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
1540 string validity checker doesn't work on stack-based strings.
1541
1542 2014-11-29 Paul Eggert <eggert@cs.ucla.edu>
1543
1544 Improve clarity of USE_LSB_TAG definition.
1545 Reported by Lee Duhem. Suggested by Andreas Schwab in:
1546 http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
1547 * lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
1548 VAL_MAX / 2 rather than in terms of the (more complicated)
1549 EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
1550
1551 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1552
1553 * xdisp.c (handle_single_display_spec): When ignoring a fringe
1554 bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
1555 (next_element_from_buffer): When done with overlays, reset the
1556 ignore_overlay_strings_at_pos_p flag. (Bug#19201)
1557
1558 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1559
1560 * w32fns.c (Fw32_shell_execute): Convert forward slashes in
1561 DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
1562
1563 2014-11-29 Ulrich Müller <ulm@gentoo.org>
1564
1565 * Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
1566 for paxctl and setfattr. Fixes temacs startup failure with
1567 grsecurity/PaX enabled Linux kernel (bug#19067).
1568
1569 2014-11-27 Oscar Fuentes <ofv@wanadoo.es>
1570
1571 * w32.c, w32heap.c, w32term.c:
1572 Use MINGW_W64 instead of _W64.
1573
1574 2014-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
1575
1576 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
1577
1578 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
1579
1580 * gnutls.c (gnutls_ip_address_p): New function.
1581 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
1582
1583 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
1584
1585 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
1586
1587 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
1588
1589 Fix gnutls problems caught by static checking.
1590 * gnutls.c (Fgnutls_boot): Remove unused local.
1591 (Fgnutls_boot): Fix pointer signedness.
1592
1593 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
1594
1595 * gnutls.c (gnutls_certificate_details): Don't include certain
1596 certificate details on older gnutls versions (bug#19168).
1597 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
1598 (gnutls_certificate_details): Reversed check in last checkin.
1599
1600 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
1601
1602 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
1603 (Fgnutls_peer_status_warning_describe): Add function to describe a
1604 peer verification warning symbol.
1605 (Fgnutls_peer_status): Use it.
1606 (Fgnutls_boot): Use it. Minor logging fixes.
1607
1608 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
1609
1610 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
1611
1612 2014-11-24 Glenn Morris <rgm@gnu.org>
1613
1614 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
1615
1616 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
1617 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
1618
1619 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
1620
1621 * gnutls.c: Fix Windows function definition of
1622 gnutls_x509_crt_get_fingerprint.
1623
1624 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
1625
1626 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
1627
1628 * process.h: Added more fields to Lisp_Process to track
1629 certificate details.
1630
1631 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
1632 (Fgnutls_peer_status): New functions to export TLS certificate
1633 details to Emacs Lisp.
1634
1635 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
1636
1637 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
1638 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
1639 check for gtk_adjustment_configure (Bug#19149).
1640 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
1641
1642 2014-11-22 Glenn Morris <rgm@gnu.org>
1643
1644 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
1645
1646 2014-11-22 Martin Rudalics <rudalics@gmx.at>
1647
1648 Don't shrink frame when using desktop-save-mode (Bug#19048).
1649 * w32fns.c (x_set_tool_bar_lines): Always call
1650 x_change_tool_bar_height (Bug#19048).
1651 (x_change_tool_bar_height): Mark frame as garbaged since
1652 adjust_frame_size might not have done that.
1653 * xfns.c (x_set_tool_bar_lines): Always call
1654 x_change_tool_bar_height (Bug#19048).
1655 (x_change_tool_bar_height): Mark frame as garbaged since
1656 adjust_frame_size might not have done that.
1657
1658 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
1659
1660 * xml.c (parse_region): Take care of new optional parameter
1661 'discard-comments' of 'libxml-parse(html|xml)-region'.
1662 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
1663 New optional parameter 'discard-comments'.
1664
1665 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
1666
1667 Improve time stamp handling, and be more consistent about it.
1668 * editfns.c (invalid_time): New function.
1669 Use it instead of 'error ("Invalid time specification")'.
1670 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
1671 (decode_float_time, lisp_to_timespec, lisp_time_struct):
1672 New functions.
1673 (make_time_tail, make_time): Remove. All uses changed to use
1674 new functions or plain list4i.
1675 (disassemble_lisp_time): Return effective length if successful.
1676 Check that LOW is an integer, if it's combined with other components.
1677 (decode_time_components): Decode into struct lisp_time, not
1678 struct timespec, so that we can support a wide set of times
1679 regardless of whether time_t is signed. Decode plain numbers
1680 as seconds since the Epoch, and nil as the current time.
1681 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
1682 Reimplement in terms of new functions.
1683 (Fencode_time): Just use list2i.
1684 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
1685 * keyboard.c (decode_timer): Don't allow the new formats (floating
1686 point or nil) in timers.
1687 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
1688 place of the magic number '16'.
1689 (struct lisp_time): New type.
1690 (decode_time_components): Use it.
1691 (lisp_to_timespec): New decl.
1692
1693 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
1694
1695 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
1696 text property.
1697
1698 * callint.c (Fcall_interactively): Pass in nil as argument to
1699 Fbarf_if_buffer_read_only.
1700
1701 * fileio.c (Finsert_file_contents): Ditto.
1702
1703 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
1704
1705 * textprop.c (verify_interval_modification): Check buffer
1706 readedness after the last interval.
1707
1708 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
1709 the text at POSITION (new optional argument) has the
1710 `inhibit-read-only' text property set.
1711
1712 2014-11-16 Eli Zaretskii <eliz@gnu.org>
1713
1714 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
1715 errors in computing the number of pixels to scroll.
1716 Suggested by Kelly Dean <kelly@prtime.org>. (Bug#19060)
1717
1718 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1719
1720 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
1721 call updateFrameSize.
1722
1723 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
1724
1725 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1726
1727 * nsfns.m (x_set_foreground_color, x_set_background_color)
1728 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
1729 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
1730
1731 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
1732
1733 * nsterm.m (ns_send_appdefined): Check for application defined
1734 event on Cocoa (Bug#18993).
1735 (run): Restore code before the previous 18993 fix.
1736
1737 2014-11-14 David Reitter <david.reitter@gmail.com>
1738
1739 * nsterm.m (run): Set timeout for event loop to prevent hang.
1740 (Bug#18993)
1741
1742 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
1743
1744 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
1745
1746 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1747
1748 * xfont.c (xfont_list_pattern): Do not allocate font entity object
1749 for each candidate font but attempt to reuse it from previous improper
1750 candidate, if any.
1751
1752 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
1753
1754 Avoid undefined behavior in color table hashing.
1755 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
1756 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
1757 This function avoids undefined behavior with signed shift overflow.
1758
1759 2014-11-10 Eli Zaretskii <eliz@gnu.org>
1760
1761 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
1762 when the inserted text does not need decoding. (Bug#18982)
1763
1764 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
1765
1766 * nsterm.h (EmacsScroller): judge returns bool.
1767
1768 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
1769 (ns_judge_scroll_bars): Only set removed if judge returns true.
1770 (judge): Returns bool == condemned. Remove self from window.
1771 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
1772
1773 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
1774
1775 * keyboard.c (command_loop_1): Record this-command in recent-keys.
1776 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
1777
1778 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
1779
1780 * nsterm.m (ns_set_vertical_scroll_bar)
1781 (ns_set_horizontal_scroll_bar): Cleanup merge error.
1782
1783 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
1784
1785 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
1786 merely because tmo_in_millisec is nonnegative. The 1st call
1787 to g_main_context_query could succeed while the 2nd one fails.
1788
1789 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
1790
1791 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1792
1793 * nsterm.m (run): Only use non-system event loop if OSX version is
1794 exactly 10.9 (Bug#18993).
1795 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
1796 needed (Bug#18757).
1797
1798 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1799
1800 * callproc.c (encode_current_directory): Support handling of file
1801 names prepended by "/:". (Bug#18891)
1802
1803 2014-11-08 Alan Mackenzie <acm@muc.de>
1804
1805 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
1806
1807 2014-11-08 Dima Kogan <dima@secretsauce.net>
1808
1809 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
1810
1811 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1812
1813 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
1814 raises an error. (Bug#18891)
1815
1816 2014-11-08 Martin Rudalics <rudalics@gmx.at>
1817
1818 * frame.c (adjust_frame_size): Call x_set_window_size only if
1819 f->can_x_set_window_size is set.
1820 (make_frame): Initialize f->can_x_set_window_size and
1821 f->can_run_window_configuration_change_hook.
1822 (Fcan_run_window_configuration_change_hook): New function.
1823 * frame.h (frame): Split `official' into `can_x_set_window_size'
1824 and `can_run_window_configuration_change_hook'.
1825 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
1826 * w32fns.c (Fx_create_frame, x_create_tip_frame):
1827 Set f->can_x_set_window_size.
1828 * window.c (run_window_configuration_change_hook):
1829 Return immediately if either f->can_x_set_window_size or
1830 f->can_run_window_configuration_change_hook are false.
1831 (Fset_window_configuration): Instead of f->official set
1832 f->can_x_set_window_size.
1833 * xfns.c (Fx_create_frame, x_create_tip_frame):
1834 Set f->can_x_set_window_size.
1835
1836 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1837
1838 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
1839 cleanup from 2014-11-01 (Bug#18972).
1840
1841 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
1842
1843 * keyboard.c: Call gui-set-selection instead of x-set-selection.
1844 * xdisp.c (window-scroll-functions): Improve docstring.
1845
1846 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
1847
1848 Uniquify the 'size' symbol.
1849 * frame.c (Qsize):
1850 * w32notify.c (Qsize): Remove.
1851 * lisp.h (Qsize): New decl.
1852 * lread.c (Qsize): Now extern.
1853 * w32notify.c (syms_of_w32notify): No need to defsym.
1854
1855 2014-11-07 Martin Rudalics <rudalics@gmx.at>
1856
1857 * dispnew.c (change_frame_size_1): Fix call of
1858 adjust_frame_size.
1859 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
1860 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1861 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1862 (Qtool_bar_size): New constants.
1863 (frame_inhibit_resize, adjust_frame_size): New argument to
1864 handle case where frame_inhibit_implied_resize is a list.
1865 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
1866 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
1867 (x_set_right_divider_width, x_set_bottom_divider_width)
1868 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
1869 (x_set_scroll_bar_width, x_set_scroll_bar_height):
1870 Update callers.
1871 (frame-inhibit-implied-resize): Rewrite doc-string.
1872 * frame.h (frame_inhibit_resize, adjust_frame_size):
1873 Fix external declarations.
1874 (Qframe_position, Qframe_outer_size)
1875 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1876 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1877 (Qtool_bar_size): Extern them.
1878 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
1879 (xg_height_or_width_changed): Remove.
1880 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
1881 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
1882 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
1883 (xg_change_toolbar_position): Call adjust_frame_size directly.
1884 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
1885 Fix calls of adjust_frame_size.
1886 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
1887 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
1888 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1889 frame can get resized when tool-bar-lines parameter changes from
1890 or to zero.
1891 (Fw32_frame_menu_bar_size): Return fourth value.
1892 (Fw32_frame_rect): Block input around system calls
1893 (Fx_frame_geometry): New function.
1894 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
1895 * w32term.c (x_new_font): Adjust adjust_frame_size call.
1896 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
1897 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
1898 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
1899 (Fx_create_frame): Adjust adjust_frame_size calls.
1900 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1901 frame can get resized when tool-bar-lines parameter changes from
1902 or to zero.
1903 (Fx_frame_geometry): New function.
1904 * xmenu.c (update_frame_menubar): On Lucid call
1905 adjust_frame_size with one pixel less height to avoid that
1906 repeatedly adding/removing the menu bar grows the frame.
1907 (free_frame_menubar): On Motif arrange to optionally preserve
1908 the old frame height when removing the menu bar.
1909 * xterm.c (x_new_font): Adjust adjust_frame_size call.
1910
1911 2014-11-03 Eli Zaretskii <eliz@gnu.org>
1912
1913 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
1914 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
1915 frame; instead, print an error message.
1916
1917 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
1918
1919 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
1920
1921 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
1922
1923 * nsimage.m (allocInitFromFile:): Initialize bmRep.
1924 (dealloc): Release bmRep.
1925
1926 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
1927 imageListSetNext, imageListNext.
1928
1929 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
1930 (reference): Remove.
1931 (allocInitFromFile:): Remove searching ImageList and calling
1932 reference (Bug#18918).
1933 (dealloc): Remove handling if ImageList.
1934
1935 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
1936
1937 * process.c (catch_child_signal): Fix incorrect assertion.
1938
1939 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1940
1941 * macfont.m (macfont_draw):
1942 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
1943
1944 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
1945 if force_integral_p (i.e. no antialias).
1946 (macfont_draw): Check ns_antialias_text, also turn off synthetic
1947 bold if no antialias (Bug#18876).
1948
1949 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
1950 was given (Bug#18846).
1951
1952 * nsterm.h (ns_set_doc_edited): Declare taking no args.
1953
1954 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
1955 instead of in xdisp.c, function now takes void. (Bug#18884).
1956
1957 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
1958 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
1959
1960 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
1961 struct window* (Bug#18889).
1962 Remove getMouseMotionPart.
1963 (ns_output): Make icon_top/left int.
1964
1965 * nsfns.m (x_icon): icon_top/left is int.
1966
1967 * nsterm.m (ns_mouse_position): Remove unused code.
1968 (initFrame:window:, dealloc): Use window instead of win.
1969 (getMouseMotionPart:window:x:y:): Remove, unused.
1970 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
1971
1972 2014-11-01 Eli Zaretskii <eliz@gnu.org>
1973
1974 * keyboard.c (readable_events): When FLAGS include
1975 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
1976 This avoids returning non-nil from input-pending-p when only such
1977 events are in the queue. (Bug#18856)
1978
1979 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1980
1981 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
1982 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
1983 (Qforeign_selection): Remove.
1984 (ns_get_local_selection): Identation fix.
1985 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
1986
1987 * nsselect.m (ns_get_local_selection): Remove calling of
1988 functions in Vselection_converter_alist (Bug#18911).
1989 (syms_of_nsselect): Remove Vselection_converter_alist.
1990
1991 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
1992
1993 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
1994 and unnecessary initialization. Adjust comments.
1995
1996 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1997
1998 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
1999 setting it to -1.
2000 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
2001 index, not an absolute one, as that's what the function expects.
2002
2003 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
2004
2005 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
2006 font on an initial frame when running as a daemon (Bug#18869).
2007
2008 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
2009
2010 2014-10-30 Eli Zaretskii <eliz@gnu.org>
2011
2012 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
2013 build_string, when importing a home directory. (Bug#18873)
2014
2015 2014-12-27 Eli Zaretskii <eliz@gnu.org>
2016
2017 * dispnew.c (buffer_posn_from_coords):
2018 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
2019 account for the header-line height. (Bug#18839)
2020
2021 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
2022
2023 * xml.c (parse_region): Do not forget the first document child.
2024
2025 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
2026
2027 * nsselect.m: pasteboard_changecount is new.
2028 (ns_store_pb_change_count, ns_get_pb_change_count)
2029 (ns_get_our_change_count_for): New functions.
2030 (ns_string_to_pasteboard_internal): Correct comment.
2031 type => gtype in eassert, Call ns_store_pb_change_count.
2032 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
2033 (Fns_disown_selection_internal, Fns_selection_owner_p):
2034 Replace Vselection_alist check, with change count check.
2035 (Fns_get_selection): Initialize val to Qnil. Only get local
2036 selection if change counts match (Bug#18799).
2037 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
2038
2039 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
2040
2041 * w32proc.c (create_child): If calling a quoted batch file,
2042 pass NULL for exe. (Bug#18745)
2043
2044 2014-10-24 Eli Zaretskii <eliz@gnu.org>
2045
2046 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
2047 (bidi_resolve_brackets): Use end of string position rather than ZV
2048 when iterating over a string. (Bug#18815)
2049
2050 2014-10-24 Martin Rudalics <rudalics@gmx.at>
2051
2052 * keyboard.c (make_lispy_position): Return coordinates also when
2053 on scroll bars, fringes, margins or not in a window.
2054 * xdisp.c (show_mouse_face): Don't change cursor face during
2055 mouse tracking.
2056
2057 2014-10-23 Martin Rudalics <rudalics@gmx.at>
2058
2059 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
2060 (frame_resize_pixelwise, frame_inhibit_implied_resize):
2061 Fix doc-strings (Bug#18789).
2062
2063 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
2064
2065 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
2066
2067 2014-10-22 Eli Zaretskii <eliz@gnu.org>
2068
2069 Optimize redisplay of simple bracketed text.
2070 * bidi.c (bidi_cache_reset_to): New function.
2071 (bidi_cache_reset): Call it.
2072 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
2073 member to -1.
2074 (bidi_resolve_explicit): Reset bracket_pairing_pos and
2075 bracket_enclosed_type only if bracket_pairing_pos's value is not
2076 ZV.
2077 (MAX_BPA_STACK): Make sure the value is signed.
2078 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
2079 stop pushing values onto the stack.
2080 (bidi_find_bracket_pairs): If the bracketed text is only on the
2081 base embedding level, remove all the states cached by this
2082 function from the cache, and return zero, so that the brackets in
2083 this segment of text are processed as normal neutrals.
2084 (bidi_resolve_brackets): Detect the brackets that are to be
2085 processed as neutrals, and don't call bidi_find_bracket_pairs on
2086 them. (Bug#18778)
2087
2088 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
2089
2090 * w32select.c (Fw32_selection_exists_p): Rename from
2091 Fx_selection_exists_p.
2092 (syms_of_w32select): Adjust accordingly.
2093
2094 * w16select.c (Fw16_selection_exists_p): Rename from
2095 Fx_selection_exists_p.
2096 (syms_of_win16select): Adjust accordingly.
2097
2098 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
2099 (Fns_own_selection_internal): Tighten scoping.
2100 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
2101 (Fns_get_selection): Rename from Fx_get_selection_internal.
2102 (Fns_get_selection_internal, Fns_store_selection_internal):
2103 Remove functions.
2104 (syms_of_nsselect): Adjust accordingly.
2105
2106 2014-10-21 Martin Rudalics <rudalics@gmx.at>
2107
2108 * w32fns.c (Fw32_frame_menu_bar_size): New function.
2109 * w32term.c (x_set_window_size): Account for wrapped menu bar
2110 lines when setting up frame height (Bug#15174 and Bug#18720).
2111 (w32_add_wrapped_menu_bar_lines): New variable.
2112
2113 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
2114
2115 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
2116 move point.
2117
2118 2014-10-20 Glenn Morris <rgm@gnu.org>
2119
2120 * Merge in all changes up to 24.4 release.
2121
2122 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
2123
2124 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
2125 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
2126
2127 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
2128
2129 * xterm.c (handle_one_xevent): Check return value from
2130 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
2131 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
2132
2133 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
2134 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
2135 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
2136 Gtk+ >= 3.14 (Bug#18674).
2137 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
2138 Gtk+ >= 3.14 (Bug#18674).
2139
2140 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
2141
2142 * gtkutil.c: Remove no-longer-used code.
2143 (xg_update_menubar): Remove unused local and unnecessary call to
2144 gtk_menu_item_get_submenu.
2145 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
2146 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
2147 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
2148
2149 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
2150
2151 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
2152
2153 * xterm.h (handlebox_widget): Remove.
2154
2155 * xmenu.c (set_frame_menubar): Remove GTK block that calls
2156 xg_have_tear_offs.
2157
2158 * gtkutil.h (xg_have_tear_offs): Remove declaration.
2159
2160 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
2161 to handle Gtk versions.
2162 (xg_get_file_with_chooser): Use them.
2163 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
2164 Remove (create_menus): Remove teroff argument and code.
2165 Remove call to gtk_menu_set_title.
2166 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
2167 Adjust args to create_menus.
2168 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
2169 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
2170 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
2171 (xg_make_tool_item): Remove detach code.
2172 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
2173 (find_icon_from_name): New function.
2174 (update_frame_tool_bar): Remove GtkStockItem code, move to
2175 find_icon_from_name. Let stock be a list of icon names to try.
2176 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
2177 Replace TOOLBAR_TOP_WIDGET.
2178 (free_frame_tool_bar, xg_change_toolbar_position ):
2179 Replace TOOLBAR_TOP_WIDGET.
2180 (xg_initialize): Remove tearoff code.
2181
2182 2014-10-18 Eli Zaretskii <eliz@gnu.org>
2183
2184 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
2185 pixel from the window's cursor glyph width, since X renders hollow
2186 blocks 1 pixel wider than the 'width' parameter.
2187
2188 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
2189 glyph->pixel_width; this is now done in xterm.c.
2190
2191 Fix reordering of bracket characters in isolates.
2192 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
2193 RESOLVED_ONLY; when non-zero, return from the cache only fully
2194 resolved states. All callers changed.
2195 (CANONICAL_EQU): New macro.
2196 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
2197 equivalent of the paired closing bracket character.
2198 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
2199 the default non-negative value, to be checked later in
2200 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
2201 characters against those pushed onto the BPA stack.
2202 (bidi_record_type_for_neutral): New function.
2203 (bidi_resolve_brackets): Record next_for_neutral and
2204 prev_for_neutral when embedding level gets pushed. Force
2205 resolution of bracket pairs when entering a level run that was not
2206 yet BPA-resolved.
2207 (bidi_resolve_neutral): Add assertions before calling
2208 bidi_resolve_neutral_1.
2209 (bidi_level_of_next_char): Remove the code that attempted to
2210 resolve unresolved neutrals; that is now done by
2211 bidi_resolve_neutral.
2212
2213 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
2214
2215 2014-10-17 Eli Zaretskii <eliz@gnu.org>
2216
2217 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
2218 1-pixel R2L characters.
2219 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
2220 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
2221
2222 2014-10-16 Eli Zaretskii <eliz@gnu.org>
2223
2224 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
2225 useful.
2226
2227 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
2228
2229 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
2230 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
2231 It's not clear to me whether the initialization is needed,
2232 but it can't hurt so I played it safe.
2233
2234 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
2235
2236 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
2237
2238 2014-10-15 Eli Zaretskii <eliz@gnu.org>
2239
2240 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
2241 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
2242 Remove variable.
2243 (bidi_get_type): Return the isolate initiators and terminator types.
2244 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
2245 (bidi_fetch_char_skip_isolates, find_first_strong_char)
2246 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
2247 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
2248 for the new features.
2249 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
2250 push and pop correctly for isolates.
2251 (bidi_remember_char): Modify to accept an additional argument
2252 and record the bidi type according to its value.
2253 (bidi_cache_iterator_state): Accept an additional argument to only
2254 update an existing state. Handle the new members of struct bidi_it.
2255 (bidi_cache_find): Arguments changed: no longer accepts a level,
2256 instead accepts a flag telling it whether it is okay to return
2257 unresolved neutrals.
2258 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
2259 table. Initialize new isolate-related members.
2260 (bidi_paragraph_init): Some code factored out into
2261 find_first_strong_char.
2262 (bidi_resolve_explicit_1): Function deleted, its code incorporated
2263 into bidi_resolve_explicit.
2264 (bidi_resolve_explicit): Support the isolate initiators and
2265 terminator. Fix handling of embeddings and overrides according to
2266 new UBA requirements. Record information about previously seen
2267 characters here (moved from bidi_level_of_next_char).
2268 (bidi_resolve_weak): Adapt to changes in struct members.
2269 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
2270 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
2271 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
2272 paired bracket resolution. Handle isolate initiators and
2273 terminator.
2274 (bidi_type_of_next_char): Remove unneeded code for BN limit.
2275 (bidi_level_of_next_char): Move the code that records information
2276 about previous characters to bidi_resolve_explicit. Fix logic of
2277 resolving neutrals and make sure their cache entries are updated.
2278 Remove now unneeded special handling of PDF level.
2279
2280 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
2281 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
2282 enlarged per Unicode 6.3.
2283 (enum bidi_bracket_type_t): New data type.
2284 (struct bidi_saved_info): Leave only 2 type members out of 4.
2285 Remove bytepos.
2286 (struct bidi_stack): Add members necessary to support isolating
2287 sequences.
2288 (struct bidi_it): Add new members necessary to support isolating
2289 sequences and bracket pair resolution.
2290
2291 * xdisp.c (Fbidi_resolved_levels): New function.
2292 (syms_of_xdisp): Defsubr it.
2293 (append_glyph, append_composite_glyph, produce_image_glyph)
2294 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
2295 assertions.
2296 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
2297
2298 * term.c (append_glyph, append_composite_glyph)
2299 (append_glyphless_glyph): Convert aborts to assertions.
2300
2301 * .gdbinit (pgx): Display the character codepoint, resolved level,
2302 and bidi type also for glyphless glyphs.
2303
2304 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
2305
2306 Avoid unwanted point motion in Fline_beginning_position.
2307 * lisp.h (scan_newline_from_point): Add prototype.
2308 * search.c (scan_newline_from_point): New function, refactored from...
2309 * cmds.c (Fforward_line): ...adjusted user.
2310 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
2311 and simplify the former since the latter doesn't move point.
2312
2313 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
2314
2315 Cleanup terminal handling code.
2316 * dispextern.h (get_named_tty): Remove prototype but...
2317 * termhooks.h (get_named_terminal): ...resurrect it under
2318 more meaningful name.
2319 (get_terminal): Likewise, but with...
2320 (decode_live_terminal): ...this name.
2321 (decode_tty_terminal): Add prototype.
2322 * term.c (get_tty_terminal): Remove.
2323 (get_named_tty): Remove.
2324 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
2325 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
2326 Use decode_tty_terminal.
2327 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
2328 * terminal.c (get_terminal): Refactor to...
2329 (decode_terminal, decode_live_terminal): ...new functions.
2330 (decode_tty_terminal): Replacement for get_tty_terminal.
2331 (get_named_terminal): Likewise for get_named_tty.
2332 * coding.c (Fset_terminal_coding_system_internal)
2333 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
2334 (Fkeyboard_coding_system):
2335 * composite.c (Fcomposition_get_gstring):
2336 * dispnew.c (Fsend_string_to_terminal):
2337 * frame.c (Fmake_terminal_frame):
2338 * nsfns.m (check_ns_display_info):
2339 * w32fns.c, xfns.c (check_x_display_info):
2340 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
2341 * keyboard.c (handle_interrupt_signal, handle_interrupt)
2342 (Fset_quit_char): Use get_named_terminal.
2343 (Fset_output_flow_control, Fset_input_meta_mode):
2344 Use decode_tty_terminal.
2345
2346 2014-10-13 Eli Zaretskii <eliz@gnu.org>
2347
2348 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
2349 between 32-bit and 64-bit MinGW builds. (Bug#18699)
2350
2351 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2352
2353 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
2354 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
2355
2356 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2357
2358 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
2359 (bug#18638).
2360
2361 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2362
2363 * editfns.c (dump_tz_string): No longer const.
2364 It might be modified.
2365
2366 * nsmenu.m (clear): Assume OS X 10.6 or later.
2367
2368 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
2369
2370 * unexmacosx.c: Remove include ppc/reloc.h.
2371 (unrelocate, copy_dysymtab): Remove PPC code.
2372 (rebase_reloc_address): Remove, only used for PPC:
2373
2374 * nsterm.m: Always include macfont.h on COCOA.
2375 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
2376 (ns_dumpglyphs_image, ns_check_menu_open)
2377 (applicationDidFinishLaunching)
2378 (antialiasThresholdDidChange:)
2379 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
2380 Remove checks for OSX <= 10.5/10.6.
2381 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
2382 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
2383 GNUSTEP.
2384
2385 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
2386 (NS_HAVE_NSINTEGER): Remove block.
2387 Remove >= OSX 10.6 tests.
2388
2389 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
2390 (x_activate_menubar, trackingNotification:): Remove check for
2391 OSX >= 10.5.
2392 (menuNeedsUpdate:): Remove check for OSX < 10.5.
2393
2394 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
2395
2396 * nsfns.m: Always include macfont.h on COCOA.
2397 (ns_filename_from_panel, ns_directory_from_panel)
2398 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
2399 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
2400
2401 * macfont.m: Remove >= 1050 check.
2402 (macfont_create_family_with_symbol)
2403 (macfont_get_glyph_for_character)
2404 (mac_font_get_glyphs_for_variants)
2405 (mac_ctfont_create_available_families, syms_of_macfont):
2406 Remove code for OSX < 10.6.
2407 (mac_font_family_group, mac_font_family_compare): Remove, only used
2408 for OSX < 10.6.
2409
2410 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
2411 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
2412
2413 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
2414 comment.
2415
2416 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2417
2418 Fix putenv race conditions with undefined behavior (Bug#8705).
2419 Do all putenv calls before Emacs creates any threads.
2420 Use a safer way to modify the TZ environment variable in the
2421 presence of multiple threads. For further thread-safety,
2422 prefer localtime_r and gmtime_r to localtime and gmtime,
2423 and prefer struct tm's tm_gmtoff (if available) to calling
2424 both localtime_r and gmtime_r.
2425 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
2426 (init_dbusbind): ... to this new function.
2427 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
2428 * xterm.c (x_term_init): Move xputenv call from here ...
2429 (init_xterm): ... to this new function.
2430 * emacs.c (main) [USE_GTK]: Call it before creating threads.
2431 * editfns.c (HAVE_TM_GMTOFF): Default to false.
2432 (dump_tz_string): New constant.
2433 (init_editfns): Use it. This centralizes the dump_tz stuff.
2434 Call set_time_zone_rule here, so that its xputenv is done
2435 before Emacs goes multithreaded.
2436 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
2437 thread-safe enough for Emacs.
2438 (format_time_string, Fdecode_time, Fcurrent_time_string)
2439 (Fcurrent_time_zone):
2440 Prefer localtime_r and gmtime_r, which are more thread-safe, to
2441 localtime and gmtime. Remove now-unnecessary calls to block_input.
2442 (tm_gmtoff): New static function.
2443 (Fdecode_time, Fcurrent_time_zone): Use it.
2444 (Fencode_time): Use mktime_z, for better thread-safety.
2445 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
2446 i.e., not quite thread-safe but good enough for Emacs typical usage.
2447 Do not reclaim storage that is in the environment; let it leak.
2448 Always call tzset, since localtime_r does not.
2449 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
2450 This is now done in init_editfns.
2451 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
2452 New macros and declarations, for platforms lacking tzalloc & friends.
2453
2454 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
2455
2456 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
2457 On x86 platforms this works around GCC bug 63495
2458 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
2459 and more generally should fix a portability problem in Emacs.
2460 Reported by Stefan Monnier in:
2461 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
2462
2463 2014-10-08 Leo Liu <sdl.web@gmail.com>
2464
2465 Enhance terpri to allow conditionally output a newline. (Bug#18652)
2466 * keymap.c (describe_vector_princ):
2467 * keyboard.c (Fcommand_error_default_function): Adapt to change to
2468 Fterpri.
2469
2470 * print.c (printchar_stdout_last): Declare.
2471 (printchar): Record the last char written to stdout.
2472 (Fterpri): Add optional argument ENSURE.
2473
2474 2014-10-08 Eli Zaretskii <eliz@gnu.org>
2475
2476 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
2477 DELAY argument to change_frame_size, so that the frame size
2478 changes, if any are needed, are delayed until the next redisplay.
2479 This is to avoid a too early QUIT inside change_frame_size, when
2480 it calls Lisp in frame_windows_min_size, in case one of the events
2481 we've read sets the quit-flag. (Bug#18649)
2482
2483 * w32fns.c (check_x_display_info): Accept terminal objects as
2484 argument, to follow what xfns.c does.
2485
2486 2014-10-07 Glenn Morris <rgm@gnu.org>
2487
2488 * Makefile.in ($(srcdir)/macuvs.h)
2489 ($(lispsource)/international/charprop.el): Add explicit FORCE.
2490
2491 2014-10-07 Eli Zaretskii <eliz@gnu.org>
2492
2493 * decompress.c (init_zlib_functions): Move the message about zlib
2494 being unavailable from here...
2495 (Fzlib_decompress_region): ...to here. (Bug#18650)
2496
2497 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
2498
2499 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
2500 the case where an optional string is used. Adjust docstring.
2501
2502 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
2503
2504 * lisp.mk (lisp): Remove w32-common-fns.elc.
2505
2506 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
2507
2508 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
2509 These were already defined in buffer.c, and the duplicate
2510 definitions cause problems on platforms like 'gcc -fno-common'.
2511 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
2512
2513 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
2514
2515 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
2516 if toolbar is visible.
2517
2518 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
2519 0.23 (Bug#18030).
2520
2521 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
2522 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
2523 (ns_select, ns_read_socket): Use unwind_protect to decrease
2524 apploopnr (Bug#18345).
2525 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
2526 line height (Bug#17977).
2527
2528 * macfont.m: Fix indentation and import changes from macport 24.3.94.
2529 (macfont_closest_traits_index): New function.
2530 (macfont_closest_traits_index_p): Rename from
2531 macfont_closest_traits_index.
2532 (macfont_list): Use macfont_closest_traits_index_p.
2533
2534 2014-10-05 K. Handa <handa@gnu.org>
2535
2536 * coding.c (detect_coding_iso_2022): Set coding->rejected
2537 correctly when an invalid escape sequence is found (Bug#18610).
2538
2539 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
2540
2541 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
2542 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
2543 for add_tearoff_p.
2544
2545 2014-10-04 Martin Rudalics <rudalics@gmx.at>
2546
2547 * buffer.c (scroll_bar_width, scroll_bar_height):
2548 Fix doc-strings.
2549 * window.c (Fset_window_scroll_bars): Fix doc-string.
2550 (Fwindow_scroll_bars): Have it return what the doc-string says.
2551
2552 2014-10-03 Eli Zaretskii <eliz@gnu.org>
2553
2554 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
2555 iterator backwards, to resync the bidi iterator. (Bug#18584)
2556
2557 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
2558
2559 Consistently use min and max macros from lisp.h.
2560 * coding.c (min, max):
2561 * font.c (MAX):
2562 * unexhp9k800.c (min):
2563 * unexw32.c (min, max): Use definitions from lisp.h.
2564 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
2565 Adjust users.
2566 * gmalloc.c (min): Tiny style change.
2567
2568 * fileio.c (emacs_readlinkat, Finsert_file_contents):
2569 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
2570
2571 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
2572
2573 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
2574 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
2575 (X_ULONG_MAX): Move these macros to xterm.h.
2576 (x_fill_property_data): Be more generous about allowing either
2577 signed or unsigned data of the appropriate width.
2578 * xterm.h (x_display_set_last_user_time): New function.
2579 All setters of last_user_time changd to use this function.
2580 If ENABLE_CHECKING, check that the times are in range.
2581
2582 2014-10-02 Eli Zaretskii <eliz@gnu.org>
2583
2584 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
2585 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2586
2587 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
2588
2589 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
2590 make a font_object from a tty frame (Bug#18573).
2591 (Finternal_set_lisp_face_attribute): Add FIXME comment.
2592
2593 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
2594
2595 * alloc.c (mark_overlay): Assume that overlay boundaries are
2596 always markers. Add comment.
2597 * lread.c (read_internal_start): Use convenient validate_subarray.
2598 Adjust docstring.
2599 (Fread_from_string): Adjust docstring.
2600
2601 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2602
2603 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
2604
2605 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
2606 Rename from the "x-" prefix.
2607
2608 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2609
2610 * xselect.c (selection-converter-alist): Fix docstring.
2611
2612 2014-10-01 Eli Zaretskii <eliz@gnu.org>
2613
2614 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
2615 argument passed by the caller, when we mirror all slashes into
2616 backslashes.
2617
2618 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
2619
2620 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
2621 Resurrect old code and fix compilation with GTK < 2.13.6.
2622
2623 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
2624
2625 Use AUTO_CONS instead of SCOPED_CONS, etc.
2626 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
2627 * lisp.h (AUTO_CONS): Rename from scoped_cons.
2628 (AUTO_LIST1): Rename from scoped_list1.
2629 (AUTO_LIST2): Rename from scoped_list2.
2630 (AUTO_LIST3): Rename from scoped_list3.
2631 (AUTO_LIST4): Rename from scoped_list4.
2632 (AUTO_STRING): Rename from SCOPED_STRING.
2633 * frame.h (AUTO_FRAME_ARG):
2634 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
2635 (AUTO_LIST4, AUTO_STRING):
2636 Prepend a new argument 'name'.
2637 Declare a variable instead of yielding a value.
2638 All uses changed.
2639 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
2640
2641 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2642
2643 * w32fns.c (w32_createwindow): Accept an additional argument, an
2644 array of 2 values specifying the coordinates of the frame's
2645 top-left corner. Use these values instead of calling x_get_arg,
2646 which can cons Lisp objects, and therefore cannot be called except
2647 from the main thread. Remove redundant tests for the default
2648 values.
2649 (my_create_window): Move the calculation of the coordinates of the
2650 frame's top-left edge here. Pass them to the input thread via the
2651 second parameter of the WM_EMACS_CREATEWINDOW message.
2652 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
2653 for the details.
2654
2655 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2656
2657 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
2658 (redisplay_window): Treat the frame's frozen_window_starts flag
2659 the same way as the optional_new_start flag for the window: only
2660 obey it if the glyph row showing point will be fully visible.
2661 Likewise when the window start is in a continuation line. If,
2662 after trying everything under the 'force_start' label, point is
2663 still not fully visible, give up and scroll the window.
2664 Add debugging traces. (Bug#18545)
2665
2666 * window.c (Frecenter): Set the window's redisplay flag.
2667
2668 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2669
2670 * w32term.c (w32_read_socket): Don't use frame dimensions for
2671 resizing if GetClientRect returned an empty (0, 0, 0, 0)
2672 rectangle. Check the return value of GetClientRect, and don't use
2673 the results if it didn't succeed.
2674
2675 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
2676 in columns and lines after correcting the pixel dimensions in
2677 check_frame_size.
2678 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
2679 negative values to xrealloc. (Bug#18528)
2680
2681 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
2682
2683 * alloc.c: Remove now-unnecessary check.
2684 Suggested by Dmitry Antipov in:
2685 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
2686
2687 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
2688
2689 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
2690 to Ubuntu 14.04.1 x86-64.
2691
2692 Simplify stack-allocated Lisp objects, and make them more portable.
2693 The build_local_string macro was used in two ways: (1) string
2694 literals for which scoped allocation suffices, and (2) file name
2695 components, where it's not safe in general to assume bounded-size
2696 ASCII data. Simplify by defining a new macro SCOPED_STRING that
2697 allocates a block-scope string, and by using SCOPED_STRING for (1)
2698 and build_string for (2). Furthermore, actually use stack
2699 allocation only for objects known to have sufficient alignment.
2700 This simpler implementation means Emacs can make
2701 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
2702 GC_MAKE_GCPROS_NOOPS.
2703 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
2704 for fewer differences among implementations.
2705 (struct Lisp_String): Now GCALIGNED.
2706 (USE_STACK_LISP_OBJECTS): Default to true, since the
2707 implementation no longer insists on a nonempty GCALIGNED.
2708 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
2709 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
2710 separately. Move definiens to scoped_cons. The old definition
2711 was incorrect when GCALIGNED was defined to be empty.
2712 (union Aligned_String): New type.
2713 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
2714 implementation ports to compilers that don't align strictly enough.
2715 Don't worry about the union sizes; it's not worth bothering about.
2716 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
2717 Rewrite using USE_STACK_CONS.
2718 (scoped_cons): Assume the use of union Aligned_Cons.
2719 (lisp_string_size, make_local_string, build_local_string): Remove.
2720 Unless otherwise specified, all callers of build_local_string
2721 changed to use SCOPED_STRING.
2722 (SCOPED_STRING): New macro.
2723 * data.c (wrong_choice):
2724 * menu.c (single_menu_item):
2725 * process.c (Fformat_network_address):
2726 Hoist use of SCOPED_STRING out of a scope, so that its returned
2727 object lives long enough.
2728 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
2729 as the string might be long or might not be ASCII.
2730
2731 2014-09-29 Eli Zaretskii <eliz@gnu.org>
2732
2733 * msdos.c (internal_terminal_init): Bump version to 25.
2734
2735 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
2736
2737 Keep stack-allocated Lisp objects fast rather than versatile.
2738 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
2739 (SCOPED_CONS_INITIALIZER): New macro.
2740 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
2741 (USE_LOCAL_ALLOCA): Remove.
2742 (local_cons, local_list1, local_list2, local_list3, local_list4):
2743 Remove. Stack overflow checking makes them too slow.
2744 (make_local_vector): Likewise. Also we just don't have enough
2745 users for it.
2746 (enum LISP_STRING_OVERHEAD): Remove.
2747 (local_string_init, local_vector_init): Remove prototypes.
2748 (make_local_string, build_local_string): Redesign to target short
2749 compile-time string constants, fall back to regular string allocation
2750 where appropriate.
2751 (lisp_string_size): New function.
2752 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
2753 * alloc.c (local_string_init, local_vector_init): Remove.
2754 (verify_ascii) [ENABLE_CHECKING]: New function.
2755 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
2756 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
2757 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
2758 * xselect.c, xterm.c: All related users changed.
2759
2760 2014-09-28 Ken Brown <kbrown@cornell.edu>
2761
2762 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
2763 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
2764
2765 2014-09-27 Ken Brown <kbrown@cornell.edu>
2766
2767 Fix implementation of HYBRID_MALLOC on Cygwin.
2768 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
2769 (bss_sbrk_buffer_beg): New variable. Use it...
2770 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
2771 incorrect definition.
2772
2773 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
2774
2775 * keyboard.c (track-mouse): Rename to internal--track-mouse.
2776 Make it into a function and change arg to be a function.
2777
2778 * lisp.mk (lisp): Add elisp-mode.elc.
2779
2780 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
2781
2782 * xfns.c (x_default_scroll_bar_color_parameter):
2783 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
2784 to pacify --enable-gcc-warnings in non-scrollbar builds.
2785
2786 2014-09-26 Ken Brown <kbrown@cornell.edu>
2787
2788 * w32term.h (ALIGN_STACK): Fix the cpp condition.
2789
2790 2014-09-25 Eli Zaretskii <eliz@gnu.org>
2791
2792 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
2793 MinGW builds that use GCC before 4.2.
2794
2795 Default to stack objects on DOS_NT platforms as well.
2796 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
2797 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
2798
2799 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
2800
2801 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
2802 ALIGN_STACK attribute.
2803
2804 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
2805
2806 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
2807 ALIGN_STACK attribute.
2808
2809 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
2810 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
2811
2812 2014-09-25 Martin Rudalics <rudalics@gmx.at>
2813
2814 * frame.c (frame_inhibit_resize):
2815 * widget.c (EmacsFrameResize):
2816 * window.c (resize_frame_windows, Fset_window_configuration):
2817 * xdisp.c (expose_frame):
2818 * xfns.c (x_change_tool_bar_height):
2819 * xmenu.c (update_frame_menubar):
2820 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
2821 Remove code left dead after 2014-07-27 changes.
2822
2823 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
2824
2825 Fix local_cons etc. to not exhaust the stack when in a loop.
2826 Problem reported in:
2827 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
2828 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2829 * charset.c (load_charset_map_from_file, Ffind_charset_region)
2830 (Ffind_charset_string):
2831 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
2832 * data.c (wrong_range):
2833 * editfns.c (Fpropertize, format2):
2834 * emacs.c (init_cmdargs, decode_env_path):
2835 * fileio.c (auto_save_error):
2836 * fns.c (Fyes_or_no_p):
2837 * font.c (font_style_to_value, font_parse_xlfd)
2838 (font_parse_family_registry, font_delete_unmatched)
2839 (font_add_log):
2840 * fontset.c (Fset_fontset_font):
2841 * frame.c (x_get_arg):
2842 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
2843 (read_char_minibuf_menu_prompt):
2844 * keymap.c (silly_event_symbol_error, describe_vector):
2845 * lread.c (load_warn_old_style_backquotes):
2846 * menu.c (single_menu_item):
2847 * minibuf.c (Fread_buffer):
2848 * process.c (status_message, Fformat_network_address)
2849 (server_accept_connection):
2850 * textprop.c (copy_text_properties):
2851 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2852 * xfns.c (x_default_scroll_bar_color_parameter):
2853 * xfont.c (xfont_open):
2854 * xselect.c (x_clipboard_manager_error_1):
2855 * xterm.c (x_term_init):
2856 Put USE_LOCAL_ALLOCA at the start of the function.
2857 * fns.c (maybe_resize_hash_table): Use build_string instead of
2858 build_local_string, since we'd otherwise need a conditional
2859 USE_LOCAL_ALLOCA here, but this is just debugging output and is
2860 not worth the bother of optimization.
2861 * font.c (font_delete_unmatched): Remove by-hand code that
2862 observed MAX_ALLOCA limit, since it's now done automatically.
2863 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
2864 since build_local_string needs its sa_alloc.
2865 * lisp.h (lisp_word_count): New function.
2866 (SAFE_ALLOCA_LISP): Use it.
2867 (USE_LOCAL_ALLOCA): New macro.
2868 (local_cons, make_local_vector, make_local_string):
2869 Observe the MAX_ALLOCA limit.
2870 (LISP_STRING_OVERHEAD): New constant.
2871 (make_local_string): Use it.
2872
2873 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2874
2875 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
2876 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
2877 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
2878 and Solaris and it's likely to work on similar platforms.
2879
2880 Avoid signed integer overflow when converting Time to ptrdiff_t.
2881 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
2882 New macros.
2883 (position_to_Time, Time_to_position): New functions.
2884 (gen_help_event, kbd_buffer_get_event): Use them.
2885 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
2886 Go back to plain 'unsigned long', so that 'Time' is the same
2887 for both X and non-X builds; this is less likely to cause surprise.
2888 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
2889 are the same size; this is no longer required.
2890
2891 * keyboard.c (make_lispy_event): Avoid unnecessary tests
2892 of bit 28 and of whether an unsigned value is negative.
2893 This simplifies the code a bit, and pacifies clang 3.4.
2894
2895 2014-09-24 Eli Zaretskii <eliz@gnu.org>
2896
2897 * systime.h (Time): Define as size_t, to be consistent with 64-bit
2898 Windows builds, where 'long' is a 32-bit type.
2899
2900 * w32inevt.h (w32_console_mouse_position): Update the argument
2901 types to use 'Time'.
2902
2903 * w32term.c (w32_mouse_position)
2904 (x_horizontal_scroll_bar_report_motion)
2905 (x_scroll_bar_report_motion): Update the argument types to use
2906 'Time'.
2907
2908 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
2909
2910 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
2911 (struct input_event): ...unsigned bitfields. Likewise for
2912 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
2913 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
2914 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
2915 (kbd_buffer_get_event): Adjust users.
2916 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
2917 (make_scroll_bar_position): New function, refactored out of...
2918 (make_lispy_event): ...adjusted user.
2919 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
2920 * nsterm.m (ns_mouse_position, mouseUp):
2921 * term.c (term_mouse_position):
2922 * w32inevt.c (w32_console_mouse_position):
2923 * w32term.c (w32_mouse_position):
2924 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
2925 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
2926 Prefer enum and explicit enum members to integers and numeric values.
2927
2928 * chartab.c (uniprop_encode_value_numeric):
2929 * font.c (font_style_to_value): Use make_local_vector.
2930 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
2931 * keymap.c (append_key): Use scoped_list1.
2932
2933 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
2934 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
2935
2936 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2937
2938 Fix some slow uses and misuses of strcat.
2939 * doc.c (get_doc_string):
2940 * gtkutil.c (get_utf8_string):
2941 * xsmfns.c (x_session_initialize):
2942 Avoid recomputation of string length.
2943 * ftfont.c (ftfont_spec_pattern):
2944 * xfns.c (xic_create_fontsetname):
2945 Don't assume output buffer is initially zero.
2946
2947 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2948
2949 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
2950 All callers changed.
2951 * xterm.c (x_term_init): Use new functionality to avoid two needs
2952 to compute a string length.
2953
2954 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
2955
2956 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
2957
2958 Use known length of a Lisp string to copy it faster.
2959 * lisp.h (lispstrcpy): New function. Add comment.
2960 * callproc.c (child_setup):
2961 * dbusbind.c (xd_append_arg):
2962 * doc.c (get_doc_string):
2963 * font.c (Ffont_xlfd_name):
2964 * frame.c (xrdb_get_resource):
2965 * process.c (Fmake_network_process, network_interface_info):
2966 * w32fns.c (Fx_open_connection):
2967 * w32proc.c (sys_spawnve):
2968 * xfns.c (select_visual):
2969 * xfont.c (xfont_list):
2970 * xsmfns.c (x_session_initialize):
2971 * xterm.c (x_term_init): Use it.
2972
2973 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2974
2975 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
2976 Reported by Dmitry Antipov in thread leading to:
2977 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
2978 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
2979 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
2980 remain unfixed.
2981 * callproc.c (call_process): Save and restore sa_avail.
2982 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
2983 (AVAIL_ALLOCA): New macro.
2984 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
2985 Use it, and check against sa_avail rather than MAX_ALLOCA.
2986
2987 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2988
2989 On OSX, do not free font-specific data more than once (Bug#18501).
2990 * macfont.m (macfont_close): Release and free font-specific data
2991 only if it wasn't previously freed.
2992
2993 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
2994
2995 * unexmacosx.c (dump_it): Improve error message.
2996
2997 2014-09-22 Juri Linkov <juri@jurta.org>
2998
2999 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
3000 (Bug#10747, bug#18334)
3001
3002 2014-09-22 Eli Zaretskii <eliz@gnu.org>
3003
3004 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
3005 units in which the position is measured. (Bug#18493)
3006
3007 * xdisp.c (redisplay_internal): Force redisplay of all windows
3008 that show a buffer whose narrowing has changed. (Bug#18490)
3009
3010 2014-09-22 Eli Zaretskii <eliz@gnu.org>
3011
3012 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
3013 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
3014 lines, draw the hollow-box and hbar cursors on the right side of
3015 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
3016 testing on X.
3017
3018 * xterm.c (x_draw_stretch_glyph_string):
3019 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
3020 caused the block cursor to disappear on a TAB in R2L lines in
3021 every window except the leftmost one. Reported by Martin Rudalics
3022 <rudalics@gmx.at>.
3023
3024 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
3025
3026 Always use matched specpdl entry to record call arguments (Bug#18473).
3027 * lisp.h (record_in_backtrace): Adjust prototype.
3028 * eval.c (record_in_backtrace): Return current specpdl level.
3029 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
3030 (eval_sub, Ffuncall): Record call arguments in matched specpdl
3031 entry and use that entry in call to backtrace_debug_on_exit.
3032 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
3033 (do_debug_on_call): Get current specpdl level as 2nd arg.
3034
3035 Prefer ptrdiff_t to int and avoid integer overflows.
3036 * fileio.c (make_temp_name):
3037 * font.c (font_parse_family_registry): Avoid integer
3038 overflow on string size calculation.
3039 * data.c (Faset): Likewise for byte index.
3040
3041 2014-09-22 Eli Zaretskii <eliz@gnu.org>
3042
3043 Fix display of R2L lines in partial-width windows.
3044 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
3045 assigned the correct value.
3046 (extend_face_to_end_of_line): Account for truncation and
3047 continuation glyphs in R2L rows when one of the fringes is not
3048 displayed.
3049 (display_line): Don't assign negative X offset to a row if we are
3050 going to produce a truncation glyph for it. When handling
3051 truncated R2L rows, consider the width of the left fringe instead
3052 of the right one.
3053 (produce_special_glyphs): Fix bogus assignments.
3054
3055 2014-09-22 Eli Zaretskii <eliz@gnu.org>
3056
3057 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
3058 always set to a valid value. Make sure the size passed to alloca
3059 is always positive. (Bug#18516)
3060
3061 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
3062
3063 Avoid extra call to oblookup when interning symbols.
3064 * lisp.h (intern_driver): Add prototype.
3065 * lread.c (intern_driver): New function.
3066 (intern1, intern_c_string_1, Fintern):
3067 * font.c (font_intern_prop):
3068 * w32font.c (intern_font_name): Use it.
3069
3070 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
3071
3072 Minor improvements to new stack-allocated Lisp objects.
3073 * frame.h (FRAME_PARAMETER):
3074 Prefer scoped_list1 to local_list1 where either would do.
3075 * lisp.h (scoped_list4): New macro.
3076 (local_cons, local_list1, local_list2, local_list3, local_list4)
3077 (make_local_vector, make_local_string, build_local_string):
3078 Prefer functions to macros where either would do.
3079 * xdisp.c (build_desired_tool_bar_string):
3080 Prefer scoped_list4 to local_list4 where either would do.
3081
3082 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
3083
3084 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
3085 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
3086 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
3087 * frame.h (FRAME_PARAMETER): New macro.
3088 * dispnew.c (init_display):
3089 * fontset.c (Fset_fontset_font):
3090 * frame.c (x_default_parameter):
3091 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
3092 * xfns.c (x_default_scroll_bar_color_parameter)
3093 (x_default_font_parameter, x_create_tip_frame): Use it.
3094 * editfns.c (Fpropertize): Use local_cons.
3095 * process.c (status_message): Use build_local_string.
3096 * xfont.c (xfont_open): Use make_local_string.
3097 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
3098
3099 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
3100
3101 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
3102 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
3103 !__clang__. This works with GCC and with clang and is safer for
3104 compilers we don't know about.
3105 (local_cons): Rename parameter to make capture less likely.
3106
3107 2014-09-17 Samuel Bronson <naesten@gmail.com>
3108
3109 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
3110
3111 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
3112
3113 Fix minor problems found by static checking.
3114 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
3115 Remove; now unused.
3116 * buffer.h (decode_buffer): Doc and indentation fixes.
3117 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
3118
3119 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
3120
3121 Avoid clang-specific warnings.
3122 * buffer.c (init_buffer): Shut up -Wself-assign.
3123 * process.c (server_accept_connection): Shut up -Wunsequenced.
3124
3125 2014-09-16 Daniel Colascione <dancol@dancol.org>
3126
3127 * fns.c (sxhash): For symbols, use address as hash code.
3128
3129 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
3130
3131 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
3132 * charset.c (load_charset_map_from_file): Use scoped_list2
3133 and build_local_string.
3134 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
3135 * emacs.c (init_cmdargs, decode_env_path):
3136 * fileio.c (Fexpand_file_name):
3137 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
3138 * frame.c (x_get_arg):
3139 * keyboard.c (safe_run_hooks_error):
3140 * lread.c (load_warn_old_style_backquotes):
3141 * xdisp.c (Fcurrent_bidi_paragraph_direction):
3142 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
3143 * xselect.c (x_clipboard_manager_error_1)
3144 (x_clipboard_manager_save_all):
3145 * xterm.c (x_term_init): Use build_local_string.
3146
3147 Avoid more integer overflows on string size calculations.
3148 * category.c (Fmake_category_set):
3149 * xdisp.c (get_overlay_arrow_glyph_row):
3150 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
3151
3152 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3153
3154 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
3155 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
3156 error message format. Use message_with_string to have non-ASCII
3157 file names properly displayed.
3158 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
3159 when w32-unicode-filenames is non-nil, but not on Windows 9X,
3160 where these APIs are not available even in UNICOWS.DLL.
3161 Improve the format of error messages and include the file name in them
3162 where appropriate.
3163 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
3164 call play-sound-functions, per documentation.
3165
3166 * w32.c (w32_get_long_filename, w32_get_short_filename):
3167 Constify the input file name arguments.
3168
3169 * w32.h (w32_get_long_filename, w32_get_short_filename):
3170 Update prototypes.
3171
3172 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
3173
3174 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
3175 * lisp.h (local_cons, local_list1, local_list2, local_list3)
3176 [USE_LOCAL_ALLOCATORS]: New macros.
3177 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
3178 (build_local_string): Avoid argument name expansion clash with
3179 make_local_string.
3180 * alloc.c (toplevel)
3181 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
3182 Preprocessor guard to avoid impossible configuration.
3183 * charset.c (Ffind_charset_region, Ffind_charset_string):
3184 Use make_local_vector.
3185 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
3186 * textprop.c (Fput_text_property, Fadd_face_text_property):
3187 Use scoped_list2.
3188 (copy_text_properties): Use local_cons and local_list3.
3189 * chartab.c (uniprop_table):
3190 * data.c (wrong_choice, wrong_range):
3191 * doc.c (get_doc_string):
3192 * editfns.c (format2):
3193 * fileio.c (Fexpand_file_name, auto_save_error):
3194 * fns.c (Fyes_or_no_p):
3195 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
3196 * fontset.c (Fset_fontset_font):
3197 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
3198 (read_char_minibuf_menu_prompt):
3199 * keymap.c (silly_event_symbol_error, describe_vector):
3200 * menu.c (single_menu_item):
3201 * minibuf.c (Fread_buffer):
3202 * process.c (status_message, Fformat_network_address)
3203 (server_accept_connection): Use make_local_string and
3204 build_local_string. Prefer compound literals where appropriate.
3205
3206 2014-09-15 Daniel Colascione <dancol@dancol.org>
3207
3208 * fns.c (Fsort): Tweak sort docstring.
3209
3210 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3211
3212 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
3213 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
3214 set errno to EAGAIN instead, to allow the caller to retry the
3215 write after some waiting. Fixes deadlocks when Emacs exchanges a
3216 lot of data through the pipe. (Bug#18420)
3217
3218 * sound.c (Fplay_sound_internal): Encode the sound file name in
3219 the ANSI codepage. Expand it against data-directory, as per docs,
3220 not against the current directory. No need to make a local copy
3221 of the file name; pass the encoded file name directly to
3222 do_play_sound. (Bug#18463)
3223
3224 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
3225 NULL, and the file name is not encodable in ANSI codepage, return
3226 the string with "?" replacement characters, which will fail the
3227 caller. This avoids returning a random value in that case.
3228
3229 2014-09-15 Martin Rudalics <rudalics@gmx.at>
3230
3231 * window.c (Fresize_mini_window_internal): Set w->total_lines
3232 from w->pixel_height (Bug#18422).
3233
3234 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
3235
3236 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
3237 (toggleFullScreen:): Take frame_resize_pixelwise into account when
3238 setting resize increments (Bug#18435).
3239
3240 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3241
3242 * xdisp.c (pos_visible_p): Properly save and restore the iterator
3243 state around the call to line_bottom, since it can move the
3244 iterator to another screen line. This fixes off-by-one errors in
3245 the reported row in some rare cases.
3246
3247 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
3248
3249 * callproc.c (init_callproc): Fix bug introduced at
3250 2014-09-07 (Bug#18474).
3251
3252 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3253
3254 Prefer ptrdiff_t to int and avoid integer overflows.
3255 * fileio.c (make_temp_name):
3256 * font.c (font_parse_family_registry): Avoid integer
3257 overflow on string size calculation.
3258 * data.c (Faset): Likewise for byte index.
3259
3260 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
3261
3262 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
3263
3264 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3265
3266 * lisp.h (make_local_string): Nitpick indent.
3267 * print.c (Fprin1_to_string): Remove unused GCPROs.
3268
3269 More debugging aids around GCPROs.
3270 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
3271 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
3272 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
3273
3274 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
3275 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
3276
3277 Remove redundant GCPROs around Ffuncall and Fapply calls.
3278 This is safe because Ffuncall protects all of its arguments by itself.
3279 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
3280 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
3281 (call6, call7): Likewise. Use compound literals where applicable.
3282 (run_hook_with_args_2): Use compound literal.
3283
3284 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
3285
3286 Pacify --enable-gcc-warnings when no window system is used.
3287 These warnings found that subscript error, so they seem worthwhile.
3288 * composite.c (char_composable_p): Simplify a bit.
3289 * frame.c (x_set_frame_parameters): Add an IF_LINT.
3290 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
3291 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
3292 * window.c (set_window_scroll_bars):
3293 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
3294 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
3295 Ignore -Wsuggest-attribute=const.
3296 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
3297 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
3298
3299 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
3300
3301 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
3302 Use check_iso_charset_parameter instead of doing the checks by hand.
3303 (check_iso_charset_parameter): Move up. Check parameters a bit
3304 more carefully, and return true for 96-char sets. All callers changed.
3305
3306 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3307
3308 Simplify lisp.h by removing the __COUNTER__ business.
3309 Reported by Dmitry Antipov in:
3310 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
3311 * lisp.h (make_local_vector, make_local_string)
3312 (build_local_string): Simplify by not bothering with __COUNTER__.
3313 The __COUNTER__ business wasn't working properly, and was needed
3314 only for hypothetical future expansion anyway.
3315
3316 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
3317
3318 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
3319 terms to determine bitmap color. (Bug#18437)
3320
3321 2014-09-10 Eli Zaretskii <eliz@gnu.org>
3322
3323 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
3324 translation buffer.
3325
3326 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3327
3328 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
3329
3330 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
3331
3332 * xterm.c (handle_one_xevent): Detect iconified by looking at
3333 _NET_WM_STATE_HIDDEN.
3334
3335 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3336
3337 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
3338 These can generate a constant with the correct value but the wrong
3339 width, which doesn't work as a printf argument. All uses removed.
3340 Reported by Dmitry Antipov in:
3341 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
3342 (ENUMABLE): Remove; no longer needed.
3343 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
3344 Remove; no longer needed because of the above change.
3345 Each definiens moved to the only use.
3346
3347 Improve the experimental local and scoped allocation.
3348 * alloc.c (local_string_init, local_vector_init):
3349 New functions, defined if USE_LOCAL_ALLOCATORS.
3350 Mostly, these are moved here from lisp.h, as it's not
3351 clear it's worth making them inline.
3352 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
3353 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
3354 USE_STACK_LISP_OBJECTS, not on a laundry list.
3355 (local_string_init, local_vector_init): New decls.
3356 (union Aligned_Cons): New type.
3357 (scoped_cons): Use it. Give up on the char trick, as it's a too
3358 much of a maintenance hassle; if someone wants this speedup
3359 they'll just need to convince their compiler to align properly.
3360 Conversely, use the speedup if struct Lisp_Cons happens to
3361 be aligned even without a directive. Better yet, help it along
3362 by using union Aligned_Cons rather than struct Lisp_Cons.
3363 (pointer_valid_for_lisp_object): Remove. This check is not
3364 necessary, since make_lisp_ptr is already doing it. All uses removed.
3365 (local_vector_init, local_string_init): Move to alloc.c.
3366 (build_local_vector): Remove this awkward macro, replacing with ...
3367 (make_local_vector): New macro, which acts more like a function.
3368 Use statement expressions and use __COUNTER__ to avoid macro
3369 capture. Fall back on functions if these features are not supported.
3370 (build_local_string, make_local_string): Likewise.
3371
3372 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
3373
3374 * xterm.c (x_term_init): Consolidate duplicated code.
3375 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
3376 (x_delete_terminal): Do not close X connection fd (Bug#18403).
3377 Add eassert and mark dpyinfo as dead only if it was alive.
3378
3379 Add macros to allocate temporary Lisp objects with alloca.
3380 Respect MAX_ALLOCA and fall back to regular GC for large objects.
3381 * character.h (parse_str_as_multibyte): Move prototype to ...
3382 * lisp.h (parse_str_as_multibyte): ... here.
3383 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
3384 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
3385 New macros.
3386 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
3387 (local_string_init): New functions.
3388 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
3389 (init_alloc_once): Call it.
3390
3391 Cleanup last change and make all new stuff conditional.
3392 * lisp.h (build_local_string): Rename to ...
3393 (make_local_string): ... this macro.
3394 (build_local_string, scoped_list1, scoped_list3): New macros.
3395 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
3396 and functions as such, use regular fallbacks otherwise.
3397 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
3398 conditionally.
3399
3400 2014-09-08 Eli Zaretskii <eliz@gnu.org>
3401
3402 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
3403 always make sure the marginal areas of the row are in sync with
3404 what the window wants. (Bug#18419)
3405
3406 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
3407 existing binding of a variable, to avoid silently aborting
3408 commands that use specbind. (Bug#18331)
3409
3410 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3411
3412 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
3413 * coding.c (growable_destination): New function.
3414 (produce_chars): Use it for sanity checks. Do not fiddle with
3415 dst_end if the source and destination are both nil, as it's
3416 the caller's responsibility to avoid overlap.
3417 * keyboard.c (read_decoded_event_from_main_queue):
3418 The destination must be MAX_MULTIBYTE_LENGTH times the max source
3419 length, not 4 times, to prevent decode_coding_c_string from trying
3420 to reallocate a destination. This removes the need for the FIXME.
3421
3422 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
3423 All callers simplified. Add a comment about exec_failed, vfork,
3424 and alloca.
3425
3426 Adjust drag-and-drop fix when window is above top (Bug#18303).
3427 * xselect.c (x_fill_property_data): Don't let sign bit of negative
3428 XCDR bleed into XCAR's encoded value. Improve checks for
3429 out-of-range data while we're at it.
3430
3431 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
3432
3433 * xselect.c (x_fill_property_data): Handle negative XCDR when data
3434 is CONSP (Bug#18303).
3435
3436 2014-09-07 Eli Zaretskii <eliz@gnu.org>
3437
3438 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
3439 'alloca' gets passed arguments larger than MAX_ALLOCA.
3440
3441 * font.c (MAX): Define if not defined elsewhere.
3442
3443 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3444
3445 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
3446 here for destination buffer, to work around what appears to be a
3447 bug in decode_coding_c_string when the source and destination are
3448 both C strings.
3449
3450 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
3451 This follows up on the recent thread in emacs-devel on alloca; see:
3452 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
3453 This patch also cleans up alloca-related glitches noted while
3454 examining the code looking for unbounded alloca.
3455 * alloc.c (listn):
3456 * callproc.c (init_callproc):
3457 Rewrite to avoid need for alloca.
3458 * buffer.c (mouse_face_overlay_overlaps)
3459 (report_overlay_modification):
3460 * buffer.h (GET_OVERLAYS_AT):
3461 * coding.c (make_subsidiaries):
3462 * doc.c (Fsnarf_documentation):
3463 * editfns.c (Fuser_full_name):
3464 * fileio.c (Ffile_name_directory, Fexpand_file_name)
3465 (search_embedded_absfilename, Fsubstitute_in_file_name):
3466 * fns.c (Fmake_hash_table):
3467 * font.c (font_vconcat_entity_vectors, font_update_drivers):
3468 * fontset.c (fontset_pattern_regexp, Ffontset_info):
3469 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
3470 (xrdb_get_resource, x_get_resource_string):
3471 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
3472 * ftxfont.c (ftxfont_draw):
3473 * image.c (xbm_load, xpm_load, jpeg_load_body):
3474 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
3475
3476 * keymap.c (Fdescribe_buffer_bindings, describe_map):
3477 * lread.c (openp):
3478 * menu.c (digest_single_submenu, find_and_call_menu_selection)
3479 (find_and_return_menu_selection):
3480 * print.c (PRINTFINISH):
3481 * process.c (Fformat_network_address):
3482 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
3483 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
3484 * sound.c (wav_play, au_play):
3485 * syntax.c (skip_chars):
3486 * term.c (tty_menu_activate, tty_menu_show):
3487 * textprop.c (get_char_property_and_overlay):
3488 * window.c (Fset_window_configuration):
3489 * xdisp.c (safe__call, next_overlay_change, vmessage)
3490 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
3491 * xfaces.c (face_at_buffer_position):
3492 * xmenu.c (x_menu_show):
3493 Use SAFE_ALLOCA etc. instead of plain alloca, since the
3494 allocation size isn't bounded.
3495 * callint.c (Fcall_interactively): Redo memory_full check
3496 so that it can be done at compile-time on some platforms.
3497 * coding.c (MAX_LOOKUP_MAX): New constant.
3498 (get_translation_table): Use it.
3499 * callproc.c (call_process): Use SAFE_NALLOCA instead of
3500 SAFE_ALLOCA, to catch integer overflows on size calculation.
3501 (exec_failed) [!DOS_NT]: New function.
3502 (child_setup) [!DOS_NT]: Use it.
3503 * editfns.c (Ftranspose_regions):
3504 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
3505 * editfns.c (check_translation):
3506 Allocate larger buffers on the heap.
3507 * eval.c (internal_lisp_condition_case):
3508 Check for MAX_ALLOCA overflow.
3509 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
3510 (Fbase64_encode_region, Fbase64_decode_region):
3511 Avoid unnecessary calls to SAFE_FREE before 'error'.
3512 * buffer.c (mouse_face_overlay_overlaps):
3513 * editfns.c (Fget_pos_property, check_translation):
3514 * eval.c (Ffuncall):
3515 * font.c (font_unparse_xlfd, font_find_for_lface):
3516 * ftfont.c (ftfont_drive_otf):
3517 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
3518 (menu_bar_items, tool_bar_items):
3519 * sound.c (Fplay_sound_internal):
3520 * xdisp.c (load_overlay_strings, dump_glyph_row):
3521 Use an ordinary auto buffer rather than alloca, since the
3522 allocation size is fixed and small.
3523 * ftfont.c: Include <c-strcase.h>.
3524 (matching_prefix): New function.
3525 (get_adstyle_property): Use it, to avoid need for alloca.
3526 * keyboard.c (echo_add_key):
3527 * keymap.c (describe_map): Use ptrdiff_t, not int.
3528 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
3529 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
3530 when counting bytes.
3531 * lisp.h (xlispstrdupa): Remove, replacing with ...
3532 (SAFE_ALLOCA_STRING): ... new macro with different API.
3533 This fixes a portability problem, namely, alloca result
3534 passed to another function. All uses changed.
3535 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
3536 not MAX_ALLOCA - 1.
3537 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
3538 (REGEX_ALLOCATE): New macros.
3539 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
3540 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
3541 Use them.
3542 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
3543 by hand.
3544 (decode_mode_spec_coding): Store directly into buf rather than
3545 into an alloca temporary and copying the temporary to the buf.
3546
3547 2014-09-06 Eli Zaretskii <eliz@gnu.org>
3548
3549 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
3550
3551 2014-09-04 Jan D <jan.h.d@swipnet.se>
3552
3553 * xterm.c (x_term_init): Don't call x_session_initialize if running
3554 as a daemon (Bug#18375).
3555
3556 * xsmfns.c: Initialize ice_fd.
3557
3558 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
3559
3560 Less chatter in 'make' output.
3561 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
3562 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
3563 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
3564
3565 2014-09-03 Martin Rudalics <rudalics@gmx.at>
3566
3567 * buffer.c (scroll-bar-height): Fix typo in doc-string.
3568 * frame.c (Vdefault_frame_horizontal_scroll_bars):
3569 Remove variable.
3570 * nsfns.m (Fx_create_frame):
3571 * w32fns.c (Fx_create_frame):
3572 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
3573 nil.
3574
3575 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3576
3577 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
3578 the reported row in the case of a window with a header line, by
3579 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
3580 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
3581
3582 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
3583
3584 * eval.c (internal_lisp_condition_case): Don't overrun the stack
3585 when configured --with-wide-int on typical 32-bit platforms.
3586
3587 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3588
3589 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
3590 when HPOS is negative, for the benefit of R2L glyph rows whose
3591 newline overflows into the fringe.
3592
3593 2014-09-03 Ken Brown <kbrown@cornell.edu>
3594
3595 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
3596
3597 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
3598
3599 Minor cleanup of recent strlen-avoiding patch.
3600 * fileio.c (CHECK_LENGTH): Remove.
3601 Rewrite callers so that they don't need it.
3602 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
3603 variable wasn't set.
3604
3605 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
3606
3607 * fileio.c (CHECK_LENGTH): New macro.
3608 (Fexpand_file_name): Use it and get rid of a few more calls
3609 to strlen and strcat.
3610 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
3611 * lisp.h (egetenv): ... because of a new inline function used to
3612 avoid calls to strlen for a compile-time constants.
3613
3614 * buffer.h (decode_buffer): New function.
3615 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
3616 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
3617 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
3618 * data.c (Flocal_variables_p):
3619 * fileio.c (Fverify_visited_file_modtime):
3620 * marker.c (live_buffer): Use it.
3621
3622 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
3623
3624 Avoid extra calls to strlen in filesystem I/O routines.
3625 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
3626 the length of 'newdir' is known or may be precalculated.
3627 (file_accessible_directory_p): Prefer to pass Lisp_Object,
3628 not 'char *', and so use precalculated length.
3629 (Ffile_accessible_directory_p):
3630 * callproc.c (encode_current_directory, init_callproc):
3631 * charset.c (init_charset):
3632 * lread.c (load_path_check, load_path_default): Adjust users.
3633 * lisp.h (file_accessible_directory_p): Tweak prototype.
3634
3635 2014-09-01 Eli Zaretskii <eliz@gnu.org>
3636
3637 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
3638 locales.
3639
3640 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
3641
3642 --enable-silent-rules now suppresses more chatter.
3643 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
3644 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
3645 (am__v_CCLD_1): New macros, taken from Automake.
3646 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
3647
3648 Clean up extern decls a bit.
3649 * bytecode.c: Include blockinput.h and keyboard.h rather
3650 than rolling their APIs by hand.
3651 * emacs.c: Include regex.h and rely on its and lisp.h's API
3652 rather than rolling them by hand.
3653 * lastfile.c: Include lisp.h, to check this file's API.
3654 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
3655 New decls.
3656 * regex.h (re_max_failures): New decl.
3657 * unexcw.c, unexmacosx.c, unexw32.c:
3658 Rely on lisp.h's API rather than rolling it by hand.
3659 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
3660 Declare at top level, to pacify GCC -Wnested-externs.
3661
3662 2014-08-31 Eli Zaretskii <eliz@gnu.org>
3663
3664 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
3665 clipping rectangle become negative (i.e. large positive, since
3666 it's an unsigned data type). This can happen in R2L hscrolled
3667 glyph rows, and caused us to draw the cursor glyph on the fringe.
3668 For the details, see
3669 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
3670
3671 2014-08-31 Ken Brown <kbrown@cornell.edu>
3672
3673 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
3674 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
3675 is defined. (Bug#18368)
3676
3677 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
3678
3679 Vector-sorting fixes (Bug#18361).
3680 It's not safe to call qsort or qsort_r, since they have undefined
3681 behavior if the user-specified predicate is not a total order.
3682 Also, watch out for garbage-collection while sorting vectors.
3683 * fns.c: Include <vla.h>.
3684 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
3685 (sort_vector_compare): Remove, replacing with ....
3686 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
3687 ... these new functions.
3688 (sort_vector): Rewrite to use the new functions.
3689 GCPRO locals, since the predicate can invoke the GC.
3690 Since it's in-place return void; caller changed.
3691 (merge): Use 'inorder', for clarity.
3692
3693 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
3694 One can't hoist this out of the 'if', because intervening calls to
3695 newlocale, twolower, etc. can change errno.
3696
3697 2014-08-30 Eli Zaretskii <eliz@gnu.org>
3698
3699 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
3700 wording of the error messages.
3701 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
3702 sets errno.
3703
3704 * w32proc.c (get_lcid_callback): Accept locale specifications
3705 without the country part, as in "enu" vs "enu_USA".
3706 (w32_compare_strings): Signal an error if a locale was specified,
3707 but couldn't be translated into a valid LCID.
3708
3709 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3710
3711 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
3712
3713 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
3714
3715 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
3716 errno after towlower_l. errno's value is not specified after
3717 towlower_l. Instead, assume that towlower_l returns its argument
3718 on failure, which is portable in practice.
3719
3720 2014-08-29 Eli Zaretskii <eliz@gnu.org>
3721
3722 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
3723
3724 * w32proc.c (w32_compare_strings): Accept additional argument
3725 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
3726 if requested. If w32-collate-ignore-punctuation is non-nil, add
3727 NORM_IGNORESYMBOLS to the flags.
3728 (LINGUISTIC_IGNORECASE): Define if not already defined.
3729 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
3730
3731 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
3732 change.
3733
3734 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3735
3736 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
3737 Define substitutes for platforms that lack them.
3738 (str_collate): Add arguments locale and ignore_case.
3739
3740 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
3741 Add optional arguments LOCALE and IGNORE-CASE.
3742
3743 * lisp.h (str_collate): Adapt argument list.
3744
3745 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
3746
3747 Add vectors support to Fsort.
3748 * fns.c (sort_vector, sort_vector_compare): New functions.
3749 (sort_list): Likewise, refactored out of ...
3750 (Fsort): ... adjusted user. Mention vectors in docstring.
3751 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
3752 * alloc.c (make_save_int_obj): New function.
3753 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
3754 (make_save_int_obj): Add prototype.
3755
3756 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
3757 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
3758 Conditionally define to match system's qsort_r signature.
3759 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
3760
3761 2014-08-28 Ken Brown <kbrown@cornell.edu>
3762
3763 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
3764 dumping and the system malloc after dumping. (Bug#18222)
3765
3766 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
3767 Define as macros, expanding to hybrid_malloc, etc.
3768 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
3769 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
3770 macro.
3771 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
3772 full implementation on Cygwin. Remove Cygwin-specific code that
3773 is no longer needed.
3774 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
3775 Redefine as macros expanding to gmalloc, grealloc, etc.
3776 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
3777 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
3778 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
3779 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
3780 [HYBRID_MALLOC]:
3781 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3782 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
3783 HAVE_POSIX_MEMALIGN)]: New functions.
3784 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3785 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
3786 hybrid_aligned_alloc; declare.
3787 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3788 HAVE_POSIX_MEMALIGN)]: Define.
3789 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
3790 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3791 Define as macro, expanding to gget_current_dir_name, and define
3792 the latter.
3793 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
3794 malloc_enable_thread(). Don't initialize malloc.
3795 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
3796 no longer defined on Cygwin).
3797 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
3798 * sheap.c (bss_sbrk_buffer_end): New variable.
3799 * unexcw.c (__malloc_initialized): Remove variable.
3800 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
3801 SYSTEM_MALLOC.
3802 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
3803 Vmemory_full.
3804
3805 2014-08-28 Martin Rudalics <rudalics@gmx.at>
3806
3807 * w32term.c (w32_horizontal_scroll_bar_handle_click):
3808 In `event->y' return entire range (the size of the scroll bar minus
3809 that of the thumb).
3810 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
3811 return entire range (the scaled size of the scroll bar minus
3812 that of the slider). In `portion' return the scaled position of
3813 the slider.
3814 (xaw_jump_callback): Restore part of code for vertical scroll
3815 bar broken in change from 2014-07-27.
3816 (xaw_scroll_callback): Provide incremental scrolling with
3817 horizontal scroll bars.
3818
3819 2014-08-28 Eli Zaretskii <eliz@gnu.org>
3820
3821 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
3822
3823 * indent.c (Fvertical_motion): Fix vertical motion up through a
3824 display property after a newline. (Bug#18276)
3825
3826 * xdisp.c (display_line): Don't assume that the call to
3827 reseat_at_next_visible_line_start ends up at a character
3828 immediately following the newline on the previous line.
3829 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
3830 beyond ZV, which causes infloop in redisplay. For the details, see
3831 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
3832
3833 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
3834 coordinate for hscrolled R2L screen lines. (Bug#18277)
3835
3836 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
3837
3838 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
3839 (Bug#18051).
3840
3841 2014-08-27 Eli Zaretskii <eliz@gnu.org>
3842
3843 * syntax.c (scan_lists): Don't examine positions before BEGV.
3844 (Bug#18339)
3845
3846 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
3847
3848 Improve robustness of new string-collation code (Bug#18051).
3849 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
3850 (newlocale, wcscoll_l): Define substitutes for platforms that
3851 lack them, so as to simplify the mainline code.
3852 (str_collate): Simplify the code by assuming the above definitions.
3853 Use wcscoll_l, not uselocale, as uselocale is too fragile.
3854 For example, the old version left the Emacs in the wrong locale if
3855 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
3856 result. Report an error if newlocale fails.
3857
3858 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
3859
3860 * lisp.h (str_collate):
3861 * sysdep.c (str_collate): Return int.
3862 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
3863
3864 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3865
3866 Fix some glitches in previous change.
3867 * sysdep.c (stack_direction): Replace stack_grows_down
3868 to simplify calculation of stack boundaries.
3869 (handle_sigsegv): Check whether we really crash somewhere near
3870 to stack boundary, and handle fatal signal as usual if not.
3871 (init_sigsegv): Adjust accordingly.
3872 * keyboard.c (Vtop_level_message): Rename to
3873 Vinternal__top_level_message, as suggested by Stefan Monnier in
3874 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
3875 All related users changed.
3876
3877 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
3878
3879 Handle C stack overflow caused by too nested Lisp evaluation.
3880 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
3881 siglongjmp point to transfer control from SIGSEGV handler.
3882 * keyboard.c (return_to_command_loop, recover_top_level_message)
3883 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
3884 (regular_top_level_message): New variable.
3885 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
3886 exit from SIGSEGV handler and adjust message displayed by Vtop_level
3887 if appropriate.
3888 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
3889 new variables described above.
3890 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
3891 (stack_grows_down, sigsegv_stack, handle_sigsegv)
3892 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
3893 (init_sigsegv): New function.
3894 (init_signals): Use it.
3895
3896 2014-08-25 Ken Brown <kbrown@cornell.edu>
3897
3898 * emacs.c (main): Remove use of obsolete macro
3899 G_SLICE_ALWAYS_MALLOC.
3900
3901 2014-08-25 Eli Zaretskii <eliz@gnu.org>
3902
3903 Implement locale-sensitive string collation for MS-Windows.
3904 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
3905 New functions. (Bug#18051)
3906
3907 * w32.h (w32_compare_strings): Add prototype.
3908
3909 * w32.c <g_b_init_compare_string_w>: New global flag.
3910 (globals_of_w32): Initialize it.
3911
3912 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
3913
3914 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
3915 [WINDOWSNT]: Call str_collate on MS-Windows.
3916
3917 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
3918
3919 One more minor cleanup of font subsystem.
3920 * font.h (struct font_driver): Convert text_extents to
3921 return void because returned value is never actually used.
3922 * macfont.m (macfont_text_extents):
3923 * w32font.c (w32font_text_extents):
3924 * xftfont.c (xftfont_text_extents): Adjust to return void
3925 and assume that 'metrics' argument is always non-NULL.
3926 * ftfont.c (ftfont_text_extents):
3927 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
3928
3929 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
3930
3931 Minor cleanups of str_collate fix (Bug#18051).
3932 * fns.c (str_collate): Move decl from here ...
3933 * lisp.h (str_collate): ... to here.
3934 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
3935 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
3936 potential problems with integer overflow. Don't assume
3937 setlocale succeeds. Remove unnecessary test before restoring
3938 locale via setlocale, and free the copied setlocale string
3939 when done with it.
3940
3941 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
3942
3943 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
3944
3945 * sysdep.c (str_collate): New function. (Bug#18051)
3946
3947 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
3948
3949 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
3950 if the initial "rm -f" fails. This is for MinGW builds, where
3951 MS-Windows will not allow deleting the executable file of a
3952 running program.
3953
3954 2014-08-20 Eli Zaretskii <eliz@gnu.org>
3955
3956 * w32term.c (w32_scroll_bar_handle_click)
3957 (w32_horizontal_scroll_bar_handle_click)
3958 (x_scroll_bar_report_motion)
3959 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
3960 SB_THUMBTRACK, use the 32-bit position information returned by
3961 GetScrollInfo, not the 16-bit information returned in the Windows
3962 message sent to us.
3963
3964 2014-08-19 Eli Zaretskii <eliz@gnu.org>
3965
3966 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
3967 second coordinate ('y') reported for dragging the horizontal
3968 scroll bar thumb.
3969
3970 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3971
3972 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
3973 and text area-relative x-coordinates.
3974
3975 2014-08-17 Eli Zaretskii <eliz@gnu.org>
3976
3977 Avoid overwriting the reversed_p flags in the glyph matrices when
3978 init_iterator or start_display are called.
3979 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
3980 the glyph row here.
3981 (tool_bar_height, redisplay_tool_bar, try_window)
3982 (try_window_reusing_current_matrix, try_window_id)
3983 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
3984 reversed_p flag of the iterator's glyph row where the glyph row
3985 is going to be redrawn.
3986
3987 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
3988
3989 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
3990
3991 2014-08-16 Martin Rudalics <rudalics@gmx.at>
3992
3993 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
3994 of emacs_event return length from si.nPage to si.nMax.
3995 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
3996 interchange start and end of thumb.
3997
3998 2014-08-15 Ken Brown <kbrown@cornell.edu>
3999
4000 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
4001 ERRORCHECK mutexes. (Bug#18222)
4002
4003 2014-08-12 Martin Rudalics <rudalics@gmx.at>
4004
4005 * frame.c (set_menu_bar_lines_1): Remove.
4006 (set_menu_bar_lines): Call change_frame_size instead of
4007 set_menu_bar_lines_1.
4008
4009 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
4010
4011 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
4012 set f->official.
4013
4014 2014-08-11 Glenn Morris <rgm@gnu.org>
4015
4016 * fileio.c: Revert 2013-01-31 change, which chose coding system for
4017 writing before backing up, since it causes a more serious problem
4018 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
4019 (choose_write_coding_system): No longer callable from Lisp.
4020 Move last piece back here from Fwrite_region.
4021 (Fwrite_region, syms_of_fileio): Update for above changes.
4022
4023 2014-08-11 Martin Rudalics <rudalics@gmx.at>
4024
4025 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
4026 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
4027 (Fwindow_new_pixel, Fset_window_new_pixel)
4028 (Fset_window_new_total, Fset_window_new_normal)
4029 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
4030 See also:
4031 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
4032
4033 2014-08-11 Eli Zaretskii <eliz@gnu.org>
4034
4035 * fontset.c (Finternal_char_font): Recompute basic faces if the
4036 frame's face cache was cleared. (Bug#18162)
4037
4038 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
4039
4040 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
4041 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
4042 base buffer's undo list.
4043
4044 2014-08-10 Reuben Thomas <rrt@sc3d.org>
4045
4046 Fix a couple of recent inadvertent breaks of the MSDOS port.
4047 * msdos.c: include required menu.h
4048 * term.c: set correct menu_show_hook on MSDOS.
4049
4050 2014-08-10 Martin Rudalics <rudalics@gmx.at>
4051
4052 Fix handling of menu bar line on TTY frames (Bug#18136)
4053 (Bug#18196).
4054 * dispnew.c (handle_window_change_signal):
4055 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
4056 frame's menu bar lines subtracted from height.
4057 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
4058 frames.
4059 (adjust_frame_size): Count in menu bar when setting FrameRows.
4060 (make_terminal_frame): When setting up the frame's lines and
4061 text height don't count in the menu bar.
4062 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
4063 lines subtracted from height.
4064 (do_switch_frame): Set tty's FrameRows to number of total lines
4065 of frame.
4066 (Fframe_pixel_height, Fframe_pixel_width): If no window system
4067 is used, return total number of lines and columns.
4068 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
4069 of FRAME_LINES.
4070 * term.c (OUTPUT, tty_set_terminal_modes)
4071 (tty_set_terminal_window, tty_set_scroll_region)
4072 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
4073 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
4074 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
4075 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
4076 Call change_frame_size with frame's menu bar lines subtracted
4077 from height.
4078 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
4079 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
4080 FRAME_LINES.
4081
4082 2014-08-09 Reuben Thomas <rrt@sc3d.org>
4083
4084 * alloc.c (Fmemory_info): Remove a stray brace.
4085
4086 * process.c: Fix a comment typo.
4087
4088 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
4089
4090 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
4091
4092 * widgetprv.h (EmacsFramePart): Remove font.
4093
4094 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
4095 (resources, setup_frame_cursor_bits): Remove unused variables and
4096 functions, esp. wrt. font (Bug#18227).
4097
4098 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
4099
4100 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
4101
4102 2014-08-07 Reuben Thomas <rrt@sc3d.org>
4103
4104 Refer to MS-DOS using the same name everywhere.
4105
4106 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
4107 commit.
4108 * xfaces.c: ditto.
4109
4110 2014-08-05 Martin Rudalics <rudalics@gmx.at>
4111
4112 * w32term.c (w32_redeem_scroll_bar):
4113 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
4114 not redeeming scroll bars that have been turned off.
4115
4116 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4117
4118 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
4119 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
4120 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
4121 (safe_run_hook_funcall): Adjust accordingly.
4122
4123 2014-08-04 Martin Rudalics <rudalics@gmx.at>
4124
4125 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
4126 Condition correctly according to toolkit used.
4127 * frame.c (make_initial_frame, make_terminal_frame)
4128 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
4129 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
4130 assignments according to presence of toolkit scrollbars.
4131 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
4132 Condition correctly according to toolkit used.
4133 * window.c (set_window_scroll_bars): Set horizontal scroll bar
4134 only if toolkit supports it.
4135 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
4136 present.
4137 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
4138 non-toolkit builds.
4139 (XTredeem_scroll_bar): Always redeem scroll bar if present.
4140
4141 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
4142
4143 * keyboard.c (safe_run_hook_funcall): Avoid consing around
4144 Vinhibit_quit and prefer internal_condition_case_n to pass args.
4145 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
4146 (safe_run_hooks): Remove comment which is not relevant any more.
4147
4148 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
4149
4150 Don't let big frames overrun the stack.
4151 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
4152 Use SAFE_NALLOCA, not alloca.
4153
4154 Fix bug with clang + directory_files_internal + GC (Bug#16986).
4155 * dired.c (directory_files_internal): Use a volatile variable
4156 to prevent the compiler from optimizing away all copies of a local.
4157 I wonder how many other GC-related bugs like this lurk elsewhere?
4158
4159 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
4160 * xterm.h (struct x_display_info): New member 'connection'.
4161 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
4162 so that x_delete_terminal has a file descriptor to pass to
4163 delete_keyboard_wait_descriptor.
4164
4165 Don't mishandle year-9999 dates (Bug#18176).
4166 * editfns.c (decode_time_components): Store an invalid timespec
4167 on overflow, instead of returning false, so that the caller can
4168 distinguish overflow from other errors.
4169 (lisp_time_argument, lisp_seconds_argument): If the time is out
4170 of range, signal a time overflow instead of an invalid time spec.
4171 * keyboard.c (decode_timer): Treat time overflow like other
4172 timespec errors.
4173
4174 Avoid undefined behavior with signed left shift.
4175 Caught by 'gcc -fsanitize=undefined'.
4176 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
4177 * dispnew.c (line_hash_code, scrolling):
4178 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
4179 Use 'unsigned', not 'int', for line hashes.
4180 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
4181
4182 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
4183
4184 Make compare-strings more compatible with old behavior (Bug#17903).
4185 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
4186
4187 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
4188
4189 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
4190 Don't add label between left and right buttons (Bug#18129).
4191
4192 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
4193
4194 Make functions static that no longer need to be extern.
4195 * frame.c, frame.h (set_menu_bar_lines):
4196 * keyboard.c (Qleftmost, Qrightmost):
4197 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
4198 (x_set_internal_border_width):
4199 Now static.
4200
4201 2014-08-01 Eli Zaretskii <eliz@gnu.org>
4202
4203 Fix display of R2L lines when the last character fits only partially.
4204 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
4205 for the details.
4206 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
4207 R2L row is visible only partially, give the row a negative x
4208 offset.
4209 (display_line): Fix the calculation of the glyph whose pixel width
4210 is used to decide whether the last produced glyph fits on the
4211 line. When the last glyph fits only partially, give the row a
4212 negative x offset.
4213
4214 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
4215 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
4216 pixel width of the first glyph that is hscrolled from display.
4217 (display_line): In R2L glyph rows, don't give a negative offset to
4218 row->x when the first glyph begins before first_visible_x.
4219
4220 * xdisp.c (display_line): If called with iterator set up to write
4221 to a marginal area, delay the call to handle_line_prefix until we
4222 switch back to the text area. (Bug#18035)
4223
4224 * .gdbinit (xwindow): The members total_cols, total_lines,
4225 left_col, and top_line are C integers (and has been so for the
4226 last 1.5 years).
4227
4228 2014-08-01 Andreas Schwab <schwab@suse.de>
4229
4230 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
4231 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
4232
4233 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4234
4235 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
4236 (timerfd_callback): Ignore weird events with no data. Add tight
4237 assertions and comments.
4238 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
4239 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
4240
4241 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
4242
4243 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
4244 I had confused && with ||.
4245
4246 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
4247
4248 Simplify timerfd configuration and fix some minor glitches.
4249 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
4250 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
4251 Fall back on timer_create if timerfd_create fails at runtime.
4252 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
4253 kernel primitives to do resolution. All uses removed.
4254 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
4255 (turn_on_atimers): Clear timer_create-based timers too,
4256 for consistency.
4257
4258 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
4259 Without this change, the code can access the local variable 'width'
4260 even when it has not been initialized, and likewise for 'height';
4261 in either case this leads to undefined behavior.
4262
4263 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4264
4265 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
4266 necessary, put horizontal scroll bar resources as well. See
4267 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
4268 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
4269
4270 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4271
4272 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
4273 background value to match the resource of its vertical counterpart.
4274
4275 2014-07-29 Martin Rudalics <rudalics@gmx.at>
4276
4277 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
4278 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
4279
4280 2014-07-28 Martin Rudalics <rudalics@gmx.at>
4281
4282 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
4283 change that added the top margin height to the requested height
4284 and revert (undocumented) part of 2014-07-28 change that changed
4285 the logic of whether a size change occurred.
4286
4287 2014-07-28 Eli Zaretskii <eliz@gnu.org>
4288
4289 * .gdbinit (xwindow): The members total_cols, total_lines,
4290 left_col, and top_line are C integers (and has been so for the
4291 last 1.5 years).
4292
4293 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
4294 now C integers.
4295
4296 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
4297
4298 On GNU/Linux, use timerfd for asynchronous timers.
4299 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
4300 (toplevel): Rename alarm_timer_ok to special_timer_available.
4301 [HAVE_TIMERFD]: Declare timerfd.
4302 [HAVE_CLOCK_GETRES]: Declare resolution.
4303 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
4304 system timer resolution.
4305 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
4306 (timerfd_callback) [HAVE_TIMERFD]: New function.
4307 (atimer_result, debug_timer_callback, Fdebug_timer_check)
4308 [ENABLE_CHECKING]: New function for the sake of automated tests.
4309 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
4310 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
4311 [ENABLE_CHECKING]: Defsubr test function.
4312 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
4313 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
4314 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
4315
4316 Fix --without-x build and pacify --enable-gcc-warnings.
4317 Problems reported in Bug#18122 and Bug#18124.
4318 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
4319 (frame_windows_min_size): Now static.
4320 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
4321 Define as no-op.
4322 (adjust_frame_size): Always declare prototype.
4323
4324 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
4325 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
4326 * atimer.c (timerfd_callback): Always read expiration data.
4327 Add comment.
4328 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
4329 * process.c (add_timer_wait_descriptor): Add timer descriptor
4330 to input_wait_mask and non_process_wait_mask as well.
4331
4332 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
4333
4334 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
4335
4336 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
4337
4338 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
4339 Reinstate code removed by the prevoius commit to this file.
4340
4341 2014-07-27 Martin Rudalics <rudalics@gmx.at>
4342
4343 * buffer.h (struct buffer): New fields scroll_bar_height and
4344 horizontal_scroll_bar_type.
4345 * buffer.c (bset_scroll_bar_height)
4346 (bset_horizontal_scroll_bar_type): New functions.
4347 (Fbuffer_swap_text): Handle old_pointm field.
4348 (init_buffer_once): Set defaults for scroll_bar_height and
4349 horizontal_scroll_bar_type.
4350 (syms_of_buffer): New variables scroll_bar_height and
4351 horizontal_scroll_bar_type.
4352 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
4353 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
4354 (set_vertical_scroll_bar): Remove prototype.
4355 (x_change_tool_bar_height): Add prototype.
4356 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
4357 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
4358 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
4359 and FRAME_LINES.
4360 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
4361 (update_window): Start mode_line_row->y after horizontal scroll
4362 bar.
4363 (change_frame_size_1): Call adjust_frame_size.
4364 (init_display): When changing the size of a tty frame do not
4365 pass height of menu bar.
4366 (Qframe_windows_min_size): New symbol.
4367 * frame.h (struct frame): List tool bar fields after menu bar
4368 fields. Add official, total_lines, horizontal_scroll_bars,
4369 config_scroll_bar_height and config_scroll_bar_lines fields.
4370 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
4371 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
4372 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
4373 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
4374 (FRAME_WINDOWS_HEIGHT): New macros.
4375 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
4376 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
4377 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
4378 horizontal scroll bar.
4379 (frame_inhibit_resize, adjust_frame_size)
4380 (frame_windows_min_size): Add declarations.
4381 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4382 (x_set_scroll_bar_default_height, x_set_left_fringe)
4383 (x_set_right_fringe, x_set_vertical_scroll_bars)
4384 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
4385 (x_set_scroll_bar_height): Add external declarations.
4386 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
4387 (adjust_frame_size): New functions.
4388 (make_frame): Initial horizontal_scroll_bars field.
4389 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
4390 minibuffer window.
4391 (make_initial_frame, make_terminal_frame): No horizontal scroll
4392 bar in initial and terminal frames. Use adjust_frame_size.
4393 (Fframe_total_cols): Fix doc-string.
4394 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
4395 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
4396 Rewrite using adjust_frame_size.
4397 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4398 (Qframe_windows_min_size): New symbols.
4399 (x_set_frame_parameters): Remove call of check_frame_size.
4400 (x_report_frame_params): Return scroll_bar_height value.
4401 (x_set_left_fringe, x_set_right_fringe): New functions.
4402 (adjust_frame_height, x_set_internal_border_width)
4403 (x_set_fringe_width): Remove.
4404 (x_set_internal_border_width, x_set_vertical_scroll_bars)
4405 (x_set_scroll_bar_width, x_set_right_divider_width)
4406 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
4407 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
4408 New functions.
4409 (x_figure_window_size): Rewrite to make frame display the
4410 expected number of lines.
4411 (Vdefault_frame_scroll_bars): Rewrite doc-string.
4412 (Vdefault_frame_horizontal_scroll_bars)
4413 (Vframe_initial_frame_tool_bar_height)
4414 (frame_inhibit_implied_resize): New variables.
4415 * fringe.c (compute_fringe_widths): Remove.
4416 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
4417 (xg_create_horizontal_scroll_bar)
4418 (xg_update_horizontal_scrollbar_pos)
4419 (xg_set_toolkit_horizontal_scroll_bar_thumb)
4420 (xg_get_default_scrollbar_height)
4421 (xg_clear_under_internal_border): Extern.
4422 * gtkutil.c (xg_frame_resized): Don't call
4423 do_pending_window_change.
4424 (xg_frame_set_char_size): Use adjust_frame_size.
4425 (style_changed_cb): Call update_theme_scrollbar_height and
4426 x_set_scroll_bar_default_height.
4427 (x_wm_set_size_hint): Don't call check_frame_size.
4428 (update_theme_scrollbar_height)
4429 (xg_get_default_scrollbar_height)
4430 (xg_create_horizontal_scroll_bar)
4431 (xg_update_horizontal_scrollbar_pos)
4432 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
4433 (xg_create_scroll_bar): Set horizontal slot of bar.
4434 (xg_initialize): Call update_theme_scrollbar_height.
4435 (xg_clear_under_internal_border): No more static.
4436 * insdel.c (adjust_suspend_auto_hscroll): New function.
4437 (adjust_markers_for_delete, adjust_markers_for_insert)
4438 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
4439 * keyboard.c (readable_events, discard_mouse_events)
4440 (make_lispy_event): Handle horizontal scroll bar click events.
4441 (Fsuspend_emacs): When changing the size of a tty frame do not
4442 pass height of menu bar.
4443 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
4444 (Qright, Qleftmost, Qrightmost): New symbols.
4445 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
4446 FRAME_LINES.
4447 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
4448 * nsfns.m (x_set_internal_border_width): New function.
4449 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
4450 Remove extended fringe code.
4451 (x_set_window_size, x_new_font): Don't call
4452 compute_fringe_widths.
4453 * term.c (Fresume_tty): When changing the size of a tty frame do
4454 not pass height of menu bar.
4455 (clear_tty_hooks, set_tty_hooks):
4456 Clear horizontal_scroll_bar_hook.
4457 (init_tty): Frame has no horizontal scroll bars.
4458 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
4459 scroll_bar_before_handle, scroll_bar_horizontal_handle,
4460 scroll_bar_after_handle, scroll_bar_left_arrow,
4461 scroll_bar_right_arrow, scroll_bar_to_leftmost and
4462 scroll_bar_to_rightmost entries.
4463 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
4464 (struct terminal): Add set_horizontal_scroll_bar_hook.
4465 * w32console.c (initialize_w32_display):
4466 Clear horizontal_scroll_bar_hook.
4467 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
4468 FRAME_X_DISPLAY.
4469 (x_clear_under_internal_border, x_set_internal_border_width):
4470 New functions.
4471 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
4472 Set windows_or_buffers_changed when adding the menu bar.
4473 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
4474 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4475 (w32_createhscrollbar): New functions.
4476 (w32_createscrollbar): Rename to w32_createvscrollbar.
4477 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
4478 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
4479 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
4480 Add WM_EMACS_SHOWCURSOR.
4481 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
4482 case do not artificially impose WM size hints.
4483 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
4484 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
4485 cases.
4486 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
4487 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
4488 (unwind_create_frame_1): Remove.
4489 (Fx_create_frame): Make both scrollbars the system standard
4490 width and height. Use official field of frame structure to
4491 inhibit running window-configuration-change-hook.
4492 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4493 pixelwise. Handle frame's official field.
4494 (w32_frame_parm_handlers): Remove x_set_fringe_width
4495 entries. Add x_set_scroll_bar_height,
4496 x_set_horizontal_scroll_bars, x_set_left_fringe and
4497 x_set_right_fringe.
4498 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
4499 pass height of menu bar to change_frame_size.
4500 * w32menu.c (set_frame_menubar): Rewrite using
4501 frame_inhibit_resize.
4502 * w32term.h (struct w32_display_info):
4503 Add horizontal_scroll_bar_cursor and cursor_display_counter.
4504 (struct scroll_bar): Add horizontal.
4505 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4506 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4507 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
4508 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4509 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4510 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4511 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4512 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
4513 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
4514 Define instead of WM_EMACS_CREATESCROLLBAR.
4515 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
4516 WND_SCROLLBAR_INDEX.
4517 * w32term.c (horizontal_scroll_bar_min_handle)
4518 (horizontal_scroll_bar_left_border)
4519 (horizontal_scroll_bar_right_border): New integers.
4520 (x_set_frame_alpha): Replace x_highlight_frame by
4521 w32_focus_frame.
4522 (x_window_to_scroll_bar): New argument "type". Update callers
4523 accordingly.
4524 (w32_set_horizontal_scroll_bar_thumb)
4525 (x_horizontal_scroll_bar_report_motion)
4526 (w32_set_horizontal_scroll_bar)
4527 (w32_horizontal_scroll_bar_handle_click)
4528 (x_horizontal_scroll_bar_report_motion): New functions.
4529 (w32_mouse_position): Discriminate horizontal and vertical
4530 scrollbar cases.
4531 (my_create_scrollbar): Replace with two new functions
4532 my_create_vscrollbar and my_create_hscrollbar.
4533 (x_scroll_bar_create): New argument "horizontal".
4534 Update callers accordingly.
4535 (x_scroll_bar_remove, w32_condemn_scroll_bars)
4536 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
4537 scroll bar case.
4538 (w32_read_socket): Handle WM_HSCROLL cae.
4539 (x_new_font): Don't recompute fringe widths.
4540 Use frame_inhibit_resize. Calculate new menu bar height iff we
4541 build without toolkit. Always clear under internal border.
4542 (x_set_window_size): Don't check frame size or recompute
4543 fringes. Reset fullscreen status before applying sizes.
4544 Always resize as requested by pixelwise argument. Don't call
4545 do_pending_window_change.
4546 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
4547 (w32_initialize_display_info): Initialize dpyinfo's
4548 horizontal_scroll_bar_cursor entry.
4549 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
4550 (w32_initialize): Init horizontal_scroll_bar_min_handle and
4551 horizontal_scroll_bar_left_border.
4552 (w32fullscreen_hook): Intermittently resize window to normal
4553 when switching from fullscreen to maximized state.
4554 (run_window_configuration_change_hook): Don't run it if frame is
4555 not official yet.
4556 (unwind_change_frame): Remove.
4557 (Fset_window_configuration): Rewrite using frame's official field.
4558 * widget.c (set_frame_size): Don't call compute_fringe_widths.
4559 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
4560 * window.h (struct window): New fields old_pointm,
4561 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
4562 scroll_bar_height and suspend_auto_hscroll.
4563 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
4564 New functions.
4565 (sanitize_window_sizes): Extern.
4566 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
4567 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
4568 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
4569 (WINDOW_CONFIG_SCROLL_BAR_LINES)
4570 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
4571 New macros.
4572 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
4573 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
4574 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
4575 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
4576 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
4577 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
4578 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
4579 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
4580 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
4581 (Fwindow_old_point, sanitize_window_sizes): New functions.
4582 (Qwindow_sanitize_window_sizes): New symbol.
4583 (window_body_height): Count in horizontal scroll bar.
4584 (set_window_hscroll, Fscroll_left, Fscroll_right):
4585 Set suspend_auto_hscroll slot.
4586 (Fwindow_inside_edges): Count fringes pixelwise.
4587 (coordinates_in_window, Fcoordinates_in_window_p):
4588 Consider horizontal scroll bar.
4589 (check_frame_size, adjust_window_margins): Remove functions and
4590 corresponding calls.
4591 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
4592 (temp_output_buffer_show): Reset hscroll related fields.
4593 Initialize old_pointm.
4594 (make_parent_window): Initialize old_pointm.
4595 (make_window): Initialize old_pointm, horizontal scroll bar type,
4596 and scroll bar height.
4597 (resize_frame_windows): Don't count top margin in new sizes.
4598 Don't use safe sizes when shrinking a frame; let the window
4599 manager do the clipping.
4600 (Fsplit_window_internal): Inherit horizontal scroll bar type and
4601 height.
4602 (Fdelete_window_internal): Unchain old_pointm marker.
4603 (window_scroll_pixel_based, Fscroll_other_window):
4604 Adjust old_pointm.
4605 (Fwindow_text_width, Fwindow_text_height): New argument
4606 "pixelwise".
4607 (struct saved_window): New fields, old_pointm, hscroll_whole,
4608 suspend_auto_hscroll, scroll_bar_height and
4609 horizontal_scroll_bar_type.
4610 (Fset_window_configuration, save_window_save): Set new fields of
4611 saved_window.
4612 (apply_window_adjustment): Don't call adjust_window_margins.
4613 (set_window_margins): Don't change margins if new sizes don't
4614 fit into window.
4615 (set_window_scroll_bars): New argument "horizontal_type".
4616 Handle horizontal scroll bars. Don't change scroll bars if they
4617 don't fit into window.
4618 (Fset_window_scroll_bars): New argument "horizontal_type".
4619 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
4620 (compare_window_configurations): Compare horizontal scroll bar
4621 settings.
4622 * xdisp.c (window_text_bottom_y, window_box_height): Count in
4623 horizontal scroll bar height.
4624 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
4625 instead of FRAME_LINES.
4626 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
4627 ON_VERTICAL_SCROLL_BAR.
4628 (with_echo_area_buffer): Initialize old_pointm.
4629 (with_echo_area_buffer_unwind_data): Store old_pointm values in
4630 vector.
4631 (unwind_with_echo_area_buffer): Handle old_pointm.
4632 (update_tool_bar): Set do_update when the tool bar window has at
4633 least one line (since this is what the user sets).
4634 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
4635 (redisplay_tool_bar): Return early when toolbar has zero lines.
4636 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
4637 (hscroll_window_tree): Handle suspension of auto_hscroll and
4638 old_pointm.
4639 (set_horizontal_scroll_bar): New function.
4640 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
4641 more than one line. Handle horizontal scroll bars.
4642 (note_mouse_highlight): Handle horizontal scrol bars.
4643 (expose_frame): Set dimensions of XRectangle from frame's text
4644 sizes.
4645 (Vvoid_text_area_pointer): Update doc-string.
4646 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
4647 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4648 (x_set_internal_border_width): New functions.
4649 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
4650 (unwind_create_frame_1): Remove.
4651 (Fx_create_frame): Handle horizontal scroll bars. Use official
4652 field of frame structure to inhibit running
4653 window-configuration-change-hook.
4654 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4655 pixelwise. Handle frame's official field.
4656 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
4657 x_set_horizontal_scroll_bars, x_set_left_fringe,
4658 x_set_right_fringe.
4659 * xmenu.c (update_frame_menubar, free_frame_menubar):
4660 Use adjust_frame_size.
4661 * xterm.h (struct x_display_info):
4662 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
4663 slots.
4664 (struct scroll_bar): Add horizontal slot.
4665 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4666 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4667 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
4668 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4669 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4670 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4671 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4672 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
4673 (x_clear_under_internal_border): Remove.
4674 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
4675 (x_window_to_scroll_bar): New argument TYPE. Update callers.
4676 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
4677 HORIZONTAL. Update callers.
4678 (horizontal_action_hook_id): New action hook id.
4679 (x_horizontal_scroll_bar_to_input_event)
4680 (x_create_horizontal_toolkit_scroll_bar)
4681 (xt_horizontal_action_hook)
4682 (x_set_toolkit_horizontal_scroll_bar_thumb)
4683 (XTset_horizontal_scroll_bar, x_net_wm_state)
4684 (x_horizontal_scroll_bar_report_motion): New functions.
4685 (xg_scroll_callback, x_scroll_bar_handle_click):
4686 Handle horizontal scroll bars.
4687 (SCROLL_BAR_HORIZONTAL_NAME): Define.
4688 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
4689 by scroll bar.
4690 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
4691 Handle horizontal scroll bars.
4692 (handle_one_xevent): Handle horizontal scroll bar events.
4693 Call x_net_wm_state.
4694 (x_set_window_size_1, x_wm_set_size_hint): Don't call
4695 check_frame_size.
4696 (x_set_window_size): Don't call check_frame_size and
4697 do_pending_window_change.
4698 (x_term_init): Init horizontal_scroll_bar_cursor display info.
4699 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
4700 (x_scroll_bar_set_handle): Add some checks when calling
4701 x_clear_area.
4702
4703 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
4704
4705 Revert previous change.
4706 There is certainly nothing wrong with writing code like 'lo <= i
4707 && i <= hi', even if LO happens to a constant. There isn't even
4708 anything wrong in general with writing 'a <= b' if A happens to
4709 be a constant. At any rate stylistic changes shouldn't
4710 be done like this without discussion.
4711
4712 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
4713
4714 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
4715 (Fgarbage_collect): Reorder conditions that are written backwards.
4716 * data.c (cons_to_unsigned): Likewise.
4717 * dispnew.c (update_frame_1, sit_for): Likewise.
4718 * fileio.c (file_offset): Likewise.
4719 * filelock.c (read_lock_data, lock_file): Likewise.
4720 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
4721 Likewise.
4722 * font.c (font_intern_prop, font_style_symbolic): Likewise.
4723 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
4724 * lread.c (read1): Likewise.
4725 * minibuf.c (read_minibuf_noninteractive): Likewise.
4726 * nsterm.m (x_set_frame_alpha): Likewise.
4727 * process.c (wait_reading_process_output): Likewise.
4728 * region-cache.c (delete_cache_boundaries): Likewise.
4729 * xterm.c (x_set_frame_alpha): Likewise.
4730
4731 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
4732
4733 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
4734 Now static.
4735
4736 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4737
4738 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
4739 because atimer expiration is absolute rather than relative.
4740
4741 2014-07-25 Eli Zaretskii <eliz@gnu.org>
4742
4743 * w32term.h (current_popup_menu, menubar_in_use):
4744 Move declarations from w32term.c.
4745
4746 2014-07-25 Martin Rudalics <rudalics@gmx.at>
4747
4748 * w32fns.c (menubar_in_use): No more static.
4749 * w32term.c (current_popup_menu, menubar_in_use): Declare.
4750
4751 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4752
4753 Move hourglass machinery to RIF.
4754 * dispextern.h (struct redisplay_interface): New members
4755 show_hourglass and hide_hourglass. Indent comments.
4756 (show_hourglass, hide_hourglass): Remove prototypes.
4757 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
4758 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
4759 (ns_redisplay_interface): Add them.
4760 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
4761 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
4762 (w32_arrow_cursor): New function to hack around non-GUI frames.
4763 (w32_redisplay_interface): Add new functions.
4764 * w32term.h (w32_arror_cursor): Add prototype.
4765 * xdisp.c (show_hourglass): New function, refactored out from
4766 platform-dependent code.
4767 (cancel_hourglass): Now call to RIF function.
4768 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
4769 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
4770 (x_redisplay_interface): Add new functions.
4771
4772 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4773
4774 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
4775 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
4776 and complete previous change.
4777 * frame.c (adjust_frame_height): New function.
4778 (Fset_frame_height, Fset_frame_size): Use it.
4779 (x_set_frame_parameters): Take frame top margin into account.
4780
4781 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4782
4783 * frame.c (Fset_frame_height): Take frame top margin into account.
4784 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
4785 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
4786
4787 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4788
4789 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
4790 menubar_height as such. Tweak comment.
4791 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
4792 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
4793 All related users changed.
4794 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
4795 * xterm.c (handle_one_xevent):
4796 * gtkutil.c (xg_event_is_for_menubar):
4797 * xfns.c (x_window) [USE_X_TOOLKIT]:
4798 * xmenu.c (set_frame_menubar, free_frame_menubar):
4799 Prefer to use FRAME_MENUBAR_HEIGHT.
4800
4801 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
4802
4803 * frame.c (Fframe_parameters): Always report frame height without
4804 menu and tool bar lines.
4805
4806 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
4807
4808 * nsterm.m (applicationDidFinishLaunching:): Call
4809 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
4810 (antialiasThresholdDidChange:): New method for EmacsApp.
4811
4812 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
4813
4814 * macfont.m (macfont_update_antialias_threshold): Remove static.
4815
4816 * macfont.h (macfont_update_antialias_threshold): Declare.
4817
4818 2014-07-21 Eli Zaretskii <eliz@gnu.org>
4819
4820 * w32select.c (setup_windows_coding_system):
4821 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4822 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
4823
4824 * w16select.c (Fw16_get_clipboard_data):
4825 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4826 coding_system.
4827
4828 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
4829 buffer position where we are to start the iteration.
4830 (handle_invisible_prop): Record in it->stop_charpos the position
4831 where the invisible text ends. (Bug#18035)
4832 (hscroll_window_tree): Don't try hscrolling windows whose cursor
4833 row has zero buffer position as their start position.
4834 Reported by martin rudalics <rudalics@gmx.at>.
4835
4836 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
4837 infinite looping in redisplay when display lines don't have enough
4838 space to display even a single character. (Bug#18036)
4839
4840 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4841
4842 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
4843 * xfns.c (x_window): Use it to allow xfree later.
4844 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
4845 where appropriate. Use bool for booleans and remove redundant checks.
4846 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
4847 * xterm.c (x_free_frame_resources): Free shell_position.
4848
4849 2014-07-19 K. Handa <handa@gnu.org>
4850
4851 * xfaces.c (realize_x_face): Call font_load_for_lface with no
4852 mandatory font spec (Bug#17973).
4853
4854 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
4855
4856 * font.c (font_score): Return the worst score if the size of
4857 ENTITY is wrong by more than a factor 2 (Bug#17973).
4858
4859 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4860
4861 * frame.c (frame_unspecified_color): New function
4862 refactored out from ...
4863 (Fframe_parameters, Fframe_parameter): ... adjusted users.
4864 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
4865 function to ...
4866 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
4867 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
4868 * lisp.h (set_frame_param): Remove prototype.
4869 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
4870 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
4871 inlined from here.
4872
4873 Prefer 'x_display_info *' to 'Display *' in X selection code.
4874 This helps to avoid unneeded calls to x_display_info_for_display.
4875 * xterm.h (struct selection_input_event): Record 'x_display_info *'
4876 instead of 'Display *'.
4877 (SELECTION_EVENT_DPYINFO): New macro.
4878 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
4879 it as an lvalue. Mention this in comment.
4880 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
4881 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
4882 (selection_data_to_lisp_data, receive_incremental_selection):
4883 Convert to use 'x_display_info *'. Adjust users where appropriate.
4884 (lisp_data_to_selection_data): Likewise. Also pass 'struct
4885 selection data *' as last arg to not return values in args.
4886 (unexpect_property_change): Use common removal technique.
4887
4888 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4889
4890 * print.c (print_preprocess): Adjust to match changed
4891 sub char-table structure and avoid crash (Bug#18038).
4892
4893 * data.c (wrong_choice): Not static any more.
4894 * lisp.h (wrong_choice): Add prototype.
4895 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
4896 Declare namebuf as such. Tweak comment.
4897 [USE_GTK]: Likewise for tool_bar_position.
4898 (fset_tool_bar_position) [USE_GTK]: Ditto.
4899 (FRAME_TOOL_BAR_POSITION): New macro.
4900 * frame.c (x_report_frame_params):
4901 * gtkutil.c (update_frame_tool_bar):
4902 * xfns.c (Fx_create_frame): Use it.
4903 (x_set_tool_bar_position): Add meaningful diagnostic messages.
4904
4905 2014-07-16 Eli Zaretskii <eliz@gnu.org>
4906
4907 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
4908 buffer's default-directory only if it is a string. (Bug#17986)
4909
4910 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4911
4912 More precise control over values of some buffer-local variables.
4913 * keyboard.c (Qvertical_scroll_bar):
4914 * frame.c (Qleft, Qright): Move to ...
4915 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
4916 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
4917 (syms_of_buffer): DEFSYM all of the above, attach special properties.
4918 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
4919 vertical-scroll-bar, scroll-up-aggressively
4920 and scroll-down-aggressively.
4921 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
4922 Add declarations.
4923 * nsfns.m, frame.h (Qleft, Qright):
4924 * nsterm.m (Qleft): Remove declarations.
4925 * gtkutil.c (toplevel): Include buffer.h.
4926 * data.c (wrong_choice, wrong_range): New functions.
4927 (store_symval_forwarding): Handle special properties of buffer-local
4928 variables and use functions from the above to signal error, if any.
4929
4930 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
4931 values. Add comment.
4932 (struct frame): Re-arrange layout to avoid extra padding and use bit
4933 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
4934 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
4935 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
4936 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
4937 Define as no-ops because there are no scroll bars anyway.
4938 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
4939 Adjust users.
4940
4941 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
4942 Add convenient setter.
4943 (font_put_frame_data, font_get_frame_data): Use it.
4944
4945 2014-07-15 Daiki Ueno <ueno@gnu.org>
4946
4947 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
4948 pointer argument, before dereferencing.
4949 (XCHAR2B_BYTE2): Likewise.
4950
4951 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4952
4953 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
4954 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
4955 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
4956 Use record_unwind_protect_int and avoid consing.
4957 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
4958
4959 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
4960
4961 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
4962
4963 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
4964 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
4965 * emacs.c [MSDOS]:
4966 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
4967 (main) [MSDOS]: Use SET_BINARY instead of setmode.
4968 * minibuf.c: Include binary-io.h instead of fcntl.h.
4969 (read_minibuf_noninteractive):
4970 Use set_binary_mode instead of handcrafted code.
4971 Don't call emacs_set_tty if emacs_get_tty failed.
4972 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
4973 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
4974 * w32.c (pipe2): Adjust eassert to include O_BINARY.
4975
4976 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
4977 This works around a GCC compiler bug when Emacs is configured with
4978 --enable-gcc-warnings.
4979
4980 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
4981
4982 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
4983 or characters in string, respectively. Add comment.
4984 * fringe.c (Fdefine_fringe_bitmap):
4985 * fns.c (Fsubstring, substring_both): Use it.
4986 * keymap.c (Fdefine_key, Flookup_key):
4987 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
4988
4989 * term.c (tty_menu_add_pane, tty_menu_add_selection):
4990 Use menu_item_width.
4991 (tty_menu_show): Simplify because tty_menu_create never return NULL.
4992
4993 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
4994
4995 Improve behavior of 'bzr up; cd src; make -k'.
4996 * Makefile.in (top_srcdir): New var.
4997 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
4998 Use '$(top_srcdir)' instead of '$(srcdir)/..';
4999 its expansion is a bit shorter.
5000 (../config.status): Actually build config.status instead of
5001 just complaining.
5002 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
5003 New macros, copied and relocated from ../Makefile.in.
5004 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
5005 (../config.status, Makefile): New dependencies and rules,
5006 copied with relocation from ../Makefile.in. This should be more
5007 likely to rebuild the build machinery properly if you do a 'make'
5008 in the src directory.
5009
5010 2014-07-12 Eli Zaretskii <eliz@gnu.org>
5011
5012 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
5013 than 1. (Bug#17962)
5014
5015 * w32fns.c (Fx_file_dialog): Mention in the doc string the
5016 behavior on Windows 7 and later when the function is repeatedly
5017 invoked with the same value of DIR. (Bug#17950)
5018
5019 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
5020 string to match the one in w32fns.c.
5021
5022 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
5023 stdin to binary mode only if it is connected to a terminal.
5024
5025 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
5026
5027 Coalesce extern decls.
5028 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
5029 * sysdep.c (emacs_get_tty, emacs_set_tty):
5030 Move duplicate extern decls from here ...
5031 * systty.h: ... to here, so that there's just one copy.
5032
5033 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
5034
5035 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
5036
5037 * nsfns.m (Fns_popup_font_panel): Ditto.
5038
5039 2014-07-11 Eli Zaretskii <eliz@gnu.org>
5040
5041 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
5042 not only on '\n'.
5043 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
5044
5045 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
5046 [DOS_NT]: Implement for WINDOWSNT.
5047
5048 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
5049 unsigned.
5050
5051 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
5052
5053 * sysdep.c (suppress_echo_on_tty): New function.
5054 * minibuf.c (read_minibuf_noninteractive): Use it.
5055
5056 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5057
5058 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
5059 sysinfo failed. Adjust docstring.
5060
5061 2014-07-11 Eli Zaretskii <eliz@gnu.org>
5062
5063 Implement memory-info for MS-DOS.
5064 * dosfns.c (dos_memory_info): New function.
5065 * dosfns.h (dos_memory_info): Add prototype.
5066 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
5067 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
5068 of doing some of its job.
5069
5070 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
5071 reference termios structure members.
5072
5073 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
5074
5075 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
5076
5077 * minibuf.c (top): Include systty.h. Declare external
5078 emacs_get_tty and emacs_set_tty.
5079 (Vread_hide_char): New lisp variable.
5080 (read_minibuf_noninteractive): Hide characters with
5081 Vread_hide_char if it is a character. (Bug#17839)
5082
5083 2014-07-10 Eli Zaretskii <eliz@gnu.org>
5084
5085 Implement memory-info for MS-Windows.
5086 * w32.c (w32_memory_info): New function.
5087 * w32.h (w32_memory_info): Prototype it.
5088 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
5089
5090 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5091
5092 * coding.h (struct coding_system): Remove 'error_positions' (unused)
5093 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
5094 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
5095 extra padding and shrink struct coding_system by 56 bytes (x86_64).
5096 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
5097 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
5098 (decode_coding_big5, decode_coding_charset, decode_coding)
5099 (encode_coding): Adjust users.
5100
5101 * alloc.c (Fmemory_info): New function.
5102
5103 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
5104
5105 * syntax.c (back_comment): Use more-natural location for label.
5106
5107 * font.c, font.h (font_unparse_fcname): Now static.
5108 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
5109
5110 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5111
5112 Next minor cleanup of font subsystem.
5113 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
5114 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
5115 really used).
5116 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
5117 unused.
5118 * ftfont.h (ftfont_font_format): Remove prototype.
5119 * ftfont.c (ftfont_font_format): Remove; now unused.
5120 (ftfont_open):
5121 * nsfont.m (nsfont_open):
5122 * w32font.c (w32font_open_internal):
5123 * w32uniscribe.c (uniscribe_open):
5124 * xfont.c (xfont_open):
5125 * xftfont.c (xftfont_open): All users changed.
5126
5127 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
5128 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
5129
5130 2014-07-09 Eli Zaretskii <eliz@gnu.org>
5131
5132 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
5133 x_produce_glyphs does when it generates a stretch glyph that
5134 represents a TAB. (Bug#17969)
5135
5136 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
5137 and there is a display property at that position, don't call
5138 move_it_to to move to a position before window start. (Bug#17942)
5139 Fix condition for finding CHARPOS by the first call to move_it_to.
5140 (Bug#17944)
5141
5142 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
5143
5144 * syntax.c (find_defun_start): Try the cache even
5145 if !open_paren_in_column_0_is_defun_start.
5146 (back_comment): If find_defun_start was pessimistic, use the
5147 scan_sexps_forward result to improve the cache (bug#16526).
5148
5149 2014-07-09 Eli Zaretskii <eliz@gnu.org>
5150
5151 * xdisp.c (redisplay_window): If redisplay of a window ends up
5152 with point in a partially visible line at end of the window, make
5153 sure the amended position of point actually has smaller Y
5154 coordinate; if not, give up and scroll the display. (Bug#17905)
5155
5156 * window.c (window_scroll_pixel_based): When point ends up at the
5157 last fully visible line, don't let move_it_to stop at the left
5158 edge of the line and dupe us into thinking point is inside the
5159 scroll margin.
5160
5161 * w32.c (network_interface_info): Make sure the argument is a
5162 Lisp string.
5163
5164 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
5165
5166 * process.c (read_and_dispose_of_process_output): Fix typo
5167 in previous patch: we want nonnegative fds, not nonzero fds.
5168
5169 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
5170
5171 * chartab.c (char_table_translate): Move to...
5172 * character.h (char_table_translate): ... inline function here.
5173 Avoid Faref and assume that args are always valid. This helps to
5174 speedup search, which is especially important for a huge buffers.
5175 * lisp.h (char_table_translate): Remove prototype.
5176
5177 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
5178 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
5179 New function, with an intention to avoid code duplication between
5180 a few font drivers.
5181 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
5182 Add prototype.
5183 * ftfont.c (ftfont_open):
5184 * macfont.m (macfont_open):
5185 * xftfont.c (xftfont_open): Use it.
5186
5187 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
5188
5189 * process.c: Add sanity checks for file descriptors (Bug#17844).
5190 (wait_reading_process_output, Fprocess_filter_multibyte_p):
5191 Check that infd is nonnegative before using it as an fd.
5192 (read_and_dispose_of_process_output, Fprocess_send_eof):
5193 Likewise, for outfd.
5194 (wait_reading_process_output): Omit unnecessary check of infd.
5195
5196 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
5197
5198 Minor fixups related to usage of the 'long' type.
5199 * gnutls.c (emacs_gnutls_handshake):
5200 * xfaces.c (dump_realized_face):
5201 Work even if 'long' is narrower than 'void *'.
5202 * termcap.c (scan_file):
5203 * xselect.c (x_decline_selection_request)
5204 (x_reply_selection_request, x_get_window_property):
5205 * xterm.c (x_set_frame_alpha):
5206 Remove unnecessary 'L' suffixes of integer constants.
5207 * xfns.c (hack_wm_protocols):
5208 * xselect.c (x_fill_property_data):
5209 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
5210 Remove unnecessary casts to 'long'.
5211 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
5212
5213 Minor ImageMagick safety fixes.
5214 * image.c (imagemagick_compute_animated_image):
5215 Remove useless assignment to local. Avoid problems if dest_width is 0.
5216 (imagemagick_load_image): Use int for pixel counts that can't
5217 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
5218 a row width greater than the image width (or greater than LONG_MAX!).
5219
5220 2014-07-04 K. Handa <handa@gnu.org>
5221
5222 * coding.c (MIN_CHARBUF_SIZE): Delete it.
5223 (MAX_CHARBUF_EXTRA_SIZE): New macro.
5224 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
5225
5226 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5227
5228 * font.h (struct font_driver): Remove get_outline and free_outline;
5229 not used by any font driver.
5230 * ftfont.c (ftfont_driver):
5231 * macfont.m (macfont_driver):
5232 * nsfont.m (nsfont_driver):
5233 * w32font.c (w32font_driver):
5234 * w32uniscribe.c (uniscribe_font_driver):
5235 * xfont.c (xfont_driver): Related users changed.
5236 * xselect.c (x_get_window_property): Use convenient xmalloc.
5237 Call to xfree only if some data was really allocated.
5238
5239 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5240
5241 On MS-Windows, display busy cursor on all GUI frames.
5242 This is similar to what we have on X. Quickly tested by Dani Moncayo.
5243 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
5244 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
5245 Likewise.
5246 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
5247 * xdisp.c (start_hourglass): Remove Windows-specific bits.
5248
5249 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5250
5251 Use convenient alists to manage per-frame font driver-specific data.
5252 * frame.h (struct frame): Rename font_data_list to...
5253 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
5254 * font.h (struct font_data_list): Remove; no longer need a special
5255 data type.
5256 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
5257 Adjust prototypes.
5258 * font.c (font_put_frame_data, font_get_frame_data)
5259 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
5260 management.
5261 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
5262 Related users changed.
5263 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
5264 Prefer convenient xmalloc and xfree.
5265
5266 2014-07-03 Eli Zaretskii <eliz@gnu.org>
5267
5268 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
5269 the window whose glyph row is being prepared and a flag whether it
5270 is for mode/header line. Make sure the glyph row's marginal areas
5271 are in sync with what the window wants.
5272 (Bug#17892)
5273
5274 * xdisp.c (display_line, display_mode_line):
5275 Call prepare_desired_row with additional arguments, as appropriate.
5276
5277 * dispextern.h (prepare_desired_row): Adjust prototype.
5278
5279 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5280
5281 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
5282 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
5283 caused by xw_popup_dialog in daemon mode (Bug#17891).
5284
5285 2014-07-03 Eli Zaretskii <eliz@gnu.org>
5286
5287 * frame.c (do_switch_frame): When switching to another TTY frame,
5288 make sure FrameCols and FrameRows are in sync with the new frame's
5289 data. (Bug#17875)
5290
5291 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
5292
5293 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
5294 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
5295 min_char slots. Adjust comment.
5296 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
5297 Add SUB_CHAR_TABLE_OFFSET member.
5298 (make_uninit_sub_char_table): New function.
5299 (toplevel): Add compile-time assert to verify suitable member layout
5300 in Lisp_Sub_Char_Table.
5301 * alloc.c (mark_char_table): Add extra argument to denote char table
5302 subtype. Adjust to match new layout of sub char-table.
5303 (mark_object): Always mark sub char-tables with mark_char_table.
5304 * chartab.c (make_sub_char_table, copy_sub_char_table)
5305 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
5306 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
5307 (map_sub_char_table_for_charset, uniprop_table_uncompress):
5308 All related users changed.
5309 * lread.c (read1): Adjust to match new layout of sub char-table.
5310 * print.c (print_object): Likewise (Bug#17898).
5311
5312 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
5313
5314 * keymap.c (get_keyelt): Simplify.
5315 (copy_keymap_item): Remove left-over code for when we had
5316 key-shortcut caches.
5317
5318 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5319
5320 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
5321 (dealloc): Remove for EmacsScroller.
5322
5323 * nsterm.h (EmacsScroller): Remove dealloc.
5324
5325 2014-06-30 Eli Zaretskii <eliz@gnu.org>
5326
5327 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
5328
5329 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5330
5331 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
5332 when setNeedsDisplay is called so we don't trigger redisplay for every
5333 tool bar update.
5334
5335 * nsterm.m (any_help_event_p): New variable.
5336 (mouseMoved:): Set any_help_event_p to YES if help event is
5337 generated. Remove else with empty help event that triggered redisplay
5338 for every mouse move.
5339 (windowDidResignKey:): If any_help_event_p, generate empty help event.
5340
5341 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5342
5343 * xfns.c (Qsuppress_icon): Remove; no real users.
5344 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
5345 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
5346 (syms_of_w32fns): Don't DEFSYM it.
5347
5348 2014-06-29 Glenn Morris <rgm@gnu.org>
5349
5350 * Makefile.in (ns-app): Mark as PHONY.
5351
5352 2014-06-28 Glenn Morris <rgm@gnu.org>
5353
5354 * Makefile.in (mostlyclean): There are no libXMenu11.a,
5355 liblw.a in this directory.
5356
5357 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
5358
5359 * coding.c (encode_coding_utf_8): Correctly count produced_chars
5360 also in unibyte case. (Bug#17865)
5361
5362 2014-06-28 K. Handa <handa@gnu.org>
5363
5364 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
5365 (MIN_CHARBUF_SIZE): New macro.
5366 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
5367
5368 2014-06-27 Glenn Morris <rgm@gnu.org>
5369
5370 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
5371 with an order-only dependence on bootstrap-emacs. (Bug#2151)
5372 (.el.elc): Replace suffix rule with pattern rule.
5373 (%.elc): New pattern rule, with order-only prerequisite.
5374 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
5375 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
5376 in place of BOOTSTRAPEMACS.
5377
5378 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5379
5380 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
5381
5382 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5383
5384 Consistently use validate_subarray to verify substring.
5385 * fns.c (validate_substring): Not static any more. Adjust to
5386 use ptrdiff_t, not EMACS_INT, because string and vector limits
5387 can't exceed ptrdiff_t even if EMACS_INT is wider.
5388 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
5389 (secure_hash): Adjust user.
5390 * lisp.h (validate_subarray): Add prototype.
5391 * coding.c (Fundecodable_char_position):
5392 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
5393 Use validate_subarray. Adjust comment to mention substring.
5394
5395 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5396
5397 Do not allow out-of-range character position in Fcompare_strings.
5398 * fns.c (validate_subarray): Add prototype.
5399 (Fcompare_substring): Use validate_subarray to check ranges.
5400 Adjust comment to mention that the semantics was changed. Also see
5401 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
5402
5403 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
5404
5405 Be more consistent about the 'Qfoo' naming convention.
5406 * image.c (Fimagemagick_types):
5407 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
5408 * process.c (Fmake_network_process):
5409 Rename C local identifier 'Qfoo to avoid giving the false
5410 impression that it stands for the symbol 'foo'.
5411
5412 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
5413
5414 Simplify and cleanup character conversion stuff.
5415 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
5416 Remove prototypes.
5417 * character.c (multibyte_char_to_unibyte)
5418 (multibyte_char_to_unibyte_safe): Remove; no longer used.
5419 * character.h (make_char): Remove; unused.
5420 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
5421 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
5422 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
5423 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
5424 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
5425
5426 2014-06-22 Mario Lang <mlang@delysid.org>
5427
5428 * w32fns.c (Fw32_shell_execute): The the -> the.
5429
5430 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
5431
5432 * xmenu.c (mouse_position_for_popup):
5433 * xselect.c (mouse_position_for_drop): Do not duplicate ...
5434 * xfns.c (x_relative_mouse_position): ... and prefer this function.
5435 * menu.c (Fx_popup_menu):
5436 * xselect.c (x_handle_dnd_message): Adjust users.
5437 * menu.h (mouse_position_for_popup): Remove prototype.
5438 * xterm.h (x_relative_mouse_position): Add prototype.
5439 * xterm.c (x_find_topmost_parent): Break from the loop and do not
5440 call XFree if XQueryTree returns zero.
5441
5442 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5443
5444 * indent.c (Fvertical_motion): Doc fix.
5445 Move to the goal column, if any, with a single call to
5446 move_it_in_display_line, not in two calls. Doing this with two
5447 calls causes move_it_in_display_line apply the line-prefix
5448 handling twice instead of just once. (Bug#17823)
5449
5450 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
5451
5452 Port to OS X ACLs (Bug#17810).
5453 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
5454 ACL_TYPE_ACCESS) doesn't work.
5455
5456 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
5457
5458 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
5459 before checking key-translation-map (bug#17659).
5460
5461 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
5462
5463 * font.c (font_make_object): Avoid dangling pointer which may
5464 crash GC (Bug#17771).
5465
5466 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5467
5468 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
5469 prototype of DGifCloseFile as appropriate for older and newer
5470 versions of giflib.
5471 (gif_close): New function, encapsulates the differences in the
5472 calling sequence of DGifCloseFile before v5.1.0 and after it.
5473 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
5474 error string where appropriate. (Bug#17790)
5475
5476 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
5477 macro execution, make sure point didn't move since last complete
5478 redisplay, as the condition for using the glyph matrix
5479 information. (Bug#17777)
5480
5481 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5482
5483 Minor cleanup of fonset code.
5484 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
5485 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
5486 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
5487 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
5488 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
5489 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
5490 (free_realized_fontset): Remove because a no-op since 2008.
5491 (free_face_fontset): Adjust user.
5492 (syms_of_fontset): Shrink fontset by one extra slot.
5493
5494 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
5495
5496 Omit redundant extern decls.
5497 Most of this patch is from Dmitry Antipov, in:
5498 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
5499 * commands.h (update_mode_lines):
5500 * frame.h (Qbackground_color, Qforeground_color)
5501 (x_set_menu_bar_lines):
5502 * ftfont.c (ftfont_font_format):
5503 * intervals.h (Qkeymap, Qfont):
5504 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
5505 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
5506 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
5507 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
5508 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
5509 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
5510 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
5511 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
5512 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
5513 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
5514 (Qtool_bar, Qheader_line):
5515 * macros.c (Fexecute_kbd_macro):
5516 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
5517 * xterm.c (x_delete_terminal, XSetIMValues):
5518 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
5519 (x_implicitly_set_name, popup_activated)
5520 (widget_store_internal_border):
5521 Remove redundant decls.
5522 * frame.c [USE_X_TOOLKIT]: Include widget.h.
5523 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
5524 Remove _Noreturn, as make-docfile now does that for us.
5525 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
5526 (Qregion_extract_function): New decl.
5527 * window.c, xfns.c: Include menu.h.
5528
5529 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
5530
5531 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
5532
5533 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
5534
5535 * fileio.c (Fread_file_name): Do not pass redundant args and ...
5536 * callint.c (read_file_name): ... convert to static here.
5537 * lisp.h (Fread_file_name): Do not EXFUN it.
5538 (STRING_COPYIN): Remove; unused.
5539 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
5540 (char_composable_p): ... static function. All users changed.
5541 * eval.c (toplevel): Remove redundant #include directives.
5542 * xterm.c (x_initialize): Add static to match prototype.
5543 * ccl.c (Fccl_execute_on_string):
5544 * font.c (fon_intern_prop): Use make_specified_string.
5545
5546 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
5547
5548 * Makefile.in (ns-app): Fix typo that broke build on OS X.
5549 Reported by David Caldwell in:
5550 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
5551
5552 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
5553
5554 Do not ask for XRender extension each time XFT font is opened.
5555 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
5556 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
5557
5558 2014-06-15 Glenn Morris <rgm@gnu.org>
5559
5560 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
5561
5562 2014-06-15 Eli Zaretskii <eliz@gnu.org>
5563
5564 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
5565 information if we are in the middle of executing a keyboard macro,
5566 since redisplay doesn't update the screen until the macro is
5567 finished. (Bug#17777)
5568
5569 * alloc.c (cleanup_vector): Don't dereference a font driver
5570 pointer if it is NULL. (Bug#17771)
5571
5572 2014-06-13 Glenn Morris <rgm@gnu.org>
5573
5574 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
5575 ($(lispsource)/international/charprop.el)
5576 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
5577 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
5578 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
5579 GNU make automatically passes command-line arguments to sub-makes.
5580
5581 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
5582
5583 Avoid hangs in accept-process-output (Bug#17647).
5584 * lisp.h, process.c (wait_reading_process_input):
5585 Return int, not bool. All uses changed.
5586 * process.c (SELECT_CANT_DO_WRITE_MASK):
5587 Remove macro, replacing with ...
5588 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
5589 All uses changed.
5590 (status_notify): New arg WAIT_PROC. Return int, not void.
5591 All uses changed.
5592
5593 2014-06-13 Eli Zaretskii <eliz@gnu.org>
5594
5595 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
5596 the frame is the initial frame, because the hook is not set up
5597 then, and Emacs crashes.
5598 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
5599
5600 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
5601
5602 * keymap.c (silly_event_symbol_error): Don't recommend the use
5603 of strings.
5604
5605 2014-06-11 Eli Zaretskii <eliz@gnu.org>
5606
5607 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
5608 matching overlay strings with 'cursor' property against buffer
5609 positions traversed in the glyph row. (Bug#17744)
5610
5611 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
5612
5613 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
5614 on Cocoa.
5615
5616 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
5617 determine 10.9 (Bug#17751).
5618
5619 * macfont.m (macfont_draw): Positions were not freed.
5620
5621 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
5622
5623 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
5624 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
5625 function. Also adjust comment.
5626 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
5627
5628 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
5629 * font.c (font_done_for_face):
5630 * xfaces.c (realize_non_ascii_face): Adjust user.
5631 * font.h (struct font_driver): Convert 'prepare_face' to return
5632 void because its return value is never used anyway.
5633 * xfont.c (xfont_prepare_face): Return void.
5634 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
5635 (xftfont_done_face): Use xfree.
5636
5637 * dispextern.h (last_tool_bar_item): Remove declaration.
5638 * frame.h (struct frame): New member last_tool_bar_item.
5639 * frame.c (make_frame): Initialize it.
5640 * xdisp.c (toplevel): Remove last_tool_bar_item.
5641 (handle_tool_bar_click, note_tool_bar_highlight):
5642 * w32term.c (w32_read_socket, w32_initialize):
5643 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
5644
5645 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
5646 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
5647
5648 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5649
5650 Say (accept-process-output P)'s result pertains to P if P is non-nil.
5651 * process.c (Faccept_process_output)
5652 (wait_reading_process_output): Mention that if PROCESS is non-nil,
5653 the return value is about PROCESS, not about other processes.
5654
5655 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
5656
5657 Further adjustments to mark_object and friends.
5658 Now the mark_object's stack is just 32 bytes on a 64-bit
5659 system, which means extra 20% off the stack usage.
5660 * alloc.c (mark_save_value): As before, refactored out from ...
5661 (mark_object): ... adjusted user. Also add comment.
5662
5663 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5664
5665 Fix core dump after a dropped X connection (Bug#17704).
5666 * sysdep.c (stuff_char): Don't abort merely because the selected frame
5667 is dead, as we may be shutting down.
5668
5669 2014-06-08 Glenn Morris <rgm@gnu.org>
5670
5671 * fileio.c (write-region-inhibit-fsync): Doc tweak.
5672
5673 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
5674
5675 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
5676
5677 If a C name must be extern on some platforms, make it extern on all.
5678 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
5679 (load_color):
5680 * font.h (ftxfont_driver) [HAVE_XFT]:
5681 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
5682 * lisp.h (get_frame_param):
5683 * menu.h (tty_menu_show):
5684 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
5685 * termhooks.h (encode_terminal_code):
5686 * xterm.h (x_menu_wait_for_event):
5687 Always declare.
5688 * frame.c (get_frame_param):
5689 * fringe.c (max_used_fringe_bitmap):
5690 * ftxfont.c (ftxfont_driver):
5691 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
5692 * menu.c (menu_items_inuse):
5693 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
5694 * term.c (encode_terminal_code, tty_menu_show):
5695 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
5696 * xfaces.c (load_color):
5697 * xmenu.c (x_menu_wait_for_event):
5698 Now always extern.
5699
5700 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5701
5702 Change object marking routines to minimize stack usage.
5703 This change moves a few cold paths from mark_object to NO_INLINE
5704 functions and adjusts symbol marking loop. According to GCC 4.8.2
5705 -Wstack-usage, this reduces mark_object's stack usage from 80 to
5706 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
5707 stack usage at the mark phase is reduced up to 28%. Surprisingly,
5708 it also gains up to 3% in speed (with default '-O2 -g3' flags).
5709 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
5710 refactored out from ...
5711 (mark_object): ... adjusted user. Also mark symbols in a tight
5712 inner loop.
5713 (mark_face_cache): Add NO_INLINE.
5714
5715 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5716
5717 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
5718 contains garbage on WINDOWSNT (which could potentially infloop at
5719 exit).
5720
5721 Minimize cursor motion during TTY menu updates.
5722 * term.c (tty_menu_display): Don't position cursor here.
5723 Instead, pass the cursor coordinates to update_frame_with_menu.
5724 (tty_menu_activate): Send the hide cursor command only once in an
5725 iteration through the outer 'while' loop.
5726
5727 * dispnew.c (update_frame_1): Accept an additional argument
5728 SET_CURSOR_P, and position the cursor at the end of the frame
5729 update only if that argument is non-zero. All callers changed to
5730 provide the additional argument as non-zero, except for
5731 update_frame_with_menu.
5732 (update_frame_with_menu): Accept 2 additional arguments ROW and
5733 COL; if they are non-negative, instruct update_frame_1 not to
5734 position the cursor, and instead position it according to ROW and COL.
5735
5736 * dispextern.h (update_frame_with_menu): Update prototype.
5737
5738 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5739
5740 * callproc.c (call_process): Don't check read-only if we don't insert
5741 anything (bug#17666).
5742
5743 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5744
5745 * dispnew.c (update_frame_with_menu): Set display_completed.
5746
5747 2014-06-07 Eli Zaretskii <eliz@gnu.org>
5748
5749 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
5750 only for WINDOWSNT.
5751 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
5752
5753 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
5754
5755 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
5756 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
5757
5758 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
5759
5760 * window.c (Frecenter): Signal an error if window-buffer is not
5761 current-buffer.
5762
5763 * keyboard.c (make_lispy_position): Don't include a buffer position in
5764 mode/header-line mouse events.
5765
5766 * keyboard.c (read_char): Handle (t . <event>) in the second use of
5767 Vunread_command_events (bug#17650).
5768
5769 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
5770
5771 * xterm.c (x_setup_pointer_blanking):
5772 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
5773
5774 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
5775
5776 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
5777 because it will be defined in generated config.h if needed.
5778
5779 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5780
5781 Use terminal-specific hooks to display popup dialogs.
5782 * termhooks.h (struct terminal): New field popup_dialog_hook.
5783 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
5784 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
5785 code and use popup_dialog_hook.
5786 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
5787 * nsterm.h (ns_popup_dialog): Adjust prototype.
5788 * nsterm.m (ns_create_terminal):
5789 * w32term.c (w32_create_terminal):
5790 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
5791 Setup popup_dialog_hook.
5792
5793 2014-06-04 Eli Zaretskii <eliz@gnu.org>
5794
5795 * w32heap.c (report_temacs_memory_usage): Improve the report by
5796 reporting the large blocks that are actually occupied at dump time.
5797
5798 * w32console.c (initialize_w32_display): Set the console
5799 menu_show_hook, otherwise TTY menus are broken on w32.
5800
5801 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5802
5803 Use terminal-specific hooks to display menus.
5804 * termhooks.h (struct terminal): New field menu_show_hook.
5805 * menu.h (<anonymous enum>): Bit flags for menu hooks.
5806 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
5807 Adjust prototypes.
5808 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
5809 * nsmenu.m (ns_menu_show):
5810 * w32menu.c (w32_menu_show):
5811 * xmenu.c (x_menu_show):
5812 * term.c (tty_menu_show): Adjust to use bit flags.
5813 (set_tty_hooks): Set menu_show_hook.
5814 * xterm.c (x_create_terminal):
5815 * nsterm.m (ns_create_terminal):
5816 * msdos.c (initialize_msdos_display):
5817 * w32term.c (w32_create_terminal): Likewise.
5818
5819 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
5820
5821 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
5822
5823 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5824
5825 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
5826 (FD_SET): Don't define on WINDOWSNT.
5827
5828 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5829
5830 * emacs.c: Include "sysselect.h", to define its inline functions.
5831 Reported by Glenn Morris in:
5832 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
5833
5834 Do not require libXt-devel when building with gtk.
5835 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
5836 dependency on libXt-devel.
5837 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
5838 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
5839 lwlib-widget.h now does this.
5840 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
5841
5842 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
5843
5844 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
5845 * process.c (add_read_fd, delete_read_fd, add_write_fd)
5846 (delete_write_fd, wait_reading_process_output):
5847 Remove now-redundant easserts.
5848 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
5849 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5850 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
5851 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
5852
5853 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5854
5855 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
5856 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
5857 (calloc): Don't undef, it is never defined.
5858 (HEAP_ENTRY_SHIFT): Remove unused macro.
5859
5860 * Makefile.in (C_HEAP_SWITCH): Remove.
5861 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
5862
5863 Fix MS-Windows build broken by menu changes on 2014-06-02.
5864 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
5865
5866 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
5867 Define instead of including ../lwlib/lwlib.h, which causes
5868 compilation errors due to missing X11 headers.
5869
5870 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5871
5872 * process.c (wait_reading_process_output): Omit incorrect test of
5873 p->infd against zero. Add easserts for infd having a plausible value.
5874
5875 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5876
5877 Adjust to match recent lwlib changes.
5878 * menu.h (xmalloc_widget_value): Replace by ...
5879 (make_widget_value): ... new prototype.
5880 * menu.c (xmalloc_widget_value): Replace by ...
5881 (make_widget_value): ... new function.
5882 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
5883 * gtkutil.c (malloc_widget_value, free_widget_value):
5884 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
5885 * keyboard.h (enum button_type, struct _widget_value):
5886 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
5887 Likewise.
5888 * nsmenu.m (ns_update_menubar, ns_menu_show):
5889 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
5890 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
5891 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
5892
5893 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5894
5895 * image.c (x_query_frame_background_color)
5896 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
5897 Fix --enable-gcc-warnings compilation without image libraries.
5898
5899 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5900
5901 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
5902 emulated break value only if it goes up.
5903 (sbrk): Add assertion that the INCREMENT argument is strictly
5904 zero. Improve and correct the commentary.
5905
5906 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5907
5908 Improve AIX-related merge from emacs-24.
5909 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
5910 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
5911 not on AIX; since we're on the trunk we can use enums more broadly.
5912
5913 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
5914
5915 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
5916
5917 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
5918 to min(value, whole).
5919
5920 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5921
5922 Bring back the changes to GDB-visible symbols, but only on AIX.
5923 And only if it's not pre-4.2 GCC.
5924 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5925 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5926 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5927 New macros.
5928
5929 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5930
5931 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
5932 with PT, not GPT. (Bug#16433)
5933
5934 Revert last changes to GDB-visible symbols.
5935 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
5936 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
5937 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5938 Delete macros.
5939
5940 2014-06-02 Glenn Morris <rgm@gnu.org>
5941
5942 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
5943
5944 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5945
5946 Fix port to 32-bit AIX with xlc (Bug#17598).
5947 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
5948 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
5949 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
5950 to work around a compiler bug in IBM xlc 12.1.
5951
5952 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5953
5954 * xterm.c (x_update_window_end): Don't invalidate the entire
5955 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5956 highlight needs to be redisplayed. (Bug#17588)
5957
5958 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5959
5960 Port the GDB-visible symbols to AIX.
5961 Without them, GDB doesn't work to debug Emacs, since the AIX linker
5962 optimizes away the relevant external symbols. Use enums instead;
5963 this suffices for the AIX port, which is 32-bit-only anyway.
5964 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5965 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5966 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5967 New macros.
5968
5969 Include sources used to create macuvs.h.
5970 * Makefile.in ($(srcdir)/macuvs.h): New rule.
5971 * macuvs.h: Use automatically-generated header.
5972
5973 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
5974
5975 Port signal-handling to DragonFly BSD (Bug#17646).
5976 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
5977 Move implementations from callproc.c to sysdep.c.
5978 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
5979 Move declarations from process.h to syssignal.h.
5980
5981 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
5982
5983 * callint.c (Ffuncall_interactively): Add usage.
5984
5985 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
5986
5987 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
5988
5989 2014-05-30 Eli Zaretskii <eliz@gnu.org>
5990
5991 * w32heap.c (malloc_before_dump, malloc_after_dump)
5992 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5993 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
5994 set errno where appropriate to emulate CRT functions.
5995
5996 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
5997
5998 Debugging facility to check whether 'const char *' points to
5999 relocatable data of non-pure Lisp string.
6000 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
6001 (mark_maybe_pointer): ... adjusted user.
6002 (relocatable_string_data_p): New function.
6003 * lisp.h (relocatable_string_data_p): Add prototype.
6004 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
6005 the pointer to relocatable Lisp data is not used.
6006
6007 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
6008
6009 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
6010 * atimer.c (block_atimers):
6011 * callproc.c (block_child_signal): Block SIGINT too;
6012 otherwise, its handler might now unblock signals that it shouldn't.
6013 * keyboard.c (read_char): Clear signal mask, since we may
6014 be in a SIGINT handler, and many signals may be masked.
6015 * keyboard.c (handle_interrupt):
6016 * sysdep.c (handle_arith_signal):
6017 Clear signal mask instead of just unblocking the signal that
6018 was received, since several signals may be blocked at this point.
6019
6020 2014-05-29 Eli Zaretskii <eliz@gnu.org>
6021
6022 * Makefile.in (TEMACS_POST_LINK): Remove target.
6023 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
6024 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
6025
6026 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
6027
6028 * xmenu.c (xdialog_show): Remove prototype, rename to
6029 x_dialog_show, remove 2nd arg because it's always zero
6030 and simplify accordingly.
6031 (xw_popup_dialog): Adjust user.
6032 * w32menu.c (w32_dialog_show): Adjust prototype, remove
6033 2nd arg because it's always zero and simplify accordingly.
6034 (w32_popup_dialog): Adjust user.
6035
6036 2014-05-29 Eli Zaretskii <eliz@gnu.org>
6037
6038 * w32heap.c (report_temacs_memory_usage): New function.
6039
6040 * unexw32.c (unexec) [ENABLE_CHECKING]:
6041 Call report_temacs_memory_usage.
6042
6043 * w32heap.h (report_temacs_memory_usage): Add prototype.
6044
6045 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
6046
6047 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
6048 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
6049
6050 2014-05-29 Eli Zaretskii <eliz@gnu.org>
6051
6052 * buffer.c (init_buffer): Accept an argument 'initialized'.
6053 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
6054 mmap_regions and mmap_fd, to avoid referencing stale data from the
6055 dump phase. Add an assertion for buffer text of buffers created
6056 in temacs before this function is called. (Bug#17622)
6057 (mmap_regions_1, mmap_fd_1): Remove unused variables.
6058
6059 * lisp.h (init_buffer): Update prototype.
6060
6061 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
6062
6063 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
6064
6065 * alloc.c (Fgarbage_collect): Fix compilation with
6066 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
6067
6068 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
6069
6070 * frame.c, frame.h (frame_char_to_pixel_position)
6071 (frame_set_mouse_position): Now static, and made private in
6072 frame.c rather than public in frame.h.
6073
6074 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
6075
6076 Refactor mouse positioning stuff to avoid code duplication.
6077 * frame.h (frame_char_to_pixel_position): New function.
6078 (x_set_mouse_position): Rename to...
6079 (frame_set_mouse_position): ...new function.
6080 (frame_set_mouse_pixel_position): Add prototype.
6081 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
6082 Rename to frame_set_mouse_pixel_position.
6083 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
6084 Adjust users.
6085 * xterm.h, w32term.h ( x_set_mouse_position)
6086 (x_set_mouse_pixel_position): Remove prototypes.
6087
6088 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
6089
6090 On X, always make pointer visible when deleting frame (Bug#17609).
6091 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
6092 Pass frame as arg.
6093 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
6094 Adjust prototypes.
6095 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
6096 * keyboard.c (gobble_input): If there is no terminal input error,
6097 make sure the pointer is visible for all frames on this terminal.
6098 * xterm.c (x_free_frame_resources): Enable pointer visibility if
6099 it was previously disabled.
6100
6101 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
6102
6103 * data.c (Fzerop): Move to Elisp.
6104 (syms_of_data): Don't defsubr it.
6105 * keyboard.c (echo_keystrokes_p): New function.
6106 (read_char, record_menu_key, read_key_sequence): Use it.
6107
6108 * callint.c (Qfuncall_interactively): New var.
6109 (Qcall_interactively): Remove.
6110 (Ffuncall_interactively): New function.
6111 (Fcall_interactively): Use it.
6112 (syms_of_callint): Defsubr it.
6113
6114 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
6115
6116 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
6117 relocated from under us.
6118
6119 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
6120
6121 Use mmap(2) emulation for allocating buffer text on MS-Windows.
6122 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
6123 configure, not from HEAPSIZE.
6124 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
6125
6126 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
6127 for MinGW, since it no longer uses gmalloc.
6128
6129 * buffer.c: Do not define mmap allocations functions for Windows.
6130 Remove mmap_find which is unused. Remove mmap_set_vars which does
6131 nothing useful.
6132 [WINDOWSNT]: Include w32heap.h.
6133 (init_buffer): Always allocate new memory for buffers.
6134
6135 * emacs.c: Remove mmap_set_vars calls.
6136
6137 * image.c (free_image): Undef free for Windows because it is
6138 redirected to our private version.
6139
6140 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
6141 (copy_executable_and_dump_data): Remove dumping the heap section.
6142 (unexec): Restore using_dynamic_heap after dumping.
6143
6144 * w32heap.c (dumped_data_commit, malloc_after_dump)
6145 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
6146 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
6147 (mmap_free): New functions.
6148
6149 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
6150
6151 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
6152
6153 * image.c (imagemagick_load_image): Use MagickRealType for local
6154 'color_scale', instead of double, to avoid a GCC warning about
6155 double promotion.
6156
6157 * xfns.c (Fx_window_property): Remove unused local.
6158
6159 Don't kill already-reaped process (Bug#17561).
6160 * process.c (process_send_signal): Fix race condition where a
6161 subprocess was reaped by a signal handler between the check for
6162 liveness and calling 'kill', which meant that Emacs could in
6163 theory kill an innocent bystander process. Do the fix by blocking
6164 SIGCHLD in a critical section that checks liveness before killing.
6165
6166 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6167
6168 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
6169
6170 2014-05-26 Ken Brown <kbrown@cornell.edu>
6171
6172 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
6173 even if !CYGWIN (see bug#17510).
6174
6175 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
6176
6177 * nsfns.m (Fns_do_applescript): Surround NSApp run
6178 with calls to ns_init_events, ns_finish_events (Bug#17424).
6179
6180 * nsterm.h (ns_init_events, ns_finish_events): Declare.
6181
6182 * nsterm.m (ns_init_events, ns_finish_events): New functions.
6183 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
6184
6185 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
6186 with calls to ns_init_events, ns_finish_events (Bug#17424).
6187
6188 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6189
6190 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
6191 if we are iterating over an object that generates glyphs for
6192 marginal areas. (Bug#17585)
6193
6194 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
6195
6196 * xdisp.c (safe__call1, safe__eval): Now static.
6197
6198 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6199
6200 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
6201 (safe_call, safe__call1): Construct a va_list argument for safe_call.
6202 (safe_call1): Call safe_call instead of safe__call directly.
6203
6204 2014-05-26 Ken Brown <kbrown@cornell.edu>
6205
6206 * w32term.c (x_delete_display) [CYGWIN]: Don't free
6207 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
6208 once. (Bug#17510)
6209
6210 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
6211
6212 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
6213 (safe__call, safe__call1, safe__eval): New functions.
6214 (safe_call): Use it.
6215 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
6216 (display_mode_element): Same for `:eval'.
6217
6218 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
6219
6220 Fix port to 32-bit AIX (Bug#17540).
6221 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
6222 twice. _text already includes this offset.
6223 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
6224
6225 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6226
6227 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
6228 when closest_pos is identical to to_charpos, don't recurse, since
6229 we already tried that, and failed. (Bug#17539)
6230
6231 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
6232 unwinding when frame's faces were not initialized yet, increment
6233 the frame's image-cache reference count before calling
6234 x_free_frame_resources. Don't dereference
6235 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
6236
6237 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
6238
6239 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
6240 nsterm.m now.
6241
6242 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
6243 macfont.m, call draw with adjusted arguments so font drivers
6244 don't need to do that.
6245
6246 * macfont.m (macfont_draw): Merge changes from Macport.
6247
6248 2014-05-24 Eli Zaretskii <eliz@gnu.org>
6249
6250 * alloc.c (garbage_collect_1): New function, with all of the guts
6251 of Fgarbage_collect.
6252 (mark_stack): Accept an argument END and don't mark Lisp objects
6253 on the stack beyond the address given by END. Calculation of END
6254 was moved to Fgarbage_collect.
6255 (Fgarbage_collect): Calculate the end address of the stack portion
6256 that needs to be examined by mark_stack, and pass that address to
6257 garbage_collect_1, which will pass it to mark_stack.
6258 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
6259 for more details about the underlying problems. In particular,
6260 this avoids dumping Emacs with the large hash-table whose value is
6261 held in purify-flag for most of the time loadup.el runs.
6262
6263 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
6264
6265 * xfns.c (x_window_property_intern): New function (code from
6266 x_window_property).
6267 (Fx_window_property): Call x_window_property_intern. If property
6268 not found and NILP (source) and outer window != inner window,
6269 check outer window for property (Bug#17537).
6270
6271 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
6272
6273 Supply malloc and alloc_size attributes for extern allocators.
6274 This documents the C API, and helps GCC generate a bit better code.
6275 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
6276 (ATTRIBUTE_MALLOC_SIZE): New macros.
6277 * gmalloc.c (malloc, realloc, calloc):
6278 * gtkutil.h (malloc_widget_value):
6279 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
6280 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
6281 Use them.
6282
6283 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
6284
6285 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
6286 * image.c (imagemagick_load_image): Port to hosts that do not use
6287 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
6288
6289 2014-05-21 Leo Liu <sdl.web@gmail.com>
6290
6291 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
6292
6293 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
6294
6295 * dbusbind.c (xd_signature): Revert last 2 patches.
6296
6297 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
6298
6299 Allow any non-nil value to count as true in bool-vector.
6300 Likewise for xd_signature in dbusbind.c.
6301 This is more consistent with the usual practice in Emacs, which is
6302 that any non-nil value counts as true.
6303 * alloc.c (Fbool_vector): Don't require args to be t or nil.
6304 * dbusbind.c (xd_signature): Likewise, for booleans.
6305 * data.c, lisp.h (Qbooleanp):
6306 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
6307
6308 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
6309
6310 * lisp.h (CHECK_BOOLEAN): New function.
6311 * alloc.c (Fbool_vector): New function.
6312 (syms_of_alloc): Defsubr it.
6313 * data.c (Qbooleanp): New symbol.
6314 (syms_of_data): DEFSYM it.
6315 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
6316
6317 * font.c (font_matching_entity): Extract font-entity object
6318 from the vector of matching entities (Bug#17486).
6319
6320 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
6321
6322 Assume C99 or later (Bug#17487).
6323 * bytecode.c (B__dummy__): Remove.
6324 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
6325 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
6326 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
6327 * regex.c (DEBUG_PRINT): Assume varargs macros.
6328 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
6329
6330 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
6331
6332 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
6333 memory for every buffer that was dumped.
6334
6335 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
6336
6337 * fns.c (Freverse): Allow vectors, bool vectors and strings.
6338 (Fnreverse): Allow vectors and bool vectors.
6339
6340 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
6341
6342 Minor cleanup for terminal setup.
6343 * termhooks.h (create_terminal): Adjust prototype.
6344 * terminal.c (create_terminal): Pass output method and RIF as args.
6345 (init_initial_terminal):
6346 * nsterm.m (ns_create_terminal):
6347 * term.c (init_tty):
6348 * w32term.c (w32_create_terminal):
6349 * xterm.c (x_create_terminal): Adjust users.
6350 Avoid redundant NULL initializers and add comments.
6351
6352 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
6353
6354 * keyboard.c (Qdeactivate_mark): Now static.
6355
6356 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
6357
6358 If available, use Xfixes extension to do pointer blanking.
6359 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
6360 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
6361 (make_invisible_cursor): Move to...
6362 * xterm.c (make_invisible_cursor): ...here.
6363 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
6364 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
6365 (x_term_init): Call to x_setup_pointer_blanking.
6366 (XTtoggle_invisible_pointer): Use blanking specific to this display.
6367 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
6368
6369 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6370
6371 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
6372
6373 2014-05-12 Glenn Morris <rgm@gnu.org>
6374
6375 * fileio.c (Ffile_executable_p): Doc tweak.
6376
6377 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
6378
6379 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
6380 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
6381
6382 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
6383
6384 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
6385
6386 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6387
6388 Fix initialization of minibuffer history variable (Bug#17430).
6389 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
6390 Move the initialization up to prevent any "value void" message.
6391
6392 2014-05-08 Samuel Bronson <naesten@gmail.com>
6393
6394 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
6395 are matched (bug#17413).
6396
6397 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6398
6399 Stop tooltips pulling Emacs window to front (Bug#17408).
6400 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
6401 SetWindowPos invocations.
6402
6403 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
6404
6405 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
6406 not initialized (Bug#17398).
6407
6408 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
6409
6410 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
6411
6412 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
6413
6414 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
6415 [HAVE_NS]: Do not include png.h.
6416 (x_query_frame_background_color): New function.
6417 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
6418 (png_load_body): Coalesce duplicate code.
6419
6420 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
6421
6422 Consult libpng-config more consistently (Bug#17339).
6423 * Makefile.in (PNG_CFLAGS): New var.
6424 (ALL_CFLAGS): Use it.
6425 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
6426 CFLAGS now handles this.
6427
6428 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
6429
6430 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
6431 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
6432 because WCONTINUED is always defined now.
6433 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
6434
6435 2014-05-03 Eli Zaretskii <eliz@gnu.org>
6436
6437 * buffer.c (overlay_strings): Fix the wording of the commentary.
6438
6439 2014-05-01 Glenn Morris <rgm@gnu.org>
6440
6441 * floatfns.c (Fisnan):
6442 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
6443
6444 2014-05-01 Eli Zaretskii <eliz@gnu.org>
6445
6446 * term.c (tty_menu_activate): A better initialization for cursor
6447 coordinates.
6448
6449 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
6450
6451 * intervals.c: Tighten assertions.
6452 (create_root_interval): Make sure the interval is not empty.
6453 (intervals_equal): Use booleans.
6454 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
6455 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
6456 (balance_possible_root_interval): Simplify and use booleans.
6457 (split_interval_right, split_interval_left): Check LENGTH, and remove
6458 now redundant assertion.
6459 (adjust_intervals_for_insertion): Remove now redundant assertions.
6460 (delete_node, interval_deletion_adjustment)
6461 (adjust_intervals_for_deletion, merge_interval_right)
6462 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
6463 (reproduce_interval): Make sure the interval is not empty.
6464
6465 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
6466
6467 * term.c (tty_menu_activate): Don't assume row and col are initialized.
6468 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
6469 satisfaction that they would always be initialized.
6470
6471 2014-04-30 Eli Zaretskii <eliz@gnu.org>
6472
6473 * term.c (tty_menu_display): Move the cursor to the active menu item.
6474 (tty_menu_activate): Return the cursor to the active menu item
6475 after displaying the menu and after displaying help-echo.
6476 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
6477 for the details of why this is needed by screen readers and
6478 Braille displays.
6479
6480 2014-04-30 Glenn Morris <rgm@gnu.org>
6481
6482 * process.c (handle_child_signal):
6483 Handle systems without WCONTINUED. (Bug#15110, 17339)
6484
6485 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
6486
6487 * window.c (struct saved_window): Remove mark.
6488 (Fset_window_configuration, save_window_save)
6489 (compare_window_configurations): Don't touch marks any more.
6490
6491 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
6492
6493 Use bits_word for gcmarkbits.
6494 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
6495 bits_word is typically a tad more efficient for mark bits than
6496 unsigned is, so use bits_word. All uses changed.
6497 * lisp.h (BITS_PER_INT): Remove; no longer used.
6498
6499 Avoid undefined behavior in signed left shift.
6500 This ports to GCC 4.9.0 with -fsanitize=undefined.
6501 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
6502 * data.c (Fash):
6503 * regex.c (extract_number):
6504 * lisp.h (make_number, XINT):
6505 Do not shift a 1 bit left into a sign bit.
6506 * alloc.c (struct cons_block, struct float_block): Use unsigned,
6507 not int, for gcmarkbits. All uses changed.
6508
6509 2014-04-25 Eli Zaretskii <eliz@gnu.org>
6510
6511 * search.c (Fnewline_cache_check): Don't try to count newlines
6512 outside the buffer's restriction, as find_newline doesn't support that.
6513
6514 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
6515
6516 * window.c (Fset_window_configuration): Deactivate the mark before
6517 unsetting the mark.
6518 (set_window_buffer): Ignore window_initialized.
6519 (window_initialized): Remove.
6520 * keyboard.c (Qdeactivate_mark): Not static any more.
6521 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
6522 Update all callers.
6523
6524 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
6525
6526 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
6527 and to clang 3.4, which have fixed the bug. This should let us
6528 run a bit faster on these platforms when address sanitization is
6529 in effect.
6530
6531 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
6532
6533 Port to GCC 4.9.0 with --enable-gcc-warnings.
6534 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
6535 All uses removed.
6536 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
6537 a way that also works with GCC 4.9.0.
6538
6539 * search.c (Fnewline_cache_check): Remove unused locals.
6540
6541 2014-04-22 Eli Zaretskii <eliz@gnu.org>
6542
6543 * search.c (find_newline1): New subroutine.
6544 (Fnewline_cache_check): New function.
6545 (syms_of_search): Defsubr it.
6546
6547 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
6548
6549 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
6550 * keyboard.c (unblock_input): Add comment.
6551 * xgselect.c (xg_select): Prevent Glib main loop recursion.
6552
6553 2014-04-22 Daniel Colascione <dancol@dancol.org>
6554
6555 * lread.c (readevalloop_eager_expand_eval): New function
6556 that can recurse into toplevel forms.
6557 (readevalloop): Call it.
6558 * lisp.h: Declare Qprogn.
6559 * callint.c (Qprogn): No longer static.
6560
6561 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
6562
6563 * intervals.c (rotate_right, rotate_left): Fix up length computation.
6564 Also change identifiers to match the comments, and add more assertions
6565 (bug#16234).
6566
6567 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
6568
6569 * emacs.c (close_output_streams): Don't clear and restore errno.
6570
6571 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
6572
6573 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
6574 never becomes visible, i.e. using XMonad (Bug#17237).
6575
6576 2014-04-18 Eli Zaretskii <eliz@gnu.org>
6577
6578 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
6579 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
6580 (Fline_pixel_height): Don't assume that the current buffer and the
6581 selected window's buffer are one and the same. (Bug#17281)
6582
6583 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
6584 paragraph-start cache before the newline cache. (Bug#17269)
6585
6586 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
6587
6588 * term.c (tty_send_additional_strings): No need to fflush here,
6589 as callers fflush.
6590 (tty_set_terminal_modes): fflush after sending additional strings,
6591 not before.
6592
6593 2014-04-17 Daniel Colascione <dancol@dancol.org>
6594
6595 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
6596 New symbols.
6597 (tty_send_additional_strings): New function.
6598 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
6599 (syms_of_term): Intern tty-mode-set-strings and
6600 tty-mode-reset-strings.
6601
6602 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6603
6604 * window.c (save_window_save): Lookup window_point_insertion_type in
6605 the right buffer (bug#15457).
6606 (Qwindow_point_insertion_type): New var.
6607 (syms_of_window): Initialize it.
6608
6609 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6610
6611 Fix the MSDOS build.
6612 * unexcoff.c [MSDOS]: Include libc/atexit.h.
6613 (copy_text_and_data): Zero out the atexit chain pointer before
6614 dumping Emacs.
6615
6616 * termhooks.h (encode_terminal_code): Update prototype.
6617
6618 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
6619 visible for all DOS_NT ports, not just WINDOWSNT.
6620 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
6621
6622 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
6623 unless it is defined.
6624 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
6625
6626 * process.c (close_on_exec, accept4, process_socket): Move into
6627 the "ifdef subprocesses" part.
6628 (catch_child_signal): Condition by "ifdef subprocesses".
6629 (syms_of_process) <Qinternal_default_process_sentinel>
6630 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
6631
6632 * msdos.h: Add prototypes for new functions.
6633 (EINPROGRESS): Define.
6634 (O_CLOEXEC): Define to zero.
6635
6636 * msdos.c (check_window_system): Remove unnecessary an
6637 incompatible duplicate function.
6638 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
6639 New functions in support of new functionality.
6640
6641 * menu.c (single_menu_item): Add visual indication of submenu
6642 also for menus on MSDOS frames.
6643 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
6644
6645 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
6646 when async subprocesses aren't supported.
6647
6648 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
6649
6650 * emacs.c (close_output_streams): Zero out errno before calling
6651 close_stream.
6652
6653 * dired.c [MSDOS]: Include msdos.h.
6654
6655 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
6656 (DATA_START) [MSDOS]: Define.
6657 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
6658
6659 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
6660 Ifdef away for MSDOS.
6661 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
6662 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
6663 for MSDOS.
6664 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
6665 Use temporary file template that is compatible with mkostemp.
6666 Move vfork-related portions under #ifndef MSDOS.
6667 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
6668
6669 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6670
6671 * buffer.c (Foverlays_at): Add argument `sorted'.
6672
6673 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6674
6675 * insdel.c (invalidate_buffer_caches): When deleting or replacing
6676 text, invalidate the bidi_paragraph_cache upto and including the
6677 preceding newline.
6678
6679 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6680
6681 Port to IRIX 6.5 (Bug#9684).
6682 * conf_post.h (INET6) [IRIX6_5]: Define.
6683 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
6684 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
6685
6686 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6687
6688 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
6689 before passing it to system APIs.
6690
6691 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6692
6693 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
6694 make sure stack.byte_string_start is not de-adjusted by pushhandler.
6695
6696 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6697
6698 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
6699
6700 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
6701
6702 Remove DATA_SEG_BITS.
6703 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
6704 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
6705 cc, but that platform is so old that SGI itself stopped supporting
6706 it in December 2013. If you still need Emacs on IRIX, please
6707 either compile with GCC and port the undumping code, or run
6708 './configure --with-wide-int'.
6709 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
6710 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
6711 DEFINE_GDB_SYMBOL_START way to define it.
6712 (NONPOINTER_BITS): New macro.
6713 (EMACS_INT): Use it.
6714 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
6715 the problem and/or configuring --with-wide-int.
6716 (USE_LSB_TAG): Simplify, based on above changes.
6717 (gdb_DATA_SEG_BITS): Remove. All uses removed.
6718 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
6719
6720 2014-04-12 Eli Zaretskii <eliz@gnu.org>
6721
6722 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
6723 covered by a display string that ends in a newline, and that cases
6724 going back by DVPOS lines to hit the search limit, lift the limit
6725 and go back until DVPOS is reached. (Bug#17244)
6726
6727 * indent.c (Fvertical_motion): Handle correctly the case when the
6728 display string is preceded by an empty line.
6729
6730 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
6731 use S_IWRITE instead.
6732
6733 2014-04-11 Glenn Morris <rgm@gnu.org>
6734
6735 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
6736
6737 2014-04-11 Ken Brown <kbrown@cornell.edu>
6738
6739 * Makefile.in (EMACS_MANIFEST): Revert last change.
6740
6741 2014-04-10 Daniel Colascione <dancol@dancol.org>
6742
6743 * puresize.h (BASE_PURESIZE): Increase.
6744
6745 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
6746
6747 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
6748
6749 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
6750 region handling (and don't call signal_before_change) if
6751 inhibit_modification_hooks is set.
6752 (signal_before_change): Don't check inhibit_modification_hooks any more.
6753
6754 2014-04-08 Daniel Colascione <dancol@dancol.org>
6755
6756 * alloc.c (sweep_symbols, mark_object): Assert that symbol
6757 function cells contain valid lisp objects. (Modified version of
6758 patch from Dmitry).
6759
6760 * alloc.c (detect_suspicious_free): Split actual stack capturing
6761 out into new function for easier breakpoint setting.
6762 (note_suspicious_free): New function.
6763
6764 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
6765
6766 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
6767
6768 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
6769 (symbol_block_pinned): New var.
6770 (Fmake_symbol): Initialize `pinned'.
6771 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
6772 pinned and signal an error for un-purifiable objects.
6773 (pure_cons): Use it.
6774 (Fpurecopy): Use it, except for objects that can't be purified.
6775 (mark_pinned_symbols): New function.
6776 (Fgarbage_collect): Use it.
6777 (gc_sweep): Remove hack made unnecessary.
6778
6779 2014-04-07 Glenn Morris <rgm@gnu.org>
6780
6781 * keyboard.c (Fopen_dribble_file): Doc tweak.
6782
6783 2014-04-07 Ken Brown <kbrown@cornell.edu>
6784
6785 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
6786
6787 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
6788
6789 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
6790 We have a substitute execinfo.h on hosts that lack it.
6791 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
6792 isn't optimized away.
6793
6794 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
6795
6796 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
6797 * alloc.c (memory_full):
6798 * charset.c (syms_of_charset):
6799 * doc.c (Fsnarf_documentation):
6800 * emacs.c (main):
6801 * font.c (BUILD_STYLE_TABLE):
6802 * keyboard.c (make_lispy_event):
6803 * profiler.c (setup_cpu_timer):
6804 * xgselect.c (xg_select):
6805 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
6806 Use ARRAYELTS.
6807 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
6808 Replace the only use with ARRAYELTS (font_property_table).
6809 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
6810
6811 2014-04-03 Daniel Colascione <dancol@dancol.org>
6812
6813 * xterm.c (x_term_init):
6814 * xfns.c (best_xim_style):
6815 * xfaces.c (Fdump_colors):
6816 * w32fns.c (w32_default_color_map):
6817 * w32.c (init_environment, N_ENV_VARS):
6818 * unexcw.c (read_exe_header):
6819 * term.c (term_get_fkeys_1):
6820 * sysdep.c (init_baud_rate):
6821 * nsterm.m (ns_convert_key):
6822 * nsfns.m (get_geometry_from_preferences):
6823 * msdos.c (dos_set_window_size, init_environment):
6824 * macfont.m (mac_font_get_glyph_for_cid)
6825 (macfont_store_descriptor_attributes)
6826 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
6827 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
6828 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
6829 (syms_of_keyboard):
6830 * image.c (xpm_str_to_color_key):
6831 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
6832 * frame.c (x_set_frame_parameters):
6833 * fileio.c (Ffile_selinux_context):
6834 * emacs.c (sort_args):
6835 * dosfns.c (msdos_stdcolor_name):
6836 * dired.c (file_attributes):
6837 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
6838 Change expressions of the form sizeof(arr) / sizeof(arr[0])
6839 to ARRAYELTS (arr).
6840
6841 2014-04-02 Daniel Colascione <dancol@dancol.org>
6842
6843 * data.c (Ffset): Abort if we're trying to set a function call to
6844 a dead lisp object.
6845
6846 * lisp.h (ARRAYELTS): New macro.
6847
6848 * alloc.c: Include execinfo.h if available.
6849 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
6850 (suspicious_free_record): New structure.
6851 (suspicious_objects, suspicious_object_index)
6852 (suspicious_free_history, suspicious_free_history_index):
6853 New variables.
6854 (find_suspicious_object_in_range, detect_suspicious_free)
6855 (Fsuspicious_object): New functions.
6856 (cleanup_vector): Call find_suspicious_object_in_range.
6857
6858 2014-04-02 Martin Rudalics <rudalics@gmx.at>
6859
6860 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
6861 width from font width (Bug#17163).
6862
6863 * frame.c (x_set_frame_parameters): Calculate default values of
6864 new frame sizes only after all other frame parameters have been
6865 processed (Bug#17142).
6866
6867 2014-04-02 Ken Brown <kbrown@cornell.edu>
6868
6869 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
6870 (Bug#17112)
6871
6872 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6873
6874 * xterm.c (x_draw_image_glyph_string): Adjust image background
6875 width accordingly when its x position is adjusted. (Bug#17115)
6876
6877 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
6878
6879 * font.c (font_list_entities): Do not add empty vector to font cache.
6880 (font_matching_entity): Likewise. If matching entity is found, insert
6881 1-item vector with this entity instead of entity itself (Bug#17125).
6882
6883 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
6884
6885 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
6886
6887 * fns.c (validate_subarray): Rename from validate_substring,
6888 since it works for vectors too. New arg ARRAY. Optimize for the
6889 non-nil case. Instead of returning bool, throw an error if out of
6890 range, so that the caller needn't do that. All uses changed.
6891 Report original values if out of range.
6892 (Fsubstring, Fsubstring_no_properties, secure_hash):
6893 Also optimize the case where FROM is 0 or TO is the size.
6894
6895 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
6896
6897 * search.c (Freplace_match): Use make_specified_string.
6898 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
6899 to catch bogus override face of glyph strings.
6900 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
6901 Move common substring range checking code to...
6902 (validate_substring): ...this function.
6903
6904 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
6905
6906 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
6907
6908 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
6909
6910 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
6911 bar is zero height, just return (Bug#16976).
6912 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
6913
6914 * nsterm.h (EmacsView): Add wait_for_tool_bar.
6915
6916 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
6917 is nil. If waiting for toolbar to complete, force a redraw.
6918
6919 2014-03-28 Glenn Morris <rgm@gnu.org>
6920
6921 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
6922 (emacs_bugreport): New variable.
6923 (usage_message): Use PACKAGE_BUGREPORT.
6924 (syms_of_emacs) <report-emacs-bug-address>: New variable.
6925
6926 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
6927
6928 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
6929
6930 Port recent signal-related changes to FreeBSD.
6931 Reported by Herbert J. Skuhra.
6932 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
6933 Move decls from here ...
6934 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
6935
6936 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6937
6938 * w32term.c (x_draw_image_glyph_string): Fix computation of height
6939 and width of image background when it is displayed with a 'box'
6940 face. (Bug#17115)
6941
6942 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
6943
6944 More backward-compatible fix to char-equal core dump (Bug#17011).
6945 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
6946 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
6947
6948 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
6949
6950 * image.c (init_svg_functions): When loading SVG-related libraries,
6951 free already loaded libraries if the initialization fails.
6952 (rsvg_handle_set_size_callback): Remove declaration, unused.
6953
6954 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
6955
6956 Fix core dump in char-equal (Bug#17011).
6957 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
6958 unibyte buffers, as we can't tell whether the characters are
6959 actually unibyte.
6960
6961 * insdel.c (adjust_markers_for_delete): Remove unused local.
6962
6963 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
6964
6965 Have (MARKER . ADJUSTMENT) undo records always be immediately
6966 after their corresponding (TEXT . POS) record in undo list.
6967 (Bug#16818)
6968 * lisp.h (record-delete): New arg record_markers.
6969 (record_marker_adjustment): No longer needed outside undo.c.
6970 * insdel.c (adjust_markers_for_delete): Move calculation of marker
6971 adjustments to undo.c's record_marker_adjustments. Note that
6972 fileio.c's decide_coding_unwind is another caller to
6973 adjust_markers_for_delete. Because it has undo list bound to t,
6974 it does not rely on adjust_markers_for_delete to record marker
6975 adjustments.
6976 (del_range_2): Swap call to record_delete and
6977 adjust_markers_for_delete so as undo marker adjustments are
6978 recorded before current deletion's adjustments, as before.
6979 (adjust_after_replace):
6980 (replace_range): Pass value for new record_markers arg to
6981 delete_record.
6982 * undo.c (record_marker_adjustment): Rename to
6983 record_marker_adjustments and made static.
6984 (record_delete): Check record_markers arg and call
6985 record_marker_adjustments.
6986 (record_change): Pass value for new record_markers arg to
6987 delete_record.
6988 (record_point): at_boundary calculation no longer needs to account
6989 for marker adjustments.
6990
6991 2014-03-26 Martin Rudalics <rudalics@gmx.at>
6992
6993 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
6994 (Bug#17077).
6995
6996 2014-03-26 Glenn Morris <rgm@gnu.org>
6997
6998 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
6999
7000 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
7001
7002 * buffer.c (struct sortvec): Add field `spriority'.
7003 (compare_overlays): Use it.
7004 (sort_overlays): Set it.
7005
7006 2014-03-26 Eli Zaretskii <eliz@gnu.org>
7007
7008 * xdisp.c (redisplay_window): If all previous attempts to find the
7009 cursor row failed, try a few alternatives before falling back to
7010 the top-most row of the window. Use row_containing_pos. (Bug#17047)
7011
7012 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
7013
7014 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
7015 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
7016
7017 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
7018 variables on Windows.
7019
7020 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
7021
7022 * w32.c (unsetenv): Remove unused var `retval'.
7023 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
7024
7025 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
7026 (start_watching): Remove unused var `thr'.
7027
7028 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
7029 (find_child_console): Remove unnecesary var `thread_id'.
7030
7031 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
7032 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
7033
7034 2014-03-26 Glenn Morris <rgm@gnu.org>
7035
7036 * filelock.c (Flock_buffer): Doc tweak.
7037
7038 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
7039 * emacs.c (shut_down_emacs):
7040 * fileio.c (Finsert_file_contents, write_region):
7041 * filelock.c (top-level, syms_of_filelock):
7042 * insdel.c (prepare_to_modify_buffer_1):
7043 CLASH_DETECTION is always defined now.
7044
7045 2014-03-25 Eli Zaretskii <eliz@gnu.org>
7046
7047 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
7048 DLL handle, to speed up thread startup.
7049
7050 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
7051
7052 Handle sigmask better with nested signal handlers (Bug#15561).
7053 * atimer.c (sigmask_atimers): Remove.
7054 Remaining use rewritten to use body of this function.
7055 * atimer.c (block_atimers, unblock_atimers):
7056 * callproc.c (block_child_signal, unblock_child_signal):
7057 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
7058 New arg OLDSET. All callers changed.
7059 * atimer.c (block_atimers, unblock_atimers):
7060 * callproc.c (block_child_signal, unblock_child_signal):
7061 * keyboard.c (handle_interrupt):
7062 * sound.c (vox_configure, vox_close):
7063 Restore the old signal mask rather than unilaterally clearing bits
7064 from the mask, in case a handler is running within another
7065 handler. All callers changed.
7066 * lisp.h, process.c, process.h, term.c:
7067 Adjust decls and callers to match new API.
7068 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
7069 signal handlers aren't supposed to use floating point anyway.
7070 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
7071
7072 2014-03-23 Daniel Colascione <dancol@dancol.org>
7073
7074 Split gc_sweep into discrete functions for legibility and better
7075 stack traces.
7076
7077 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
7078 (sweep_vectors): Fix typo in comment.
7079 (sweep_conses, sweep_floats, sweep_intervals)
7080 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
7081 (gc_sweep): Call new functions, to which existing functionality is
7082 moved.
7083 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
7084
7085 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
7086
7087 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
7088
7089 2014-03-23 Daniel Colascione <dancol@dancol.org>
7090
7091 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
7092 only if xic_style calls for it. This change allows Emacs to work
7093 with ibus. Also, don't leak resources if create_frame_xic fails,
7094 and stop caching xic_style across different displays.
7095 (supported_xim_styles): Make const.
7096 (best_xim_style): Remove first parameter: it's always just
7097 supported_xim_styles. Change to look at supported_xim_styles
7098 directly.
7099
7100 2014-03-23 Daniel Colascione <dancol@dancol.org>
7101
7102 * term.c (init_tty): Rearrange condition for clarity; print
7103 appropriate diagnostic.
7104
7105 2014-03-23 Daniel Colascione <dancol@dancol.org>
7106
7107 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
7108 array. (ASAN caught.)
7109
7110 2014-03-22 Glenn Morris <rgm@gnu.org>
7111
7112 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
7113
7114 2014-03-22 Daniel Colascione <dancol@dancol.org>
7115
7116 * process.c (conv_sockaddr_to_lisp): When extracting the string
7117 names of AF_LOCAL sockets, stop before reading uninitialized memory.
7118
7119 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7120
7121 Fix regression introduced by patch for Bug#10500.
7122 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
7123 * w32term.c (x_draw_image_relief): Likewise.
7124
7125 2014-03-21 Martin Rudalics <rudalics@gmx.at>
7126
7127 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
7128 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
7129 maximize a frame for odd default fonts.
7130
7131 2014-03-21 Glenn Morris <rgm@gnu.org>
7132
7133 * minibuf.c (history-length): Increase default from 30 to 100.
7134
7135 2014-03-21 Daniel Colascione <dancol@dancol.org>
7136
7137 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
7138 every time we switch to minibuffer.
7139
7140 * alloc.c (lisp_align_malloc, allocate_string_data)
7141 (allocate_vectorlike): Allow mmap allocation of lisp objects.
7142 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
7143
7144 2014-03-21 Eli Zaretskii <eliz@gnu.org>
7145
7146 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
7147 support more "verbs".
7148
7149 2014-03-21 Daniel Colascione <dancol@dancol.org>
7150
7151 Always prohibit dumping a dumped Emacs.
7152
7153 * emacs.c (might_dump): New variable.
7154 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
7155 * lisp.h (might_dump): Declare.
7156 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
7157
7158 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
7159
7160 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
7161
7162 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
7163
7164 * doc.c (store_function_docstring): Warn when we don't know where to
7165 put a docstring.
7166 (Fsubstitute_command_keys): Don't advertise the fact that
7167 text-properties are dropped, since we think it's a bug that we'll fix.
7168
7169 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
7170 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
7171 * frame.c (frame_garbaged): Make "docstring" more precise.
7172
7173 2014-03-20 Glenn Morris <rgm@gnu.org>
7174
7175 * charset.c (init_charset): When we cannot find the charsets directory,
7176 mention if EMACSDATA is set.
7177
7178 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
7179
7180 * fns.c (Frandom): Fix rare bug where the result isn't random.
7181
7182 Fix porting inconsistency about rounding to even.
7183 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
7184 This way, the unusual !HAVE_RINT case acts like the usual
7185 HAVE_RINT case, and we can fix the documentation accordingly.
7186
7187 2014-03-19 Eli Zaretskii <eliz@gnu.org>
7188
7189 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
7190 (w32_wnd_proc): Initialize the dwHoverTime member of
7191 TRACKMOUSEEVENT structure.
7192
7193 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
7194
7195 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
7196
7197 2014-03-16 Eli Zaretskii <eliz@gnu.org>
7198
7199 * search.c (find_newline): Speed up the function when using the
7200 newline cache, by halving the number of calls to
7201 region_cache_forward and region_cache_backward. (Bug#16830)
7202
7203 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
7204
7205 * buffer.c (Fset_buffer): Document return value (bug#17015).
7206
7207 2014-03-14 Martin Rudalics <rudalics@gmx.at>
7208
7209 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
7210 nil, always resize character wise to avoid potential loss of the
7211 mode line (Bug#16923 related).
7212
7213 2014-03-12 Martin Rudalics <rudalics@gmx.at>
7214
7215 * frame.c (x_set_frame_parameters): Always calculate new sizes
7216 pixelwise to avoid potential loss when rounding.
7217
7218 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
7219
7220 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
7221 * xterm.c (x_free_frame_resources): Free all allocated cursors.
7222
7223 2014-03-10 Eli Zaretskii <eliz@gnu.org>
7224
7225 * w32.c (fstatat): Don't add an extra slash if the argument ends
7226 with a slash: this fails the subsequent call to stat_worker on
7227 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
7228
7229 2014-03-09 Martin Rudalics <rudalics@gmx.at>
7230
7231 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
7232
7233 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
7234
7235 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
7236
7237 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
7238 when frame is only on one screen (Bug#14713).
7239
7240 2014-03-08 Eli Zaretskii <eliz@gnu.org>
7241
7242 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
7243 there's a valid wrap point in the display line, the last glyph
7244 cannot "just barely fit" on this row, because display_line doesn't
7245 let it. Instead, proceed as if the last glyph didn't fit, so that
7246 we eventually back up the iterator to the wrap point. This avoids
7247 delusional behavior of move_it_to, whereby it proceeds to the next
7248 display line, but sets current_x to zero for all the glyphs that
7249 without word-wrap would fit on the previous display line.
7250 One result was that visual-order cursor movement behaved erratically
7251 under word-wrap.
7252 (Fmove_point_visually): Add code to find the x coordinate of the
7253 last character before wrap point, under word-wrap on a TTY.
7254
7255 2014-03-07 Eli Zaretskii <eliz@gnu.org>
7256
7257 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
7258 also return value of MOVE_POS_MATCH_OR_ZV from
7259 move_it_in_display_line_to, when moving from beginning of line to
7260 point's position. (Bug#16961)
7261
7262 2014-03-07 Martin Rudalics <rudalics@gmx.at>
7263
7264 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
7265 * window.c (Fselect_window): Explain NORECORD and
7266 `buffer-list-update-hook' in doc-string.
7267
7268 2014-03-06 Martin Rudalics <rudalics@gmx.at>
7269
7270 * window.c (Fother_window_for_scrolling): Check that
7271 Vother_window_scroll_buffer is a buffer.
7272
7273 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
7274
7275 * xterm.c (xim_initialize): Always pass a copy of resource name
7276 to XRegisterIMInstantiateCallback and eassert whether return
7277 value is True. Passing copy is important because Xlib doesn't
7278 make its own copy and resource name argument usually points to
7279 SSDATA (Vx_resource_name), which may be changed from Lisp.
7280 (xim_close_display): For XUnregisterIMInstantiateCallback,
7281 always eassert return value and pass exactly the same values
7282 as were used for XRegisterIMInstantiateCallback.
7283 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
7284 sources to check why if you are interested.
7285
7286 2014-03-05 Martin Rudalics <rudalics@gmx.at>
7287
7288 * dispnew.c (change_frame_size_1): Add new_lines instead of
7289 new_height, the latter may be still zero if passed as such.
7290 * window.c (Fwindow_pixel_height): Mention bottom divider in
7291 doc-string.
7292
7293 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
7294
7295 Fix "resource temporarily unavailable" with xgselect
7296 (Bug#16925).
7297 * xgselect.c: Include <stdbool.h>.
7298 (xg_select) [!USE_GTK]: Don't lose track of errno.
7299
7300 Fix minor --enable-gcc-warnings issues.
7301 * widget.c (update_various_frame_slots, EmacsFrameResize):
7302 Avoid unused locals. Prefer 'if' to '#if' when either will do.
7303
7304 2014-03-04 Ken Brown <kbrown@cornell.edu>
7305
7306 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
7307 represent the actual adjustment needed for alignment.
7308
7309 2014-03-04 Eli Zaretskii <eliz@gnu.org>
7310
7311 * gmalloc.c (aligned_alloc): Don't allocate more memory than
7312 needed, and don't reallocate if the initial allocation already
7313 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
7314
7315 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7316
7317 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
7318 (Bug#16932)
7319
7320 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
7321
7322 * cmds.c (delete-char): Update docstring pointing out that the
7323 function ignores `delete-active-region' and `overwrite-mode'.
7324
7325 2014-03-03 Eli Zaretskii <eliz@gnu.org>
7326
7327 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
7328
7329 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
7330 allocated buffer due to alignment.
7331 (freehook): If the block to be freed was allocated by
7332 'aligned_alloc', find its real pointer before calling 'free'.
7333 (Bug#16901)
7334 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
7335 backtrace.
7336
7337 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
7338
7339 * font.c (toplevel): Adjust comment about font cache layout.
7340 (font_clear_cache): Fix to match real font cache layout.
7341 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
7342 (Fframe_font_cache) [FONT_DEBUG]: New function.
7343 (syms_of_font) [FONT_DEBUG]: Defsubr it.
7344
7345 Avoid crashes when X fonts are erroneously freed on reused X
7346 'Display *' connection data (Bug#16069). Note that X font
7347 resources still may be leaked, but currently there is no way
7348 to completely avoid it.
7349 * xterm.h (struct x_display_info): New member x_id. Add comments.
7350 * xterm.c (x_display_id): New variable.
7351 (x_term_init): Assign identifier to each opened X connection.
7352 * xfont.c (struct xfont): New member x_display_id.
7353 (xfont_open): Initialize it with frame's display id.
7354 (xfont_close): Check whether font's display id matches the one
7355 recorded for the given display. Adjust comment.
7356 * xftfont.c (struct xftfont_info):
7357 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
7358
7359 2014-03-01 Martin Rudalics <rudalics@gmx.at>
7360
7361 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
7362 * window.c (Fother_window_for_scrolling): Don't try to scroll a
7363 killed Vother_window_scroll_buffer.
7364 (Vother_window_scroll_buffer): Fix doc-string accordingly.
7365
7366 2014-03-01 Eli Zaretskii <eliz@gnu.org>
7367
7368 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
7369 that start with more than 2 slashes as UNCs. (Bug#16751)
7370
7371 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
7372
7373 Fix a few crashes and leaks when cloning C strings.
7374 * alloc.c, lisp.h (dupstring): New function.
7375 * gtkutil.c (xg_get_font):
7376 * term.c (tty_default_color_capabilities):
7377 * xsettings.c (store_monospaced_changed)
7378 (store_font_name_changed, parse_settings)
7379 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
7380 This avoids some unlikely crashes due to accessing freed storage,
7381 and avoids some minor memory leaks in the more-typical case.
7382
7383 2014-02-28 Martin Rudalics <rudalics@gmx.at>
7384
7385 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
7386 cursor when modeline can't be dragged (Bug#16647).
7387
7388 2014-02-28 Glenn Morris <rgm@gnu.org>
7389
7390 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
7391 from custom-delayed-init-variables. (Bug#11565)
7392
7393 2014-02-27 Martin Rudalics <rudalics@gmx.at>
7394
7395 More fixes for mouse glyph calculations (Bug#16647).
7396 * window.c (coordinates_in_window): In intersection of
7397 horizontal and vertical window dividers prefer the horizontal
7398 one. Add some extra parens to last fix.
7399 (window_relative_x_coord): Return x-coordinate for header and
7400 mode line too.
7401 * xdisp.c (remember_mouse_glyph): In text area don't extend
7402 glyph into mode line to show the vertical drag cursor there
7403 immediately. Subdivide mouse glyphs in right fringes to show a
7404 horizontal drag cursor as soon as we enter the "grabbable width"
7405 portion. Handle vertical border case separately. Do not
7406 subdivide window divider areas.
7407 (note_mouse_highlight): On bottom divider of bottommost windows
7408 show vertical drag cursor only when the minibuffer window can be
7409 resized.
7410
7411 2014-02-27 Eli Zaretskii <eliz@gnu.org>
7412
7413 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
7414 reset by the face of the object just displayed. See also bug#76.
7415 (get_next_display_element): If the string came from a display
7416 property, examine the box face attribute at it->position, not at
7417 it->current.pos, since the latter was not updated yet. (Bug#16870)
7418 (handle_face_prop): Improve commentary.
7419
7420 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
7421
7422 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
7423 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
7424
7425 2014-02-26 Martin Rudalics <rudalics@gmx.at>
7426
7427 Fixes around Bug#16647.
7428 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
7429 ON_BOTTOM_DIVIDER cases.
7430 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
7431 only if the window has no right divider.
7432 (Fcoordinates_in_window_p): Fix doc-string.
7433
7434 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
7435
7436 * lread.c (Funintern): Fix doc to match advertised calling convention.
7437
7438 2014-02-24 Daniel Colascione <dancol@dancol.org>
7439
7440 * keyboard.c (read_char): Close race that resulted in lost events.
7441
7442 2014-02-22 Glenn Morris <rgm@gnu.org>
7443
7444 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
7445 * window.c (window-resize-pixelwise): Doc fixes.
7446
7447 * process.c (Finternal_default_process_filter)
7448 (Finternal_default_process_sentinel): Doc tweaks.
7449
7450 2014-02-21 Glenn Morris <rgm@gnu.org>
7451
7452 * process.c (Fprocess_buffer, Faccept_process_output)
7453 (Finternal_default_process_filter, Finternal_default_process_sentinel):
7454 Doc fixes.
7455
7456 2014-02-21 Martin Rudalics <rudalics@gmx.at>
7457
7458 * window.c (Fwindow_scroll_bar_width): New function.
7459
7460 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
7461
7462 Pacify GCC when configuring with --enable-gcc-warnings.
7463 * xdisp.c (move_it_in_display_line_to) [lint]:
7464 Initialize recently-added local.
7465
7466 2014-02-21 Daniel Colascione <dancol@dancol.org>
7467
7468 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
7469
7470 2014-02-20 Eli Zaretskii <eliz@gnu.org>
7471
7472 * xdisp.c (init_iterator): Don't dereference a bogus face
7473 pointer. (Bug#16819)
7474 (try_cursor_movement): Don't use cursor position if
7475 set_cursor_from_row failed to compute it. This avoids assertion
7476 violations in MATRIX_ROW.
7477 (move_it_in_display_line_to): Save the iterator state in ppos_it
7478 only once per call. Reimplement the method used to return to the
7479 best candidate position if all the positions found in display line
7480 are beyond TO_CHARPOS. This cuts down the number of calls to
7481 bidi_shelve_cache, which moves a lot of stuff when lines are long
7482 and include bidirectional text. (Bug#15555)
7483
7484 2014-02-20 Glenn Morris <rgm@gnu.org>
7485
7486 * data.c (Fdefalias): Doc fix.
7487
7488 2014-02-19 Eli Zaretskii <eliz@gnu.org>
7489
7490 * xdisp.c (display_line): Fix horizontal scrolling of large images
7491 when fringes are turned off. This comes at a price of not
7492 displaying the truncation/continuation glyphs in this case.
7493 (Bug#16806)
7494
7495 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
7496 CreateDIBSection returns an error indication, zero out *ximg after
7497 destroying the image. This avoids crashes in memory allocations
7498 due to the fact that some of the callers also call
7499 x_destroy_x_image, which will attempt to free an already free'd
7500 block of memory.
7501
7502 2014-02-18 Martin Rudalics <rudalics@gmx.at>
7503
7504 * widget.c (update_various_frame_slots): Don't set
7505 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
7506
7507 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
7508
7509 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
7510
7511 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
7512
7513 temacs --daemon fix (Bug#16599).
7514 * emacs.c (main): Initialize daemon_pipe[1] here ...
7515 (syms_of_emacs): ... instead of here.
7516
7517 2014-02-16 Anders Lindgern <andlind@gmail.com>
7518
7519 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
7520 is set (Bug#16505).
7521
7522 2014-02-16 Daniel Colascione <dancol@dancol.org>
7523
7524 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
7525 (xd_get_connection_address): Use it.
7526 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
7527 xd_get_connection_address because the latter signals if the bus
7528 we're trying to close is already disconnected.
7529
7530 2014-02-13 Eli Zaretskii <eliz@gnu.org>
7531
7532 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
7533 argument to CreateThread. This avoids segfaults on Windows 9X.
7534 Reported by oslsachem <oslsachem@gmail.com>.
7535
7536 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
7537
7538 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
7539 * unexhp9k800.c (unexec_error): New function, to simplify the code.
7540 (check_lseek): New function, to report lseek errors.
7541 (save_data_space, update_file_ptrs, read_header, write_header)
7542 (copy_file, copy_rest, unexec): Use these news functions.
7543 (update_file_ptrs): Don't assume wraparound behavior when
7544 converting a large size_t value to off_t.
7545
7546 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
7547
7548 * composite.c (fill_gstring_header): Pass positions as C integers
7549 and move parameters checking to...
7550 (Fcomposition_get_gstring): ...this function. Handle case when
7551 buffer positions are in reversed order and avoid crash (Bug#16739).
7552 Adjust docstring.
7553 * buffer.c (validate_region): Mention current buffer in error message.
7554
7555 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
7556
7557 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
7558
7559 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
7560
7561 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
7562
7563 2014-02-11 Glenn Morris <rgm@gnu.org>
7564
7565 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
7566 Replace refs to "OpenStep" in messages.
7567
7568 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
7569
7570 Avoid "." at end of error diagnostics.
7571 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
7572 * font.c (Ffont_at):
7573 * nsfns.m (ns_display_info_for_name):
7574 * nsselect.m (Fx_own_selection_internal):
7575 * nsterm.m (performDragOperation:):
7576 Remove "." from end of diagnostic.
7577
7578 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
7579
7580 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
7581 unintuitive (bug#15824).
7582 (Fyes_or_no_p): Doc fix (bug#15456).
7583
7584 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
7585
7586 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
7587 and avoid warning.
7588 * eval.c (call_debugger): When exiting the debugger, do not allow
7589 max_specpdl_size less than actual binding depth (Bug#16603).
7590 (syms_of_eval): Adjust docstring.
7591
7592 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
7593
7594 * cmds.c (Fself_insert_command): Output a clearer error message on
7595 negative repetitions (bug#9476).
7596
7597 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
7598
7599 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7600
7601 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
7602
7603 * minibuf.c (Fread_string): Doc clarification (bug#15422).
7604
7605 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
7606
7607 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
7608
7609 * keyboard.c (Frecursive_edit): Fix typo in docstring.
7610
7611 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7612
7613 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
7614
7615 * keyboard.c (Frecursive_edit): Say more precicely how throwing
7616 `exit' works (bug#15865).
7617
7618 2014-02-07 Martin Rudalics <rudalics@gmx.at>
7619
7620 Constrain window box/body sizes and margin widths (Bug#16649).
7621 * xdisp.c (window_box_width): Don't return less than zero.
7622 (window_box_left_offset, window_box_right_offset): Don't return
7623 more than the window's pixel width.
7624 * window.c (window_body_height, window_body_width): Don't return
7625 negative value.
7626 (window_resize_apply): Adjust margin width, if necessary.
7627
7628 2014-02-07 Glenn Morris <rgm@gnu.org>
7629
7630 * nsterm.m (syms_of_nsterm): Doc fix.
7631
7632 2014-02-06 Eli Zaretskii <eliz@gnu.org>
7633
7634 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
7635 New variables: pointers through which to call the respective APIs.
7636 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
7637 (filename_from_ansi, sys_link, check_windows_init_file):
7638 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
7639 This is required on Windows 9X, where we dynamically load
7640 UNICOWS.DLL which has their non-stub implementations.
7641 (maybe_load_unicows_dll): Assign addresses to these 2 function
7642 pointers after loading UNICOWS.DLL.
7643
7644 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
7645 MultiByteToWideChar and WideCharToMultiByte through function
7646 pointers.
7647
7648 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
7649 New declarations.
7650
7651 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
7652
7653 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
7654 for OSX >= 10.9 if separate spaces are used.
7655 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
7656
7657 2014-02-06 Glenn Morris <rgm@gnu.org>
7658
7659 * buffer.c (cache-long-scans): Doc fix.
7660
7661 2014-02-05 Eli Zaretskii <eliz@gnu.org>
7662
7663 * w32fns.c (Fw32_shell_execute): Doc fix.
7664
7665 2014-02-05 Bastien Guerry <bzg@gnu.org>
7666
7667 * syntax.c (Fforward_word): Call Fconstrain_to_field with
7668 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
7669
7670 2014-02-05 Martin Rudalics <rudalics@gmx.at>
7671
7672 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
7673 outside the window (Bug#16649).
7674
7675 * xdisp.c (note_mouse_highlight): When entering a margin area show
7676 a non-text cursor (Bug#16647).
7677
7678 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
7679
7680 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
7681 It prompted a compile-time diagnostic on GNU/Linux.
7682 Simplify to remove the need for the label.
7683
7684 2014-02-04 Eli Zaretskii <eliz@gnu.org>
7685
7686 * w32menu.c (w32_popup_dialog): Don't condition the whole function
7687 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
7688 to show it; otherwise return 'unsupported--w32-dialog' to signal
7689 to the caller that emulation with menus is necessary.
7690 This resurrects code inadvertently deleted by the 2013-10-08 commit.
7691 (Bug#16636)
7692 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
7693
7694 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
7695 by HAVE_DIALOGS.
7696
7697 * menu.c (Fx_popup_dialog): Don't condition the call to
7698 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
7699 special symbol 'unsupported--w32-dialog', emulate the dialog with
7700 a menu by calling x-popup-menu.
7701
7702 * menu.h (Qunsupported__w32_dialog): New extern variable.
7703
7704 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
7705
7706 * keyboard.c (kbd_buffer_get_event): Read file notification events
7707 also in batch mode.
7708
7709 * xgselect.c (xg_select): Read glib events in any case, even if
7710 there are no file descriptors to watch for. (Bug#16519)
7711
7712 2014-02-03 Martin Rudalics <rudalics@gmx.at>
7713
7714 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
7715 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
7716 * w32term.c (w32_draw_window_divider): Handle first and last
7717 pixels specially.
7718 * w32term.h (w32_fill_area_abs): New function.
7719 * xdisp.c (x_draw_right_divider): Don't draw over bottom
7720 divider.
7721 * xfaces.c (realize_basic_faces): Handle new face ids.
7722 * xfns.c (Fx_create_frame): Call x_default_parameter for right
7723 and bottom divider width.
7724 * xterm.c (x_draw_window_divider): Handle first and last pixels
7725 specially.
7726
7727 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
7728
7729 * print.c (Fexternal_debugging_output): Add cast to pacify
7730 --enable-gcc-warnings.
7731 * eval.c (call_debugger): Grow specpdl if the debugger was
7732 entered due to specpdl overflow (Bug#16603) and allow more
7733 specpdl space for the debugger itself.
7734
7735 2014-02-02 Martin Rudalics <rudalics@gmx.at>
7736
7737 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
7738 (Bug#16619)
7739
7740 2014-02-01 Eli Zaretskii <eliz@gnu.org>
7741
7742 * w32fns.c (Ffile_system_info): Use WINAPI in the function
7743 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
7744
7745 * print.c (Fexternal_debugging_output): If the argument character
7746 is non-ASCII, encode it with the current locale's encoding before
7747 writing the result to the terminal. (Bug#16448)
7748
7749 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
7750 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
7751 for it. (Bug#16558)
7752
7753 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
7754
7755 * process.c (create_process): Reset SIGPROF handler in the child.
7756 * callproc.c (call_process): Likewise.
7757
7758 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
7759
7760 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
7761
7762 2014-01-29 Eli Zaretskii <eliz@gnu.org>
7763
7764 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
7765 of zero to print strings, GDB doesn't like it.
7766
7767 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
7768 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
7769 we still use correct addresses. (Bug#16576)
7770
7771 2014-01-27 K. Handa <handa@gnu.org>
7772
7773 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
7774 to preserve the code detection behavior of 24.3.
7775 * coding.h (struct coding_system): New member detected_utf8_bytes.
7776 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
7777 (decode_coding_gap): Use short cut for UTF-8 file reading only
7778 when coding->detected_utf8_bytes equals to coding->src_bytes.
7779 * fileio.c (Finsert_file_contents): Cancel the previous change.
7780
7781 2014-01-29 Martin Rudalics <rudalics@gmx.at>
7782
7783 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
7784 that are not visible.
7785
7786 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
7787
7788 * xmenu.c (create_and_show_popup_menu): Handle case when no key
7789 is grabbed (Bug#16565).
7790
7791 2014-01-28 Martin Rudalics <rudalics@gmx.at>
7792
7793 * xdisp.c (last_max_ascent): Re-remove after erroneously
7794 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
7795 from 2013-03-29.
7796 (move_it_to): Re-remove reference to last_max_ascent.
7797 (Fwindow_text_pixel_size): Add iterator's max_ascent and
7798 max_descent here instead of calling line_bottom_y.
7799 Fix doc-string.
7800
7801 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
7802
7803 * terminal.c (initial_free_frame_resources): New function.
7804 (init_initial_terminal): Install new hook to free face cache
7805 on initial frame and avoid memory leak. For details, see
7806 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
7807 * xfaces.c (free_frame_faces): Adjust comment.
7808
7809 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7810
7811 * data.c (Fstring_to_number): Document results if unparsable
7812 (Bug#16551).
7813
7814 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
7815
7816 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
7817
7818 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7819
7820 When decoding, prefer ptrdiff_t to int for buffer positions etc.
7821 * coding.c (detect_coding_utf_8, emacs_mule_char)
7822 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
7823 (check_utf_8, decode_coding):
7824 * coding.h (struct coding_system.errors):
7825 Use ptrdiff_t, not int, for integer values derived from buffer and
7826 string positions.
7827
7828 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
7829 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
7830 before invoking decode_coding_gap, since there's just one block.
7831
7832 2014-01-25 Martin Rudalics <rudalics@gmx.at>
7833
7834 Fix handling of face attributes in Fx_create_frame (Bug#16529).
7835 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
7836 too early. Again run change_frame_size before assigning menu-
7837 and tool-bar-lines.
7838
7839 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
7840
7841 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
7842 arrives, call x_check_fullscreen, in case the new display has a
7843 different resolution. (Bug#16517)
7844
7845 2014-01-25 Eli Zaretskii <eliz@gnu.org>
7846
7847 * term.c (read_menu_input): If the selected frame changes, exit
7848 the menu.
7849 (tty_menu_show): If the selected frame changes while we displayed
7850 a menu, throw to top level. (Bug#16479)
7851
7852 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
7853
7854 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
7855
7856 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
7857
7858 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
7859 * data.c (count_one_bits_word): Fix bug (negated comparison)
7860 when BITS_PER_ULL < BITS_PER_BITS_WORD.
7861
7862 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
7863
7864 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
7865 Avoid undefined behavior by initializing display property bit of a
7866 string processed by the bidirectional iterator. For details, see
7867 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
7868
7869 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
7870
7871 Minor cleanup of previous change.
7872 * image.c (imagemagick_error, Fimagemagick_types):
7873 Omit some recently-introduced and unnecessary casts and assignments.
7874
7875 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
7876
7877 Fix two memory leaks discovered with Valgrind.
7878 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
7879 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
7880
7881 2014-01-22 Martin Rudalics <rudalics@gmx.at>
7882
7883 Fixes in window size functions around Bug#16430 and Bug#16470.
7884 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
7885 (Fwindow_mode_line_height, Fwindow_header_line_height)
7886 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7887 Minor doc-string adjustments.
7888 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
7889 Rewrite doc-strings.
7890 (window_body_height, window_body_width): Do not count partially
7891 visible lines/columns when PIXELWISE is nil (Bug#16470).
7892 (Qfloor, Qceiling): New symbols.
7893
7894 2014-01-21 Eli Zaretskii <eliz@gnu.org>
7895
7896 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
7897 when the image cache is not yet allocated. (Bug#16509)
7898
7899 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
7900
7901 * buffer.c (Fkill_buffer): When killing an indirect buffer,
7902 re-attach intervals to its base buffer (Bug#16502).
7903 * intervals.c (set_interval_object): Move from here...
7904 * intervals.h (set_interval_object): ... to here. Fix comments.
7905
7906 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
7907
7908 Avoid undefined behavior by initializing buffer redisplay bit.
7909 Reported by Dmitry Antipov in
7910 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
7911 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
7912
7913 Revert some of the CANNOT_DUMP fix (Bug#16494).
7914 * lread.c (init_lread): Fix typo: NILP, not !NILP.
7915
7916 2014-01-19 Eli Zaretskii <eliz@gnu.org>
7917
7918 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
7919 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
7920 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
7921 they are replaced by macros that expand into direct calls to the
7922 corresponding functions from GDI32.DLL.
7923 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
7924 variables in the Cygwin build, they are unused.
7925
7926 2014-01-19 K. Handa <handa@gnu.org>
7927
7928 * composite.c (composition_update_it): Fix previous change.
7929
7930 2014-01-18 Eli Zaretskii <eliz@gnu.org>
7931
7932 Fix file name handling on MS-Windows 9X.
7933 * w32.c (maybe_load_unicows_dll): New function.
7934
7935 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
7936 on, to make sure we can convert file names to and from UTF-8 on
7937 Windows 9X. This fixes a failure to start up because Emacs cannot
7938 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
7939
7940 * w32font.c [WINDOWSNT]: Include w32.h.
7941 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
7942 of implementing the same stuff.
7943 Remove now unused g_b_init_is_windows_9x.
7944
7945 * w32.h (maybe_load_unicows_dll): Add prototype.
7946
7947 2014-01-17 Eli Zaretskii <eliz@gnu.org>
7948
7949 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
7950 switch to single keyboard. Prevents daemon crashes when a new
7951 client connects while we show a TTY menu in an existing client.
7952 (Bug#16479)
7953
7954 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
7955
7956 Fix MinGW64 porting problem with _setjmp.
7957 Reported by Eli Zaretskii in:
7958 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
7959 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
7960 the old _setjmp and _longjmp. All uses changed.
7961
7962 2014-01-13 Daniel Colascione <dancol@dancol.org>
7963
7964 * textprop.c (Fremove_list_of_text_properties):
7965 Correctly handle reaching the end of the interval tree. (Bug#15344)
7966
7967 2014-01-13 Martin Rudalics <rudalics@gmx.at>
7968
7969 * xdisp.c (resize_mini_window): Round height to a multiple of
7970 frame's line height. Fix bug in calculation of window start
7971 position (Bug#16424).
7972
7973 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
7974
7975 * macfont.m: Include termchar.h.
7976 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
7977 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
7978 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
7979 *_WITH_GC_* to take face and f as parameters.
7980 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
7981 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
7982
7983 2014-01-13 Daniel Colascione <dancol@dancol.org>
7984
7985 Fix menu item updating in the presence of the Unity global menu
7986 GTK+ module.
7987
7988 * gtkutil.h (xg_have_tear_offs): Add frame parameter
7989 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
7990 tear-off.
7991 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7992 updating menus; explain why.
7993 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
7994 problem it's supposed to solve and it interferes with detecting
7995 the presence of a global menu.
7996 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
7997 parameter.
7998
7999 2014-01-11 K. Handa <handa@gnu.org>
8000
8001 * composite.c (composition_update_it): Fix indexing of
8002 LGSTRING_CHAR (Bug#15984).
8003
8004 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
8005
8006 * unexw32.c (_start) [__MINGW64__]: Define to __start.
8007
8008 2014-01-11 Eli Zaretskii <eliz@gnu.org>
8009
8010 * xdisp.c (try_window_id): Don't use this function's optimizations
8011 if overlays in the buffer displayed by the window have changed
8012 since last redisplay. (Bug#16347)
8013 (message_dolog): Fix indentation.
8014
8015 2014-01-11 Martin Rudalics <rudalics@gmx.at>
8016
8017 * frame.c (frame_resize_pixelwise): Fix doc-string.
8018
8019 2014-01-10 Martin Rudalics <rudalics@gmx.at>
8020
8021 Fix handling of internal borders (Bug#16348).
8022 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
8023 Remove internal border width from pixel width of windows.
8024 (change_frame_size_1): Don't return early when frame's pixel
8025 size changes - we still have to record the new sizes in the
8026 frame structure.
8027 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
8028 also when toolbar gets larger.
8029 * window.c (check_frame_size): Include internal_border_width in
8030 check.
8031 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
8032 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
8033 In non-toolkit/non-GTK version clear internal border.
8034 * xterm.c (x_clear_under_internal_border): New function for
8035 non-toolkit/non-GTK version.
8036 (x_after_update_window_line): In non-toolkit/non-GTK version
8037 don't do that.
8038 (handle_one_xevent, x_set_window_size):
8039 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
8040 * xterm.h (x_clear_under_internal_border): Extern it.
8041
8042 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
8043
8044 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
8045 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
8046 it again.
8047
8048 2014-01-06 Eli Zaretskii <eliz@gnu.org>
8049
8050 * xdisp.c (redisplay_window): Don't skip window redisplay if the
8051 last value of point is not equal to buffer's point. (Bug#16129)
8052
8053 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
8054
8055 Spelling fixes.
8056 * nsterm.h (updateCollectionBehavior): Rename from
8057 updateCollectionBehaviour. All uses changed.
8058
8059 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
8060 * Makefile.in (SETFATTR): New macro.
8061 (temacs$(EXEEXT)): Use it.
8062
8063 2014-01-04 Martin Rudalics <rudalics@gmx.at>
8064
8065 Fix maximization behavior on Windows (Bug#16300).
8066 * w32fns.c (w32_fullscreen_rect): Don't handle
8067 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
8068 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
8069 of SetWindowPos. Restore last placement also when leaving
8070 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
8071 but the FULLSCREEN_BOTH case.
8072
8073 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
8074
8075 Port to C89.
8076 * data.c (arithcompare_driver):
8077 * fileio.c (Fcar_less_than_car):
8078 * fns.c (internal_equal):
8079 * frame.c (delete_frame):
8080 * lisp.h (enum More_Lisp_Bits):
8081 * lread.c (read1):
8082 Avoid C99 constructs that don't work in C89.
8083 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
8084 to port to C89, which doesn't have 'long long'.
8085 (count_trailing_zero_bits): Use them.
8086
8087 2014-01-03 Chong Yidong <cyd@gnu.org>
8088
8089 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
8090
8091 2014-01-02 Martin Rudalics <rudalics@gmx.at>
8092
8093 Further adjust frame/window scrollbar width calculations.
8094 * window.c (apply_window_adjustment):
8095 Set windows_or_buffers_changed.
8096 (Fwindow_scroll_bars): Return actual scrollbar width.
8097 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
8098 For non-toolkit builds again use 14 as minimum width and set
8099 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
8100 * xterm.c (XTset_vertical_scroll_bar): Take width from
8101 WINDOW_SCROLL_BAR_AREA_WIDTH.
8102 (x_new_font): Rename wid to unit. Base calculation of new
8103 scrollbar width on toolkit used and make it analogous to that of
8104 x_set_scroll_bar_default_width.
8105 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
8106 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
8107 of GetSystemMetrics.
8108 * w32term.c (w32_set_vertical_scroll_bar): Take width from
8109 WINDOW_SCROLL_BAR_AREA_WIDTH.
8110 (x_new_font): Make it correspond to changes in xterm.c.
8111
8112 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
8113
8114 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
8115 This is a cleaner way to fix the MinGW-w64 porting problem.
8116 Check for INTPTR_MAX misconfiguration.
8117
8118 2014-01-01 Eli Zaretskii <eliz@gnu.org>
8119
8120 * search.c (newline_cache_on_off, find_newline): In indirect
8121 buffers, use the newline cache of the base buffer.
8122
8123 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
8124 buffer, invalidate the caches of its base buffer. (Bug#16265)
8125
8126 * indent.c (width_run_cache_on_off, compute_motion): In indirect
8127 buffers, use the width-run cache of the base buffer.
8128
8129 * xdisp.c (redisplay_window): When the window displays an indirect
8130 buffer, and the character widths in the display table have
8131 changed, invalidate the width-run cache of the corresponding base
8132 buffer.
8133
8134 * fileio.c (Finsert_file_contents): When invalidating the newline
8135 cache, consider the case of inserting into indirect buffer.
8136
8137 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
8138 In indirect buffers, use the paragraph cache of the base buffer.
8139
8140 2013-12-31 Martin Rudalics <rudalics@gmx.at>
8141
8142 * window.c (grow_mini_window): Fix last change.
8143
8144 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
8145
8146 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
8147
8148 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
8149
8150 * w32term.c (w32_initialize): Use LCID and LOWORD.
8151
8152 * w32proc.c (create_child): Use pid_t for 5th argument.
8153 (IsValidLocale): Don't provide prototype for MinGW64.
8154 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
8155 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
8156
8157 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
8158 MinGW64 doesn't support.
8159
8160 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
8161
8162 * w32.c (set_named_security_info): New function.
8163 (acl_set_file): Fall back on set_named_security_info if
8164 set_file_security fails.
8165 (g_b_init_set_named_security_info_w)
8166 (g_b_init_set_named_security_info_a): New static variables.
8167 (globals_of_w32): Initialize them to zero.
8168 (set_named_security_info): Set them to non-zero if the
8169 corresponding API is available.
8170 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
8171 New function typedefs.
8172
8173 2013-12-31 Martin Rudalics <rudalics@gmx.at>
8174
8175 Some more fixes following pixelwise resize changes including one
8176 for Bug#16306.
8177 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
8178 of frame_resize_pixelwise.
8179 * widget.c (pixel_to_text_size): New function.
8180 (update_wm_hints): Have size hints respect value of
8181 frame_resize_pixelwise.
8182 (EmacsFrameResize): Alway process resize requests pixelwise.
8183 * window.c (grow_mini_window): Make sure mini window is at least
8184 one line tall.
8185 * xdisp.c (display_menu_bar): Make sure menubar extends till
8186 right end of frame.
8187 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
8188 (x_set_tool_bar_lines): Calculate pixelwise.
8189 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
8190 frame_resize_pixelwise.
8191
8192 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
8193
8194 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
8195 variables not used there.
8196
8197 2013-12-30 Eli Zaretskii <eliz@gnu.org>
8198
8199 * w32.c (sys_umask): New function. (Bug#16299)
8200
8201 2013-12-30 Martin Rudalics <rudalics@gmx.at>
8202
8203 * dispnew.c (change_frame_size_1): Take old width of root window
8204 from that window's pixel width. (Bug#16284)
8205
8206 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
8207
8208 Plain copy-file no longer chmods an existing destination (Bug#16133).
8209 * fileio.c (realmask): Now a static var, not a local.
8210 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
8211 Remove arg STATPTR. All uses changed.
8212 (Fcopy_file): Do not alter permissions of existing destinations,
8213 unless PRESERVE-PERMISSIONS (renamed from
8214 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
8215 Avoid race when testing for existing destinations and for
8216 when input and output files are the same.
8217 If changing the group fails, adjust both default and
8218 preserved permissions so that access is not granted to the
8219 wrong group.
8220 (Fset_default_file_modes, init_fileio): Update realmask.
8221 (Fdefault_file_modes): Use realmask instead of calling umask.
8222
8223 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
8224
8225 Fix pipe bug with OS X emacs --daemon (Bug#16262).
8226 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
8227 flags on the daemon pipe ends before execing.
8228
8229 2013-12-28 Eli Zaretskii <eliz@gnu.org>
8230
8231 * w32fns.c (Fx_create_frame): Error out if called from a TTY
8232 session. (Bug#14739)
8233
8234 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
8235
8236 * callproc.c (Vexec_path): Document that exec-directory is in it.
8237
8238 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
8239
8240 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
8241 default.
8242
8243 2013-12-27 Chong Yidong <cyd@gnu.org>
8244
8245 * data.c (Fsymbol_function): Doc fix.
8246
8247 2013-12-26 Martin Rudalics <rudalics@gmx.at>
8248
8249 Some more tinkering with Bug#16051.
8250 * window.c (resize_frame_windows): Don't let the size of the
8251 root window drop below the frame's default character size.
8252 Never ever delete any subwindows - let the window manager do the
8253 clipping.
8254
8255 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
8256 of toolbar lines needed when they exceed the height of the root
8257 window.
8258 (unwind_create_frame_1): New function.
8259 (Fx_create_frame): Generally inhibit calling the window
8260 configuration change hook here. Remove extra call to
8261 change_frame_size - it's not needed when we don't run the
8262 configuration change hook.
8263
8264 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
8265
8266 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
8267 On my Fedora 19 platform the core dumps were so big that
8268 my desktop became nearly catatonic.
8269 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
8270 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
8271 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
8272 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
8273 a clang-only syntax.
8274 * conf_post.h (__has_feature): New macro, if not already defined.
8275 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
8276 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
8277
8278 2013-12-25 Eli Zaretskii <eliz@gnu.org>
8279
8280 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
8281 is a file name. (Bug#16252)
8282
8283 2013-12-25 Chong Yidong <cyd@gnu.org>
8284
8285 * keyboard.c (Voverriding_terminal_local_map)
8286 (Voverriding_local_map): Doc fix.
8287
8288 * keymap.c (Vemulation_mode_map_alists): Doc fix.
8289
8290 2013-12-24 Eli Zaretskii <eliz@gnu.org>
8291
8292 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
8293 file name when it is submitted to ShellExecute. Simplify code.
8294 Don't test DOCUMENT for being a string, as that is enforced by
8295 CHECK_STRING. Doc fix.
8296
8297 2013-12-23 Eli Zaretskii <eliz@gnu.org>
8298
8299 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
8300 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
8301 redisplay_tool_bar does. Improve and fix commentary.
8302 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
8303 limits of the glyph matrices. (Bug#16051)
8304 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
8305 only when the new size is different from the old one, and the new
8306 size can be achieved given the frame height.
8307
8308 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
8309
8310 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
8311
8312 2013-12-23 Glenn Morris <rgm@gnu.org>
8313
8314 * lread.c (Fload): Mention load-prefer-newer in doc.
8315
8316 2013-12-22 Martin Rudalics <rudalics@gmx.at>
8317
8318 Handle Bug#16207 by being more restrictive when running hooks.
8319 * window.c (unwind_change_frame): New function.
8320 (Fset_window_configuration): Don't run configuration change hook
8321 while the frame configuration is unsafe. Call select_window
8322 twice.
8323
8324 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
8325
8326 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
8327
8328 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
8329
8330 * nsterm.h: Declare EmacsColor category.
8331
8332 * nsterm.m (NSColor): Implement EmacsColor category.
8333 (ns_get_color): Use colorUsingDefaultColorSpace.
8334 (ns_get_color, ns_term_init): Use colorForEmacsRed.
8335
8336 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
8337
8338 2013-12-21 Eli Zaretskii <eliz@gnu.org>
8339
8340 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
8341 having the PNG_NORETURN attribute, to avoid compiler warning in
8342 my_png_error.
8343
8344 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8345
8346 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
8347
8348 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
8349 fringe background extension.
8350 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
8351 because they are now always the same as `left' and `width',
8352 respectively. Remove code for the case that `width' and
8353 `sb_width' are different.
8354
8355 2013-12-20 Martin Rudalics <rudalics@gmx.at>
8356
8357 Remove scroll_bar_actual_width from frames.
8358 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
8359 * frame.c (Fscroll_bar_width): Return scroll bar area width.
8360 (x_figure_window_size):
8361 * nsterm.m (x_set_window_size):
8362 * widget.c (set_frame_size):
8363 * w32term.c (x_set_window_size):
8364 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
8365 scroll_bar_actual_width.
8366
8367 Convert scroll_bar members to integers on Windows.
8368 * w32term.h (struct scroll_bar): Convert top, left, width,
8369 height, start, end and dragging to integers.
8370 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
8371 scroll_bar members.
8372 * w32term.c (w32_set_scroll_bar_thumb)
8373 (w32_scroll_bar_handle_click): Remove XINT conversions for
8374 scroll_bar members. Treat bar->dragging as integer.
8375 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
8376 first element. Remove XINT conversions for scroll_bar members.
8377 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
8378 Remove XINT conversions for scroll_bar members.
8379
8380 Fix assignment for new window total sizes.
8381 * window.c (Fwindow_resize_apply_total): Assign values for
8382 minibuffer window.
8383
8384 2013-12-20 Chong Yidong <cyd@gnu.org>
8385
8386 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
8387 argument to `append'.
8388
8389 2013-12-19 Eli Zaretskii <eliz@gnu.org>
8390
8391 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
8392 current text face, for extending the face of the display margins.
8393 (Bug#16192)
8394
8395 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8396 Doc fix. (Bug#16190)
8397
8398 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
8399
8400 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
8401 Remove.
8402
8403 * nsterm.m (Qfile, Qurl): New.
8404 (EV_MODIFIERS2): New macro.
8405 (EV_MODIFIERS): Use EV_MODIFIERS2.
8406 (ns_term_init): Remove font and color from DND, does not work on
8407 newer OSX, and other ports don't have them.
8408 (performDragOperation:): Handle modifiers used during drag.
8409 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
8410 Remove global Lisp variables used to communicate with ns-win.el.
8411 Remove font and color handling.
8412 (syms_of_nsterm): Defsym Qfile and Qurl.
8413
8414 2013-12-19 Anders Lindgren <andlind@gmail.com>
8415
8416 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
8417 (ns_constrain_all_frames, x_set_offset): Remove assignment to
8418 dont_constrain.
8419 (updateFrameSize:, windowWillResize:toSize:): Add trace.
8420 (constrainFrameRect): Remove special case nr_screens == 1.
8421 Don't constrain size to size of view.
8422
8423 * nsterm.h (ns_output): Remove dont_constrain.
8424
8425 2013-12-19 Anders Lindgren <andlind@gmail.com>
8426
8427 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
8428
8429 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
8430
8431 Minor fixes for recent openp changes.
8432 * lisp.h (GCPRO7): New macro.
8433 * lread.c (openp): Use bool for boolean; all callers changed.
8434 Protect save_string from GC. Don't assume that file descriptors
8435 are nonzero. Redo save_mtime comparison to avoid bogus GCC
8436 warning about uninitialized variable.
8437
8438 2013-12-18 Eli Zaretskii <eliz@gnu.org>
8439
8440 * w32fns.c (emacs_abort): Use intptr_t as argument of
8441 INT_BUFSIZE_BOUND, to avoid compiler warnings.
8442
8443 2013-12-18 Glenn Morris <rgm@gnu.org>
8444
8445 * lread.c (Fload): Pass load_prefer_newer to openp.
8446 Don't bother checking mtime if openp already did it.
8447 (openp): Add `newer' argument, to check all suffixes
8448 and find the newest file.
8449 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
8450 * callproc.c (call_process):
8451 * charset.c (load_charset_map_from_file):
8452 * emacs.c (init_cmdargs):
8453 * image.c (x_create_bitmap_from_file, x_find_image_file):
8454 * lisp.h (openp):
8455 * lread.c (Flocate_file_internal):
8456 * process.c (Fformat_network_address):
8457 * sound.c (Fplay_sound_internal):
8458 * w32.c (check_windows_init_file):
8459 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
8460
8461 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
8462
8463 2013-12-17 Eli Zaretskii <eliz@gnu.org>
8464
8465 * w32.c (getloadavg): Don't index samples[] array with negative
8466 indices. Recover from wall-clock time being set backwards.
8467
8468 * w32term.c (w32_initialize): Declare the argument of
8469 set_user_model as const.
8470
8471 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
8472 (w32_menu_show): Constify some arguments passed to MessageBox.
8473
8474 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
8475 to initialize Lisp objects.
8476
8477 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
8478 initialize Lisp objects.
8479
8480 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
8481 use variables used only on X under that condition.
8482
8483 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
8484 variables not used there.
8485
8486 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8487
8488 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
8489 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
8490
8491 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8492
8493 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
8494 code, revealed in presence of R2L characters, character
8495 compositions, and display vectors. A better fix for Bug#16148.
8496 (extend_face_to_end_of_line): Don't reference tool_bar_window in
8497 GTK and NS builds, they don't have this member of struct frame.
8498
8499 * dispextern.h (struct composition_it): Correct a comment for the
8500 'width' member.
8501
8502 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8503
8504 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
8505 This prevents a compilation error on C compilers that do not
8506 default functions to return 'int' if not declared. Also, add
8507 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
8508 since it now uses inline functions.
8509
8510 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8511
8512 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
8513 display margins on mode line, header line, and in the frame's
8514 tool-bar window. (Bug#16165)
8515
8516 2013-12-16 Andreas Schwab <schwab@suse.de>
8517
8518 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
8519
8520 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
8521
8522 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
8523 `CHECK_LIST_CONS'.
8524
8525 2013-12-16 Martin Rudalics <rudalics@gmx.at>
8526
8527 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
8528
8529 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
8530
8531 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
8532 intended to find bogus pointers in font objects (Bug#16140).
8533 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
8534 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
8535 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
8536 Disable for MS-Windows due to Bug#15876; apparently this
8537 requires more or less substantial changes in fontset code.
8538 * xfont.c (xfont_close):
8539 * xftfont.c (xftfont_close): Call x_display_info_for_display
8540 to check whether 'Display *' is valid (Bug#16093 and probably
8541 Bug#16069).
8542
8543 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8544
8545 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
8546 Reported by Juanma Barranquero <lekktu@gmail.com>.
8547
8548 * process.c (Fprocess_send_eof): Don't crash if someone tries to
8549 open a pty on MS-Windows. (Bug#16152)
8550
8551 * emacs.c (decode_env_path): Fix bogus comparison against
8552 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
8553
8554 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
8555
8556 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
8557 (Fx_file_dialog): Add parentheses around && to silence warning.
8558
8559 * w32term.c (construct_drag_n_drop): Remove unused local variable.
8560
8561 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8562
8563 * xdisp.c (extend_face_to_end_of_line): Extend background of
8564 non-default face in margin areas as well. (Bug#16151)
8565 (display_line): Call extend_face_to_end_of_line for continued
8566 lines as well, if the display margins have non-zero width.
8567 (set_glyph_string_background_width): When needed, set the
8568 extends_to_end_of_line_p flag on glyph strings to be drawn in
8569 margin areas, not only in the text area.
8570
8571 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
8572 startup.
8573
8574 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
8575
8576 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
8577 Don't worry about verify_error being t, since it has to be a list.
8578
8579 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
8580
8581 Use bool for boolean, focusing on headers.
8582 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
8583 No need to include <stdbool.h>, since conf_post.h does it now.
8584 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
8585 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
8586 (SET_PER_BUFFER_VALUE_P):
8587 * ccl.c, ccl.h (setup_ccl_program):
8588 * ccl.h (CHECK_CCL_PROGRAM):
8589 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
8590 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
8591 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
8592 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
8593 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
8594 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
8595 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
8596 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
8597 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
8598 (CHARSET_FAST_MAP_SET):
8599 * coding.c (decode_coding_ccl, encode_coding_ccl):
8600 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
8601 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
8602 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
8603 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
8604 (decode_coding_c_string):
8605 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
8606 * conf_post.h (has_attribute):
8607 * dispextern.h (trace_redisplay_p)
8608 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
8609 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
8610 (SET_GLYPH_FROM_CHAR_GLYPH)
8611 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
8612 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
8613 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
8614 (cursor_in_mouse_face_p):
8615 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
8616 (blank_row, prepare_desired_row)
8617 (build_frame_matrix_from_leaf_window, make_current)
8618 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
8619 (update_window, scrolling_window, update_frame_line):
8620 * disptab.h (GLYPH_FOLLOW_ALIASES):
8621 * editfns.c (Fformat):
8622 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
8623 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
8624 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
8625 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
8626 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
8627 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
8628 (FONT_DEFERRED_LOG):
8629 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
8630 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
8631 (FRAME_MOUSE_UPDATE):
8632 * fringe.c (Fdefine_fringe_bitmap):
8633 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
8634 (x_create_bitmap_from_xpm_data, xpm_load_image):
8635 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
8636 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
8637 (MERGE_INTERVAL_CACHE):
8638 * keymap.h (KEYMAPP):
8639 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
8640 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
8641 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
8642 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
8643 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
8644 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
8645 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
8646 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
8647 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
8648 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
8649 (SETUP_BUFFER_SYNTAX_TABLE):
8650 * systime.h (timespec_valid_p):
8651 * term.c (save_and_enable_current_matrix):
8652 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
8653 * xdisp.c (in_display_vector_p, display_tool_bar_line)
8654 (redisplay_internal, try_window_reusing_current_matrix)
8655 (sync_frame_with_window_matrix_rows, try_window_id)
8656 (display_menu_bar, display_tty_menu_item, display_mode_line)
8657 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
8658 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
8659 * xmenu.c (xmenu_show):
8660 * xterm.c (use_xim, x_term_init):
8661 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
8662 (struct x_bitmap_record):
8663 Use bool for booleans.
8664 * ccl.c (struct buffer_text):
8665 * ccl.h (struct ccl_program):
8666 * charset.h (struct charset):
8667 * cm.h (struct cm):
8668 * coding.h (struct iso_2022_spec, struct coding_system):
8669 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
8670 (struct glyph_string, struct face, struct face_cache)
8671 (struct bidi_string_data, struct bidi_it)
8672 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
8673 (struct image):
8674 * editfns.c (Fformat):
8675 * frame.h (struct frame):
8676 * fringe.c (struct fringe_bitmap):
8677 * intervals.h (struct interval):
8678 * keyboard.h (struct kboard):
8679 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
8680 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
8681 (struct Lisp_Buffer_Local_Value, union specbinding):
8682 * macfont.m (struct macfont_info):
8683 * process.h (struct Lisp_Process):
8684 * termchar.h (struct tty_display_info):
8685 * window.h (struct window):
8686 * xterm.h (struct x_output):
8687 Use bool_bf for boolean bit-fields.
8688 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
8689 All callers changed.
8690 * ccl.h (struct ccl_program): Remove unused members private_state,
8691 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
8692 eight_bit_control.
8693 (struct ccl_spec): Remove unused members cr_carryover,
8694 eight_bit_carryover.
8695 * conf_post.h: Include <stdbool.h>.
8696 (bool_bf): New type.
8697 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
8698 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
8699 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
8700 'do { ... } while (false)' brackets.
8701 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
8702 Args must now be expressions; all callers changed.
8703 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
8704 (PRODUCE_GLYPHS): Simplify use of boolean.
8705 * fileio.c (Fcopy_file):
8706 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
8707 * lisp.h (UNGCPRO): Return void, not int.
8708 (FOR_EACH_TAIL): Use void expression, not int expression.
8709 * region-cache.c: Reindent.
8710 * region-cache.h: Copy comments from region-cache.c, to fix
8711 incorrect remarks about booleans.
8712
8713 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8714
8715 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
8716 when character at point is displayed from a display vector.
8717 (Bug#16148)
8718
8719 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
8720
8721 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
8722 now a list of certificate validation checks that will abort a
8723 connection with an error.
8724 (Fgnutls_boot): Document it and use it.
8725
8726 2013-12-14 Martin Rudalics <rudalics@gmx.at>
8727
8728 * w32term.c (w32_enable_frame_resize_hack): New variable.
8729 (x_set_window_size): Use it to hack frame resizing on Windows
8730 (Bug#16028).
8731
8732 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8733
8734 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
8735 Windows-specific code to w32.c. Change error message text to
8736 match that of Posix platforms.
8737
8738 * w32.c (w32_copy_file): New function, most of the code copied and
8739 reworked from Fcopy_file. Improve error handling. Plug memory
8740 leak when errors are thrown. Support file names outside of the
8741 current codepage. (Bug#7100)
8742
8743 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8744
8745 * lread.c (load_path_default): Prototype.
8746
8747 2013-12-13 Glenn Morris <rgm@gnu.org>
8748
8749 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
8750 (dump_path): Remove.
8751 (load-path-default): Remove `changed' argument.
8752 Do not set dump_path permanently. Simplify.
8753 (init_lread): Simplify.
8754 (syms_of_lread): Remove dump_path.
8755
8756 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8757
8758 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
8759 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
8760 2013-12-12 font-related change to avoid Bug#16128, which
8761 is quite hard to fix without even more substantial changes.
8762
8763 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8764
8765 * font.c (font_close_object): Check for live frame (Bug#16128).
8766
8767 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8768
8769 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
8770 Return ptrdiff_t, not int, since it's a buffer size.
8771 Reindent/reparen some macros to a more Gnuish style.
8772
8773 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
8774
8775 Avoid undefined behavior with huge regexp interval counts.
8776 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
8777 since it's now specialized to interval counts. All uses changed.
8778 Do not assume wraparound on signed integer overflow.
8779 (regex_compile): Simplify based on the above changes.
8780
8781 2013-12-12 Eli Zaretskii <eliz@gnu.org>
8782
8783 Support file names on MS-Windows that use characters outside of
8784 the current system codepage. (Bug#7100)
8785
8786 * w32.c (get_file_security, set_file_security)
8787 (create_symbolic_link): Separate pointers and boolean flags for
8788 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
8789 non-zero, else the former.
8790 (codepage_for_filenames, filename_to_utf16, )
8791 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
8792 New functions.
8793 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
8794 characters.
8795 (normalize_filename): Lose the DBCS code, now works on UTF-8.
8796 Accept only one argument; all callers changed.
8797 (dostounix_filename): Remove the second argument, now works in
8798 UTF-8. All callers changed.
8799 (parse_root): Lose DBCS code.
8800 (get_long_basename, w32_get_short_filename, init_environment)
8801 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
8802 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
8803 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
8804 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
8805 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
8806 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
8807 otherwise.
8808 (ansi_encode_filename): New function.
8809 (get_emacs_configuration, get_emacs_configuration_options):
8810 Functions deleted.
8811 (add_volume_info, GetCachedVolumeInformation): Run the input file
8812 name through unixtodos_filename, to ensure it is stored and
8813 referenced in canonical form.
8814 (get_volume_info): Lose the DBCS code, now works in UTF-8.
8815 (logon_network_drive, sys_link, utime): Improve error handling.
8816 (sys_access): New function.
8817 (hashval, generate_inode_val): Unused functions deleted.
8818 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
8819 (check_windows_init_file): Convert error message from UTF-8 to
8820 ANSI codepage, for display in the message box.
8821 (globals_of_w32): Set w32_unicode_filenames according to the OS
8822 version.
8823
8824 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
8825 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8826 (syms_of_w32term): Declare w32-unicode-filenames.
8827
8828 * w32proc.c (new_child, delete_child): Remove code that handled
8829 unused pending_deletion and input_file members of the child struct.
8830 (create_child, sys_spawnve): Convert all file names to ANSI
8831 codepage. Use ANSI APIs explicitly; forcibly fail if any file
8832 name cannot be encoded in ANSI codepage. Don't use
8833 unixtodos_filename, mirror slashes by hand.
8834 (record_infile, record_pending_deletion): Functions deleted.
8835 (Fw32_short_file_name): Call w32_get_short_filename instead of
8836 GetShortPathName.
8837
8838 * w32notify.c (add_watch): Work in Unicode mode when
8839 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8840 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
8841 instead, do the same with Lisp primitives.
8842
8843 * w32fns.c (file_dialog_callback, Fx_file_dialog)
8844 (Fsystem_move_file_to_trash, Fw32_shell_execute)
8845 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
8846 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
8847 (Fw32_shell_execute): Improve error reporting.
8848 (Fdefault_printer_name): Ifdef away for Cygwin.
8849
8850 * w32.h (struct _child_process): Remove input_file and
8851 pending_deletion members that are no longer used.
8852 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
8853 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
8854 (ansi_encode_filename): New and updated prototypes.
8855
8856 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
8857 APIs explicitly.
8858 (unexec): Don't use dostounix_filename, it expects a file name in
8859 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
8860 ANSI encoding.
8861
8862 * fileio.c (Ffile_name_directory, file_name_as_directory)
8863 (directory_file_name, Fexpand_file_name)
8864 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
8865 arguments of dostounix_filename.
8866 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
8867 use MAX_UTF8_PATH for size of file-name strings.
8868 (emacs_readlinkat): Build an explicitly unibyte string for file
8869 names.
8870 (syms_of_fileio) <file-name-coding-system>:
8871 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
8872
8873 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
8874 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
8875 directories to UTF-8.
8876 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
8877 environment, and each element of the input PATH, to UTF-8.
8878
8879 * dired.c (file_attributes): Use build_unibyte_string explicitly
8880 to make Lisp strings from user and group names.
8881
8882 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
8883 decode_file.
8884
8885 * coding.c (decode_file_name, encode_file_name): New functions.
8886
8887 * termcap.c (tgetent): Adapt to the change in arguments of
8888 dostounix_filename.
8889
8890 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
8891 names.
8892
8893 * msdos.c (dostounix_filename, init_environment): Adapt to the
8894 change in arguments of dostounix_filename.
8895
8896 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
8897 [WINDOWSNT]: Encode file names passed to the image libraries in
8898 ANSI codepage.
8899
8900 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
8901 [WINDOWSNT]: Convert file names to the current ANSI codepage.
8902
8903 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
8904 arguments of dostounix_filename.
8905
8906 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8907
8908 * font.h (struct font_entity) [HAVE_NS]: New field to record
8909 font driver which was used to create this entity.
8910 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
8911 frame where the font was opened.
8912 (font_close_object): Add prototype.
8913 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
8914 (font_close_object): Not static any more. Lost frame arg.
8915 Adjust comment and users.
8916 * alloc.c (cleanup_vector): Call font_close_object to adjust
8917 per-frame font counters correctly. If HAVE_NS, also call
8918 driver-specific cleanup for font-entity objects.
8919 * ftfont.c (ftfont_open):
8920 * nsfont.m (nsfont_open):
8921 * w32font.c (w32font_open_internal):
8922 * xfont.c (xfont_open):
8923 * xftfont.c (xftfont_open): Save frame pointer in font object.
8924 * macfont.m (macfont_open): Likewise.
8925 (macfont_descriptor_entity): Save driver pointer to be able
8926 to call its free_entity routine when font-entity is swept.
8927 * ftxfont.c (ftxfont_open): Add eassert because frame
8928 pointer should be saved by ftfont_driver.open.
8929
8930 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8931
8932 * xterm.c (x_make_frame_visible): Restore hack which is needed when
8933 input polling is used. This is still meaningful for Cygwin, see
8934 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
8935 * keyboard.c (poll_for_input_1, input_polling_used):
8936 Define unconditionally.
8937 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
8938 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
8939 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
8940 (font_for_char): Prefer ptrdiff_t to int for buffer position.
8941 (face_for_char): Likewise. Rearrange eassert and return ASCII
8942 face for CHAR_BYTE8_P.
8943 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
8944
8945 2013-12-11 Ken Brown <kbrown@cornell.edu>
8946
8947 * dispextern.h (erase_phys_cursor):
8948 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
8949
8950 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
8951
8952 * nsterm.m (x_free_frame_resources):
8953 * term.c (tty_free_frame_resources):
8954 * xterm.c (x_free_frame_resources): Do not check for non-NULL
8955 face cache because it's implied by free_frame_faces anyway.
8956 * w32term.c (x_free_frame_resources): Likewise. Do not call
8957 free_frame_faces twice.
8958
8959 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
8960
8961 * editfns.c (Fformat_time_string): Mention %F in the doc.
8962
8963 2013-12-11 Martin Rudalics <rudalics@gmx.at>
8964
8965 * window.c (resize_frame_windows): Don't return immediately when
8966 the root window's size doesn't change - the minibuffer window
8967 may still have to be repositioned/resized.
8968 * xfns.c (Fx_create_frame): Always change the frame size after
8969 initializing the frame's faces.
8970 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
8971 change_frame_size should already have done it.
8972 (x_new_font): Assign new tool- and menu-bar heights.
8973 (x_set_window_size_1): Account for tool- and menu-bar heights
8974 (Bug#16013). Don't set pixel sizes since change_frame_size
8975 should already have done it.
8976
8977 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
8978
8979 Remove the option of using libcrypto.
8980 * Makefile.in (LIB_CRYPTO): Remove.
8981 (LIBES): Don't use it.
8982
8983 2013-12-11 Juri Linkov <juri@jurta.org>
8984
8985 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
8986 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
8987
8988 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
8989
8990 * xdisp.c (display_tool_bar_line): Don't extend on a previously
8991 drawn tool bar items (Bug#16058).
8992 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
8993
8994 2013-12-09 Ken Brown <kbrown@cornell.edu>
8995
8996 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
8997
8998 * lisp.h (get_frame_param): Adjust conditions for prototype
8999 declaration.
9000
9001 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
9002
9003 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
9004 Avoid unused macro warning if configured --without-xft.
9005
9006 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
9007
9008 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
9009
9010 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
9011
9012 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
9013
9014 * emacs.c (main): Call fixup_locale a second time for GNUstep.
9015
9016 2013-12-08 Martin Rudalics <rudalics@gmx.at>
9017
9018 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
9019
9020 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
9021
9022 Use libcrypto's checksum implementations if available, for speed.
9023 * Makefile.in (LIB_CRYPTO): New macro.
9024 (LIBES): Use it.
9025
9026 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
9027 The macro didn't conform to C99 due to type mismatch,
9028 which caused compilation failure with Sun C 5.12,
9029 and it was confusing anyway. Include window.h to declare
9030 redisplay_other_windows.
9031
9032 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
9033
9034 * window.c (set_window_buffer): Update mode line (bug#16084).
9035
9036 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
9037
9038 Fix minor problems found by static checking.
9039 * keyboard.c (poll_for_input_1, input_polling_used):
9040 Define only if HAVE_NTGUI.
9041 * xmenu.c (popup_activate_callback): Omit unnecessary
9042 check against USE_X_TOOLKIT, which must be defined here anyway.
9043 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
9044 Now static.
9045
9046 2013-12-07 Martin Rudalics <rudalics@gmx.at>
9047
9048 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
9049
9050 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
9051
9052 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
9053
9054 * nsterm.m (x_set_window_size): Remove fprintf.
9055 (init): Define always. Set applicationDidFinishLaunchingCalled
9056 for GNUstep.
9057 (applicationDidFinishLaunching:):
9058 Set applicationDidFinishLaunchingCalled.
9059 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
9060 not called.
9061
9062 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
9063
9064 Pixel resize changes for NS (Bug#16049).
9065 * nsterm.m (x_set_window_size): Change parameters rows/cols to
9066 height/width. row/cols are locals.
9067 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
9068 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
9069 (windowWillResize): Remove gsextra. Calculate extra as in
9070 updateFrameSize.
9071 (x_new_font): Don't change frame size if fullscreen.
9072 Change size pixelwise.
9073
9074 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
9075 comment in xfns.c. Change to pixelwise call.
9076
9077 2013-12-06 Eli Zaretskii <eliz@gnu.org>
9078
9079 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
9080 (Bug#16070)
9081
9082 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
9083
9084 * xterm.c (input_signal_count): Remove.
9085 (x_dispatch_event): Define unconditionally.
9086 (x_make_frame_visible): Process X events until the frame
9087 is really visible (Bug#16027).
9088 * xterm.h (x_dispatch_event): Declare unconditionally.
9089
9090 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
9091
9092 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
9093
9094 * nsterm.m (x_set_window_size): Handle pixelwise.
9095
9096 2013-12-05 Martin Rudalics <rudalics@gmx.at>
9097
9098 * w32term.c (x_new_font):
9099 * xterm.c (x_new_font): Calculate new frame size from new font
9100 size (Bug#16028).
9101
9102 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9103
9104 * lisp.h (FOR_EACH_TAIL): New macro.
9105 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
9106
9107 * window.c (select_window): Call second wset_redisplay before we change
9108 selected_window (bug#16034).
9109
9110 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
9111
9112 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
9113
9114 2013-12-04 Eli Zaretskii <eliz@gnu.org>
9115
9116 * w32xfns.c: Include window.h, to avoid a compiler warning.
9117
9118 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9119
9120 * window.c (window_scroll): Mark window for redisplay (bug#16034).
9121 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
9122 window_scroll takes care of it.
9123 (Fset_window_point, Fdelete_other_windows_internal)
9124 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
9125 (Fsplit_window_internal, Fdelete_window_internal)
9126 (Fresize_mini_window_internal, Fset_window_configuration)
9127 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
9128 cause redisplay instead of forcing a complete redisplay.
9129 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
9130 we're only affecting the selected_window.
9131
9132 2013-12-04 Eli Zaretskii <eliz@gnu.org>
9133
9134 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
9135 directional control characters. Update type and category
9136 determination according to the UBA from Unicode v6.3.
9137 (bidi_category_t): New category EXPLICIT_FORMATTING.
9138
9139 * dispextern.h (bidi_type_t): Update to include new bidirectional
9140 properties introduced with Unicode v6.3. (Bug#16043)
9141
9142 2013-12-04 Martin Rudalics <rudalics@gmx.at>
9143
9144 * xterm.c (XTflash): Fix coordinate of bottom area to flash
9145 (Bug#16044).
9146
9147 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
9148
9149 * font.c (font_list_entities): Remove dummy assignment.
9150 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
9151 used on graphic displays only. Remove unused 'font_encoder' member.
9152 (struct font_bitmap): Remove unused 'extra' member.
9153 * nsfont.m (nsfont_open):
9154 * w32font.c (w32font_open_internal):
9155 * ftfont.c (ftfont_get_bitmap): Adjust users.
9156
9157 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
9158
9159 Use bool for boolean.
9160 * tparam.c (tparam1):
9161 * undo.c (record_point, record_property_change):
9162 Use bool for boolean, for local vars that are always true or false.
9163
9164 Minor integer overflow fixes (Bug#16033).
9165 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
9166 This improves on the previous fix to this function.
9167 (window_resize_check): When summing up pixel counts, don't rely on
9168 undefined behavior if the sum overflows.
9169
9170 2013-12-03 Martin Rudalics <rudalics@gmx.at>
9171
9172 * window.c (Fset_window_new_pixel): Don't choke at negative
9173 argument value (Bug#16033).
9174
9175 * xfns.c (Fx_create_frame): Add another call to change_frame_size
9176 to avoid crash in window_box_height.
9177
9178 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
9179 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
9180 calculation.
9181 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
9182
9183 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
9184
9185 Minor integer overflow fixes.
9186 * window.c (Fset_window_new_pixel, grow_mini_window):
9187 * xdisp.c (Fwindow_text_pixel_size):
9188 Avoid undefined behavior on signed integer overflow.
9189 * xfns.c (x_set_mouse_color):
9190 Check that drag shape fits in 'unsigned', since that's what X wants.
9191
9192 2013-12-02 Eli Zaretskii <eliz@gnu.org>
9193
9194 Improve reporting of fatal exception on MS-Windows.
9195 * w32fns.c (my_exception_handler): New function.
9196 (globals_of_w32fns): Set it up as the unhandled exception
9197 handler. Initialize exception code and address to zeros.
9198 (emacs_abort): If the exception code and address are available,
9199 print them at the beginning of the backtrace. Fix the format of
9200 printing addresses (was producing 0x0x12345678 on XP).
9201 (Bug#15994)
9202
9203 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
9204
9205 * eval.c (Fbacktrace__locals): New function.
9206 (syms_of_eval): Defsubr it.
9207
9208 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
9209
9210 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
9211 Define here to unify between...
9212 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
9213 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
9214
9215 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9216
9217 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
9218
9219 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
9220 fringe background extension.
9221 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
9222 because they are now always the same as `left' and `width',
9223 respectively. Remove code for the case that `width' and
9224 `sb_width' are different.
9225
9226 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
9227
9228 Fix minor problems found by static checking.
9229 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
9230 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
9231 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
9232
9233 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
9234
9235 * image.c (imagemagick_compute_animated_image): Don't crash if we
9236 have an animation with different-sized images (bug#15313).
9237
9238 2013-11-30 Martin Rudalics <rudalics@gmx.at>
9239
9240 Remove some unused items introduced during pixelwise change.
9241 * window.c (window_resize_total_check): Remove unused function.
9242 * xdisp.c (remember_mouse_glyph): Remove unused label.
9243 (Ftool_bar_height): Move declaration inside #if.
9244 * xterm.c (x_set_window_size): Don't use r and c.
9245
9246 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
9247
9248 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
9249 `value' and `endp'.
9250
9251 * window.c (Fset_window_configuration): Comment out unused variables.
9252
9253 * w32term.c (w32_read_socket): Remove unused variable `buf'.
9254
9255 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
9256
9257 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
9258
9259 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
9260
9261 * gnutls.c (gnutls_audit_log_function): Only declare and define if
9262 HAVE_GNUTLS3 (Bug#16001).
9263
9264 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
9265 if interrupts are deferred (Bug#15801).
9266
9267 2013-11-30 Martin Rudalics <rudalics@gmx.at>
9268
9269 Support resizing frames and windows pixelwise.
9270 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
9271 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
9272 (struct glyph_matrix): Replace window_left_col and
9273 window_top_line by window_pixel_left and window_pixel_top.
9274 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
9275 Minor rewrite.
9276 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
9277 (draw_window_divider, move_it_to, x_draw_right_divider)
9278 (x_draw_bottom_divider, change_frame_size): Add or fix
9279 declarations.
9280 * dispnew.c (change_frame_size_1): Change prototype.
9281 (adjust_glyph_matrix, required_matrix_width)
9282 (adjust_frame_glyphs_for_window_redisplay): Use pixel
9283 values instead of lines and columns.
9284 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
9285 WINDOW_TOTAL_FRINGE_WIDTH.
9286 (handle_window_change_signal, do_pending_window_change)
9287 (init_display): Adjusts calls of change_frame_size.
9288 (change_frame_size, change_frame_size_1): Handle pixelwise
9289 changes.
9290 * frame.c (Qright_divider_width, Qbottom_divider_width):
9291 New Lisp objects.
9292 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
9293 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
9294 (x_set_internal_border_width, x_set_vertical_scroll_bars)
9295 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
9296 values.
9297 (set_frame_param): New function.
9298 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
9299 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
9300 (Ffringe_width, Fborder_width, Fright_divider_width)
9301 (Fbottom_divider_width): New functions, defsubr them.
9302 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
9303 New argument pixelwise.
9304 (struct frame_parm_table): New members Qright_divider_width and
9305 Qbottom_divider_width.
9306 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
9307 (x_report_frame_params): Handle Qright_divider_width and
9308 Qbottom_divider_width.
9309 (x_set_right_divider_width, x_set_bottom_divider_width):
9310 New functions.
9311 (frame_resize_pixelwise): New option.
9312 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
9313 new_pixelwise, right_divider_width and bottom_divider_width;
9314 remove total_lines; rename text_lines, text_cols, new_text_lines
9315 and new_text_cols to text_height, text_width, new_height and
9316 new_width respectively.
9317 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
9318 FRAME_TEXT_WIDTH respectively.
9319 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
9320 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
9321 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
9322 New macros.
9323 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
9324 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
9325 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
9326 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
9327 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
9328 (FRAME_TOTAL_COLS_ARG): Remove macro.
9329 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
9330 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
9331 (x_wm_set_size_hint): Handle frame pixel sizes.
9332 * indent.c (compute_motion, Fcompute_motion):
9333 Call window_body_width instead of window_body_cols.
9334 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
9335 (make_lispy_position): Handle right and bottom dividers.
9336 (Fsuspend_emacs): Pixelize call of change_frame_size.
9337 * keyboard.h: Extern Qright_divider, Qbottom_divider.
9338 * lisp.h: Extern set_frame_param.
9339 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
9340 x_set_window_size.
9341 (Fx_create_frame): Add entry for vertical_drag_cursor.
9342 Pixelize call of change_frame_size.
9343 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
9344 * nsterm.m (ns_update_window_end): Optionally draw right
9345 divider.
9346 (x_set_window_size): Add argument pixelwise.
9347 Call check_frame_size and change_frame_size with pixelwise zero.
9348 (ns_draw_window_divider): New function.
9349 (ns_redisplay_interface): Add ns_draw_window_divider.
9350 (updateFrameSize:): Call change_frame_size with pixelwise zero.
9351 (x_new_font): Call x_set_window_size with pixelwise zero.
9352 * print.c (print_object): For a window print its sequence
9353 number again.
9354 * term.c (Fresume_tty): Pixelize call of change_frame_size.
9355 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
9356 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9357 (w32_createwindow): Use scroll bar area width.
9358 (w32_wnd_proc): Handle bottom divider width.
9359 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
9360 (Fx_create_frame): Default divider width parameters.
9361 Caclulate sizes pixelwise. Add vertical drag cursor support.
9362 (x_create_tip_frame): Default divider widths to zero.
9363 Pixelize call to change_frame_size.
9364 (Fx_show_tip): Add handling of divider widths. Pixelize window
9365 position and sizes.
9366 (Fw32_frame_rect): New function.
9367 (frame_parm_handler w32_frame_parm_handlers): Add divider
9368 widths.
9369 (Vx_window_vertical_drag_shape): Add variable.
9370 * w32inevt.c (resize_event, maybe_generate_resize_event):
9371 Pixelize change_frame_size calls.
9372 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
9373 call.
9374 * w32term.c (w32_draw_window_divider): New function.
9375 (x_update_window_end): Handle right divider.
9376 (w32_draw_fringe_bitmap, x_scroll_run)
9377 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
9378 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
9379 Calculate new frame sizes pixelwise.
9380 (x_new_font): Pixelize call to x_set_window_size.
9381 (x_check_fullscreen): Pixelize call to change_frame_size.
9382 (x_set_window_size_1, x_set_window_size): New argument
9383 pixelwise. Calculate pixelwise.
9384 (x_wm_set_size_hint): Use scroll bar area width.
9385 (w32_redisplay_interface): Add w32_draw_window_divider.
9386 * w32term.h (struct w32_output): Add vertical drag cursor.
9387 * widget.c (set_frame_size, update_wm_hints)
9388 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
9389 change_frame_size.
9390 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
9391 * window.c (sequence_number): Restore.
9392 (Fwindow_pixel_width, Fwindow_pixel_height)
9393 (Fwindow_mode_line_height, Fwindow_header_line_height)
9394 (window_pixel_to_total, Frun_window_scroll_functions)
9395 (Fset_window_new_pixel, window_resize_apply_total)
9396 (Fwindow_resize_apply_total): New functions.
9397 (window_body_height, window_body_width): Rename from
9398 window_body_lines. New argument PIXELWISE.
9399 Calculate pixelwise.
9400 (Fwindow_body_height, Fwindow_body_width): New argument
9401 PIXELWISE.
9402 (coordinates_in_window, window_relative_x_coord): Use window's
9403 pixel width instead of total width.
9404 (replace_window, recombine_windows): Initialize pixel values.
9405 (resize_root_window, resize_frame_windows, grow_mini_window)
9406 (shrink_mini_window): New argument PIXELWISE.
9407 Calculate pixelwise.
9408 (Fdelete_other_windows_internal, adjust_window_margins)
9409 (window_resize_check, window_resize_apply)
9410 (Fdelete_window_internal, Fresize_mini_window_internal)
9411 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
9412 (check_frame_size): Rename arguments. New argument PIXELWISE.
9413 Calculate pixelwise.
9414 (set_window_buffer): Make samebuf bool. Run configuration change
9415 hook only if buffer changed.
9416 (Fset_window_buffer): Rewrite doc-string.
9417 (make_window): Initialize new_pixel slot.
9418 (Fwindow_resize_apply): Check pixel size of root window.
9419 (Fsplit_window_internal): Call 2nd argument pixel_size.
9420 Calculate pixelwise.
9421 (Fscroll_left, Fscroll_right): Call window_body_width instead of
9422 window_body_cols.
9423 (save_window_data): New slots frame_text_width,
9424 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
9425 (saved_window): New slots pixel_left, pixel_top, pixel_height,
9426 pixel_width.
9427 (Fcurrent_window_configuration, Fset_window_configuration)
9428 (save_window_save, compare_window_configurations): Handle new
9429 slots in save_window_data and saved_window.
9430 (Fset_window_scroll_bars): Fix doc-string.
9431 (window_resize_pixelwise): New variable.
9432 (coordinates_in_window, Fcoordinates_in_window_p):
9433 Handle dividers.
9434 (make_parent_window): Adjust sequence_number.
9435 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
9436 New functions.
9437 * window.h (struct window): New members new_pixel, pixel_left,
9438 pixel_top, pixel_width, pixel_height. Restore sequence_number.
9439 (wset_new_pixel): New function.
9440 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
9441 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
9442 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
9443 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
9444 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
9445 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
9446 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
9447 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
9448 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
9449 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
9450 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
9451 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
9452 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
9453 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
9454 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
9455 Rewrite.
9456 (resize_frame_windows, grow_mini_window, shrink_mini_window)
9457 (window_body_width, check_frame_size): Adapt external declarations.
9458 * xdisp.c (last_max_ascent): New integer.
9459 (window_text_bottom_y): Handle bottom divider.
9460 (window_box_width, window_box_height): Calculate pixelwise.
9461 (get_glyph_string_clip_rects): Handle right divider.
9462 (remember_mouse_glyph): When windows are resized pixelwise
9463 proceed with width and height set to 1.
9464 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
9465 WINDOW_TOTAL_WIDTH.
9466 (move_it_to): Calculate and return maximum x position
9467 encountered.
9468 (Fwindow_text_pixel_size): New function.
9469 (resize_mini_window, update_tool_bar): Calculate pixelwise.
9470 (tool_bar_lines_needed): Rename to tool_bar_height.
9471 Calculate pixelwise.
9472 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
9473 Calculate pixelwise.
9474 (redisplay_tool_bar): Calculate pixelwise.
9475 (redisplay_window): Calculate pixelwise. Handle dividers.
9476 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
9477 (x_draw_vertical_border): Handle dividers.
9478 (define_frame_cursor1): Handle vertical drag cursor.
9479 (x_draw_right_divider, x_draw_bottom_divider): New functions.
9480 (expose_window): Calculate pixelwise. Handle dividers.
9481 (init_xdisp): Initialize pixel values.
9482 * xfaces.c (Qwindow_divider): New face.
9483 (realize_basic_faces): Realize it.
9484 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
9485 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9486 (x_set_scroll_bar_default_width): Default actual width to 16.
9487 (Fx_create_frame): Set sizes pixelwise.
9488 (x_create_tip_frame): Default divider widths to zero.
9489 Pixelize call of change_frame_size.
9490 (Fx_show_tip): Handle divider widths. Initial pixel position
9491 and sizes.
9492 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
9493 (Vx_window_vertical_drag_shape): New option.
9494 * xmenu.c (free_frame_menubar): Pixelize call of
9495 x_set_window_size.
9496 * xterm.c (x_draw_window_divider): New function.
9497 (x_update_window_end): Optionally draw right divider.
9498 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
9499 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
9500 (handle_one_xevent, x_new_font): Calculate pixelwise.
9501 (x_set_window_size_1, x_set_window_size): New argument
9502 pixelwise. Calculate pixelwise.
9503 (x_wm_set_size_hint): Pixelize call of check_frame_size.
9504 (struct x_redisplay_interface): Add x_draw_window_divider.
9505 * xterm.h (struct x_output): Add vertical_drag_cursor.
9506
9507 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
9508
9509 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
9510 Set invisible frames's `redisplay' when a full redisplay is requested.
9511 (redisplay_window): Set must_be_updated_p instead (bug#15999).
9512 (redisplay_mode_lines): Don't set must_be_updated_p any more.
9513 (display_mode_lines): Set it here instead.
9514
9515 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
9516
9517 * dispextern.h (set_window_update_flags): Remove.
9518
9519 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9520
9521 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
9522
9523 * xdisp.c (REDISPLAY_SOME_P): New macro.
9524 (redisplay_internal): Use it (bug#15999).
9525 (prepare_menu_bars, redisplay_window): Use it as well.
9526
9527 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
9528
9529 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
9530
9531 * w32font.c (g_b_init_get_char_width_32_w): New static var.
9532 (globals_of_w32font): Zero it out.
9533 (GetCharWidth32W_Proc): New function pointer.
9534 (get_char_width_32_w): New function.
9535 (compute_metrics): If get_glyph_outline_w returns an error, try
9536 get_char_width_32_w before declaring a failure. This avoids
9537 punishing raster (a.k.a. "bitmap") fonts by slowing down
9538 redisplay. (Bug#6364).
9539
9540 2013-11-29 Eli Zaretskii <eliz@gnu.org>
9541
9542 * xdisp.c (clear_mouse_face): Don't invalidate the entire
9543 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9544 highlight needs to be redisplayed. (Bug#15913)
9545
9546 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
9547
9548 Fix minor problems found by static checking.
9549 * buffer.h (struct buffer_text, struct buffer):
9550 * frame.h (struct frame):
9551 * window.h (struct window):
9552 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
9553 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
9554 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
9555 no-longer-valid use of HAVE_MENUS.
9556 * xdisp.c (propagate_buffer_redisplay): Now static.
9557
9558 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9559
9560 * xmenu.c (Fmenu_or_popup_active_p):
9561 * window.c (Fset_window_configuration):
9562 * menu.c (Fx_popup_menu, Fx_popup_dialog):
9563 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
9564 * fns.c (Fyes_or_no_p):
9565 * editfns.c (Fmessage_box, Fmessage_or_box):
9566 * alloc.c (make_save_ptr_ptr):
9567 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
9568
9569 * window.c (Fset_window_configuration): Move select_window later.
9570
9571 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
9572
9573 Refine redisplay optimizations to only redisplay *some* frames/windows
9574 rather than all of them.
9575 * xdisp.c (REDISPLAY_SOME): New constant.
9576 (redisplay_other_windows, wset_redisplay, fset_redisplay)
9577 (bset_redisplay, bset_update_mode_line): New functions.
9578 (message_dolog): Use bset_redisplay.
9579 (clear_garbaged_frames): Use fset_redisplay.
9580 (echo_area_display): Use wset_redisplay.
9581 (buffer_shared_and_changed): Remove.
9582 (prepare_menu_bars): Call Vpre_redisplay_function before updating
9583 frame titles. Compute the actual set of windows redisplayed.
9584 Don't update frame titles and menu bars for frames that don't need to
9585 be redisplayed.
9586 (propagate_buffer_redisplay): New function.
9587 (AINC): New macro.
9588 (redisplay_internal): Use it. Be more selective in the set of windows
9589 we redisplay. Propagate windows_or_buffers_changed to
9590 update_mode_lines a bit later to simplify the code.
9591 (mark_window_display_accurate_1): Reset window and buffer's
9592 `redisplay' flag.
9593 (redisplay_window): Do nothing if neither the window nor the buffer nor
9594 the frame needs redisplay.
9595 * window.h (struct window): Add `redisplay' field.
9596 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
9597 (redisplay_other_windows, window_list): New declarations.
9598 * window.c (select_window, Fset_window_start): Use wset_redisplay.
9599 (window_list): Not static any more.
9600 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
9601 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
9602 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
9603 * frame.c (Fmake_frame_visible): Don't redisplay everything.
9604 * frame.h (struct frame): Add `redisplay' field.
9605 Move `external_menu_bar' bitfield next to other bit-fields.
9606 (SET_FRAME_GARBAGED): Use fset_redisplay.
9607 (SET_FRAME_VISIBLE): Don't garbage the frame;
9608 Use redisplay_other_windows.
9609 * buffer.h (struct buffer): Add `redisplay' field.
9610 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
9611 (modify_overlay): Use bset_redisplay.
9612 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
9613
9614 2013-11-28 Eli Zaretskii <eliz@gnu.org>
9615
9616 Support w32 file notifications in batch mode.
9617 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
9618 invalid (which happens in batch mode). If non-interactive, call
9619 handle_file_notifications to store file notification events in the
9620 input queue. (Bug#15933)
9621
9622 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9623
9624 * w32inevt.c (handle_file_notifications): Now external, not static.
9625
9626 * w32term.h (handle_file_notifications): Provide prototype.
9627
9628 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
9629 init_crit, since init_display, which does that otherwise, is not
9630 called.
9631
9632 2013-11-27 Glenn Morris <rgm@gnu.org>
9633
9634 * Makefile.in ($(lispsource)/international/charprop.el): New.
9635 (emacs$(EXEEXT)): Depend on charprop.el.
9636
9637 2013-11-27 Eli Zaretskii <eliz@gnu.org>
9638
9639 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
9640 deleting portions of the buffer under non-nil REPLACE argument.
9641 (Bug#15973)
9642
9643 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
9644 directory, watch it and not its parent.
9645 (add_watch): Allow empty string in FILE.
9646
9647 2013-11-27 Martin Rudalics <rudalics@gmx.at>
9648
9649 * window.c (Fset_window_start, window_resize_apply)
9650 (window_scroll): Reset window_end_valid (Bug#15957).
9651
9652 2013-11-27 Glenn Morris <rgm@gnu.org>
9653
9654 * Makefile.in (leimdir): Now in lisp source directory.
9655 ($(leimdir)/leim-list.el): Just use ../leim .
9656 * epaths.in (PATH_DUMPLOADSEARCH):
9657 * lread.c (load_path_default):
9658 * nsterm.m (ns_load_path): No more leim directory.
9659
9660 2013-11-26 Andreas Schwab <schwab@suse.de>
9661
9662 * .gdbinit (xgettype): Add cast.
9663
9664 2013-11-26 Glenn Morris <rgm@gnu.org>
9665
9666 Preload leim-list.el.
9667 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
9668 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
9669 is a single directory.
9670
9671 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
9672
9673 bool-vector-subsetp is now the normal direction (Bug#15912).
9674 * data.c (Fbool_vector_subsetp): Test whether the first argument
9675 is a subset of the second one, not the reverse. Add doc string.
9676
9677 Fix minor problems found by static checking.
9678 * lread.c (load_path_default): Now static.
9679 * textprop.c (text_property_stickiness): Be consistent about the
9680 test used when deciding whether to consider the previous character.
9681 This simplifies the code a bit.
9682
9683 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
9684
9685 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
9686
9687 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
9688 (syms_of_frame): Don't defsubr them.
9689
9690 2013-11-25 Glenn Morris <rgm@gnu.org>
9691
9692 * lread.c (load_path_default): Change the sense of the argument.
9693 (init_lread): When EMACSLOADPATH is set, do not ignore changes
9694 from dump_path. When it is not, avoid checking dump_path twice.
9695
9696 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
9697 uninstalled dump_path against installed Vload_path. (Bug#15964)
9698
9699 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
9700
9701 Export get_pos_property to Elisp.
9702 * editfns.c (Fget_pos_property): Rename from get_pos_property.
9703 (syms_of_editfns): Export it to Elisp.
9704
9705 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
9706
9707 2013-11-23 Romain Francoise <romain@orebokech.com>
9708
9709 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
9710 initialization here ...
9711 (syms_of_fileio): ... from here.
9712
9713 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
9714
9715 * lread.c (init_lread): Fix int/Lisp_Object mixup.
9716 Please use --enable-check-lisp-object-type.
9717
9718 2013-11-23 Glenn Morris <rgm@gnu.org>
9719
9720 * process.c (get_process): Explicit error for dead buffers.
9721
9722 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
9723
9724 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
9725
9726 2013-11-23 Glenn Morris <rgm@gnu.org>
9727
9728 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
9729 * lread.c (load_path_check): Take path to check as argument.
9730 (load_path_default): New, split from init_lread.
9731 (init_lread): Move calc of default load-path to load_path_default.
9732 Empty elements in EMACSLOADPATH now stand for the default.
9733 (load-path): Doc fix.
9734 * emacs.c (decode_env_path): Add option to treat empty elements
9735 as nil rather than ".".
9736 * callproc.c (init_callproc_1, init_callproc):
9737 * image.c (Vx_bitmap_file_path):
9738 * lisp.h (decode_env_path):
9739 * lread.c (Vsource_directory):
9740 Update for new argument spec of decode_env_path.
9741
9742 2013-11-22 Eli Zaretskii <eliz@gnu.org>
9743
9744 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
9745 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
9746
9747 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
9748
9749 Fix some dependency problems that cause unnecessary recompiles.
9750 Reported by RMS in
9751 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
9752 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
9753 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
9754 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
9755 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
9756 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
9757 (boostrap-clean): No need to remove stamp-oldxmenu.
9758
9759 Fix recently introduced bool vector overrun.
9760 This was due to an optimization that went awry.
9761 Reported by Glenn Morris in
9762 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
9763 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
9764 for empty vectors, undoing the 2013-11-18 change.
9765 * data.c (bool_vector_binop_driver): Rely on this.
9766 Fix bug that occasionally overran the destination.
9767 * lisp.h (struct Lisp_Bool_vector): Document this.
9768
9769 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
9770
9771 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
9772 to handle dialogs.
9773
9774 * nsterm.m (init, run, stop:): Comment out for now, does not work
9775 with dialogs.
9776
9777 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
9778
9779 * charset.c (syms_of_charset): Don't read past end of string.
9780
9781 2013-11-19 Glenn Morris <rgm@gnu.org>
9782
9783 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
9784
9785 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
9786
9787 Add hooks to run on gaining/losing focus. (Bug#15029)
9788 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
9789 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
9790 (syms_of_frame): Add focus-in-hook, focus-out-hook.
9791
9792 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
9793
9794 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
9795 The old names predated the API change that put destination at end.
9796
9797 Improve API of recently-added bool vector functions (Bug#15912).
9798 The old API had (bool-vector-count-matches A B)
9799 and (bool-vector-count-matches-at A B I), which gave the
9800 misleading impression that the two functions were variants, one
9801 with a location I. The new API has (bool-vector-count-population A)
9802 and (bool-vector-count-consecutive A B I) to make the distinction
9803 clearer. The first function no longer has a B argument, since the
9804 caller can easily determine the number of nils if the length and
9805 number of ts is known.
9806 * data.c (Fbool_vector_count_population): Rename from
9807 bool_vector_count_matches, and accept just 1 argument.
9808 (Fbool_vector_count_consecutive): Rename from
9809 Fbool_vector_count_matches_at.
9810
9811 Always allocate at least one bits_word per bool vector.
9812 See Daniel Colascione in:
9813 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
9814 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
9815 * data.c (bool_vector_binop_driver): Rely on this. Tune.
9816 * lisp.h (struct Lisp_Bool_vector): Document this.
9817
9818 2013-11-18 Eli Zaretskii <eliz@gnu.org>
9819
9820 * insdel.c (invalidate_buffer_caches): New function, consolidated
9821 from part of prepare_to_modify_buffer.
9822 (insert_from_gap, prepare_to_modify_buffer):
9823 * coding.c (code_convert_region, code_convert_string):
9824 Call invalidate_buffer_caches. (Bug#15841)
9825
9826 * lisp.h (invalidate_buffer_caches): Add prototype.
9827
9828 2013-11-17 Eli Zaretskii <eliz@gnu.org>
9829
9830 * w32term.c (x_update_window_end): Don't invalidate the entire
9831 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9832 highlight needs to be redisplayed. (Bug#15913)
9833
9834 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
9835
9836 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
9837
9838 2013-11-16 Eli Zaretskii <eliz@gnu.org>
9839
9840 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
9841 while we are using Vprin1_to_string_buffer.
9842
9843 * keymap.c (describe_map): Don't crash if PT is 1 both before and
9844 after inserting the description string. (Bug#15907)
9845
9846 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9847
9848 * data.c: Work around bogus GCC diagnostic about shift count.
9849 Reported by Eli Zaretskii in
9850 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
9851 (pre_value): New function.
9852 (count_trailing_zero_bits): Use it.
9853
9854 2013-11-15 Eli Zaretskii <eliz@gnu.org>
9855
9856 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
9857 assume C macros are not supported even under -g3 in these old GCC
9858 versions.
9859
9860 2013-11-15 Leo Liu <sdl.web@gmail.com>
9861
9862 * minibuf.c (Ftry_completion, Fall_completions)
9863 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
9864
9865 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9866
9867 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
9868 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
9869 This avoids placing unnecessary constants into the Emacs code.
9870
9871 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9872
9873 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
9874 for Cygwin w32 build.
9875
9876 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
9877 for Cygwin w32 build. (Bug#15892)
9878
9879 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
9880
9881 Simplify, port and tune bool vector implementation.
9882 * alloc.c (bool_vector_exact_payload_bytes)
9883 (bool_vector_payload_bytes): Remove.
9884 (bool_vector_fill): Return its argument.
9885 * alloc.c (bool_vector_fill):
9886 * lread.c (read1):
9887 * print.c (print_object):
9888 Simplify by using bool_vector_bytes.
9889 * alloc.c (make_uninit_bool_vector):
9890 New function, broken out from Fmake_bool_vector.
9891 (Fmake_bool_vector): Use it. Use tail call.
9892 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
9893 * data.c (BITS_PER_ULL): New constant.
9894 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
9895 if long long versions don't exist.
9896 (shift_right_ull): New function.
9897 (count_one_bits_word): New function, replacing popcount_bits_word
9898 macro. Don't assume that bits_word is no wider than long long.
9899 (count_one_bits_word, count_trailing_zero_bits):
9900 Don't assume that bits_word is no wider than long long.
9901 * data.c (bool_vector_binop_driver, bool_vector_not):
9902 * fns.c (Fcopy_sequence):
9903 * lread.c (read1):
9904 Create an uninitialized destination, to avoid needless work.
9905 (internal_equal): Simplify.
9906 (Ffillarray): Prefer tail call.
9907 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
9908 contain at least one word.
9909 (bits_word_to_host_endian): Prefer if to #if. Don't assume
9910 chars are narrower than ints.
9911 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
9912 * fns.c (Fcopy_sequence):
9913 Simplify and tune.
9914 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
9915 Don't try to port to hosts where bits_word values have holes; the
9916 code wouldn't work there anyway. Verify this assumption, though.
9917 (bool_vector_bytes): New function.
9918 (make_uninit_bool_vector): New decl.
9919 (bool_vector_fill): Now returns Lisp_Object.
9920
9921 * xfns.c (xic_create_fontsetname):
9922 * xrdb.c (gethomedir): Prefer tail calls.
9923
9924 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
9925
9926 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
9927 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
9928
9929 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
9930 that requires a return value.
9931 (Fset_buffer_modified_p): Take advantage of this change to do
9932 a tail call.
9933
9934 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9935
9936 * buffer.c (Frestore_buffer_modified_p): Sync it with
9937 Fset_buffer_modified_p.
9938 (Fforce_mode_line_update): New function, moved from subr.el.
9939 (Fset_buffer_modified_p): Use them.
9940 (syms_of_buffer): Defsubr Fforce_mode_line_update.
9941
9942 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
9943
9944 * search.c (find_newline): Rewrite to prefer offsets to pointers.
9945 This avoids undefined behavior when subtracting pointers into
9946 different aways. On my platform it also makes the code a tad
9947 smaller and presumably faster.
9948
9949 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9950
9951 * keyboard.c (command_loop_1): Use region-extract-function.
9952 * insdel.c (Qregion_extract_function): Not static any more (can we
9953 stop pretending that these vars can benefit from being marked static?).
9954
9955 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9956
9957 * search.c (find_newline): If buffer text is relocated during the
9958 "dumb loop", adjust C pointers into buffer text to follow suit.
9959 (Bug#15841)
9960
9961 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
9962
9963 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
9964 for conversion (Bug#15837).
9965
9966 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9967
9968 * fileio.c (Finsert_file_contents): Invalidate the newline cache
9969 for the entire range of inserted characters. (Bug#15841)
9970
9971 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
9972
9973 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
9974 unspecified.
9975 (realize_default_face): Remove assignment to distant-foreground if
9976 unspecified (Bug#15815).
9977
9978 2013-11-08 Eli Zaretskii <eliz@gnu.org>
9979
9980 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
9981 cache-long-scans disabled, since we don't want to call
9982 prepare_to_modify_buffer (in insert_1_both) for each message we
9983 display.
9984
9985 * buffer.h (bset_cache_long_scans): New INLINE function, moved
9986 from buffer.c. Improve commentary to the buffer field setter
9987 functions.
9988
9989 * buffer.c (bset_cache_long_scans): Static function deleted.
9990 Improve commentary to the buffer field setter functions.
9991 (init_buffer_once): Default for cache-long-scans changed to t.
9992 (Bug#15797)
9993
9994 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
9995
9996 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
9997
9998 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
9999 This bug was introduced in my 2013-06-21 change, and caused
10000 struct Lisp_Sub_Char_Table objects to be given too many slots,
10001 which broke 'make -C admin/unidata'.
10002
10003 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
10004
10005 Import changes from mac-port 4.5.
10006 * macfont.m (mac_font_copy_default_descriptors_for_language)
10007 (mac_font_copy_default_name_for_charset_and_languages): Declare.
10008 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
10009 (macfont_language_default_font_names): New.
10010 (macfont_list): Rearrange language/charset code.
10011 (macfont_close): Don't check for macfont_info->cache.
10012 (mac_ctfont_create_preferred_family_for_attributes): New font
10013 selection code, call
10014 mac_font_copy_default_name_for_charset_and_languages.
10015 (mac_font_copy_default_descriptors_for_language)
10016 (mac_font_copy_default_name_for_charset_and_languages): New functions.
10017
10018 * macfont.h (kCTVersionNumber10_9): Define if not defined.
10019
10020 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
10021
10022 Port to C11 aligned_alloc, and fix some integer overflows.
10023 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
10024 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
10025 and use of posix_memalign replaced with aligned_alloc.
10026 (aligned_alloc): New function, defined or declared as needed.
10027 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
10028 Don't undef; configure.ac now does this.
10029 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
10030 (calloc, aligned_alloc): Check for integer overflow.
10031 (aligned_alloc): Rename from memalign. All uses changed.
10032 (memalign): New function, an alias for aligned_alloc.
10033
10034 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
10035
10036 * xdisp.c (redisplay_internal): Fix typo in last change.
10037
10038 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
10039
10040 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
10041
10042 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
10043
10044 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
10045 redisplay--mode-lines-cause.
10046 (redisplay_internal): Keep them uptodate. Remove redundant check of
10047 buffer_shared_and_changed.
10048 * *.[chm]: Number every assignment to update_mode_lines so we
10049 can track why it is set.
10050
10051 2013-11-06 Eli Zaretskii <eliz@gnu.org>
10052
10053 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
10054
10055 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
10056
10057 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
10058 can track why it is set.
10059
10060 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
10061
10062 Integer-related fixes for term.c etc.
10063 * dispextern.h (face_tty_specified_color): New function.
10064 * term.c (turn_on_face): Don't rely on undefined behavior when
10065 assigning an out-of-range value to 'long'.
10066 Simplify test for toggling highlight.
10067 (tty_capable_p): Omit last two (unused) args. All callers changed.
10068 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
10069 (read_menu_input, tty_menu_activate, tty_menu_show):
10070 * xfaces.c (x_supports_face_attributes_p)
10071 (tty_supports_face_attributes_p):
10072 Use bool for boolean. All callers changed.
10073 (tty_supports_face_attributes_p): Omit defaults for color indices;
10074 no longer needed. Simplify tail call.
10075
10076 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
10077
10078 * xdisp.c (prepare_menu_bars): Mark static.
10079 * lisp.h (prepare_menu_bars): Don't declare.
10080 * xselect.c (x_handle_selection_clear):
10081 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
10082
10083 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
10084
10085 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
10086 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
10087
10088 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
10089
10090 * keyboard.c (Fcommand_error_default_function): Rename from
10091 Fdefault_error_output.
10092
10093 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
10094
10095 * keyboard.c (Fdefault_error_output): New function, extracted from
10096 cmd_error_internal.
10097 (syms_of_keyboard): Use it for Vcommand_error_function.
10098
10099 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
10100
10101 * eval.c (handlerlist_sentinel): New variable (bug#15802).
10102 (init_eval): Use it to ensure handlerlist is non-NULL.
10103 (unwind_to_catch): Make sure we never set handlerlist to NULL.
10104 (Fsignal): Adjust NULLness test of handlerlist.
10105 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
10106
10107 2013-11-05 Eli Zaretskii <eliz@gnu.org>
10108
10109 * callproc.c (call_process): Call prepare_to_modify_buffer before
10110 decoding text read from the sub-process, as the decoded stuff will
10111 be inserted into the buffer. This will invalidate the various
10112 caches maintained for the buffer. (Bug#15148)
10113
10114 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
10115
10116 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
10117 string of glyphless-char-display.
10118
10119 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
10120
10121 * nsfns.m (ns_get_name_from_ioreg): New function.
10122 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
10123 OSX >= 10.9. Use ns_get_name_from_ioreg.
10124
10125 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
10126
10127 Simplify and port recent bool vector changes.
10128 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
10129 only in this file. Use a more-efficient implementation if the
10130 second argument is a power of 2.
10131 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
10132 Remove no-longer-necessary compile-time checks.
10133 (bool_vector_exact_payload_bytes): New function.
10134 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
10135 exact payload changed to call the new function. Do not assume
10136 that the arg or result fits in ptrdiff_t.
10137 (bool_vector_fill): New function.
10138 (Fmake_bool_vector): Use it. Don't assume bit counts fit
10139 in ptrdiff_t.
10140 (vroundup_ct): Don't assume arg fits in size_t.
10141 * category.c (SET_CATEGORY_SET): Remove. All callers now just
10142 invoke set_category_set.
10143 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
10144 All callers changed. Use bool_vector_set.
10145 * category.h (XCATEGORY_SET): Remove; no longer needed.
10146 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
10147 bool_vector_bitref.
10148 * data.c (Faref): Use bool_vector_ref.
10149 (Faset): Use bool_vector_set.
10150 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
10151 (Fbool_vector_not, Fbool_vector_count_matches)
10152 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
10153 * fns.c (concat): Use bool_vector_ref.
10154 (Ffillarray): Use bool_vector_fill.
10155 (mapcar1): Use bool_vector_ref.
10156 (sxhash_bool_vector): Hash words, not bytes.
10157 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
10158 a constant, since it's now used in #if.
10159 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
10160 unsigned char on unusual architectures, so that we no longer
10161 assume that the number of bits per bits_word is a power of two or
10162 is a multiple of 8 or of CHAR_BIT.
10163 (Qt): Add forward decl.
10164 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
10165 at least as strictly as bits_word.
10166 (bool_vector_data, bool_vector_uchar_data): New accessors.
10167 All data structure accesses changed to use them.
10168 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
10169 (bool_vector_set): New functions.
10170 (bool_vector_fill): New decl.
10171 (ROUNDUP): Move to alloc.c as described above.
10172
10173 Fix recent gnutls changes.
10174 * gnutls.c (Fgnutls_boot): Don't assume C99.
10175 * process.c (wait_reading_process_output): Fix typo in recent change.
10176
10177 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
10178
10179 * process.c (wait_reading_process_output, read_process_output)
10180 (send_process): Check gnutls_state is not NULL.
10181
10182 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
10183 (Fgnutls_boot): Set process gnutls_p later, after initialization.
10184
10185 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
10186
10187 * nsterm.m (init, run, stop:): New methods in EmacsApp for
10188 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
10189
10190 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
10191 OSX >= 10.9.
10192
10193 * nsfns.m (Fx_create_frame): Fix memory leak.
10194
10195 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
10196 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
10197 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
10198
10199 2013-11-04 Eli Zaretskii <eliz@gnu.org>
10200
10201 * xdisp.c (message3_nolog, message_with_string): Encode the string
10202 before writing it to the terminal in a non-interactive session.
10203
10204 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
10205 sure we concatenate them into a unibyte string.
10206
10207 * fileio.c (make_temp_name): Encode PREFIX, and decode the
10208 resulting temporary name before returning it to the caller.
10209 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
10210 is a unibyte string, convert NAME to a unibyte string to ensure
10211 that the result is also a unibyte string.
10212
10213 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
10214 create unibyte strings from default paths and directory/file
10215 names.
10216
10217 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
10218 string.
10219
10220 * callproc.c (init_callproc): Use build_unibyte_string to make
10221 sure we create unibyte strings from default paths and
10222 directory/file names.
10223
10224 * buffer.c (init_buffer): Don't store default-directory of
10225 *scratch* in multibyte form. The original problem which led to
10226 that is described in
10227 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
10228 but it was solved long ago. (Bug#15260)
10229
10230 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
10231
10232 Port to stricter C99 platforms.
10233 Especially, C99 prohibits nesting a struct X inside struct Y if
10234 struct X has a flexible array member.
10235 * alloc.c (struct sdata): New type.
10236 (sdata): Implement in terms of struct sdata.
10237 Remove u member; all uses replaced by next_vector, set_next_vector.
10238 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
10239 (SDATA_DATA_OFFSET): Now a constant, not a macro.
10240 (struct sblock): Rename first_data member to data, which is now
10241 a flexible array member. All uses changed.
10242 (next_vector, set_next_vector, large_vector_vec): New functions.
10243 (vector_alignment): New constant.
10244 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
10245 (struct large-vector): Now merely a NEXT member, since the old approach
10246 ran afoul of stricter C99. All uses changed to use
10247 large_vector_vec or large_vector_offset.
10248 (large_vector_offset): New constant.
10249 * dispnew.c: Include tparam.h, for tgetent.
10250 Do not include term.h; no longer needed.
10251 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
10252 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
10253 (struct Lisp_Vector): Use a flexible array member for contents,
10254 instead of a union with a member that is an array of size 1.
10255 All uses changed.
10256 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
10257 fact that the struct no longer contains a union.
10258 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
10259 (struct Lisp_Save_Value, struct Lisp_Free):
10260 Use unsigned, not int, for spacers, to avoid c99 warning.
10261 (union specbinding): Use unsigned, not bool, for bitfield, as
10262 bool is not portable to pre-C99 hosts.
10263
10264 2013-11-04 Glenn Morris <rgm@gnu.org>
10265
10266 * emacs.c (usage_message): Mention that `-L :...' appends.
10267
10268 2013-11-02 Glenn Morris <rgm@gnu.org>
10269
10270 * Makefile.in (abs_builddir): Remove.
10271 (bootstrap_exe): Use relative filename.
10272
10273 Use relative filenames in TAGS files.
10274 * Makefile.in (abs_srcdir): Remove it again.
10275 (.PHONY): Remove frc.
10276 (maintainer-clean): No more TAGS-LISP file.
10277 (TAGS): Pass relative file names to etags.
10278 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
10279
10280 * Makefile.in (abs_srcdir): New, set by configure.
10281 (lispdir): Remove.
10282 (maintainer-clean): Remove pointless echo. That should be in the
10283 top-level Makefile, if anywhere. Delete TAGS-LISP.
10284 (extraclean): No s/ and m/ directories for some time.
10285 (TAGS): Also depend on ctagsfiles3.
10286 Remove no-longer-defined S_FILE.
10287 Pass absolute filenames to etags once more.
10288 (TAGS-LISP): Replace lispdir with its expansion.
10289 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
10290 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
10291
10292 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
10293
10294 * xfaces.c (check_lface_attrs, realize_default_face):
10295 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
10296 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
10297
10298 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
10299
10300 * emacs.c (original_pwd): Remove global var by making it local.
10301 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
10302
10303 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
10304
10305 * xfaces.c: Declare color_distance.
10306 (QCdistant_foreground): New variable.
10307 (NEAR_SAME_COLOR_THRESHOLD): New define.
10308 (load_color2): New function.
10309 (load_color): Call load_color2.
10310 (load_face_colors): Call load_color2 and if distant-color is specified
10311 calculate distant and use distant-color if colors are near.
10312 (LFACE_DISTANT_FOREGROUND): New define.
10313 (merge_face_ref, Finternal_set_lisp_face_attribute)
10314 (Finternal_get_lisp_face_attribute)
10315 (x_supports_face_attributes_p): Handle distant-foreground similar to
10316 foreground.
10317 (syms_of_xfaces): DEFSYM QCdistant_foreground.
10318
10319 * dispextern.h (lface_attribute_index):
10320 Add LFACE_DISTANT_FOREGROUND_INDEX.
10321
10322 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
10323
10324 * image.c (pbm_next_char): New function.
10325 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
10326 (pbm_scan_number): Use it.
10327 (Qlibjpeg_version): New variable.
10328 (syms_of_image): DEFSYM and initialize it.
10329
10330 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
10331
10332 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
10333
10334 2013-10-31 Glenn Morris <rgm@gnu.org>
10335
10336 * emacs.c (original_pwd): New char.
10337 (main): If using --chdir, store original_pwd.
10338 (init_cmdargs): When setting Vinvocation_directory based on a
10339 relative argv[0], use original_pwd if set. (Bug#15768)
10340
10341 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10342
10343 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
10344
10345 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
10346
10347 * insdel.c: Fix minor problems found by static checking.
10348 (Qregion_extract_function): Now static.
10349 (prepare_to_modify_buffer_1): Remove unused locals.
10350
10351 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10352
10353 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
10354 (syms_of_xdisp): Declare pre-redisplay-function.
10355 (markpos_of_region): Remove function.
10356 (init_iterator, compute_stop_pos, handle_face_prop)
10357 (face_before_or_after_it_pos, reseat_to_string)
10358 (get_next_display_element, window_buffer_changed)
10359 (redisplay_internal, try_cursor_movement, redisplay_window)
10360 (try_window_reusing_current_matrix, try_window_id, display_line)
10361 (note_mode_line_or_margin_highlight, note_mouse_highlight)
10362 (display_string, mouse_face_from_buffer_pos): Remove region handling.
10363 * window.h (struct window): Remove field `region_showing'.
10364 * dispextern.h (struct it): Remove region_beg/end_charpos.
10365 (face_at_buffer_position, face_for_overlay_string)
10366 (face_at_string_position): Update prototypes.
10367 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
10368 (face_at_string_position): Remove `region_beg' and `region_end' args.
10369 * fontset.c (Finternal_char_font):
10370 * font.c (font_at, font_range): Adjust calls accordingly.
10371 * insdel.c (Qregion_extract_function): New var.
10372 (syms_of_insdel): Initialize it.
10373 (prepare_to_modify_buffer_1): Use it.
10374
10375 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10376
10377 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
10378 * ftxfont.c (ftxfont_get_gcs):
10379 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
10380 * xfaces.c (x_free_colors, x_free_dpy_colors)
10381 (x_create_gc, unload_color):
10382 * xselect.c (x_property_data_to_lisp):
10383 * xsettings.c (parse_settings):
10384 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
10385 (get_bits_and_offset): Adjust definition.
10386 * frame.c (XParseGeometry): Adjust locals.
10387 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
10388 * regex.h (toplevel): Likewise for reg_syntax_t.
10389
10390 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10391
10392 * eval.c (run_hook_with_args): Use FUNCTIONP.
10393
10394 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10395
10396 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
10397 fields, drop 'allocated_p' member and use -1 for uninitialized value.
10398 * w32term.h (struct w32_output): Similarly but do not use -1 because...
10399 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
10400 on MS-Windows anyway.
10401 (free_face_colors): Define only if HAVE_X_WINDOWS and...
10402 (free_realized_face): ...adjust user.
10403 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
10404 white relief pixels to -1.
10405 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
10406 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
10407 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
10408
10409 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
10410
10411 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
10412 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
10413 in practice now. All callers changed.
10414
10415 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
10416
10417 * dispextern.h (struct face): Use bitfields for 'underline_type'
10418 and 'box' members. Remove set-but-unused members 'pixmap_w' and
10419 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
10420 'stipple' member. Move 'lface' member up to help...
10421 * xfaces.c (make_realized_face): ...this function to find and
10422 clear just the members that need clearing.
10423 (load_face_colors, realize_x_face):
10424 * xdisp.c (extend_face_to_end_of_line): Adjust user.
10425
10426 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
10427
10428 * xftfont.c (struct xftfont_info): Remove set-but-unused
10429 'screen' member.
10430 (xftfont_open): Adjust user.
10431 (xftfont_get_colors): Remove useless prototype.
10432
10433 2013-10-26 Eli Zaretskii <eliz@gnu.org>
10434
10435 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
10436 before passing them to 'unexec'. (Bug#15260)
10437
10438 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
10439
10440 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
10441
10442 2013-10-25 Eli Zaretskii <eliz@gnu.org>
10443
10444 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
10445 the changed signature of the font driver's 'close' method.
10446
10447 * w32font.h (w32font_close): Adjust the prototype to the change in
10448 function definition.
10449
10450 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
10451
10452 * w32uniscribe.c (uniscribe_close): Adapt the call to
10453 w32font_close to its new prototype.
10454
10455 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
10456
10457 Omit unused frame argument of font API's close function.
10458 * font.h (struct font): Drop frame argument. Adjust comment.
10459 * font.c (font_clear_cache, font_close_object): Adjust users.
10460 * ftfont.c (ftfont_close):
10461 * ftxfont.c (ftxfont_close):
10462 * macfont.m (macfont_close):
10463 * nsfont.m (nsfont_close):
10464 * w32font.c (w32font_close):
10465 * xfont.c (xfont_close):
10466 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
10467 tweak comments and make functions safe if called more than once for
10468 the same font object.
10469
10470 Perform font-specific cleanup when font object is swept by GC. See
10471 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
10472 * alloc.c (cleanup_vector): New function.
10473 (sweep_vector): Call it for each reclaimed vector object.
10474 * font.h (struct font): Adjust comment.
10475
10476 2013-10-24 Glenn Morris <rgm@gnu.org>
10477
10478 * Makefile.in (abs_top_srcdir): New, set by configure.
10479
10480 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
10481
10482 Adjust recent font-related changes to fix bug#15686.
10483 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
10484 is a live window system frame, mark its default font too.
10485
10486 2013-10-23 Glenn Morris <rgm@gnu.org>
10487
10488 * Makefile.in (RUN_TEMACS): Make relative (again).
10489 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
10490 (bootstrap-emacs$(EXEEXT)):
10491 Quote entities that might contain whitespace.
10492
10493 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
10494
10495 Port to Solaris 10 and its bundled GCC. Reported by Timothy C. Burt.
10496 * floatfns.c (isfinite, isnan): Redefine unconditionally.
10497
10498 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
10499
10500 Do not allow font caches to grow too large.
10501 * alloc.c (compact_font_cache_entry, compact_font_caches):
10502 New functions or stub if not HAVE_WINDOW_SYSTEM.
10503 (compact_undo_list): Factor out from Fgarbage_collect.
10504 Add comment.
10505 (mark_face_cache): Mark face font. Move down to avoid
10506 extra prototypes.
10507 (mark_terminals): Do not mark font cache here.
10508 (Fgarbage_collect): Call compaction functions described
10509 above. Adjust comment.
10510
10511 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
10512
10513 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
10514 chdir to HOME (bug#15607).
10515
10516 * nsterm.m (Qcocoa, Qgnustep): New variables.
10517 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
10518 (ns_get_color): Make selection color work for GNUstep also.
10519
10520 2013-10-18 Eli Zaretskii <eliz@gnu.org>
10521
10522 * keyboard.c (make_lispy_event): Remove GPM-specific code that
10523 handles mouse clicks. Instead, let GPM use the same code as all
10524 the other mice use. See the discussion starting at
10525 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
10526 for the details of the problem with the menu bar this fixes.
10527
10528 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
10529
10530 Remove port-specific display name lists to avoid extra
10531 complexity and data duplication with display info lists.
10532 * xterm.h (x_display_name_list): Remove declaration.
10533 * xterm.c (x_display_name_list): Remove.
10534 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
10535 * xfns.c (x_display_info_for_name, Fx_display_list):
10536 Likewise. Use x_display_list where appropriate.
10537 * w32term.h (w32_display_name_list): Remove declaration.
10538 * w32term.c (w32_display_name_list): Remove.
10539 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
10540 Adjust users.
10541 * w32fns.c (x_display_info_for_name, Fx_display_list):
10542 Likewise. Use x_display_list where appropriate.
10543 * nsterm.h (ns_display_name_list): Remove declaration.
10544 * nsterm.m (ns_display_name_list): Remove.
10545 (ns_term_init, syms_of_nsterm): Adjust users.
10546 * nsfns.m (ns_display_info_for_name, Fx_display_list):
10547 Likewise. Use x_display_list where appropriate.
10548 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
10549 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
10550 (mark_terminals): Mark per-terminal font cache.
10551
10552 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
10553
10554 Don't run timers in input-pending-p. Its new check-timers param
10555 provides the prior behavior. (Bug#15045).
10556 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
10557
10558 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
10559
10560 Make some functions static in non-Microsoft builds.
10561 On my platform (Fedora 19 x86-64), this shrinks the
10562 Emacs executable (text+data) by 0.25%.
10563 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
10564 (load_color) [!MSDOS]:
10565 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
10566 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
10567 * lisp.h (check_existing):
10568 * process.h (conv_sockaddr_to_lisp, network_interface_list)
10569 (network_interface_info) [!WINDOWSNT]:
10570 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
10571 Remove extern decls.
10572 * fileio.c (check_existing):
10573 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
10574 * process.c (conv_sockaddr_to_lisp, network_interface_list)
10575 (network_interface_info) [!WINDOWSNT]:
10576 * term.c (encode_terminal_code) [!WINDOWSNT]:
10577 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
10578 * xfaces.c (load_color) [!MSDOS]:
10579 Now static.
10580 * fileio.c (check_existing, check_executable, check_writable):
10581 * process.c (network_interface_list, network_interface_info):
10582 Move earlier, so that we don't need forward decls.
10583 * gnutls.c (fn_gnutls_transport_set_errno)
10584 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
10585 Remove; unused.
10586 * w32.c (init_environment): Use faccessat rather than
10587 check_existing, partly for consistency with the rest of the code
10588 in this file, partly so that check_existing can be static.
10589
10590 Make VALMASK visible to GDB even if clang is used (Bug#15574).
10591 * emacs.c (MAIN_PROGRAM): New macro.
10592 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
10593 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
10594
10595 bool vector int width fixes
10596 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
10597 (Fbool_vector_count_matches_at):
10598 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
10599 can exceed PTRDIFF_MAX, at least in theory.
10600 (Fbool_vector_count_matches_at):
10601 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
10602
10603 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
10604
10605 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
10606 (struct sockaddr): Add forward decl, for platforms that lack it.
10607
10608 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
10609
10610 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
10611 Qnil (Bug#15628).
10612
10613 2013-10-16 Eli Zaretskii <eliz@gnu.org>
10614
10615 * w32.c (network_interface_get_info, network_interface_list)
10616 (network_interface_info): New functions. (Bug#15610)
10617 (GetAdaptersInfo_Proc): New typedef.
10618 (get_adapters_info): New wrapper function.
10619 (globals_of_w32): Initialize g_b_init_get_adapters_info.
10620
10621 * process.h (network_interface_list, network_interface_info):
10622 New prototypes.
10623
10624 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
10625 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
10626 all systems. Return non-nil for systems that HAVE_NET_IF_H and
10627 for WINDOWSNT. Doc fix.
10628 (syms_of_process): Defsubr Snetwork_interface_list and
10629 Snetwork_interface_info unconditionally.
10630
10631 * menu.c (have_boxes): Fix redundant simulation of radio buttons
10632 in NS GUI sessions. (Bug#15629)
10633
10634 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
10635
10636 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
10637
10638 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10639
10640 * print.c (print_object): Print " ..." when truncating bool vectors.
10641
10642 2013-10-15 Eli Zaretskii <eliz@gnu.org>
10643
10644 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
10645 standard mouse buttons.
10646
10647 * termhooks.h (struct input_event): Remove incorrect commentary.
10648
10649 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10650
10651 Disallow bool vector operations on mixed-length operands.
10652 The old behavior left garbage in the result vector sometimes,
10653 and didn't seem to be useful.
10654 * data.c (Qwrong_length_argument): New static var.
10655 (wrong_length_argument): New function.
10656 (bool_vector_binop_driver): Check that args agree in length.
10657
10658 * keyboard.c, keyboard.h (all_kboards): Now static.
10659
10660 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
10661
10662 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
10663 note from the lispref.
10664
10665 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
10666
10667 * nsterm.h (struct ns_display_info): Remove set-but-unused
10668 member image_cache (image caches are per-terminal anyway).
10669 (FRAME_X_IMAGE_CACHE): Remove.
10670 * nsterm.m (ns_initialize_display_info): Adjust user.
10671
10672 2013-10-14 Eli Zaretskii <eliz@gnu.org>
10673
10674 * w32proc.c: Include mingw_time.h.
10675
10676 * w32.c: Include mingw_time.h.
10677
10678 Implement scrolling of TTY menus when the screen is too short.
10679
10680 * term.c (tty_menu_display): Accept an additional argument, the
10681 menu item from which to start displaying the menu. Account for
10682 the value of Y when limiting the menu to the number of available
10683 screen lines.
10684 (mi_result): New enumeration.
10685 (read_menu_input): Return enumerated value. When the y coordinate
10686 hits min_y or max_y, return scroll indication instead of wrapping
10687 around the menu.
10688 (tty_menu_activate): Handle the scrolling indications from
10689 read_menu_input. Compute the first menu item to display and pass
10690 it to tty_menu_display.
10691
10692 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10693
10694 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
10695 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
10696 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
10697 Adjust to match the change described below.
10698 (struct terminal): Move must_write_spaces, line_ins_del_ok,
10699 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
10700 memory_below_frame members to...
10701 * termchar.h (struct tty_display_info): ...here because they're
10702 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
10703 * term.c (init_tty):
10704 * nsterm.m (ns_create_terminal):
10705 * w32term.c (w32_create_terminal):
10706 * xterm.c (x_create_terminal): Adjust users.
10707 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
10708 to filter out non-TTY frames. Adjust comment.
10709 (scrolling): Adjust user. Prefer eassert for debugging check.
10710
10711 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10712
10713 * xfaces.c (PT_PER_INCH): Remove unused macro.
10714 * termhooks.h (struct terminal): Remove set-but-unused
10715 member fast_clear_end_of_line.
10716 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
10717 * nsterm.m (ns_create_terminal):
10718 * term.c (init_tty):
10719 * w32term.c (w32_create_terminal):
10720 * xterm.c (x_create_terminal): Adjust users.
10721
10722 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
10723
10724 * lisp.h (bool_vector_size): New function.
10725 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
10726 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10727 (Fbool_vector_not, Fbool_vector_count_matches_at):
10728 Remove uses of 'eassume' that should no longer be needed,
10729 because they are subsumed by the 'eassume' in bool_vector_size.
10730
10731 2013-10-12 Eli Zaretskii <eliz@gnu.org>
10732
10733 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
10734 after inclusion of gif_lib.h, thus fixing compiler warnings caused
10735 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
10736
10737 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10738
10739 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
10740 have different dimensions. (Bug#15575)
10741
10742 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
10743 visibility.
10744
10745 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
10746
10747 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10748
10749 * term.c (tty_menu_show): Never return with unbalanced
10750 specpdl. Use eassert for debugging check. Adjust style.
10751
10752 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10753
10754 * term.c (read_menu_input): Make selection of menu items
10755 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10756 (tty_menu_activate): Fix off-by-one error when computing max_y.
10757
10758 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
10759
10760 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
10761 audit logging (only used with GnuTLS 3.x) and enable it.
10762
10763 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10764
10765 * dispnew.c (redraw_frame): Remove useless #ifdef because
10766 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
10767 Also, move TTY fflush to...
10768 * term.c (tty_update_end): ...this function.
10769
10770 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10771
10772 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
10773 the end of the frame's glyph matrix. (Bug#15575)
10774
10775 * term.c (tty_menu_display): Don't move cursor while overwriting
10776 frame's glyphs with menu items. Limit the number of items
10777 displayed to what can be shown on the available screen lines,
10778 excluding the echo area.
10779 (tty_menu_activate): Limit the Y coordinate allowed by
10780 read_menu_input to the last screen line used for menu display.
10781
10782 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
10783
10784 * lisp.h (eassume): New macro.
10785 Also, include <verify.h>, for 'assume'.
10786 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
10787 (vroundup, vector_nbytes):
10788 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10789 (Fbool_vector_not, Fbool_vector_count_matches)
10790 (Fbool_vector_count_matches_at):
10791 Use eassume, not eassert.
10792 * casetab.c (set_identity, shuffle):
10793 * composite.c (composition_gstring_put_cache):
10794 * dispnew.c (update_frame_1):
10795 * ftfont.c (ftfont_shape_by_flt):
10796 * image.c (gif_load):
10797 * intervals.c (offset_intervals):
10798 * macfont.m (macfont_shape):
10799 Remove calls to 'assume' that are no longer needed, because
10800 --enable-gcc-warnings no longer generates bogus warnings
10801 when these calls are removed.
10802
10803 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10804
10805 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
10806
10807 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
10808
10809 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
10810 (Qsubstitute_env_in_file_name): New var.
10811 (syms_of_fileio): Define it.
10812
10813 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10814
10815 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
10816 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
10817 (Bug#15575)
10818
10819 * term.c (save_and_enable_current_matrix): Don't allocate and
10820 don't save margin areas.
10821 (restore_desired_matrix): Don't restore margin areas.
10822 (free_saved_screen): Don't free margin areas.
10823
10824 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
10825
10826 * image.c: Pacify --enable-gcc-warnings.
10827 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
10828 #define only if used.
10829
10830 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10831
10832 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
10833 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
10834 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
10835 (gif_load): For giflib v5.x and later, display the error message
10836 produced by giflib when its functions fail.
10837 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
10838 (Bug#15531)
10839
10840 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10841
10842 * keyboard.c (last_event_timestamp): Remove. For X selection and
10843 GTK popup menus, it may be obtained from per-frame X display info.
10844 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
10845 (process_special_events): Adjust users.
10846 * keyboard.h (last_event_timestamp): Remove declaration.
10847 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
10848 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
10849 * menu.h (xmenu_show): Adjust prototype.
10850 * menu.c (Fx_popup_menu): Adjust user.
10851 * xselect.c (x_own_selection, x_get_foreign_selection)
10852 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
10853
10854 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10855
10856 * keyboard.c (init_kboard): Now static. Add arg
10857 to denote window system. Adjust comment.
10858 (init_keyboard): Adjust user.
10859 (allocate_kboard): New function.
10860 (syms_of_keyboard):
10861 * nsterm.m (ns_term_init):
10862 * term.c (init_tty):
10863 * w32term.c (w32_create_terminal):
10864 * xterm.c (x_term_init): Use it.
10865 * keyboard.h (init_kboard): Remove prototype.
10866 (allocate_kboard): Add prototype.
10867
10868 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
10869
10870 * image.c (GIFLIB_MAJOR): Ensure it's defined.
10871 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
10872
10873 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10874
10875 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
10876
10877 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10878
10879 * term.c (tty_menu_activate): Flush the output stream after
10880 showing the cursor, and don't mark the frame garbaged at exit from
10881 the function. Fixes redisplay glitches when moving from one menu
10882 to another.
10883
10884 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
10885
10886 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
10887 or throw error (Bug#15570).
10888
10889 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10890
10891 * intervals.c (temp_set_point_both): Move test into 'eassert',
10892 for speed.
10893
10894 * lisp.h (eassert): Don't use 'assume'.
10895 Sometimes 'assume' wins in performance, and sometimes it loses,
10896 so it shouldn't be used all the time. Perhaps we need two
10897 flavors of 'eassert', one for where 'assume' is far more likely
10898 to help or to hurt; but that can be done later.
10899 Reported by Dmitry Antipov in
10900 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
10901 Also, don't include <verify.h>; no longer needed.
10902
10903 2013-10-09 Glenn Morris <rgm@gnu.org>
10904
10905 * eval.c (Fcond): Doc tweak.
10906
10907 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10908
10909 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
10910 expressions with side effects to eassert. (Bug#15565)
10911
10912 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
10913
10914 * fns.c (hashfn_user_defined): Allow hash functions to return any
10915 Lisp_Object.
10916
10917 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10918
10919 Fix minor problems found by static checking.
10920 * dispnew.c (save_current_matrix): Omit unnecessary casts.
10921 * dispnew.c (update_frame_with_menu): Mark debug local as used.
10922 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
10923 * keyboard.c (read_menu_command): Remove unused local.
10924 * lisp.h (read_menu_command): New decl.
10925 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
10926 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
10927 Return ptrdiff_t, not int.
10928 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
10929 not int, for benefit of xpalloc.
10930 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
10931 and xpalloc.
10932 (have_menus_p): Remove; unused.
10933 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
10934 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
10935 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
10936 Now static.
10937 (save_and_enable_current_matrix): Omit unnecessary casts.
10938 (read_menu_input): Omit local extern decl (now in lisp.h).
10939 Don't access uninitialized storage if mouse_get_xy fails.
10940 (tty_menu_activate): Mark local as initialized, for lint.
10941 (tty_menu_activate, tty_meny_show): Remove unused locals.
10942
10943 2013-10-08 Eli Zaretskii <eliz@gnu.org>
10944
10945 Support menus on text-mode terminals.
10946 * xterm.h (xw_popup_dialog): Add prototype.
10947
10948 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
10949 (xmenu_show): Block input here, instead in Fx_popup_menu.
10950 (xw_popup_dialog): New function, with X-specific bits of popup
10951 dialogs.
10952
10953 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
10954 New functions.
10955
10956 * window.c (Fset_window_configuration): Use run-time tests of the
10957 frame type instead of compile-time conditionals, when menu-bar
10958 lines are considered.
10959
10960 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
10961 (w32_popup_dialog): New prototypes.
10962
10963 * w32menu.c (Fx_popup_dialog): Function deleted.
10964 (w32_popup_dialog): New function, with w32 specific bits of popup
10965 dialogs. Block input here.
10966
10967 * w32inevt.c (w32_console_read_socket): Minor change to add
10968 debugging TTY events.
10969
10970 * w32fns.c (show_hourglass): If returning early because the frame
10971 is not a GUI frame, unblock input.
10972
10973 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
10974 (cursorY): New functions.
10975
10976 * termhooks.h (cursorX, cursorY): Prototypes of functions on
10977 WINDOWSNT, macros that call curX and curY elsewhere.
10978
10979 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
10980
10981 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
10982 specific function to hide and show cursor on a text-mode terminal.
10983 (tty_menu_struct, struct tty_menu_state): New structures.
10984 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
10985 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
10986 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
10987 (tty_menu_locate, save_and_enable_current_matrix)
10988 (restore_desired_matrix, screen_update, read_menu_input)
10989 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
10990 (tty_pop_down_menu, tty_menu_last_menubar_item)
10991 (tty_menu_new_item_coords, tty_menu_show): New functions.
10992 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
10993
10994 * nsterm.h (ns_popup_dialog): Adjust prototype.
10995
10996 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
10997 of in x-popup-menu.
10998 (ns_popup_dialog): Adapt order of arguments to the other
10999 *_menu_show implementations.
11000 (Fx_popup_dialog): Function deleted.
11001
11002 * msdos.c (x_set_menu_bar_lines): Delete unused function.
11003
11004 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
11005
11006 * menu.c (have_boxes): New function.
11007 (single_keymap_panes): Use it instead of a compile-time
11008 conditional.
11009 (single_menu_item): Use run-time tests of the frame type instead
11010 of compile-time conditionals.
11011 (encode_menu_string): New function.
11012 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
11013 the macro, since different types of frame need different encoding
11014 of menu items.
11015 (digest_single_submenu): Use run-time tests of frame type instead
11016 of, or in addition to, compile-time conditionals.
11017 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
11018 (Fx_popup_menu): Detect when the function is called from keyboard
11019 on a TTY. Don't barf when invoked on a text-mode frame.
11020 Check frame type at run time, instead of compile-time conditionals for
11021 invoking terminal-specific menu-show functions.
11022 Call tty_menu_show on text-mode frames.
11023 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
11024 run time to determine which alternative to invoke; support dialogs
11025 on TTYs.
11026
11027 * keyboard.h <Qmouse_movement>: Declare.
11028
11029 * keyboard.c <Qmouse_movement>: Now extern.
11030 <Qecho_keystrokes>: New static variable.
11031 (read_key_sequence): Accept an additional argument, a flag to
11032 prevent redisplay during reading of the key sequence. All callers
11033 changed.
11034 (read_menu_command): New function.
11035 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
11036 autosave.
11037 (toolkit_menubar_in_use): New function.
11038 (make_lispy_event): Use it instead of a compile-time test.
11039
11040 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
11041 window-system being available.
11042
11043 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
11044 to x-popup-dialog on the frame type, they all now support popup
11045 dialogs.
11046
11047 * dispnew.c (save_current_matrix): Save the margin areas.
11048 (restore_current_matrix): Restore margin areas.
11049 (update_frame_with_menu): New function.
11050
11051 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
11052 Add prototypes.
11053
11054 * alloc.c (make_save_ptr): Now compiled unconditionally.
11055
11056 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
11057
11058 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
11059 (redraw_frame, update_frame): Adjust users.
11060 * dispextern.h (set_window_update_flags): Adjust prototype.
11061 * xdisp.c (redisplay_internal): When updating all frames with zero
11062 windows_or_buffers_changed, assume that only the windows that shows
11063 current buffer should be really updated.
11064
11065 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
11066
11067 Do not allocate huge temporary memory areas and objects while encoding
11068 for file I/O, thus reducing an enormous memory usage for large buffers.
11069 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
11070 * coding.h (struct coding_system): New member raw_destination.
11071 * coding.c (setup_coding_system): Initialize it to zero.
11072 (encode_coding_object): If raw_destination is set, do not create
11073 dst_object. Add comment.
11074 * fileio.c (toplevel): New constant E_WRITE_MAX.
11075 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
11076 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
11077
11078 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
11079
11080 * nsterm.m (windowDidExitFullScreen:)
11081 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
11082
11083 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
11084
11085 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
11086 * keyboard.c (unblock_input_to): Don't process pending signals
11087 if a fatal error is in progress.
11088
11089 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
11090 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
11091 they're talking about words in Lisp bool vectors.
11092 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
11093 * data.c (popcount_bits_word): Rename from popcount_size_t.
11094 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
11095 All uses changed.
11096
11097 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
11098
11099 Improve support for popcount and counting trailing zeros (Bug#15550).
11100 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
11101 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
11102 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
11103 (popcount_size_t_msc, popcount_size_t_gcc):
11104 Remove; now done by Gnulib.
11105 (popcount_size_t): Now a macro that defers to Gnulib.
11106 (count_trailing_zero_bits): Return int, for consistency with
11107 Gnulib and because Emacs prefers signed to unsigned int.
11108 Don't assume that size_t is either unsigned int or unsigned long
11109 or unsigned long long.
11110 (size_t_to_host_endian): Do not assume that size_t is either
11111 exactly 32 or exactly 64 bits wide.
11112 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
11113 etc., so that it's now an enum constant, not a macro.
11114 No need to assume that it's either 32 or 64.
11115
11116 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
11117
11118 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
11119 on >= 10.7.
11120
11121 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
11122
11123 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
11124 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
11125
11126 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
11127
11128 emacs_read and emacs_write now use void *, not char *.
11129 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
11130 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
11131 Buffer arg is now void *, not char *. This matches plain
11132 'read' and 'write' better, and avoids a constraint violation
11133 on Solaris 9 with Oracle Studio.
11134
11135 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
11136
11137 * alloc.c (Fmake_string): For ASCII char initializer, prefer
11138 memset to explicit loop. Otherwise copy largest possible chunk
11139 from initialized to uninitialized part, thus allowing the longer
11140 memcpy runs and reducing the number of loop iterations.
11141
11142 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
11143
11144 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
11145 hide toolbar (Bug#15388).
11146 (windowDidEnterFullScreen:): If presentation options are zero,
11147 set them here (Bug#15388).
11148 (ns_update_auto_hide_menu_bar): Remove runtime check.
11149 Don't auto hide dock unless menubar is also auto hidden.
11150
11151 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
11152
11153 * editfns.c (message): Mention batch mode in doc string.
11154
11155 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
11156
11157 * nsterm.m (check_native_fs): Remove erroneous comment.
11158
11159 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
11160
11161 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
11162 uses find_newline instead of scan_newline and so doesn't move point.
11163
11164 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
11165
11166 Use hardware support for byteswapping on glibc x86 etc.
11167 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
11168 whereas the old swap64 needed 30.
11169 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
11170 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
11171 Use byteswap.h's macros to swap bytes.
11172 * lisp.h (swap16, swap32, swap64): Remove.
11173 All uses replaced by bswap_16, bswap_32, bswap_64.
11174
11175 * bytecode.c (exec_byte_code): Use some more volatile variables
11176 to work around local variables getting clobbered by longjmp.
11177 Port to pre-C99, which doesn't allow decls after stmts.
11178
11179 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
11180
11181 * lisp.h (eassert): Assume that COND is true when optimizing.
11182 In other words, take on the behavior of eassert_and_assume.
11183 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
11184 (eassert_and_assume): Remove. All uses replaced by eassert.
11185
11186 * xdisp.c (Qglyphless_char): Now static.
11187
11188 Adjust to merge from gnulib.
11189 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
11190 * lisp.h: Include <verify.h>, for 'assume'.
11191
11192 * eval.c (clobbered_eassert): New macro.
11193 (internal_catch, internal_condition_case)
11194 (internal_condition_case_1, internal_condition_case_2)
11195 (internal_condition_case_n): Use it instead of eassert
11196 when the argument contains locals clobbered by longjmp.
11197 Don't use clobbered locals outside of clobbered_eassert.
11198 (internal_lisp_condition_case): Use a volatile variable
11199 to work around a local variable's getting clobbered.
11200
11201 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11202
11203 * lisp.h (struct handler): Merge struct handler and struct catchtag.
11204 (PUSH_HANDLER): New macro.
11205 (catchlist): Remove.
11206 (handlerlist): Always declare.
11207
11208 * eval.c (catchlist): Remove (merge with handlerlist).
11209 (handlerlist, lisp_eval_depth): Not static any more.
11210 (internal_catch, internal_condition_case, internal_condition_case_1)
11211 (internal_condition_case_2, internal_condition_case_n):
11212 Use PUSH_HANDLER.
11213 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
11214 handlerlist/catchlist.
11215 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
11216 handlerlist which can only handle a single condition-case handler at
11217 a time.
11218 (find_handler_clause): Simplify since we only a single branch here
11219 any more.
11220
11221 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
11222 and Bpophandler.
11223 (bcall0): New function.
11224 (exec_byte_code): Add corresponding cases. Improve error message when
11225 encountering an invalid byte-code. Let Bunwind_protect accept
11226 a function (rather than a list of expressions) as argument.
11227
11228 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
11229 and make them unconditional now that they're heap-allocated.
11230
11231 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11232
11233 * charset.c (Fdecode_char, Fencode_char): Remove description of
11234 `restriction' arg. now that it's hidden by advertised-calling-convention.
11235
11236 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
11237
11238 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
11239 Remove unused variable (from mac-port).
11240 (macfont_draw): Use s->ybase for correct y position.
11241
11242 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11243
11244 * frame.h (struct frame): Drop has_minibuffer member because...
11245 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
11246 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
11247
11248 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11249
11250 * window.h (struct window): Prefer enum text_cursor_kinds to int
11251 for phys_cursor_type member. Move the latter, phys_cursor_width,
11252 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
11253 * window.c (replace_window, make_window): Adjust users.
11254
11255 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11256
11257 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
11258 this module is never compiled otherwise.
11259
11260 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
11261
11262 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
11263 (Bug#15500).
11264
11265 2013-09-29 Eli Zaretskii <eliz@gnu.org>
11266
11267 * xdisp.c (get_next_display_element): Don't call face_for_font in
11268 a build configured --without-x. (Bug#15484)
11269
11270 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
11271
11272 * window.c (calc_absolute_offset): #elif should be #elif defined.
11273
11274 * frame.c (delete_frame): Block/unblock input to overcome race
11275 condition (Bug#15475).
11276
11277 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
11278
11279 * frame.c (delete_frame): Record selected frame only after
11280 calling Qdelete_frame_functions (Bug#15477).
11281
11282 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
11283
11284 * nsterm.m (ns_selection_color): Remove.
11285 (ns_get_color): Check for ns_selection_(fg|bg)_color using
11286 NSColor selectedText(Background)Color. Only for COCOA.
11287 (ns_term_init): Remove assignment of ns_selection_color, logic
11288 moved to ns_get_color.
11289
11290 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
11291 NS_SELECTION_COLOR_DEFAULT.
11292 (NS_SELECTION_FG_COLOR_DEFAULT): New.
11293
11294 2013-09-28 Eli Zaretskii <eliz@gnu.org>
11295
11296 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
11297 frame' does not have the tool_bar_window member.
11298
11299 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
11300
11301 Signal error when reading an empty byte-code object (Bug#15405)
11302 * lread.c (read1): Signal error.
11303 * alloc.c (make_byte_code): eassert header size.
11304 (sweep_vectors): Change an int to size_t.
11305
11306 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11307
11308 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
11309 instead of ints, as it's the usual style for offsetof constants. See:
11310 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
11311
11312 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
11313 This is ugly, but it should fix the performance problem for older
11314 GCC versions in the short run. I'll look into integrating the
11315 Gnulib module for popcount, as a better fix.
11316 See the thread starting in:
11317 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
11318 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
11319 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
11320 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
11321 (popcount_size_t): Use it.
11322
11323 2013-09-24 Daniel Colascione <dancol@dancol.org>
11324
11325 * process.c (Fnetwork_interface_info): Fix build break due to
11326 vector changes.
11327
11328 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11329
11330 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
11331 Prefer signed to unsigned integers where either will do.
11332 No need for 'const' on locals that do not escape.
11333 Omit easserts with unnecessary and unportable assumptions about
11334 alignment. Avoid unnecessary casts to char *.
11335
11336 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11337
11338 Use union for the payload of struct Lisp_Vector.
11339 This helps to avoid a few glitches dictated by C's aliasing rules.
11340 * lisp.h (struct Lisp_Vector): Use union for next and
11341 contents member. Adjust comment. Change related users.
11342 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
11343 Related users changed.
11344 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
11345 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
11346 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
11347 * xfaces.c, xfont.c, xmenu.c: Related users changed.
11348
11349 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11350
11351 Optimize glyph row clearing and copying routines.
11352 * dispextern.h (struct glyph_row): Change layout of struct
11353 glyph_row to help copy_row_except_pointers. Adjust comment.
11354 * dispnew.c (null_row): Remove.
11355 (clear_glyph_row): Use offsetof and memset to find and clear
11356 just the members that need clearing. Adjust comment.
11357 (copy_row_except_pointers): Likewise for copying.
11358
11359 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11360
11361 Some minor cleanups of recently-added bool vector code.
11362 * conf_post.h (assume): Always return void. Use lint version
11363 only if GCC and MSC versions don't apply.
11364 * conf_post.h (assume):
11365 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
11366 Depend on _MSC_VER, not __MSC_VER, for consistency with
11367 the rest of Emacs.
11368 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
11369 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
11370 (bool_vector_binop_driver, count_trailing_zero_bits)
11371 (size_t_to_host_endian): Now static, not static inline;
11372 the latter isn't needed with modern compilers and doesn't
11373 work with older compilers anyway.
11374
11375 * alloc.c (valgrind_p): Use bool for boolean.
11376
11377 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11378
11379 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
11380 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
11381 (display_last_displayed_message_p, message_buf_print)
11382 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
11383 Use bool for boolean.
11384 * dispextern.h (cancel_line, init_desired_glyphs):
11385 Remove ancient leftover.
11386 (help_echo_showing_p, hourglass_shown_p):
11387 * lisp.h (noninteractive_need_newline): Adjust declaration.
11388
11389 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11390
11391 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11392 Move to...
11393 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11394 ...this file and convert the latter to static. Adjust comment.
11395 (make_initial_frame):
11396 * window.c (init_window_once): Adjust user.
11397 * frame.h (last_nonminibuf_frame): Remove declaration.
11398 * lisp.h (selected_frame): Likewise.
11399 * msdos.c (the_only_display_info): Adjust comment.
11400
11401 2013-09-23 Eli Zaretskii <eliz@gnu.org>
11402
11403 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
11404 computing the end column of mouse-highlight that comes from
11405 display or overlay strings. (Bug#15437)
11406 (note_mouse_highlight): Adapt calculation of last argument to
11407 mouse_face_from_string_pos to the above change.
11408
11409 * conf_post.h (__has_builtin): Define to zero, if undefined, on
11410 all platforms, not just for clang.
11411
11412 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
11413
11414 * filelock.c (lock_file_1): Rearrange to remove compiler warning
11415 about excess arguments to snprintf.
11416
11417 * conf_post.h(assume): Use __builtin_unreachable for clang.
11418
11419 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
11420
11421 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
11422 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
11423
11424 2013-09-23 Daniel Colascione <dancol@dancol.org>
11425
11426 * alloc.c (USE_VALGRIND): New macro; on by default
11427 when ENABLE_CHECKING.
11428 (mark_maybe_object, mark_maybe_pointer)
11429 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
11430 valgrind purposes.
11431 (valgrind_p) [USE_VALGRIND]: New variable.
11432 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
11433
11434 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
11435
11436 * process.c (wait_reading_process_output): Change int pnamelen to
11437 socklen_t.
11438
11439 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
11440 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
11441 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
11442 argument to unsigned long to avoid warning.
11443 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
11444
11445 * conf_post.h (assume): Fix compiler error: x shall be cond.
11446
11447 2013-09-22 Daniel Colascione <dancol@dancol.org>
11448
11449 * xfns.c (x_get_monitor_attributes): Suppress unused variable
11450 warning when compiling without a window system.
11451
11452 2013-09-22 Daniel Colascione <dancol@dancol.org>
11453
11454 * data.c (Qbool_vector_p): New symbol.
11455 (bool_vector_spare_mask, popcount_size_t_generic)
11456 (popcount_size_t_msc, popcount_size_t_gcc)
11457 (popcount_size_t)
11458 (bool_vector_binop_driver)
11459 (count_trailing_zero_bits, size_t_to_host_endian)
11460 (Fbool_vector_exclusive_or)
11461 (Fbool_vector_union)
11462 (Fbool_vector_intersection, Fbool_vector_set_difference)
11463 (Fbool_vector_subsetp, Fbool_vector_not)
11464 (Fbool_vector_count_matches)
11465 (Fbool_vector_count_matches_at): New functions.
11466 (syms_of_data): Intern new symbol, functions.
11467 * alloc.c (bool_vector_payload_bytes): New function.
11468 (Fmake_bool_vector): Instead of calling Fmake_vector,
11469 which performs redundant initialization and argument checking,
11470 just call allocate_vector ourselves. Make sure we clear any
11471 terminating padding to zero.
11472 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
11473 instead of open-coding the size calculation.
11474 (vroundup_ct): New macro.
11475 (vroundup): Assume argument >= 0; invoke vroundup_ct.
11476 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
11477 * composite.c (composition_gstring_put_cache):
11478 Change lint_assume to assume.
11479 * conf_post.h (assume): New macro.
11480 (lint_assume): Remove.
11481 * dispnew.c (update_frame_1): Change lint_assume to assume.
11482 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
11483 to assume.
11484 * image.c (gif_load): Change lint_assume to assume.
11485 * lisp.h (eassert_and_assume): New macro.
11486 (Qbool_vector_p): Declare.
11487 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
11488 (swap16, swap32, swap64): New inline functions.
11489 * macfont.m (macfont_shape): Change lint_assume to assume.
11490 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
11491 * xsettings.c (parse_settings): Use new swap16 and
11492 swap32 from lisp.h instead of file-specific macros.
11493
11494 2013-09-22 Eli Zaretskii <eliz@gnu.org>
11495
11496 * xdisp.c (try_window_id): Don't abort if cursor row could not be
11497 found (which can legitimately happen when the glyph row at the
11498 window start is disabled in the current_matrix. (Bug#15365)
11499
11500 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
11501
11502 Fix syntax.h bug introduced by recent INLINE change.
11503 syntax.h defined an extern inline function SYNTAX_ENTRY that was
11504 conditionally compiled one way in some modules, and a different
11505 way in others. This doesn't work with extern inline functions,
11506 which must have the same definition in all modules, because the
11507 defining code might be shared across modules, depending on the
11508 implementation. Symptoms reported by Martin Rudalics in:
11509 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
11510 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
11511 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
11512 overriding the corresponding functions in syntax.h.
11513 * syntax.h (syntax_property_entry, syntax_property_with_flags)
11514 (syntax_property): New inline functions.
11515 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
11516 Rewrite in terms of these new functions.
11517
11518 2013-09-21 Eli Zaretskii <eliz@gnu.org>
11519
11520 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
11521 not chars_in_text, whose result depends on the multibyteness of
11522 the current buffer. (Bug#15426)
11523
11524 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
11525
11526 Port recent change to hosts where pointers aren't 'long'.
11527 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
11528 Don't assume that pointers are the same width as 'long'.
11529 Add a compile-time check that a pointer fits into two X slots.
11530
11531 A simpler, centralized INLINE.
11532 * conf_post.h (INLINE): Define only if not already defined.
11533 This allows us to use a single INLINE, defined by one file
11534 per executable.
11535 * emacs.c (INLINE): Define it.
11536 Also, include category.h, charset.h, composite.h, dispextern.h,
11537 syntax.h, systime.h, so that their INLINE definitions are expanded
11538 properly for Emacs.
11539 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
11540 * buffer.h, buffer.c (BUFFER_INLINE):
11541 * category.h, category.c (CATEGORY_INLINE):
11542 * character.h, character.c (CHARACTER_INLINE):
11543 * charset.h, charset.c (CHARSET_INLINE):
11544 * composite.h, composite.c (COMPOSITE_INLINE):
11545 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
11546 * frame.h, frame.c (FRAME_INLINE):
11547 * intervals.h, intervals.c (INTERVALS_INLINE):
11548 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
11549 * lisp.h, alloc.c (LISP_INLINE):
11550 * process.h, process.c (PROCESS_INLINE):
11551 * syntax.h, syntax.c (SYNTAX_INLINE):
11552 * systime.h, sysdep.c (SYSTIME_INLINE):
11553 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
11554 * window.h, window.c (WINDOW_INLINE):
11555 Remove. All uses replaced with INLINE.
11556
11557 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
11558
11559 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
11560 to avoid Bug#15398.
11561
11562 2013-09-19 Eli Zaretskii <eliz@gnu.org>
11563
11564 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
11565 'const char *' to avoid compiler warnings due to similar change in
11566 the prototype of x_get_string_resource.
11567
11568 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11569
11570 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
11571 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
11572 going to replace static variables below. Adjust comments.
11573 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
11574 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
11575 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
11576 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
11577 Related users changed.
11578 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
11579 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
11580 last_mouse_movement_time, going to replace static variables below.
11581 Adjust comments.
11582 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
11583 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
11584 Remove.
11585 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
11586 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
11587 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
11588 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
11589 static variables below.
11590 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
11591 (last_mouse_scroll_bar): Remove.
11592 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
11593 (mouseExited): Related users changed.
11594
11595 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11596
11597 Do not use external array to process X scroll bar messages.
11598 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
11599 (x_send_scroll_bar_event): Pack window pointer into two slots
11600 of XClientMessageEvent if we're 64-bit. Adjust comment.
11601 (x_scroll_bar_to_input_event): Unpack accordingly.
11602
11603 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11604
11605 Ifdef away recent changes which aren't relevant to NS port.
11606 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
11607 [!HAVE_NS]: Declare as such.
11608 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
11609 [!HAVE_NS]: Define as such.
11610
11611 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11612
11613 * frame.c (x_redo_mouse_highlight): New function
11614 to factor out common code used in W32 and X ports.
11615 * dispextern.h (x_redo_mouse_highlight): Add prototype.
11616 * xterm.h (struct x_display_info):
11617 * w32term.h (struct w32_display_info):
11618 * nsterm.h (struct ns_display_info): New members
11619 last_mouse_motion_frame, last_mouse_motion_x and
11620 last_mouse_motion_y, going to replace static variables below.
11621 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
11622 (redo_mouse_highlight): Remove.
11623 (note_mouse_movement, syms_of_xterm): Adjust user.
11624 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
11625 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
11626 (redo_mouse_highlight): Remove.
11627 (note_mouse_movement, syms_of_w32term): Adjust user.
11628 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
11629 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
11630 Remove.
11631 (note_mouse_movement, mouseMoved, syms_of_nsterm):
11632 * nsfns.m (compute_tip_xy): Adjust user.
11633
11634 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11635
11636 * frame.c (x_mouse_grabbed): New function.
11637 * dispextern.h (x_mouse_grabbed): Add prototype.
11638 (last_mouse_frame): Remove declaration.
11639 * xterm.h (struct x_display_info):
11640 * w32term.h (struct w32_display_info):
11641 * nsterm.h (struct ns_display_info): New member
11642 last_mouse_frame, going to replace...
11643 * xdisp.c (last_mouse_frame): ...global variable.
11644 (note_tool_bar_highlight):
11645 * w32term.c (w32_mouse_position, w32_read_socket):
11646 * xterm.c (XTmouse_position, handle_one_xevent):
11647 Use x_mouse_grabbed.
11648 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
11649
11650 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11651
11652 * w32term.c (w32_read_socket): Avoid temporary
11653 variables in a call to x_real_positions.
11654 * xterm.c (handle_one_xevent): Likewise.
11655
11656 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11657
11658 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
11659 (x_icon_type): Remove prototype.
11660 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
11661 * frame.c (x_icon_type): Remove.
11662 * w32term.c (x_make_frame_visible, x_iconify_frame):
11663 * xterm.c (x_make_frame_visible, x_iconify_frame):
11664 Use x_set_bitmap_icon to factor out common code.
11665
11666 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11667
11668 * dispextern.h (check_x_display_info, x_get_string_resource):
11669 Declare here just once and unify the latter.
11670 * frame.c (check_x_display_info, x_get_string_resource):
11671 * nsterm.h (check_x_display_info):
11672 * xrdb.c (x_get_string_resource):
11673 * xterm.h (check_x_display_info): Remove prototypes.
11674 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
11675 * w32reg.c (x_get_string_resource): Likewise.
11676 (w32_get_rdb_resource): Adjust user.
11677
11678 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11679
11680 * xterm.h (struct x_display_info): New member
11681 x_pending_autoraise_frame, going to replace...
11682 * xterm.c (pending_autoraise_frame): ...static variable.
11683 (x_new_focus_frame, XTread_socket): Adjust users.
11684 * w32term.h (struct w32_display_info): New member
11685 w32_pending_autoraise_frame, going to replace...
11686 * w32term.c (pending_autoraise_frame): ...global variable.
11687 (x_new_focus_frame, w32_read_socket): Adjust users.
11688
11689 2013-09-17 Glenn Morris <rgm@gnu.org>
11690
11691 * xdisp.c (message_dolog): If we create *Messages*,
11692 switch it to messages-buffer-mode.
11693
11694 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
11695
11696 Don't overuse 'const' in types of locals.
11697 * bidi.c (bidi_count_bytes):
11698 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
11699 (xg_event_is_for_scrollbar):
11700 * xselect.c (x_handle_property_notify)
11701 (x_handle_selection_notify, x_handle_dnd_message):
11702 * xsettings.c, xsettings.h (xft_settings_event):
11703 * xterm.c (x_handle_net_wm_state, handle_one_event)
11704 (x_menubar_window_to_frame, x_detect_focus_change)
11705 (construct_mouse_click, note_mouse_movement)
11706 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11707 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11708 (handle_one_xevent, x_handle_net_wm_state):
11709 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
11710 (x_handle_dnd_message):
11711 Avoid unnecessary 'const', typically the second 'const' in
11712 'const foo * const arg', a 'const' that does not affect the API
11713 and doesn't significantly help the human reader.
11714
11715 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11716
11717 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
11718 only if Glib < 2.36.0.
11719 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
11720 * xsettings.c (init_gconf, init_gsettings): Do not check
11721 for g_type_init.
11722 * xterm.c (handle_one_xevent): Do not call to x_clear_area
11723 if GTK >= 2.7.0.
11724 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
11725
11726 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
11727
11728 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
11729 before calling g_type_init.
11730
11731 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
11732
11733 * nsterm.m (syms_of_nsterm): ... to here.
11734
11735 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11736
11737 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
11738 (ignore_next_mouse_click_timeout): Use Time as X does.
11739 (handle_one_xevent): Avoid cast and use unsigned comparison.
11740
11741 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11742
11743 Do not copy X event in handle_one_xevent except KeyPress case.
11744 Wnen XEvent is processed, it is unlikely to be changed except
11745 KeyPress case, so we can avoid copying and use const pointer to
11746 const data to make sure that an event is not changed elsewhere.
11747 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
11748 const' and do not create local copy except for the KeyPress event.
11749 Use casts to avoid a few glitches. Adjust formatting. Add comments.
11750 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
11751 (x_handle_net_wm_state, x_menubar_window_to_frame)
11752 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
11753 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11754 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
11755 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
11756 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
11757 (x_handle_dnd_message):
11758 * xsettings.c (xft_settings_event):
11759 Use 'const XEvent * const' where appropriate.
11760 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
11761
11762 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11763
11764 Fix X event waiting to handle multiple frames.
11765 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
11766 * xterm.c (pending_event_wait): Remove. Adjust users.
11767 (x_detect_focus_change): Pass frame arg.
11768 (handle_one_xevent): Find related frame early and clear per-frame
11769 wait_event_type only if this is an event for the relevant frame.
11770 (x_wait_for_event): Use per-frame wait_event_type.
11771
11772 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
11773
11774 * nsfns.m (Fx_create_frame): Fix font driver registration for
11775 GNUstep.
11776
11777 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
11778 for syms_of_macfont.
11779
11780 * nsterm.m: Include macfont.h.
11781 (ns_tmp_flags, ns_tmp_font): Remove.
11782 (ns_compute_glyph_string_overhangs): Check for driver Qns.
11783 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
11784 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
11785 (changeFont:): Fix code style. Check for font driver type when
11786 getiing font.
11787
11788 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
11789 (f)->descent.
11790
11791 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
11792 (nsfont_open): Set font driver type.
11793 Set font->ascent and font->descent. Figure out font instead of
11794 ns_tmp_font, and flags instead of ns_tmp_flags.
11795 Fix indentation. Remove call to ns_draw_text_decoration,
11796 moved to nsterm.
11797
11798 * nsfns.m: Include macfont.h.
11799 (Fx_create_frame): Register macfont driver, make a better default font.
11800 (Fns_popup_font_panel): Get font from macfont driver, if used.
11801
11802 * macfont.m, macfont.h, macuvs.h: New files.
11803
11804 * font.h: Declare syms_of_macfont.
11805
11806 * font.c (syms_of_font): Call syms_of_macfont.
11807
11808 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
11809
11810 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11811
11812 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
11813 and it is always zero for others, so I assume that this is an ancient
11814 leftover which nobody will want to change any more.
11815 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
11816 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
11817 * frame.c (x_set_scroll_bar_width):
11818 * w32fns.c (w32_createscrollbar):
11819 * w32term.c (w32_set_vertical_scroll_bar):
11820 * xfns.c (x_set_scroll_bar_default_width):
11821 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
11822 (x_scroll_bar_expose): Related users changed.
11823
11824 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11825
11826 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
11827 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
11828 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
11829 Define as such.
11830 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
11831 Define once here...
11832 * nsterm.h, w32term.h, xterm.h: ...and not here.
11833 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
11834 Remove unused Xisms.
11835 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
11836 these modules are never compiled otherwise.
11837
11838 2013-09-14 Eli Zaretskii <eliz@gnu.org>
11839
11840 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
11841 Doc fix. (Bug#15375)
11842
11843 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11844
11845 Unify Fx_focus_frame between all ports.
11846 * frame.h (x_focus_frame): New prototype.
11847 * xfns.c (Fx_focus_frame): Remove.
11848 (syms_of_xfns): Do not defsubr it.
11849 (x_focus_frame): X implementation.
11850 * nsfns.m (Fx_focus_frame): Remove.
11851 (syms_of_nsfns): Do not defsubr it.
11852 (x_focus_frame): NS implementation.
11853 * w32term.c (Fx_focus_frame): Remove.
11854 (x_focus_on_frame): Rename to...
11855 (x_focus_frame): W32 implementation.
11856 * w32term.h (x_focus_on_frame): Remove prototype.
11857 * w32fns.c (Fx_focus_frame): Remove.
11858 (syms_of_w32fns): Do not defsubr it.
11859 * frame.c (Fx_focus_frame): Define here.
11860 (syms_of_frame): Defsubr here.
11861 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
11862
11863 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11864
11865 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
11866 All of them are replaced with FRAME_DISPLAY_INFO, defined in
11867 each port to reference the port-specific window system data.
11868 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
11869 (FRAME_DISPLAY_INFO): Define.
11870 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
11871 (FRAME_DISPLAY_INFO): Define. Adjust users.
11872 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
11873 (FRAME_DISPLAY_INFO): Define. Adjust users.
11874 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
11875 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
11876 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
11877 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
11878 * xselect.c, xterm.c: All related users changed.
11879
11880 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11881
11882 * xterm.h (x_window_to_frame, x_any_window_to_frame)
11883 (x_menubar_window_to_frame): Remove prototypes.
11884 * xfns.c (x_window_to_frame, x_any_window_to_frame)
11885 (x_menubar_window_to_frame, x_top_window_to_frame):
11886 Move from here...
11887 * xterm.c (x_window_to_frame, x_any_window_to_frame)
11888 (x_menubar_window_to_frame, x_top_window_to_frame):
11889 ...to here and convert all but the last to static.
11890
11891 2013-09-12 Eli Zaretskii <eliz@gnu.org>
11892
11893 * lisp.mk (lisp): Add w32-common-fns.elc.
11894
11895 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
11896
11897 * charset.c (char_charset): Document an exception for char-charset.
11898
11899 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11900
11901 * xterm.h (x_display_info): New field last_user_time...
11902 * xterm.c (toplevel): ...to replace static last_user_time.
11903 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
11904
11905 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11906
11907 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
11908 scroll bar values to prevent thumb from disappear and update comment.
11909
11910 2013-09-11 Glenn Morris <rgm@gnu.org>
11911
11912 * emacs.c (usage_message): Possessive apostrophe tweak.
11913
11914 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11915
11916 * nsterm.m (syms_of_nsterm): Use Qns.
11917 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
11918 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
11919 * xfns.c (x_display_info_for_name, Fx_open_connection):
11920 Remove old '#if 0' code.
11921 (syms_of_xfns): Use Qx.
11922 * termhooks.h (fullscreen_hook): Remove the leftover.
11923 (struct terminal): Fix typo in comment.
11924
11925 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11926
11927 Cleaning up a few X scroll bar bits.
11928 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
11929 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11930 New member last_seen_part, going to replace...
11931 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
11932 (xt_action_hook) [USE_LUCID]: Adjust user.
11933 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
11934 Lucid-specific scroll bar support.
11935 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
11936 to int and adjust to use last_seen_part member.
11937 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
11938 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11939 Initialize last_seen_part.
11940
11941 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11942
11943 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
11944 insert-buffer-substring an empty string.
11945
11946 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11947
11948 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
11949 avoiding a GCC warning.
11950
11951 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11952
11953 Ifdef away frame tool bar code when it is not really used.
11954 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
11955 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
11956 and minimize_tool_bar_window_p under the above.
11957 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
11958 (fset_tool_bar_window): Likewise.
11959 * dispnew.c (clear_current_matrices, clear_desired_matrices)
11960 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
11961 (change_frame_size_1):
11962 * window.c (window_from_coordinates, Frecenter): Adjust users.
11963 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
11964 code is not really used.
11965 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
11966 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
11967 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
11968 [!USE_GTK && !HAVE_NS]: Define as such.
11969 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
11970 (note_mouse_highlight, expose_frame):
11971 * xfns.c (x_set_tool_bar_lines):
11972 * xterm.c (handle_one_xevent): Adjust users.
11973
11974 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11975
11976 Fix corruption with multiple emacsclient -t instances (Bug#15222).
11977 This bug was introduced by my 2013-08-26 patch, which incorrectly
11978 assumed that the terminfo implementation doesn't use termcap buffers.
11979 * term.c (init_tty) [TERMINFO]: Remove optimization, as
11980 these buffers apparently are used after all.
11981 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
11982 (struct tty_display_info): Define members termcap_term_buffer and
11983 termcap_strings_buffer even if TERMINFO.
11984
11985 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11986
11987 Fix last change.
11988 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
11989 'usage' docstring entry to pacify make-docfile.
11990
11991 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
11992
11993 Change comparison functions =, <, >, <=, >= to take many arguments.
11994 * data.c: Change comparison functions' interface and implementation.
11995 * lisp.h: Make arithcompare available for efficient two arg
11996 comparisons.
11997 * bytecode.c: Use arithcompare.
11998 * fileio.c: Use new interface.
11999
12000 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
12001
12002 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
12003
12004 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
12005
12006 * eval.c (Feval): Document the new use of `lexical'.
12007
12008 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
12009
12010 Review and drop old frame resize hack.
12011 * frame.h (struct frame): Remove force_flush_display_p.
12012 * dispnew.c (update_frame): Adjust user and don't call
12013 flush_frame here. The comment has said that there was an issues
12014 with redisplaying fringes, but I don't see any differences with
12015 and without this hack. Hopefully we can continue without it.
12016 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
12017 current frame matrices twice if resized_p is set.
12018
12019 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
12020
12021 Do not populate pure Xism x_sync to other ports.
12022 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
12023 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
12024 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
12025 * w32term.h (x_sync): Remove prototype.
12026
12027 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
12028
12029 Cleanup frame flushing.
12030 * dispextern.h (struct redisplay_interface):
12031 Drop flush_display_optional because flush_display is enough
12032 for X and flushing via RIF is just a no-op for others.
12033 * frame.h (flush_frame): New function.
12034 * dispnew.c (update_frame):
12035 * minibuf.c (read_minibuf):
12036 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
12037 Use it.
12038 * keyboard.c (detect_input_pending_run_timers): Do not flush
12039 all frames but selected one in redisplay_preserve_echo_area.
12040 * nsterm.m (ns_flush): Remove no-op.
12041 (ns_redisplay_interface): Adjust user.
12042 * w32term.h (x_flush): Remove no-op.
12043 (w32_redisplay_interface): Adjust user.
12044 * xterm.c (x_flush): Simplify because we do not flush all
12045 frames at once any more. Adjust comment.
12046 (x_redisplay_interface): Adjust user.
12047
12048 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
12049
12050 Port --without-x --enable-gcc-warnings to Fedora 19.
12051 * gfilenotify.c (globals_of_gfilenotify):
12052 Call g_type_init only if using an older glib version that needs it.
12053
12054 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
12055
12056 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
12057 (last_glyphless_glyph_merged_face_id): Remove declarations.
12058 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
12059 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
12060 (last_glyphless_glyph_merged_face_id): Now static.
12061 (merge_escape_glyph_face): New function, refactored from...
12062 (get_next_display_element): ...here.
12063 (merge_glyphless_glyph_face): New function, refactored from...
12064 (produce_glyphless_glyph): ...here...
12065 * term.c (produce_glyphless_glyph): ...and here.
12066
12067 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
12068
12069 * eval.c (eval_sub): Only call Ffunction if necessary.
12070
12071 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
12072
12073 Attempt to make redisplay more selective when changing cursor type.
12074 * frame.h (struct frame): New bitfield cursor_type_changed.
12075 * xdisp.c (cursor_type_changed): Remove.
12076 (try_cursor_movement, redisplay_window, try_window_id)
12077 (set_frame_cursor_types, try_window_reusing_current_matrix):
12078 Adjust to use per-frame bitfield.
12079 (redisplay_internal): Look for cursor type change on each visible
12080 frame and consider all frames if cursor type has been changed on
12081 the frame other than selected. If cursor type has been changed on
12082 selected frame only, do not use fast update.
12083
12084 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
12085
12086 Attempt to make redisplay more selective when changing fonts.
12087 * frame.h (struct frame): New bitfield fonts_changed.
12088 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
12089 (adjust_frame_glyphs): Add prototype.
12090 * dispnew.c (fonts_changed_p): Remove.
12091 (adjust_glyphs): Remove because we do not
12092 adjust matrices on all frames at once any more.
12093 (adjust_frame_glyphs): Block and unblock input here.
12094 (adjust_glyph_matrix): Use fonts_changed.
12095 (change_frame_size_1): Use adjust_frame_glyphs.
12096 * font.c (font_open_entity): Use fonts_changed.
12097 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
12098 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
12099 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
12100 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
12101 (shrink_mini_window, Fresize_mini_window_internal)
12102 (window_scroll_pixel_based, Fset_window_configuration)
12103 (apply_window_adjustment, Fset_window_vscroll):
12104 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
12105 Use adjust_frame_glyphs.
12106 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
12107 (try_window_reusing_current_matrix, try_window_id, display_line)
12108 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
12109 (redisplay_internal): Consider fonts_changed and adjust frame
12110 matrices for each frame only if the frame is visible. If font
12111 has been changed on some frame during full redisplay, retry
12112 only visible frames where the font has been actually changed.
12113
12114 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12115
12116 Cache current header and mode line height for each window.
12117 * window.h (struct window): New fields mode_line_height
12118 and header_line_height.
12119 * window.c (make_window): Initialize them.
12120 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
12121 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
12122 (current_mode_line_height, current_header_line_height):
12123 Remove declaration.
12124 * xdisp.c (current_mode_line_height, current_header_line_height):
12125 Remove.
12126 (pos_visible_p, init_xdisp): Adjust user.
12127 (redisplay_window): Invalidate mode_line_height and
12128 header_line_height if current and desired matrices do not agree.
12129
12130 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12131
12132 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
12133 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
12134
12135 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12136
12137 Make --without-x compatible with --enable-gcc-warnings.
12138 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
12139 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
12140 members under HAVE_WINDOW_SYSTEM.
12141 * keyboard.c (make_lispy_focus_out): Likewise.
12142 (record_menu_key): Move under HAVE_MENUS.
12143 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
12144 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
12145 (syms_of_xdisp): Adjust user.
12146 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
12147 (start_hourglass, cancel_hourglass):
12148 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
12149 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
12150 and CLEAR_FONT_TABLE_NFONTS.
12151 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
12152 Declare only if HAVE_WINDOW_SYSTEM.
12153 (lface_same_font_attributes_p, clear_face_gcs): Define only
12154 if HAVE_WINDOW_SYSTEM.
12155
12156 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12157
12158 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
12159 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
12160 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
12161
12162 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
12163
12164 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
12165
12166 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
12167
12168 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
12169 This fixes a type error on hosts where ptrdiff_t is wider than int.
12170
12171 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
12172
12173 * keyboard.c (read_key_sequence_vs): New function.
12174 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
12175 common code.
12176
12177 * callint.c (Fcall_interactively): Always return a vector for 'K'.
12178
12179 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
12180
12181 Makefile improvements.
12182 * Makefile.in (config.status): Don't use double-colon rules, as
12183 they are not portable according to POSIX. Fix shell typo with `;
12184 I guess this rule has never been tested?
12185 (VCSWITNESS): New macro, to override any environment var.
12186
12187 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
12188
12189 * xterm.h (struct x_display_info): Do not track X connection
12190 fd separately because it is always available from Display.
12191 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
12192 Adjust users.
12193
12194 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12195
12196 * buffer.c (drop_overlay):
12197 * fileio.c (restore_point_unwind): Prefer unchain_marker to
12198 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
12199
12200 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12201
12202 * buffer.c (Fmake_overlay, Fmove_overlay):
12203 * intervals.c (set_point_from_marker):
12204 * print.c (PRINTPREPARE): Prefer signal_error
12205 to plain error and report unsuitable marker too.
12206
12207 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12208
12209 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
12210 for 'dragging' member.
12211 (struct x_output): Remove set-but-unused leftovers
12212 'left_before_move' and 'top_before_move'.
12213 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
12214 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
12215 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
12216 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
12217 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
12218 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
12219 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
12220 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
12221
12222 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
12223
12224 * nsfont.m (INVALID_GLYPH): New define.
12225 (nsfont_encode_char): Use INVALID_GLYPH.
12226 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
12227
12228 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12229
12230 * xterm.c (x_last_mouse_movement_time): Revert last change.
12231 This code should use XDisplayMotionBufferSize to check display's
12232 motion history first, and there are few other issues as well.
12233 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
12234 (handle_one_xevent): Adjust user.
12235
12236 2013-09-02 Martin Rudalics <rudalics@gmx.at>
12237
12238 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
12239 * frame.c (Flast_nonminibuf_frame): ... to here.
12240 (check_minibuf_window): Don't abort if no window was found
12241 (Bug#15247).
12242
12243 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12244
12245 Use XGetMotionEvents to ask the last mouse motion time from X server.
12246 * xterm.c (X_MOTION_HISTORY): Default to 1.
12247 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
12248 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
12249 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
12250 Ifdef away legacy code.
12251 (XTmouse_position, x_scroll_bar_report_motion):
12252 Use x_last_mouse_movement_time.
12253 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
12254 UnmapNotify event.
12255
12256 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12257
12258 * msdos.c (last_mouse_window): Move to...
12259 (dos_rawgetc): ...this function and adjust comment.
12260 * nsterm.m (last_window): Rename to last_mouse_window, move to...
12261 (mouseMoved): ...this function and adjust comment.
12262 * w32term.c (last_window): Likewise with...
12263 (w32_read_socket): ...this function.
12264 * xterm.c (last_window): Likewise with...
12265 (handle_one_xevent): ...this function.
12266
12267 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12268
12269 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
12270 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
12271 (handle_one_xevent): ...to here.
12272 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
12273 otherwise.
12274
12275 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12276
12277 * msdos.c (IT_set_terminal_window): Remove no-op.
12278 (initialize_msdos_display): Adjust terminal setup.
12279 * w32console.c (w32con_set_terminal_window): Remove no-op.
12280 (initialize_w32_display): Adjust terminal setup.
12281 * w32term.c (w32_set_terminal_window): Remove no-op.
12282 (w32_create_terminal): Adjust terminal setup.
12283 * xterm.c (XTset_terminal_window): Remove no-op.
12284 (x_create_terminal): Adjust terminal setup.
12285
12286 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
12287
12288 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
12289 Remove no-ops.
12290 (ns_create_terminal): Adjust terminal setup.
12291 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
12292 Remove no-ops.
12293 (w32_create_terminal): Adjust terminal setup.
12294 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
12295 Remove no-ops.
12296 (x_create_terminal): Adjust terminal setup.
12297
12298 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
12299
12300 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
12301 (CLIP_TEXT_POS_FROM_MARKER): New macro.
12302 * dispnew.c (buffer_posn_from_coords):
12303 * window.c (Fwindow_end, displayed_window_lines):
12304 * xdisp.c (redisplay_mode_lines): Use it.
12305
12306 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
12307
12308 * fontset.c (face_for_char): Check char in the current face font first
12309 if HAVE_NS (Bug#15138).
12310
12311 2013-08-31 Martin Rudalics <rudalics@gmx.at>
12312
12313 * window.c (temp_output_buffer_show): Make sure window returned
12314 by display_buffer is live (Bug#15213).
12315
12316 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
12317
12318 Minor cleanup to avoid forward declarations.
12319 * coding.h (struct ccl_spec): Remove forward declaration.
12320 * composite.h (toplevel): Include font.h.
12321 (struct composition_it, struct face, struct font_metrics):
12322 Remove forward declaration.
12323 * dispextern.h (struct image, struct atimer): Likewise.
12324 * emacsgtkfixed.h (struct frame): Likewise.
12325 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
12326 * font.h (struct font_driver, struct font, struct glyph_string)
12327 (struct face): Remove forward declaration.
12328 * fontset.h (struct face, struct font): Likewise.
12329 * frame.h (toplevel): Style cleanup.
12330 (enum output_method): Move to...
12331 * termhooks.h (enum output_method): ...here.
12332 (struct glyph, struct frame, struct ns_display_info)
12333 (struct x_display_info, struct w32_display_info):
12334 Remove forward declaration.
12335 * xterm.h (toplevel): Include termhooks.h.
12336 (struct font, struct window, struct glyph_matrix, struct frame)
12337 (struct input_event, struct face, struct image): Remove forward
12338 declaration.
12339 * gtkutil.h (struct _widget_value): Likewise.
12340 * keyboard.h (toplevel): Include termhooks.h.
12341 (struct input_event): Remove forward declaration.
12342
12343 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12344
12345 * intervals.c (set_point_from_marker): New function.
12346 * editfns.c (Fgoto_char):
12347 * process.c (Finternal_default_process_filter):
12348 * window.c (select_window_1): Use it.
12349 * buffer.h (set_point_from_marker): Add prototype.
12350
12351 2013-08-29 Eli Zaretskii <eliz@gnu.org>
12352
12353 * w32.c (term_winsock): Call release_listen_threads before calling
12354 WSACleanup.
12355 (_sys_wait_accept): Wait for accept event in a loop with a finite
12356 timeout, instead of waiting indefinitely. Will hopefully avoid
12357 hanging during exit because WSACleanup deadlocks waiting for the
12358 event object to be released. (Bug#14333)
12359
12360 * w32proc.c (release_listen_threads): New function, signals all
12361 the reader threads that listen for connections to stop waiting.
12362
12363 * w32.h (release_listen_threads): Add prototype.
12364
12365 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12366
12367 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
12368 field of new marker (for sanity and safety).
12369 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
12370 anyway because XMISCTYPE is a function and can't be an lvalue).
12371
12372 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12373
12374 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
12375 (x_after_update_window_line, x_scroll_bar_create)
12376 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
12377 (handle_one_xevent, x_clear_frame_area):
12378 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
12379 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
12380 * xterm.h (x_clear_area): Adjust prototype.
12381
12382 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12383
12384 Hook scanning and indentation functions to find_newline. This helps
12385 to avoid duplicated code and renders more respect to newline cache.
12386 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
12387 * cmds.c (Fforward_line):
12388 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
12389 Use find_newline and avoid unnecessary point movements.
12390 * search.c (scan_newline): Implement on top of find_newline.
12391
12392 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
12393
12394 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
12395 scoped code (bug#11258).
12396
12397 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
12398
12399 * nsterm.m (last_window): New variable.
12400 (EV_TRAILER2): New macro.
12401 (EV_TRAILER): Call EV_TRAILER2.
12402 (mouseMoved:): Add support for mouse-autoselect-window
12403 on nextstep (Bug#6888).
12404
12405 2013-08-28 Andreas Schwab <schwab@suse.de>
12406
12407 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
12408 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
12409 Remove unused macro definitions.
12410 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
12411 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
12412 Only define if emacs.
12413
12414 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12415
12416 Prefer enum glyph_row_area to int where appropriate.
12417 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
12418 Fix comment.
12419 (window_box, window_box_width, window_box_left, window_box_left_offset)
12420 (window_box_right, window_box_right_offset): Adjust prototypes.
12421 * xdisp.c (window_box, window_box_width, window_box_left)
12422 (window_box_left_offset, window_box_right, window_box_right_offset):
12423 Use enum glyph_row_area. Adjust users and tweak comment where needed.
12424 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
12425 * nsterm.m (ns_clip_to_row):
12426 * w32term.c (w32_clip_to_row):
12427 * xterm.c (x_clip_to_row): Likewise.
12428
12429 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12430
12431 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
12432 (Fprevious_overlay_change): Fast path for buffer with no overlays.
12433
12434 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
12435
12436 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
12437 for portability to hosts where /bin/sh has problems.
12438
12439 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12440
12441 Redesign redisplay interface to drop global output_cursor.
12442 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
12443 (toplevel): Remove declaration of output_cursor.
12444 (set_output_cursor, x_cursor_to): Remove prototype.
12445 * window.h (struct window): New member output_cursor.
12446 (output_cursor_to): New function to replace RIF member.
12447 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
12448 (update_text_area, set_window_cursor_after_update): Use it.
12449 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
12450 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12451 * nsterm.m (ns_update_window_begin, ns_update_window_end):
12452 * w32term.c (x_update_window_begin, x_update_window_end):
12453 * xterm.c (x_update_window_begin, x_update_window_end):
12454 Adjust to use per-window output cursor.
12455
12456 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
12457
12458 Simplify SELECT_TYPE-related code.
12459 Like EMACS_TIME, this portability layer is no longer needed, since
12460 Emacs has been using fd_set as a portability layer for some time.
12461 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
12462 (SELECT_TYPE): Remove. All uses changed to fd_set.
12463 (fd_set) [!FD_SET]: New typedef.
12464
12465 Simplify EMACS_TIME-related code.
12466 This portability layer is no longer needed, since Emacs has been
12467 using struct timespec as a portability layer for some time.
12468 * atimer.h, buffer.h, dispextern.h, xgselect.h:
12469 Include <time.h> rather than "systime.h"; that's all that's needed now.
12470 * dispnew.c: Include <timespec.h> rather than "systime.h";
12471 that's all that's needed now.
12472 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
12473 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
12474 TIMESPEC_RESOLUTION.
12475 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
12476 LOG10_TIMESPEC_RESOLUTION.
12477 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
12478 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
12479 (make_emacs_time): Remove. All used changed to make_timespec.
12480 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
12481 (current_timespec): Rename from current_emacs_time. All uses changed.
12482 (add_emacs_time): Remove. All uses changed to timespec_add.
12483 (sub_emacs_time): Remove. All uses change dot timespec_sub.
12484 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
12485 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
12486 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
12487 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
12488 (current_timespec): Rename from current_emacs_time. All uses changed.
12489 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
12490 changed to timespec_cmp.
12491 * xgselect.c: Include <timespec.h>, since our .h files don't.
12492
12493 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12494
12495 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
12496 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
12497 Remove the leftovers.
12498 * gtkutil.c (toplevel): Do not declare Qxft but include
12499 font.h to do so.
12500 * image.c (toplevel): Do not declare Vlibrary_cache because
12501 it's already done in lisp.h.
12502
12503 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12504
12505 * lisp.h (Mouse_HLInfo): Move from here...
12506 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
12507 (reset_mouse_highlight): New function.
12508 * msdos.c (dos_set_window_size, IT_update_begin)
12509 (internal_terminal_init):
12510 * nsterm.m (ns_update_window_end, x_free_frame_resources)
12511 (ns_initialize_display_info):
12512 * w32console.c (initialize_w32_display):
12513 * w32term.c (x_update_window_end, x_free_frame_resources)
12514 (w32_initialize_display_info):
12515 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
12516 * window.c (Fdelete_other_windows_internal):
12517 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
12518 * termchar.h (toplevel):
12519 * xterm.h (toplevel): Include dispextern.h.
12520
12521 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12522
12523 Fix minor problems found by static checking.
12524 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
12525 (expect): Avoid nested-if warning.
12526 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
12527 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
12528 * nsterm.h, nsterm.m (ns_select):
12529 * xgselect.c, xgselect.h (xg_select):
12530 Adjust signature to better match pselect's.
12531 * nsterm.m (ns_select):
12532 Don't set *TIMEOUT, since pselect doesn't.
12533 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
12534 diagnostic about assigning const char * to it.
12535 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
12536
12537 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
12538
12539 * lread.c (substitute_object_recurse): Handle hash-tables as well
12540 (bug#15190).
12541
12542 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12543
12544 Fix unlikely core dump in init_tty, and simplify terminfo case.
12545 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
12546 The old version incorrectly dumped core if malloc returned a
12547 buffer containing only non-NUL bytes.
12548 (init_tty): Do not allocate or free termcap buffers; the
12549 struct does that for us now.
12550 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
12551 (struct tty_display_info): Define members termcap_term_buffer and
12552 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
12553 use them. Allocate them directly in struct rather than indirectly
12554 via a pointer, to simplify init_tty.
12555
12556 * frame.c (check_minibuf_window): Initialize 'window' properly,
12557 so that Emacs reliably aborts later if 'window' is not initialized.
12558
12559 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
12560
12561 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
12562 of VoidSymbol (Bug#15154).
12563
12564 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12565
12566 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
12567 mouse_face_beg_y and mouse_face_end_y.
12568 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
12569 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
12570 Adjust users and update comment where appropriate.
12571
12572 2013-08-26 Martin Rudalics <rudalics@gmx.at>
12573
12574 * frame.c (check_minibuf_window): New function.
12575 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
12576 Call check_minibuf_window (Bug#15183).
12577
12578 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12579
12580 * window.h (struct window): Replace last_cursor with last_cursor_vpos
12581 because this is the only last cursor data we need to keep and consult.
12582 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
12583 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
12584 Adjust users.
12585
12586 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12587
12588 Fix recovering from possible decompression error.
12589 Since insert_from_gap doesn't always move point, we can't use PT as
12590 the position where the partially decompressed data ends, and
12591 should count how many bytes was produced so far.
12592 * decompress.c (struct decompress_unwind_data): Add nbytes member.
12593 (unwind_decompress): Really delete partially uncompressed data.
12594 (Fzlib_decompress_region): Take decompressed data size into account.
12595
12596 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12597
12598 * syntax.c (init_syntax_once): Adjust comment and do an early
12599 initialization of Qchar_table_extra_slots just once...
12600 * casetab.c (init_casetab_once):
12601 * category.c (init_category_once):
12602 * character.c (syms_of_character):
12603 * coding.c (syms_of_coding):
12604 * xdisp.c (syms_of_xdisp): ...and omit it here.
12605
12606 2013-08-24 Eli Zaretskii <eliz@gnu.org>
12607
12608 * xdisp.c (get_next_display_element): Don't apply to characters
12609 from a display vector the logic of setting it->end_of_box_run_p
12610 suitable for characters from a buffer. (Bug#15175)
12611
12612 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
12613 to handle directories, rather than '_utime' which doesn't.
12614 (Bug#15176)
12615
12616 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
12617
12618 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
12619 or fullscreen (Bug#14627).
12620
12621 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
12622
12623 System-dependent integer overflow fixes.
12624 * process.c (Fset_process_window_size): Signal an error if
12625 the window size is outside the range supported by the lower level.
12626 * sysdep.c (set_window_size): Return negative on error,
12627 nonnegative on success, rather than -1, 0, 1 on not in system,
12628 failure, success. This is simpler. Caller changed.
12629 (serial_configure): Remove unnecessary initialization of local.
12630 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
12631 size fits in unsigned long; this isn't true on some 32-bit hosts.
12632 Avoid buffer overrun if some future version of /proc/meminfo has a
12633 variable name longer than 20 bytes.
12634 (system_process_attributes) [__FreeBSD__]:
12635 Don't assume hw.availpages fits in 'int'.
12636
12637 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
12638
12639 Don't let very long directory names overrun the stack.
12640 Fix some related minor problems involving "//", vfork.
12641 * callproc.c (encode_current_directory): New function.
12642 (call_process): Don't append "/"; not needed.
12643 * fileio.c (file_name_as_directory_slop): New constant.
12644 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
12645 this can save the caller having to alloca.
12646 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
12647 Use SAFE_ALLOCA, not alloca.
12648 (directory_file_name, Fexpand_file_name): Leave leading "//"
12649 alone, since it can be special even on POSIX platforms.
12650 * callproc.c (call_process):
12651 * process.c (Fformat_network_address):
12652 * sysdep.c (sys_subshell):
12653 Use encode_current_directory rather than rolling our own.
12654 (create_process): No need to encode directory; caller does that now.
12655 * process.h (encode_current_directory): New decl.
12656 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
12657 Rework to avoid 'goto xyzzy;'.
12658
12659 2013-08-23 Eli Zaretskii <eliz@gnu.org>
12660
12661 * xdisp.c (handle_face_prop): If the default face was remapped use
12662 the remapped face for strings from prefix properties. (Bug#15155)
12663
12664 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12665
12666 Minor cleanup for redisplay interface and few related functions.
12667 * frame.h (enum text_cursor_kinds): Move from here...
12668 * dispextern.h (enum text_cursor_kinds): ...to here.
12669 (toplevel): Drop unnecessary declarations.
12670 (struct redisplay_interface): Use bool and enum text_cursor_kinds
12671 in update_window_end_hook and draw_window_cursor functions.
12672 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
12673 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
12674 * w32term.c (x_update_window_end, w32_draw_window_cursor):
12675 * xterm.c (x_update_window_end, x_draw_window_cursor):
12676 * xdisp.c (display_and_set_cursor, update_window_cursor)
12677 (update_cursor_in_window_tree, x_update_cursor): Use bool and
12678 enum text_cursor_kinds where appropriate.
12679
12680 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12681
12682 Redesign redisplay interface to drop updated_row and updated_area.
12683 * dispextern.h (updated_row, updated_area): Remove declaration.
12684 (struct redisplay_interface): Pass glyph row and row area parameters
12685 to write_glyphs, insert_glyphs and clear_end_of_line functions.
12686 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12687 Adjust prototypes.
12688 * dispnew.c (updated_row, updated_area): Remove.
12689 (redraw_overlapped_rows, update_window_line): Adjust user.
12690 (update_marginal_area, update_text_area): Likewise. Pass updated row
12691 as a parameter. Prefer enum glyph_row_area to int where appropriate.
12692 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12693 Adjust users.
12694
12695 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
12696
12697 * process.c (flush_pending_output): Remove stub.
12698 All uses removed.
12699
12700 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12701
12702 * callproc.c: Fix race that killed background processes (Bug#15144).
12703 (call_process): New arg TEMPFILE_INDEX. Callers changed.
12704 Record deleted process-id in critical section, not afterwards.
12705 Don't mistakenly kill process created by a call-process invocation
12706 that discards output and does not wait.
12707
12708 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
12709
12710 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
12711 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
12712 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
12713 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
12714 to shut up compiler in mark_object.
12715 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
12716
12717 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12718
12719 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
12720 We can't portably rely on PTY_OPEN doing that, even if
12721 it calls posix_openpt with O_CLOEXEC.
12722
12723 2013-08-20 Kenichi Handa <handa@gnu.org>
12724
12725 * character.c (string_char): Improve commentary.
12726
12727 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
12728
12729 * image.c (SIGNATURE_DIGESTSIZE): Remove.
12730 (struct animation_cache): Make signature a flexible array member.
12731 All uses changed. This is a tad slower but may insulate us better
12732 from future changes to ImageMagick.
12733
12734 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12735
12736 * image.c: Shrink memory needed for animation cache.
12737 (SIGNATURE_DIGESTSIZE): New constant.
12738 (struct animation_cache): Make 'signature' a fixed size array of bytes.
12739 (imagemagick_create_cache): Copy the signature. This saves
12740 several KB of memory that ImageMagick wastes per signature.
12741 Don't bother updating the update_time, as the caller does that now.
12742 (imagemagick_prune_animation_cache): Don't destroy the signature, as
12743 it's a fixed size struct member now.
12744 (imagemagick_get_animation_cache): Always destroy the signature,
12745 as it's now imagemagick_create_cache's responsibility to copy it.
12746 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
12747 and use memcmp rather than strcmp.
12748 eassert that ImageMagick returns a signature of the specified length.
12749
12750 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
12751
12752 * image.c (imagemagick_get_animation_cache): Don't segfault on
12753 each invocation.
12754 (imagemagick_get_animation_cache): Revert to previous definition
12755 so that it actually works. But keep the memory leak fix.
12756 (imagemagick_get_animation_cache): Fix memory leak.
12757
12758 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12759
12760 * image.c: Fix animation cache signature memory leak.
12761 Fix some other minor performance problems while we're at it.
12762 (imagemagick_create_cache): Clear just the members that
12763 need clearing. Don't set update_time, as caller does that now.
12764 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
12765 Simplify by using pointer-to-pointer instead of a prev pointer.
12766 (imagemagick_prune_animation_cache): Use make_emacs_time rather
12767 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
12768 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
12769 it's already a copy. Free the signature probe unless it's cached.
12770
12771 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
12772 This was introduced by my 2013-08-12 fix for Bug#15035.
12773
12774 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
12775
12776 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
12777 (imagemagick_prune_animation_cache): Now static.
12778
12779 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
12780
12781 * image.c (imagemagick_get_animation_cache): Don't segfault when
12782 pruning all entries.
12783
12784 2013-08-18 Ken Brown <kbrown@cornell.edu>
12785
12786 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
12787 static heap if ENABLE_CHECKING is defined.
12788 (max_bss_sbrk_ptr): New variable.
12789 (bss_sbrk): Use it.
12790 (report_sheap_usage): Report maximum static heap usage instead of
12791 ending static heap usage.
12792
12793 2013-08-17 Eli Zaretskii <eliz@gnu.org>
12794
12795 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
12796 of zlib_initialized according to the results of calling
12797 init_zlib_functions.
12798
12799 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
12800
12801 * image.c: Implement an ImageMagick per-image cache.
12802 (imagemagick_get_animation_cache): Fix a double-free error.
12803 (imagemagick_load_image): Remove the ping_wand code, which only
12804 apparently saved time on invalid animated images, and slowed down
12805 everything else. Optimize for the common case.
12806
12807 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
12808
12809 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
12810
12811 * editfns.c (insert_before_markers): Mention overlay in the doc string.
12812
12813 * marker.c (set_marker): Remove documentation of undefined behavior.
12814
12815 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12816
12817 * image.c (imagemagick_compute_animated_image): Animate correctly
12818 when sub-images are smaller than the main image.
12819 (imagemagick_compute_animated_image): Setting the iterator row to
12820 zero is apparently not allowed.
12821 (imagemagick_compute_animated_image): Allow images that say they
12822 have sub-images that are bigger than the main image, but just crop
12823 them.
12824
12825 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
12826
12827 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
12828
12829 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12830
12831 * image.c (imagemagick_compute_animated_image): Respect the GIF
12832 disposal methods.
12833
12834 2013-08-15 Ken Brown <kbrown@cornell.edu>
12835
12836 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
12837 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
12838 needed.
12839
12840 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
12841
12842 Fix minor problems found by static checking.
12843 * frame.c (delete_frame):
12844 * xdisp.c (next_element_from_display_vector):
12845 Avoid uninitialized local.
12846 * image.c (imagemagick_compute_animated_image): Port to C89.
12847 Prefer usual GNU indentation style for loops.
12848 Be more careful about bizarrely large sizes, by using ptrdiff_t
12849 instead of int.
12850
12851 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12852
12853 Fix infinite frame selection loop (Bug#15025).
12854 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
12855
12856 2013-08-15 Eli Zaretskii <eliz@gnu.org>
12857
12858 * xdisp.c (compute_window_start_on_continuation_line):
12859 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
12860 to make sure we end up setting the window start at the leftmost
12861 visible character of the display line. This avoids funky
12862 horizontal shifting because the window start is not kept on the
12863 same position. (Bug#15090)
12864 (next_element_from_display_vector): Support 'box' face attribute
12865 in the face definitions of a display vector. (Bug#15099)
12866
12867 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12868
12869 * image.c (imagemagick_compute_animated_image): Implement animated
12870 images (bug#14700).
12871 (imagemagick_compute_animated_image): Fix some compilation
12872 warnings. Implement a very simple cache to make the animation
12873 usable at all, but it should be replaced with a per-image cache.
12874
12875 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12876
12877 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
12878 to do `for' loops over alist values.
12879 * buffer.h (FOR_EACH_BUFFER):
12880 * process.c (FOR_EACH_PROCESS): Use it.
12881 (handle_child_signal, status_notify, Fget_buffer_process)
12882 (kill_buffer_processes): Use FOR_EACH_PROCESS.
12883
12884 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12885
12886 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
12887 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
12888 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
12889 to xzalloc and so avoid redundant call to memset.
12890 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
12891 members because it is allocated with xzalloc and so already zeroed.
12892
12893 2013-08-14 Ken Brown <kbrown@cornell.edu>
12894
12895 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
12896 (Bug#15094).
12897
12898 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12899
12900 Utility function and macro to copy Lisp string to C string.
12901 * lisp.h (xlispstrdupa): New macro.
12902 (xlispstrdup): New prototype.
12903 * alloc.c (xlispstrdup): New function.
12904 * callint.c (Fcall_interactively):
12905 * fileio.c (Ffile_name_directory, Fexpand_file_name)
12906 (Fsubstitute_in_file_name):
12907 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
12908 * image.c (x_create_bitmap_from_file):
12909 * w32term.c (w32_term_init):
12910 * xterm.c (x_term_init): Use xlispstrdup.
12911
12912 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12913
12914 * image.c (imagemagick_load_image): Make animated pictures work.
12915 There's still some problems with background color settings, though
12916 (bug#14700).
12917
12918 * decompress.c (unwind_decompress): Always restore point.
12919
12920 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
12921
12922 * marker.c (set_marker): Reformat documentation.
12923
12924 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
12925
12926 * xdisp.c (cursor_type_changed): Now static.
12927
12928 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
12929 Use changed. This avoids the need to call xmalloc and for the
12930 caller to call xfree, and avoids memory leaks in some situations.
12931
12932 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12933
12934 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
12935 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
12936 (redisplay_window): If window_end_valid is cleared due to non-zero
12937 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
12938 so do not call to try_cursor_movement for that window.
12939
12940 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12941
12942 * window.h (struct window): Convert window_end_pos and
12943 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
12944 (wset_window_end_pos, wset_window_end_vpos): Remove.
12945 * dispnew.c (adjust_glyph_matrix):
12946 * window.c (Fwindow_end, replace_window, set_window_buffer)
12947 (make_window):
12948 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
12949 (set_vertical_scroll_bar, redisplay_window, try_window)
12950 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
12951 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
12952 (note_mouse_highlight): Adjust users.
12953 (try_cursor_movement): Likewise. Convert old precondition to eassert.
12954 Add comment.
12955
12956 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12957
12958 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
12959 * image.c (imagemagick_filename_hint): Use `const char *' and
12960 prefer SSDATA to SDATA to avoid warnings.
12961
12962 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12963
12964 Cleanup window fringes, margins and scroll bars adjustments.
12965 * window.c (set_window_fringes, set_window_margins)
12966 (set_window_scroll_bars, apply_window_adjustment): New functions.
12967 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
12968 (Fset_window_scroll_bars): Use them.
12969
12970 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12971
12972 * window.h (struct window): Convert scroll_bar_width
12973 from Lisp_Object to integer. Adjust comment.
12974 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
12975 Adjust users.
12976 * window.c (wset_scroll_bar_width): Remove.
12977 (make_window): Initialize scroll_bar_width.
12978 (Fsplit_window_internal): Use direct assignment.
12979 (Fset_window_configuration, save_window_save):
12980 Convert Lisp_Object to integer and back where appropriate.
12981 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
12982 bar was actually changed, and mention this in docstring.
12983
12984 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12985
12986 * decompress.c: Minor simplifications.
12987 (Fzlib_decompress_region): Don't bother verifying
12988 that avail_out <= UINT_MAX, as that was confusing.
12989 Mention the restriction in a comment instead.
12990 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
12991
12992 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12993
12994 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
12995 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
12996
12997 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12998
12999 * image.c (imagemagick_filename_hint): Check for errors in the
13000 alist structure.
13001
13002 2013-08-13 Eli Zaretskii <eliz@gnu.org>
13003
13004 * window.c (Fwindow_margins): Return nil when there's no marginal
13005 area, as per the documented API.
13006
13007 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
13008 Fmake_vector, as scroll bar's struct members are not all Lisp
13009 objects now. This avoids crashes in GC.
13010
13011 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
13012 bool, so its address could be taken.
13013
13014 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13015
13016 * image.c (imagemagick_filename_hint): New function to possibly
13017 apply `image-content-type-suffixes'.
13018 (imagemagick_load_image): Use it.
13019
13020 2013-08-13 Eli Zaretskii <eliz@gnu.org>
13021
13022 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
13023 if loading zlib failed.
13024
13025 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
13026
13027 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
13028 2013-08-13 checkin below. Change bool to BOOL, rule is:
13029 All Obj-C code uses BOOL, except for interfaces callable from C.
13030
13031 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
13032
13033 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13034
13035 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
13036 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
13037 bool instead of BOOL.
13038 * w32term.h (struct scroll_bar): Convert fringe_extended_p
13039 from Lisp_Object to bitfield. Adjust comment.
13040 * w32term.c (x_scroll_bar_create): Adjust user.
13041 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
13042 * xterm.c (XTset_vertical_scroll_bar): Likewise.
13043 Use bool for boolean.
13044 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
13045 to `unsigned int' when defining a bitfield.
13046
13047 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
13048
13049 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
13050
13051 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13052
13053 * window.h (struct window): Convert left_margin_cols and
13054 right_margin_cols from Lisp_Objects to integers. Adjust comment.
13055 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
13056 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
13057 Adjust users.
13058 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
13059 Adjust comment.
13060 (showing_window_margins_p, update_window_line, update_frame_1):
13061 * fringe.c (draw_fringe_bitmap_1):
13062 * xdisp.c (window_box_width): Adjust users.
13063 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
13064 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
13065 Use direct assignment.
13066 (Fset_window_configuration, save_window_save, Fwindow_margins):
13067 Convert Lisp_Object to integer and back where appropriate.
13068 (Fset_window_margins): Adjust user. Return t if any margin
13069 was actually changed, and mention this in docstring.
13070
13071 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
13072
13073 * syntax.c (forward_word):
13074 * cmds.c (forward_char, backward_char): Mention the optional argument.
13075
13076 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13077
13078 * window.h (struct window): Convert left_fringe_width
13079 and right_fringe_width from Lisp_Objects to integers.
13080 Adjust comment.
13081 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
13082 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
13083 * window.c (wset_left_fringe_width, wset_right_fringe_width):
13084 Remove.
13085 (make_window): Initialize new integer fields to -1.
13086 (Fsplit_window_internal): Use direct assignment.
13087 (Fset_window_configuration, save_window_save):
13088 Convert Lisp_Object to integer and back where appropriate.
13089 (Fset_window_fringes): Adjust user. Return t if any fringe
13090 was actually changed, and mention this in docstring.
13091
13092 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13093
13094 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
13095 * nsfns.m (x_set_cursor_type):
13096 * w32fns.c (x_set_cursor_type):
13097 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
13098 * xdisp.c (set_frame_cursor_types): ...but in common code.
13099
13100 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13101
13102 * font.c (clear_font_cache): New function, stripped from...
13103 (Fclear_font_cache): ...here, which now uses the function
13104 above. Adjust comment.
13105 * font.h (clear_font_cache): Add prototype.
13106 * xfaces.c (clear_face_cache): Use clear_font_cache.
13107
13108 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13109
13110 * window.c (Fset_window_start): Compare `w', not `window' because
13111 `w' might not be equal to `window' after call to decode_live_window.
13112
13113 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13114
13115 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
13116 This fixes a problem introduced by the Bug#15035 patch
13117 when using GPG. Reported by Herbert J. Skuhra.
13118
13119 2013-08-12 Eli Zaretskii <eliz@gnu.org>
13120
13121 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
13122 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
13123 not yet initialized.
13124
13125 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13126
13127 * decompress.c (Fzlib_decompress_region): Support zlib
13128 decompression, too, and rename.
13129
13130 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13131
13132 Minor zlib configuration tweaks.
13133 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
13134 Don't assume presence of fn_inflateInit2_ zlib internal function.
13135
13136 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13137
13138 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
13139 include the zlib prefix.
13140
13141 2013-08-12 Eli Zaretskii <eliz@gnu.org>
13142
13143 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
13144 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
13145 define static variables that are pointers to zlib functions to be
13146 dynamically loaded.
13147 (init_zlib_functions) [WINDOWSNT]: New function.
13148 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
13149 New macros.
13150 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
13151 macros instead of invoking the zlib functions directly.
13152 (syms_of_decompress): DEFSYM Qzlib_dll.
13153 Staticpro Szlib_available_p.
13154
13155 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
13156
13157 Avoid looping over all frame windows to freeze and unfreeze.
13158 * window.h (struct window): Drop frozen_window_start_p.
13159 (freeze_window_starts): Drop prototype.
13160 * frame.h (struct frame): New frozen_window_starts flag.
13161 (FRAME_WINDOWS_FROZEN): New macro.
13162 * window.c (freeze_window_start, freeze_window_starts):
13163 Remove.
13164 (select_window, replace_window): Adjust users.
13165 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
13166 (window_frozen_p): New function.
13167 (redisplay_window): Use it.
13168
13169 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13170
13171 Fix some fd issues when running subprocesses (Bug#15035).
13172 Fix bugs that can leak files or file descriptors on errors.
13173 Don't unlink open temp files, as that's hard for users to diagnose
13174 when things go awry (e.g., temp disk exhausted).
13175 Don't bother to lock temp files. Check for invalid recursion.
13176 * callproc.c (synch_process_fd): Remove. All uses removed.
13177 (synch_process_tempfile): New var or macro.
13178 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
13179 New constants.
13180 (record_kill_process): New arg, the temp name. All callers changed.
13181 (delete_temp_file): Now just a simple wrapper around unlink.
13182 (call_process_kill): New arg, the call_process_fd array.
13183 Close them all. Clear synch_process_pid. Remove the temp file,
13184 or arrange for it to be removed.
13185 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
13186 that's been moved to synch_process_tempfile. Caller changed.
13187 Do not remove the tempfile; that's now call_process_kill's
13188 responsibility.
13189 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
13190 call_process_kill; the caller now does that.
13191 (call_process_cleanup): Do not close the process fd; that's now
13192 call_process_kill's responsibility.
13193 (Fcall_process): Implement via new function call_process, which
13194 has most of the old body of Fcall_process, but with a different API.
13195 (call_process): New function that does not open or close filefd if
13196 it is nonnegative. Record which fds need to be closed, and let
13197 call_process_kill close (and remove the tempfile, on MSDOS) on error.
13198 Signal an error if invoked recursively (could be done via a hook).
13199 Simplify creation of the tempfile in the MSDOS case.
13200 Don't create the output file until after checking for the executable.
13201 Report any failure to open /dev/null.
13202 Don't open /dev/null for writing twice; once is enough.
13203 Don't create pipe if all output is being discarded or sent to file.
13204 Don't worry about setting up the coding system or reading from the
13205 pipe if all output is being discarded.
13206 Hoist fd_error local into top level, to lessen block nesting.
13207 Don't record deleted pid here; now done by Fcall_process_region.
13208 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
13209 and note its success in synch_process_tempfile.
13210 Do not leak resources when child_setup fails.
13211 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
13212 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
13213 (create_temp_file): Now returns open fd, with an additional
13214 Lisp_Object * argument to return the name. All callers changed.
13215 Do not close the file; rewind it instead, and leave it open for
13216 the caller. Do not lock the temp file. Unwind-protect the file
13217 and the file-descriptor.
13218 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
13219 If an asynchrounous process, record it here, not in call_process.
13220 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
13221 * eval.c (set_unwind_protect): New function.
13222 * fileio.c (write_region): New function, generalized from the
13223 old Fwrite_region. Do not lock temp files.
13224 (Fwrite_region): Use it.
13225 * lisp.h (set_unwind_protect, write_region): New decls.
13226 * process.c: Include <verify.h>.
13227 (make_process): Mark fds as initially closed.
13228 (deleted_pid_list): Now a list of pid-filename pairs.
13229 All uses changed.
13230 (close_process_fd): New function.
13231 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
13232 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
13233 New constants. Verify that their number matches PROCESS_OPEN_FDS.
13234 (create_process, create_pty, Fmake_serial_process)
13235 (server_accept_connection): Record which fds need to be closed,
13236 and let deactivate_process close them.
13237 (Fmake_network_process): Do not discard the unwind-protect
13238 until it's safe to do so.
13239 (deactivate_process): Close the fds opened by create_process etc.
13240 (Fprocess_send_eof): Adjust to new way of recording open fds.
13241 Report an error if /dev/null can't be opened, instead of aborting.
13242 * process.h (PROCESS_OPEN_FDS): New constant.
13243 (struct Lisp_Process): New member open_fds.
13244 (record_kill_process, record_deleted_pid): Adjust signatures.
13245 (record_deleted_pid): Move decl here ...
13246 * syswait.h (record_deleted_pid): ... from here.
13247
13248 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
13249
13250 * decompress.c: Fix bugs with large buffers and weird inputs.
13251 Tune a bit. Reindent as per usual Emacs style.
13252 (BUFFER_SIZE): Remove.
13253 (Fdecompress_gzipped_region): Do not mishandle input buffers with
13254 more than UINT_MAX bytes. Decompress into the gap instead of into
13255 an auto buffer, as this should avoid copying. Return nil if
13256 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
13257 set immediate_quit; we shouldn't trust zlib code that much.
13258
13259 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13260
13261 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
13262 errors, and really move the gap to where we want it.
13263
13264 * lisp.h: Include decompress.c support.
13265
13266 * emacs.c (main): Include decompress.c support.
13267
13268 * Makefile.in: Include -lz if present.
13269
13270 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
13271
13272 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
13273 (initWithTitle:): Initialize frame to 0.
13274 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
13275 (fillWithWidgetValue:frame:): Rename from
13276 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
13277
13278 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
13279 fillWithWidgetValue:frame:
13280
13281 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
13282 remove memory leak warnings.
13283
13284 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
13285 (ns_check_menu_open): Handle menu == nil. Remove assignment to
13286 menu_pending_title.
13287
13288 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
13289 (x_activate_menubar): Update the whole menu.
13290 (trackingNotification:): Call ns_check_menu_open if tracking ends.
13291 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
13292 current event is not NSSystemDefined (Bug#15001).
13293 Call ns_check_menu_open only if trackingMenu is 2.
13294 (menuDidClose:): New method, decrease trackingMenu.
13295 (fillWithWidgetValue:setDelegate:): New method.
13296 (fillWithWidgetValue:): Call the above.
13297
13298 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
13299
13300 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
13301
13302 Omit some unnecessary casts.
13303 Many of these go back to the old pre-C89 days, when they may have
13304 been needed, but we've been assuming C89 or later for a while now.
13305 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
13306 (live_float_p, live_misc_p, live_vector_p):
13307 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
13308 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
13309 (defvar_per_buffer):
13310 * callint.c (Fcall_interactively):
13311 * doc.c (Fsubstitute_command_keys):
13312 * filelock.c (get_boot_time):
13313 * frame.c (xrdb_get_resource):
13314 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
13315 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
13316 (xg_get_file_name_from_selector, menuitem_destroy_callback)
13317 (menuitem_highlight_callback, menu_destroy_callback)
13318 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
13319 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
13320 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
13321 (xg_tool_bar_help_callback, tb_size_cb):
13322 * image.c (xpm_alloc_color, png_read_from_memory)
13323 (png_read_from_file, png_load_body, our_memory_skip_input_data)
13324 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
13325 (syms_of_image):
13326 * keymap.c (describe_map):
13327 * nsfns.m (Fns_display_monitor_attributes_list):
13328 * nsmenu.m (process_dialog:):
13329 * nsterm.m (hold_event):
13330 * process.c (wait_reading_process_output):
13331 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
13332 * scroll.c (do_direct_scrolling, scrolling_1):
13333 * termcap.c (tgetent):
13334 * window.c (check_window_containing, add_window_to_list)
13335 (freeze_window_starts):
13336 * xdisp.c (compare_overlay_entries, vmessage):
13337 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
13338 (x_get_monitor_attributes_xrandr)
13339 (Fx_display_monitor_attributes_list, x_display_info_for_name)
13340 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
13341 * xfont.c (xfont_match, xfont_open):
13342 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
13343 (menubar_selection_callback, menu_position_func)
13344 (popup_selection_callback, create_and_show_popup_menu)
13345 (dialog_selection_callback, create_and_show_dialog):
13346 * xrdb.c (x_get_string_resource)
13347 (main) [TESTRM]:
13348 * xsmfns.c (x_session_check_input):
13349 * xterm.c (x_draw_glyphless_glyph_string_foreground)
13350 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
13351 (xaw_jump_callback, xaw_scroll_callback):
13352 Omit unnecessary casts.
13353
13354 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
13355
13356 Minor string-length refactoring.
13357 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
13358 * frame.c (make_monitor_attribute_list):
13359 Prefer build_string to strlen + make_string.
13360
13361 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
13362
13363 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
13364 don't check minor_code (Bug#14417).
13365
13366 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13367
13368 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
13369 vertical positions instead. This avoids calling MATRIX_ROW with
13370 row numbers that are possibly beyond valid limits. (Bug#15064)
13371
13372 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
13373
13374 Use xstrdup and build_unibyte_string where applicable.
13375 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
13376 * xfns.c (x_window):
13377 * xrdb.c (x_get_customization_string):
13378 * xterm.c (xim_initialize):
13379 * w32fns.c (w32_window): Use xstrdup.
13380 (w32_display_monitor_attributes_list):
13381 * emacs.c (init_cmdargs):
13382 * keyboard.c (PUSH_C_STR):
13383 * nsfont.m (nsfont_open):
13384 * sysdep.c (system_process_attributes):
13385 * w32.c (system_process_attributes):
13386 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
13387
13388 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13389
13390 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
13391 variables of these types so that GDB would know about them, as aid
13392 for debugging fatal exceptions. (Bug#15024) See also
13393 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
13394 discussions.
13395
13396 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
13397
13398 * nsterm.m (ns_update_begin): Don't change clip path if it would be
13399 larger than the NSWindow (Bug#14934).
13400
13401 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13402
13403 Redesign redisplay interface to drop global variable updated_window.
13404 Always pass currently updated window as a parameter to update routines.
13405 * dispextern.h (updated_window): Remove declaration.
13406 (struct redisplay_interface): Pass window parameter to
13407 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
13408 and after_update_window_hook.
13409 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
13410 Adjust prototypes.
13411 * dispnew.c (updated_window): Remove.
13412 (redraw_overlapped_rows, update_marginal_area, update_text_area)
13413 (update_window_line): Adjust to match redisplay interface changes.
13414 * nsterm.m (ns_update_window_begin, ns_update_window_end)
13415 (ns_scroll_run, ns_after_update_window_line):
13416 * w32term.c (x_update_window_begin, x_update_window_end)
13417 (x_after_update_window_line, x_scroll_run):
13418 * xterm.c (x_update_window_begin, x_update_window_end)
13419 (x_after_update_window_line, x_scroll_run):
13420 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
13421 Likewise. Adjust comments where appropriate.
13422 (x_cursor_to): Simplify because this is always called during window
13423 update (but install debugging check anyway).
13424 (expose_window): Check must_be_updated_p flag to see whether this
13425 function is called during window update.
13426
13427 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13428
13429 Do not reset window modification event counters excessively.
13430 These leftovers and poor man's tricky methods to catch extra
13431 redisplay's attention are no longer needed.
13432 * frame.c (set_menu_bar_lines_1):
13433 * minibuf.c (read_minibuf_unwind):
13434 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
13435 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
13436 (window_scroll_line_based, Fset_window_configuration):
13437 * xdisp.c (redisplay_window): Do not reset last_modified and
13438 last_overlay_modified counters.
13439
13440 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
13441
13442 * xselect.c (x_send_client_event): Set send_event and serial, memset
13443 data.l as it might be bigger than data.b. Use 24 bit mask to
13444 XSendEvent (Bug#15034).
13445
13446 2013-08-07 Eli Zaretskii <eliz@gnu.org>
13447
13448 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
13449 for TTY frames that are not the top frame on their console.
13450 (Bug#14616)
13451
13452 2013-08-07 Martin Rudalics <rudalics@gmx.at>
13453
13454 * w32term.c (w32fullscreen_hook): Really maximize frame when
13455 asked for (Bug#14841).
13456
13457 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13458
13459 Prefer selected_window to Fselected_window, likewise for frames.
13460 * buffer.c (Fbuffer_swap_text):
13461 * data.c (Fvariable_binding_locus):
13462 * window.c (run_window_configuration_change_hook): Adjust users.
13463 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
13464 Use decode_live_frame.
13465
13466 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13467
13468 Be more careful if selected window shows the buffer other than current,
13469 use window_outdated only if this is not so. This change should also
13470 address some weird issues discussed in Bug#13012.
13471 * window.h (window_outdated): New prototype.
13472 * window.c (window_outdated): Now here. Convert from static and
13473 always assume window's buffer.
13474 (Fwindow_end, Fwindow_line_height): Use it.
13475 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
13476 and always assume window's buffer.
13477 (redisplay_window): Adjust user.
13478 (redisplay_internal): Call to reconsider_clip_changes once and
13479 check whether mode line should be updated only if selected window
13480 shows current buffer.
13481 (run_window_scroll_functions): Use eassert for debugging check.
13482 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
13483
13484 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13485
13486 * window.c (window_scroll, window_scroll_pixel_based)
13487 (window_scroll_line_based): Use bool for booleans.
13488
13489 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
13490
13491 * process.c: Fix minor off-by-one issues in descriptor counts.
13492 This shouldn't fix any real bugs, but it cleans up the code a bit.
13493 (max_process_desc, max_input_desc): -1, not 0, means none.
13494 All uses changed.
13495 (delete_input_desc): New function.
13496 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
13497 (deactivate_process): Scan backwards when recomuting max_process_desc;
13498 that should be faster.
13499 (init_process_emacs): Initialize max_input_desc.
13500
13501 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13502
13503 Use region cache to speedup bidi_find_paragraph_start.
13504 * buffer.h (struct buffer): New member bidi_paragraph_cache.
13505 Rename cache_long_line_scans to cache_long_scans.
13506 * buffer.c (bset_cache_long_line_scans): Rename to
13507 bset_cache_long_scans.
13508 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
13509 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
13510 into account.
13511 (syms_of_buffer): Rename cache-long-line-scans to
13512 cache-long-scans. Adjust docstring.
13513 * search.c (newline_cache_on_off):
13514 * indent.c (width_run_cache_on_off): Adjust users.
13515 * bidi.c (bidi_paragraph_cache_on_off): New function.
13516 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
13517 * insdel.c (prepare_to_modify_buffer):
13518 Invalidate bidi_paragraph_cache if enabled.
13519
13520 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13521
13522 Invalidate region caches only if buffer text is going to be changed.
13523 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
13524 (modify_text): ...new prototype.
13525 (prepare_to_modify_buffer_1): New prototype.
13526 * textprop.c (modify_region): Rename to...
13527 (modify_text_properties): ...new function.
13528 (add_text_properties_1, set_text_properties, Fremove_text_properties)
13529 (Fremove_list_of_text_properties): Adjust users.
13530 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
13531 (modify_text): ...new function.
13532 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
13533 (prepare_to_modify_buffer_1): ...new function.
13534 * casefiddle.c (casify_region):
13535 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
13536 (Ftranspose_regions): Use modify_text.
13537
13538 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
13539
13540 * lisp.mk (lisp): Add nadvice.elc.
13541
13542 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
13543
13544 New macro to iterate over live buffers similar to frames.
13545 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
13546 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
13547 Declare buffer-related variables here to offload lisp.h.
13548 * buffer.c (Vbuffer_alist): Adjust comment.
13549 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
13550 (other_buffer_safely):
13551 * data.c (store_symval_forwarding):
13552 * dispnew.c (Fframe_or_buffer_changed_p):
13553 * fileio.c (Fdo_auto_save):
13554 * filelock.c (unlock_all_files):
13555 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
13556
13557 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
13558
13559 Fix some minor races in hosts lacking mkostemp (Bug#15015).
13560 * callproc.c (create_temp_file):
13561 * filelock.c (create_lock_file):
13562 Assume mkostemp, since it's now provided by Gnulib.
13563
13564 2013-08-04 Eli Zaretskii <eliz@gnu.org>
13565
13566 * w32.c (mkostemp): New function.
13567 (mktemp): Remove, no longer used. Most of the code reused in
13568 mkostemp. (Bug#15015)
13569 (mktemp): Don't undef.
13570
13571 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
13572
13573 * dispnew.c (glyph_matrix_count, glyph_pool_count):
13574 Move under GLYPH_DEBUG and ENABLE_CHECKING.
13575 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
13576 (free_glyph_pool, check_glyph_memory): Likewise for
13577 all users. Adjust comments where appropriate.
13578
13579 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
13580
13581 * composite.h: Minor fixups.
13582 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
13583 to fix a misspelling, and change it to an inline function while
13584 we're at it (it need not be a macro). All uses changed.
13585 (composition_method, composition_valid_p):
13586 Rewrite to avoid assignments in if-conditions.
13587
13588 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13589
13590 Do not use global Lisp_Object in composition macros.
13591 * composite.h (composition_temp): Remove declaration.
13592 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
13593 (composition_method, composition_valid_p): ...inline functions.
13594 (compose_region): Remove the leftover.
13595 * composite.c (composition_temp): Remove.
13596 (run_composition_function, update_compositions)
13597 (composition_compute_stop_pos, composition_adjust_point)
13598 (Ffind_composition_internal):
13599 * coding.c (handle_composition_annotation):
13600 * xdisp.c (handle_composition_prop, check_point_in_composition):
13601 Related users changed.
13602
13603 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13604
13605 Drop FRAME_PTR typedef.
13606 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
13607 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
13608 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
13609 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
13610 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
13611 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
13612 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
13613 All related users changed.
13614
13615 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13616
13617 * eval.c (default_toplevel_binding): New function.
13618 (Fdefvar): Use it.
13619 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
13620 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
13621 (syms_of_eval): Export them.
13622 * data.c (Fdefault_value): Micro cleanup.
13623 * term.c (init_tty): Use "false".
13624
13625 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13626
13627 Fix X GC leak in GTK and raw (no toolkit) X ports.
13628 * xterm.c (x_free_frame_resources): If white and black relief
13629 GCs are allocated, always free them here.
13630 * xfns.c (x_make_gc): Omit redundant initialization.
13631 * widget.c (create_frame_gcs): Remove the leftover.
13632 (EmacsFrameDestroy): Do nothing because all GCs are now freed
13633 in x_free_frame_resources.
13634
13635 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
13636
13637 * nsterm.m (windowWillResize:toSize:): Only change title if
13638 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
13639 modifying it.
13640 (viewDidEndLiveResize): New method.
13641
13642 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
13643 inside NS_IMPL_COCOA.
13644
13645 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13646
13647 * insdel.c (adjust_after_replace, replace_range, del_range_2):
13648 Do not check whether undo is enabled because record_insert and
13649 record_delete does that themselves.
13650
13651 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13652
13653 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
13654 member which is not really used any more.
13655 (FRAME_XIC_BASE_FONTNAME): Remove.
13656 * xfns.c (xic_free_fontset): Adjust user.
13657 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
13658 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
13659 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
13660 (xdialog_show): Use eassert for debugging check.
13661 * w32term.c (x_unfocus_frame): Remove unused dummy function.
13662
13663 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
13664
13665 * fileio.c, fns.c (merge): Move extern decl from here ...
13666 * lisp.h (merge): ... to here.
13667
13668 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13669
13670 Fix last font-related change.
13671 * w32font.h (w32font_list_internal, w32font_match_internal):
13672 Fix prototype.
13673 * w32uniscribe.c (uniscribe_list, uniscribe_match)
13674 (uniscribe_list_family): Adjust to match font API change.
13675 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
13676 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
13677
13678 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13679
13680 * frame.h (FRAME_MOUSE_UPDATE):
13681 * nsterm.m (ns_frame_up_to_date): Omit redundant check
13682 whether hlinfo->mouse_face_mouse_frame is non-NULL.
13683
13684 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13685
13686 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
13687 * font.h (struct font_driver): Change list, match, and list_family
13688 functions to accept struct frame * as first arg.
13689 * font.c (font_score, font_compare, font_sort_entities):
13690 Remove prototypes.
13691 (font_sort_entities, font_list_entities, font_select_entity)
13692 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
13693 match font API change.
13694 * xfont.c (xfont_list, xfont_match, xfont_list_family):
13695 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
13696 * ftxfont.c (ftxfont_list, ftxfont_match):
13697 * xftfont.c (xftfont_list, xftfont_match):
13698 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
13699 * w32font.c (w32font_list, w32font_match, w32font_list)
13700 (w32font_list_internal, w32_font_match_internal): Likewise.
13701 * xfaces.c (Fx_family_fonts): Adjust user.
13702
13703 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13704
13705 Do not use pure Xism x_wm_set_icon_position in non-X ports.
13706 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
13707 only if HAVE_X_WINDOWS is in use.
13708 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
13709 * nsterm.m (x_wm_set_icon_position): Remove no-op.
13710 * w32term.c (x_wm_set_icon_position): Likewise.
13711 * w32fns.c (x_icon): Adjust user.
13712
13713 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13714
13715 * xterm.c (last_mouse_press_frame): Remove the
13716 leftover which is not really used any more.
13717 (handle_one_xevent, syms_of_xterm): Adjust users.
13718 (x_flush): Call XFlush once per each X display, not frame.
13719 This is better because this code always unconditionally skips
13720 non-X frames in Vframe_list and issues the only XFlush if we
13721 have more than one X frame on the same X display.
13722 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
13723 Use bool for booleans.
13724 (x_draw_glyph_string_background, cvt_string_to_pixel)
13725 (cvt_pixel_dtor): Drop unnecessary prototypes.
13726 * xterm.h (x_display_ok): Adjust prototype.
13727
13728 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13729
13730 Drop unnecessary functions that deals with frame pixel size.
13731 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
13732 (x_pixel_height): Drop prototypes.
13733 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
13734 (x_pixel_height): Drop implementations.
13735 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
13736 which should be always valid for window frame.
13737 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
13738 * w32menu.c (Fx_popup_dialog):
13739 * xmenu.c (Fx_popup_dialog): Likewise for both.
13740
13741 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13742
13743 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
13744 frame parameters and call to Fmodify_frame_parameters just once.
13745 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
13746 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
13747 and mention nil frame in docstring.
13748
13749 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13750
13751 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
13752 (x_figure_window_size): Likewise. Adjust to return long.
13753 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
13754 (toplevel): Move Qterminal_live_p to...
13755 * terminal.c (toplevel): ...here, make it static, and...
13756 (syms_of_terminal): ...DEFSYM here.
13757 * frame.h (Qterminal_live_p): Remove declaration.
13758 (make_frame, x_figure_window_size): Adjust prototype.
13759 * nsfns.m (Fx_create_frame): Use long for window flags.
13760
13761 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
13762
13763 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
13764 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
13765 Do not assume that emacs_close (INT_MAX) is a no-op.
13766
13767 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13768
13769 * xfaces.c (make_face_cache): For struct face_cache, prefer
13770 xmalloc to xzalloc and so avoid redundant call to memset.
13771 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
13772
13773 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13774
13775 * fringe.c (draw_window_fringes, update_window_fringes)
13776 (compute_fringe_widths):
13777 * w32term.c (x_draw_glyph_string):
13778 * window.c (candidate_window_p, Frecenter):
13779 * xfaces.c (realize_basic_faces, realize_default_face)
13780 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
13781 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
13782 * xfns.c (x_set_cursor_color, xic_free_xfontset):
13783 * xmenu.c (Fx_menu_bar_open_internal):
13784 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
13785 * xsettings.c (xft_settings_event):
13786 * xterm.c (x_draw_glyph_string, x_had_errors_p):
13787 Use bool for booleans. Adjust style and comments where
13788 appropriate.
13789 * dispextern.h (draw_window_fringes, update_window_fringes)
13790 (compute_fringe_widths):
13791 * xterm.h (x_had_errors_p): Adjust prototype.
13792
13793 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13794
13795 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
13796 CHECK_LIST. Rewrite the loop to avoid useless local variable.
13797
13798 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
13799
13800 * fns.c (toplevel): Remove comment before Fsafe_length because
13801 it checks for QUIT.
13802
13803 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
13804
13805 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
13806
13807 2013-07-28 Eli Zaretskii <eliz@gnu.org>
13808
13809 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
13810 frame which got the message is still alive, before dereferencing
13811 its pointer. (Bug#14970)
13812
13813 * frame.c (delete_frame): Test "this" frame's minibuffer window to
13814 be a live window, before using it as such. (Bug#14970)
13815
13816 2013-07-27 Eli Zaretskii <eliz@gnu.org>
13817
13818 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
13819 w32_detect_focus_change instead of doing part of its job by hand.
13820 This fixes the problem whereby FOCUS_OUT events were not sent to
13821 the event queue.
13822
13823 2013-07-26 Eli Zaretskii <eliz@gnu.org>
13824
13825 * process.c (Fprocess_list): Doc fix.
13826
13827 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
13828 being re-exposed only if it didn't ask to become visible.
13829 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
13830 was previously iconified. (Bug#14841)
13831 (x_iconify_frame): Mark the frame iconified.
13832
13833 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
13834
13835 Fix minor problems found by static checking.
13836 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
13837 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
13838
13839 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
13840
13841 * eval.c (set_specpdl_old_value): New function.
13842 (unbind_to): Minor simplification.
13843 (get_backtrace_frame): New function.
13844 (Fbacktrace_frame): Use it. Add `base' argument.
13845 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
13846 (syms_of_eval): Export backtrace-eval.
13847 * xterm.c (x_focus_changed): Simplify.
13848
13849 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
13850
13851 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
13852
13853 2013-07-24 Eli Zaretskii <eliz@gnu.org>
13854
13855 * xdisp.c (redisplay_window): Instead of moving point out of
13856 scroll margin, reject the force_start method, and try scrolling
13857 instead. (Bug#14780)
13858
13859 2013-07-24 Ken Brown <kbrown@cornell.edu>
13860
13861 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
13862 (Bug#14944).
13863
13864 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
13865
13866 * eval.c (Fprogn): Do not check that BODY is a proper list.
13867 This undoes the previous change. The check slows down the
13868 interpreter, and is not needed to prevent a crash. See
13869 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
13870
13871 2013-07-23 Glenn Morris <rgm@gnu.org>
13872
13873 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
13874
13875 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
13876
13877 Port to GNU/Linux systems with tinfo but not ncurses.
13878 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
13879 to decide whether ncurses is being used. Without this change,
13880 GCC complains about tgetent not being declared, on a system
13881 that has tinfo installed but ncurses not installed.
13882
13883 * eval.c (Fprogn): Check that BODY is a proper list.
13884
13885 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
13886 * data.c (Fsetq_default):
13887 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
13888 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
13889 (Fcondition_case):
13890 Tune by taking advantage of the fact that ARGS is always a list
13891 when a function is declared to have UNEVALLED args.
13892
13893 * emacsgtkfixed.c: Port to GCC 4.6.
13894 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
13895
13896 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
13897
13898 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
13899 here to silence compiler warnings.
13900
13901 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
13902
13903 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
13904 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
13905 from messing up Emacs's 'struct frame' (Bug#14923).
13906
13907 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13908
13909 * alloc.c (make_save_ptr_ptr): Define this function.
13910 It was inadvertently omitted. It's needed only if
13911 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
13912
13913 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
13914
13915 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
13916 frame have focus (Bug#14895).
13917
13918 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13919
13920 Avoid vfork-related deadlock more cleanly.
13921 * callproc.c (child_setup): When the child's exec fails, output
13922 the program name, as that's more useful. Use O_NONBLOCK to avoid
13923 deadlock.
13924 * process.c (create_process_1): Remove; no longer needed.
13925 (create_process): Remove timer hack; no longer needed, now that
13926 the child avoids deadlock.
13927
13928 2013-07-20 Glenn Morris <rgm@gnu.org>
13929
13930 * image.c (Fimage_flush): Fix doc typo.
13931
13932 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
13933
13934 Fix array bounds violation when pty allocation fails.
13935 * process.c (PTY_NAME_SIZE): New constant.
13936 (pty_name): Remove static variable; it's now auto.
13937 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
13938 Take pty_name as an arg rather than using a static variable.
13939 All callers changed.
13940 (create_process): Recover pty_flag from process, not from volatile local.
13941 (create_pty): Stay inside array even when pty allocation fails.
13942 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
13943
13944 * lread.c (Fload): Avoid initialization only when lint checking.
13945 Mention that it's needed only for older GCCs.
13946
13947 2013-07-20 Kenichi Handa <handa@gnu.org>
13948
13949 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
13950 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
13951
13952 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
13953
13954 * lread.c (Fload): Avoid uninitialized warning.
13955
13956 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13957
13958 Fix some minor file descriptor leaks and related glitches.
13959 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
13960 (create_lock_file): Use write, not emacs_write.
13961 * image.c (slurp_file, png_load_body):
13962 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
13963 (server_accept_connection):
13964 Don't leak an fd on memory allocation failure.
13965 * image.c (slurp_file): Add a cheap heuristic for growing files.
13966 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
13967 as that's what the other routines do. Maybe input need not be
13968 blocked at all, but it's better to be consistent.
13969 Avoid undefined behavior when strlen is zero.
13970
13971 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
13972 (NSTATICS): Now a constant; doesn't need to be a macro.
13973
13974 2013-07-19 Richard Stallman <rms@gnu.org>
13975
13976 * coding.c (decode_coding_utf_8): Add simple loop for fast
13977 processing of ASCII characters.
13978
13979 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13980
13981 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
13982
13983 2013-07-19 Eli Zaretskii <eliz@gnu.org>
13984
13985 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
13986 unportable 'struct x_display_info'.
13987 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
13988 is a portable type.
13989
13990 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13991
13992 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
13993 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
13994 or fscanf fails.
13995 (system_process_attributes): Prefer plain char to unsigned char
13996 when either will do. Clean up properly if interrupted or if
13997 memory allocations fail. Don't assume sscanf succeeds.
13998 Remove no-longer-needed workaround to stop GCC from whining.
13999 Read command-line once, instead of multiple times. Check read status a
14000 bit more carefully.
14001
14002 Fix obscure porting bug with varargs functions.
14003 The code assumed that int is treated like ptrdiff_t in a vararg
14004 function, which is not a portable assumption. There was a similar
14005 -- though these days less likely -- porting problem with various
14006 assumptions that pointers of different types all smell the same as
14007 far as vararg functions is conserved. To make this problem less
14008 likely in the future, redo the API to use varargs functions.
14009 * alloc.c (make_save_value): Remove this vararg function.
14010 All uses changed to ...
14011 (make_save_int_int_int, make_save_obj_obj_obj_obj)
14012 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
14013 New functions.
14014 (make_save_ptr): Rename from make_save_pointer, for consistency with
14015 the above. Define only on platforms that need it. All uses changed.
14016
14017 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
14018
14019 * keyboard.c: Try to fix typos in previous change.
14020 (DISPLAY_LIST_INFO): New macro.
14021 (kbd_buffer_get_event): Do not access members that are not present
14022 in X11. Revert inadvertent change of "!=" to "=".
14023
14024 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
14025
14026 * keyboard.c (kbd_buffer_get_event):
14027 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
14028 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
14029
14030 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
14031
14032 * filelock.c: Fix unlikely file descriptor leaks.
14033 (get_boot_time_1): Rework to avoid using emacs_open.
14034 This doesn't actually fix a leak, but is better anyway.
14035 (read_lock_data): Use read, not emacs_read.
14036
14037 * doc.c: Fix minor memory and file descriptor leaks.
14038 * doc.c (get_doc_string): Fix memory leak when doc file absent.
14039 (get_doc_string, Fsnarf_documentation):
14040 Fix file descriptor leak on error.
14041
14042 * term.c: Fix minor fdopen-related file descriptor leaks.
14043 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
14044 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
14045
14046 * charset.c: Fix file descriptor leaks and errno issues.
14047 Include <errno.h>.
14048 (load_charset_map_from_file): Don't leak file descriptor on error.
14049 Use plain record_xmalloc since the allocation is larger than
14050 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
14051 of entries.
14052 * eval.c (record_unwind_protect_nothing):
14053 * fileio.c (fclose_unwind):
14054 New functions.
14055 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
14056 The replacement doesn't block input, but that no longer seems
14057 necessary.
14058
14059 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
14060
14061 * lread.c: Fix file descriptor leaks and errno issues.
14062 (Fload): Close some races that leaked fds or streams when 'load'
14063 was interrupted.
14064 (Fload, openp): Report error number of last nontrivial failure to open.
14065 ENOENT counts as trivial.
14066 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
14067 New functions.
14068 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
14069 now that the function is always called with a nonnegative arg.
14070 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
14071 All uses replaced with ...
14072 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
14073
14074 A few more minor file errno-reporting bugs.
14075 * callproc.c (Fcall_process):
14076 * doc.c (Fsnarf_documentation):
14077 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
14078 * process.c (set_socket_option):
14079 Don't let a constructor trash errno.
14080 * doc.c: Include <errno.h>.
14081
14082 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
14083
14084 * w32fns.c (unwind_create_tip_frame): Fix declaration.
14085
14086 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
14087
14088 Fix w32 bug with call-process-region (Bug#14885).
14089 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
14090 to Fcall_process when the input is empty. This simplifies the
14091 code a bit. It makes no difference on POSIXish platforms but
14092 apparently it fixes a bug on w32.
14093
14094 Fix bug where insert-file-contents closes a file twice (Bug#14839).
14095 * fileio.c (close_file_unwind): Don't close if FD is negative;
14096 this can happen when unwinding a zapped file descriptor.
14097 (Finsert_file_contents): Unwind-protect the fd before the point marker,
14098 in case Emacs runs out of memory between the two unwind-protects.
14099 Don't trash errno when closing FD.
14100 Zap the FD in the specpdl when closing it, instead of deferring
14101 the removal of the unwind-protect; this fixes a bug where a child
14102 function unwinds the stack past us.
14103
14104 New unwind-protect flavors to better type-check C callbacks.
14105 This also lessens the need to write wrappers for callbacks,
14106 and the need for make_save_pointer.
14107 * alloc.c (free_save_value):
14108 * atimer.c (run_all_atimers):
14109 Now extern.
14110 * alloc.c (safe_alloca_unwind):
14111 * atimer.c (unwind_stop_other_atimers):
14112 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
14113 * menu.c (cleanup_popup_menu) [HAVE_NS]:
14114 * minibuf.c (choose_minibuf_frame_1):
14115 * process.c (make_serial_process_unwind):
14116 * xdisp.c (pop_message_unwind):
14117 * xselect.c (queue_selection_requests_unwind):
14118 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
14119 * alloc.c (record_xmalloc):
14120 Prefer record_unwind_protect_ptr to record_unwind_protect with
14121 make_save_pointer.
14122 * alloc.c (Fgarbage_collect):
14123 Prefer record_unwind_protect_void to passing a dummy.
14124 * buffer.c (restore_buffer):
14125 * window.c (restore_window_configuration):
14126 * xfns.c, w32fns.c (do_unwind_create_frame)
14127 New wrapper. All record-unwind uses of wrappee changed.
14128 * buffer.c (set_buffer_if_live):
14129 * callproc.c (call_process_cleanup, delete_temp_file):
14130 * coding.c (code_conversion_restore):
14131 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
14132 * editfns.c (save_excursion_restore)
14133 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
14134 (save_restriction_restore):
14135 * eval.c (restore_stack_limits, un_autoload):
14136 * fns.c (require_unwind):
14137 * keyboard.c (recursive_edit_unwind, tracking_off):
14138 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
14139 * macros.c (pop_kbd_macro, restore_menu_items):
14140 * nsfns.m (unwind_create_frame):
14141 * print.c (print_unwind):
14142 * process.c (start_process_unwind):
14143 * search.c (unwind_set_match_data):
14144 * window.c (select_window_norecord, select_frame_norecord):
14145 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
14146 (fast_set_selected_frame):
14147 * xfns.c, w32fns.c (unwind_create_tip_frame):
14148 Return void, not a dummy Lisp_Object. All uses changed.
14149 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
14150 * callproc.c (call_process_kill):
14151 * fileio.c (restore_point_unwind, decide_coding_unwind)
14152 (build_annotations_unwind):
14153 * insdel.c (Fcombine_after_change_execute_1):
14154 * keyboard.c (read_char_help_form_unwind):
14155 * menu.c (unuse_menu_items):
14156 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
14157 * sound.c (sound_cleanup):
14158 * xdisp.c (unwind_redisplay):
14159 * xfns.c (clean_up_dialog):
14160 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
14161 Accept no args and return void, instead of accepting and returning
14162 a dummy Lisp_Object. All uses changed.
14163 * cygw32.c (fchdir_unwind):
14164 * fileio.c (close_file_unwind):
14165 * keyboard.c (restore_kboard_configuration):
14166 * lread.c (readevalllop_1):
14167 * process.c (wait_reading_process_output_unwind):
14168 Accept int and return void, rather than accepting an Emacs integer
14169 and returning a dummy object. In some cases this fixes an
14170 unlikely bug when the corresponding int is outside Emacs integer
14171 range. All uses changed.
14172 * dired.c (directory_files_internal_unwind):
14173 * fileio.c (do_auto_save_unwind):
14174 * gtkutil.c (pop_down_dialog):
14175 * insdel.c (reset_var_on_error):
14176 * lread.c (load_unwind):
14177 * xfns.c (clean_up_file_dialog):
14178 * xmenu.c, nsmenu.m (pop_down_menu):
14179 * xmenu.c (cleanup_widget_value_tree):
14180 * xselect.c (wait_for_property_change_unwind):
14181 Accept pointer and return void, rather than accepting an Emacs
14182 save value encapsulating the pointer and returning a dummy object.
14183 All uses changed.
14184 * editfns.c (Fformat): Update the saved pointer directly via
14185 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
14186 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
14187 (unwind_body): New function.
14188 (record_unwind_protect): First arg is now a function returning void,
14189 not a dummy Lisp_Object.
14190 (record_unwind_protect_ptr, record_unwind_protect_int)
14191 (record_unwind_protect_void): New functions.
14192 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
14193 * fileio.c (struct auto_save_unwind): New type.
14194 (do_auto_save_unwind): Use it.
14195 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
14196 * insdel.c (struct rvoe_arg): New type.
14197 (reset_var_on_error): Use it.
14198 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
14199 New constants.
14200 (specbinding_func): Remove; there are now several such functions.
14201 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
14202 (set_unwind_protect_ptr): New function.
14203 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
14204
14205 Be simpler and more consistent about reporting I/O errors.
14206 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
14207 Say "Read error" and "Write error", rather than "I/O error", or
14208 "IO error reading", or "IO error writing", when a read or write
14209 error occurs.
14210 * process.c (Fmake_network_process, wait_reading_process_output)
14211 (send_process, Fprocess_send_eof, wait_reading_process_output):
14212 Capitalize diagnostics consistently. Put "failed foo" at the
14213 start of the diagnostic, so that we don't capitalize the
14214 function name "foo". Consistently say "failed" for such
14215 diagnostics.
14216 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
14217 All callers changed. This is so it can use report_file_error.
14218 * sysdep.c (serial_open, serial_configure): Capitalize I/O
14219 diagnostics consistently as above.
14220
14221 * fileio.c (report_file_errno): Fix errno reporting bug.
14222 If the file name is neither null nor a pair, package it up as a
14223 singleton list. All callers changed, both to this function and to
14224 report_file_error. This fixes a bug where the memory allocator
14225 invoked by list1 set errno so that the immediately following
14226 report_file_error reported the wrong errno value.
14227
14228 Fix minor problems found by --enable-gcc-warnings.
14229 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
14230 * keyboard.c (kbd_buffer_get_event): Remove unused local.
14231
14232 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
14233
14234 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
14235 Set event->arg to Qt if switch-event shall be generated.
14236 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
14237
14238 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
14239
14240 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
14241 FOCUS_OUT_EVENT.
14242
14243 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
14244 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
14245 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
14246 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
14247 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
14248 and there is a focused frame.
14249 (head_table): Add focus-in and focus-out.
14250 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
14251 bind to handle-focus-in/out.
14252
14253 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
14254 (Fhandle_switch_frame): Call Fhandle_focus_in.
14255 (syms_of_frame): defsubr handle-focus-in/out.
14256
14257 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
14258
14259 Fix porting bug to older POSIXish platforms (Bug#14862).
14260 * sysdep.c (emacs_pipe): New function, that implements
14261 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
14262 This should port better to CentOS 5 and to Mac OS X 10.6.
14263 All calls to pipe2 changed.
14264
14265 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
14266 This makes the code easier to read and the executable a bit smaller.
14267 Do not replace all calls to Fcons that happen to create lists,
14268 just calls that are intended to create lists. For example, when
14269 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
14270 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
14271 Similarly for list2 through list5.
14272 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
14273 * bytecode.c (exec_byte_code):
14274 * callint.c (quotify_arg, Fcall_interactively):
14275 * callproc.c (Fcall_process, create_temp_file):
14276 * charset.c (load_charset_map_from_file)
14277 (Fdefine_charset_internal, init_charset):
14278 * coding.c (get_translation_table, detect_coding_system)
14279 (Fcheck_coding_systems_region)
14280 (Fset_terminal_coding_system_internal)
14281 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
14282 * composite.c (update_compositions, Ffind_composition_internal):
14283 * dired.c (directory_files_internal, file_name_completion)
14284 (Fsystem_users):
14285 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
14286 * doc.c (Fsnarf_documentation):
14287 * editfns.c (Fmessage_box):
14288 * emacs.c (main):
14289 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
14290 (Feval, eval_sub, Ffuncall, apply_lambda):
14291 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
14292 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
14293 (Fset_file_times, Finsert_file_contents)
14294 (Fchoose_write_coding_system, Fwrite_region):
14295 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
14296 * font.c (font_registry_charsets, font_parse_fcname)
14297 (font_prepare_cache, font_update_drivers, Flist_fonts):
14298 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
14299 * frame.c (make_frame, Fmake_terminal_frame)
14300 (x_set_frame_parameters, x_report_frame_params)
14301 (x_default_parameter, Fx_parse_geometry):
14302 * ftfont.c (syms_of_ftfont):
14303 * image.c (gif_load):
14304 * keyboard.c (command_loop_1):
14305 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
14306 (Fcopy_keymap, append_key, Fcurrent_active_maps)
14307 (Fminor_mode_key_binding, accessible_keymaps_1)
14308 (Faccessible_keymaps, Fwhere_is_internal):
14309 * lread.c (read_emacs_mule_char):
14310 * menu.c (find_and_return_menu_selection):
14311 * minibuf.c (get_minibuffer):
14312 * nsfns.m (Fns_perform_service):
14313 * nsfont.m (ns_script_to_charset):
14314 * nsmenu.m (ns_popup_dialog):
14315 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
14316 (Fx_own_selection_internal):
14317 * nsterm.m (append2):
14318 * print.c (Fredirect_debugging_output)
14319 (print_prune_string_charset):
14320 * process.c (Fdelete_process, Fprocess_contact)
14321 (Fformat_network_address, set_socket_option)
14322 (read_and_dispose_of_process_output, write_queue_push)
14323 (send_process, exec_sentinel):
14324 * sound.c (Fplay_sound_internal):
14325 * textprop.c (validate_plist, add_properties)
14326 (Fput_text_property, Fadd_face_text_property)
14327 (copy_text_properties, text_property_list, syms_of_textprop):
14328 * unexaix.c (report_error):
14329 * unexcoff.c (report_error):
14330 * unexsol.c (unexec):
14331 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
14332 (Fformat_mode_line, syms_of_xdisp):
14333 * xfaces.c (set_font_frame_param)
14334 (Finternal_lisp_face_attribute_values)
14335 (Finternal_merge_in_global_face, syms_of_xfaces):
14336 * xfns.c (x_default_scroll_bar_color_parameter)
14337 (x_default_font_parameter, x_create_tip_frame):
14338 * xfont.c (xfont_supported_scripts):
14339 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
14340 (menu_help_callback, xmenu_show):
14341 * xml.c (make_dom):
14342 * xterm.c (set_wm_state):
14343 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
14344 and similarly for list2 through list5.
14345
14346 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
14347
14348 * callproc.c (Fcall_process_region): Fix minor race and tune.
14349 (create_temp_file): New function, with the temp-file-creation part
14350 of the old Fcall_process_region. Use Fcopy_sequence to create the
14351 temp file name, rather than alloca + build_string, for simplicity.
14352 Don't bother to block input around the temp file creation;
14353 shouldn't be needed. Simplify use of mktemp.
14354 Use record_unwind_protect immediately after creating the temp file;
14355 this closes an unlikely race where the temp file was not removed.
14356 Use memcpy rather than an open-coded loop.
14357 (Fcall_process_region): Use the new function. If the input is
14358 empty, redirect from /dev/null rather than from a newly created
14359 empty temp file; this avoids unnecessary file system traffic.
14360
14361 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
14362
14363 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
14364 Simplify by making this case like the other two. This is a bit
14365 slower on obsolete hosts, but the extra complexity isn't worth it.
14366
14367 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
14368 * process.c (create_process) [!DOS_NT]:
14369 Remove now-unnecessary calls to emacs_close.
14370
14371 2013-07-13 Eli Zaretskii <eliz@gnu.org>
14372
14373 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
14374 returning early. (Bug#14850)
14375
14376 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
14377 and inhibit-iso-escape-detection attributes of 'undecided'.
14378 (Bug#14822)
14379
14380 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
14381
14382 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
14383 Reported by Herbert J. Skuhra in
14384 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
14385
14386 Don't lose top specpdl entry when memory is exhausted.
14387 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
14388 specpdl overflow here, to simplify callers; all callers changed.
14389 Always reserve an unused entry at the stack top; this avoids
14390 losing the top entry's information when memory is exhausted.
14391
14392 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14393
14394 Clean up errno reporting and fix some errno-reporting bugs.
14395 * callproc.c (Fcall_process):
14396 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
14397 * process.c (create_process, Fmake_network_process):
14398 * unexaix.c (report_error):
14399 * unexcoff.c (report_error):
14400 Be more careful about reporting the errno of failed operations.
14401 The code previously reported the wrong errno sometimes.
14402 Also, prefer report_file_errno to setting errno + report_file_error.
14403 (Fcall_process): Look at openp return value rather than at path,
14404 as that's a bit faster and clearer when there's a numeric predicate.
14405 * fileio.c (report_file_errno): New function, with most of the
14406 old contents of report_file_error.
14407 (report_file_error): Use it.
14408 (Ffile_exists_p, Ffile_accessible_directory_p):
14409 Set errno to 0 when it is junk.
14410 * fileio.c (Faccess_file):
14411 * image.c (x_create_bitmap_from_file):
14412 Use faccessat rather than opening the file, to avoid the hassle of
14413 having a file descriptor open.
14414 * lisp.h (report_file_errno): New decl.
14415 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
14416
14417 Minor EBADF fixes.
14418 * process.c (create_process, wait_reading_process_output) [AIX]:
14419 Remove obsolete SIGHUP-related code, as Emacs no longer disables
14420 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
14421 a multithreaded environment anyway).
14422 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
14423
14424 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
14425
14426 * image.c (x_find_image_file): Don't close a remote file handle.
14427
14428 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14429
14430 Fix races with threads and file descriptors.
14431 * callproc.c (Fcall_process_region):
14432 * dired.c (open_directory):
14433 * emacs.c (main, Fdaemon_initialized):
14434 * image.c (x_find_image_file):
14435 * inotify.c (Finotify_rm_watch):
14436 * lread.c (Flocate_file_internal):
14437 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
14438 * term.c (term_mouse_moveto, init_tty):
14439 * termcap.c (tgetent):
14440 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
14441 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
14442 * unexhp9k800.c, unexmacosx.c (unexec):
14443 * callproc.c (Fcall_process_region):
14444 Use emacs_close, not close.
14445 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
14446 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
14447 and posix_close function on current platforms (which all lack them).
14448 (emacs_close): Use it. This should fix the races on GNU/Linux and
14449 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
14450 and it should avoid closing random victim file descriptors on
14451 other platforms.
14452
14453 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
14454
14455 * inotify.c (uninitialized): Remove. All uses replaced by -1.
14456 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
14457 Touch up doc a bit.
14458
14459 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
14460 This is for .gdbinit xbacktrace.
14461
14462 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
14463 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
14464 (emacs_set_tty): Now static.
14465 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
14466 * term.c (tty_capable_p, tty_default_color_capabilities)
14467 (get_tty_terminal, term_mouse_movement)
14468 (handle_one_term_event, init_tty, maybe_fatal):
14469 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
14470 (tgetent, scan_file, name_match, compare_contin):
14471 * terminal.c (get_terminal):
14472 Use bool for boolean.
14473 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
14474 Prefer char to unsigned char if either will do.
14475 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
14476 (tty_write_glyphs): Prefer int to unsigned.
14477 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
14478 All callers changed.
14479 * termcap.c (tprint, main) [TEST]: Remove non-working test.
14480
14481 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14482
14483 Port to C89.
14484 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
14485 (B__dummy__): New dummy symbol, to pacify C89.
14486 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
14487 they can't grok varargs macros.
14488 * dispnew.c (add_window_display_history)
14489 (add_frame_display_history):
14490 * print.c (print_object):
14491 * xdisp.c (debug_method_add):
14492 Use %p printf format only for void pointers.
14493 * emacs.c (usage_message): New constant, replacing ...
14494 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
14495 (main): Adjust to usage reorg.
14496 * fns.c (syms_of_fns):
14497 * profiler.c (syms_of_profiler):
14498 Don't use non-constant struct initializers.
14499 * gnutls.h (gnutls_initstage_t):
14500 * lisp.h (enum Lisp_Fwd_Type):
14501 * lread.c (lisp_file_lexically_bound_p):
14502 * xsettings.c (anonymous enum):
14503 Remove trailing comma.
14504 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
14505 * lisp.h (ENUM_BF): Use unsigned if pedantic.
14506 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
14507 (DEFUN): Use it.
14508 * regex.c (const_re_char): New type, to pacify strict C89.
14509 All uses of 'const re_char' replaced to use it.
14510 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
14511 with glibc when strict C89. This change is imported from gnulib.
14512 All uses changed.
14513 (_Restrict_arr_): Rename from __restrict_arr, similarly.
14514 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
14515 Omit GNU_LINUX implementation, since it requires long long.
14516 * xterm.c (x_draw_underwave):
14517 Do not assume the traditional order of struct's members.
14518 (x_term_init): Rewrite to avoid the need for non-constant structure
14519 initializers.
14520
14521 Syntax cleanup, mostly replacing macros with functions.
14522 This removes the need for the syntax_temp hack.
14523 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
14524 * syntax.c (SYNTAX_INLINE): New macro.
14525 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
14526 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
14527 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
14528 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
14529 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
14530 (SYNTAX_COMEND_FIRST): Now functions, not macros.
14531 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
14532 Now constants, not macros.
14533 (syntax_temp) [!__GNUC__]: Remove.
14534 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
14535 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
14536 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
14537 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
14538 Move here from syntax.h; now functions, not macros. Except for the
14539 last function, these are static since only syntax.c uses them.
14540 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
14541 All uses changed. Now a function, not a macro; use this fact
14542 to simplify the code.
14543 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
14544 compiler bugs; no longer relevant.
14545 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
14546 (SYNTAX_INLINE): New macro.
14547 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
14548 for the new functions. Use bool for boolean member.
14549 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
14550 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
14551 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
14552 (SETUP_BUFFER_SYNTAX_TABLE):
14553 Now extern inline functions, not macros.
14554 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
14555 Remove; all uses replaced by implementation.
14556 (syntax_temp) [!__GNUC__]: Remove decl.
14557 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
14558
14559 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
14560
14561 * emacs.c (main): Fix syntax error.
14562
14563 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14564
14565 Timestamp fixes for undo (Bug#14824).
14566 * atimer.c (schedule_atimer):
14567 * fileio.c (Ffile_newer_than_file_p):
14568 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
14569 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
14570 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
14571 (syms_of_fileio): Remove Sclear_visited_file_name.
14572 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
14573 file doesn't exist; this avoids an ambiguity with negative timestamps.
14574 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
14575 * systime.h (make_emacs_time, invalid_emacs_time):
14576 Don't assume struct timespec layout; POSIX doesn't guarantee it.
14577 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
14578 * undo.c (record_first_change): Push (visited-file-modtime) onto
14579 undo list rather than reimplementing it by hand, incorrectly.
14580
14581 2013-07-09 Ken Brown <kbrown@cornell.edu>
14582
14583 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
14584
14585 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
14586
14587 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
14588
14589 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
14590
14591 Handle errno and exit status a bit more carefully.
14592 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
14593 number into an exit status. Instead, use EXIT_CANCELED.
14594 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
14595 * callproc.c (relocate_fd):
14596 * emacs.c (close_output_streams, main):
14597 * process.c (create_process):
14598 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
14599 Use emacs_perror for simplicity.
14600 * callproc.c (relocate_fd, main):
14601 * sysdep.c (sys_subshell):
14602 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
14603 (shut_down_emacs): Use emacs_write, not write.
14604 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
14605 * fileio.c (Fcopy_file, e_write):
14606 * nsterm.m (ns_select):
14607 * process.c (send_process):
14608 * sound.c (vox_write):
14609 Use emacs_write_sig, not emacs_write.
14610 * lisp.h (emacs_write_sig, emacs_perror): New decls.
14611 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
14612 New constants.
14613 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
14614 of write.
14615 (emacs_full_write): New function.
14616 (emacs_write): Rewrite to use it.
14617 (emacswrite_sig, emacs_perror): New functions.
14618 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
14619
14620 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
14621
14622 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
14623 on NS even if it is present. Pixmap on NS is a void*.
14624
14625 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14626
14627 Port to Ubuntu 10 (Bug#14803). Reported by T.V. Raman.
14628 * process.c (close_on_exec, accept4, process_socket):
14629 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
14630
14631 2013-07-07 Eli Zaretskii <eliz@gnu.org>
14632
14633 * w32.c (sys_dup): Declare prototype.
14634
14635 * filelock.c:
14636 * emacs.c:
14637 * callproc.c [WINDOWSNT]: Include sys/socket.h.
14638
14639 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14640
14641 Make file descriptors close-on-exec when possible (Bug#14803).
14642 This simplifies Emacs a bit, since it no longer needs to worry
14643 about closing file descriptors by hand in some cases.
14644 It also fixes some unlikely races. Not all such races, as
14645 libraries often open files internally without setting
14646 close-on-exec, but it's an improvement.
14647 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
14648 * callproc.c (Fcall_process) [!MSDOS]:
14649 * emacs.c (main) [!DOS_NT]:
14650 * nsterm.m (ns_term_init):
14651 * process.c (create_process):
14652 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
14653 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
14654 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
14655 Prefer mkostemp with O_CLOEXEC to mkstemp.
14656 * callproc.c (relocate_fd) [!WINDOWSNT]:
14657 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
14658 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
14659 now using pipe2.
14660 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
14661 Make the resulting file descriptor close-on-exec.
14662 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
14663 * lread.c (load_descriptor_list, load_descriptor_unwind):
14664 Remove; no longer needed. All uses removed.
14665 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
14666 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
14667 New functions.
14668 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
14669 (Fmake_network_process, Fnetwork_interface_list)
14670 (Fnetwork_interface_info, server_accept_connection):
14671 Make newly-created socket close-on-exec.
14672 * sysdep.c (emacs_open, emacs_fopen):
14673 Make new-created descriptor close-on-exec.
14674 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
14675 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
14676
14677 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
14678
14679 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
14680 for NS_IMPL_GNUSTEP.
14681
14682 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14683
14684 Fix openp errno handling.
14685 * callproc.c (Fcall_process): Preserve openp errno around close.
14686 * lread.c (openp): Set errno when returning -1, as some callers
14687 expect this.
14688
14689 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
14690
14691 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
14692
14693 * nsterm.h (NSSavePanel): Update comment.
14694 (NSAPP_DATA2_RUNFILEDIALOG): Define.
14695 (ns_run_file_dialog): Declare.
14696
14697 * nsfns.m: Remove panelOK.
14698 (ns_fd_data): New.
14699 (ns_run_file_dialog): New function.
14700 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
14701 event loop, so file dialog is popped up by ns_run_file_dialog, called
14702 by sendEvent (Bug#14578).
14703 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
14704
14705 2013-07-06 Eli Zaretskii <eliz@gnu.org>
14706
14707 * xdisp.c (default_line_pixel_height): New function.
14708 (pos_visible_p, move_it_vertically_backward, try_scrolling)
14709 (try_cursor_movement, redisplay_window, try_window)
14710 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
14711
14712 * window.c (window_scroll_pixel_based):
14713 use default_line_pixel_height.
14714
14715 * dispextern.h (default_line_pixel_height): Add prototype.
14716
14717 * frame.c (x_set_line_spacing): Accept a float value for
14718 line-spacing parameter, per the documentation.
14719
14720 * data.c (Fmultibyte_string_p): Doc fix.
14721
14722 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
14723
14724 Use emacs_open more consistently when opening files.
14725 This handles EINTR more consistently now, and makes it easier
14726 to introduce other uniform changes to file descriptor handling.
14727 * sysstdio.h: New file.
14728 * buffer.c (mmap_init):
14729 * cygw32.c (chdir_to_default_directory):
14730 * dispnew.c (Fopen_termscript):
14731 * emacs.c (Fdaemon_initialized):
14732 * fileio.c (Fdo_auto_save):
14733 * image.c (slurp_file, png_load_body, jpeg_load_body):
14734 * keyboard.c (Fopen_dribble_file):
14735 * lread.c (Fload):
14736 * print.c (Fredirect_debugging_output):
14737 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
14738 * termcap.c (tgetent):
14739 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
14740 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
14741 * w32term.c (w32_initialize) [CYGWIN]:
14742 * xfaces.c (Fx_load_color_file):
14743 Use emacs_open instead of plain open, and emacs_fopen instead of
14744 plain fopen.
14745 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
14746 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
14747 * callproc.c (default_output_mode): New constant.
14748 (Fcall_process): Use it to call emacs_open instead of plain creat.
14749 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
14750 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
14751 (emacs_fopen): New function.
14752 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
14753 Include <lisp.h>, for emacs_open.
14754 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
14755
14756 Remove duplicate #include directives.
14757 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
14758 * xfaces.c:
14759 Don't include stdio.h twice.
14760 * buffer.c [USE_MMAP_FOR_BUFFERS]:
14761 Don't include sys/types.h or stdio.h twice.
14762 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
14763 * lread.c: Don't include coding.h twice.
14764 * nsfont.m: Don't include frame.h twice.
14765 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
14766 * ralloc.c: Don't include <unistd.h> twice.
14767 * xdisp.c: Don't include font.h twice.
14768 * xterm.c: Don't include fontset.h twice.
14769 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
14770
14771 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14772
14773 Scale ImageMagick images more carefully.
14774 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
14775 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
14776 Be more careful about avoiding undefined behavior after
14777 integer overflow and division by zero.
14778
14779 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14780
14781 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
14782 (syms_of_w32fns): DEFSYM them.
14783 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
14784 (CCHDEVICENAME): Define macros if not defined.
14785 (struct MONITOR_INFO_EX): New struct.
14786 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
14787 (enum_display_monitors_fn): New variable.
14788 (globals_of_w32fns): Initialize it.
14789 (Fx_display_pixel_width, Fx_display_pixel_height)
14790 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
14791 multi-monitor setups in docstrings.
14792 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
14793 screen size by primary monitor's millimeter per pixel.
14794 (w32_monitor_enum, w32_display_monitor_attributes_list)
14795 (w32_display_monitor_attributes_list_fallback)
14796 (Fw32_display_monitor_attributes_list): New functions.
14797 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
14798
14799 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
14800 if not defined.
14801 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
14802
14803 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
14804
14805 * fileio.c (Qfile_notify_error): New error symbol.
14806
14807 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
14808 * inotify.c (inotify_callback, symbol_to_inotifymask)
14809 (Finotify_add_watch, Finotify_rm_watch): Use it.
14810 (inotifyevent_to_event): Exchange order of cookie and file name.
14811 (Finotify_add_watch): Adapt docstring.
14812
14813 * lisp.h (Qfile_notify_error): Declare.
14814
14815 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14816
14817 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
14818 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14819 Do not clear _malloc_thread_enabled_p, undoing the previous change,
14820 which did not work (see <http://bugs.gnu.org/14569#307>).
14821 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
14822 && (!noninteractive || initialized)). This attempts to thread
14823 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
14824
14825 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
14826
14827 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
14828 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
14829
14830 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14831
14832 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
14833 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14834 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
14835 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
14836
14837 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14838
14839 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
14840 Define to __sys_siglist.
14841
14842 2013-07-02 Eli Zaretskii <eliz@gnu.org>
14843
14844 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
14845 word-wrap, so that overflow-newline-into-fringe would work in
14846 visual-line-mode. (Bug#2749)
14847 (move_it_in_display_line_to): When the last scanned display
14848 element fits exactly on the display line, and
14849 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
14850 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
14851 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
14852 finding buffer position that corresponds to pixel coordinates,
14853 e.g. in buffer_posn_from_coords.
14854
14855 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
14856
14857 * process.c (handle_child_signal): Call catch_child_signal if
14858 NS_IMPL_GNUSTEP.
14859
14860 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14861
14862 Don't convert function pointers to void * and back.
14863 It isn't portable C, and it's easy enough to avoid.
14864 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
14865 (make_save_value): Add support for SAVE_FUNCPOINTER.
14866 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
14867 * print.c (print_object):
14868 Distinguish function from object pointers.
14869 * lisp.h (SAVE_FUNCPOINTER): New constant.
14870 (SAVE_SLOT_BITS): Adjust to it.
14871 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
14872 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
14873 (voidfuncptr): New typedef.
14874 (struct Lisp_Save_Value): New member data[0].funcpointer.
14875 (XSAVE_FUNCPOINTER): New function.
14876
14877 Simplify buildobj processing.
14878 * Makefile.in (buildobj.h): Make it a sequence of strings each
14879 followed by comma, rather than a single string. Put it into a
14880 .tmp file in case there's an error while generating it.
14881 (gl-stamp): Use .tmp for temp files.
14882 (mostlyclean): Clean .tmp files.
14883 * doc.c (buildobj): Move to just the routine that needs it.
14884 It's now an array of strings, so processing is simpler.
14885
14886 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
14887
14888 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
14889 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
14890 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14891 Invoke malloc_enable_thread even when not interactive.
14892 Reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
14893 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
14894 in this case, since the underlying bug has now been fixed.
14895
14896 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
14897
14898 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
14899 unlinking it (bug#14691).
14900
14901 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
14902
14903 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
14904 before checking whether buffer is modified. This lets
14905 `kill-buffer-query-functions' cancel killing of the buffer or save
14906 its content before `kill-buffer' asks user the "Buffer %s
14907 modified; kill anyway?" question.
14908
14909 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
14910
14911 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
14912 Let the super performKeyEquivalent deal with them (Bug#14747).
14913
14914 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
14915
14916 * widget.c (resize_cb): Remove unused local.
14917
14918 Do not use GTK 3 if it exists but cannot be compiled.
14919 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
14920 * xterm.c (x_error_handler) [!USE_GTK]:
14921 Do not use GTK 3.
14922
14923 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
14924
14925 2013-06-30 Eli Zaretskii <eliz@gnu.org>
14926
14927 * intervals.c (get_local_map): Instead of aborting, clip POSITION
14928 to the valid range of values. (Bug#14753)
14929
14930 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
14931 when moving point by using the current glyph matrix. This avoids
14932 the need to force redisplay when this function is called in a
14933 loop.
14934
14935 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
14936
14937 Fix minor problems found by static checking.
14938 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
14939 Redo the latter's body to sidestep GCC parenthesization warnings.
14940 (setup_coding_system, detect_coding, detect_coding_system): Use them.
14941 * coding.c (detect_coding, detect_coding_system):
14942 * coding.h (struct undecided_spec):
14943 Use bool for boolean.
14944 * image.c (QCmax_width, QCmax_height): Now static.
14945 * xdisp.c (Fmove_point_visually): Remove unused local.
14946
14947 2013-06-29 Eli Zaretskii <eliz@gnu.org>
14948
14949 * xdisp.c (Fmove_point_visually): New function.
14950
14951 2013-06-28 Kenichi Handa <handa@gnu.org>
14952
14953 * coding.h (define_coding_undecided_arg_index): New enum.
14954 (coding_attr_index): New members
14955 coding_attr_undecided_inhibit_null_byte_detection,
14956 coding_attr_undecided_inhibit_iso_escape_detection,
14957 coding_attr_undecided_prefer_utf_8.
14958 (undecided_spec): New struct.
14959 (struct coding_system): New member `undecided' of the member
14960 `spec'.
14961
14962 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
14963 (detect_coding): Likewise.
14964 (detect_coding_system): Likewise.
14965 (Fdefine_coding_system_internal): New coding system properties
14966 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
14967 :prefer-utf-8.
14968 (syms_of_coding): Adjust for coding_arg_undecided_max.
14969
14970 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
14971
14972 * image.c (x_from_xcolors): Remove unused local.
14973
14974 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14975
14976 Defer image data transfer between X client and server until actual
14977 display happens.
14978
14979 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
14980 and `mask_img'.
14981
14982 * image.c (Destroy_Image): Remove.
14983 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
14984 `mask_p', and `colors_p'. All uses changed.
14985 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
14986 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
14987 New macros for `flags' arg to x_clear_image_1.
14988 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
14989 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
14990 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
14991 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
14992 (image_get_x_image, image_unget_x_image): New functions or macros.
14993 (image_background, image_background_transparent, x_to_xcolors)
14994 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
14995 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
14996 instead of Destroy_Image.
14997 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
14998 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
14999 (png_load_body, jpeg_load_body, tiff_load, gif_load)
15000 (imagemagick_load_image, svg_load_image): Use them instead of
15001 x_create_x_image_and_pixmap, and x_put_x_image followed by
15002 x_destroy_x_image, respectively.
15003 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
15004 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
15005 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
15006 background_transparent fields.
15007 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
15008 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
15009
15010 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
15011
15012 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
15013 This mostly consists of undoing recent changes.
15014 * callproc.c (Fcall_process):
15015 * process.c (create_process):
15016 Do not worry about catching SIGCHLD here, undoing previous change.
15017 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
15018 * process.c, process.h (catch_child_signal):
15019 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
15020 * process.c (catch_child_handler): Don't worry about being called
15021 lazily and do not assume caller has blocked SIGCHLD, undoing
15022 previous change. Move first-time stuff back to
15023 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
15024 tickle glib, as that causes Cygwin bootstrap to fail. Do not
15025 set lib_child_handler if it's already initialized, which may
15026 help avoid problems on GNUstep.
15027
15028 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
15029
15030 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
15031 * callproc.c (Fcall_process):
15032 * process.c (create_process):
15033 Make sure SIGCHLD is caught before we fork,
15034 since Emacs startup no arranges to catch SIGCHLD.
15035 * process.c (lib_child_handler): Initialize to null, not to
15036 dummy_handler.
15037 (catch_child_signal): Allow self to be called lazily.
15038 Do nothing if it's already been called.
15039 Assume caller has blocked SIGCHLD (all callers do now).
15040 * emacs.c (main): Do not catch SIGCHLD here; defer it until
15041 just before it's really needed.
15042 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
15043 since it hasn't been caught yet.
15044
15045 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
15046
15047 * image.c (compute_image_size): New function to implement
15048 :max-width and :max-height.
15049 (imagemagick_load_image): Use it.
15050
15051 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
15052
15053 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
15054 * callproc.c, process.h (block_child_signal, unblock_child_signal):
15055 Now extern.
15056 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
15057 * process.c (catch_child_signal): Block SIGCHLD while futzing with
15058 the SIGCHLD handler, since the code is not atomic and (due to glib)
15059 signals may be arriving now.
15060 * sysdep.c (init_signals): Do not catch child signals here;
15061 'main' now does that later, at a safer time.
15062
15063 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
15064
15065 Clean up SIGCHLD handling a bit (Bug#14569).
15066 * process.c, process.h (catch_child_signal):
15067 Now always extern, even if !NS_IMPL_GNUSTEP.
15068 * process.c (catch_child_signal): Move glib tickler here from
15069 init_process_emacs, so that it's done earlier in Emacs
15070 initialization. Also move the noninteractive && !initialized
15071 check here from init_process_emacs. This is all a bit cleaner for
15072 GNUish platforms, and I hope it works around the Cygwin bug.
15073 * sysdep.c (init_signals): Invoke catch_child_signal here, so
15074 that glib signal handling is tickled before glib creates threads.
15075
15076 * process.c (wait_reading_process_output): Avoid int overflow
15077 when reading more than 2 GiB total from a process.
15078
15079 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
15080
15081 * process.c (create_process): Handle a couple more cases,
15082 i.e., work even if new_argv and wait_child_setup[i] are cached.
15083 Use Fcall_process's style for volatile vars.
15084
15085 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
15086
15087 * process.c (create_process): Mark PROCESS volatile.
15088
15089 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
15090
15091 Use C99-style flexible array members if available.
15092 This avoids some subtle aliasing issues, which typically
15093 aren't a problem with GCC but may be a problem elsewhere.
15094 * alloc.c (sdata): New typedef, replacing the old struct sdata.
15095 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
15096 In either case, it uses a flexible array member rather than
15097 the old struct hack. All uses changed.
15098 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
15099 Adjust to sdata reorganization.
15100 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
15101 Use offsetof (struct, flex_array_member), not sizeof (struct), as
15102 that ports better to pre-C99 non-GCC.
15103 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
15104 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
15105 as the latter has changed.
15106 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
15107 and port better to pre-C99 GCC.
15108 * image.c (struct xpm_cached_color):
15109 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
15110 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
15111 Use FLEXIBLE_ARRAY_MEMBER.
15112 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
15113 Move decl to top level so it gets checked against implementation.
15114 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
15115 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
15116
15117 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
15118
15119 * syntax.c: Integer cleanups.
15120 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
15121 All uses that need 0-or-2 changed to:
15122 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
15123 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
15124 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
15125 (char_quoted, prev_char_comend_first, back_comment)
15126 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
15127 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
15128 Use bool for boolean.
15129 (update_syntax_table, skip_chars, skip_syntaxes):
15130 Prefer int to unsigned when either will do.
15131 (back_comment): Return boolean success flag, like forw_comment,
15132 instead of positive-or-minus-1 (which might have overflowed int anyway).
15133 Don't stuff ptrdiff_t into int.
15134 (syntax_spec_code, syntax_code_spec): Now const.
15135 (Fmatching_paren, scan_lists, scan_sexps_forward):
15136 Use enum syntaxcode for syntax code.
15137 (Fmatching_paren): Check that arg is a character, not just an integer.
15138 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
15139 (Finternal_describe_syntax_value): Omit no-longer-needed
15140 comparison to 0.
15141 (skip_chars): Use char, not unsigned char, when the distinction
15142 doesn't matter.
15143 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
15144 * bytecode.c (exec_byte_code):
15145 * syntax.c (syntax_spec_code, Fchar_syntax)
15146 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
15147 (init_syntax_once):
15148 * syntax.h (SYNTAX_WITH_FLAGS):
15149 Omit unnecessary casts.
15150
15151 2013-06-20 Eli Zaretskii <eliz@gnu.org>
15152
15153 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
15154 line dimensions here, to avoid race conditions with the main
15155 thread. (Bug#14062, bug#14630, bug#14669)
15156
15157 * w32term.c (w32_draw_window_cursor): Compute the header line and
15158 mode line dimensions here.
15159 <w32_system_caret_window, w32_system_caret_hdr_height>:
15160 <w32_system_caret_mode_height>: New variables.
15161
15162 * w32term.h: Declare them.
15163
15164 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
15165
15166 * alloc.c (die): Move "assertion failed" string here ...
15167 * lisp.h (eassert): ... from here. Also, suppress evaluation of
15168 COND when SUPPRESS_CHECKING. This shrinks the executable text
15169 size by 0.8% to 2.2% when configured with --enable-checking,
15170 depending on optimization flags (GCC 4.8.1 x86-64).
15171
15172 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
15173
15174 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
15175
15176 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
15177 base is 2; this is more accurate.
15178
15179 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
15180
15181 * sound.c (string_default): Move to !WINDOWSNT section.
15182 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
15183
15184 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
15185
15186 * sound.c: Integer cleanups.
15187 Remove unnecessary forward decls.
15188 (struct sound_device): The 'file' member is now a Lisp_Object, not
15189 a char *, so that we needn't invoke alloca on a huge size.
15190 (Fplay_sound_internal): Adjust to this.
15191 (string_default): New function.
15192 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
15193 Use it to adjust to the struct sound_device change.
15194 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
15195 (be2hs) [0]: Remove.
15196
15197 * syntax.c (skip_chars): Don't use uninitialized storage
15198 when searching a multibyte buffer for characters that are not in a
15199 unibyte string that contains non-ASCII characters.
15200
15201 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
15202
15203 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
15204 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
15205
15206 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
15207
15208 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
15209
15210 2013-06-18 Kenichi Handa <handa@gnu.org>
15211
15212 * font.c (Ffont_spec): Signal an error for an invalid font name
15213 (Bug#14648).
15214
15215 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
15216
15217 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
15218 In particular this ports to 32-bit sparc Sun cc.
15219 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
15220 array with a dummy element at specpdl[-1], so that its address can
15221 be taken portably.
15222 (unbind_to): Do not copy the binding; not needed, now that we
15223 copy old_value in the one place where the copy is needed.
15224 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
15225 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
15226 (union specbinding): Rename from struct specbinding. Redo layout
15227 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
15228 which is not portable. With Sun C 5.12 32-bit sparc, the
15229 declaration causes nargs to be an unsigned bitfield, a behavior
15230 that the C standard allows; but Emacs wants nargs to be signed.
15231 The overall type is now a union of structures rather than a
15232 structure of union of structures, and the 'kind' member is now a
15233 bitfield, so that the overall type doesn't grow. All uses changed.
15234 * process.c (Fmake_serial_process): Remove unnecessary initialization.
15235
15236 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
15237
15238 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
15239 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
15240
15241 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
15242
15243 2013-06-17 Eli Zaretskii <eliz@gnu.org>
15244
15245 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
15246 unless we know that the window w's frame is a frame object.
15247 Another attempt at solving bug#14062 and bug#14630.
15248
15249 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
15250
15251 * textprop.c (property_set_type): New enum.
15252 (add_properties): Allow appending/prepending text properties.
15253 (add_text_properties_1): Factored out of Fadd_text_properties.
15254 (Fadd_text_properties): Move all the code into
15255 add_text_properties_1.
15256 (Fadd_face_text_property): New function that calls
15257 add_text_properties_1.
15258
15259 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
15260
15261 Move functions from lisp.h to individual modules when possible.
15262 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
15263 * alloc.c (XFLOAT_INIT, set_symbol_name):
15264 * buffer.c (CHECK_OVERLAY):
15265 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
15266 (set_char_table_parent):
15267 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
15268 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
15269 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
15270 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
15271 (set_blv_valcell):
15272 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
15273 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
15274 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
15275 (backtrace_args, backtrace_debug_on_exit):
15276 * floatfns.c (CHECK_FLOAT):
15277 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
15278 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
15279 (set_hash_hash, set_hash_hash_slot, set_hash_index)
15280 (set_hash_index_slot):
15281 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
15282 * marker.c (CHECK_MARKER):
15283 * textprop.c (CHECK_STRING_OR_BUFFER):
15284 * window.c (CHECK_WINDOW_CONFIGURATION):
15285 Move here from lisp.h, and make these functions static rather than
15286 extern inline.
15287 * buffer.c (Qoverlayp):
15288 * data.c (Qsubrp):
15289 * fns.c (Qhash_table_p):
15290 * window.c (Qwindow_configuration_p):
15291 Now static.
15292 * lisp.h: Remove the abovementioned defns and decls.
15293
15294 Use functions, not macros, for XINT etc (Bug#11935).
15295 In lisp.h, prefer functions to function-like macros, and
15296 constants to object-like macros, when either will do. This:
15297 . simplifies use, as there's no more need to worry about
15298 arguments' side effects being evaluated multiple times.
15299 . makes the code easier to debug on some platforms.
15300 However, when using gcc -O0, keep using function-like macros
15301 for a few critical operations, for performance reasons.
15302 This sort of thing isn't needed with gcc -Og, but -Og
15303 is a GCC 4.8 feature and isn't widely-enough available yet.
15304 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
15305 Remove enum lsb_bits; no longer needed.
15306 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
15307 * buffer.c (Qoverlap):
15308 * data.c (Qsubrp):
15309 * fns.c (Qhash_table_p):
15310 Now extern, so lisp.h can use these symbols.
15311 * dispextern.h: Include character.h, for MAX_CHAR etc.
15312 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15313 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15314 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15315 (GLYPH_CODE_P): Move here from lisp.h.
15316 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15317 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
15318 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
15319 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
15320 XUNTAG now returns void *.
15321 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
15322 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
15323 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
15324 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
15325 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
15326 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
15327 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
15328 (lisp_h_XPNTR, lisp_h_XSYMBOL):
15329 New macros, renamed from their sans-lisp_h_ counterparts.
15330 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
15331 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
15332 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
15333 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
15334 If compiling via GCC without optimization, define these as macros
15335 in addition to inline functions.
15336 To disable this, compile with -DINLINING=0.
15337 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
15338 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
15339 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
15340 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
15341 (INTMASK, VALMASK): Now macros, since static values cannot be
15342 accessed from extern inline functions.
15343 (VALMASK): Also a constant, for benefit of old GDB.
15344 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
15345 is INTEGERP, which can fold it in.
15346 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
15347 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
15348 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
15349 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
15350 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
15351 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
15352 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
15353 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
15354 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
15355 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
15356 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
15357 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
15358 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
15359 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
15360 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
15361 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
15362 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
15363 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
15364 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
15365 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
15366 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
15367 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
15368 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
15369 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
15370 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
15371 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
15372 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
15373 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
15374 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
15375 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
15376 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
15377 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
15378 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
15379 Now functions.
15380 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
15381 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
15382 (VALMASK): Define in one place rather than in two, merging the
15383 USE_LSB_TAG parts; this is simpler.
15384 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
15385 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
15386 Move up, to avoid use before definition.
15387 Also include "globals.h" earlier, for the same reason.
15388 (make_natnum): New function.
15389 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
15390 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
15391 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
15392 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
15393 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
15394 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
15395 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
15396 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
15397 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
15398 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
15399 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
15400 (Qwindow_configuration_p, Qimage): New forward declarations.
15401 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
15402 (STRING_COPYIN): Remove; unused.
15403 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
15404 (xcar_addr, xcdr_addr): New functions. All uses changed.
15405 (IEEE_FLOATING_POINT): Now a constant, not a macro.
15406 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15407 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15408 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15409 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
15410 (TYPE_RANGED_INTEGERP): Simplify.
15411 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
15412 (setlocale, fixup_locale, synchronize_system_messages_locale)
15413 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
15414 Now empty functions, not macros.
15415 (functionp): Return bool, not int.
15416 * window.c (Qwindow_configuration_p): Now extern,
15417 so window.h can use it.
15418 * window.h (Qwindowp): Move decl back to lisp.h.
15419
15420 2013-06-15 Eli Zaretskii <eliz@gnu.org>
15421
15422 * xdisp.c (Fline_pixel_height): New function, required for solving
15423 bug #14567.
15424
15425 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
15426
15427 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
15428
15429 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
15430
15431 * lread.c (syms_of_lread):
15432 * fns.c (Fprovide): Adjust to new format of after-load-alist.
15433
15434 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
15435
15436 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
15437
15438 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
15439
15440 * fileio.c (expand_file_name): Doc fix.
15441
15442 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
15443
15444 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
15445 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
15446 Wait for self, not for 0. This can't hurt on GNU or similar
15447 system, and may help with Cygwin.
15448
15449 * keyboard.c: Don't use PROP (...) as an lvalue.
15450 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
15451 Use set_prop (A, B), not PROP (A) = B.
15452
15453 2013-06-10 Eli Zaretskii <eliz@gnu.org>
15454
15455 * xdisp.c (get_it_property): Use it->window instead of generating
15456 a Lisp object from it->w.
15457
15458 2013-06-09 Eli Zaretskii <eliz@gnu.org>
15459
15460 * xdisp.c (get_it_property): If it->object is a buffer, pass to
15461 get-char-property the window that is being rendered, instead of
15462 the buffer, to support window-specific overlays. (Bug#14575)
15463 (compute_display_string_pos): When W is NULL, use the current
15464 buffer as the object to pass to get-char-property.
15465 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
15466 pointer member of the bidi iterator, since no window is pertinent
15467 to this function.
15468
15469 2013-06-08 Eli Zaretskii <eliz@gnu.org>
15470
15471 * bidi.c (bidi_fetch_char): Accept additional argument, the window
15472 being displayed, and pass it to compute_display_string_pos.
15473 (bidi_level_of_next_char, bidi_resolve_explicit_1)
15474 (bidi_paragraph_init): All callers changed.
15475
15476 * xdisp.c (init_from_display_pos, init_iterator)
15477 (handle_single_display_spec, next_overlay_string)
15478 (get_overlay_strings_1, reseat_1, reseat_to_string)
15479 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
15480 Set bidi_it.w member from it->w.
15481 (compute_display_string_pos): Accept additional argument, the
15482 window being displayed, and pass it to Fget_char_property.
15483 (Bug#14575)
15484
15485 * dispextern.h (struct bidi_it): New member w, the window being
15486 displayed.
15487 (compute_display_string_pos): Adjust prototype.
15488
15489 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
15490
15491 * xgselect.c: Remove unneeded include xterm.h.
15492
15493 * process.c (wait_reading_process_output): Check for NS before GLIB.
15494 GLIB may be linked in due to rsvg, but ns_select must be called.
15495
15496 * xgselect.c (xg_select): Remove call to window_system_available
15497 and g_main_context_pending at the top, so Gdk events (i.e. file
15498 notify) are processed when Emacs is started with -nw.
15499
15500 2013-06-07 Eli Zaretskii <eliz@gnu.org>
15501
15502 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
15503 (ctagsfiles3): New variable, includes only *.m files.
15504 (TAGS): Use an explicit language name in the regular expressions,
15505 to avoid transformation of '/SOMETHING' by MSYS to
15506 'c:\MSYS\SOMETHING'.
15507
15508 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
15509
15510 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
15511
15512 2013-06-06 Eli Zaretskii <eliz@gnu.org>
15513
15514 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
15515 still need to set the mouse pointer shape and activate help-echo.
15516 (Bug#14558)
15517
15518 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
15519
15520 A few porting etc. fixes for the new file monitor code.
15521 See the thread containing
15522 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
15523 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
15524 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
15525 (dir_monitor_callback, Fgfile_rm_watch):
15526 Use assq_no_quit instead of Fassoc, for speed.
15527 (dir_monitor_callback, Fgfile_rm_watch):
15528 eassert that the monitor is a fixnum.
15529 (dir_monitor_callback): No need for CDR_SAFE.
15530 Simplify building of lisp with alternative tails.
15531 (Fgfile_add_watch, Fgfile_rm_watch):
15532 Do not assume glib functions set errno reliably on failure.
15533 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
15534 and signal an error otherwise.
15535 (Fgfile_rm_watch): Prefer CONSP to !NILP.
15536 Use Fdelq instead of Fdelete, for speed.
15537
15538 2013-06-05 Eli Zaretskii <eliz@gnu.org>
15539
15540 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
15541 don't insist on being invoked on a highlighted tool-bar button.
15542 Avoids losing tool-bar functionality when mouse-highlight is nil.
15543 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
15544 Don't highlight when mouse-highlight is nil.
15545 (note_mouse_highlight): When mouse-highlight is nil, don't return
15546 right away; instead, run tool-bar and mode-line highlight
15547 subroutine, clear any existing highlight, and revert the mouse
15548 pointer to its default shape. (Bug#14558)
15549
15550 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15551
15552 * lisp.mk (lisp): Add prog-mode.el.
15553
15554 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
15555
15556 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
15557 * process.c (dummy_handler): New function.
15558 (lib_child_handler): New static var.
15559 (handle_child_signal): Invoke it.
15560 (catch_child_signal): If a library has set up a signal handler,
15561 save it into lib_child_handler.
15562 (init_process_emacs): If using glib and not on Windows, tickle glib's
15563 child-handling code so that it initializes its private SIGCHLD handler.
15564 * syssignal.h (SA_SIGINFO): Default to 0.
15565 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
15566 31; it should no longer be needed now.
15567
15568 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
15569
15570 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
15571
15572 * gfilenotify.c (globals_of_gfilenotify): New function.
15573 (syms_of_gfilenotify): Move global initialization there.
15574
15575 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
15576
15577 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15578
15579 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
15580 * keyboard.c (menu_bar_items, tool_bar_items):
15581 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
15582 not override local keymaps any more.
15583
15584 2013-06-04 Eli Zaretskii <eliz@gnu.org>
15585
15586 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
15587
15588 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15589
15590 * w32console.c (initialize_w32_display): Return the dimensions of
15591 the console window via 2 additional arguments, not via the current
15592 frame. This avoids crashes due to overrunning the bounds of
15593 frame's decode_mode_spec_buffer, which is not resized following
15594 the change of the frame dimensions from the initial 10x10.
15595
15596 * w32term.h (w32_initialize_display_info): Adjust prototype.
15597
15598 * term.c (init_tty): Take dimensions of the frame from the values
15599 returned by initialize_w32_display.
15600
15601 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
15602 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
15603 (LIBES): Add $(GFILENOTIFY_LIBS).
15604
15605 * w32inevt.c (handle_file_notifications): Add dummy implementation
15606 for !HAVE_W32NOTIFY.
15607
15608 * w32term.c: Wrap code with HAVE_W32NOTIFY.
15609
15610 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
15611
15612 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
15613
15614 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
15615
15616 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
15617
15618 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
15619
15620 Fix minor problems found by static checking.
15621 * data.c (pure_write_error):
15622 Use xsignal2, not Fsignal, as Fsignal might return.
15623 * eval.c (set_backtrace_debug_on_exit): Now static.
15624 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
15625 No longer inline. EXTERN_INLINE is needed only for functions
15626 defined in .h files. Reindent function header as per GNU style.
15627 (backtrace_p, backtrace_top, backtrace_next):
15628 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
15629 compiler or linker. Add extern decls to pacify gcc -Wall.
15630 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15631 Now static.
15632 * frame.c (free_monitors): Define only on platforms that need it.
15633 * nsterm.m (ns_term_init):
15634 * process.c (catch_child_signal):
15635 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
15636 defined on all porting targets these days.
15637 * process.c, process.h (catch_child_signal):
15638 Make it extern only if NS_IMPL_GNUSTEP is defined.
15639
15640 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15641
15642 * w32.c (gettimeofday): Make the signature identical to prototype
15643 in nt/inc/sys/time.h.
15644
15645 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15646
15647 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
15648 .gdbinit.
15649
15650 * keyboard.c (safe_run_hooks_error): Improve error message.
15651
15652 * data.c (pure_write_error): Add `object' argument.
15653 * puresize.h (CHECK_IMPURE): Use it.
15654
15655 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
15656
15657 * Makefile.in (NOTIFY_OBJ): New variable.
15658 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
15659
15660 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
15661 Call syms_of_gfilenotify.
15662
15663 * gfilenotify.c: New file.
15664
15665 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
15666 and Qfile_w32notify.
15667 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
15668 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
15669
15670 * lisp.h: Declare syms_of_gfilenotify.
15671
15672 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
15673
15674 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15675
15676 Merge the specpdl and backtrace stacks. Make the structure of the
15677 specpdl entries more obvious via a tagged union of structs.
15678 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
15679 (enum specbind_tag): New enum.
15680 (struct specbinding): Make it a tagged union of structs.
15681 Add a case for backtrace records.
15682 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
15683 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
15684 (backtrace_debug_on_exit): New accessors.
15685 (struct backtrace): Remove.
15686 (struct catchtag): Remove backlist field.
15687 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
15688 Move to eval.c.
15689 (Flocal_variable_p): Speed up the common case where the binding is
15690 already loaded.
15691 * eval.c (backtrace_list): Remove.
15692 (set_specpdl_symbol, set_specpdl_old_value): Remove.
15693 (set_backtrace_args, set_backtrace_nargs)
15694 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
15695 (backtrace_next): New functions.
15696 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
15697 (unwind_to_catch, internal_lisp_condition_case)
15698 (internal_condition_case, internal_condition_case_1)
15699 (internal_condition_case_2, internal_condition_case_n): Don't bother
15700 with backtrace_list any more.
15701 (Fsignal): Adjust to new backtrace format.
15702 (grow_specpdl): Move up.
15703 (record_in_backtrace): New function.
15704 (eval_sub, Ffuncall): Use it.
15705 (apply_lambda): Adjust to new backtrace format.
15706 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
15707 data.c.
15708 (specbind): Adjust to new specpdl format. Simplify.
15709 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
15710 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
15711 backtrace format.
15712 (mark_backtrace): Remove.
15713 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
15714 * xdisp.c (redisplay_internal): Use record_in_backtrace.
15715 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
15716 Use mark_specpdl.
15717 * profiler.c (record_backtrace): Use get_backtrace.
15718 (handle_profiler_signal): Use backtrace_top_function.
15719 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
15720 accessor functions.
15721
15722 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
15723
15724 * process.h (catch_child_signal): Declare.
15725
15726 * process.c (catch_child_signal): New function.
15727 (init_process_emacs): Call it.
15728
15729 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
15730 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
15731 NS_IMPL_COCOA.
15732 (x_set_cursor_type): Remove declaration.
15733 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
15734 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
15735 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
15736 (ns_get_color): Use F suffix on float.
15737 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
15738 (ns_get_rgb_color): Remove.
15739 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
15740 (note_mouse_movement): x and y are CGFloat.
15741 (ns_draw_fringe_bitmap): Remove unused rowY.
15742 Change #if to COCOA && >= 10_6.
15743 (ns_draw_window_cursor): Remove unused overspill.
15744 (ns_draw_underwave): width and x are EamcsCGFloat.
15745 (ns_draw_box): thickness is CGFloat.
15746 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
15747 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
15748 if not in main thread.
15749 (ns_get_pending_menu_title, ns_check_menu_open)
15750 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
15751 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
15752 (sendFromMainThread:): New method.
15753 (changeFont:): size is CGFloat.
15754 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
15755 Disable warning about permanent text.
15756 (characterIndexForPoint:): Adjust return type depending on GNUstep
15757 version.
15758 (mouseDown:): delta is CGFloat.
15759 (updateFrameSize): Remove unised variable f.
15760 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
15761 Cast float to EmacsCGFloat.
15762 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
15763 also to -1 when restoring.
15764 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
15765 inside NS_IMPL_COCOA.
15766 (toggleFullScreen:): Put call to toggleFullScreen inside
15767 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
15768 (setPosition:portion:whole:): por is CGFloat.
15769 (getMouseMotionPart:window:x:y:): Add F suffix to float.
15770 (mouseDown:): Use CGFloat.
15771 (mouseDragged:): Remove unised variable edge.
15772 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
15773
15774 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
15775 of CGFloat differs.
15776 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
15777 when NS_IMPL_GNUSTEP.
15778 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
15779 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
15780 (EmacsToolbar): Add clearAll. Add tag argument to
15781 addDisplayItemWithImage.
15782 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
15783
15784 * nsselect.m (ns_get_local_selection): Remove unused variable type.
15785
15786 * nsmenu.m (ns_update_menubar): Make static.
15787 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
15788 (fillWithWidgetValue:): Add cast to SEL for setAction.
15789 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
15790 (update_frame_tool_bar): Update code for GNUstep.
15791 (clearAll): New method.
15792 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
15793 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
15794 Move identifierToItem setObject and activeIdentifiers addObject before
15795 call to insertItemWithItemIdentifier.
15796 (validateVisibleItems): Fix indentation.
15797 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
15798 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
15799 UtilityWindow to aStyle, remove call to setStyleMask.
15800
15801 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
15802
15803 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
15804 (ns_charset_covers, ns_get_covering_families, nsfont_open):
15805 Use F suffix on floats.
15806 (ns_char_width): Returns CGFloat.
15807 (ns_ascii_average_width): w is CGFloat instead of float.
15808 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
15809 DPSxshow.
15810 (ns_glyph_metrics): CGFloat instead of float.
15811
15812 * nsfns.m (x_set_foreground_color, x_set_background_color):
15813 Use EmacsCGFloat.
15814 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
15815 remove unused variables.
15816 (Fns_read_file_name): Keep track if panel is for save.
15817 Use ns_filename_from_panel/ns_directory_from_panel.
15818 (Fns_list_services): delegate only used for COCOA.
15819 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
15820 Just return the input if GNUstep.
15821 (x_screen_planes): Remove.
15822 (Fxw_color_values): Use EmacsCGFloat
15823 (Fns_display_monitor_attributes_list): Only get screen number for
15824 Cocoa.
15825 (getDirectory, getFilename): Remove from EmacsOpenPanel and
15826 EmacsSavePanel.
15827 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
15828 ns_directory_from_panel.
15829
15830 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
15831
15832 * process.c (handle_child_signal): Also use WCONTINUED.
15833 This is so that list-processes doesn't mistakenly list the process
15834 as stopped, when the process has actually been continued and is
15835 now running.
15836
15837 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
15838
15839 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
15840 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
15841 not already configured.
15842
15843 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
15844
15845 2013-05-29 Eli Zaretskii <eliz@gnu.org>
15846
15847 * Makefile.in (mostlyclean): Remove *.res files.
15848
15849 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
15850
15851 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
15852 a buffer (bug#8447).
15853
15854 2013-05-27 Eli Zaretskii <eliz@gnu.org>
15855
15856 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
15857 display vector, and we backtrack, handle the case that the
15858 previous character position is also displayed from a display
15859 vector or covered by a display string or image. (Bug#14476)
15860
15861 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
15862
15863 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15864 (struct MonitorInfo, free_monitors): Remove.
15865 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
15866 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
15867 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15868 Qframes, Qsource.
15869
15870 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15871 (struct MonitorInfo, free_monitors): Remove.
15872 (ns_screen_name): Make static.
15873 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
15874 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15875 Qframes, Qsource.
15876
15877 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15878 (struct MonitorInfo): New struct.
15879 (free_monitors, make_monitor_attribute_list): Declare.
15880
15881 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15882 New Lisp_Object:s.
15883 (free_monitors, make_monitor_attribute_list): New functions.
15884 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
15885 Qsource.
15886
15887 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
15888
15889 * callproc.c (call_process): Refine the doc string. (Bug#14045)
15890
15891 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
15892
15893 * keyboard.c: Apply keyboard decoding only to events that come directly
15894 from the tty, not from unread-command-events (bug#14368).
15895 (read_event_from_main_queue): New function, extracted from read_char.
15896 (read_decoded_char): Remove.
15897 (read_decoded_event_from_main_queue): New function to replace it.
15898 (read_char): Use it.
15899 (read_key_sequence): Use read_char rather than read_decoded_char.
15900
15901 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
15902
15903 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
15904
15905 * casetab.c (init_casetab_once): Fix last change (bug#14424).
15906
15907 2013-05-22 Kenichi Handa <handa@gnu.org>
15908
15909 The following changes are to fix the setting of
15910 buffer-file-coding-system on, for instance, C-x RET c unix RET
15911 _FILE_OF_DOS_EOL_TYPE_ RET.
15912
15913 * coding.h (struct coding_system): New member detected_utf8_chars.
15914
15915 * coding.c (detect_coding_utf_8): Count characters and check EOL
15916 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
15917 BOM is there.
15918 (setup_coding_system): Do not initialize coding->head_ascii.
15919 (check_ascii): Do not set coding->eol_seen but update it. Do not
15920 call adjust_coding_eol_type here.
15921 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
15922 If the eol-type of CODING is already specified, adjust the eol type
15923 of the found coding-system.
15924 (decode_coding_gap): Cancel previous change. Utilize the
15925 character numbers counted by detect_coding_utf_8. Fix detection
15926 of BOM for utf-8.
15927
15928 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
15929
15930 * search.c (looking_at_1): Only set last_thing_searched if the match
15931 changed the match-data (bug#14281).
15932
15933 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
15934
15935 * xdisp.c (reseat_at_previous_visible_line_start):
15936 Already declared in dispextern.h, so remove it here.
15937 (move_it_vertically_backward): Likewise.
15938
15939 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15940
15941 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
15942 (Fx_display_pixel_width, Fx_display_pixel_height)
15943 (Fx_display_mm_width, Fx_display_mm_height):
15944 Mention `display-monitor-attributes-list' in docstrings.
15945
15946 * nsfns.m (ns_get_screen): Remove function. All uses removed.
15947 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
15948 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
15949 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
15950 (Fx_display_backing_store, Fx_display_visual_class)
15951 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
15952 (Fx_display_grayscale_p, Fx_display_pixel_width)
15953 (Fx_display_pixel_height, Fx_display_planes)
15954 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
15955 (Fx_display_screens): Don't confuse X11 screens with NS screens.
15956 (Fx_display_mm_width, Fx_display_mm_height)
15957 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
15958 height for all physical monitors as in X11.
15959
15960 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
15961 Return pixel width or height for all physical monitors as in X11.
15962
15963 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
15964
15965 Port --enable-gcc-warnings to clang.
15966 * bytecode.c (exec_byte_code):
15967 * regex.c:
15968 Redo diagnostic pragmas to pacify clang, too.
15969 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
15970 * editfns.c (Fencode_time):
15971 * fileio.c (file_accessible_directory_p):
15972 * font.c (font_unparse_xlfd):
15973 Use '&"string"[index]' instead of '"string" + (index)'.
15974 * undo.c (user_error): Remove; unused.
15975
15976 2013-05-16 Eli Zaretskii <eliz@gnu.org>
15977
15978 * insdel.c (insert_1_both): Document the arguments, instead of
15979 referring to insert_1, which no longer exists.
15980
15981 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
15982 some window, increment windows_or_buffers_changed, so that
15983 *Messages* display in that window is updated. (Bug#14408)
15984
15985 * w32.c: Include epaths.h.
15986 (init_environment): Use cmdproxy.exe without leading directories.
15987 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
15988 case.
15989 (gettimeofday): Adjust signature and return value to Posix
15990 expectations.
15991
15992 * unexw32.c (open_output_file): Delete the existing emacs.exe
15993 before creating it, to break the hard link to the versioned
15994 executable.
15995
15996 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
15997 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
15998 (FIRSTFILE_OBJ): New variables.
15999 (W32_RES): Rename to EMACSRES. All users changed.
16000 (base_obj): Use $(CM_OBJ).
16001 (ALLOBJS): Use $(FIRSTFILE_OBJ).
16002 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
16003 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
16004 $(W32_RES_LINK) before $(LIBES).
16005 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
16006
16007 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
16008
16009 * makefile.w32-in (DOC): Use just "DOC".
16010
16011 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
16012
16013 * process.c: Export default filters and sentinels to Elisp.
16014 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
16015 New constants.
16016 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
16017 (Fset_process_sentinel, Fformat_network_address):
16018 Default to them instead of nil.
16019 (server_accept_connection): Sentinels can't be nil any more.
16020 (read_and_dispose_of_process_output): New function, extracted from
16021 read_process_output.
16022 (read_process_output): Use it; filters can't be nil.
16023 (Finternal_default_process_filter): New function, extracted from
16024 read_process_output.
16025 (exec_sentinel_unwind): Remove function.
16026 (exec_sentinel): Don't zilch sentinel while running.
16027 (status_notify): Sentinels can't be nil.
16028 (Finternal_default_process_sentinel): New function extracted from
16029 status_notify.
16030 (setup_process_coding_systems): Default filter is not nil any more.
16031 (syms_of_process): Export new Elisp functions and initialize
16032 new constants.
16033 * lisp.h (make_lisp_proc): New function.
16034
16035 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
16036
16037 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
16038
16039 2013-05-14 Eli Zaretskii <eliz@gnu.org>
16040
16041 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
16042 unless we know that the window w is a leaf window.
16043 Another attempt at solving bug#14062.
16044
16045 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
16046
16047 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
16048 fdesc (Bug#14375).
16049
16050 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
16051
16052 * image.c (gif_load): Check that subimages fit (Bug#14345).
16053
16054 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
16055
16056 * lread.c (skip_dyn_eof): New function.
16057 (read1): Use it to skip the end of a file in response to #@00.
16058
16059 * doc.c (get_doc_string): Slightly relax the sanity checking.
16060
16061 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
16062
16063 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
16064 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
16065 (MonitorInfo): New struct.
16066 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
16067 (Fns_display_monitor_attributes_list): New functions.
16068 (display-usable-bounds): Remove.
16069 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
16070 Qsource.
16071
16072 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
16073
16074 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
16075 (GTK_CHECK_VERSION): New macro, if not already defined.
16076 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
16077 replaced by GTK_CHECK_VERSION.
16078
16079 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
16080
16081 * xterm.h (GTK_PREREQ): New macro.
16082 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
16083 to use this macro instead, for consistency and clarity.
16084
16085 2013-05-08 Eli Zaretskii <eliz@gnu.org>
16086
16087 * xdisp.c (row_for_charpos_p): New function, with code of
16088 cursor_row_p, but accepts an additional argument CHARPOS instead
16089 of using a hardcoded PT.
16090 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
16091 (row_containing_pos): Call row_for_charpos_p instead of partially
16092 doing the same. Fixes cursor positioning under longlines-mode
16093 when longlines-show-effect includes more than one newline, when
16094 moving the cursor vertically up.
16095
16096 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
16097
16098 * makefile.w32-in (ACL_H): New macro.
16099 ($(BLD)/fileio.$(O)): Update dependencies.
16100
16101 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16102
16103 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
16104 * Makefile.in (LIB_ACL): New macro.
16105 (LIBACL_LIBS): Remove.
16106 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
16107 * fileio.c: Include <acl.h>.
16108 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
16109 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
16110 !acl_errno_valid.
16111 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
16112 it ourselves.
16113
16114 * unexelf.c: Don't assume ElfW (Half) fits in int.
16115 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
16116 when dealing with ElfW (Half) values, since they can exceed 2**31
16117 on 64-bit OpenBSD hosts. Reported by Han Boetes (privately).
16118 (entry_address): Omit unused NUM arg. All uses changed.
16119
16120 2013-05-07 Juri Linkov <juri@jurta.org>
16121
16122 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
16123 to the string converted from number with `Fnumber_to_string'.
16124 (Bug#14254)
16125
16126 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16127
16128 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
16129 This fixes a problem introduced by my previous change.
16130
16131 2013-05-07 Glenn Morris <rgm@gnu.org>
16132
16133 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
16134
16135 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
16136
16137 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
16138
16139 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16140
16141 Static checking by GCC 4.8.0.
16142 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
16143 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
16144 (x_get_monitor_attributes_fallback)
16145 (x_get_monitor_attributes_xinerama)
16146 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
16147 Define only if USE_GTK.
16148 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
16149 (x_get_monitor_attributes_fallback): Omit unused locals.
16150 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
16151 Use double, not float, to avoid mixed-mode floating point arithmetic.
16152
16153 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16154 Jan Djärv <jan.h.d@swipnet.se>
16155
16156 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
16157 (XINERAMA_CFLAGS): New macros.
16158 (ALL_CFLAGS, LIBES): Use them.
16159
16160 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
16161 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
16162 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
16163 (syms_of_xfns): DEFSYM them.
16164 (struct MonitorInfo): New struct.
16165 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
16166 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
16167 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
16168 (x_get_monitor_attributes_xinerama): New functions.
16169 (Fx_display_monitor_attributes_list): New primitive.
16170 (syms_of_xfns): Defsubr it.
16171
16172 * xterm.h (x_display_info): Add Xatom_net_workarea and
16173 Xatom_net_current_desktop.
16174
16175 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
16176 and dpyinfo->Xatom_net_current_desktop.
16177
16178 2013-05-06 Eli Zaretskii <eliz@gnu.org>
16179
16180 * xdisp.c (pos_visible_p): Use the special code for finding the
16181 beginning of a display property or overlay for any "replacing"
16182 display property, not just for display strings. This solves
16183 incorrect reporting of position by posn-at-point. (Bug#14241)
16184
16185 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
16186
16187 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
16188 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
16189 Verify that ElfW (Half) fits in int.
16190 (fatal): Use same signature as lisp.h.
16191 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
16192 configure and build with -DUNEXELF_DEBUG without worrying about
16193 other modules that use DEBUG.
16194 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
16195 possibly-wide integers now uses it instead of plain fprintf.
16196 (entry_address): New function, which avoids problems with 32-bit
16197 overflow on 64-bit hosts.
16198 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
16199 (round_up): Don't assume the remainder fits in int.
16200 (find_section): Use bool for boolean. Simplify debug code.
16201 (unexec): Don't assume file sizes fit in int or size_t.
16202 Omit unnecessary trailing newline in 'fatal' format.
16203 Use strerror rather than outputting decimal error number.
16204 Remove unused code when emacs is not defined;
16205 this file relies on Emacs now.
16206 Don't assume e_phnum and e_shnum are positive.
16207
16208 * regex.c: Fix problems when DEBUG is defined.
16209 (extract_number, extract_number_and_incr): Define regardless of
16210 whether DEBUG is defined; that's simpler and makes the code less
16211 likely to go stale in the normal case when DEBUG is not defined.
16212 Return int rather than taking an int * arg. All callers changed.
16213 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
16214 Remove, replacing with ...
16215 (DEBUG_PRINT): New macro. All callers changed.
16216 (DEBUG_COMPILES_ARGUMENTS): New macro.
16217 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
16218 (print_compiled_pattern, print_double_string) [DEBUG]:
16219 Use prototype rather than old-style definition.
16220 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
16221 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
16222 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
16223 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
16224 Don't assume ptrdiff_t, size_t, and long are the same width as int.
16225 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
16226 This matters only when DEBUG is defined.
16227
16228 2013-05-05 Eli Zaretskii <eliz@gnu.org>
16229
16230 * xdisp.c (set_iterator_to_next): Set the
16231 ignore_overlay_strings_at_pos_p flag only if we are _really_
16232 iterating over an overlay string, as indicated by the
16233 current.overlay_string_index member. (Bug#14306)
16234
16235 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
16236
16237 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
16238 to where it is used, to avoid autorelease issues (Bug#14050).
16239
16240 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
16241
16242 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
16243 * fileio.c (syms_of_fileio): Implement this.
16244 * filelock.c (create_lock_file): If symbolic links don't work, so
16245 we use a regular file as a lock file, do not fsync the lock file;
16246 it's not needed.
16247
16248 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
16249
16250 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
16251 (syms_of_minibuf): Adjust accodingly.
16252 * lread.c (Fread):
16253 * callint.c (Fcall_interactively): Adjust calls accordingly.
16254
16255 2013-05-04 Eli Zaretskii <eliz@gnu.org>
16256
16257 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
16258 w->contents is a buffer before computing everything else.
16259 Use parentheses to disambiguate last part of the condition.
16260
16261 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
16262 assertion violations. (Bug#14062)
16263
16264 2013-05-01 David Reitter <david.reitter@gmail.com>
16265
16266 * nsfns.m (ns_tooltip): Initialize.
16267
16268 2013-04-28 Eli Zaretskii <eliz@gnu.org>
16269
16270 * coding.c (decode_coding_gap): Don't remove the character before
16271 a newline unless it's a CR character. (Bug#14287)
16272
16273 2013-04-28 Dan Nicolaescu <dann@gnu.org>
16274
16275 * dispextern.h (struct face): Move enum face_underline_type
16276 earlier so that bitfields can be in the same word.
16277
16278 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
16279
16280 * nsfns.m (handlePanelKeys): New function.
16281 (EmacsOpenPanel:performKeyEquivalent:)
16282 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
16283 arrows/function/control and copy/paste keys (Bug#14296).
16284
16285 2013-04-27 Juri Linkov <juri@jurta.org>
16286
16287 * callint.c (Fcall_interactively): Call `Qread_number' for
16288 interactive code letter `n' instead of using duplicate code.
16289 (Bug#14254)
16290
16291 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
16292
16293 * systime.h (make_timeval): Declare as 'const'.
16294
16295 2013-04-27 Kenichi Handa <handa@gnu.org>
16296
16297 * font.c (font_open_entity): Always open a font of manageable
16298 size.
16299
16300 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
16301
16302 Port better to AIX (Bug#14258).
16303 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
16304 to pacify AIX xlc.
16305
16306 2013-04-24 Kenichi Handa <handa@gnu.org>
16307
16308 * coding.c (decode_coding_iso_2022): When an invalid escape
16309 sequence is encountered, reset the invocation and designation
16310 status to the safest one.
16311
16312 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
16313
16314 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
16315 Without this fix, "make distclean" leaves stamp-h1 behind.
16316
16317 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
16318
16319 * w32fns.c (w32_fullscreen_rect): New function to compute the
16320 window rectangle for the given fullscreen mode.
16321 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
16322 longer tunes the window size. This keeps the window's edges flush
16323 with the screen and allows the taskbar to hide itself in fullboth.
16324
16325 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
16326 window decorations and uses the entire screen.
16327
16328 * w32term.h (w32_fullscreen_rect) Add prototype.
16329 (struct w32_output): Replace normal_width, normal_height,
16330 normal_top, and normal_left members with a single normal_placement
16331 struct.
16332 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
16333 Remove macros.
16334 (FRAME_NORMAL_PLACEMENT): New macro.
16335
16336 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
16337
16338 * minibuf.c (Ftest_completion): Silence compiler warning.
16339
16340 2013-04-15 Eli Zaretskii <eliz@gnu.org>
16341
16342 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
16343 bug#14062.
16344
16345 * frame.h (WINDOW_FRAME): Protect macro and its argument with
16346 parentheses.
16347
16348 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
16349 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
16350 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
16351 parentheses where appropriate.
16352
16353 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
16354
16355 * keyboard.c (timer_start_idle): Remove no-longer-used local.
16356
16357 2013-04-14 Eli Zaretskii <eliz@gnu.org>
16358
16359 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
16360 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
16361 Mention in the doc string that setting these variables takes
16362 effect only after a call to set-window-buffer. (Bug#14200)
16363
16364 2013-04-13 Eli Zaretskii <eliz@gnu.org>
16365
16366 * indent.c (Fvertical_motion): Don't consider display strings on
16367 overlay strings as display strings on the buffer position we
16368 started from. This prevents vertical cursor motion from jumping
16369 more than one line when there's an overlay string with a display
16370 property at end of line.
16371 Reported by Karl Chen <Karl.Chen@quarl.org> in
16372 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
16373
16374 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
16375
16376 * window.c (select_window): `record_buffer' even if window is
16377 already selected (bug#14191).
16378
16379 2013-04-11 Eli Zaretskii <eliz@gnu.org>
16380
16381 * window.c (Fwindow_end): Test more flags, including the buffer's
16382 last_overlay_modified flag, to determine whether the window's
16383 display is really up-to-date. Prevents the function from
16384 returning a stale value. (Bug#14170)
16385 (Fwindow_line_height): Fix the test for up-to-date-ness of the
16386 current matrix.
16387
16388 2013-04-10 Eli Zaretskii <eliz@gnu.org>
16389
16390 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
16391 garbaged only if it is not already the top frame on its TTY.
16392 This prevents flickering due to constant redrawing of TTY frames when
16393 there are GUI frames open in the same session. (Bug#13864)
16394
16395 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
16396
16397 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
16398 of marking the idle timers directly.
16399
16400 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
16401
16402 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
16403 tables (bug#14054).
16404
16405 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
16406
16407 * window.c (select_window): Don't record_buffer while the invariant is
16408 temporarily broken (bug#14161).
16409
16410 * fns.c (Fdelq): Don't assume !NILP => CONSP.
16411
16412 2013-04-07 Eli Zaretskii <eliz@gnu.org>
16413
16414 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
16415
16416 2013-04-07 Romain Francoise <romain@orebokech.com>
16417
16418 Ignore additional platform-specific ACL errors (Bug#13702).
16419 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
16420 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
16421
16422 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
16423
16424 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
16425 f->output_data.ns.
16426
16427 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
16428
16429 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
16430 This bug was introduced by my 2013-02-25 change that simplified
16431 data_start configuration. Without this change, on GNU/Linux
16432 an Emacs configured with --enable-profiling fails immediately
16433 due to a profiler signal.
16434 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
16435 with these flags. On platforms where special flags are needed
16436 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
16437 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
16438 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
16439
16440 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
16441
16442 Get rid of some platform-specific functions examining window
16443 system and its capabilities. This is a partial rework of the
16444 2013-04-05 change.
16445 * lisp.h (have_menus_p): Remove prototype. This function is
16446 replaced with platform-independent window_system_available.
16447 (check_window_system): Move to...
16448 * frame.h (decode_window_system_frame, window_system_available):
16449 ...here, add new prototypes.
16450 * frame.c (window_system_available, decode_window_system_frame):
16451 New functions.
16452 (check_window_system): Platform-independent now.
16453 * xterm.h (x_in_use): Remove declaration.
16454 (check_x_frame):
16455 * w32term.h (check_x_frame):
16456 * nsterm.h (check_x_frame): Remove prototypes. This function
16457 is replaced with platform-independent decode_window_system_frame.
16458 * msdos.c (have_menus_p): Remove.
16459 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
16460 Remove platform-specific functions. Use check_window_system,
16461 decode_window_system_frame and check_ns_display_info where
16462 appropriate. Minor style and comment tweaks.
16463 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
16464 (check_x_frame): Likewise.
16465 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
16466 Likewise.
16467 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
16468 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
16469 * xmenu.c, xselect.c: All related users changed.
16470
16471 2013-04-03 Kenichi Handa <handa@gnu.org>
16472
16473 The following changes is to optimize the code for reading UTF-8
16474 files.
16475
16476 * coding.c (check_ascii): Rename from detect_ascii. Return value
16477 changed. Check EOL format. Do not call adjust_coding_eol_type
16478 here.
16479 (check_utf_8): New function.
16480 (adjust_coding_eol_type): Do nothing if already adjusted.
16481 (detect_coding): Compare the return value of check_ascii with
16482 coding->src_bytes. Call adjust_coding_eol_type if necessary.
16483 (decode_coding_gap): Optimize for valid UTF-8.
16484
16485 2013-03-21 Kenichi Handa <handa@gnu.org>
16486
16487 * coding.c (syms_of_coding): Cancel previous change.
16488
16489 * insdel.c (insert_from_gap): Fix previous change.
16490
16491 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
16492
16493 Consistently use platform-specific function to detect window system.
16494 * lisp.h (check_window_system): New prototype. This function is
16495 going to replace check_x, check_w32 and check_ns.
16496 (have_menus_p): Mention msdos.c in comment.
16497 * fontset.c (check_window_system_func): Remove. Adjust all users.
16498 * fontset.h (check_window_system_func): Remove prototype.
16499 * nsterm.h (check_ns):
16500 * xterm.h (check_x):
16501 * w32term.h (check_w32): Likewise.
16502 * menu.c (Fx_popup_menu): Use check_window_system.
16503 * msdos.c (check_window_system): Define for MS-DOS.
16504 * nsfns.m (check_window_system): Define for NS. Adjust all users.
16505 * w32fns.c (check_window_system): Likewise for MS-Windows.
16506 * xfns.c (check_window_system): Likewise for X.
16507 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
16508 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
16509
16510 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
16511
16512 Prefer < to > in range checks such as 0 <= i && i < N.
16513 This makes it easier to visualize quantities on a number line.
16514 This patch doesn't apply to all such range checks,
16515 only to the range checks affected by the 2013-03-24 change.
16516 This patch reverts most of the 2013-03-24 change.
16517 * alloc.c (xpalloc, Fgarbage_collect):
16518 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
16519 * character.c (string_escape_byte8):
16520 * charset.c (read_hex):
16521 * data.c (cons_to_unsigned):
16522 * dispnew.c (update_frame_1):
16523 * doc.c (Fsubstitute_command_keys):
16524 * doprnt.c (doprnt):
16525 * editfns.c (hi_time, decode_time_components):
16526 * fileio.c (file_offset):
16527 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16528 * font.c (font_intern_prop):
16529 * frame.c (x_set_alpha):
16530 * gtkutil.c (get_utf8_string):
16531 * indent.c (check_display_width):
16532 * keymap.c (Fkey_description):
16533 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
16534 * lread.c (read1):
16535 * minibuf.c (read_minibuf_noninteractive):
16536 * process.c (wait_reading_process_output):
16537 * search.c (Freplace_match):
16538 * window.c (get_phys_cursor_glyph):
16539 * xdisp.c (redisplay_internal):
16540 * xsmfns.c (smc_save_yourself_CB):
16541 Prefer < to > for range checks.
16542 * dispnew.c (sit_for): Don't mishandle NaNs.
16543 This fixes a bug introduced in the 2013-03-24 change.
16544 * editfns.c (decode_time_components): Don't hoist comparison.
16545 This fixes another bug introduced in the 2013-03-24 change.
16546
16547 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
16548
16549 * frame.h (struct frame): Drop scroll_bottom_vpos
16550 member becaue all real users are dead long ago.
16551 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
16552 * xdisp.c (redisplay_internal): Adjust user.
16553
16554 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
16555
16556 * nsmenu.m (showAtX:Y:for:): setLevel to
16557 NSPopUpMenuWindowLevel (Bug#13998).
16558
16559 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
16560
16561 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
16562 (ns_check_pending_open_menu): Declare.
16563
16564 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
16565 (x_activate_menubar): Update the menu with title that matches
16566 ns_get_pending_menu_title, and call
16567 ns_check_pending_openmenu (Bug#12698).
16568 (menuWillOpen:): New method.
16569 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
16570
16571 * nsterm.m (menu_will_open_state, menu_mouse_point)
16572 (menu_pending_title): New varaibles.
16573 (ns_get_pending_menu_title, ns_check_menu_open)
16574 (ns_check_pending_open_menu): New functions.
16575
16576 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
16577
16578 * indent.c (current_column_bol_cache): Remove leftover which is not
16579 used in Fmove_to_column any more.
16580 (current_column, scan_for_column): Adjust users.
16581 * keyboard.c (last_point_position_buffer, last_point_position_window):
16582 Remove leftovers which are not used for recording undo any more.
16583 (command_loop_1, syms_of_keyboard): Adjust users.
16584 * xdisp.c (last_max_ascent): Remove leftover which is not used in
16585 redisplay_window any more.
16586 (move_it_to): Adjust user.
16587
16588 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
16589
16590 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
16591 Update dependencies.
16592
16593 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16594
16595 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
16596 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
16597 forward references.
16598
16599 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16600
16601 * window.h (struct window): Replace hchild, vchild and buffer slots
16602 with a single slot 'contents'. This is possible because each valid
16603 window may have either the child window (in vertical or horizontal
16604 combination) or buffer to display (for the leaf window). Using that,
16605 a lot of operations to traverse and/or change window hierarchies may
16606 be simplified. New member horizontal is used to distinguish between
16607 horizontal and vertical combinations of internal windows.
16608 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
16609 (WINDOW_VERTICAL_COMBINATION_P): New macros.
16610 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
16611 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
16612 Use contents slot, not buffer, where appropriate.
16613 (wset_combination): New function.
16614 (wset_buffer): Add eassert.
16615 (Fframe_first_window): Simplify the loop reaching first window.
16616 (Fwindow_buffer): Use WINDOW_LEAF_P.
16617 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
16618 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
16619 (unshow_buffer): Convert initial debugging check to eassert.
16620 (replace_window, recombine_windows, Fdelete_other_windows_internal)
16621 (make_parent_window, window_resize_check, window_resize_apply)
16622 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
16623 (Fset_window_configuration, delete_all_child_windows, save_window_save):
16624 Adjust to match struct window changes.
16625 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
16626 (mark_window_cursors_off, count_windows, get_leaf_windows)
16627 (foreach_window_1): Simplify the loop.
16628 * alloc.c (mark_object): Do not check for the leaf window because
16629 internal windows has no glyph matrices anyway.
16630 * dispnew.c (clear_window_matrices, showing_window_margins_p)
16631 (allocate_matrices_for_window_redisplay, fake_current_matrices)
16632 (allocate_matrices_for_frame_redisplay, free_window_matrices)
16633 (build_frame_matrix_from_window_tree, mirror_make_current)
16634 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
16635 (update_window_tree, set_window_update_flags): Simplify the loop.
16636 (sync_window_with_frame_matrix_rows): Enforce live window.
16637 Use contents slot, not buffer, where appropriate.
16638 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
16639 and WINDOW_HORIZONTAL_COMBINATION_P.
16640 (make_frame_visible_1): Simplify the loop.
16641 Use contents slot, not buffer, where appropriate.
16642 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
16643 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
16644 (expose_window_tree): Likewise.
16645 Use contents slot, not buffer, where appropriate.
16646 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
16647 to avoid deleted windows. Use contents slot instead of buffer.
16648 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
16649 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
16650 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
16651 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
16652
16653 2013-03-28 Eli Zaretskii <eliz@gnu.org>
16654
16655 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
16656 identify the reasons for assertion violations in bug#14062 and
16657 similar ones.
16658 (Fx_show_tip): Fix compilation error under
16659 "--enable-check-lisp-object-type". (Bug#14073)
16660
16661 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
16662 Reported by <rzl24ozi@gmail.com>.
16663
16664 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16665
16666 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
16667 start marker...
16668 (unwind_with_echo_area_buffer): ...to restore it here.
16669 This is needed to ensure that...
16670 (redisplay_window): ...both window markers are valid here,
16671 which is verified by eassert.
16672 * editfns.c (save_excursion_save): Do not assume that
16673 selected_window always displays the buffer.
16674 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
16675 Fix comment.
16676
16677 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
16678
16679 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
16680 the upcase table.
16681
16682 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
16683
16684 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
16685
16686 2013-03-27 Eli Zaretskii <eliz@gnu.org>
16687
16688 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
16689 since MinGW's w32api headers do. This avoids compiler warnings.
16690
16691 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
16692 if already defined.
16693
16694 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16695
16696 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
16697
16698 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
16699
16700 * gtkutil.c (style_changed_cb): Check if frame is live and an
16701 X frame (Bug#14038).
16702
16703 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16704
16705 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
16706 Define only for _WIN32_WINNT less than 0x0500.
16707 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
16708 MinGW64.
16709 Move inclusion of time.h before sys/time.h, so that MinGW64 could
16710 see its own definitions of 'struct timeval' and 'struct timezone'.
16711
16712 Fix incompatibilities between MinGW.org and MinGW64 headers.
16713 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
16714
16715 * w32.c (REPARSE_DATA_BUFFER): Guard with
16716 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
16717
16718 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
16719
16720 * xterm.c: Include X11/XKBlib.h
16721 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
16722
16723 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
16724
16725 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
16726 written backwards.
16727 * blockinput.h (input_blocked_p): Likewise.
16728 * bytecode.c (exec_byte_code): Likewise.
16729 * callproc.c (call_process_kill, call_process_cleanup)
16730 (Fcall_process): Likewise.
16731 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
16732 (Fccl_execute_on_string): Likewise.
16733 * character.c (string_escape_byte8): Likewise.
16734 * charset.c (read_hex): Likewise.
16735 * cm.c (calccost): Likewise.
16736 * data.c (cons_to_unsigned): Likewise.
16737 * dired.c (directory_files_internal, file_name_completion):
16738 Likewise.
16739 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
16740 (sit_for): Likewise.
16741 * doc.c (Fsubstitute_command_keys): Likewise.
16742 * doprnt.c (doprnt): Likewise.
16743 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
16744 * emacsgtkfixed.c: Likewise.
16745 * fileio.c (file_offset, Fwrite_region): Likewise.
16746 * floatfns.c (Fexpt, fmod_float): Likewise.
16747 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16748 Likewise.
16749 * font.c (font_intern_prop): Likewise.
16750 * frame.c (x_set_alpha): Likewise.
16751 * gtkutil.c (get_utf8_string): Likewise.
16752 * indent.c (check_display_width): Likewise.
16753 * intervals.c (create_root_interval, rotate_right, rotate_left)
16754 (split_interval_right, split_interval_left)
16755 (adjust_intervals_for_insertion, delete_node)
16756 (interval_deletion_adjustment, adjust_intervals_for_deletion)
16757 (merge_interval_right, merge_interval_left, copy_intervals)
16758 (set_intervals_multibyte_1): Likewise.
16759 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
16760 * keymap.c (Fkey_description): Likewise.
16761 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
16762 * lread.c (openp, read_integer, read1, string_to_number):
16763 Likewise.
16764 * menu.c (ensure_menu_items): Likewise.
16765 * minibuf.c (read_minibuf_noninteractive): Likewise.
16766 * print.c (printchar, strout): Likewise.
16767 * process.c (create_process, Faccept_process_output)
16768 (wait_reading_process_output, read_process_output, send_process)
16769 (wait_reading_process_output): Likewise.
16770 * profiler.c (make_log, handle_profiler_signal): Likewise.
16771 * regex.c (re_exec): Likewise.
16772 * regex.h: Likewise.
16773 * search.c (looking_at_1, Freplace_match): Likewise.
16774 * sysdep.c (get_child_status, procfs_ttyname)
16775 (procfs_get_total_memory): Likewise.
16776 * systime.h (EMACS_TIME_VALID_P): Likewise.
16777 * term.c (dissociate_if_controlling_tty): Likewise.
16778 * window.c (get_phys_cursor_glyph): Likewise.
16779 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
16780 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
16781 Likewise.
16782 * xfns.c (Fx_window_property): Likewise.
16783 * xmenu.c (set_frame_menubar): Likewise.
16784 * xselect.c (x_get_window_property, x_handle_dnd_message):
16785 Likewise.
16786 * xsmfns.c (smc_save_yourself_CB): Likewise.
16787 * xterm.c (x_scroll_bar_set_handle): Likewise.
16788
16789 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
16790
16791 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
16792 to be optional or nil. Adjust comment and convert it to docstring.
16793 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
16794 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
16795
16796 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
16797
16798 Static checking by GCC 4.8-20130319.
16799 * image.c (gif_load): Assume pass < 3 to pacify GCC.
16800 * process.c (Fset_process_datagram_address)
16801 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
16802 * xdisp.c (get_char_face_and_encoding)
16803 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
16804 (get_glyph_face_and_encoding): Prepare face before possibly using it.
16805 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
16806
16807 2013-03-24 Ken Brown <kbrown@cornell.edu>
16808
16809 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
16810 fix compilation on 64-bit Cygwin, where underscores are not
16811 automatically prepended.
16812
16813 * w32term.c (w32_initialize): Silence compiler warning.
16814
16815 2013-03-23 Eli Zaretskii <eliz@gnu.org>
16816
16817 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
16818 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
16819 variables, to save and restore frame dimensions.
16820 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
16821 after returning from a 'fullscreen' configuration.
16822 use SendMessage instead of PostMessage to send the SC_RESTORE message,
16823 to avoid races between the main thread and the input thread.
16824
16825 * w32term.h (struct w32_output): New members normal_width,
16826 normal_height, normal_top, normal_left, and prev_fsmode.
16827 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
16828 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
16829 members of a frame.
16830
16831 * w32term.c (w32fullscreen_hook): Record last value of the frame's
16832 'fullscreen' parameter. Always record previous width and height
16833 of the frame, except when switching out of maximized modes, so
16834 that they could be restored correctly, instead of resetting to the
16835 default frame dimensions. Send SC_RESTORE command to the frame,
16836 unless we are going to send SC_MAXIMIZE, to restore the frame
16837 resize hints in the mouse pointer shown by the window manager.
16838 (Bug#14032)
16839
16840 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
16841
16842 * lisp.h (get_frame_param): Adjust conditions for prototype
16843 declaration.
16844
16845 2013-03-22 Ken Brown <kbrown@cornell.edu>
16846
16847 * unexcw.c: Drop unneeded inclusion of w32common.h.
16848 (report_sheap_usage): Declare.
16849 (read_exe_header): Add magic numbers for x86_64.
16850 (fixup_executable): Fix printf format specifier for unsigned long
16851 argument.
16852
16853 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
16854
16855 * frame.h (struct frame): Put menu_bar_window under #ifdef
16856 because this member is not needed when X toolkit is in use.
16857 (fset_menu_bar_window):
16858 * dispnew.c (clear_current_matrices, clear_desired_matrices)
16859 (free_glyphs, update_frame):
16860 * xdisp.c (expose_frame): Likewise.
16861 (display_menu_bar): Likewise. Remove redundant eassert.
16862 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
16863 toolkit is in use.
16864
16865 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
16866
16867 Use functions and constants to manipulate Lisp_Save_Value objects.
16868 This replaces code that used macros and strings and token-pasting.
16869 The change makes the C source a bit easier to follow,
16870 and shrinks the Emacs executable a bit.
16871 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
16872 (make_save_value): Change 1st arg from string to enum. All callers
16873 changed.
16874 (INTX): Remove.
16875 (mark_object): Use if, not #if, for GC_MARK_STACK.
16876 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
16877 (XSAVE_OBJECT): Now functions, not macros.
16878 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
16879 the constant was never used.
16880 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
16881 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
16882 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
16883 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
16884 New constants.
16885 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
16886 type3 with a single member save_type. All uses changed.
16887 (save_type, set_save_pointer, set_save_integer): New functions.
16888 * print.c (PRINTX): Remove.
16889
16890 * alloc.c: Remove redundant static declarations.
16891
16892 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16893
16894 * window.h (struct window): Convert left_col, top_line, total_lines
16895 and total_cols from Lisp_Objects to integers. Adjust comments.
16896 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
16897 Remove.
16898 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
16899 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
16900 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
16901 Adjust users where appropriate.
16902
16903 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16904
16905 * frame.h (struct frame): Drop resx and resy because the same data is
16906 available from window system-specific output context. Adjust users.
16907 (default_pixels_per_inch_x, default_pixels_per_inch_y):
16908 New functions to provide defaults when no window system available.
16909 (FRAME_RES_X, FRAME_RES_Y): New macros.
16910 (NUMVAL): Move from xdisp.c.
16911 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
16912 (Ffont_face_attributes, Fopen_font):
16913 * image.c (gs_load):
16914 * w32font.c (fill_in_logfont):
16915 * xdisp.c (calc_pixel_width_or_height):
16916 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
16917 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
16918
16919 2013-03-20 Kenichi Handa <handa@gnu.org>
16920
16921 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
16922 to 1 (temporary workaround until a bug related to ASCII
16923 optimization is fixed).
16924
16925 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
16926
16927 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
16928 Signal error if window is not internal. Adjust docstring.
16929 (delete_all_child_windows): Use combination_limit to save the buffer.
16930 (Fset_window_configuration): Adjust accordingly.
16931 * print.c (syms_of_print): Initialize debugging output not here...
16932 (init_print_once): ...but in a new function here.
16933 * lisp.h (init_print_once): Add prototype.
16934 * emacs.c (main): Add call to init_print_once. Adjust comments.
16935
16936 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
16937
16938 * window.c (window_resize_check, window_resize_apply)
16939 (window_from_coordinates, recombine_windows, set_window_buffer)
16940 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
16941 (Fsplit_window_internal, Fdelete_window_internal)
16942 (freeze_window_starts): Use bool for booleans.
16943 * window.h (window_frame_coordinates, resize_frame_windows)
16944 (freeze_window_starts, set_window_buffer): Adjust prototypes.
16945
16946 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
16947
16948 * dispnew.c (bitch_at_user): Use `user-error'.
16949
16950 2013-03-17 Ken Brown <kbrown@cornell.edu>
16951
16952 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
16953 as return type of image_background. (Bug#13981)
16954 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
16955
16956 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
16957
16958 * nsterm.m (updateFrameSize:): Change resize increments if needed.
16959 (ns_select): Don't return with result uninitialized.
16960
16961 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
16962 and getDirectory.
16963
16964 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
16965 New functions.
16966 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
16967 directories. If filename is nil, get directory name (Bug#13932).
16968 Use getFilename and getDirectory.
16969 (getFilename, getDirectory): New methods for EmacsSavePanel and
16970 EmacsOpenPanel.
16971 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
16972
16973 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
16974
16975 * coding.c (decode_coding_gap): Fix typo caught by static checking.
16976
16977 2013-03-15 Kenichi Handa <handa@gnu.org>
16978
16979 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
16980 (adjust_after_replace): Make it back to static. Delete the third
16981 arg text_at_gap_tail. Cancel the code for handling it.
16982
16983 * coding.h (struct coding_system): New member eol_seen.
16984
16985 * coding.c (detect_ascii): New function.
16986 (detect_coding): Set coding->head_ascii and coding->eol_seen only
16987 when the source bytes are actually scanned. On detecting for
16988 coding_category_utf_8_auto, call detect_ascii instead of scanning
16989 source bytes directly.
16990 (produce_chars): Call insert_from_gap with the new arg 0.
16991 (encode_coding): Likewise.
16992 (decode_coding_gap): Control ASCII optimization by the variable
16993 disable_ascii_optimization instead of #ifndef .. #endif.
16994 Deccode EOL format according to coding->eol_seen.
16995 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
16996 variable.
16997
16998 * lisp.h (adjust_after_replace): Cancel externing it.
16999 (insert_from_gap): Adjust prototype.
17000
17001 2013-03-15 Eli Zaretskii <eliz@gnu.org>
17002
17003 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
17004 FULLSCREEN_MAXIMIZED. (Bug#13935)
17005
17006 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
17007
17008 * region-cache.c (find_cache_boundary, move_cache_gap)
17009 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
17010 Simplify debugging check and convert to eassert. Adjust comment.
17011 (pp_cache): Put under ENABLE_CHECKING.
17012
17013 2013-03-14 Eli Zaretskii <eliz@gnu.org>
17014
17015 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
17016 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
17017 and WM_ACTIVATEAPP.
17018 (w32fullscreen_hook): If the frame is visible, reset
17019 f->want_fullscreen flag after changing the frame size. If the
17020 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
17021 (Bug#13953)
17022
17023 2013-03-13 Daniel Colascione <dancol@dancol.org>
17024
17025 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
17026 too so that these builds can use Cygwin's file conversion
17027 functions. (We've been building and linking cygw32.o all along
17028 and just not using it.)
17029
17030 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
17031
17032 File synchronization fixes (Bug#13944).
17033 * Makefile.in (LIB_FDATASYNC): New macro.
17034 (LIBES): Use it.
17035 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
17036 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
17037 Don't worry about HAVE_FSYNC, since a substitute fsync is
17038 available if the system lacks one.
17039 (Fwrite_regin): Retry fsync if interrupted.
17040
17041 2013-03-13 Eli Zaretskii <eliz@gnu.org>
17042
17043 * w32term.c (w32_read_socket): If the Emacs frame is being
17044 activated, call w32fullscreen_hook, to make sure the new frame
17045 dimensions are in effect. (Bug#13937)
17046
17047 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
17048
17049 * xdisp.c (init_iterator): Simplify because both character and byte
17050 positions are either specified or -1. Add eassert. Adjust comment.
17051 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
17052 character and byte positions can be obtained from marker.
17053
17054 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
17055
17056 Static checking by Sun C 5.12.
17057 * alloc.c (buffer_memory_full) [REL_ALLOC]:
17058 * bytecode.c (exec_byte_code):
17059 * dispnew.c (init_display):
17060 * eval.c (error):
17061 * fileio.c (Fsubstitute_in_file_name):
17062 * keyboard.c (Fevent_convert_list):
17063 * keymap.c (Fsingle_key_description):
17064 * term.c (maybe_fatal, fatal):
17065 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
17066 * xsmfns.c (Fhandle_save_session):
17067 Omit unreachable code.
17068 * keymap.c (map_keymap_char_table_item): Cast void * to
17069 a function pointer type; the C Standard requires this.
17070
17071 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
17072 Include <sys/param.h> unconditionally, as that works elsewhere and
17073 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
17074 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
17075 and FreeBSD now.
17076
17077 See ChangeLog.12 for earlier changes.
17078
17079 ;; Local Variables:
17080 ;; coding: utf-8
17081 ;; End:
17082
17083 Copyright (C) 2011-2015 Free Software Foundation, Inc.
17084
17085 This file is part of GNU Emacs.
17086
17087 GNU Emacs is free software: you can redistribute it and/or modify
17088 it under the terms of the GNU General Public License as published by
17089 the Free Software Foundation, either version 3 of the License, or
17090 (at your option) any later version.
17091
17092 GNU Emacs is distributed in the hope that it will be useful,
17093 but WITHOUT ANY WARRANTY; without even the implied warranty of
17094 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17095 GNU General Public License for more details.
17096
17097 You should have received a copy of the GNU General Public License
17098 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.