]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Merge from origin/emacs-24
[gnu-emacs] / src / ChangeLog
1 2015-01-05 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (move_it_to, try_cursor_movement): Don't use the window
4 end information if the window_end_valid flag is unset.
5 (try_window_id): If the call to display_line invalidated the
6 window end information, give up the try_window_id optimization.
7 (Bug#19511)
8
9 2015-01-04 Eli Zaretskii <eliz@gnu.org>
10
11 * w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix.
12
13 * xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.
14
15 * emacs.c (syms_of_emacs) <system-configuration>: Doc fix.
16 (Bug#19502)
17
18 2015-01-27 Paul Eggert <eggert@cs.ucla.edu>
19
20 Use bool for boolean in xfaces.c
21 * dispextern.h: Adjust to signature changes.
22 * font.c (font_at, font_range):
23 * fontset.c (Finternal_char_font):
24 * fringe.c (draw_fringe_bitmap_1):
25 * xdisp.c (handle_face_prop, face_before_or_after_it_pos)
26 (get_next_display_element, highlight_trailing_whitespace)
27 (display_string, calc_line_height_property)
28 (note_mode_line_or_margin_highlight, note_mouse_highlight):
29 * xfaces.c (tty_suppress_bold_inverse_default_colors_p)
30 (menu_face_changed_default, recompute_basic_faces)
31 (Fbitmap_spec_p, parse_rgb_list, tty_lookup_color)
32 (tty_defined_color, defined_color, face_color_gray_p)
33 (face_color_supported_p, load_color2, load_face_colors)
34 (Fx_list_fonts, LFACEP, push_named_merge_point)
35 (resolve_face_name, lface_from_face_name_no_resolve)
36 (lface_from_face_name, get_lface_attributes_no_remap)
37 (get_lface_attributes, lface_fully_specified_p)
38 (set_lface_from_font, merge_face_vectors, merge_named_face)
39 (merge_face_ref, Finternal_make_lisp_face)
40 (Finternal_lisp_face_p, Finternal_copy_lisp_face)
41 (Finternal_set_lisp_face_attribute)
42 (update_face_from_frame_parameter, set_font_frame_param)
43 (face_boolean_x_resource_value)
44 (Finternal_set_lisp_face_attribute_from_resource)
45 (x_update_menu_appearance, Finternal_get_lisp_face_attribute)
46 (Finternal_merge_in_global_face, Fface_font, face_attr_equal_p)
47 (lface_equal_p, Finternal_lisp_face_equal_p)
48 (Finternal_lisp_face_empty_p, lface_same_font_attributes_p)
49 (Fcolor_distance, lookup_named_face, lookup_basic_face)
50 (lookup_derived_face, Fface_attributes_as_vector)
51 (x_supports_face_attributes_p, tty_supports_face_attributes_p)
52 (Fdisplay_supports_face_attributes_p, realize_basic_faces)
53 (realize_default_face, realize_named_face)
54 (realize_non_ascii_face, realize_x_face, map_tty_color)
55 (realize_tty_face, compute_char_face, face_at_buffer_position)
56 (face_for_overlay_string, face_at_string_position):
57 Use bool for boolean.
58 * xfaces.c (set_lface_from_font):
59 Return void, since callers never use the result.
60
61 2015-01-26 Andreas Schwab <schwab@linux-m68k.org>
62
63 * image.c (lookup_pixel_color): Reorder conditions that are
64 written backwards.
65 (x_to_xcolors): Likewise.
66 (x_detect_edges): Likewise.
67 (png_load_body): Likewise.
68 (gif_close): Likewise.
69 (gif_load): Likewise.
70
71 2015-01-25 Eli Zaretskii <eliz@gnu.org>
72
73 Use bool for boolean in w32term.c
74 * w32term.c (x_update_window_begin, x_update_window_end)
75 (x_update_end, x_after_update_window_line)
76 (x_set_glyph_string_gc, x_draw_glyph_string_background)
77 (x_draw_glyph_string_foreground)
78 (x_draw_composite_glyph_string_foreground)
79 (x_draw_glyphless_glyph_string_foreground)
80 (x_draw_image_glyph_string, x_draw_glyph_string)
81 (x_draw_stretch_glyph_string, note_mouse_movement)
82 (w32_mouse_position, x_scroll_bar_report_motion)
83 (x_horizontal_scroll_bar_report_motion, w32_read_socket)
84 (w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
85 (w32_draw_window_cursor, x_new_font, x_set_offset)
86 (x_set_window_size, x_make_frame_invisible, x_iconify_frame): Use
87 bool where appropriate.
88
89 Use bool for boolean in w32fns.c
90 * w32fns.c (w32_defined_color, x_decode_color)
91 (Fxw_color_defined_p, Fxw_color_values, x_set_icon_type)
92 (x_set_menu_bar_lines, x_change_tool_bar_height)
93 (x_set_internal_border_width, x_explicitly_set_name)
94 (x_implicitly_set_name, Fx_create_frame, w32_window)
95 (x_create_tip_frame, Fx_show_tip): Use bool where appropriate.
96
97 2015-01-25 Paul Eggert <eggert@cs.ucla.edu>
98
99 Use bool for boolean in xfns.c
100 * xfaces.c (x_update_menu_appearance):
101 * xfns.c (x_real_positions, x_defined_color, x_decode_color)
102 (xg_set_icon, xg_set_icon_from_xpm_data, x_set_cursor_color)
103 (x_set_icon_type, x_set_icon_name, x_set_menu_bar_lines)
104 (x_change_tool_bar_height, x_set_internal_border_width)
105 (x_encode_text, x_set_name_internal, x_explicitly_set_name)
106 (x_implicitly_set_name, x_default_scroll_bar_color_parameter)
107 (hack_wm_protocols, xic_create_fontsetname, xic_free_xfontset)
108 (x_window, x_icon, Fx_wm_set_size_hint, Fx_create_frame)
109 (Fxw_color_defined_p, Fxw_color_values, x_create_tip_frame)
110 (Fx_show_tip, clean_up_file_dialog, Fx_file_dialog)
111 (clean_up_dialog, syms_of_xfns):
112 * xterm.h (xg_set_icon, xg_set_icon_from_xpm_data)
113 (xic_create_fontsetname):
114 Use bool for boolean.
115 * xfns.c: Include bitmaps/gray.xbm unconditionally.
116
117 Count MANY function args more reliably
118 * alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
119 * buffer.c (Fbuffer_list, Fkill_buffer):
120 * callint.c (read_file_name, Fcall_interactively):
121 * charset.c (Fset_charset_priority, syms_of_charset):
122 * chartab.c (uniprop_encode_value_numeric):
123 * coding.c (syms_of_coding):
124 * composite.c (syms_of_composite):
125 * data.c (wrong_range):
126 * dbusbind.c (syms_of_dbusbind):
127 * dired.c (file_attributes):
128 * editfns.c (Fdecode_time, update_buffer_properties, format2):
129 * eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
130 (call4, call5, call6, call7):
131 * fileio.c (Finsert_file_contents, choose_write_coding_system)
132 (Fcar_less_than_car, build_annotations, auto_save_error):
133 * filelock.c (get_boot_time):
134 * fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
135 (maybe_resize_hash_table, secure_hash):
136 * font.c (font_style_to_value, font_open_by_name, Flist_fonts):
137 * fontset.c (fontset_add, Fset_fontset_font):
138 * ftfont.c (ftfont_lookup_cache):
139 * gtkutil.c (xg_get_font):
140 * insdel.c (signal_before_change, signal_after_change):
141 * keymap.c (append_key):
142 * lread.c (load_warn_old_style_backquotes, Fload, init_lread):
143 * minibuf.c (Fread_buffer):
144 * print.c (print_preprocess):
145 * process.c (Fformat_network_address, Fmake_network_process)
146 (server_accept_connection):
147 * sound.c (Fplay_sound_internal):
148 * term.c (Fsuspend_tty, Fresume_tty):
149 * window.c (window_list):
150 * xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
151 (message_with_string):
152 * xfaces.c (Fx_list_fonts):
153 * xfont.c (syms_of_xfont):
154 * xselect.c (x_handle_selection_request)
155 (x_handle_selection_clear, x_clear_frame_selections)
156 (x_clipboard_manager_error_1):
157 Prefer CALLMANY and CALLN to counting args by hand.
158 * doc.c (reread_doc_file): Remove unused code.
159 * fns.c (concat2, concat3): Redo to avoid need for local-var vector.
160 (cmpfn_user_defined, hashfn_user_defined, Fmaphash):
161 Prefer call1 and call2 to Ffuncall.
162 * keyboard.c (safe_run_hook_funcall, safe_run_hooks):
163 Use struct literal rather than a local var, for simplicity.
164 * keymap.c (where_is_internal): Use NULL rather than a pointer
165 to unused args.
166 * lisp.h (CALLMANY, CALLN): New macros.
167 * sound.c (Fplay_sound_internal): Coalesce duplicate code.
168 Fixes: bug#19634
169
170 Use gnustep-config if available
171 * emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
172 It doesn't appear to be needed, and the inclusion breaks on
173 Ubuntu 14.10 when 'configure' uses 'gnustep-config'.
174
175 2015-01-22 Eli Zaretskii <eliz@gnu.org>
176
177 * xdisp.c (init_iterator): Restore a comment lost in transition.
178
179 2015-01-22 Paul Eggert <eggert@cs.ucla.edu>
180
181 Use bool for boolean in xfont.c, xftfont.c, xgselect.c
182 * xfont.c (xfont_driver, xfont_chars_supported)
183 (xfont_text_extents):
184 * xftfont.c (xftfont_get_colors, xftfont_open)
185 (xftfont_prepare_face, xftfont_done_face)
186 (xftfont_cached_font_ok):
187 * xgselect.c (xg_select):
188 Use bool for boolean.
189
190 Don't downcase system diagnostics' first letters
191 * fileio.c (report_file_errno): Don't downcase, and simplify.
192 Fixes: bug#19642
193
194 Isolate NIL_IS_ZERO-assuming code better
195 Suggested by Stefan Monnier in:
196 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
197 * alloc.c (allocate_pseudovector):
198 Use memclear, not memsetnil, to remove a 'verify'.
199 * callint.c (Fcall_interactively):
200 * dispnew.c (realloc_glyph_pool):
201 * xdisp.c (init_iterator):
202 Use memclear, not memset, to remove a 'verify'.
203 * lisp.h (memclear): Rename from memsetnil, and take a byte
204 count rather than a word count. All callers changed.
205
206 2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
207
208 Undo port to hypothetical nonzero Qnil case
209 This mostly undoes the previous change in this area. See:
210 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00570.html
211 * alloc.c (allocate_pseudovector):
212 * callint.c (Fcall_interactively):
213 * dispnew.c (realloc_glyph_pool):
214 * fringe.c (init_fringe):
215 * lisp.h (memsetnil):
216 * xdisp.c (init_iterator):
217 Simplify by assuming that Qnil is zero, but verify the assumption.
218 * lisp.h (NIL_IS_ZERO): Revert back to this symbol, removing
219 NIL_IS_NONZERO. All uses changed.
220
221 2015-01-20 Jan Djärv <jan.h.d@swipnet.se>
222
223 * nsterm.m (EV_TRAILER2): Set Vinhibit_quit to Qt (Bug#19531).
224
225 2015-01-20 Dmitry Antipov <dmantipov@yandex.ru>
226
227 Prefer xlispstrdup to avoid dumb calls to strlen.
228 * nsfont.m (ns_get_family):
229 * nsterm.m (ns_term_init):
230 * w32fns.c (w32_window):
231 * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
232
233 2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
234
235 Correct an old fix for GTK font selection
236 * gtkutil.c (xg_get_font): Fix off-by-2 typo.
237 Fixes: bug#3228
238
239 Fix minor bugs with printing null bytes
240 * minibuf.c (read_minibuf_noninteractive):
241 * xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
242 Work even if the Lisp string contains a null byte.
243
244 Port to hypothetical case where Qnil is nonzero
245 * alloc.c (allocate_pseudovector):
246 * callint.c (Fcall_interactively):
247 * coding.c (syms_of_coding):
248 * dispnew.c (realloc_glyph_pool):
249 * fringe.c (init_fringe):
250 * lisp.h (memsetnil):
251 * xdisp.c (init_iterator):
252 Port to the currently-hypothetical case where Qnil is nonzero.
253 * dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
254 as there are no Lisp_Object values in the data here.
255 * lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
256 All uses changed. Define only if not already defined, so that one
257 can debug with -DNIL_IS_NONZERO.
258 * xdisp.c (init_iterator): Remove unnecessary initializations to 0.
259
260 2015-01-19 Eli Zaretskii <eliz@gnu.org>
261
262 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
263 Qnil is represented as zero, before using that to initialize parts
264 of the glyph structure.
265
266 * xdisp.c (init_iterator): Verify that Qnil is represented as
267 zero, before using that to initialize parts of the iterator
268 structure.
269
270 2015-01-19 Paul Eggert <eggert@cs.ucla.edu>
271
272 Prefer memset to repeatedly assigning Qnil
273 * alloc.c (allocate_pseudovector): Catch more bogus values.
274 * alloc.c (allocate_pseudovector):
275 * callint.c (Fcall_interactively):
276 * coding.c (syms_of_coding):
277 * fringe.c (init_fringe):
278 Verify that Qnil == 0.
279 * callint.c (Fcall_interactively):
280 * eval.c (Fapply, Ffuncall):
281 * fns.c (mapcar1, larger_vector):
282 * font.c (font_expand_wildcards):
283 * fringe.c (init_fringe):
284 Prefer memset to assigning zeros by hand.
285 * callint.c (Fcall_interactively):
286 Remove duplicate assignment of Qnil to args[i].
287 * coding.c (syms_of_coding):
288 Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
289 * fileio.c (Ffile_selinux_context):
290 Rewrite to avoid need for Lisp_Object array.
291 * lisp.h (XLI_BUILTIN_LISPSYM): New macro.
292 (DEFINE_LISP_SYMBOL_END): Use it.
293 (NIL_IS_ZERO): New constant.
294 (memsetnil): New function.
295
296 2015-01-16 Dmitry Antipov <dmantipov@yandex.ru>
297
298 Tune pseudovector allocation assuming Qnil == 0.
299 * alloc.c (allocate_pseudovector): Use memset for both
300 Lisp_Objects and regular slots. Add zerolen arg.
301 * lisp.h (allocate_pseudovector): Adjust prototype.
302 (ALLOCATE_PSEUDOVECTOR): Adjust user.
303 (ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
304 (allocate_hash_table, allocate_window, allocate_frame)
305 (allocate_process, allocate_terminal): Remove prototypes.
306 * fns.c (allocate_hash_table): Now static here.
307 * frame.c (allocate_frame):
308 * process.c (allocate_process):
309 * terminal.c (allocate_terminal):
310 * window.c (allocate_window): Now static here.
311 Use ALLOCATE_ZEROED_PSEUDOVECTOR. Add comment.
312
313 * lisp.h (XTERMINAL): Add eassert.
314 * process.c (make_lisp_proc): Now static here.
315
316 Prefer INLINE functions in font.h to match style used in lisp.h.
317 * font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
318 (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
319 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
320 Now functions.
321 * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
322 * ftfont.c (ftfont_shape):
323 * macfont.m (macfont_shape):
324 * w32uniscribe.c (uniscribe_shape):
325 * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
326
327 2015-01-16 Paul Eggert <eggert@cs.ucla.edu>
328
329 Give up on -Wsuggest-attribute=const
330 * decompress.c (Fzlib_available_p):
331 * gnutls.c (Fgnutls_available_p):
332 * gtkutil.h (xg_uses_old_file_dialog):
333 * xdisp.c (Ftool_bar_height):
334 * xmenu.c (popup_activated):
335 No longer const, since it's not const on at lest some
336 configurations, and we shouldn't lie to the compiler.
337
338 2015-01-15 Eli Zaretskii <eliz@gnu.org>
339
340 * fileio.c: Include binary-io.h.
341 (Fset_binary_mode): New function.
342 (syms_of_fileio): Defsubr it.
343 (syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.
344
345 2015-01-15 Teodor Zlatanov <tzz@lifelogs.com>
346
347 * gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
348 (Fgnutls_peer_status): Use it to set the :self-signed flag.
349 Rename the previous :self-signed to :unknown-ca. (Bug#19404)
350 (Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.
351
352 2015-01-14 Eli Zaretskii <eliz@gnu.org>
353
354 * w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
355 when FLAGS indicate the item is not highlighted. (Bug#19596)
356
357 2015-01-14 Martin Rudalics <rudalics@gmx.at>
358
359 * xmenu.c (update_frame_menubar): Remove garbaged code.
360
361 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
362
363 remove_slash_colon need not be inline
364 * process.c, process.h (remove_slash_colon): No longer inline.
365 This saves text bytes without hurting runtime performance.
366
367 2015-01-14 Dmitry Antipov <dmantipov@yandex.ru>
368
369 Avoid extra multibyteness check in ENCODE_FILE users.
370 * callproc.c (encode_current_directory, Fcall_process, call_process):
371 * dired.c (directory_files_internal, file_name_completion):
372 Do not check for STRING_MULTIBYTE because encode_file_name
373 is a no-op for unibyte strings.
374
375 * process.h (remove_slash_colon): New function.
376 * callproc.c (encode_current_directory, call_process):
377 * process.c (Fstart_process): Use it.
378
379 Consistently handle time zone specification.
380 * editfns.c (decode_time_zone): New function, refactored out from ...
381 (Fencode_time): ... adjusted user.
382 (Fset_time_zone_rule): Use decode_time_zone.
383
384 * editfns.c (make_buffer_string_both): If requested range intersects
385 the gap, don't move the latter but copy in two regions, thus avoiding
386 unnecessary relocation of buffer data.
387
388 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
389
390 Use bool for boolean in xmenu.c, xml.c
391 * xmenu.c (x_menu_set_in_use, popup_get_selection)
392 (Fx_menu_bar_open_internal, popup_widget_loop)
393 (x_activate_menubar, xg_crazy_callback_abort)
394 (update_frame_menubar, set_frame_menubar)
395 (initialize_frame_menubar, free_frame_menubar)
396 (create_and_show_popup_menu, x_menu_show)
397 (create_and_show_dialog, x_dialog_show):
398 * xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
399 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
400 * xrdb.c (main) [TESTRM]:
401 * xsettings.c (init_gsettings):
402 * xterm.c (XFillRectangle, xg_scroll_callback)
403 (xg_end_scroll_callback):
404 * xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
405 Use bool for boolean.
406 * xmenu.c (TRUE): Remove; no longer used.
407 (show_help_event): Remove long-unused code.
408 (set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.
409
410 2015-01-13 Paul Eggert <eggert@cs.ucla.edu>
411
412 Don't say Fnext_read_file_uses_dialog_p is const
413 It's const only if a windowing system is not used; don't say it's
414 const otherwise. See:
415 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
416 * fileio.c (next_read_file_uses_dialog_p): Remove.
417 Move guts back to ...
418 (Fnext_read_file_uses_dialog_p): ... here.
419 Don't declare as const, as make-docfile.c now has a special case
420 for this function. This is an ugly hack, but it's better than
421 lying to the compiler.
422
423 Remove now-unnecessary forward XTYPE decl
424 * lisp.h (XTYPE): Remove forward declaration. The recent merge
425 from emacs-24 fixed the problem in a better way, by moving XPNTR's
426 definition to after XTYPE's.
427
428 2015-01-13 Eli Zaretskii <eliz@gnu.org>
429
430 Fix problems with 32-bit wide-int build exposed by MinGW.
431 * lisp.h (XPNTR): Move definition to after XTYPE, to avoid
432 compilation error in an unoptimized build when !USE_LSB_TAG.
433
434 * w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
435 same larger value as for the 64-bit build.
436
437 * w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
438 avoid compiler warnings.
439
440 * w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
441 Avoid compiler warnings about cast from integer to pointer of
442 different size.
443
444 * w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
445 UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
446 casting from integer to pointer of different size.
447 (add_menu_item): Pass the help-echo string as a pointer to
448 Lisp_String, not as a Lisp_Object.
449 (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
450 string object from its C pointer.
451
452 * w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
453 make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
454 C pointer.
455 <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
456 (Fx_create_frame): Type-cast the result of XFASTINT to avoild
457 compiler warnings about size differences.
458 (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
459 pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
460 (Fw32_toggle_lock_key): Pass the new state of the key as a C
461 integer; use -1 for nil. Doc fix.
462
463 * .gdbinit (xgetsym): New subroutine.
464 (xsymname, xsymbol): Use it.
465 (xprintsym): No need to call xgetptr.
466
467 2015-01-13 Martin Rudalics <rudalics@gmx.at>
468
469 * frame.c (adjust_frame_size): Make sure new numbers of
470 lines/columns get installed after font size change (Bug#19575).
471
472 2015-01-13 Dmitry Antipov <dmantipov@yandex.ru>
473
474 Add DEFUN attributes.
475 * callint.c (Finteractive):
476 * character.c (Fcharacterp, Fmax_char):
477 * data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
478 (Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
479 (Ffloatp, Fbyteorder):
480 * decompress.c (Fzlib_available_p):
481 * fns.c (Fidentity):
482 * frame.c (Fframe_windows_min_size):
483 * gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
484 * window.c (Fwindow__sanitize_window_sizes):
485 * xdisp.c (Ftool_bar_height):
486 * xfaces.c (Fface_attribute_relative_p): Add const attribute.
487 * emacs.c (Fkill_emacs):
488 * eval.c (Fthrow):
489 * keyboard.c (Ftop_level, Fexit_recursive_edit)
490 (Fabor_recursive_edit): Add noreturn attribute.
491
492 * search.c (fast_string_match_internal): New function,
493 consolidated from...
494 (fast_string_match, fast_string_match_ignore_case): ...functions
495 which are...
496 * lisp.h (fast_string_match, fast_string_match_ignore_case):
497 inlined from here now.
498 (fast_string_match_internal): Add prototype.
499 * dired.c (file_name_completion): Use fast_string_match_internal.
500
501 * fileio.c (next_read_file_uses_dialog_p): New workaround ...
502 (Fnext_read_file_uses_dialog_p): ... called from here to avoid
503 ATTRIBUTE_CONST dependency from #ifdefs. For details, see
504 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.
505
506 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
507
508 Port to 32-bit MingGW --with-wide-int
509 Problem reported by Eli Zaretskii in:
510 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
511 * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
512 what we think it is, rather than checking only its alignment (and
513 doing so incorrectly on MinGW).
514
515 2015-01-12 Dmitry Antipov <dmantipov@yandex.ru>
516
517 * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
518 Remove dead NILP check.
519 * image.c (Flookup_image): Use regular format for docstring.
520 * keyboard.c (apply_modifiers_uncached): Use stpcpy.
521
522 2015-01-12 Martin Rudalics <rudalics@gmx.at>
523
524 * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
525 adjust_frame_size.
526 * frame.c (frame_default_tool_bar_height): New variable.
527 (adjust_frame_size): Possibly add requested adjustment to
528 Vframe_adjust_size_history.
529 (make_frame): Initialize tool_bar_redisplayed_once slot.
530 (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
531 doc-string. Call adjust_frame_size unconditionally (the frame's
532 text size may remain unaltered but the pixel size may change).
533 (x_figure_window_size): If frame_default_tool_bar_height was
534 set, use it instead of calculating the tool bar height from
535 DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set
536 Vframe_initial_frame_tool_bar_height.
537 (Qchange_frame_size, Qxg_frame_set_char_size)
538 (Qset_window_configuration, Qx_create_frame_1)
539 (Qx_create_frame_2): New symbols.
540 (Vframe_initial_frame_tool_bar_height): Remove.
541 (Vframe_adjust_size_history): New history variable for debugging
542 frame size adjustments.
543 * frame.h (struct frame): New boolean slot
544 tool_bar_redisplayed_once.
545 (frame_default_tool_bar_height): Extern.
546 * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
547 to adjust_frame_size.
548 * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
549 Qx_create_frame_2 to adjust_frame_size.
550 * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
551 inhibit 1 when we have not redisplayed the tool bar yet.
552 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
553 Qx_create_frame_2 to adjust_frame_size.
554 * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
555 call.
556 * window.c (Fset_window_configuration): Pass
557 Qset_window_configuration to adjust_frame_size.
558 * xdisp.c (redisplay_tool_bar): Assign new height to
559 frame_default_tool_bar_height.
560 (redisplay_internal): If we haven't redisplayed this frame's
561 tool bar, call redisplay_tool_bar early so we can adjust the
562 frame size accordingly.
563 * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
564 inhibit 1 when we have not redisplayed the tool bar yet.
565 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
566 Qx_create_frame_2 to adjust_frame_size.
567
568 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
569
570 Have 'make' output better GEN names
571 * Makefile.in (gl-stamp, globals.h): Simplify by putting the new
572 contents of globals.h into gl-stamp. This lets us use AM_V_GEN
573 more naturally so that 'make' can output more-accurate names.
574
575 2015-01-11 Stefan Monnier <monnier@iro.umontreal.ca>
576
577 * buffer.c (init_buffer_once): Initialize buffer_local_flags before
578 calling reset_buffer_local_variables, and make sure we initialize
579 it completely.
580
581 2015-01-11 Dmitry Antipov <dmantipov@yandex.ru>
582
583 * coding.c (Fcoding_system_plist): Use common style for docstring.
584
585 2015-01-11 Paul Eggert <eggert@cs.ucla.edu>
586
587 Port to MSB hosts without optimization
588 E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
589 the inline function XTYPE needs to be declared before being used.
590 * lisp.h (XTYPE): New forward declaration.
591
592 2015-01-10 Paul Eggert <eggert@cs.ucla.edu>
593
594 Port to 32-bit --with-wide-int
595 Prefer symbol indexes to struct Lisp_Symbol * casted and then
596 widened, as the latter had trouble with GCC on Fedora 21 when
597 configured --with-wide-int and when used in static initializers.
598 * alloc.c (garbage_collect_1, which_symbols):
599 * lread.c (init_obarray):
600 Prefer builtin_lisp_symbol when it can be used.
601 * dispextern.h (struct image_type.type):
602 * font.c (font_property_table.key):
603 * frame.c (struct frame_parm_table.sym):
604 * keyboard.c (scroll_bar_parts, struct event_head):
605 * xdisp.c (struct props.name):
606 Use the index of a builtin symbol rather than its address.
607 All uses changed.
608 * lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
609 (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
610 symbol indexes rather than pointers, and which work better on MSB
611 hosts because they shift right before tagging. All uses changed.
612 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
613 No longer noops on wide-int hosts, since they work now.
614 (builtin_lisp_symbol): New function.
615
616 Port to HAVE_FREETYPE && !HAVE_XFT
617 * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
618 * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
619 Declare in this case too.
620
621 2015-01-10 Eli Zaretskii <eliz@gnu.org>
622
623 * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
624
625 * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
626 make_pointer_integer instead of XIL.
627 (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
628
629 * w32inevt.c (handle_file_notifications): Use make_pointer_integer
630 instead of XIL. Put a list of the descriptor, action, and file
631 name in event->arg, instead of spreading them between event->code
632 and event->arg.
633
634 * w32term.c (queue_notifications): Use make_pointer_integer
635 instead of XIL. Put a list of the descriptor, action, and file
636 name in event->arg, instead of spreading them between event->code
637 and event->arg.
638
639 * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
640 event creation to changes in w32term.c and w32inevt.c above.
641
642 2015-01-09 Paul Eggert <eggert@cs.ucla.edu>
643
644 Port Qnil==0 changes to 32-bit --with-wide-int
645 * lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
646 macro-implemented version. For the non-USE_LSB_TAG case, supply
647 a new inline function that is the inverse of the new TAG_SYMPTR.
648 (lisp_h_XUNTAGBASE, XUNTAGBASE): Remove. All uses removed.
649 (TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
650 negative number, don't allow sign bits to bleed into the encoded
651 value. Shift in zero bits instead.
652
653 Refactor pointer-to-integer conversion
654 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
655 Rename and move to lisp.h. All uses changed.
656 * lisp.h (XINTPTR, make_pointer_integer): New inline functions,
657 which are renamed from gfilenotify.c's lisp_to_monitor and
658 monitor_to_lisp, and with more-generic void * signatures.
659
660 2015-01-08 Eli Zaretskii <eliz@gnu.org>
661
662 * dispnew.c (buffer_posn_from_coords): Fix the value of the column
663 returned for right-to-left screen lines. (Before the change on
664 2014-12-30, the incorrectly-computed X pixel coordinate concealed
665 this bug.)
666
667 * .gdbinit (xsymname): New subroutine.
668 (xprintsym, initial-tbreak): Use it to access the name of a symbol
669 in a way that doesn't cause GDB to barf when it tries to
670 dereference a NULL pointer.
671
672 * xdisp.c (next_element_from_c_string): Use Lisp integer zero as
673 the object.
674 (set_cursor_from_row, try_cursor_movement, dump_glyph)
675 (insert_left_trunc_glyphs, append_space_for_newline)
676 (extend_face_to_end_of_line, highlight_trailing_whitespace)
677 (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
678 (Fbidi_resolved_levels, produce_special_glyphs)
679 (rows_from_pos_range, mouse_face_from_buffer_pos)
680 (note_mouse_highlight): Use nil as the object for glyphs inserted
681 by the display engine, and test with NILP instead of INTEGERP.
682 (Bug#19535)
683
684 * w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
685 the display engine.
686
687 * xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
688 the display engine.
689
690 * dispextern.h (struct glyph, struct it): Update comments for the
691 OBJECT members.
692
693 2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
694
695 Port new Lisp symbol init to x86 --with-wide-int
696 * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
697 Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
698 GCC (at least) does not allow a constant initializer to widen an
699 address constant.
700
701 * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
702 This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
703 Although clang doesn't need it, some other compiler might, and
704 it's easy enough to be safe.
705
706 * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
707 Apparently clang removed support for the alloc_size attribute.
708
709 Port Qnil==0 XUNTAG to clang
710 clang has undefined behavior if the program subtracts an integer
711 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
712 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
713 * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
714 (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.
715
716 Port GFileMonitor * hack to Qnil==0 platforms
717 Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
718 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
719 (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
720
721 2015-01-06 Jan Djärv <jan.h.d@swipnet.se>
722
723 * nsterm.m (x_set_window_size): Call updateFrameSize to get real
724 size instead of using widht/height. The frame may be constrained.
725
726 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
727
728 * lisp.h (XSYMBOL): Parenthesize id in forward decl.
729 Needed when neither optimizing nor inlining.
730 Also, sort decls alphabetically.
731
732 2015-01-05 Eli Zaretskii <eliz@gnu.org>
733
734 * w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
735 * w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove
736 declarations of Q* variables that represent symbols.
737
738 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
739
740 Use 0 for Qnil
741 Fixes Bug#15880.
742 If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
743 that NILP (x) is equivalent to testing whether x is 0 at the
744 machine level. The overall effects of this and the previous patch
745 shrink the size of the text segment by 2.3% and speeds up
746 compilation of all the .elc files by about 0.5% on my platform,
747 which is Fedora 20 x86-64.
748 * lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
749 (make_lisp_symbol) [USE_LSB_TAG]:
750 Symbols now tag the difference from lispsym, not the pointer.
751 (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
752 (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
753 Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
754 (XSYMBOL): New forward decl.
755 (XUNTAGBASE): New function.
756 (XUNTAG): Use it.
757
758 Compute C decls for DEFSYMs automatically
759 Fixes Bug#15880.
760 This patch also makes Q constants (e.g., Qnil) constant addresses
761 from the C point of view.
762 * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c:
763 * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
764 * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
765 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
766 * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
767 * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
768 * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
769 * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
770 * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
771 * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
772 * xselect.c, xsettings.c, xterm.c:
773 Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
774 These names are now defined automatically by make-docfile.
775 * alloc.c (init_symbol): New function.
776 (Fmake_symbol): Use it.
777 (c_symbol_p): New function.
778 (valid_lisp_object_p, purecopy): Use it.
779 * alloc.c (marked_pinned_symbols):
780 Use make_lisp_symbol instead of make_lisp_ptr.
781 (garbage_collect_1): Mark lispsym symbols.
782 (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
783 (mark_object): Use it.
784 (sweep_symbols): Sweep lispsym symbols.
785 (symbol_uses_obj): New function.
786 (which_symbols): Use it. Work for lispsym symbols, too.
787 (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
788 since Qt's address is already known now.
789 (syms_of_alloc): Add lispsym count to symbols_consed.
790 * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
791 when testing whether storage is all bits zero.
792 * dispextern.h (struct image_type):
793 * font.c (font_property_table):
794 * frame.c (struct frame_parm_table, frame_parms):
795 * keyboard.c (scroll_bar_parts, struct event_head):
796 * xdisp.c (struct props):
797 Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
798 Lisp_Object *, since Qfoo is no longer an object whose address can be
799 taken. All uses changed.
800 * eval.c (run_hook): New function. Most uses of Frun_hooks changed to
801 use it, so that they no longer need to take the address of a Lisp sym.
802 (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
803 * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
804 * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
805 DEFSYM Qdeactivate_mark before the corresponding var.
806 * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
807 instead of interning their symbols; this avoids duplicates.
808 (LISP_INITIALLY, TAG_PTR)
809 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
810 New macros.
811 (LISP_INITIALLY_ZERO): Use it.
812 (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
813 (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
814 Move decls up, to avoid forward uses. Include globals.h earlier, too.
815 (make_lisp_symbol): New function.
816 (XSETSYMBOL): Use it.
817 (DEFSYM): Now just a placeholder for make-docfile.
818 * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
819 (intern_sym): New function, with body taken from old intern_driver.
820 (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
821 All uses changed.
822 (define_symbol): New function.
823 (init_obarray): Define the C symbols taken from lispsym.
824 Use plain DEFSYM for Qt and Qnil.
825 * syntax.c (init_syntax_once): No need to worry about
826 Qchar_table_extra_slots.
827
828 2015-01-04 Paul Eggert <eggert@cs.ucla.edu>
829
830 'temacs -nw' should not call missing functions
831 Without this patch, "temacs -nw" fails with the diagnostic
832 "emacs: Symbol's function definition is void: frame-windows-min-size"
833 and messes up the tty's state.
834 * frame.c (Fframe_windows_min_size): New placeholder function.
835 (syms_of_frame): Define it.
836 * window.c (Fwindow__sanitize_window_sizes): New placeholder.
837 (syms_of_window): Define it.
838
839 Less 'make' chatter for lisp dir
840 * Makefile.in (%.elc): Adjust to compile-onefile change in
841 ../lisp/Makefile.in.
842
843 batch write-region no longer says "Wrote FOO"
844 This cuts down on 'make' chatter a bit.
845 * fileio.c (Fwrite_region):
846 Don't output "Wrote /whatever/foo.elc" if noninteractive.
847
848 2015-01-03 Paul Eggert <eggert@cs.ucla.edu>
849
850 Revert previous change to produce_composite_glyph
851 * term.c (produce_composite_glyph): Revert previous change (Bug#19496).
852
853 Pacify gcc -Wparentheses
854 * frame.c (x_set_frame_parameters): Add parens (Bug#19428).
855
856 2015-01-03 Martin Rudalics <rudalics@gmx.at>
857
858 * frame.c (x_set_frame_parameters): Call Fset_frame_size only if
859 f->can_x_set_window_size is true.
860 * xterm.c (x_set_window_size_1): Call change_frame_size with
861 text sizes instead of pixel sizes (Bug#19428).
862
863 2015-01-01 Eli Zaretskii <eliz@gnu.org>
864
865 * xdisp.c (pos_visible_p): Fix up the X coordinate for
866 right-to-left screen lines. (Bug#19473)
867
868 2015-01-01 Eli Zaretskii <eliz@gnu.org>
869
870 * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
871
872 2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
873
874 Simplify setfattr use by assuming GNU make
875 * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
876 (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
877 Simplify by using GNU make rather than shell conditionals,
878 by using ln -f rather than rm -f followed by ln,
879 and by preferring $@ to spelling out the destination.
880
881 2014-12-29 Eli Zaretskii <eliz@gnu.org>
882
883 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
884 file doesn't compile on MS-Windows.
885
886 2014-12-29 Paul Eggert <eggert@cs.ucla.edu>
887
888 Allow return value of system-name to vary. (Bug#19438)
889 * filelock.c (current_lock_owner):
890 * xrdb.c (get_environ_db):
891 * xterm.c (same_x_server):
892 * xterm.c (x_term_init):
893 Prefer (system-name) to system-name, and avoid naming
894 locals 'system-name'.
895 * editfns.c (cached_system_name): New static var.
896 (init_and_cache_system_name): New function.
897 (init_editfns, Fsystem_name): Use it.
898 (syms_of_editfns): Initialize it and Vsystem_name to the same value.
899 * sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
900 (h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
901 (init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
902 Don't create a new string if the current value is already correct.
903
904 2014-12-28 Paul Eggert <eggert@cs.ucla.edu>
905
906 Fix produce_composite_width typo
907 * term.c (produce_composite_glyph):
908 Fix typo that confused number of columns for pixel width.
909
910 2014-12-28 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
911
912 Wrap dll functions more simply
913 * decompress.c, gnutls.c, image.c, xml.c:
914 If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
915 rather than the inverse when not WINDOWSNT. This isolates the
916 fn_* business into the WINDOWSNT-specific section of the code,
917 which makes it easier to maintain the generic code.
918 * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
919 * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
920 * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
921 * xml.c (DEF_XML2_FN, LOAD_XML2_FN):
922 Remove. All uses replaced by DEF_DLL_FN.
923 * decompress.c (inflateInit2): Remove; no longer needed.
924 * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
925
926 Port memory-full checking to GnuTLS 3.3
927 Instead of using gnutls_global_set_mem_functions, check every call
928 to a GnuTLS function that might return an indication of memory
929 exhaustion. Suggested by Dmitry Antipov in:
930 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
931 * gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
932 (init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
933 (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
934 All uses removed.
935 (check_memory_full): New function.
936 (emacs_gnutls_handshake, emacs_gnutls_handle_error)
937 (gnutls_make_error, gnutls_certificate_details, Fgnutls_peer_status)
938 (Fgnutls_boot): Use it.
939 (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
940
941 2014-12-27 Paul Eggert <eggert@cs.ucla.edu>
942
943 Fix parse_settings to match internal documentation
944 * xsettings.c (parse_settings): Return the number of settings seen.
945 Count the settings changes accurately.
946 (read_settings): Don't confuse number of settings changes with
947 the return code from XGetWindowProperty.
948
949 2014-12-27 Eli Zaretskii <eliz@gnu.org>
950
951 * xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
952 composition_compute_stop_pos to the number of characters in the
953 string. (Bug#19435)
954 <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
955
956 * composite.c (composition_compute_stop_pos): If no composition
957 was found in a string before ENDPOS, and ENDPOS is the string end,
958 no need to back up to a safe point.
959
960 * dispextern.h (struct it) <end_charpos>: Improve commentary.
961
962 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
963
964 * nsimage.m (allocInitFromFile:): Initialize bmRep.
965 (dealloc): Release bmRep.
966 (setPixmapData): Make bmRep local so class member is not
967 set (Bug#19133).
968 (setPixmapData): Rename local variable bmRep to avoid compiler
969 warning.
970
971 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
972
973 * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
974 when going to fullscreen (Bug#0x180004f).
975
976 2014-12-27 Eli Zaretskii <eliz@gnu.org>
977
978 * window.c (Fwindow_body_width): Doc fix. (Bug#19395)
979
980 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
981
982 * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
983
984 2014-12-27 Eli Zaretskii <eliz@gnu.org>
985
986 * gnutls.c (gnutls_init): Fix deprecation warning from GCC.
987
988 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
989
990 Use bool for boolean in xselect.c, xsettings.c
991 * xselect.c (x_get_local_selection, struct selection_data)
992 (x_selection_request_lisp_error, struct prop_location)
993 (x_handle_selection_request, x_convert_selection)
994 (waiting_for_other_props_on_window, expect_property_change)
995 (wait_for_property_change, x_handle_property_notify)
996 (x_get_foreign_selection, x_get_window_property)
997 (receive_incremental_selection)
998 (x_get_window_property_as_lisp_data)
999 (lisp_data_to_selection_data, Fx_get_selection_internal)
1000 (x_send_client_event):
1001 * xselect.c, xterm.h (x_handle_dnd_message):
1002 * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
1003 (apply_xft_settings, read_and_apply_settings)
1004 (xft_settings_event, init_gsettings, init_xsettings)
1005 (syms_of_xsettings):
1006 Use bool for boolean.
1007 * xselect.c (x_get_window_property): Omit last arg, which was an
1008 unused boolean.
1009 * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
1010 always true. All callers changed.
1011
1012 2014-12-26 Eli Zaretskii <eliz@gnu.org>
1013
1014 * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
1015 of strcat.
1016
1017 * w32menu.c (add_menu_item): Use stpcpy instead of strcat.
1018
1019 * w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
1020 strcat.
1021
1022 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
1023
1024 Use bool for boolean in xsmfns.c
1025 * xsmfns.c, xterm.h (x_session_have_connection):
1026 * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
1027 Use bool for boolean.
1028 (x_session_initialize, Fhandle_save_session):
1029 Prefer NILP (x) to EQ (x, Qnil).
1030
1031 2014-12-25 Paul Eggert <eggert@cs.ucla.edu>
1032
1033 * callproc.c (child_setup):
1034 * dbusbind.c (xd_signature_cat):
1035 * doc.c (get_doc_string, Fsnarf_documentation):
1036 * editfns.c (Fuser_full_name):
1037 * frame.c (xrdb_get_resource):
1038 * gtkutil.c (xg_get_file_with_chooser):
1039 * tparam.c (tparam1):
1040 * xfns.c (xic_create_fontsetname):
1041 * xrdb.c (gethomedir, get_user_db, get_environ_db):
1042 * xsmfns.c (smc_save_yourself_CB):
1043 Rewrite to avoid the need for strcat, typically by using stpcpy
1044 and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms.
1045 * doc.c (sibling_etc):
1046 * xrdb.c (xdefaults):
1047 Now a top-level static constant.
1048
1049 2014-12-23 Didier Verna <didier@didierverna.net> (tiny change).
1050
1051 * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
1052 C one (Bug#19396).
1053
1054 2014-12-22 Jan Djärv <jan.h.d@swipnet.se>
1055
1056 * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
1057 breaks icon setting for Gtk+ except for initial frame (Bug#19403).
1058
1059 2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
1060
1061 Use bool for boolean in xterm.c
1062 * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
1063 (x_set_window_size, x_bitmap_icon):
1064 * nsterm.m (ns_frame_raise_lower, x_new_font):
1065 * termhooks.h (struct terminal.toggle_invisible_pointer_hook)
1066 (struct terminal.frame_raise_lower_hook):
1067 * w32term.c (w32_frame_raise_lower):
1068 * xterm.c, xterm.h (x_text_icon):
1069 * xterm.c (x_update_window_begin, x_update_window_end)
1070 (x_update_end, x_after_update_window_line)
1071 (x_set_glyph_string_gc, x_draw_glyph_string_background)
1072 (x_draw_glyph_string_foreground)
1073 (x_draw_composite_glyph_string_foreground)
1074 (x_alloc_lighter_color, x_draw_relief_rect)
1075 (x_draw_glyph_string_box, x_draw_image_relief)
1076 (x_draw_image_glyph_string, x_draw_stretch_glyph_string)
1077 (x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
1078 (x_hide_hourglass):
1079 (XFillRectangle) [HAVE_GTK3]:
1080 (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
1081 (x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
1082 (XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
1083 (x_send_scroll_bar_event, xm_scroll_callback)
1084 (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
1085 (x_create_toolkit_scroll_bar)
1086 (x_create_horizontal_toolkit_scroll_bar)
1087 (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
1088 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
1089 (XTset_horizontal_scroll_bar, x_scroll_bar_expose)
1090 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
1091 (x_scroll_bar_report_motion)
1092 (x_horizontal_scroll_bar_report_motion, x_net_wm_state)
1093 (handle_one_xevent, XTread_socket, x_draw_bar_cursor)
1094 (x_draw_window_cursor, x_clear_errors)
1095 (x_trace_wire, x_new_font, x_set_offset, wm_supports)
1096 (set_wm_state, x_set_sticky, get_current_wm_state)
1097 (do_ewmh_fullscreen, x_handle_net_wm_state)
1098 (x_check_expected_move, x_sync_with_move, x_wait_for_event)
1099 (x_set_window_size_1, XTframe_raise_lower)
1100 (x_make_frame_visible, x_iconify_frame)
1101 (x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
1102 (x_term_init, x_process_timeouts, x_activate_timeout_atimer)
1103 (x_delete_terminal, x_initialize, syms_of_xterm):
1104 Use bool for boolean.
1105
1106 2014-12-20 Paul Eggert <eggert@cs.ucla.edu>
1107
1108 * composite.h (struct composition.width): Now int
1109 instead of unsigned short, as we prefer signed integers.
1110
1111 Let charset tick grow past USHRT_MAX
1112 * charset.c, charset.h (charset_ordered_list_tick):
1113 Now EMACS_UINT, not unsigned short.
1114 * fontset.c (reorder_font_vector): Allow the tick to grow to the
1115 maximum representable Emacs integer value before wrapping it around.
1116
1117 Simplify unexec file mode setting
1118 * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
1119 Don't include <sys/stat.h> when no longer needed.
1120 (unexec): Create file with correct mode in the first place,
1121 rather than overwriting the mode later and fiddling with the
1122 global umask in the mean time. Avoid bogus usage like
1123 'umask (777)', which should have been 'umask (0777)'.
1124 (mark_x): Remove. All callers removed.
1125
1126 2014-12-19 Paul Eggert <eggert@cs.ucla.edu>
1127
1128 Minor cleanups for Lisp objects and symbols
1129 * alloc.c (next_vector, set_next_vector):
1130 * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
1131 (lisp_h_make_number) [USE_LSB_TAG]:
1132 Use Lisp_Int0 instead of the mystery constant 0.
1133 * alloc.c (mark_object): Always set and use po; that's simpler.
1134 (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
1135 Properly parenthesize definientia.
1136 * bidi.c (bidi_initialize):
1137 * buffer.c (init_buffer_once):
1138 * nsfns.m (syms_of_nsfns):
1139 * nsmenu.m (syms_of_nsmenu):
1140 * nsselect.m (syms_of_nsselect):
1141 Prefer DEFSYM to defining by hand.
1142 * buffer.c (syms_of_buffer): Omit unneeded staticpros.
1143 * data.c: Fix too-long line.
1144 * lisp.h (DECLARE_GDB_SYM): New macro.
1145 (DEFINE_GDB_SYMBOL_BEGIN): Use it.
1146 (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
1147 Declare the symbol, so it's visible to everywhere lisp.h is included.
1148 Move forward decls as far forward as they can go,
1149 to allow future changes to use them.
1150
1151 2014-12-18 Paul Eggert <eggert@cs.ucla.edu>
1152
1153 * gnutls.c: Include gnutls.h.
1154 This to check syms_of_gnutls's API even when !HAVE_GNUTLS.
1155 * image.c (svg_load): Fix pointer signedness.
1156
1157 2014-12-18 Martin Rudalics <rudalics@gmx.at>
1158
1159 * frame.c (frame_windows_min_size): New argument IGNORE.
1160 (adjust_frame_size): When called from change_frame_size call
1161 frame_windows_min_size with IGNORE Qt so we can ignore size
1162 restrictions.
1163
1164 2014-12-18 Eli Zaretskii <eliz@gnu.org>
1165
1166 * font.c (Ffont_info): Add more font information to the vector
1167 returned by the function, inspired by query-font. Doc fix.
1168 (Bug#19395)
1169
1170 2014-12-18 Stefan Monnier <monnier@iro.umontreal.ca>
1171
1172 * keyboard.c (input_was_pending): New var.
1173 (read_char): Use it to make sure we only skip redisplay when we can't
1174 keep up with the repeat rate.
1175
1176 2014-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
1177
1178 * keyboard.c (swallow_events): Don't redisplay if there's input pending.
1179
1180 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1181
1182 * image.c (svg_load): Watch out for nil value of current buffer's
1183 filename. Re-enable filename thing for not-a-file case.
1184
1185 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1186
1187 Partially disabled previous change.
1188
1189 * image.c (svg_load): Temporarily disabled filename thing for
1190 not-a-file case as it can cause crashs.
1191
1192 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
1193
1194 Fix problem with images referenced within svg files. (bug#19373)
1195
1196 * image.c: Additional parameter 'filename' for
1197 svg_load_image. Include "buffer.h". Define library function
1198 rsvg_handle_set_base_uri for WINDOWSNT.
1199 (init_svg_functions): Initialize rsvg_handle_set_base_uri.
1200 (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
1201 (svg_load): Pass a filename to svg_load_image: either name of
1202 actual file or of current buffer's file.
1203 (svg_load_image): New parameter 'filename', used for setting
1204 base_uri, necessary for loading referenced images. (bug#19373)
1205
1206 2014-12-16 Paul Eggert <eggert@cs.ucla.edu>
1207
1208 * lread.c (init_obarray): Declare Qt as special.
1209 This fixes a typo in the 2012-05-15 patch that
1210 tried to declare Qt as special.
1211
1212 2014-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
1213
1214 Various fixes to use bool type and constants.
1215 * dispnew.c (update_single_window): Remove arg `force_p' since it's
1216 always true.
1217 * xfaces.c (clear_face_cache): Use bool for the argument type.
1218
1219 2014-12-15 Paul Eggert <eggert@cs.ucla.edu>
1220
1221 Correct same_at_end when restoring window points
1222 * fileio.c (Finsert_file_contents): Compute same_at_end character
1223 position using the old buffer size, not the new one, since
1224 restore_window_points wants the old size.
1225 Fixes: debbugs:19161
1226
1227 2014-12-14 Alan Mackenzie <acm@muc.de>
1228
1229 New feature optionally to accelerate auto-repeated scrolling.
1230
1231 * xdisp.c: Remove "static" from declaration of Qfontification_functions.
1232
1233 * window.c (window_scroll): Bind fontification-functions to nil
1234 when scrolling by whole screens and
1235 fast-but-imprecise-scrolling is non-nil.
1236 (syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.
1237
1238 * lisp.h (bool): Declare Qfontification_functions extern.
1239
1240 2014-12-14 Eli Zaretskii <eliz@gnu.org>
1241
1242 Load system's default trusted Certificate Authorities if available.
1243 * gnutls.c (gnutls_certificate_set_x509_system_trust)
1244 [GNUTLS >= 3.0.20]: Declare for WINDOWSNT.
1245 (init_gnutls_functions)(gnutls_certificate_set_x509_system_trust)
1246 [GNUTLS >= 3.0.20]: Load from shared library for WINDOWSNT.
1247 (fn_gnutls_certificate_set_x509_system_trust) [!WINDOWSNT]:
1248 Define new macro.
1249 (Fgnutls_boot) [GNUTLS >= 3.0.20]:
1250 Call gnutls_certificate_set_x509_system_trust. Log an error message if
1251 it fails.
1252
1253 2014-12-14 Paul Eggert <eggert@cs.ucla.edu>
1254
1255 * regex.c (analyze_first): Rename from analyze_first.
1256
1257 2014-12-13 Paul Eggert <eggert@cs.ucla.edu>
1258
1259 * alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
1260 a hack involving a union.
1261
1262 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1263
1264 * gnutls.c (Fgnutls_available_p, syms_of_gnutls):
1265 Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
1266 them only once.
1267
1268 2014-12-13 Teodor Zlatanov <tzz@lifelogs.com>
1269
1270 * emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
1271
1272 * gnutls.h: Always declare syms_of_gnutls.
1273
1274 * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
1275 clarity. Let the availability check return Qnil when the GnuTLS
1276 integration is not available, instead of erroring out.
1277 (Bug#19346)
1278
1279 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1280
1281 * xdisp.c (move_it_in_display_line_to, display_line):
1282 Don't disallow overflow-newline-into-fringe when word-wrap is in
1283 effect. (Bug#19300)
1284
1285 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
1286
1287 * fileio.c: Better preserve window-points during revert (bug#19161).
1288 (Qget_buffer_window_list): New var.
1289 (get_window_points_and_markers, restore_window_points): New functions.
1290 (Finsert_file_contents): Use them to save and restore window-points.
1291
1292 2014-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1293
1294 * xterm.c (x_delete_terminal): Call emacs_close for X connection
1295 descriptor if called from x_connection_closed and always delete
1296 this descriptor from keyboard waiting set (Bug#19147).
1297
1298 2014-12-10 Eli Zaretskii <eliz@gnu.org>
1299
1300 * bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
1301 (bidi_cache_max_elts): New global variable.
1302 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
1303 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
1304 its initial value.
1305 (bidi_cache_search): Handle overflown cache. Improve commentary.
1306 (bidi_cache_ensure_space): Limit allocations to the current value
1307 of bidi_cache_max_elts. Force xpalloc not to over-allocate.
1308 If less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
1309 the increment to not exceed the limit.
1310 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
1311 cache, zero otherwise (meaning the cache overflowed). In the
1312 latter case, set bidi_cache_last_idx to -1.
1313 (bidi_peek_at_next_level): Handle overflown cache.
1314 (bidi_push_it): Increase the cache limit for iterating the new object.
1315 (bidi_pop_it): Decrease the cache limit back to previous value.
1316 (bidi_shelve_cache): Shelve the current value of the cache limit.
1317 (bidi_unshelve_cache): Restore the value of cache limit.
1318 (bidi_find_bracket_pairs): If the cache overflows while looking
1319 for the paired bracket, give up and let bidi_resolve_neutrals
1320 process the bracket as a simple neutral. (Bug#19322)
1321 (bidi_find_other_level_edge): If the cache overflows, fall back on
1322 Plan B, which effectively stops the reordering and restarts it on
1323 the next character (after resetting the cache).
1324 (bidi_move_to_visually_next): When the cache overflows, reset it
1325 after processing the last cached character.
1326
1327 2014-12-10 Paul Eggert <eggert@cs.ucla.edu>
1328
1329 Fix glitches in gnutls.c, mostly memory-related
1330 * gnutls.c: Sort macro definitions by name.
1331 (fn_gnutls_transport_set_errno): Omit unreachable definition.
1332 (fn_gnutls_x509_crt_get_signature): Omit unused symbol.
1333 (gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
1334 Prefer ptrdiff_t for sizes. Check for arithmetic overflow when
1335 calculating string length. Use make_uninit_string, to avoid
1336 copying the string. Cast the char, not the pointer.
1337 (gnutls_certificate_details): Use xmalloc and xfree, not malloc
1338 and free. Work even for dates past the year 9999. Use void *
1339 for buffers, to avoid casts.
1340
1341 2014-12-09 Andy Moreton <andrewjmoreton@gmail.com> (tiny change)
1342
1343 * gnutls.c (gnutls_protocol_get_name): Fix a copy/paste typo.
1344
1345 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1346
1347 * gnutls.c (Fgnutls_peer_status): Return the key exchange, cipher
1348 and MAC algorithms.
1349
1350 2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
1351
1352 * process.c: Whitespace and line-break nitpicks.
1353
1354 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1355
1356 * gnutls.c (gnutls_certificate_details): The :signature isn't
1357 that useful, so remove it.
1358 (gnutls_certificate_details): Clean up whitespace slightly.
1359 (Fgnutls_peer_status): Return the Diffie-Hellman prime bits for
1360 the connection.
1361 (gnutls_certificate_details): Put :signature-algorithm back again,
1362 which was removed by mistake.
1363 (emacs_gnutls_handle_error): Fatal errors should be on level 1, so
1364 that they are not messaged by default (bug#16253).
1365 (Fgnutls_error_fatalp): Doc fix (bug#18210).
1366
1367 * gnutls.c: Add Windows specs for gnutls_dh_get_prime_bits.
1368
1369 2014-12-07 Jan Djärv <jan.h.d@swipnet.se>
1370
1371 * nsimage.m (setPixmapData): Make bmRep local so class member is not
1372 set (Bug#19133).
1373
1374 2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
1375
1376 * eval.c (Fsignal): Remove duplicate test.
1377 (Fautoload_do_load): Fix up docstring.
1378
1379 2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
1380
1381 * nsterm.m (represented_filename, represented_frame): New variables.
1382 (ns_set_represented_filename): New function.
1383 (sendEvent:): Set represented filename here to avoid flicker,
1384 related to Bug#18757.
1385
1386 * nsterm.h: Declare ns_set_represented_filename.
1387
1388 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
1389 at once, call ns_set_represented_filename instead.
1390
1391 2014-12-05 Eli Zaretskii <eliz@gnu.org>
1392
1393 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
1394 (struct bidi_stack): Reduce size by using bit fields and by
1395 packing sos, override, and isolate_status into a single 8-bit
1396 byte called 'flags'.
1397
1398 * bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
1399 (bidi_push_embedding_level): Construct flags from individual
1400 bits. Adapt to changes in prev_for_neutral and next_for_neutral
1401 members.
1402 (bidi_pop_embedding_level): Use ISOLATE_STATUS. Extract 'sos'
1403 from flags. Adapt to changes in prev_for_neutral,
1404 next_for_neutral, and last_strong members.
1405 (bidi_line_init): Initialize flags to zero.
1406 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
1407 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
1408
1409 2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
1410
1411 * eval.c (backtrace_eval_unrewind): Rewind also the excursions.
1412 (Fapply): Try and simplify the control flow.
1413
1414 2014-12-03 Chris Zheng <chriszheng99@gmail.com> (tiny change)
1415
1416 * gnutls.c (init_gnutls_functions, gnutls_certificate_details):
1417 Use gnutls_sign_get_name directly because
1418 gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231).
1419 (init_gnutls_functions): Load missing gnutls_server_name_set.
1420
1421 2014-12-02 Eli Zaretskii <eliz@gnu.org>
1422
1423 * bidi.c (bidi_find_first_overridden): New function.
1424
1425 * xdisp.c (Fbidi_find_overridden_directionality): New function.
1426 (syms_of_xdisp): Defsubr it.
1427
1428 * dispextern.h (bidi_find_first_overridden): Add prototype.
1429
1430 2014-12-02 Jan Djärv <jan.h.d@swipnet.se>
1431
1432 * nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
1433 to nil after release (Bug#9133).
1434
1435 2014-11-30 Paul Eggert <eggert@cs.ucla.edu>
1436
1437 Port better to AddressSanitizer.
1438 These changes suffice for temacs on x86-64 with GCC 4.9.2 and
1439 -fsanitize=address.
1440 * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
1441 Return -1 or 0, as the pipe trick doesn't work.
1442 * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
1443 * data.c (Ffset):
1444 * print.c (print_object):
1445 When a pointer-check primitive returns -1, do not assume this
1446 means the pointer is valid or that the underlying system has failed.
1447 It could just be that addresses are being sanitized so Emacs can't
1448 test for pointer validity.
1449 * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
1450 (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
1451 string validity checker doesn't work on stack-based strings.
1452
1453 2014-11-29 Paul Eggert <eggert@cs.ucla.edu>
1454
1455 Improve clarity of USE_LSB_TAG definition.
1456 Reported by Lee Duhem. Suggested by Andreas Schwab in:
1457 http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
1458 * lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
1459 VAL_MAX / 2 rather than in terms of the (more complicated)
1460 EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
1461
1462 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1463
1464 * xdisp.c (handle_single_display_spec): When ignoring a fringe
1465 bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
1466 (next_element_from_buffer): When done with overlays, reset the
1467 ignore_overlay_strings_at_pos_p flag. (Bug#19201)
1468
1469 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1470
1471 * w32fns.c (Fw32_shell_execute): Convert forward slashes in
1472 DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
1473
1474 2014-11-29 Ulrich Müller <ulm@gentoo.org>
1475
1476 * Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
1477 for paxctl and setfattr. Fixes temacs startup failure with
1478 grsecurity/PaX enabled Linux kernel (bug#19067).
1479
1480 2014-11-27 Oscar Fuentes <ofv@wanadoo.es>
1481
1482 * w32.c, w32heap.c, w32term.c:
1483 Use MINGW_W64 instead of _W64.
1484
1485 2014-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
1486
1487 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
1488
1489 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
1490
1491 * gnutls.c (gnutls_ip_address_p): New function.
1492 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
1493
1494 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
1495
1496 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
1497
1498 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
1499
1500 Fix gnutls problems caught by static checking.
1501 * gnutls.c (Fgnutls_boot): Remove unused local.
1502 (Fgnutls_boot): Fix pointer signedness.
1503
1504 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
1505
1506 * gnutls.c (gnutls_certificate_details): Don't include certain
1507 certificate details on older gnutls versions (bug#19168).
1508 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
1509 (gnutls_certificate_details): Reversed check in last checkin.
1510
1511 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
1512
1513 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
1514 (Fgnutls_peer_status_warning_describe): Add function to describe a
1515 peer verification warning symbol.
1516 (Fgnutls_peer_status): Use it.
1517 (Fgnutls_boot): Use it. Minor logging fixes.
1518
1519 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
1520
1521 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
1522
1523 2014-11-24 Glenn Morris <rgm@gnu.org>
1524
1525 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
1526
1527 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
1528 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
1529
1530 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
1531
1532 * gnutls.c: Fix Windows function definition of
1533 gnutls_x509_crt_get_fingerprint.
1534
1535 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
1536
1537 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
1538
1539 * process.h: Added more fields to Lisp_Process to track
1540 certificate details.
1541
1542 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
1543 (Fgnutls_peer_status): New functions to export TLS certificate
1544 details to Emacs Lisp.
1545
1546 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
1547
1548 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
1549 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
1550 check for gtk_adjustment_configure (Bug#19149).
1551 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
1552
1553 2014-11-22 Glenn Morris <rgm@gnu.org>
1554
1555 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
1556
1557 2014-11-22 Martin Rudalics <rudalics@gmx.at>
1558
1559 Don't shrink frame when using desktop-save-mode (Bug#19048).
1560 * w32fns.c (x_set_tool_bar_lines): Always call
1561 x_change_tool_bar_height (Bug#19048).
1562 (x_change_tool_bar_height): Mark frame as garbaged since
1563 adjust_frame_size might not have done that.
1564 * xfns.c (x_set_tool_bar_lines): Always call
1565 x_change_tool_bar_height (Bug#19048).
1566 (x_change_tool_bar_height): Mark frame as garbaged since
1567 adjust_frame_size might not have done that.
1568
1569 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
1570
1571 * xml.c (parse_region): Take care of new optional parameter
1572 'discard-comments' of 'libxml-parse(html|xml)-region'.
1573 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
1574 New optional parameter 'discard-comments'.
1575
1576 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
1577
1578 Improve time stamp handling, and be more consistent about it.
1579 * editfns.c (invalid_time): New function.
1580 Use it instead of 'error ("Invalid time specification")'.
1581 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
1582 (decode_float_time, lisp_to_timespec, lisp_time_struct):
1583 New functions.
1584 (make_time_tail, make_time): Remove. All uses changed to use
1585 new functions or plain list4i.
1586 (disassemble_lisp_time): Return effective length if successful.
1587 Check that LOW is an integer, if it's combined with other components.
1588 (decode_time_components): Decode into struct lisp_time, not
1589 struct timespec, so that we can support a wide set of times
1590 regardless of whether time_t is signed. Decode plain numbers
1591 as seconds since the Epoch, and nil as the current time.
1592 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
1593 Reimplement in terms of new functions.
1594 (Fencode_time): Just use list2i.
1595 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
1596 * keyboard.c (decode_timer): Don't allow the new formats (floating
1597 point or nil) in timers.
1598 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
1599 place of the magic number '16'.
1600 (struct lisp_time): New type.
1601 (decode_time_components): Use it.
1602 (lisp_to_timespec): New decl.
1603
1604 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
1605
1606 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
1607 text property.
1608
1609 * callint.c (Fcall_interactively): Pass in nil as argument to
1610 Fbarf_if_buffer_read_only.
1611
1612 * fileio.c (Finsert_file_contents): Ditto.
1613
1614 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
1615
1616 * textprop.c (verify_interval_modification): Check buffer
1617 readedness after the last interval.
1618
1619 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
1620 the text at POSITION (new optional argument) has the
1621 `inhibit-read-only' text property set.
1622
1623 2014-11-16 Eli Zaretskii <eliz@gnu.org>
1624
1625 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
1626 errors in computing the number of pixels to scroll.
1627 Suggested by Kelly Dean <kelly@prtime.org>. (Bug#19060)
1628
1629 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1630
1631 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
1632 call updateFrameSize.
1633
1634 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
1635
1636 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1637
1638 * nsfns.m (x_set_foreground_color, x_set_background_color)
1639 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
1640 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
1641
1642 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
1643
1644 * nsterm.m (ns_send_appdefined): Check for application defined
1645 event on Cocoa (Bug#18993).
1646 (run): Restore code before the previous 18993 fix.
1647
1648 2014-11-14 David Reitter <david.reitter@gmail.com>
1649
1650 * nsterm.m (run): Set timeout for event loop to prevent hang.
1651 (Bug#18993)
1652
1653 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
1654
1655 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
1656
1657 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1658
1659 * xfont.c (xfont_list_pattern): Do not allocate font entity object
1660 for each candidate font but attempt to reuse it from previous improper
1661 candidate, if any.
1662
1663 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
1664
1665 Avoid undefined behavior in color table hashing.
1666 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
1667 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
1668 This function avoids undefined behavior with signed shift overflow.
1669
1670 2014-11-10 Eli Zaretskii <eliz@gnu.org>
1671
1672 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
1673 when the inserted text does not need decoding. (Bug#18982)
1674
1675 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
1676
1677 * nsterm.h (EmacsScroller): judge returns bool.
1678
1679 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
1680 (ns_judge_scroll_bars): Only set removed if judge returns true.
1681 (judge): Returns bool == condemned. Remove self from window.
1682 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
1683
1684 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
1685
1686 * keyboard.c (command_loop_1): Record this-command in recent-keys.
1687 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
1688
1689 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
1690
1691 * nsterm.m (ns_set_vertical_scroll_bar)
1692 (ns_set_horizontal_scroll_bar): Cleanup merge error.
1693
1694 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
1695
1696 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
1697 merely because tmo_in_millisec is nonnegative. The 1st call
1698 to g_main_context_query could succeed while the 2nd one fails.
1699
1700 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
1701
1702 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1703
1704 * nsterm.m (run): Only use non-system event loop if OSX version is
1705 exactly 10.9 (Bug#18993).
1706 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
1707 needed (Bug#18757).
1708
1709 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1710
1711 * callproc.c (encode_current_directory): Support handling of file
1712 names prepended by "/:". (Bug#18891)
1713
1714 2014-11-08 Alan Mackenzie <acm@muc.de>
1715
1716 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
1717
1718 2014-11-08 Dima Kogan <dima@secretsauce.net>
1719
1720 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
1721
1722 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1723
1724 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
1725 raises an error. (Bug#18891)
1726
1727 2014-11-08 Martin Rudalics <rudalics@gmx.at>
1728
1729 * frame.c (adjust_frame_size): Call x_set_window_size only if
1730 f->can_x_set_window_size is set.
1731 (make_frame): Initialize f->can_x_set_window_size and
1732 f->can_run_window_configuration_change_hook.
1733 (Fcan_run_window_configuration_change_hook): New function.
1734 * frame.h (frame): Split `official' into `can_x_set_window_size'
1735 and `can_run_window_configuration_change_hook'.
1736 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
1737 * w32fns.c (Fx_create_frame, x_create_tip_frame):
1738 Set f->can_x_set_window_size.
1739 * window.c (run_window_configuration_change_hook):
1740 Return immediately if either f->can_x_set_window_size or
1741 f->can_run_window_configuration_change_hook are false.
1742 (Fset_window_configuration): Instead of f->official set
1743 f->can_x_set_window_size.
1744 * xfns.c (Fx_create_frame, x_create_tip_frame):
1745 Set f->can_x_set_window_size.
1746
1747 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1748
1749 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
1750 cleanup from 2014-11-01 (Bug#18972).
1751
1752 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
1753
1754 * keyboard.c: Call gui-set-selection instead of x-set-selection.
1755 * xdisp.c (window-scroll-functions): Improve docstring.
1756
1757 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
1758
1759 Uniquify the 'size' symbol.
1760 * frame.c (Qsize):
1761 * w32notify.c (Qsize): Remove.
1762 * lisp.h (Qsize): New decl.
1763 * lread.c (Qsize): Now extern.
1764 * w32notify.c (syms_of_w32notify): No need to defsym.
1765
1766 2014-11-07 Martin Rudalics <rudalics@gmx.at>
1767
1768 * dispnew.c (change_frame_size_1): Fix call of
1769 adjust_frame_size.
1770 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
1771 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1772 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1773 (Qtool_bar_size): New constants.
1774 (frame_inhibit_resize, adjust_frame_size): New argument to
1775 handle case where frame_inhibit_implied_resize is a list.
1776 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
1777 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
1778 (x_set_right_divider_width, x_set_bottom_divider_width)
1779 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
1780 (x_set_scroll_bar_width, x_set_scroll_bar_height):
1781 Update callers.
1782 (frame-inhibit-implied-resize): Rewrite doc-string.
1783 * frame.h (frame_inhibit_resize, adjust_frame_size):
1784 Fix external declarations.
1785 (Qframe_position, Qframe_outer_size)
1786 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1787 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1788 (Qtool_bar_size): Extern them.
1789 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
1790 (xg_height_or_width_changed): Remove.
1791 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
1792 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
1793 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
1794 (xg_change_toolbar_position): Call adjust_frame_size directly.
1795 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
1796 Fix calls of adjust_frame_size.
1797 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
1798 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
1799 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1800 frame can get resized when tool-bar-lines parameter changes from
1801 or to zero.
1802 (Fw32_frame_menu_bar_size): Return fourth value.
1803 (Fw32_frame_rect): Block input around system calls
1804 (Fx_frame_geometry): New function.
1805 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
1806 * w32term.c (x_new_font): Adjust adjust_frame_size call.
1807 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
1808 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
1809 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
1810 (Fx_create_frame): Adjust adjust_frame_size calls.
1811 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1812 frame can get resized when tool-bar-lines parameter changes from
1813 or to zero.
1814 (Fx_frame_geometry): New function.
1815 * xmenu.c (update_frame_menubar): On Lucid call
1816 adjust_frame_size with one pixel less height to avoid that
1817 repeatedly adding/removing the menu bar grows the frame.
1818 (free_frame_menubar): On Motif arrange to optionally preserve
1819 the old frame height when removing the menu bar.
1820 * xterm.c (x_new_font): Adjust adjust_frame_size call.
1821
1822 2014-11-03 Eli Zaretskii <eliz@gnu.org>
1823
1824 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
1825 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
1826 frame; instead, print an error message.
1827
1828 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
1829
1830 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
1831
1832 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
1833
1834 * nsimage.m (allocInitFromFile:): Initialize bmRep.
1835 (dealloc): Release bmRep.
1836
1837 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
1838 imageListSetNext, imageListNext.
1839
1840 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
1841 (reference): Remove.
1842 (allocInitFromFile:): Remove searching ImageList and calling
1843 reference (Bug#18918).
1844 (dealloc): Remove handling if ImageList.
1845
1846 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
1847
1848 * process.c (catch_child_signal): Fix incorrect assertion.
1849
1850 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1851
1852 * macfont.m (macfont_draw):
1853 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
1854
1855 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
1856 if force_integral_p (i.e. no antialias).
1857 (macfont_draw): Check ns_antialias_text, also turn off synthetic
1858 bold if no antialias (Bug#18876).
1859
1860 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
1861 was given (Bug#18846).
1862
1863 * nsterm.h (ns_set_doc_edited): Declare taking no args.
1864
1865 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
1866 instead of in xdisp.c, function now takes void. (Bug#18884).
1867
1868 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
1869 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
1870
1871 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
1872 struct window* (Bug#18889).
1873 Remove getMouseMotionPart.
1874 (ns_output): Make icon_top/left int.
1875
1876 * nsfns.m (x_icon): icon_top/left is int.
1877
1878 * nsterm.m (ns_mouse_position): Remove unused code.
1879 (initFrame:window:, dealloc): Use window instead of win.
1880 (getMouseMotionPart:window:x:y:): Remove, unused.
1881 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
1882
1883 2014-11-01 Eli Zaretskii <eliz@gnu.org>
1884
1885 * keyboard.c (readable_events): When FLAGS include
1886 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
1887 This avoids returning non-nil from input-pending-p when only such
1888 events are in the queue. (Bug#18856)
1889
1890 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1891
1892 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
1893 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
1894 (Qforeign_selection): Remove.
1895 (ns_get_local_selection): Identation fix.
1896 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
1897
1898 * nsselect.m (ns_get_local_selection): Remove calling of
1899 functions in Vselection_converter_alist (Bug#18911).
1900 (syms_of_nsselect): Remove Vselection_converter_alist.
1901
1902 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
1903
1904 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
1905 and unnecessary initialization. Adjust comments.
1906
1907 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1908
1909 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
1910 setting it to -1.
1911 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
1912 index, not an absolute one, as that's what the function expects.
1913
1914 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
1915
1916 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
1917 font on an initial frame when running as a daemon (Bug#18869).
1918
1919 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
1920
1921 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1922
1923 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
1924 build_string, when importing a home directory. (Bug#18873)
1925
1926 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1927
1928 * dispnew.c (buffer_posn_from_coords):
1929 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
1930 account for the header-line height. (Bug#18839)
1931
1932 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
1933
1934 * xml.c (parse_region): Do not forget the first document child.
1935
1936 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
1937
1938 * nsselect.m: pasteboard_changecount is new.
1939 (ns_store_pb_change_count, ns_get_pb_change_count)
1940 (ns_get_our_change_count_for): New functions.
1941 (ns_string_to_pasteboard_internal): Correct comment.
1942 type => gtype in eassert, Call ns_store_pb_change_count.
1943 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
1944 (Fns_disown_selection_internal, Fns_selection_owner_p):
1945 Replace Vselection_alist check, with change count check.
1946 (Fns_get_selection): Initialize val to Qnil. Only get local
1947 selection if change counts match (Bug#18799).
1948 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
1949
1950 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
1951
1952 * w32proc.c (create_child): If calling a quoted batch file,
1953 pass NULL for exe. (Bug#18745)
1954
1955 2014-10-24 Eli Zaretskii <eliz@gnu.org>
1956
1957 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
1958 (bidi_resolve_brackets): Use end of string position rather than ZV
1959 when iterating over a string. (Bug#18815)
1960
1961 2014-10-24 Martin Rudalics <rudalics@gmx.at>
1962
1963 * keyboard.c (make_lispy_position): Return coordinates also when
1964 on scroll bars, fringes, margins or not in a window.
1965 * xdisp.c (show_mouse_face): Don't change cursor face during
1966 mouse tracking.
1967
1968 2014-10-23 Martin Rudalics <rudalics@gmx.at>
1969
1970 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
1971 (frame_resize_pixelwise, frame_inhibit_implied_resize):
1972 Fix doc-strings (Bug#18789).
1973
1974 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
1975
1976 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
1977
1978 2014-10-22 Eli Zaretskii <eliz@gnu.org>
1979
1980 Optimize redisplay of simple bracketed text.
1981 * bidi.c (bidi_cache_reset_to): New function.
1982 (bidi_cache_reset): Call it.
1983 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
1984 member to -1.
1985 (bidi_resolve_explicit): Reset bracket_pairing_pos and
1986 bracket_enclosed_type only if bracket_pairing_pos's value is not
1987 ZV.
1988 (MAX_BPA_STACK): Make sure the value is signed.
1989 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
1990 stop pushing values onto the stack.
1991 (bidi_find_bracket_pairs): If the bracketed text is only on the
1992 base embedding level, remove all the states cached by this
1993 function from the cache, and return zero, so that the brackets in
1994 this segment of text are processed as normal neutrals.
1995 (bidi_resolve_brackets): Detect the brackets that are to be
1996 processed as neutrals, and don't call bidi_find_bracket_pairs on
1997 them. (Bug#18778)
1998
1999 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
2000
2001 * w32select.c (Fw32_selection_exists_p): Rename from
2002 Fx_selection_exists_p.
2003 (syms_of_w32select): Adjust accordingly.
2004
2005 * w16select.c (Fw16_selection_exists_p): Rename from
2006 Fx_selection_exists_p.
2007 (syms_of_win16select): Adjust accordingly.
2008
2009 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
2010 (Fns_own_selection_internal): Tighten scoping.
2011 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
2012 (Fns_get_selection): Rename from Fx_get_selection_internal.
2013 (Fns_get_selection_internal, Fns_store_selection_internal):
2014 Remove functions.
2015 (syms_of_nsselect): Adjust accordingly.
2016
2017 2014-10-21 Martin Rudalics <rudalics@gmx.at>
2018
2019 * w32fns.c (Fw32_frame_menu_bar_size): New function.
2020 * w32term.c (x_set_window_size): Account for wrapped menu bar
2021 lines when setting up frame height (Bug#15174 and Bug#18720).
2022 (w32_add_wrapped_menu_bar_lines): New variable.
2023
2024 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
2025
2026 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
2027 move point.
2028
2029 2014-10-20 Glenn Morris <rgm@gnu.org>
2030
2031 * Merge in all changes up to 24.4 release.
2032
2033 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
2034
2035 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
2036 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
2037
2038 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
2039
2040 * xterm.c (handle_one_xevent): Check return value from
2041 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
2042 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
2043
2044 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
2045 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
2046 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
2047 Gtk+ >= 3.14 (Bug#18674).
2048 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
2049 Gtk+ >= 3.14 (Bug#18674).
2050
2051 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
2052
2053 * gtkutil.c: Remove no-longer-used code.
2054 (xg_update_menubar): Remove unused local and unnecessary call to
2055 gtk_menu_item_get_submenu.
2056 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
2057 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
2058 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
2059
2060 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
2061
2062 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
2063
2064 * xterm.h (handlebox_widget): Remove.
2065
2066 * xmenu.c (set_frame_menubar): Remove GTK block that calls
2067 xg_have_tear_offs.
2068
2069 * gtkutil.h (xg_have_tear_offs): Remove declaration.
2070
2071 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
2072 to handle Gtk versions.
2073 (xg_get_file_with_chooser): Use them.
2074 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
2075 Remove (create_menus): Remove teroff argument and code.
2076 Remove call to gtk_menu_set_title.
2077 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
2078 Adjust args to create_menus.
2079 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
2080 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
2081 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
2082 (xg_make_tool_item): Remove detach code.
2083 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
2084 (find_icon_from_name): New function.
2085 (update_frame_tool_bar): Remove GtkStockItem code, move to
2086 find_icon_from_name. Let stock be a list of icon names to try.
2087 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
2088 Replace TOOLBAR_TOP_WIDGET.
2089 (free_frame_tool_bar, xg_change_toolbar_position ):
2090 Replace TOOLBAR_TOP_WIDGET.
2091 (xg_initialize): Remove tearoff code.
2092
2093 2014-10-18 Eli Zaretskii <eliz@gnu.org>
2094
2095 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
2096 pixel from the window's cursor glyph width, since X renders hollow
2097 blocks 1 pixel wider than the 'width' parameter.
2098
2099 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
2100 glyph->pixel_width; this is now done in xterm.c.
2101
2102 Fix reordering of bracket characters in isolates.
2103 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
2104 RESOLVED_ONLY; when non-zero, return from the cache only fully
2105 resolved states. All callers changed.
2106 (CANONICAL_EQU): New macro.
2107 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
2108 equivalent of the paired closing bracket character.
2109 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
2110 the default non-negative value, to be checked later in
2111 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
2112 characters against those pushed onto the BPA stack.
2113 (bidi_record_type_for_neutral): New function.
2114 (bidi_resolve_brackets): Record next_for_neutral and
2115 prev_for_neutral when embedding level gets pushed. Force
2116 resolution of bracket pairs when entering a level run that was not
2117 yet BPA-resolved.
2118 (bidi_resolve_neutral): Add assertions before calling
2119 bidi_resolve_neutral_1.
2120 (bidi_level_of_next_char): Remove the code that attempted to
2121 resolve unresolved neutrals; that is now done by
2122 bidi_resolve_neutral.
2123
2124 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
2125
2126 2014-10-17 Eli Zaretskii <eliz@gnu.org>
2127
2128 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
2129 1-pixel R2L characters.
2130 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
2131 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
2132
2133 2014-10-16 Eli Zaretskii <eliz@gnu.org>
2134
2135 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
2136 useful.
2137
2138 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
2139
2140 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
2141 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
2142 It's not clear to me whether the initialization is needed,
2143 but it can't hurt so I played it safe.
2144
2145 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
2146
2147 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
2148
2149 2014-10-15 Eli Zaretskii <eliz@gnu.org>
2150
2151 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
2152 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
2153 Remove variable.
2154 (bidi_get_type): Return the isolate initiators and terminator types.
2155 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
2156 (bidi_fetch_char_skip_isolates, find_first_strong_char)
2157 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
2158 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
2159 for the new features.
2160 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
2161 push and pop correctly for isolates.
2162 (bidi_remember_char): Modify to accept an additional argument
2163 and record the bidi type according to its value.
2164 (bidi_cache_iterator_state): Accept an additional argument to only
2165 update an existing state. Handle the new members of struct bidi_it.
2166 (bidi_cache_find): Arguments changed: no longer accepts a level,
2167 instead accepts a flag telling it whether it is okay to return
2168 unresolved neutrals.
2169 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
2170 table. Initialize new isolate-related members.
2171 (bidi_paragraph_init): Some code factored out into
2172 find_first_strong_char.
2173 (bidi_resolve_explicit_1): Function deleted, its code incorporated
2174 into bidi_resolve_explicit.
2175 (bidi_resolve_explicit): Support the isolate initiators and
2176 terminator. Fix handling of embeddings and overrides according to
2177 new UBA requirements. Record information about previously seen
2178 characters here (moved from bidi_level_of_next_char).
2179 (bidi_resolve_weak): Adapt to changes in struct members.
2180 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
2181 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
2182 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
2183 paired bracket resolution. Handle isolate initiators and
2184 terminator.
2185 (bidi_type_of_next_char): Remove unneeded code for BN limit.
2186 (bidi_level_of_next_char): Move the code that records information
2187 about previous characters to bidi_resolve_explicit. Fix logic of
2188 resolving neutrals and make sure their cache entries are updated.
2189 Remove now unneeded special handling of PDF level.
2190
2191 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
2192 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
2193 enlarged per Unicode 6.3.
2194 (enum bidi_bracket_type_t): New data type.
2195 (struct bidi_saved_info): Leave only 2 type members out of 4.
2196 Remove bytepos.
2197 (struct bidi_stack): Add members necessary to support isolating
2198 sequences.
2199 (struct bidi_it): Add new members necessary to support isolating
2200 sequences and bracket pair resolution.
2201
2202 * xdisp.c (Fbidi_resolved_levels): New function.
2203 (syms_of_xdisp): Defsubr it.
2204 (append_glyph, append_composite_glyph, produce_image_glyph)
2205 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
2206 assertions.
2207 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
2208
2209 * term.c (append_glyph, append_composite_glyph)
2210 (append_glyphless_glyph): Convert aborts to assertions.
2211
2212 * .gdbinit (pgx): Display the character codepoint, resolved level,
2213 and bidi type also for glyphless glyphs.
2214
2215 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
2216
2217 Avoid unwanted point motion in Fline_beginning_position.
2218 * lisp.h (scan_newline_from_point): Add prototype.
2219 * search.c (scan_newline_from_point): New function, refactored from...
2220 * cmds.c (Fforward_line): ...adjusted user.
2221 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
2222 and simplify the former since the latter doesn't move point.
2223
2224 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
2225
2226 Cleanup terminal handling code.
2227 * dispextern.h (get_named_tty): Remove prototype but...
2228 * termhooks.h (get_named_terminal): ...resurrect it under
2229 more meaningful name.
2230 (get_terminal): Likewise, but with...
2231 (decode_live_terminal): ...this name.
2232 (decode_tty_terminal): Add prototype.
2233 * term.c (get_tty_terminal): Remove.
2234 (get_named_tty): Remove.
2235 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
2236 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
2237 Use decode_tty_terminal.
2238 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
2239 * terminal.c (get_terminal): Refactor to...
2240 (decode_terminal, decode_live_terminal): ...new functions.
2241 (decode_tty_terminal): Replacement for get_tty_terminal.
2242 (get_named_terminal): Likewise for get_named_tty.
2243 * coding.c (Fset_terminal_coding_system_internal)
2244 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
2245 (Fkeyboard_coding_system):
2246 * composite.c (Fcomposition_get_gstring):
2247 * dispnew.c (Fsend_string_to_terminal):
2248 * frame.c (Fmake_terminal_frame):
2249 * nsfns.m (check_ns_display_info):
2250 * w32fns.c, xfns.c (check_x_display_info):
2251 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
2252 * keyboard.c (handle_interrupt_signal, handle_interrupt)
2253 (Fset_quit_char): Use get_named_terminal.
2254 (Fset_output_flow_control, Fset_input_meta_mode):
2255 Use decode_tty_terminal.
2256
2257 2014-10-13 Eli Zaretskii <eliz@gnu.org>
2258
2259 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
2260 between 32-bit and 64-bit MinGW builds. (Bug#18699)
2261
2262 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2263
2264 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
2265 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
2266
2267 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2268
2269 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
2270 (bug#18638).
2271
2272 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2273
2274 * editfns.c (dump_tz_string): No longer const.
2275 It might be modified.
2276
2277 * nsmenu.m (clear): Assume OS X 10.6 or later.
2278
2279 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
2280
2281 * unexmacosx.c: Remove include ppc/reloc.h.
2282 (unrelocate, copy_dysymtab): Remove PPC code.
2283 (rebase_reloc_address): Remove, only used for PPC:
2284
2285 * nsterm.m: Always include macfont.h on COCOA.
2286 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
2287 (ns_dumpglyphs_image, ns_check_menu_open)
2288 (applicationDidFinishLaunching)
2289 (antialiasThresholdDidChange:)
2290 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
2291 Remove checks for OSX <= 10.5/10.6.
2292 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
2293 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
2294 GNUSTEP.
2295
2296 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
2297 (NS_HAVE_NSINTEGER): Remove block.
2298 Remove >= OSX 10.6 tests.
2299
2300 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
2301 (x_activate_menubar, trackingNotification:): Remove check for
2302 OSX >= 10.5.
2303 (menuNeedsUpdate:): Remove check for OSX < 10.5.
2304
2305 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
2306
2307 * nsfns.m: Always include macfont.h on COCOA.
2308 (ns_filename_from_panel, ns_directory_from_panel)
2309 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
2310 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
2311
2312 * macfont.m: Remove >= 1050 check.
2313 (macfont_create_family_with_symbol)
2314 (macfont_get_glyph_for_character)
2315 (mac_font_get_glyphs_for_variants)
2316 (mac_ctfont_create_available_families, syms_of_macfont):
2317 Remove code for OSX < 10.6.
2318 (mac_font_family_group, mac_font_family_compare): Remove, only used
2319 for OSX < 10.6.
2320
2321 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
2322 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
2323
2324 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
2325 comment.
2326
2327 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2328
2329 Fix putenv race conditions with undefined behavior (Bug#8705).
2330 Do all putenv calls before Emacs creates any threads.
2331 Use a safer way to modify the TZ environment variable in the
2332 presence of multiple threads. For further thread-safety,
2333 prefer localtime_r and gmtime_r to localtime and gmtime,
2334 and prefer struct tm's tm_gmtoff (if available) to calling
2335 both localtime_r and gmtime_r.
2336 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
2337 (init_dbusbind): ... to this new function.
2338 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
2339 * xterm.c (x_term_init): Move xputenv call from here ...
2340 (init_xterm): ... to this new function.
2341 * emacs.c (main) [USE_GTK]: Call it before creating threads.
2342 * editfns.c (HAVE_TM_GMTOFF): Default to false.
2343 (dump_tz_string): New constant.
2344 (init_editfns): Use it. This centralizes the dump_tz stuff.
2345 Call set_time_zone_rule here, so that its xputenv is done
2346 before Emacs goes multithreaded.
2347 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
2348 thread-safe enough for Emacs.
2349 (format_time_string, Fdecode_time, Fcurrent_time_string)
2350 (Fcurrent_time_zone):
2351 Prefer localtime_r and gmtime_r, which are more thread-safe, to
2352 localtime and gmtime. Remove now-unnecessary calls to block_input.
2353 (tm_gmtoff): New static function.
2354 (Fdecode_time, Fcurrent_time_zone): Use it.
2355 (Fencode_time): Use mktime_z, for better thread-safety.
2356 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
2357 i.e., not quite thread-safe but good enough for Emacs typical usage.
2358 Do not reclaim storage that is in the environment; let it leak.
2359 Always call tzset, since localtime_r does not.
2360 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
2361 This is now done in init_editfns.
2362 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
2363 New macros and declarations, for platforms lacking tzalloc & friends.
2364
2365 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
2366
2367 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
2368 On x86 platforms this works around GCC bug 63495
2369 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
2370 and more generally should fix a portability problem in Emacs.
2371 Reported by Stefan Monnier in:
2372 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
2373
2374 2014-10-08 Leo Liu <sdl.web@gmail.com>
2375
2376 Enhance terpri to allow conditionally output a newline. (Bug#18652)
2377 * keymap.c (describe_vector_princ):
2378 * keyboard.c (Fcommand_error_default_function): Adapt to change to
2379 Fterpri.
2380
2381 * print.c (printchar_stdout_last): Declare.
2382 (printchar): Record the last char written to stdout.
2383 (Fterpri): Add optional argument ENSURE.
2384
2385 2014-10-08 Eli Zaretskii <eliz@gnu.org>
2386
2387 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
2388 DELAY argument to change_frame_size, so that the frame size
2389 changes, if any are needed, are delayed until the next redisplay.
2390 This is to avoid a too early QUIT inside change_frame_size, when
2391 it calls Lisp in frame_windows_min_size, in case one of the events
2392 we've read sets the quit-flag. (Bug#18649)
2393
2394 * w32fns.c (check_x_display_info): Accept terminal objects as
2395 argument, to follow what xfns.c does.
2396
2397 2014-10-07 Glenn Morris <rgm@gnu.org>
2398
2399 * Makefile.in ($(srcdir)/macuvs.h)
2400 ($(lispsource)/international/charprop.el): Add explicit FORCE.
2401
2402 2014-10-07 Eli Zaretskii <eliz@gnu.org>
2403
2404 * decompress.c (init_zlib_functions): Move the message about zlib
2405 being unavailable from here...
2406 (Fzlib_decompress_region): ...to here. (Bug#18650)
2407
2408 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
2409
2410 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
2411 the case where an optional string is used. Adjust docstring.
2412
2413 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
2414
2415 * lisp.mk (lisp): Remove w32-common-fns.elc.
2416
2417 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
2418
2419 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
2420 These were already defined in buffer.c, and the duplicate
2421 definitions cause problems on platforms like 'gcc -fno-common'.
2422 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
2423
2424 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
2425
2426 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
2427 if toolbar is visible.
2428
2429 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
2430 0.23 (Bug#18030).
2431
2432 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
2433 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
2434 (ns_select, ns_read_socket): Use unwind_protect to decrease
2435 apploopnr (Bug#18345).
2436 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
2437 line height (Bug#17977).
2438
2439 * macfont.m: Fix indentation and import changes from macport 24.3.94.
2440 (macfont_closest_traits_index): New function.
2441 (macfont_closest_traits_index_p): Rename from
2442 macfont_closest_traits_index.
2443 (macfont_list): Use macfont_closest_traits_index_p.
2444
2445 2014-10-05 K. Handa <handa@gnu.org>
2446
2447 * coding.c (detect_coding_iso_2022): Set coding->rejected
2448 correctly when an invalid escape sequence is found (Bug#18610).
2449
2450 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
2451
2452 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
2453 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
2454 for add_tearoff_p.
2455
2456 2014-10-04 Martin Rudalics <rudalics@gmx.at>
2457
2458 * buffer.c (scroll_bar_width, scroll_bar_height):
2459 Fix doc-strings.
2460 * window.c (Fset_window_scroll_bars): Fix doc-string.
2461 (Fwindow_scroll_bars): Have it return what the doc-string says.
2462
2463 2014-10-03 Eli Zaretskii <eliz@gnu.org>
2464
2465 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
2466 iterator backwards, to resync the bidi iterator. (Bug#18584)
2467
2468 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
2469
2470 Consistently use min and max macros from lisp.h.
2471 * coding.c (min, max):
2472 * font.c (MAX):
2473 * unexhp9k800.c (min):
2474 * unexw32.c (min, max): Use definitions from lisp.h.
2475 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
2476 Adjust users.
2477 * gmalloc.c (min): Tiny style change.
2478
2479 * fileio.c (emacs_readlinkat, Finsert_file_contents):
2480 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
2481
2482 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
2483
2484 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
2485 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
2486 (X_ULONG_MAX): Move these macros to xterm.h.
2487 (x_fill_property_data): Be more generous about allowing either
2488 signed or unsigned data of the appropriate width.
2489 * xterm.h (x_display_set_last_user_time): New function.
2490 All setters of last_user_time changd to use this function.
2491 If ENABLE_CHECKING, check that the times are in range.
2492
2493 2014-10-02 Eli Zaretskii <eliz@gnu.org>
2494
2495 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
2496 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2497
2498 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
2499
2500 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
2501 make a font_object from a tty frame (Bug#18573).
2502 (Finternal_set_lisp_face_attribute): Add FIXME comment.
2503
2504 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
2505
2506 * alloc.c (mark_overlay): Assume that overlay boundaries are
2507 always markers. Add comment.
2508 * lread.c (read_internal_start): Use convenient validate_subarray.
2509 Adjust docstring.
2510 (Fread_from_string): Adjust docstring.
2511
2512 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2513
2514 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
2515
2516 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
2517 Rename from the "x-" prefix.
2518
2519 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2520
2521 * xselect.c (selection-converter-alist): Fix docstring.
2522
2523 2014-10-01 Eli Zaretskii <eliz@gnu.org>
2524
2525 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
2526 argument passed by the caller, when we mirror all slashes into
2527 backslashes.
2528
2529 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
2530
2531 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
2532 Resurrect old code and fix compilation with GTK < 2.13.6.
2533
2534 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
2535
2536 Use AUTO_CONS instead of SCOPED_CONS, etc.
2537 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
2538 * lisp.h (AUTO_CONS): Rename from scoped_cons.
2539 (AUTO_LIST1): Rename from scoped_list1.
2540 (AUTO_LIST2): Rename from scoped_list2.
2541 (AUTO_LIST3): Rename from scoped_list3.
2542 (AUTO_LIST4): Rename from scoped_list4.
2543 (AUTO_STRING): Rename from SCOPED_STRING.
2544 * frame.h (AUTO_FRAME_ARG):
2545 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
2546 (AUTO_LIST4, AUTO_STRING):
2547 Prepend a new argument 'name'.
2548 Declare a variable instead of yielding a value.
2549 All uses changed.
2550 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
2551
2552 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2553
2554 * w32fns.c (w32_createwindow): Accept an additional argument, an
2555 array of 2 values specifying the coordinates of the frame's
2556 top-left corner. Use these values instead of calling x_get_arg,
2557 which can cons Lisp objects, and therefore cannot be called except
2558 from the main thread. Remove redundant tests for the default
2559 values.
2560 (my_create_window): Move the calculation of the coordinates of the
2561 frame's top-left edge here. Pass them to the input thread via the
2562 second parameter of the WM_EMACS_CREATEWINDOW message.
2563 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
2564 for the details.
2565
2566 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2567
2568 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
2569 (redisplay_window): Treat the frame's frozen_window_starts flag
2570 the same way as the optional_new_start flag for the window: only
2571 obey it if the glyph row showing point will be fully visible.
2572 Likewise when the window start is in a continuation line. If,
2573 after trying everything under the 'force_start' label, point is
2574 still not fully visible, give up and scroll the window.
2575 Add debugging traces. (Bug#18545)
2576
2577 * window.c (Frecenter): Set the window's redisplay flag.
2578
2579 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2580
2581 * w32term.c (w32_read_socket): Don't use frame dimensions for
2582 resizing if GetClientRect returned an empty (0, 0, 0, 0)
2583 rectangle. Check the return value of GetClientRect, and don't use
2584 the results if it didn't succeed.
2585
2586 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
2587 in columns and lines after correcting the pixel dimensions in
2588 check_frame_size.
2589 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
2590 negative values to xrealloc. (Bug#18528)
2591
2592 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
2593
2594 * alloc.c: Remove now-unnecessary check.
2595 Suggested by Dmitry Antipov in:
2596 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
2597
2598 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
2599
2600 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
2601 to Ubuntu 14.04.1 x86-64.
2602
2603 Simplify stack-allocated Lisp objects, and make them more portable.
2604 The build_local_string macro was used in two ways: (1) string
2605 literals for which scoped allocation suffices, and (2) file name
2606 components, where it's not safe in general to assume bounded-size
2607 ASCII data. Simplify by defining a new macro SCOPED_STRING that
2608 allocates a block-scope string, and by using SCOPED_STRING for (1)
2609 and build_string for (2). Furthermore, actually use stack
2610 allocation only for objects known to have sufficient alignment.
2611 This simpler implementation means Emacs can make
2612 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
2613 GC_MAKE_GCPROS_NOOPS.
2614 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
2615 for fewer differences among implementations.
2616 (struct Lisp_String): Now GCALIGNED.
2617 (USE_STACK_LISP_OBJECTS): Default to true, since the
2618 implementation no longer insists on a nonempty GCALIGNED.
2619 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
2620 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
2621 separately. Move definiens to scoped_cons. The old definition
2622 was incorrect when GCALIGNED was defined to be empty.
2623 (union Aligned_String): New type.
2624 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
2625 implementation ports to compilers that don't align strictly enough.
2626 Don't worry about the union sizes; it's not worth bothering about.
2627 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
2628 Rewrite using USE_STACK_CONS.
2629 (scoped_cons): Assume the use of union Aligned_Cons.
2630 (lisp_string_size, make_local_string, build_local_string): Remove.
2631 Unless otherwise specified, all callers of build_local_string
2632 changed to use SCOPED_STRING.
2633 (SCOPED_STRING): New macro.
2634 * data.c (wrong_choice):
2635 * menu.c (single_menu_item):
2636 * process.c (Fformat_network_address):
2637 Hoist use of SCOPED_STRING out of a scope, so that its returned
2638 object lives long enough.
2639 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
2640 as the string might be long or might not be ASCII.
2641
2642 2014-09-29 Eli Zaretskii <eliz@gnu.org>
2643
2644 * msdos.c (internal_terminal_init): Bump version to 25.
2645
2646 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
2647
2648 Keep stack-allocated Lisp objects fast rather than versatile.
2649 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
2650 (SCOPED_CONS_INITIALIZER): New macro.
2651 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
2652 (USE_LOCAL_ALLOCA): Remove.
2653 (local_cons, local_list1, local_list2, local_list3, local_list4):
2654 Remove. Stack overflow checking makes them too slow.
2655 (make_local_vector): Likewise. Also we just don't have enough
2656 users for it.
2657 (enum LISP_STRING_OVERHEAD): Remove.
2658 (local_string_init, local_vector_init): Remove prototypes.
2659 (make_local_string, build_local_string): Redesign to target short
2660 compile-time string constants, fall back to regular string allocation
2661 where appropriate.
2662 (lisp_string_size): New function.
2663 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
2664 * alloc.c (local_string_init, local_vector_init): Remove.
2665 (verify_ascii) [ENABLE_CHECKING]: New function.
2666 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
2667 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
2668 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
2669 * xselect.c, xterm.c: All related users changed.
2670
2671 2014-09-28 Ken Brown <kbrown@cornell.edu>
2672
2673 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
2674 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
2675
2676 2014-09-27 Ken Brown <kbrown@cornell.edu>
2677
2678 Fix implementation of HYBRID_MALLOC on Cygwin.
2679 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
2680 (bss_sbrk_buffer_beg): New variable. Use it...
2681 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
2682 incorrect definition.
2683
2684 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
2685
2686 * keyboard.c (track-mouse): Rename to internal--track-mouse.
2687 Make it into a function and change arg to be a function.
2688
2689 * lisp.mk (lisp): Add elisp-mode.elc.
2690
2691 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
2692
2693 * xfns.c (x_default_scroll_bar_color_parameter):
2694 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
2695 to pacify --enable-gcc-warnings in non-scrollbar builds.
2696
2697 2014-09-26 Ken Brown <kbrown@cornell.edu>
2698
2699 * w32term.h (ALIGN_STACK): Fix the cpp condition.
2700
2701 2014-09-25 Eli Zaretskii <eliz@gnu.org>
2702
2703 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
2704 MinGW builds that use GCC before 4.2.
2705
2706 Default to stack objects on DOS_NT platforms as well.
2707 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
2708 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
2709
2710 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
2711
2712 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
2713 ALIGN_STACK attribute.
2714
2715 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
2716
2717 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
2718 ALIGN_STACK attribute.
2719
2720 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
2721 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
2722
2723 2014-09-25 Martin Rudalics <rudalics@gmx.at>
2724
2725 * frame.c (frame_inhibit_resize):
2726 * widget.c (EmacsFrameResize):
2727 * window.c (resize_frame_windows, Fset_window_configuration):
2728 * xdisp.c (expose_frame):
2729 * xfns.c (x_change_tool_bar_height):
2730 * xmenu.c (update_frame_menubar):
2731 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
2732 Remove code left dead after 2014-07-27 changes.
2733
2734 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
2735
2736 Fix local_cons etc. to not exhaust the stack when in a loop.
2737 Problem reported in:
2738 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
2739 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2740 * charset.c (load_charset_map_from_file, Ffind_charset_region)
2741 (Ffind_charset_string):
2742 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
2743 * data.c (wrong_range):
2744 * editfns.c (Fpropertize, format2):
2745 * emacs.c (init_cmdargs, decode_env_path):
2746 * fileio.c (auto_save_error):
2747 * fns.c (Fyes_or_no_p):
2748 * font.c (font_style_to_value, font_parse_xlfd)
2749 (font_parse_family_registry, font_delete_unmatched)
2750 (font_add_log):
2751 * fontset.c (Fset_fontset_font):
2752 * frame.c (x_get_arg):
2753 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
2754 (read_char_minibuf_menu_prompt):
2755 * keymap.c (silly_event_symbol_error, describe_vector):
2756 * lread.c (load_warn_old_style_backquotes):
2757 * menu.c (single_menu_item):
2758 * minibuf.c (Fread_buffer):
2759 * process.c (status_message, Fformat_network_address)
2760 (server_accept_connection):
2761 * textprop.c (copy_text_properties):
2762 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2763 * xfns.c (x_default_scroll_bar_color_parameter):
2764 * xfont.c (xfont_open):
2765 * xselect.c (x_clipboard_manager_error_1):
2766 * xterm.c (x_term_init):
2767 Put USE_LOCAL_ALLOCA at the start of the function.
2768 * fns.c (maybe_resize_hash_table): Use build_string instead of
2769 build_local_string, since we'd otherwise need a conditional
2770 USE_LOCAL_ALLOCA here, but this is just debugging output and is
2771 not worth the bother of optimization.
2772 * font.c (font_delete_unmatched): Remove by-hand code that
2773 observed MAX_ALLOCA limit, since it's now done automatically.
2774 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
2775 since build_local_string needs its sa_alloc.
2776 * lisp.h (lisp_word_count): New function.
2777 (SAFE_ALLOCA_LISP): Use it.
2778 (USE_LOCAL_ALLOCA): New macro.
2779 (local_cons, make_local_vector, make_local_string):
2780 Observe the MAX_ALLOCA limit.
2781 (LISP_STRING_OVERHEAD): New constant.
2782 (make_local_string): Use it.
2783
2784 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2785
2786 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
2787 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
2788 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
2789 and Solaris and it's likely to work on similar platforms.
2790
2791 Avoid signed integer overflow when converting Time to ptrdiff_t.
2792 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
2793 New macros.
2794 (position_to_Time, Time_to_position): New functions.
2795 (gen_help_event, kbd_buffer_get_event): Use them.
2796 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
2797 Go back to plain 'unsigned long', so that 'Time' is the same
2798 for both X and non-X builds; this is less likely to cause surprise.
2799 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
2800 are the same size; this is no longer required.
2801
2802 * keyboard.c (make_lispy_event): Avoid unnecessary tests
2803 of bit 28 and of whether an unsigned value is negative.
2804 This simplifies the code a bit, and pacifies clang 3.4.
2805
2806 2014-09-24 Eli Zaretskii <eliz@gnu.org>
2807
2808 * systime.h (Time): Define as size_t, to be consistent with 64-bit
2809 Windows builds, where 'long' is a 32-bit type.
2810
2811 * w32inevt.h (w32_console_mouse_position): Update the argument
2812 types to use 'Time'.
2813
2814 * w32term.c (w32_mouse_position)
2815 (x_horizontal_scroll_bar_report_motion)
2816 (x_scroll_bar_report_motion): Update the argument types to use
2817 'Time'.
2818
2819 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
2820
2821 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
2822 (struct input_event): ...unsigned bitfields. Likewise for
2823 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
2824 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
2825 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
2826 (kbd_buffer_get_event): Adjust users.
2827 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
2828 (make_scroll_bar_position): New function, refactored out of...
2829 (make_lispy_event): ...adjusted user.
2830 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
2831 * nsterm.m (ns_mouse_position, mouseUp):
2832 * term.c (term_mouse_position):
2833 * w32inevt.c (w32_console_mouse_position):
2834 * w32term.c (w32_mouse_position):
2835 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
2836 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
2837 Prefer enum and explicit enum members to integers and numeric values.
2838
2839 * chartab.c (uniprop_encode_value_numeric):
2840 * font.c (font_style_to_value): Use make_local_vector.
2841 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
2842 * keymap.c (append_key): Use scoped_list1.
2843
2844 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
2845 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
2846
2847 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2848
2849 Fix some slow uses and misuses of strcat.
2850 * doc.c (get_doc_string):
2851 * gtkutil.c (get_utf8_string):
2852 * xsmfns.c (x_session_initialize):
2853 Avoid recomputation of string length.
2854 * ftfont.c (ftfont_spec_pattern):
2855 * xfns.c (xic_create_fontsetname):
2856 Don't assume output buffer is initially zero.
2857
2858 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2859
2860 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
2861 All callers changed.
2862 * xterm.c (x_term_init): Use new functionality to avoid two needs
2863 to compute a string length.
2864
2865 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
2866
2867 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
2868
2869 Use known length of a Lisp string to copy it faster.
2870 * lisp.h (lispstrcpy): New function. Add comment.
2871 * callproc.c (child_setup):
2872 * dbusbind.c (xd_append_arg):
2873 * doc.c (get_doc_string):
2874 * font.c (Ffont_xlfd_name):
2875 * frame.c (xrdb_get_resource):
2876 * process.c (Fmake_network_process, network_interface_info):
2877 * w32fns.c (Fx_open_connection):
2878 * w32proc.c (sys_spawnve):
2879 * xfns.c (select_visual):
2880 * xfont.c (xfont_list):
2881 * xsmfns.c (x_session_initialize):
2882 * xterm.c (x_term_init): Use it.
2883
2884 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2885
2886 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
2887 Reported by Dmitry Antipov in thread leading to:
2888 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
2889 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
2890 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
2891 remain unfixed.
2892 * callproc.c (call_process): Save and restore sa_avail.
2893 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
2894 (AVAIL_ALLOCA): New macro.
2895 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
2896 Use it, and check against sa_avail rather than MAX_ALLOCA.
2897
2898 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2899
2900 On OSX, do not free font-specific data more than once (Bug#18501).
2901 * macfont.m (macfont_close): Release and free font-specific data
2902 only if it wasn't previously freed.
2903
2904 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
2905
2906 * unexmacosx.c (dump_it): Improve error message.
2907
2908 2014-09-22 Juri Linkov <juri@jurta.org>
2909
2910 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
2911 (Bug#10747, bug#18334)
2912
2913 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2914
2915 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
2916 units in which the position is measured. (Bug#18493)
2917
2918 * xdisp.c (redisplay_internal): Force redisplay of all windows
2919 that show a buffer whose narrowing has changed. (Bug#18490)
2920
2921 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2922
2923 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
2924 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
2925 lines, draw the hollow-box and hbar cursors on the right side of
2926 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
2927 testing on X.
2928
2929 * xterm.c (x_draw_stretch_glyph_string):
2930 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
2931 caused the block cursor to disappear on a TAB in R2L lines in
2932 every window except the leftmost one. Reported by Martin Rudalics
2933 <rudalics@gmx.at>.
2934
2935 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2936
2937 Always use matched specpdl entry to record call arguments (Bug#18473).
2938 * lisp.h (record_in_backtrace): Adjust prototype.
2939 * eval.c (record_in_backtrace): Return current specpdl level.
2940 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
2941 (eval_sub, Ffuncall): Record call arguments in matched specpdl
2942 entry and use that entry in call to backtrace_debug_on_exit.
2943 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
2944 (do_debug_on_call): Get current specpdl level as 2nd arg.
2945
2946 Prefer ptrdiff_t to int and avoid integer overflows.
2947 * fileio.c (make_temp_name):
2948 * font.c (font_parse_family_registry): Avoid integer
2949 overflow on string size calculation.
2950 * data.c (Faset): Likewise for byte index.
2951
2952 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2953
2954 Fix display of R2L lines in partial-width windows.
2955 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
2956 assigned the correct value.
2957 (extend_face_to_end_of_line): Account for truncation and
2958 continuation glyphs in R2L rows when one of the fringes is not
2959 displayed.
2960 (display_line): Don't assign negative X offset to a row if we are
2961 going to produce a truncation glyph for it. When handling
2962 truncated R2L rows, consider the width of the left fringe instead
2963 of the right one.
2964 (produce_special_glyphs): Fix bogus assignments.
2965
2966 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2967
2968 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
2969 always set to a valid value. Make sure the size passed to alloca
2970 is always positive. (Bug#18516)
2971
2972 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2973
2974 Avoid extra call to oblookup when interning symbols.
2975 * lisp.h (intern_driver): Add prototype.
2976 * lread.c (intern_driver): New function.
2977 (intern1, intern_c_string_1, Fintern):
2978 * font.c (font_intern_prop):
2979 * w32font.c (intern_font_name): Use it.
2980
2981 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
2982
2983 Minor improvements to new stack-allocated Lisp objects.
2984 * frame.h (FRAME_PARAMETER):
2985 Prefer scoped_list1 to local_list1 where either would do.
2986 * lisp.h (scoped_list4): New macro.
2987 (local_cons, local_list1, local_list2, local_list3, local_list4)
2988 (make_local_vector, make_local_string, build_local_string):
2989 Prefer functions to macros where either would do.
2990 * xdisp.c (build_desired_tool_bar_string):
2991 Prefer scoped_list4 to local_list4 where either would do.
2992
2993 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
2994
2995 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
2996 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
2997 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
2998 * frame.h (FRAME_PARAMETER): New macro.
2999 * dispnew.c (init_display):
3000 * fontset.c (Fset_fontset_font):
3001 * frame.c (x_default_parameter):
3002 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
3003 * xfns.c (x_default_scroll_bar_color_parameter)
3004 (x_default_font_parameter, x_create_tip_frame): Use it.
3005 * editfns.c (Fpropertize): Use local_cons.
3006 * process.c (status_message): Use build_local_string.
3007 * xfont.c (xfont_open): Use make_local_string.
3008 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
3009
3010 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
3011
3012 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
3013 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
3014 !__clang__. This works with GCC and with clang and is safer for
3015 compilers we don't know about.
3016 (local_cons): Rename parameter to make capture less likely.
3017
3018 2014-09-17 Samuel Bronson <naesten@gmail.com>
3019
3020 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
3021
3022 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
3023
3024 Fix minor problems found by static checking.
3025 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
3026 Remove; now unused.
3027 * buffer.h (decode_buffer): Doc and indentation fixes.
3028 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
3029
3030 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
3031
3032 Avoid clang-specific warnings.
3033 * buffer.c (init_buffer): Shut up -Wself-assign.
3034 * process.c (server_accept_connection): Shut up -Wunsequenced.
3035
3036 2014-09-16 Daniel Colascione <dancol@dancol.org>
3037
3038 * fns.c (sxhash): For symbols, use address as hash code.
3039
3040 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
3041
3042 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
3043 * charset.c (load_charset_map_from_file): Use scoped_list2
3044 and build_local_string.
3045 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
3046 * emacs.c (init_cmdargs, decode_env_path):
3047 * fileio.c (Fexpand_file_name):
3048 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
3049 * frame.c (x_get_arg):
3050 * keyboard.c (safe_run_hooks_error):
3051 * lread.c (load_warn_old_style_backquotes):
3052 * xdisp.c (Fcurrent_bidi_paragraph_direction):
3053 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
3054 * xselect.c (x_clipboard_manager_error_1)
3055 (x_clipboard_manager_save_all):
3056 * xterm.c (x_term_init): Use build_local_string.
3057
3058 Avoid more integer overflows on string size calculations.
3059 * category.c (Fmake_category_set):
3060 * xdisp.c (get_overlay_arrow_glyph_row):
3061 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
3062
3063 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3064
3065 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
3066 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
3067 error message format. Use message_with_string to have non-ASCII
3068 file names properly displayed.
3069 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
3070 when w32-unicode-filenames is non-nil, but not on Windows 9X,
3071 where these APIs are not available even in UNICOWS.DLL.
3072 Improve the format of error messages and include the file name in them
3073 where appropriate.
3074 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
3075 call play-sound-functions, per documentation.
3076
3077 * w32.c (w32_get_long_filename, w32_get_short_filename):
3078 Constify the input file name arguments.
3079
3080 * w32.h (w32_get_long_filename, w32_get_short_filename):
3081 Update prototypes.
3082
3083 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
3084
3085 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
3086 * lisp.h (local_cons, local_list1, local_list2, local_list3)
3087 [USE_LOCAL_ALLOCATORS]: New macros.
3088 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
3089 (build_local_string): Avoid argument name expansion clash with
3090 make_local_string.
3091 * alloc.c (toplevel)
3092 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
3093 Preprocessor guard to avoid impossible configuration.
3094 * charset.c (Ffind_charset_region, Ffind_charset_string):
3095 Use make_local_vector.
3096 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
3097 * textprop.c (Fput_text_property, Fadd_face_text_property):
3098 Use scoped_list2.
3099 (copy_text_properties): Use local_cons and local_list3.
3100 * chartab.c (uniprop_table):
3101 * data.c (wrong_choice, wrong_range):
3102 * doc.c (get_doc_string):
3103 * editfns.c (format2):
3104 * fileio.c (Fexpand_file_name, auto_save_error):
3105 * fns.c (Fyes_or_no_p):
3106 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
3107 * fontset.c (Fset_fontset_font):
3108 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
3109 (read_char_minibuf_menu_prompt):
3110 * keymap.c (silly_event_symbol_error, describe_vector):
3111 * menu.c (single_menu_item):
3112 * minibuf.c (Fread_buffer):
3113 * process.c (status_message, Fformat_network_address)
3114 (server_accept_connection): Use make_local_string and
3115 build_local_string. Prefer compound literals where appropriate.
3116
3117 2014-09-15 Daniel Colascione <dancol@dancol.org>
3118
3119 * fns.c (Fsort): Tweak sort docstring.
3120
3121 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3122
3123 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
3124 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
3125 set errno to EAGAIN instead, to allow the caller to retry the
3126 write after some waiting. Fixes deadlocks when Emacs exchanges a
3127 lot of data through the pipe. (Bug#18420)
3128
3129 * sound.c (Fplay_sound_internal): Encode the sound file name in
3130 the ANSI codepage. Expand it against data-directory, as per docs,
3131 not against the current directory. No need to make a local copy
3132 of the file name; pass the encoded file name directly to
3133 do_play_sound. (Bug#18463)
3134
3135 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
3136 NULL, and the file name is not encodable in ANSI codepage, return
3137 the string with "?" replacement characters, which will fail the
3138 caller. This avoids returning a random value in that case.
3139
3140 2014-09-15 Martin Rudalics <rudalics@gmx.at>
3141
3142 * window.c (Fresize_mini_window_internal): Set w->total_lines
3143 from w->pixel_height (Bug#18422).
3144
3145 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
3146
3147 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
3148 (toggleFullScreen:): Take frame_resize_pixelwise into account when
3149 setting resize increments (Bug#18435).
3150
3151 2014-09-15 Eli Zaretskii <eliz@gnu.org>
3152
3153 * xdisp.c (pos_visible_p): Properly save and restore the iterator
3154 state around the call to line_bottom, since it can move the
3155 iterator to another screen line. This fixes off-by-one errors in
3156 the reported row in some rare cases.
3157
3158 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
3159
3160 * callproc.c (init_callproc): Fix bug introduced at
3161 2014-09-07 (Bug#18474).
3162
3163 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
3164
3165 Prefer ptrdiff_t to int and avoid integer overflows.
3166 * fileio.c (make_temp_name):
3167 * font.c (font_parse_family_registry): Avoid integer
3168 overflow on string size calculation.
3169 * data.c (Faset): Likewise for byte index.
3170
3171 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
3172
3173 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
3174
3175 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
3176
3177 * lisp.h (make_local_string): Nitpick indent.
3178 * print.c (Fprin1_to_string): Remove unused GCPROs.
3179
3180 More debugging aids around GCPROs.
3181 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
3182 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
3183 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
3184
3185 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
3186 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
3187
3188 Remove redundant GCPROs around Ffuncall and Fapply calls.
3189 This is safe because Ffuncall protects all of its arguments by itself.
3190 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
3191 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
3192 (call6, call7): Likewise. Use compound literals where applicable.
3193 (run_hook_with_args_2): Use compound literal.
3194
3195 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
3196
3197 Pacify --enable-gcc-warnings when no window system is used.
3198 These warnings found that subscript error, so they seem worthwhile.
3199 * composite.c (char_composable_p): Simplify a bit.
3200 * frame.c (x_set_frame_parameters): Add an IF_LINT.
3201 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
3202 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
3203 * window.c (set_window_scroll_bars):
3204 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
3205 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
3206 Ignore -Wsuggest-attribute=const.
3207 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
3208 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
3209
3210 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
3211
3212 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
3213 Use check_iso_charset_parameter instead of doing the checks by hand.
3214 (check_iso_charset_parameter): Move up. Check parameters a bit
3215 more carefully, and return true for 96-char sets. All callers changed.
3216
3217 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3218
3219 Simplify lisp.h by removing the __COUNTER__ business.
3220 Reported by Dmitry Antipov in:
3221 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
3222 * lisp.h (make_local_vector, make_local_string)
3223 (build_local_string): Simplify by not bothering with __COUNTER__.
3224 The __COUNTER__ business wasn't working properly, and was needed
3225 only for hypothetical future expansion anyway.
3226
3227 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
3228
3229 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
3230 terms to determine bitmap color. (Bug#18437)
3231
3232 2014-09-10 Eli Zaretskii <eliz@gnu.org>
3233
3234 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
3235 translation buffer.
3236
3237 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3238
3239 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
3240
3241 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
3242
3243 * xterm.c (handle_one_xevent): Detect iconified by looking at
3244 _NET_WM_STATE_HIDDEN.
3245
3246 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3247
3248 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
3249 These can generate a constant with the correct value but the wrong
3250 width, which doesn't work as a printf argument. All uses removed.
3251 Reported by Dmitry Antipov in:
3252 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
3253 (ENUMABLE): Remove; no longer needed.
3254 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
3255 Remove; no longer needed because of the above change.
3256 Each definiens moved to the only use.
3257
3258 Improve the experimental local and scoped allocation.
3259 * alloc.c (local_string_init, local_vector_init):
3260 New functions, defined if USE_LOCAL_ALLOCATORS.
3261 Mostly, these are moved here from lisp.h, as it's not
3262 clear it's worth making them inline.
3263 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
3264 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
3265 USE_STACK_LISP_OBJECTS, not on a laundry list.
3266 (local_string_init, local_vector_init): New decls.
3267 (union Aligned_Cons): New type.
3268 (scoped_cons): Use it. Give up on the char trick, as it's a too
3269 much of a maintenance hassle; if someone wants this speedup
3270 they'll just need to convince their compiler to align properly.
3271 Conversely, use the speedup if struct Lisp_Cons happens to
3272 be aligned even without a directive. Better yet, help it along
3273 by using union Aligned_Cons rather than struct Lisp_Cons.
3274 (pointer_valid_for_lisp_object): Remove. This check is not
3275 necessary, since make_lisp_ptr is already doing it. All uses removed.
3276 (local_vector_init, local_string_init): Move to alloc.c.
3277 (build_local_vector): Remove this awkward macro, replacing with ...
3278 (make_local_vector): New macro, which acts more like a function.
3279 Use statement expressions and use __COUNTER__ to avoid macro
3280 capture. Fall back on functions if these features are not supported.
3281 (build_local_string, make_local_string): Likewise.
3282
3283 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
3284
3285 * xterm.c (x_term_init): Consolidate duplicated code.
3286 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
3287 (x_delete_terminal): Do not close X connection fd (Bug#18403).
3288 Add eassert and mark dpyinfo as dead only if it was alive.
3289
3290 Add macros to allocate temporary Lisp objects with alloca.
3291 Respect MAX_ALLOCA and fall back to regular GC for large objects.
3292 * character.h (parse_str_as_multibyte): Move prototype to ...
3293 * lisp.h (parse_str_as_multibyte): ... here.
3294 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
3295 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
3296 New macros.
3297 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
3298 (local_string_init): New functions.
3299 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
3300 (init_alloc_once): Call it.
3301
3302 Cleanup last change and make all new stuff conditional.
3303 * lisp.h (build_local_string): Rename to ...
3304 (make_local_string): ... this macro.
3305 (build_local_string, scoped_list1, scoped_list3): New macros.
3306 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
3307 and functions as such, use regular fallbacks otherwise.
3308 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
3309 conditionally.
3310
3311 2014-09-08 Eli Zaretskii <eliz@gnu.org>
3312
3313 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
3314 always make sure the marginal areas of the row are in sync with
3315 what the window wants. (Bug#18419)
3316
3317 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
3318 existing binding of a variable, to avoid silently aborting
3319 commands that use specbind. (Bug#18331)
3320
3321 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3322
3323 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
3324 * coding.c (growable_destination): New function.
3325 (produce_chars): Use it for sanity checks. Do not fiddle with
3326 dst_end if the source and destination are both nil, as it's
3327 the caller's responsibility to avoid overlap.
3328 * keyboard.c (read_decoded_event_from_main_queue):
3329 The destination must be MAX_MULTIBYTE_LENGTH times the max source
3330 length, not 4 times, to prevent decode_coding_c_string from trying
3331 to reallocate a destination. This removes the need for the FIXME.
3332
3333 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
3334 All callers simplified. Add a comment about exec_failed, vfork,
3335 and alloca.
3336
3337 Adjust drag-and-drop fix when window is above top (Bug#18303).
3338 * xselect.c (x_fill_property_data): Don't let sign bit of negative
3339 XCDR bleed into XCAR's encoded value. Improve checks for
3340 out-of-range data while we're at it.
3341
3342 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
3343
3344 * xselect.c (x_fill_property_data): Handle negative XCDR when data
3345 is CONSP (Bug#18303).
3346
3347 2014-09-07 Eli Zaretskii <eliz@gnu.org>
3348
3349 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
3350 'alloca' gets passed arguments larger than MAX_ALLOCA.
3351
3352 * font.c (MAX): Define if not defined elsewhere.
3353
3354 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3355
3356 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
3357 here for destination buffer, to work around what appears to be a
3358 bug in decode_coding_c_string when the source and destination are
3359 both C strings.
3360
3361 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
3362 This follows up on the recent thread in emacs-devel on alloca; see:
3363 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
3364 This patch also cleans up alloca-related glitches noted while
3365 examining the code looking for unbounded alloca.
3366 * alloc.c (listn):
3367 * callproc.c (init_callproc):
3368 Rewrite to avoid need for alloca.
3369 * buffer.c (mouse_face_overlay_overlaps)
3370 (report_overlay_modification):
3371 * buffer.h (GET_OVERLAYS_AT):
3372 * coding.c (make_subsidiaries):
3373 * doc.c (Fsnarf_documentation):
3374 * editfns.c (Fuser_full_name):
3375 * fileio.c (Ffile_name_directory, Fexpand_file_name)
3376 (search_embedded_absfilename, Fsubstitute_in_file_name):
3377 * fns.c (Fmake_hash_table):
3378 * font.c (font_vconcat_entity_vectors, font_update_drivers):
3379 * fontset.c (fontset_pattern_regexp, Ffontset_info):
3380 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
3381 (xrdb_get_resource, x_get_resource_string):
3382 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
3383 * ftxfont.c (ftxfont_draw):
3384 * image.c (xbm_load, xpm_load, jpeg_load_body):
3385 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
3386
3387 * keymap.c (Fdescribe_buffer_bindings, describe_map):
3388 * lread.c (openp):
3389 * menu.c (digest_single_submenu, find_and_call_menu_selection)
3390 (find_and_return_menu_selection):
3391 * print.c (PRINTFINISH):
3392 * process.c (Fformat_network_address):
3393 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
3394 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
3395 * sound.c (wav_play, au_play):
3396 * syntax.c (skip_chars):
3397 * term.c (tty_menu_activate, tty_menu_show):
3398 * textprop.c (get_char_property_and_overlay):
3399 * window.c (Fset_window_configuration):
3400 * xdisp.c (safe__call, next_overlay_change, vmessage)
3401 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
3402 * xfaces.c (face_at_buffer_position):
3403 * xmenu.c (x_menu_show):
3404 Use SAFE_ALLOCA etc. instead of plain alloca, since the
3405 allocation size isn't bounded.
3406 * callint.c (Fcall_interactively): Redo memory_full check
3407 so that it can be done at compile-time on some platforms.
3408 * coding.c (MAX_LOOKUP_MAX): New constant.
3409 (get_translation_table): Use it.
3410 * callproc.c (call_process): Use SAFE_NALLOCA instead of
3411 SAFE_ALLOCA, to catch integer overflows on size calculation.
3412 (exec_failed) [!DOS_NT]: New function.
3413 (child_setup) [!DOS_NT]: Use it.
3414 * editfns.c (Ftranspose_regions):
3415 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
3416 * editfns.c (check_translation):
3417 Allocate larger buffers on the heap.
3418 * eval.c (internal_lisp_condition_case):
3419 Check for MAX_ALLOCA overflow.
3420 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
3421 (Fbase64_encode_region, Fbase64_decode_region):
3422 Avoid unnecessary calls to SAFE_FREE before 'error'.
3423 * buffer.c (mouse_face_overlay_overlaps):
3424 * editfns.c (Fget_pos_property, check_translation):
3425 * eval.c (Ffuncall):
3426 * font.c (font_unparse_xlfd, font_find_for_lface):
3427 * ftfont.c (ftfont_drive_otf):
3428 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
3429 (menu_bar_items, tool_bar_items):
3430 * sound.c (Fplay_sound_internal):
3431 * xdisp.c (load_overlay_strings, dump_glyph_row):
3432 Use an ordinary auto buffer rather than alloca, since the
3433 allocation size is fixed and small.
3434 * ftfont.c: Include <c-strcase.h>.
3435 (matching_prefix): New function.
3436 (get_adstyle_property): Use it, to avoid need for alloca.
3437 * keyboard.c (echo_add_key):
3438 * keymap.c (describe_map): Use ptrdiff_t, not int.
3439 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
3440 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
3441 when counting bytes.
3442 * lisp.h (xlispstrdupa): Remove, replacing with ...
3443 (SAFE_ALLOCA_STRING): ... new macro with different API.
3444 This fixes a portability problem, namely, alloca result
3445 passed to another function. All uses changed.
3446 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
3447 not MAX_ALLOCA - 1.
3448 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
3449 (REGEX_ALLOCATE): New macros.
3450 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
3451 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
3452 Use them.
3453 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
3454 by hand.
3455 (decode_mode_spec_coding): Store directly into buf rather than
3456 into an alloca temporary and copying the temporary to the buf.
3457
3458 2014-09-06 Eli Zaretskii <eliz@gnu.org>
3459
3460 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
3461
3462 2014-09-04 Jan D <jan.h.d@swipnet.se>
3463
3464 * xterm.c (x_term_init): Don't call x_session_initialize if running
3465 as a daemon (Bug#18375).
3466
3467 * xsmfns.c: Initialize ice_fd.
3468
3469 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
3470
3471 Less chatter in 'make' output.
3472 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
3473 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
3474 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
3475
3476 2014-09-03 Martin Rudalics <rudalics@gmx.at>
3477
3478 * buffer.c (scroll-bar-height): Fix typo in doc-string.
3479 * frame.c (Vdefault_frame_horizontal_scroll_bars):
3480 Remove variable.
3481 * nsfns.m (Fx_create_frame):
3482 * w32fns.c (Fx_create_frame):
3483 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
3484 nil.
3485
3486 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3487
3488 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
3489 the reported row in the case of a window with a header line, by
3490 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
3491 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
3492
3493 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
3494
3495 * eval.c (internal_lisp_condition_case): Don't overrun the stack
3496 when configured --with-wide-int on typical 32-bit platforms.
3497
3498 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3499
3500 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
3501 when HPOS is negative, for the benefit of R2L glyph rows whose
3502 newline overflows into the fringe.
3503
3504 2014-09-03 Ken Brown <kbrown@cornell.edu>
3505
3506 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
3507
3508 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
3509
3510 Minor cleanup of recent strlen-avoiding patch.
3511 * fileio.c (CHECK_LENGTH): Remove.
3512 Rewrite callers so that they don't need it.
3513 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
3514 variable wasn't set.
3515
3516 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
3517
3518 * fileio.c (CHECK_LENGTH): New macro.
3519 (Fexpand_file_name): Use it and get rid of a few more calls
3520 to strlen and strcat.
3521 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
3522 * lisp.h (egetenv): ... because of a new inline function used to
3523 avoid calls to strlen for a compile-time constants.
3524
3525 * buffer.h (decode_buffer): New function.
3526 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
3527 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
3528 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
3529 * data.c (Flocal_variables_p):
3530 * fileio.c (Fverify_visited_file_modtime):
3531 * marker.c (live_buffer): Use it.
3532
3533 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
3534
3535 Avoid extra calls to strlen in filesystem I/O routines.
3536 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
3537 the length of 'newdir' is known or may be precalculated.
3538 (file_accessible_directory_p): Prefer to pass Lisp_Object,
3539 not 'char *', and so use precalculated length.
3540 (Ffile_accessible_directory_p):
3541 * callproc.c (encode_current_directory, init_callproc):
3542 * charset.c (init_charset):
3543 * lread.c (load_path_check, load_path_default): Adjust users.
3544 * lisp.h (file_accessible_directory_p): Tweak prototype.
3545
3546 2014-09-01 Eli Zaretskii <eliz@gnu.org>
3547
3548 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
3549 locales.
3550
3551 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
3552
3553 --enable-silent-rules now suppresses more chatter.
3554 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
3555 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
3556 (am__v_CCLD_1): New macros, taken from Automake.
3557 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
3558
3559 Clean up extern decls a bit.
3560 * bytecode.c: Include blockinput.h and keyboard.h rather
3561 than rolling their APIs by hand.
3562 * emacs.c: Include regex.h and rely on its and lisp.h's API
3563 rather than rolling them by hand.
3564 * lastfile.c: Include lisp.h, to check this file's API.
3565 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
3566 New decls.
3567 * regex.h (re_max_failures): New decl.
3568 * unexcw.c, unexmacosx.c, unexw32.c:
3569 Rely on lisp.h's API rather than rolling it by hand.
3570 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
3571 Declare at top level, to pacify GCC -Wnested-externs.
3572
3573 2014-08-31 Eli Zaretskii <eliz@gnu.org>
3574
3575 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
3576 clipping rectangle become negative (i.e. large positive, since
3577 it's an unsigned data type). This can happen in R2L hscrolled
3578 glyph rows, and caused us to draw the cursor glyph on the fringe.
3579 For the details, see
3580 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
3581
3582 2014-08-31 Ken Brown <kbrown@cornell.edu>
3583
3584 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
3585 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
3586 is defined. (Bug#18368)
3587
3588 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
3589
3590 Vector-sorting fixes (Bug#18361).
3591 It's not safe to call qsort or qsort_r, since they have undefined
3592 behavior if the user-specified predicate is not a total order.
3593 Also, watch out for garbage-collection while sorting vectors.
3594 * fns.c: Include <vla.h>.
3595 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
3596 (sort_vector_compare): Remove, replacing with ....
3597 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
3598 ... these new functions.
3599 (sort_vector): Rewrite to use the new functions.
3600 GCPRO locals, since the predicate can invoke the GC.
3601 Since it's in-place return void; caller changed.
3602 (merge): Use 'inorder', for clarity.
3603
3604 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
3605 One can't hoist this out of the 'if', because intervening calls to
3606 newlocale, twolower, etc. can change errno.
3607
3608 2014-08-30 Eli Zaretskii <eliz@gnu.org>
3609
3610 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
3611 wording of the error messages.
3612 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
3613 sets errno.
3614
3615 * w32proc.c (get_lcid_callback): Accept locale specifications
3616 without the country part, as in "enu" vs "enu_USA".
3617 (w32_compare_strings): Signal an error if a locale was specified,
3618 but couldn't be translated into a valid LCID.
3619
3620 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3621
3622 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
3623
3624 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
3625
3626 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
3627 errno after towlower_l. errno's value is not specified after
3628 towlower_l. Instead, assume that towlower_l returns its argument
3629 on failure, which is portable in practice.
3630
3631 2014-08-29 Eli Zaretskii <eliz@gnu.org>
3632
3633 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
3634
3635 * w32proc.c (w32_compare_strings): Accept additional argument
3636 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
3637 if requested. If w32-collate-ignore-punctuation is non-nil, add
3638 NORM_IGNORESYMBOLS to the flags.
3639 (LINGUISTIC_IGNORECASE): Define if not already defined.
3640 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
3641
3642 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
3643 change.
3644
3645 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3646
3647 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
3648 Define substitutes for platforms that lack them.
3649 (str_collate): Add arguments locale and ignore_case.
3650
3651 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
3652 Add optional arguments LOCALE and IGNORE-CASE.
3653
3654 * lisp.h (str_collate): Adapt argument list.
3655
3656 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
3657
3658 Add vectors support to Fsort.
3659 * fns.c (sort_vector, sort_vector_compare): New functions.
3660 (sort_list): Likewise, refactored out of ...
3661 (Fsort): ... adjusted user. Mention vectors in docstring.
3662 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
3663 * alloc.c (make_save_int_obj): New function.
3664 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
3665 (make_save_int_obj): Add prototype.
3666
3667 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
3668 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
3669 Conditionally define to match system's qsort_r signature.
3670 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
3671
3672 2014-08-28 Ken Brown <kbrown@cornell.edu>
3673
3674 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
3675 dumping and the system malloc after dumping. (Bug#18222)
3676
3677 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
3678 Define as macros, expanding to hybrid_malloc, etc.
3679 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
3680 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
3681 macro.
3682 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
3683 full implementation on Cygwin. Remove Cygwin-specific code that
3684 is no longer needed.
3685 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
3686 Redefine as macros expanding to gmalloc, grealloc, etc.
3687 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
3688 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
3689 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
3690 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
3691 [HYBRID_MALLOC]:
3692 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3693 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
3694 HAVE_POSIX_MEMALIGN)]: New functions.
3695 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3696 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
3697 hybrid_aligned_alloc; declare.
3698 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3699 HAVE_POSIX_MEMALIGN)]: Define.
3700 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
3701 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3702 Define as macro, expanding to gget_current_dir_name, and define
3703 the latter.
3704 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
3705 malloc_enable_thread(). Don't initialize malloc.
3706 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
3707 no longer defined on Cygwin).
3708 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
3709 * sheap.c (bss_sbrk_buffer_end): New variable.
3710 * unexcw.c (__malloc_initialized): Remove variable.
3711 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
3712 SYSTEM_MALLOC.
3713 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
3714 Vmemory_full.
3715
3716 2014-08-28 Martin Rudalics <rudalics@gmx.at>
3717
3718 * w32term.c (w32_horizontal_scroll_bar_handle_click):
3719 In `event->y' return entire range (the size of the scroll bar minus
3720 that of the thumb).
3721 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
3722 return entire range (the scaled size of the scroll bar minus
3723 that of the slider). In `portion' return the scaled position of
3724 the slider.
3725 (xaw_jump_callback): Restore part of code for vertical scroll
3726 bar broken in change from 2014-07-27.
3727 (xaw_scroll_callback): Provide incremental scrolling with
3728 horizontal scroll bars.
3729
3730 2014-08-28 Eli Zaretskii <eliz@gnu.org>
3731
3732 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
3733
3734 * indent.c (Fvertical_motion): Fix vertical motion up through a
3735 display property after a newline. (Bug#18276)
3736
3737 * xdisp.c (display_line): Don't assume that the call to
3738 reseat_at_next_visible_line_start ends up at a character
3739 immediately following the newline on the previous line.
3740 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
3741 beyond ZV, which causes infloop in redisplay. For the details, see
3742 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
3743
3744 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
3745 coordinate for hscrolled R2L screen lines. (Bug#18277)
3746
3747 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
3748
3749 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
3750 (Bug#18051).
3751
3752 2014-08-27 Eli Zaretskii <eliz@gnu.org>
3753
3754 * syntax.c (scan_lists): Don't examine positions before BEGV.
3755 (Bug#18339)
3756
3757 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
3758
3759 Improve robustness of new string-collation code (Bug#18051).
3760 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
3761 (newlocale, wcscoll_l): Define substitutes for platforms that
3762 lack them, so as to simplify the mainline code.
3763 (str_collate): Simplify the code by assuming the above definitions.
3764 Use wcscoll_l, not uselocale, as uselocale is too fragile.
3765 For example, the old version left the Emacs in the wrong locale if
3766 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
3767 result. Report an error if newlocale fails.
3768
3769 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
3770
3771 * lisp.h (str_collate):
3772 * sysdep.c (str_collate): Return int.
3773 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
3774
3775 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3776
3777 Fix some glitches in previous change.
3778 * sysdep.c (stack_direction): Replace stack_grows_down
3779 to simplify calculation of stack boundaries.
3780 (handle_sigsegv): Check whether we really crash somewhere near
3781 to stack boundary, and handle fatal signal as usual if not.
3782 (init_sigsegv): Adjust accordingly.
3783 * keyboard.c (Vtop_level_message): Rename to
3784 Vinternal__top_level_message, as suggested by Stefan Monnier in
3785 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
3786 All related users changed.
3787
3788 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
3789
3790 Handle C stack overflow caused by too nested Lisp evaluation.
3791 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
3792 siglongjmp point to transfer control from SIGSEGV handler.
3793 * keyboard.c (return_to_command_loop, recover_top_level_message)
3794 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
3795 (regular_top_level_message): New variable.
3796 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
3797 exit from SIGSEGV handler and adjust message displayed by Vtop_level
3798 if appropriate.
3799 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
3800 new variables described above.
3801 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
3802 (stack_grows_down, sigsegv_stack, handle_sigsegv)
3803 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
3804 (init_sigsegv): New function.
3805 (init_signals): Use it.
3806
3807 2014-08-25 Ken Brown <kbrown@cornell.edu>
3808
3809 * emacs.c (main): Remove use of obsolete macro
3810 G_SLICE_ALWAYS_MALLOC.
3811
3812 2014-08-25 Eli Zaretskii <eliz@gnu.org>
3813
3814 Implement locale-sensitive string collation for MS-Windows.
3815 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
3816 New functions. (Bug#18051)
3817
3818 * w32.h (w32_compare_strings): Add prototype.
3819
3820 * w32.c <g_b_init_compare_string_w>: New global flag.
3821 (globals_of_w32): Initialize it.
3822
3823 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
3824
3825 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
3826 [WINDOWSNT]: Call str_collate on MS-Windows.
3827
3828 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
3829
3830 One more minor cleanup of font subsystem.
3831 * font.h (struct font_driver): Convert text_extents to
3832 return void because returned value is never actually used.
3833 * macfont.m (macfont_text_extents):
3834 * w32font.c (w32font_text_extents):
3835 * xftfont.c (xftfont_text_extents): Adjust to return void
3836 and assume that 'metrics' argument is always non-NULL.
3837 * ftfont.c (ftfont_text_extents):
3838 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
3839
3840 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
3841
3842 Minor cleanups of str_collate fix (Bug#18051).
3843 * fns.c (str_collate): Move decl from here ...
3844 * lisp.h (str_collate): ... to here.
3845 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
3846 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
3847 potential problems with integer overflow. Don't assume
3848 setlocale succeeds. Remove unnecessary test before restoring
3849 locale via setlocale, and free the copied setlocale string
3850 when done with it.
3851
3852 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
3853
3854 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
3855
3856 * sysdep.c (str_collate): New function. (Bug#18051)
3857
3858 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
3859
3860 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
3861 if the initial "rm -f" fails. This is for MinGW builds, where
3862 MS-Windows will not allow deleting the executable file of a
3863 running program.
3864
3865 2014-08-20 Eli Zaretskii <eliz@gnu.org>
3866
3867 * w32term.c (w32_scroll_bar_handle_click)
3868 (w32_horizontal_scroll_bar_handle_click)
3869 (x_scroll_bar_report_motion)
3870 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
3871 SB_THUMBTRACK, use the 32-bit position information returned by
3872 GetScrollInfo, not the 16-bit information returned in the Windows
3873 message sent to us.
3874
3875 2014-08-19 Eli Zaretskii <eliz@gnu.org>
3876
3877 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
3878 second coordinate ('y') reported for dragging the horizontal
3879 scroll bar thumb.
3880
3881 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3882
3883 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
3884 and text area-relative x-coordinates.
3885
3886 2014-08-17 Eli Zaretskii <eliz@gnu.org>
3887
3888 Avoid overwriting the reversed_p flags in the glyph matrices when
3889 init_iterator or start_display are called.
3890 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
3891 the glyph row here.
3892 (tool_bar_height, redisplay_tool_bar, try_window)
3893 (try_window_reusing_current_matrix, try_window_id)
3894 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
3895 reversed_p flag of the iterator's glyph row where the glyph row
3896 is going to be redrawn.
3897
3898 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
3899
3900 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
3901
3902 2014-08-16 Martin Rudalics <rudalics@gmx.at>
3903
3904 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
3905 of emacs_event return length from si.nPage to si.nMax.
3906 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
3907 interchange start and end of thumb.
3908
3909 2014-08-15 Ken Brown <kbrown@cornell.edu>
3910
3911 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
3912 ERRORCHECK mutexes. (Bug#18222)
3913
3914 2014-08-12 Martin Rudalics <rudalics@gmx.at>
3915
3916 * frame.c (set_menu_bar_lines_1): Remove.
3917 (set_menu_bar_lines): Call change_frame_size instead of
3918 set_menu_bar_lines_1.
3919
3920 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
3921
3922 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
3923 set f->official.
3924
3925 2014-08-11 Glenn Morris <rgm@gnu.org>
3926
3927 * fileio.c: Revert 2013-01-31 change, which chose coding system for
3928 writing before backing up, since it causes a more serious problem
3929 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
3930 (choose_write_coding_system): No longer callable from Lisp.
3931 Move last piece back here from Fwrite_region.
3932 (Fwrite_region, syms_of_fileio): Update for above changes.
3933
3934 2014-08-11 Martin Rudalics <rudalics@gmx.at>
3935
3936 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
3937 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
3938 (Fwindow_new_pixel, Fset_window_new_pixel)
3939 (Fset_window_new_total, Fset_window_new_normal)
3940 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
3941 See also:
3942 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
3943
3944 2014-08-11 Eli Zaretskii <eliz@gnu.org>
3945
3946 * fontset.c (Finternal_char_font): Recompute basic faces if the
3947 frame's face cache was cleared. (Bug#18162)
3948
3949 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
3950
3951 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
3952 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
3953 base buffer's undo list.
3954
3955 2014-08-10 Reuben Thomas <rrt@sc3d.org>
3956
3957 Fix a couple of recent inadvertent breaks of the MSDOS port.
3958 * msdos.c: include required menu.h
3959 * term.c: set correct menu_show_hook on MSDOS.
3960
3961 2014-08-10 Martin Rudalics <rudalics@gmx.at>
3962
3963 Fix handling of menu bar line on TTY frames (Bug#18136)
3964 (Bug#18196).
3965 * dispnew.c (handle_window_change_signal):
3966 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
3967 frame's menu bar lines subtracted from height.
3968 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
3969 frames.
3970 (adjust_frame_size): Count in menu bar when setting FrameRows.
3971 (make_terminal_frame): When setting up the frame's lines and
3972 text height don't count in the menu bar.
3973 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
3974 lines subtracted from height.
3975 (do_switch_frame): Set tty's FrameRows to number of total lines
3976 of frame.
3977 (Fframe_pixel_height, Fframe_pixel_width): If no window system
3978 is used, return total number of lines and columns.
3979 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
3980 of FRAME_LINES.
3981 * term.c (OUTPUT, tty_set_terminal_modes)
3982 (tty_set_terminal_window, tty_set_scroll_region)
3983 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
3984 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
3985 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3986 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3987 Call change_frame_size with frame's menu bar lines subtracted
3988 from height.
3989 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
3990 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
3991 FRAME_LINES.
3992
3993 2014-08-09 Reuben Thomas <rrt@sc3d.org>
3994
3995 * alloc.c (Fmemory_info): Remove a stray brace.
3996
3997 * process.c: Fix a comment typo.
3998
3999 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
4000
4001 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
4002
4003 * widgetprv.h (EmacsFramePart): Remove font.
4004
4005 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
4006 (resources, setup_frame_cursor_bits): Remove unused variables and
4007 functions, esp. wrt. font (Bug#18227).
4008
4009 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
4010
4011 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
4012
4013 2014-08-07 Reuben Thomas <rrt@sc3d.org>
4014
4015 Refer to MS-DOS using the same name everywhere.
4016
4017 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
4018 commit.
4019 * xfaces.c: ditto.
4020
4021 2014-08-05 Martin Rudalics <rudalics@gmx.at>
4022
4023 * w32term.c (w32_redeem_scroll_bar):
4024 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
4025 not redeeming scroll bars that have been turned off.
4026
4027 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4028
4029 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
4030 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
4031 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
4032 (safe_run_hook_funcall): Adjust accordingly.
4033
4034 2014-08-04 Martin Rudalics <rudalics@gmx.at>
4035
4036 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
4037 Condition correctly according to toolkit used.
4038 * frame.c (make_initial_frame, make_terminal_frame)
4039 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
4040 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
4041 assignments according to presence of toolkit scrollbars.
4042 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
4043 Condition correctly according to toolkit used.
4044 * window.c (set_window_scroll_bars): Set horizontal scroll bar
4045 only if toolkit supports it.
4046 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
4047 present.
4048 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
4049 non-toolkit builds.
4050 (XTredeem_scroll_bar): Always redeem scroll bar if present.
4051
4052 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
4053
4054 * keyboard.c (safe_run_hook_funcall): Avoid consing around
4055 Vinhibit_quit and prefer internal_condition_case_n to pass args.
4056 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
4057 (safe_run_hooks): Remove comment which is not relevant any more.
4058
4059 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
4060
4061 Don't let big frames overrun the stack.
4062 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
4063 Use SAFE_NALLOCA, not alloca.
4064
4065 Fix bug with clang + directory_files_internal + GC (Bug#16986).
4066 * dired.c (directory_files_internal): Use a volatile variable
4067 to prevent the compiler from optimizing away all copies of a local.
4068 I wonder how many other GC-related bugs like this lurk elsewhere?
4069
4070 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
4071 * xterm.h (struct x_display_info): New member 'connection'.
4072 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
4073 so that x_delete_terminal has a file descriptor to pass to
4074 delete_keyboard_wait_descriptor.
4075
4076 Don't mishandle year-9999 dates (Bug#18176).
4077 * editfns.c (decode_time_components): Store an invalid timespec
4078 on overflow, instead of returning false, so that the caller can
4079 distinguish overflow from other errors.
4080 (lisp_time_argument, lisp_seconds_argument): If the time is out
4081 of range, signal a time overflow instead of an invalid time spec.
4082 * keyboard.c (decode_timer): Treat time overflow like other
4083 timespec errors.
4084
4085 Avoid undefined behavior with signed left shift.
4086 Caught by 'gcc -fsanitize=undefined'.
4087 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
4088 * dispnew.c (line_hash_code, scrolling):
4089 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
4090 Use 'unsigned', not 'int', for line hashes.
4091 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
4092
4093 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
4094
4095 Make compare-strings more compatible with old behavior (Bug#17903).
4096 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
4097
4098 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
4099
4100 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
4101 Don't add label between left and right buttons (Bug#18129).
4102
4103 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
4104
4105 Make functions static that no longer need to be extern.
4106 * frame.c, frame.h (set_menu_bar_lines):
4107 * keyboard.c (Qleftmost, Qrightmost):
4108 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
4109 (x_set_internal_border_width):
4110 Now static.
4111
4112 2014-08-01 Eli Zaretskii <eliz@gnu.org>
4113
4114 Fix display of R2L lines when the last character fits only partially.
4115 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
4116 for the details.
4117 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
4118 R2L row is visible only partially, give the row a negative x
4119 offset.
4120 (display_line): Fix the calculation of the glyph whose pixel width
4121 is used to decide whether the last produced glyph fits on the
4122 line. When the last glyph fits only partially, give the row a
4123 negative x offset.
4124
4125 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
4126 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
4127 pixel width of the first glyph that is hscrolled from display.
4128 (display_line): In R2L glyph rows, don't give a negative offset to
4129 row->x when the first glyph begins before first_visible_x.
4130
4131 * xdisp.c (display_line): If called with iterator set up to write
4132 to a marginal area, delay the call to handle_line_prefix until we
4133 switch back to the text area. (Bug#18035)
4134
4135 * .gdbinit (xwindow): The members total_cols, total_lines,
4136 left_col, and top_line are C integers (and has been so for the
4137 last 1.5 years).
4138
4139 2014-08-01 Andreas Schwab <schwab@suse.de>
4140
4141 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
4142 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
4143
4144 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4145
4146 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
4147 (timerfd_callback): Ignore weird events with no data. Add tight
4148 assertions and comments.
4149 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
4150 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
4151
4152 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
4153
4154 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
4155 I had confused && with ||.
4156
4157 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
4158
4159 Simplify timerfd configuration and fix some minor glitches.
4160 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
4161 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
4162 Fall back on timer_create if timerfd_create fails at runtime.
4163 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
4164 kernel primitives to do resolution. All uses removed.
4165 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
4166 (turn_on_atimers): Clear timer_create-based timers too,
4167 for consistency.
4168
4169 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
4170 Without this change, the code can access the local variable 'width'
4171 even when it has not been initialized, and likewise for 'height';
4172 in either case this leads to undefined behavior.
4173
4174 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4175
4176 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
4177 necessary, put horizontal scroll bar resources as well. See
4178 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
4179 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
4180
4181 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
4182
4183 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
4184 background value to match the resource of its vertical counterpart.
4185
4186 2014-07-29 Martin Rudalics <rudalics@gmx.at>
4187
4188 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
4189 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
4190
4191 2014-07-28 Martin Rudalics <rudalics@gmx.at>
4192
4193 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
4194 change that added the top margin height to the requested height
4195 and revert (undocumented) part of 2014-07-28 change that changed
4196 the logic of whether a size change occurred.
4197
4198 2014-07-28 Eli Zaretskii <eliz@gnu.org>
4199
4200 * .gdbinit (xwindow): The members total_cols, total_lines,
4201 left_col, and top_line are C integers (and has been so for the
4202 last 1.5 years).
4203
4204 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
4205 now C integers.
4206
4207 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
4208
4209 On GNU/Linux, use timerfd for asynchronous timers.
4210 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
4211 (toplevel): Rename alarm_timer_ok to special_timer_available.
4212 [HAVE_TIMERFD]: Declare timerfd.
4213 [HAVE_CLOCK_GETRES]: Declare resolution.
4214 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
4215 system timer resolution.
4216 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
4217 (timerfd_callback) [HAVE_TIMERFD]: New function.
4218 (atimer_result, debug_timer_callback, Fdebug_timer_check)
4219 [ENABLE_CHECKING]: New function for the sake of automated tests.
4220 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
4221 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
4222 [ENABLE_CHECKING]: Defsubr test function.
4223 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
4224 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
4225 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
4226
4227 Fix --without-x build and pacify --enable-gcc-warnings.
4228 Problems reported in Bug#18122 and Bug#18124.
4229 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
4230 (frame_windows_min_size): Now static.
4231 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
4232 Define as no-op.
4233 (adjust_frame_size): Always declare prototype.
4234
4235 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
4236 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
4237 * atimer.c (timerfd_callback): Always read expiration data.
4238 Add comment.
4239 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
4240 * process.c (add_timer_wait_descriptor): Add timer descriptor
4241 to input_wait_mask and non_process_wait_mask as well.
4242
4243 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
4244
4245 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
4246
4247 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
4248
4249 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
4250 Reinstate code removed by the prevoius commit to this file.
4251
4252 2014-07-27 Martin Rudalics <rudalics@gmx.at>
4253
4254 * buffer.h (struct buffer): New fields scroll_bar_height and
4255 horizontal_scroll_bar_type.
4256 * buffer.c (bset_scroll_bar_height)
4257 (bset_horizontal_scroll_bar_type): New functions.
4258 (Fbuffer_swap_text): Handle old_pointm field.
4259 (init_buffer_once): Set defaults for scroll_bar_height and
4260 horizontal_scroll_bar_type.
4261 (syms_of_buffer): New variables scroll_bar_height and
4262 horizontal_scroll_bar_type.
4263 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
4264 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
4265 (set_vertical_scroll_bar): Remove prototype.
4266 (x_change_tool_bar_height): Add prototype.
4267 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
4268 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
4269 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
4270 and FRAME_LINES.
4271 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
4272 (update_window): Start mode_line_row->y after horizontal scroll
4273 bar.
4274 (change_frame_size_1): Call adjust_frame_size.
4275 (init_display): When changing the size of a tty frame do not
4276 pass height of menu bar.
4277 (Qframe_windows_min_size): New symbol.
4278 * frame.h (struct frame): List tool bar fields after menu bar
4279 fields. Add official, total_lines, horizontal_scroll_bars,
4280 config_scroll_bar_height and config_scroll_bar_lines fields.
4281 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
4282 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
4283 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
4284 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
4285 (FRAME_WINDOWS_HEIGHT): New macros.
4286 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
4287 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
4288 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
4289 horizontal scroll bar.
4290 (frame_inhibit_resize, adjust_frame_size)
4291 (frame_windows_min_size): Add declarations.
4292 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4293 (x_set_scroll_bar_default_height, x_set_left_fringe)
4294 (x_set_right_fringe, x_set_vertical_scroll_bars)
4295 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
4296 (x_set_scroll_bar_height): Add external declarations.
4297 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
4298 (adjust_frame_size): New functions.
4299 (make_frame): Initial horizontal_scroll_bars field.
4300 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
4301 minibuffer window.
4302 (make_initial_frame, make_terminal_frame): No horizontal scroll
4303 bar in initial and terminal frames. Use adjust_frame_size.
4304 (Fframe_total_cols): Fix doc-string.
4305 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
4306 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
4307 Rewrite using adjust_frame_size.
4308 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4309 (Qframe_windows_min_size): New symbols.
4310 (x_set_frame_parameters): Remove call of check_frame_size.
4311 (x_report_frame_params): Return scroll_bar_height value.
4312 (x_set_left_fringe, x_set_right_fringe): New functions.
4313 (adjust_frame_height, x_set_internal_border_width)
4314 (x_set_fringe_width): Remove.
4315 (x_set_internal_border_width, x_set_vertical_scroll_bars)
4316 (x_set_scroll_bar_width, x_set_right_divider_width)
4317 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
4318 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
4319 New functions.
4320 (x_figure_window_size): Rewrite to make frame display the
4321 expected number of lines.
4322 (Vdefault_frame_scroll_bars): Rewrite doc-string.
4323 (Vdefault_frame_horizontal_scroll_bars)
4324 (Vframe_initial_frame_tool_bar_height)
4325 (frame_inhibit_implied_resize): New variables.
4326 * fringe.c (compute_fringe_widths): Remove.
4327 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
4328 (xg_create_horizontal_scroll_bar)
4329 (xg_update_horizontal_scrollbar_pos)
4330 (xg_set_toolkit_horizontal_scroll_bar_thumb)
4331 (xg_get_default_scrollbar_height)
4332 (xg_clear_under_internal_border): Extern.
4333 * gtkutil.c (xg_frame_resized): Don't call
4334 do_pending_window_change.
4335 (xg_frame_set_char_size): Use adjust_frame_size.
4336 (style_changed_cb): Call update_theme_scrollbar_height and
4337 x_set_scroll_bar_default_height.
4338 (x_wm_set_size_hint): Don't call check_frame_size.
4339 (update_theme_scrollbar_height)
4340 (xg_get_default_scrollbar_height)
4341 (xg_create_horizontal_scroll_bar)
4342 (xg_update_horizontal_scrollbar_pos)
4343 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
4344 (xg_create_scroll_bar): Set horizontal slot of bar.
4345 (xg_initialize): Call update_theme_scrollbar_height.
4346 (xg_clear_under_internal_border): No more static.
4347 * insdel.c (adjust_suspend_auto_hscroll): New function.
4348 (adjust_markers_for_delete, adjust_markers_for_insert)
4349 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
4350 * keyboard.c (readable_events, discard_mouse_events)
4351 (make_lispy_event): Handle horizontal scroll bar click events.
4352 (Fsuspend_emacs): When changing the size of a tty frame do not
4353 pass height of menu bar.
4354 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
4355 (Qright, Qleftmost, Qrightmost): New symbols.
4356 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
4357 FRAME_LINES.
4358 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
4359 * nsfns.m (x_set_internal_border_width): New function.
4360 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
4361 Remove extended fringe code.
4362 (x_set_window_size, x_new_font): Don't call
4363 compute_fringe_widths.
4364 * term.c (Fresume_tty): When changing the size of a tty frame do
4365 not pass height of menu bar.
4366 (clear_tty_hooks, set_tty_hooks):
4367 Clear horizontal_scroll_bar_hook.
4368 (init_tty): Frame has no horizontal scroll bars.
4369 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
4370 scroll_bar_before_handle, scroll_bar_horizontal_handle,
4371 scroll_bar_after_handle, scroll_bar_left_arrow,
4372 scroll_bar_right_arrow, scroll_bar_to_leftmost and
4373 scroll_bar_to_rightmost entries.
4374 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
4375 (struct terminal): Add set_horizontal_scroll_bar_hook.
4376 * w32console.c (initialize_w32_display):
4377 Clear horizontal_scroll_bar_hook.
4378 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
4379 FRAME_X_DISPLAY.
4380 (x_clear_under_internal_border, x_set_internal_border_width):
4381 New functions.
4382 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
4383 Set windows_or_buffers_changed when adding the menu bar.
4384 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
4385 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4386 (w32_createhscrollbar): New functions.
4387 (w32_createscrollbar): Rename to w32_createvscrollbar.
4388 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
4389 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
4390 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
4391 Add WM_EMACS_SHOWCURSOR.
4392 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
4393 case do not artificially impose WM size hints.
4394 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
4395 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
4396 cases.
4397 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
4398 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
4399 (unwind_create_frame_1): Remove.
4400 (Fx_create_frame): Make both scrollbars the system standard
4401 width and height. Use official field of frame structure to
4402 inhibit running window-configuration-change-hook.
4403 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4404 pixelwise. Handle frame's official field.
4405 (w32_frame_parm_handlers): Remove x_set_fringe_width
4406 entries. Add x_set_scroll_bar_height,
4407 x_set_horizontal_scroll_bars, x_set_left_fringe and
4408 x_set_right_fringe.
4409 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
4410 pass height of menu bar to change_frame_size.
4411 * w32menu.c (set_frame_menubar): Rewrite using
4412 frame_inhibit_resize.
4413 * w32term.h (struct w32_display_info):
4414 Add horizontal_scroll_bar_cursor and cursor_display_counter.
4415 (struct scroll_bar): Add horizontal.
4416 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4417 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4418 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
4419 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4420 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4421 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4422 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4423 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
4424 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
4425 Define instead of WM_EMACS_CREATESCROLLBAR.
4426 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
4427 WND_SCROLLBAR_INDEX.
4428 * w32term.c (horizontal_scroll_bar_min_handle)
4429 (horizontal_scroll_bar_left_border)
4430 (horizontal_scroll_bar_right_border): New integers.
4431 (x_set_frame_alpha): Replace x_highlight_frame by
4432 w32_focus_frame.
4433 (x_window_to_scroll_bar): New argument "type". Update callers
4434 accordingly.
4435 (w32_set_horizontal_scroll_bar_thumb)
4436 (x_horizontal_scroll_bar_report_motion)
4437 (w32_set_horizontal_scroll_bar)
4438 (w32_horizontal_scroll_bar_handle_click)
4439 (x_horizontal_scroll_bar_report_motion): New functions.
4440 (w32_mouse_position): Discriminate horizontal and vertical
4441 scrollbar cases.
4442 (my_create_scrollbar): Replace with two new functions
4443 my_create_vscrollbar and my_create_hscrollbar.
4444 (x_scroll_bar_create): New argument "horizontal".
4445 Update callers accordingly.
4446 (x_scroll_bar_remove, w32_condemn_scroll_bars)
4447 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
4448 scroll bar case.
4449 (w32_read_socket): Handle WM_HSCROLL cae.
4450 (x_new_font): Don't recompute fringe widths.
4451 Use frame_inhibit_resize. Calculate new menu bar height iff we
4452 build without toolkit. Always clear under internal border.
4453 (x_set_window_size): Don't check frame size or recompute
4454 fringes. Reset fullscreen status before applying sizes.
4455 Always resize as requested by pixelwise argument. Don't call
4456 do_pending_window_change.
4457 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
4458 (w32_initialize_display_info): Initialize dpyinfo's
4459 horizontal_scroll_bar_cursor entry.
4460 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
4461 (w32_initialize): Init horizontal_scroll_bar_min_handle and
4462 horizontal_scroll_bar_left_border.
4463 (w32fullscreen_hook): Intermittently resize window to normal
4464 when switching from fullscreen to maximized state.
4465 (run_window_configuration_change_hook): Don't run it if frame is
4466 not official yet.
4467 (unwind_change_frame): Remove.
4468 (Fset_window_configuration): Rewrite using frame's official field.
4469 * widget.c (set_frame_size): Don't call compute_fringe_widths.
4470 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
4471 * window.h (struct window): New fields old_pointm,
4472 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
4473 scroll_bar_height and suspend_auto_hscroll.
4474 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
4475 New functions.
4476 (sanitize_window_sizes): Extern.
4477 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
4478 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
4479 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
4480 (WINDOW_CONFIG_SCROLL_BAR_LINES)
4481 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
4482 New macros.
4483 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
4484 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
4485 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
4486 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
4487 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
4488 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
4489 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
4490 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
4491 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
4492 (Fwindow_old_point, sanitize_window_sizes): New functions.
4493 (Qwindow_sanitize_window_sizes): New symbol.
4494 (window_body_height): Count in horizontal scroll bar.
4495 (set_window_hscroll, Fscroll_left, Fscroll_right):
4496 Set suspend_auto_hscroll slot.
4497 (Fwindow_inside_edges): Count fringes pixelwise.
4498 (coordinates_in_window, Fcoordinates_in_window_p):
4499 Consider horizontal scroll bar.
4500 (check_frame_size, adjust_window_margins): Remove functions and
4501 corresponding calls.
4502 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
4503 (temp_output_buffer_show): Reset hscroll related fields.
4504 Initialize old_pointm.
4505 (make_parent_window): Initialize old_pointm.
4506 (make_window): Initialize old_pointm, horizontal scroll bar type,
4507 and scroll bar height.
4508 (resize_frame_windows): Don't count top margin in new sizes.
4509 Don't use safe sizes when shrinking a frame; let the window
4510 manager do the clipping.
4511 (Fsplit_window_internal): Inherit horizontal scroll bar type and
4512 height.
4513 (Fdelete_window_internal): Unchain old_pointm marker.
4514 (window_scroll_pixel_based, Fscroll_other_window):
4515 Adjust old_pointm.
4516 (Fwindow_text_width, Fwindow_text_height): New argument
4517 "pixelwise".
4518 (struct saved_window): New fields, old_pointm, hscroll_whole,
4519 suspend_auto_hscroll, scroll_bar_height and
4520 horizontal_scroll_bar_type.
4521 (Fset_window_configuration, save_window_save): Set new fields of
4522 saved_window.
4523 (apply_window_adjustment): Don't call adjust_window_margins.
4524 (set_window_margins): Don't change margins if new sizes don't
4525 fit into window.
4526 (set_window_scroll_bars): New argument "horizontal_type".
4527 Handle horizontal scroll bars. Don't change scroll bars if they
4528 don't fit into window.
4529 (Fset_window_scroll_bars): New argument "horizontal_type".
4530 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
4531 (compare_window_configurations): Compare horizontal scroll bar
4532 settings.
4533 * xdisp.c (window_text_bottom_y, window_box_height): Count in
4534 horizontal scroll bar height.
4535 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
4536 instead of FRAME_LINES.
4537 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
4538 ON_VERTICAL_SCROLL_BAR.
4539 (with_echo_area_buffer): Initialize old_pointm.
4540 (with_echo_area_buffer_unwind_data): Store old_pointm values in
4541 vector.
4542 (unwind_with_echo_area_buffer): Handle old_pointm.
4543 (update_tool_bar): Set do_update when the tool bar window has at
4544 least one line (since this is what the user sets).
4545 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
4546 (redisplay_tool_bar): Return early when toolbar has zero lines.
4547 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
4548 (hscroll_window_tree): Handle suspension of auto_hscroll and
4549 old_pointm.
4550 (set_horizontal_scroll_bar): New function.
4551 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
4552 more than one line. Handle horizontal scroll bars.
4553 (note_mouse_highlight): Handle horizontal scrol bars.
4554 (expose_frame): Set dimensions of XRectangle from frame's text
4555 sizes.
4556 (Vvoid_text_area_pointer): Update doc-string.
4557 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
4558 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4559 (x_set_internal_border_width): New functions.
4560 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
4561 (unwind_create_frame_1): Remove.
4562 (Fx_create_frame): Handle horizontal scroll bars. Use official
4563 field of frame structure to inhibit running
4564 window-configuration-change-hook.
4565 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4566 pixelwise. Handle frame's official field.
4567 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
4568 x_set_horizontal_scroll_bars, x_set_left_fringe,
4569 x_set_right_fringe.
4570 * xmenu.c (update_frame_menubar, free_frame_menubar):
4571 Use adjust_frame_size.
4572 * xterm.h (struct x_display_info):
4573 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
4574 slots.
4575 (struct scroll_bar): Add horizontal slot.
4576 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4577 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4578 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
4579 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4580 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4581 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4582 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4583 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
4584 (x_clear_under_internal_border): Remove.
4585 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
4586 (x_window_to_scroll_bar): New argument TYPE. Update callers.
4587 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
4588 HORIZONTAL. Update callers.
4589 (horizontal_action_hook_id): New action hook id.
4590 (x_horizontal_scroll_bar_to_input_event)
4591 (x_create_horizontal_toolkit_scroll_bar)
4592 (xt_horizontal_action_hook)
4593 (x_set_toolkit_horizontal_scroll_bar_thumb)
4594 (XTset_horizontal_scroll_bar, x_net_wm_state)
4595 (x_horizontal_scroll_bar_report_motion): New functions.
4596 (xg_scroll_callback, x_scroll_bar_handle_click):
4597 Handle horizontal scroll bars.
4598 (SCROLL_BAR_HORIZONTAL_NAME): Define.
4599 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
4600 by scroll bar.
4601 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
4602 Handle horizontal scroll bars.
4603 (handle_one_xevent): Handle horizontal scroll bar events.
4604 Call x_net_wm_state.
4605 (x_set_window_size_1, x_wm_set_size_hint): Don't call
4606 check_frame_size.
4607 (x_set_window_size): Don't call check_frame_size and
4608 do_pending_window_change.
4609 (x_term_init): Init horizontal_scroll_bar_cursor display info.
4610 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
4611 (x_scroll_bar_set_handle): Add some checks when calling
4612 x_clear_area.
4613
4614 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
4615
4616 Revert previous change.
4617 There is certainly nothing wrong with writing code like 'lo <= i
4618 && i <= hi', even if LO happens to a constant. There isn't even
4619 anything wrong in general with writing 'a <= b' if A happens to
4620 be a constant. At any rate stylistic changes shouldn't
4621 be done like this without discussion.
4622
4623 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
4624
4625 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
4626 (Fgarbage_collect): Reorder conditions that are written backwards.
4627 * data.c (cons_to_unsigned): Likewise.
4628 * dispnew.c (update_frame_1, sit_for): Likewise.
4629 * fileio.c (file_offset): Likewise.
4630 * filelock.c (read_lock_data, lock_file): Likewise.
4631 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
4632 Likewise.
4633 * font.c (font_intern_prop, font_style_symbolic): Likewise.
4634 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
4635 * lread.c (read1): Likewise.
4636 * minibuf.c (read_minibuf_noninteractive): Likewise.
4637 * nsterm.m (x_set_frame_alpha): Likewise.
4638 * process.c (wait_reading_process_output): Likewise.
4639 * region-cache.c (delete_cache_boundaries): Likewise.
4640 * xterm.c (x_set_frame_alpha): Likewise.
4641
4642 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
4643
4644 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
4645 Now static.
4646
4647 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4648
4649 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
4650 because atimer expiration is absolute rather than relative.
4651
4652 2014-07-25 Eli Zaretskii <eliz@gnu.org>
4653
4654 * w32term.h (current_popup_menu, menubar_in_use):
4655 Move declarations from w32term.c.
4656
4657 2014-07-25 Martin Rudalics <rudalics@gmx.at>
4658
4659 * w32fns.c (menubar_in_use): No more static.
4660 * w32term.c (current_popup_menu, menubar_in_use): Declare.
4661
4662 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4663
4664 Move hourglass machinery to RIF.
4665 * dispextern.h (struct redisplay_interface): New members
4666 show_hourglass and hide_hourglass. Indent comments.
4667 (show_hourglass, hide_hourglass): Remove prototypes.
4668 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
4669 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
4670 (ns_redisplay_interface): Add them.
4671 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
4672 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
4673 (w32_arrow_cursor): New function to hack around non-GUI frames.
4674 (w32_redisplay_interface): Add new functions.
4675 * w32term.h (w32_arror_cursor): Add prototype.
4676 * xdisp.c (show_hourglass): New function, refactored out from
4677 platform-dependent code.
4678 (cancel_hourglass): Now call to RIF function.
4679 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
4680 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
4681 (x_redisplay_interface): Add new functions.
4682
4683 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4684
4685 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
4686 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
4687 and complete previous change.
4688 * frame.c (adjust_frame_height): New function.
4689 (Fset_frame_height, Fset_frame_size): Use it.
4690 (x_set_frame_parameters): Take frame top margin into account.
4691
4692 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4693
4694 * frame.c (Fset_frame_height): Take frame top margin into account.
4695 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
4696 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
4697
4698 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4699
4700 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
4701 menubar_height as such. Tweak comment.
4702 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
4703 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
4704 All related users changed.
4705 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
4706 * xterm.c (handle_one_xevent):
4707 * gtkutil.c (xg_event_is_for_menubar):
4708 * xfns.c (x_window) [USE_X_TOOLKIT]:
4709 * xmenu.c (set_frame_menubar, free_frame_menubar):
4710 Prefer to use FRAME_MENUBAR_HEIGHT.
4711
4712 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
4713
4714 * frame.c (Fframe_parameters): Always report frame height without
4715 menu and tool bar lines.
4716
4717 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
4718
4719 * nsterm.m (applicationDidFinishLaunching:): Call
4720 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
4721 (antialiasThresholdDidChange:): New method for EmacsApp.
4722
4723 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
4724
4725 * macfont.m (macfont_update_antialias_threshold): Remove static.
4726
4727 * macfont.h (macfont_update_antialias_threshold): Declare.
4728
4729 2014-07-21 Eli Zaretskii <eliz@gnu.org>
4730
4731 * w32select.c (setup_windows_coding_system):
4732 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4733 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
4734
4735 * w16select.c (Fw16_get_clipboard_data):
4736 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4737 coding_system.
4738
4739 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
4740 buffer position where we are to start the iteration.
4741 (handle_invisible_prop): Record in it->stop_charpos the position
4742 where the invisible text ends. (Bug#18035)
4743 (hscroll_window_tree): Don't try hscrolling windows whose cursor
4744 row has zero buffer position as their start position.
4745 Reported by martin rudalics <rudalics@gmx.at>.
4746
4747 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
4748 infinite looping in redisplay when display lines don't have enough
4749 space to display even a single character. (Bug#18036)
4750
4751 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4752
4753 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
4754 * xfns.c (x_window): Use it to allow xfree later.
4755 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
4756 where appropriate. Use bool for booleans and remove redundant checks.
4757 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
4758 * xterm.c (x_free_frame_resources): Free shell_position.
4759
4760 2014-07-19 K. Handa <handa@gnu.org>
4761
4762 * xfaces.c (realize_x_face): Call font_load_for_lface with no
4763 mandatory font spec (Bug#17973).
4764
4765 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
4766
4767 * font.c (font_score): Return the worst score if the size of
4768 ENTITY is wrong by more than a factor 2 (Bug#17973).
4769
4770 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4771
4772 * frame.c (frame_unspecified_color): New function
4773 refactored out from ...
4774 (Fframe_parameters, Fframe_parameter): ... adjusted users.
4775 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
4776 function to ...
4777 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
4778 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
4779 * lisp.h (set_frame_param): Remove prototype.
4780 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
4781 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
4782 inlined from here.
4783
4784 Prefer 'x_display_info *' to 'Display *' in X selection code.
4785 This helps to avoid unneeded calls to x_display_info_for_display.
4786 * xterm.h (struct selection_input_event): Record 'x_display_info *'
4787 instead of 'Display *'.
4788 (SELECTION_EVENT_DPYINFO): New macro.
4789 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
4790 it as an lvalue. Mention this in comment.
4791 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
4792 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
4793 (selection_data_to_lisp_data, receive_incremental_selection):
4794 Convert to use 'x_display_info *'. Adjust users where appropriate.
4795 (lisp_data_to_selection_data): Likewise. Also pass 'struct
4796 selection data *' as last arg to not return values in args.
4797 (unexpect_property_change): Use common removal technique.
4798
4799 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4800
4801 * print.c (print_preprocess): Adjust to match changed
4802 sub char-table structure and avoid crash (Bug#18038).
4803
4804 * data.c (wrong_choice): Not static any more.
4805 * lisp.h (wrong_choice): Add prototype.
4806 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
4807 Declare namebuf as such. Tweak comment.
4808 [USE_GTK]: Likewise for tool_bar_position.
4809 (fset_tool_bar_position) [USE_GTK]: Ditto.
4810 (FRAME_TOOL_BAR_POSITION): New macro.
4811 * frame.c (x_report_frame_params):
4812 * gtkutil.c (update_frame_tool_bar):
4813 * xfns.c (Fx_create_frame): Use it.
4814 (x_set_tool_bar_position): Add meaningful diagnostic messages.
4815
4816 2014-07-16 Eli Zaretskii <eliz@gnu.org>
4817
4818 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
4819 buffer's default-directory only if it is a string. (Bug#17986)
4820
4821 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4822
4823 More precise control over values of some buffer-local variables.
4824 * keyboard.c (Qvertical_scroll_bar):
4825 * frame.c (Qleft, Qright): Move to ...
4826 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
4827 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
4828 (syms_of_buffer): DEFSYM all of the above, attach special properties.
4829 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
4830 vertical-scroll-bar, scroll-up-aggressively
4831 and scroll-down-aggressively.
4832 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
4833 Add declarations.
4834 * nsfns.m, frame.h (Qleft, Qright):
4835 * nsterm.m (Qleft): Remove declarations.
4836 * gtkutil.c (toplevel): Include buffer.h.
4837 * data.c (wrong_choice, wrong_range): New functions.
4838 (store_symval_forwarding): Handle special properties of buffer-local
4839 variables and use functions from the above to signal error, if any.
4840
4841 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
4842 values. Add comment.
4843 (struct frame): Re-arrange layout to avoid extra padding and use bit
4844 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
4845 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
4846 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
4847 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
4848 Define as no-ops because there are no scroll bars anyway.
4849 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
4850 Adjust users.
4851
4852 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
4853 Add convenient setter.
4854 (font_put_frame_data, font_get_frame_data): Use it.
4855
4856 2014-07-15 Daiki Ueno <ueno@gnu.org>
4857
4858 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
4859 pointer argument, before dereferencing.
4860 (XCHAR2B_BYTE2): Likewise.
4861
4862 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4863
4864 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
4865 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
4866 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
4867 Use record_unwind_protect_int and avoid consing.
4868 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
4869
4870 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
4871
4872 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
4873
4874 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
4875 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
4876 * emacs.c [MSDOS]:
4877 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
4878 (main) [MSDOS]: Use SET_BINARY instead of setmode.
4879 * minibuf.c: Include binary-io.h instead of fcntl.h.
4880 (read_minibuf_noninteractive):
4881 Use set_binary_mode instead of handcrafted code.
4882 Don't call emacs_set_tty if emacs_get_tty failed.
4883 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
4884 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
4885 * w32.c (pipe2): Adjust eassert to include O_BINARY.
4886
4887 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
4888 This works around a GCC compiler bug when Emacs is configured with
4889 --enable-gcc-warnings.
4890
4891 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
4892
4893 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
4894 or characters in string, respectively. Add comment.
4895 * fringe.c (Fdefine_fringe_bitmap):
4896 * fns.c (Fsubstring, substring_both): Use it.
4897 * keymap.c (Fdefine_key, Flookup_key):
4898 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
4899
4900 * term.c (tty_menu_add_pane, tty_menu_add_selection):
4901 Use menu_item_width.
4902 (tty_menu_show): Simplify because tty_menu_create never return NULL.
4903
4904 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
4905
4906 Improve behavior of 'bzr up; cd src; make -k'.
4907 * Makefile.in (top_srcdir): New var.
4908 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
4909 Use '$(top_srcdir)' instead of '$(srcdir)/..';
4910 its expansion is a bit shorter.
4911 (../config.status): Actually build config.status instead of
4912 just complaining.
4913 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
4914 New macros, copied and relocated from ../Makefile.in.
4915 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
4916 (../config.status, Makefile): New dependencies and rules,
4917 copied with relocation from ../Makefile.in. This should be more
4918 likely to rebuild the build machinery properly if you do a 'make'
4919 in the src directory.
4920
4921 2014-07-12 Eli Zaretskii <eliz@gnu.org>
4922
4923 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
4924 than 1. (Bug#17962)
4925
4926 * w32fns.c (Fx_file_dialog): Mention in the doc string the
4927 behavior on Windows 7 and later when the function is repeatedly
4928 invoked with the same value of DIR. (Bug#17950)
4929
4930 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
4931 string to match the one in w32fns.c.
4932
4933 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
4934 stdin to binary mode only if it is connected to a terminal.
4935
4936 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
4937
4938 Coalesce extern decls.
4939 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
4940 * sysdep.c (emacs_get_tty, emacs_set_tty):
4941 Move duplicate extern decls from here ...
4942 * systty.h: ... to here, so that there's just one copy.
4943
4944 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
4945
4946 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
4947
4948 * nsfns.m (Fns_popup_font_panel): Ditto.
4949
4950 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4951
4952 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
4953 not only on '\n'.
4954 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
4955
4956 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
4957 [DOS_NT]: Implement for WINDOWSNT.
4958
4959 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
4960 unsigned.
4961
4962 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4963
4964 * sysdep.c (suppress_echo_on_tty): New function.
4965 * minibuf.c (read_minibuf_noninteractive): Use it.
4966
4967 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4968
4969 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
4970 sysinfo failed. Adjust docstring.
4971
4972 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4973
4974 Implement memory-info for MS-DOS.
4975 * dosfns.c (dos_memory_info): New function.
4976 * dosfns.h (dos_memory_info): Add prototype.
4977 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
4978 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
4979 of doing some of its job.
4980
4981 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
4982 reference termios structure members.
4983
4984 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4985
4986 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
4987
4988 * minibuf.c (top): Include systty.h. Declare external
4989 emacs_get_tty and emacs_set_tty.
4990 (Vread_hide_char): New lisp variable.
4991 (read_minibuf_noninteractive): Hide characters with
4992 Vread_hide_char if it is a character. (Bug#17839)
4993
4994 2014-07-10 Eli Zaretskii <eliz@gnu.org>
4995
4996 Implement memory-info for MS-Windows.
4997 * w32.c (w32_memory_info): New function.
4998 * w32.h (w32_memory_info): Prototype it.
4999 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
5000
5001 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
5002
5003 * coding.h (struct coding_system): Remove 'error_positions' (unused)
5004 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
5005 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
5006 extra padding and shrink struct coding_system by 56 bytes (x86_64).
5007 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
5008 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
5009 (decode_coding_big5, decode_coding_charset, decode_coding)
5010 (encode_coding): Adjust users.
5011
5012 * alloc.c (Fmemory_info): New function.
5013
5014 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
5015
5016 * syntax.c (back_comment): Use more-natural location for label.
5017
5018 * font.c, font.h (font_unparse_fcname): Now static.
5019 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
5020
5021 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
5022
5023 Next minor cleanup of font subsystem.
5024 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
5025 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
5026 really used).
5027 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
5028 unused.
5029 * ftfont.h (ftfont_font_format): Remove prototype.
5030 * ftfont.c (ftfont_font_format): Remove; now unused.
5031 (ftfont_open):
5032 * nsfont.m (nsfont_open):
5033 * w32font.c (w32font_open_internal):
5034 * w32uniscribe.c (uniscribe_open):
5035 * xfont.c (xfont_open):
5036 * xftfont.c (xftfont_open): All users changed.
5037
5038 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
5039 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
5040
5041 2014-07-09 Eli Zaretskii <eliz@gnu.org>
5042
5043 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
5044 x_produce_glyphs does when it generates a stretch glyph that
5045 represents a TAB. (Bug#17969)
5046
5047 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
5048 and there is a display property at that position, don't call
5049 move_it_to to move to a position before window start. (Bug#17942)
5050 Fix condition for finding CHARPOS by the first call to move_it_to.
5051 (Bug#17944)
5052
5053 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
5054
5055 * syntax.c (find_defun_start): Try the cache even
5056 if !open_paren_in_column_0_is_defun_start.
5057 (back_comment): If find_defun_start was pessimistic, use the
5058 scan_sexps_forward result to improve the cache (bug#16526).
5059
5060 2014-07-09 Eli Zaretskii <eliz@gnu.org>
5061
5062 * xdisp.c (redisplay_window): If redisplay of a window ends up
5063 with point in a partially visible line at end of the window, make
5064 sure the amended position of point actually has smaller Y
5065 coordinate; if not, give up and scroll the display. (Bug#17905)
5066
5067 * window.c (window_scroll_pixel_based): When point ends up at the
5068 last fully visible line, don't let move_it_to stop at the left
5069 edge of the line and dupe us into thinking point is inside the
5070 scroll margin.
5071
5072 * w32.c (network_interface_info): Make sure the argument is a
5073 Lisp string.
5074
5075 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
5076
5077 * process.c (read_and_dispose_of_process_output): Fix typo
5078 in previous patch: we want nonnegative fds, not nonzero fds.
5079
5080 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
5081
5082 * chartab.c (char_table_translate): Move to...
5083 * character.h (char_table_translate): ... inline function here.
5084 Avoid Faref and assume that args are always valid. This helps to
5085 speedup search, which is especially important for a huge buffers.
5086 * lisp.h (char_table_translate): Remove prototype.
5087
5088 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
5089 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
5090 New function, with an intention to avoid code duplication between
5091 a few font drivers.
5092 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
5093 Add prototype.
5094 * ftfont.c (ftfont_open):
5095 * macfont.m (macfont_open):
5096 * xftfont.c (xftfont_open): Use it.
5097
5098 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
5099
5100 * process.c: Add sanity checks for file descriptors (Bug#17844).
5101 (wait_reading_process_output, Fprocess_filter_multibyte_p):
5102 Check that infd is nonnegative before using it as an fd.
5103 (read_and_dispose_of_process_output, Fprocess_send_eof):
5104 Likewise, for outfd.
5105 (wait_reading_process_output): Omit unnecessary check of infd.
5106
5107 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
5108
5109 Minor fixups related to usage of the 'long' type.
5110 * gnutls.c (emacs_gnutls_handshake):
5111 * xfaces.c (dump_realized_face):
5112 Work even if 'long' is narrower than 'void *'.
5113 * termcap.c (scan_file):
5114 * xselect.c (x_decline_selection_request)
5115 (x_reply_selection_request, x_get_window_property):
5116 * xterm.c (x_set_frame_alpha):
5117 Remove unnecessary 'L' suffixes of integer constants.
5118 * xfns.c (hack_wm_protocols):
5119 * xselect.c (x_fill_property_data):
5120 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
5121 Remove unnecessary casts to 'long'.
5122 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
5123
5124 Minor ImageMagick safety fixes.
5125 * image.c (imagemagick_compute_animated_image):
5126 Remove useless assignment to local. Avoid problems if dest_width is 0.
5127 (imagemagick_load_image): Use int for pixel counts that can't
5128 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
5129 a row width greater than the image width (or greater than LONG_MAX!).
5130
5131 2014-07-04 K. Handa <handa@gnu.org>
5132
5133 * coding.c (MIN_CHARBUF_SIZE): Delete it.
5134 (MAX_CHARBUF_EXTRA_SIZE): New macro.
5135 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
5136
5137 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
5138
5139 * font.h (struct font_driver): Remove get_outline and free_outline;
5140 not used by any font driver.
5141 * ftfont.c (ftfont_driver):
5142 * macfont.m (macfont_driver):
5143 * nsfont.m (nsfont_driver):
5144 * w32font.c (w32font_driver):
5145 * w32uniscribe.c (uniscribe_font_driver):
5146 * xfont.c (xfont_driver): Related users changed.
5147 * xselect.c (x_get_window_property): Use convenient xmalloc.
5148 Call to xfree only if some data was really allocated.
5149
5150 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5151
5152 On MS-Windows, display busy cursor on all GUI frames.
5153 This is similar to what we have on X. Quickly tested by Dani Moncayo.
5154 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
5155 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
5156 Likewise.
5157 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
5158 * xdisp.c (start_hourglass): Remove Windows-specific bits.
5159
5160 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5161
5162 Use convenient alists to manage per-frame font driver-specific data.
5163 * frame.h (struct frame): Rename font_data_list to...
5164 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
5165 * font.h (struct font_data_list): Remove; no longer need a special
5166 data type.
5167 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
5168 Adjust prototypes.
5169 * font.c (font_put_frame_data, font_get_frame_data)
5170 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
5171 management.
5172 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
5173 Related users changed.
5174 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
5175 Prefer convenient xmalloc and xfree.
5176
5177 2014-07-03 Eli Zaretskii <eliz@gnu.org>
5178
5179 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
5180 the window whose glyph row is being prepared and a flag whether it
5181 is for mode/header line. Make sure the glyph row's marginal areas
5182 are in sync with what the window wants.
5183 (Bug#17892)
5184
5185 * xdisp.c (display_line, display_mode_line):
5186 Call prepare_desired_row with additional arguments, as appropriate.
5187
5188 * dispextern.h (prepare_desired_row): Adjust prototype.
5189
5190 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
5191
5192 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
5193 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
5194 caused by xw_popup_dialog in daemon mode (Bug#17891).
5195
5196 2014-07-03 Eli Zaretskii <eliz@gnu.org>
5197
5198 * frame.c (do_switch_frame): When switching to another TTY frame,
5199 make sure FrameCols and FrameRows are in sync with the new frame's
5200 data. (Bug#17875)
5201
5202 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
5203
5204 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
5205 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
5206 min_char slots. Adjust comment.
5207 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
5208 Add SUB_CHAR_TABLE_OFFSET member.
5209 (make_uninit_sub_char_table): New function.
5210 (toplevel): Add compile-time assert to verify suitable member layout
5211 in Lisp_Sub_Char_Table.
5212 * alloc.c (mark_char_table): Add extra argument to denote char table
5213 subtype. Adjust to match new layout of sub char-table.
5214 (mark_object): Always mark sub char-tables with mark_char_table.
5215 * chartab.c (make_sub_char_table, copy_sub_char_table)
5216 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
5217 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
5218 (map_sub_char_table_for_charset, uniprop_table_uncompress):
5219 All related users changed.
5220 * lread.c (read1): Adjust to match new layout of sub char-table.
5221 * print.c (print_object): Likewise (Bug#17898).
5222
5223 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
5224
5225 * keymap.c (get_keyelt): Simplify.
5226 (copy_keymap_item): Remove left-over code for when we had
5227 key-shortcut caches.
5228
5229 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5230
5231 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
5232 (dealloc): Remove for EmacsScroller.
5233
5234 * nsterm.h (EmacsScroller): Remove dealloc.
5235
5236 2014-06-30 Eli Zaretskii <eliz@gnu.org>
5237
5238 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
5239
5240 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5241
5242 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
5243 when setNeedsDisplay is called so we don't trigger redisplay for every
5244 tool bar update.
5245
5246 * nsterm.m (any_help_event_p): New variable.
5247 (mouseMoved:): Set any_help_event_p to YES if help event is
5248 generated. Remove else with empty help event that triggered redisplay
5249 for every mouse move.
5250 (windowDidResignKey:): If any_help_event_p, generate empty help event.
5251
5252 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5253
5254 * xfns.c (Qsuppress_icon): Remove; no real users.
5255 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
5256 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
5257 (syms_of_w32fns): Don't DEFSYM it.
5258
5259 2014-06-29 Glenn Morris <rgm@gnu.org>
5260
5261 * Makefile.in (ns-app): Mark as PHONY.
5262
5263 2014-06-28 Glenn Morris <rgm@gnu.org>
5264
5265 * Makefile.in (mostlyclean): There are no libXMenu11.a,
5266 liblw.a in this directory.
5267
5268 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
5269
5270 * coding.c (encode_coding_utf_8): Correctly count produced_chars
5271 also in unibyte case. (Bug#17865)
5272
5273 2014-06-28 K. Handa <handa@gnu.org>
5274
5275 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
5276 (MIN_CHARBUF_SIZE): New macro.
5277 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
5278
5279 2014-06-27 Glenn Morris <rgm@gnu.org>
5280
5281 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
5282 with an order-only dependence on bootstrap-emacs. (Bug#2151)
5283 (.el.elc): Replace suffix rule with pattern rule.
5284 (%.elc): New pattern rule, with order-only prerequisite.
5285 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
5286 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
5287 in place of BOOTSTRAPEMACS.
5288
5289 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5290
5291 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
5292
5293 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5294
5295 Consistently use validate_subarray to verify substring.
5296 * fns.c (validate_substring): Not static any more. Adjust to
5297 use ptrdiff_t, not EMACS_INT, because string and vector limits
5298 can't exceed ptrdiff_t even if EMACS_INT is wider.
5299 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
5300 (secure_hash): Adjust user.
5301 * lisp.h (validate_subarray): Add prototype.
5302 * coding.c (Fundecodable_char_position):
5303 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
5304 Use validate_subarray. Adjust comment to mention substring.
5305
5306 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5307
5308 Do not allow out-of-range character position in Fcompare_strings.
5309 * fns.c (validate_subarray): Add prototype.
5310 (Fcompare_substring): Use validate_subarray to check ranges.
5311 Adjust comment to mention that the semantics was changed. Also see
5312 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
5313
5314 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
5315
5316 Be more consistent about the 'Qfoo' naming convention.
5317 * image.c (Fimagemagick_types):
5318 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
5319 * process.c (Fmake_network_process):
5320 Rename C local identifier 'Qfoo to avoid giving the false
5321 impression that it stands for the symbol 'foo'.
5322
5323 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
5324
5325 Simplify and cleanup character conversion stuff.
5326 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
5327 Remove prototypes.
5328 * character.c (multibyte_char_to_unibyte)
5329 (multibyte_char_to_unibyte_safe): Remove; no longer used.
5330 * character.h (make_char): Remove; unused.
5331 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
5332 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
5333 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
5334 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
5335 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
5336
5337 2014-06-22 Mario Lang <mlang@delysid.org>
5338
5339 * w32fns.c (Fw32_shell_execute): The the -> the.
5340
5341 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
5342
5343 * xmenu.c (mouse_position_for_popup):
5344 * xselect.c (mouse_position_for_drop): Do not duplicate ...
5345 * xfns.c (x_relative_mouse_position): ... and prefer this function.
5346 * menu.c (Fx_popup_menu):
5347 * xselect.c (x_handle_dnd_message): Adjust users.
5348 * menu.h (mouse_position_for_popup): Remove prototype.
5349 * xterm.h (x_relative_mouse_position): Add prototype.
5350 * xterm.c (x_find_topmost_parent): Break from the loop and do not
5351 call XFree if XQueryTree returns zero.
5352
5353 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5354
5355 * indent.c (Fvertical_motion): Doc fix.
5356 Move to the goal column, if any, with a single call to
5357 move_it_in_display_line, not in two calls. Doing this with two
5358 calls causes move_it_in_display_line apply the line-prefix
5359 handling twice instead of just once. (Bug#17823)
5360
5361 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
5362
5363 Port to OS X ACLs (Bug#17810).
5364 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
5365 ACL_TYPE_ACCESS) doesn't work.
5366
5367 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
5368
5369 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
5370 before checking key-translation-map (bug#17659).
5371
5372 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
5373
5374 * font.c (font_make_object): Avoid dangling pointer which may
5375 crash GC (Bug#17771).
5376
5377 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5378
5379 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
5380 prototype of DGifCloseFile as appropriate for older and newer
5381 versions of giflib.
5382 (gif_close): New function, encapsulates the differences in the
5383 calling sequence of DGifCloseFile before v5.1.0 and after it.
5384 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
5385 error string where appropriate. (Bug#17790)
5386
5387 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
5388 macro execution, make sure point didn't move since last complete
5389 redisplay, as the condition for using the glyph matrix
5390 information. (Bug#17777)
5391
5392 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5393
5394 Minor cleanup of fonset code.
5395 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
5396 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
5397 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
5398 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
5399 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
5400 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
5401 (free_realized_fontset): Remove because a no-op since 2008.
5402 (free_face_fontset): Adjust user.
5403 (syms_of_fontset): Shrink fontset by one extra slot.
5404
5405 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
5406
5407 Omit redundant extern decls.
5408 Most of this patch is from Dmitry Antipov, in:
5409 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
5410 * commands.h (update_mode_lines):
5411 * frame.h (Qbackground_color, Qforeground_color)
5412 (x_set_menu_bar_lines):
5413 * ftfont.c (ftfont_font_format):
5414 * intervals.h (Qkeymap, Qfont):
5415 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
5416 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
5417 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
5418 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
5419 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
5420 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
5421 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
5422 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
5423 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
5424 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
5425 (Qtool_bar, Qheader_line):
5426 * macros.c (Fexecute_kbd_macro):
5427 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
5428 * xterm.c (x_delete_terminal, XSetIMValues):
5429 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
5430 (x_implicitly_set_name, popup_activated)
5431 (widget_store_internal_border):
5432 Remove redundant decls.
5433 * frame.c [USE_X_TOOLKIT]: Include widget.h.
5434 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
5435 Remove _Noreturn, as make-docfile now does that for us.
5436 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
5437 (Qregion_extract_function): New decl.
5438 * window.c, xfns.c: Include menu.h.
5439
5440 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
5441
5442 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
5443
5444 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
5445
5446 * fileio.c (Fread_file_name): Do not pass redundant args and ...
5447 * callint.c (read_file_name): ... convert to static here.
5448 * lisp.h (Fread_file_name): Do not EXFUN it.
5449 (STRING_COPYIN): Remove; unused.
5450 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
5451 (char_composable_p): ... static function. All users changed.
5452 * eval.c (toplevel): Remove redundant #include directives.
5453 * xterm.c (x_initialize): Add static to match prototype.
5454 * ccl.c (Fccl_execute_on_string):
5455 * font.c (fon_intern_prop): Use make_specified_string.
5456
5457 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
5458
5459 * Makefile.in (ns-app): Fix typo that broke build on OS X.
5460 Reported by David Caldwell in:
5461 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
5462
5463 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
5464
5465 Do not ask for XRender extension each time XFT font is opened.
5466 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
5467 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
5468
5469 2014-06-15 Glenn Morris <rgm@gnu.org>
5470
5471 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
5472
5473 2014-06-15 Eli Zaretskii <eliz@gnu.org>
5474
5475 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
5476 information if we are in the middle of executing a keyboard macro,
5477 since redisplay doesn't update the screen until the macro is
5478 finished. (Bug#17777)
5479
5480 * alloc.c (cleanup_vector): Don't dereference a font driver
5481 pointer if it is NULL. (Bug#17771)
5482
5483 2014-06-13 Glenn Morris <rgm@gnu.org>
5484
5485 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
5486 ($(lispsource)/international/charprop.el)
5487 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
5488 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
5489 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
5490 GNU make automatically passes command-line arguments to sub-makes.
5491
5492 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
5493
5494 Avoid hangs in accept-process-output (Bug#17647).
5495 * lisp.h, process.c (wait_reading_process_input):
5496 Return int, not bool. All uses changed.
5497 * process.c (SELECT_CANT_DO_WRITE_MASK):
5498 Remove macro, replacing with ...
5499 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
5500 All uses changed.
5501 (status_notify): New arg WAIT_PROC. Return int, not void.
5502 All uses changed.
5503
5504 2014-06-13 Eli Zaretskii <eliz@gnu.org>
5505
5506 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
5507 the frame is the initial frame, because the hook is not set up
5508 then, and Emacs crashes.
5509 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
5510
5511 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
5512
5513 * keymap.c (silly_event_symbol_error): Don't recommend the use
5514 of strings.
5515
5516 2014-06-11 Eli Zaretskii <eliz@gnu.org>
5517
5518 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
5519 matching overlay strings with 'cursor' property against buffer
5520 positions traversed in the glyph row. (Bug#17744)
5521
5522 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
5523
5524 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
5525 on Cocoa.
5526
5527 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
5528 determine 10.9 (Bug#17751).
5529
5530 * macfont.m (macfont_draw): Positions were not freed.
5531
5532 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
5533
5534 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
5535 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
5536 function. Also adjust comment.
5537 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
5538
5539 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
5540 * font.c (font_done_for_face):
5541 * xfaces.c (realize_non_ascii_face): Adjust user.
5542 * font.h (struct font_driver): Convert 'prepare_face' to return
5543 void because its return value is never used anyway.
5544 * xfont.c (xfont_prepare_face): Return void.
5545 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
5546 (xftfont_done_face): Use xfree.
5547
5548 * dispextern.h (last_tool_bar_item): Remove declaration.
5549 * frame.h (struct frame): New member last_tool_bar_item.
5550 * frame.c (make_frame): Initialize it.
5551 * xdisp.c (toplevel): Remove last_tool_bar_item.
5552 (handle_tool_bar_click, note_tool_bar_highlight):
5553 * w32term.c (w32_read_socket, w32_initialize):
5554 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
5555
5556 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
5557 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
5558
5559 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5560
5561 Say (accept-process-output P)'s result pertains to P if P is non-nil.
5562 * process.c (Faccept_process_output)
5563 (wait_reading_process_output): Mention that if PROCESS is non-nil,
5564 the return value is about PROCESS, not about other processes.
5565
5566 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
5567
5568 Further adjustments to mark_object and friends.
5569 Now the mark_object's stack is just 32 bytes on a 64-bit
5570 system, which means extra 20% off the stack usage.
5571 * alloc.c (mark_save_value): As before, refactored out from ...
5572 (mark_object): ... adjusted user. Also add comment.
5573
5574 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5575
5576 Fix core dump after a dropped X connection (Bug#17704).
5577 * sysdep.c (stuff_char): Don't abort merely because the selected frame
5578 is dead, as we may be shutting down.
5579
5580 2014-06-08 Glenn Morris <rgm@gnu.org>
5581
5582 * fileio.c (write-region-inhibit-fsync): Doc tweak.
5583
5584 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
5585
5586 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
5587
5588 If a C name must be extern on some platforms, make it extern on all.
5589 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
5590 (load_color):
5591 * font.h (ftxfont_driver) [HAVE_XFT]:
5592 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
5593 * lisp.h (get_frame_param):
5594 * menu.h (tty_menu_show):
5595 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
5596 * termhooks.h (encode_terminal_code):
5597 * xterm.h (x_menu_wait_for_event):
5598 Always declare.
5599 * frame.c (get_frame_param):
5600 * fringe.c (max_used_fringe_bitmap):
5601 * ftxfont.c (ftxfont_driver):
5602 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
5603 * menu.c (menu_items_inuse):
5604 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
5605 * term.c (encode_terminal_code, tty_menu_show):
5606 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
5607 * xfaces.c (load_color):
5608 * xmenu.c (x_menu_wait_for_event):
5609 Now always extern.
5610
5611 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5612
5613 Change object marking routines to minimize stack usage.
5614 This change moves a few cold paths from mark_object to NO_INLINE
5615 functions and adjusts symbol marking loop. According to GCC 4.8.2
5616 -Wstack-usage, this reduces mark_object's stack usage from 80 to
5617 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
5618 stack usage at the mark phase is reduced up to 28%. Surprisingly,
5619 it also gains up to 3% in speed (with default '-O2 -g3' flags).
5620 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
5621 refactored out from ...
5622 (mark_object): ... adjusted user. Also mark symbols in a tight
5623 inner loop.
5624 (mark_face_cache): Add NO_INLINE.
5625
5626 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5627
5628 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
5629 contains garbage on WINDOWSNT (which could potentially infloop at
5630 exit).
5631
5632 Minimize cursor motion during TTY menu updates.
5633 * term.c (tty_menu_display): Don't position cursor here.
5634 Instead, pass the cursor coordinates to update_frame_with_menu.
5635 (tty_menu_activate): Send the hide cursor command only once in an
5636 iteration through the outer 'while' loop.
5637
5638 * dispnew.c (update_frame_1): Accept an additional argument
5639 SET_CURSOR_P, and position the cursor at the end of the frame
5640 update only if that argument is non-zero. All callers changed to
5641 provide the additional argument as non-zero, except for
5642 update_frame_with_menu.
5643 (update_frame_with_menu): Accept 2 additional arguments ROW and
5644 COL; if they are non-negative, instruct update_frame_1 not to
5645 position the cursor, and instead position it according to ROW and COL.
5646
5647 * dispextern.h (update_frame_with_menu): Update prototype.
5648
5649 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5650
5651 * callproc.c (call_process): Don't check read-only if we don't insert
5652 anything (bug#17666).
5653
5654 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5655
5656 * dispnew.c (update_frame_with_menu): Set display_completed.
5657
5658 2014-06-07 Eli Zaretskii <eliz@gnu.org>
5659
5660 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
5661 only for WINDOWSNT.
5662 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
5663
5664 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
5665
5666 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
5667 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
5668
5669 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
5670
5671 * window.c (Frecenter): Signal an error if window-buffer is not
5672 current-buffer.
5673
5674 * keyboard.c (make_lispy_position): Don't include a buffer position in
5675 mode/header-line mouse events.
5676
5677 * keyboard.c (read_char): Handle (t . <event>) in the second use of
5678 Vunread_command_events (bug#17650).
5679
5680 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
5681
5682 * xterm.c (x_setup_pointer_blanking):
5683 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
5684
5685 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
5686
5687 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
5688 because it will be defined in generated config.h if needed.
5689
5690 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5691
5692 Use terminal-specific hooks to display popup dialogs.
5693 * termhooks.h (struct terminal): New field popup_dialog_hook.
5694 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
5695 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
5696 code and use popup_dialog_hook.
5697 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
5698 * nsterm.h (ns_popup_dialog): Adjust prototype.
5699 * nsterm.m (ns_create_terminal):
5700 * w32term.c (w32_create_terminal):
5701 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
5702 Setup popup_dialog_hook.
5703
5704 2014-06-04 Eli Zaretskii <eliz@gnu.org>
5705
5706 * w32heap.c (report_temacs_memory_usage): Improve the report by
5707 reporting the large blocks that are actually occupied at dump time.
5708
5709 * w32console.c (initialize_w32_display): Set the console
5710 menu_show_hook, otherwise TTY menus are broken on w32.
5711
5712 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5713
5714 Use terminal-specific hooks to display menus.
5715 * termhooks.h (struct terminal): New field menu_show_hook.
5716 * menu.h (<anonymous enum>): Bit flags for menu hooks.
5717 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
5718 Adjust prototypes.
5719 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
5720 * nsmenu.m (ns_menu_show):
5721 * w32menu.c (w32_menu_show):
5722 * xmenu.c (x_menu_show):
5723 * term.c (tty_menu_show): Adjust to use bit flags.
5724 (set_tty_hooks): Set menu_show_hook.
5725 * xterm.c (x_create_terminal):
5726 * nsterm.m (ns_create_terminal):
5727 * msdos.c (initialize_msdos_display):
5728 * w32term.c (w32_create_terminal): Likewise.
5729
5730 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
5731
5732 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
5733
5734 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5735
5736 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
5737 (FD_SET): Don't define on WINDOWSNT.
5738
5739 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5740
5741 * emacs.c: Include "sysselect.h", to define its inline functions.
5742 Reported by Glenn Morris in:
5743 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
5744
5745 Do not require libXt-devel when building with gtk.
5746 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
5747 dependency on libXt-devel.
5748 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
5749 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
5750 lwlib-widget.h now does this.
5751 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
5752
5753 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
5754
5755 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
5756 * process.c (add_read_fd, delete_read_fd, add_write_fd)
5757 (delete_write_fd, wait_reading_process_output):
5758 Remove now-redundant easserts.
5759 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
5760 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5761 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
5762 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
5763
5764 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5765
5766 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
5767 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
5768 (calloc): Don't undef, it is never defined.
5769 (HEAP_ENTRY_SHIFT): Remove unused macro.
5770
5771 * Makefile.in (C_HEAP_SWITCH): Remove.
5772 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
5773
5774 Fix MS-Windows build broken by menu changes on 2014-06-02.
5775 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
5776
5777 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
5778 Define instead of including ../lwlib/lwlib.h, which causes
5779 compilation errors due to missing X11 headers.
5780
5781 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5782
5783 * process.c (wait_reading_process_output): Omit incorrect test of
5784 p->infd against zero. Add easserts for infd having a plausible value.
5785
5786 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5787
5788 Adjust to match recent lwlib changes.
5789 * menu.h (xmalloc_widget_value): Replace by ...
5790 (make_widget_value): ... new prototype.
5791 * menu.c (xmalloc_widget_value): Replace by ...
5792 (make_widget_value): ... new function.
5793 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
5794 * gtkutil.c (malloc_widget_value, free_widget_value):
5795 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
5796 * keyboard.h (enum button_type, struct _widget_value):
5797 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
5798 Likewise.
5799 * nsmenu.m (ns_update_menubar, ns_menu_show):
5800 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
5801 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
5802 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
5803
5804 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5805
5806 * image.c (x_query_frame_background_color)
5807 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
5808 Fix --enable-gcc-warnings compilation without image libraries.
5809
5810 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5811
5812 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
5813 emulated break value only if it goes up.
5814 (sbrk): Add assertion that the INCREMENT argument is strictly
5815 zero. Improve and correct the commentary.
5816
5817 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5818
5819 Improve AIX-related merge from emacs-24.
5820 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
5821 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
5822 not on AIX; since we're on the trunk we can use enums more broadly.
5823
5824 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
5825
5826 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
5827
5828 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
5829 to min(value, whole).
5830
5831 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5832
5833 Bring back the changes to GDB-visible symbols, but only on AIX.
5834 And only if it's not pre-4.2 GCC.
5835 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5836 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5837 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5838 New macros.
5839
5840 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5841
5842 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
5843 with PT, not GPT. (Bug#16433)
5844
5845 Revert last changes to GDB-visible symbols.
5846 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
5847 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
5848 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5849 Delete macros.
5850
5851 2014-06-02 Glenn Morris <rgm@gnu.org>
5852
5853 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
5854
5855 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5856
5857 Fix port to 32-bit AIX with xlc (Bug#17598).
5858 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
5859 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
5860 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
5861 to work around a compiler bug in IBM xlc 12.1.
5862
5863 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5864
5865 * xterm.c (x_update_window_end): Don't invalidate the entire
5866 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5867 highlight needs to be redisplayed. (Bug#17588)
5868
5869 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5870
5871 Port the GDB-visible symbols to AIX.
5872 Without them, GDB doesn't work to debug Emacs, since the AIX linker
5873 optimizes away the relevant external symbols. Use enums instead;
5874 this suffices for the AIX port, which is 32-bit-only anyway.
5875 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5876 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5877 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5878 New macros.
5879
5880 Include sources used to create macuvs.h.
5881 * Makefile.in ($(srcdir)/macuvs.h): New rule.
5882 * macuvs.h: Use automatically-generated header.
5883
5884 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
5885
5886 Port signal-handling to DragonFly BSD (Bug#17646).
5887 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
5888 Move implementations from callproc.c to sysdep.c.
5889 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
5890 Move declarations from process.h to syssignal.h.
5891
5892 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
5893
5894 * callint.c (Ffuncall_interactively): Add usage.
5895
5896 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
5897
5898 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
5899
5900 2014-05-30 Eli Zaretskii <eliz@gnu.org>
5901
5902 * w32heap.c (malloc_before_dump, malloc_after_dump)
5903 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5904 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
5905 set errno where appropriate to emulate CRT functions.
5906
5907 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
5908
5909 Debugging facility to check whether 'const char *' points to
5910 relocatable data of non-pure Lisp string.
5911 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
5912 (mark_maybe_pointer): ... adjusted user.
5913 (relocatable_string_data_p): New function.
5914 * lisp.h (relocatable_string_data_p): Add prototype.
5915 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
5916 the pointer to relocatable Lisp data is not used.
5917
5918 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
5919
5920 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
5921 * atimer.c (block_atimers):
5922 * callproc.c (block_child_signal): Block SIGINT too;
5923 otherwise, its handler might now unblock signals that it shouldn't.
5924 * keyboard.c (read_char): Clear signal mask, since we may
5925 be in a SIGINT handler, and many signals may be masked.
5926 * keyboard.c (handle_interrupt):
5927 * sysdep.c (handle_arith_signal):
5928 Clear signal mask instead of just unblocking the signal that
5929 was received, since several signals may be blocked at this point.
5930
5931 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5932
5933 * Makefile.in (TEMACS_POST_LINK): Remove target.
5934 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
5935 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
5936
5937 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5938
5939 * xmenu.c (xdialog_show): Remove prototype, rename to
5940 x_dialog_show, remove 2nd arg because it's always zero
5941 and simplify accordingly.
5942 (xw_popup_dialog): Adjust user.
5943 * w32menu.c (w32_dialog_show): Adjust prototype, remove
5944 2nd arg because it's always zero and simplify accordingly.
5945 (w32_popup_dialog): Adjust user.
5946
5947 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5948
5949 * w32heap.c (report_temacs_memory_usage): New function.
5950
5951 * unexw32.c (unexec) [ENABLE_CHECKING]:
5952 Call report_temacs_memory_usage.
5953
5954 * w32heap.h (report_temacs_memory_usage): Add prototype.
5955
5956 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5957
5958 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
5959 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
5960
5961 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5962
5963 * buffer.c (init_buffer): Accept an argument 'initialized'.
5964 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
5965 mmap_regions and mmap_fd, to avoid referencing stale data from the
5966 dump phase. Add an assertion for buffer text of buffers created
5967 in temacs before this function is called. (Bug#17622)
5968 (mmap_regions_1, mmap_fd_1): Remove unused variables.
5969
5970 * lisp.h (init_buffer): Update prototype.
5971
5972 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
5973
5974 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5975
5976 * alloc.c (Fgarbage_collect): Fix compilation with
5977 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
5978
5979 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5980
5981 * frame.c, frame.h (frame_char_to_pixel_position)
5982 (frame_set_mouse_position): Now static, and made private in
5983 frame.c rather than public in frame.h.
5984
5985 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
5986
5987 Refactor mouse positioning stuff to avoid code duplication.
5988 * frame.h (frame_char_to_pixel_position): New function.
5989 (x_set_mouse_position): Rename to...
5990 (frame_set_mouse_position): ...new function.
5991 (frame_set_mouse_pixel_position): Add prototype.
5992 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
5993 Rename to frame_set_mouse_pixel_position.
5994 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
5995 Adjust users.
5996 * xterm.h, w32term.h ( x_set_mouse_position)
5997 (x_set_mouse_pixel_position): Remove prototypes.
5998
5999 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
6000
6001 On X, always make pointer visible when deleting frame (Bug#17609).
6002 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
6003 Pass frame as arg.
6004 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
6005 Adjust prototypes.
6006 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
6007 * keyboard.c (gobble_input): If there is no terminal input error,
6008 make sure the pointer is visible for all frames on this terminal.
6009 * xterm.c (x_free_frame_resources): Enable pointer visibility if
6010 it was previously disabled.
6011
6012 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
6013
6014 * data.c (Fzerop): Move to Elisp.
6015 (syms_of_data): Don't defsubr it.
6016 * keyboard.c (echo_keystrokes_p): New function.
6017 (read_char, record_menu_key, read_key_sequence): Use it.
6018
6019 * callint.c (Qfuncall_interactively): New var.
6020 (Qcall_interactively): Remove.
6021 (Ffuncall_interactively): New function.
6022 (Fcall_interactively): Use it.
6023 (syms_of_callint): Defsubr it.
6024
6025 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
6026
6027 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
6028 relocated from under us.
6029
6030 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
6031
6032 Use mmap(2) emulation for allocating buffer text on MS-Windows.
6033 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
6034 configure, not from HEAPSIZE.
6035 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
6036
6037 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
6038 for MinGW, since it no longer uses gmalloc.
6039
6040 * buffer.c: Do not define mmap allocations functions for Windows.
6041 Remove mmap_find which is unused. Remove mmap_set_vars which does
6042 nothing useful.
6043 [WINDOWSNT]: Include w32heap.h.
6044 (init_buffer): Always allocate new memory for buffers.
6045
6046 * emacs.c: Remove mmap_set_vars calls.
6047
6048 * image.c (free_image): Undef free for Windows because it is
6049 redirected to our private version.
6050
6051 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
6052 (copy_executable_and_dump_data): Remove dumping the heap section.
6053 (unexec): Restore using_dynamic_heap after dumping.
6054
6055 * w32heap.c (dumped_data_commit, malloc_after_dump)
6056 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
6057 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
6058 (mmap_free): New functions.
6059
6060 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
6061
6062 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
6063
6064 * image.c (imagemagick_load_image): Use MagickRealType for local
6065 'color_scale', instead of double, to avoid a GCC warning about
6066 double promotion.
6067
6068 * xfns.c (Fx_window_property): Remove unused local.
6069
6070 Don't kill already-reaped process (Bug#17561).
6071 * process.c (process_send_signal): Fix race condition where a
6072 subprocess was reaped by a signal handler between the check for
6073 liveness and calling 'kill', which meant that Emacs could in
6074 theory kill an innocent bystander process. Do the fix by blocking
6075 SIGCHLD in a critical section that checks liveness before killing.
6076
6077 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6078
6079 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
6080
6081 2014-05-26 Ken Brown <kbrown@cornell.edu>
6082
6083 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
6084 even if !CYGWIN (see bug#17510).
6085
6086 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
6087
6088 * nsfns.m (Fns_do_applescript): Surround NSApp run
6089 with calls to ns_init_events, ns_finish_events (Bug#17424).
6090
6091 * nsterm.h (ns_init_events, ns_finish_events): Declare.
6092
6093 * nsterm.m (ns_init_events, ns_finish_events): New functions.
6094 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
6095
6096 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
6097 with calls to ns_init_events, ns_finish_events (Bug#17424).
6098
6099 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6100
6101 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
6102 if we are iterating over an object that generates glyphs for
6103 marginal areas. (Bug#17585)
6104
6105 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
6106
6107 * xdisp.c (safe__call1, safe__eval): Now static.
6108
6109 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6110
6111 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
6112 (safe_call, safe__call1): Construct a va_list argument for safe_call.
6113 (safe_call1): Call safe_call instead of safe__call directly.
6114
6115 2014-05-26 Ken Brown <kbrown@cornell.edu>
6116
6117 * w32term.c (x_delete_display) [CYGWIN]: Don't free
6118 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
6119 once. (Bug#17510)
6120
6121 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
6122
6123 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
6124 (safe__call, safe__call1, safe__eval): New functions.
6125 (safe_call): Use it.
6126 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
6127 (display_mode_element): Same for `:eval'.
6128
6129 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
6130
6131 Fix port to 32-bit AIX (Bug#17540).
6132 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
6133 twice. _text already includes this offset.
6134 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
6135
6136 2014-05-26 Eli Zaretskii <eliz@gnu.org>
6137
6138 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
6139 when closest_pos is identical to to_charpos, don't recurse, since
6140 we already tried that, and failed. (Bug#17539)
6141
6142 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
6143 unwinding when frame's faces were not initialized yet, increment
6144 the frame's image-cache reference count before calling
6145 x_free_frame_resources. Don't dereference
6146 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
6147
6148 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
6149
6150 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
6151 nsterm.m now.
6152
6153 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
6154 macfont.m, call draw with adjusted arguments so font drivers
6155 don't need to do that.
6156
6157 * macfont.m (macfont_draw): Merge changes from Macport.
6158
6159 2014-05-24 Eli Zaretskii <eliz@gnu.org>
6160
6161 * alloc.c (garbage_collect_1): New function, with all of the guts
6162 of Fgarbage_collect.
6163 (mark_stack): Accept an argument END and don't mark Lisp objects
6164 on the stack beyond the address given by END. Calculation of END
6165 was moved to Fgarbage_collect.
6166 (Fgarbage_collect): Calculate the end address of the stack portion
6167 that needs to be examined by mark_stack, and pass that address to
6168 garbage_collect_1, which will pass it to mark_stack.
6169 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
6170 for more details about the underlying problems. In particular,
6171 this avoids dumping Emacs with the large hash-table whose value is
6172 held in purify-flag for most of the time loadup.el runs.
6173
6174 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
6175
6176 * xfns.c (x_window_property_intern): New function (code from
6177 x_window_property).
6178 (Fx_window_property): Call x_window_property_intern. If property
6179 not found and NILP (source) and outer window != inner window,
6180 check outer window for property (Bug#17537).
6181
6182 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
6183
6184 Supply malloc and alloc_size attributes for extern allocators.
6185 This documents the C API, and helps GCC generate a bit better code.
6186 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
6187 (ATTRIBUTE_MALLOC_SIZE): New macros.
6188 * gmalloc.c (malloc, realloc, calloc):
6189 * gtkutil.h (malloc_widget_value):
6190 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
6191 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
6192 Use them.
6193
6194 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
6195
6196 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
6197 * image.c (imagemagick_load_image): Port to hosts that do not use
6198 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
6199
6200 2014-05-21 Leo Liu <sdl.web@gmail.com>
6201
6202 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
6203
6204 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
6205
6206 * dbusbind.c (xd_signature): Revert last 2 patches.
6207
6208 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
6209
6210 Allow any non-nil value to count as true in bool-vector.
6211 Likewise for xd_signature in dbusbind.c.
6212 This is more consistent with the usual practice in Emacs, which is
6213 that any non-nil value counts as true.
6214 * alloc.c (Fbool_vector): Don't require args to be t or nil.
6215 * dbusbind.c (xd_signature): Likewise, for booleans.
6216 * data.c, lisp.h (Qbooleanp):
6217 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
6218
6219 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
6220
6221 * lisp.h (CHECK_BOOLEAN): New function.
6222 * alloc.c (Fbool_vector): New function.
6223 (syms_of_alloc): Defsubr it.
6224 * data.c (Qbooleanp): New symbol.
6225 (syms_of_data): DEFSYM it.
6226 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
6227
6228 * font.c (font_matching_entity): Extract font-entity object
6229 from the vector of matching entities (Bug#17486).
6230
6231 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
6232
6233 Assume C99 or later (Bug#17487).
6234 * bytecode.c (B__dummy__): Remove.
6235 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
6236 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
6237 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
6238 * regex.c (DEBUG_PRINT): Assume varargs macros.
6239 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
6240
6241 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
6242
6243 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
6244 memory for every buffer that was dumped.
6245
6246 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
6247
6248 * fns.c (Freverse): Allow vectors, bool vectors and strings.
6249 (Fnreverse): Allow vectors and bool vectors.
6250
6251 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
6252
6253 Minor cleanup for terminal setup.
6254 * termhooks.h (create_terminal): Adjust prototype.
6255 * terminal.c (create_terminal): Pass output method and RIF as args.
6256 (init_initial_terminal):
6257 * nsterm.m (ns_create_terminal):
6258 * term.c (init_tty):
6259 * w32term.c (w32_create_terminal):
6260 * xterm.c (x_create_terminal): Adjust users.
6261 Avoid redundant NULL initializers and add comments.
6262
6263 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
6264
6265 * keyboard.c (Qdeactivate_mark): Now static.
6266
6267 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
6268
6269 If available, use Xfixes extension to do pointer blanking.
6270 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
6271 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
6272 (make_invisible_cursor): Move to...
6273 * xterm.c (make_invisible_cursor): ...here.
6274 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
6275 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
6276 (x_term_init): Call to x_setup_pointer_blanking.
6277 (XTtoggle_invisible_pointer): Use blanking specific to this display.
6278 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
6279
6280 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6281
6282 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
6283
6284 2014-05-12 Glenn Morris <rgm@gnu.org>
6285
6286 * fileio.c (Ffile_executable_p): Doc tweak.
6287
6288 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
6289
6290 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
6291 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
6292
6293 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
6294
6295 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
6296
6297 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6298
6299 Fix initialization of minibuffer history variable (Bug#17430).
6300 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
6301 Move the initialization up to prevent any "value void" message.
6302
6303 2014-05-08 Samuel Bronson <naesten@gmail.com>
6304
6305 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
6306 are matched (bug#17413).
6307
6308 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6309
6310 Stop tooltips pulling Emacs window to front (Bug#17408).
6311 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
6312 SetWindowPos invocations.
6313
6314 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
6315
6316 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
6317 not initialized (Bug#17398).
6318
6319 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
6320
6321 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
6322
6323 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
6324
6325 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
6326 [HAVE_NS]: Do not include png.h.
6327 (x_query_frame_background_color): New function.
6328 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
6329 (png_load_body): Coalesce duplicate code.
6330
6331 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
6332
6333 Consult libpng-config more consistently (Bug#17339).
6334 * Makefile.in (PNG_CFLAGS): New var.
6335 (ALL_CFLAGS): Use it.
6336 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
6337 CFLAGS now handles this.
6338
6339 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
6340
6341 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
6342 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
6343 because WCONTINUED is always defined now.
6344 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
6345
6346 2014-05-03 Eli Zaretskii <eliz@gnu.org>
6347
6348 * buffer.c (overlay_strings): Fix the wording of the commentary.
6349
6350 2014-05-01 Glenn Morris <rgm@gnu.org>
6351
6352 * floatfns.c (Fisnan):
6353 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
6354
6355 2014-05-01 Eli Zaretskii <eliz@gnu.org>
6356
6357 * term.c (tty_menu_activate): A better initialization for cursor
6358 coordinates.
6359
6360 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
6361
6362 * intervals.c: Tighten assertions.
6363 (create_root_interval): Make sure the interval is not empty.
6364 (intervals_equal): Use booleans.
6365 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
6366 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
6367 (balance_possible_root_interval): Simplify and use booleans.
6368 (split_interval_right, split_interval_left): Check LENGTH, and remove
6369 now redundant assertion.
6370 (adjust_intervals_for_insertion): Remove now redundant assertions.
6371 (delete_node, interval_deletion_adjustment)
6372 (adjust_intervals_for_deletion, merge_interval_right)
6373 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
6374 (reproduce_interval): Make sure the interval is not empty.
6375
6376 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * term.c (tty_menu_activate): Don't assume row and col are initialized.
6379 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
6380 satisfaction that they would always be initialized.
6381
6382 2014-04-30 Eli Zaretskii <eliz@gnu.org>
6383
6384 * term.c (tty_menu_display): Move the cursor to the active menu item.
6385 (tty_menu_activate): Return the cursor to the active menu item
6386 after displaying the menu and after displaying help-echo.
6387 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
6388 for the details of why this is needed by screen readers and
6389 Braille displays.
6390
6391 2014-04-30 Glenn Morris <rgm@gnu.org>
6392
6393 * process.c (handle_child_signal):
6394 Handle systems without WCONTINUED. (Bug#15110, 17339)
6395
6396 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
6397
6398 * window.c (struct saved_window): Remove mark.
6399 (Fset_window_configuration, save_window_save)
6400 (compare_window_configurations): Don't touch marks any more.
6401
6402 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
6403
6404 Use bits_word for gcmarkbits.
6405 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
6406 bits_word is typically a tad more efficient for mark bits than
6407 unsigned is, so use bits_word. All uses changed.
6408 * lisp.h (BITS_PER_INT): Remove; no longer used.
6409
6410 Avoid undefined behavior in signed left shift.
6411 This ports to GCC 4.9.0 with -fsanitize=undefined.
6412 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
6413 * data.c (Fash):
6414 * regex.c (extract_number):
6415 * lisp.h (make_number, XINT):
6416 Do not shift a 1 bit left into a sign bit.
6417 * alloc.c (struct cons_block, struct float_block): Use unsigned,
6418 not int, for gcmarkbits. All uses changed.
6419
6420 2014-04-25 Eli Zaretskii <eliz@gnu.org>
6421
6422 * search.c (Fnewline_cache_check): Don't try to count newlines
6423 outside the buffer's restriction, as find_newline doesn't support that.
6424
6425 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
6426
6427 * window.c (Fset_window_configuration): Deactivate the mark before
6428 unsetting the mark.
6429 (set_window_buffer): Ignore window_initialized.
6430 (window_initialized): Remove.
6431 * keyboard.c (Qdeactivate_mark): Not static any more.
6432 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
6433 Update all callers.
6434
6435 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
6436
6437 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
6438 and to clang 3.4, which have fixed the bug. This should let us
6439 run a bit faster on these platforms when address sanitization is
6440 in effect.
6441
6442 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
6443
6444 Port to GCC 4.9.0 with --enable-gcc-warnings.
6445 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
6446 All uses removed.
6447 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
6448 a way that also works with GCC 4.9.0.
6449
6450 * search.c (Fnewline_cache_check): Remove unused locals.
6451
6452 2014-04-22 Eli Zaretskii <eliz@gnu.org>
6453
6454 * search.c (find_newline1): New subroutine.
6455 (Fnewline_cache_check): New function.
6456 (syms_of_search): Defsubr it.
6457
6458 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
6459
6460 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
6461 * keyboard.c (unblock_input): Add comment.
6462 * xgselect.c (xg_select): Prevent Glib main loop recursion.
6463
6464 2014-04-22 Daniel Colascione <dancol@dancol.org>
6465
6466 * lread.c (readevalloop_eager_expand_eval): New function
6467 that can recurse into toplevel forms.
6468 (readevalloop): Call it.
6469 * lisp.h: Declare Qprogn.
6470 * callint.c (Qprogn): No longer static.
6471
6472 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
6473
6474 * intervals.c (rotate_right, rotate_left): Fix up length computation.
6475 Also change identifiers to match the comments, and add more assertions
6476 (bug#16234).
6477
6478 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
6479
6480 * emacs.c (close_output_streams): Don't clear and restore errno.
6481
6482 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
6483
6484 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
6485 never becomes visible, i.e. using XMonad (Bug#17237).
6486
6487 2014-04-18 Eli Zaretskii <eliz@gnu.org>
6488
6489 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
6490 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
6491 (Fline_pixel_height): Don't assume that the current buffer and the
6492 selected window's buffer are one and the same. (Bug#17281)
6493
6494 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
6495 paragraph-start cache before the newline cache. (Bug#17269)
6496
6497 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
6498
6499 * term.c (tty_send_additional_strings): No need to fflush here,
6500 as callers fflush.
6501 (tty_set_terminal_modes): fflush after sending additional strings,
6502 not before.
6503
6504 2014-04-17 Daniel Colascione <dancol@dancol.org>
6505
6506 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
6507 New symbols.
6508 (tty_send_additional_strings): New function.
6509 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
6510 (syms_of_term): Intern tty-mode-set-strings and
6511 tty-mode-reset-strings.
6512
6513 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6514
6515 * window.c (save_window_save): Lookup window_point_insertion_type in
6516 the right buffer (bug#15457).
6517 (Qwindow_point_insertion_type): New var.
6518 (syms_of_window): Initialize it.
6519
6520 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6521
6522 Fix the MSDOS build.
6523 * unexcoff.c [MSDOS]: Include libc/atexit.h.
6524 (copy_text_and_data): Zero out the atexit chain pointer before
6525 dumping Emacs.
6526
6527 * termhooks.h (encode_terminal_code): Update prototype.
6528
6529 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
6530 visible for all DOS_NT ports, not just WINDOWSNT.
6531 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
6532
6533 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
6534 unless it is defined.
6535 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
6536
6537 * process.c (close_on_exec, accept4, process_socket): Move into
6538 the "ifdef subprocesses" part.
6539 (catch_child_signal): Condition by "ifdef subprocesses".
6540 (syms_of_process) <Qinternal_default_process_sentinel>
6541 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
6542
6543 * msdos.h: Add prototypes for new functions.
6544 (EINPROGRESS): Define.
6545 (O_CLOEXEC): Define to zero.
6546
6547 * msdos.c (check_window_system): Remove unnecessary an
6548 incompatible duplicate function.
6549 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
6550 New functions in support of new functionality.
6551
6552 * menu.c (single_menu_item): Add visual indication of submenu
6553 also for menus on MSDOS frames.
6554 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
6555
6556 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
6557 when async subprocesses aren't supported.
6558
6559 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
6560
6561 * emacs.c (close_output_streams): Zero out errno before calling
6562 close_stream.
6563
6564 * dired.c [MSDOS]: Include msdos.h.
6565
6566 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
6567 (DATA_START) [MSDOS]: Define.
6568 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
6569
6570 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
6571 Ifdef away for MSDOS.
6572 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
6573 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
6574 for MSDOS.
6575 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
6576 Use temporary file template that is compatible with mkostemp.
6577 Move vfork-related portions under #ifndef MSDOS.
6578 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
6579
6580 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6581
6582 * buffer.c (Foverlays_at): Add argument `sorted'.
6583
6584 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6585
6586 * insdel.c (invalidate_buffer_caches): When deleting or replacing
6587 text, invalidate the bidi_paragraph_cache upto and including the
6588 preceding newline.
6589
6590 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6591
6592 Port to IRIX 6.5 (Bug#9684).
6593 * conf_post.h (INET6) [IRIX6_5]: Define.
6594 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
6595 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
6596
6597 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6598
6599 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
6600 before passing it to system APIs.
6601
6602 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6603
6604 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
6605 make sure stack.byte_string_start is not de-adjusted by pushhandler.
6606
6607 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6608
6609 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
6610
6611 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
6612
6613 Remove DATA_SEG_BITS.
6614 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
6615 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
6616 cc, but that platform is so old that SGI itself stopped supporting
6617 it in December 2013. If you still need Emacs on IRIX, please
6618 either compile with GCC and port the undumping code, or run
6619 './configure --with-wide-int'.
6620 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
6621 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
6622 DEFINE_GDB_SYMBOL_START way to define it.
6623 (NONPOINTER_BITS): New macro.
6624 (EMACS_INT): Use it.
6625 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
6626 the problem and/or configuring --with-wide-int.
6627 (USE_LSB_TAG): Simplify, based on above changes.
6628 (gdb_DATA_SEG_BITS): Remove. All uses removed.
6629 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
6630
6631 2014-04-12 Eli Zaretskii <eliz@gnu.org>
6632
6633 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
6634 covered by a display string that ends in a newline, and that cases
6635 going back by DVPOS lines to hit the search limit, lift the limit
6636 and go back until DVPOS is reached. (Bug#17244)
6637
6638 * indent.c (Fvertical_motion): Handle correctly the case when the
6639 display string is preceded by an empty line.
6640
6641 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
6642 use S_IWRITE instead.
6643
6644 2014-04-11 Glenn Morris <rgm@gnu.org>
6645
6646 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
6647
6648 2014-04-11 Ken Brown <kbrown@cornell.edu>
6649
6650 * Makefile.in (EMACS_MANIFEST): Revert last change.
6651
6652 2014-04-10 Daniel Colascione <dancol@dancol.org>
6653
6654 * puresize.h (BASE_PURESIZE): Increase.
6655
6656 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
6657
6658 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
6659
6660 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
6661 region handling (and don't call signal_before_change) if
6662 inhibit_modification_hooks is set.
6663 (signal_before_change): Don't check inhibit_modification_hooks any more.
6664
6665 2014-04-08 Daniel Colascione <dancol@dancol.org>
6666
6667 * alloc.c (sweep_symbols, mark_object): Assert that symbol
6668 function cells contain valid lisp objects. (Modified version of
6669 patch from Dmitry).
6670
6671 * alloc.c (detect_suspicious_free): Split actual stack capturing
6672 out into new function for easier breakpoint setting.
6673 (note_suspicious_free): New function.
6674
6675 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
6676
6677 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
6678
6679 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
6680 (symbol_block_pinned): New var.
6681 (Fmake_symbol): Initialize `pinned'.
6682 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
6683 pinned and signal an error for un-purifiable objects.
6684 (pure_cons): Use it.
6685 (Fpurecopy): Use it, except for objects that can't be purified.
6686 (mark_pinned_symbols): New function.
6687 (Fgarbage_collect): Use it.
6688 (gc_sweep): Remove hack made unnecessary.
6689
6690 2014-04-07 Glenn Morris <rgm@gnu.org>
6691
6692 * keyboard.c (Fopen_dribble_file): Doc tweak.
6693
6694 2014-04-07 Ken Brown <kbrown@cornell.edu>
6695
6696 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
6697
6698 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
6699
6700 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
6701 We have a substitute execinfo.h on hosts that lack it.
6702 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
6703 isn't optimized away.
6704
6705 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
6706
6707 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
6708 * alloc.c (memory_full):
6709 * charset.c (syms_of_charset):
6710 * doc.c (Fsnarf_documentation):
6711 * emacs.c (main):
6712 * font.c (BUILD_STYLE_TABLE):
6713 * keyboard.c (make_lispy_event):
6714 * profiler.c (setup_cpu_timer):
6715 * xgselect.c (xg_select):
6716 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
6717 Use ARRAYELTS.
6718 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
6719 Replace the only use with ARRAYELTS (font_property_table).
6720 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
6721
6722 2014-04-03 Daniel Colascione <dancol@dancol.org>
6723
6724 * xterm.c (x_term_init):
6725 * xfns.c (best_xim_style):
6726 * xfaces.c (Fdump_colors):
6727 * w32fns.c (w32_default_color_map):
6728 * w32.c (init_environment, N_ENV_VARS):
6729 * unexcw.c (read_exe_header):
6730 * term.c (term_get_fkeys_1):
6731 * sysdep.c (init_baud_rate):
6732 * nsterm.m (ns_convert_key):
6733 * nsfns.m (get_geometry_from_preferences):
6734 * msdos.c (dos_set_window_size, init_environment):
6735 * macfont.m (mac_font_get_glyph_for_cid)
6736 (macfont_store_descriptor_attributes)
6737 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
6738 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
6739 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
6740 (syms_of_keyboard):
6741 * image.c (xpm_str_to_color_key):
6742 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
6743 * frame.c (x_set_frame_parameters):
6744 * fileio.c (Ffile_selinux_context):
6745 * emacs.c (sort_args):
6746 * dosfns.c (msdos_stdcolor_name):
6747 * dired.c (file_attributes):
6748 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
6749 Change expressions of the form sizeof(arr) / sizeof(arr[0])
6750 to ARRAYELTS (arr).
6751
6752 2014-04-02 Daniel Colascione <dancol@dancol.org>
6753
6754 * data.c (Ffset): Abort if we're trying to set a function call to
6755 a dead lisp object.
6756
6757 * lisp.h (ARRAYELTS): New macro.
6758
6759 * alloc.c: Include execinfo.h if available.
6760 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
6761 (suspicious_free_record): New structure.
6762 (suspicious_objects, suspicious_object_index)
6763 (suspicious_free_history, suspicious_free_history_index):
6764 New variables.
6765 (find_suspicious_object_in_range, detect_suspicious_free)
6766 (Fsuspicious_object): New functions.
6767 (cleanup_vector): Call find_suspicious_object_in_range.
6768
6769 2014-04-02 Martin Rudalics <rudalics@gmx.at>
6770
6771 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
6772 width from font width (Bug#17163).
6773
6774 * frame.c (x_set_frame_parameters): Calculate default values of
6775 new frame sizes only after all other frame parameters have been
6776 processed (Bug#17142).
6777
6778 2014-04-02 Ken Brown <kbrown@cornell.edu>
6779
6780 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
6781 (Bug#17112)
6782
6783 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6784
6785 * xterm.c (x_draw_image_glyph_string): Adjust image background
6786 width accordingly when its x position is adjusted. (Bug#17115)
6787
6788 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
6789
6790 * font.c (font_list_entities): Do not add empty vector to font cache.
6791 (font_matching_entity): Likewise. If matching entity is found, insert
6792 1-item vector with this entity instead of entity itself (Bug#17125).
6793
6794 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
6795
6796 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
6797
6798 * fns.c (validate_subarray): Rename from validate_substring,
6799 since it works for vectors too. New arg ARRAY. Optimize for the
6800 non-nil case. Instead of returning bool, throw an error if out of
6801 range, so that the caller needn't do that. All uses changed.
6802 Report original values if out of range.
6803 (Fsubstring, Fsubstring_no_properties, secure_hash):
6804 Also optimize the case where FROM is 0 or TO is the size.
6805
6806 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
6807
6808 * search.c (Freplace_match): Use make_specified_string.
6809 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
6810 to catch bogus override face of glyph strings.
6811 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
6812 Move common substring range checking code to...
6813 (validate_substring): ...this function.
6814
6815 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
6816
6817 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
6818
6819 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
6820
6821 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
6822 bar is zero height, just return (Bug#16976).
6823 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
6824
6825 * nsterm.h (EmacsView): Add wait_for_tool_bar.
6826
6827 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
6828 is nil. If waiting for toolbar to complete, force a redraw.
6829
6830 2014-03-28 Glenn Morris <rgm@gnu.org>
6831
6832 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
6833 (emacs_bugreport): New variable.
6834 (usage_message): Use PACKAGE_BUGREPORT.
6835 (syms_of_emacs) <report-emacs-bug-address>: New variable.
6836
6837 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
6838
6839 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
6840
6841 Port recent signal-related changes to FreeBSD.
6842 Reported by Herbert J. Skuhra.
6843 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
6844 Move decls from here ...
6845 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
6846
6847 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6848
6849 * w32term.c (x_draw_image_glyph_string): Fix computation of height
6850 and width of image background when it is displayed with a 'box'
6851 face. (Bug#17115)
6852
6853 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
6854
6855 More backward-compatible fix to char-equal core dump (Bug#17011).
6856 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
6857 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
6858
6859 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
6860
6861 * image.c (init_svg_functions): When loading SVG-related libraries,
6862 free already loaded libraries if the initialization fails.
6863 (rsvg_handle_set_size_callback): Remove declaration, unused.
6864
6865 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
6866
6867 Fix core dump in char-equal (Bug#17011).
6868 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
6869 unibyte buffers, as we can't tell whether the characters are
6870 actually unibyte.
6871
6872 * insdel.c (adjust_markers_for_delete): Remove unused local.
6873
6874 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
6875
6876 Have (MARKER . ADJUSTMENT) undo records always be immediately
6877 after their corresponding (TEXT . POS) record in undo list.
6878 (Bug#16818)
6879 * lisp.h (record-delete): New arg record_markers.
6880 (record_marker_adjustment): No longer needed outside undo.c.
6881 * insdel.c (adjust_markers_for_delete): Move calculation of marker
6882 adjustments to undo.c's record_marker_adjustments. Note that
6883 fileio.c's decide_coding_unwind is another caller to
6884 adjust_markers_for_delete. Because it has undo list bound to t,
6885 it does not rely on adjust_markers_for_delete to record marker
6886 adjustments.
6887 (del_range_2): Swap call to record_delete and
6888 adjust_markers_for_delete so as undo marker adjustments are
6889 recorded before current deletion's adjustments, as before.
6890 (adjust_after_replace):
6891 (replace_range): Pass value for new record_markers arg to
6892 delete_record.
6893 * undo.c (record_marker_adjustment): Rename to
6894 record_marker_adjustments and made static.
6895 (record_delete): Check record_markers arg and call
6896 record_marker_adjustments.
6897 (record_change): Pass value for new record_markers arg to
6898 delete_record.
6899 (record_point): at_boundary calculation no longer needs to account
6900 for marker adjustments.
6901
6902 2014-03-26 Martin Rudalics <rudalics@gmx.at>
6903
6904 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
6905 (Bug#17077).
6906
6907 2014-03-26 Glenn Morris <rgm@gnu.org>
6908
6909 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
6910
6911 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
6912
6913 * buffer.c (struct sortvec): Add field `spriority'.
6914 (compare_overlays): Use it.
6915 (sort_overlays): Set it.
6916
6917 2014-03-26 Eli Zaretskii <eliz@gnu.org>
6918
6919 * xdisp.c (redisplay_window): If all previous attempts to find the
6920 cursor row failed, try a few alternatives before falling back to
6921 the top-most row of the window. Use row_containing_pos. (Bug#17047)
6922
6923 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
6924
6925 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
6926 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
6927
6928 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
6929 variables on Windows.
6930
6931 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
6932
6933 * w32.c (unsetenv): Remove unused var `retval'.
6934 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
6935
6936 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
6937 (start_watching): Remove unused var `thr'.
6938
6939 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
6940 (find_child_console): Remove unnecesary var `thread_id'.
6941
6942 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
6943 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
6944
6945 2014-03-26 Glenn Morris <rgm@gnu.org>
6946
6947 * filelock.c (Flock_buffer): Doc tweak.
6948
6949 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
6950 * emacs.c (shut_down_emacs):
6951 * fileio.c (Finsert_file_contents, write_region):
6952 * filelock.c (top-level, syms_of_filelock):
6953 * insdel.c (prepare_to_modify_buffer_1):
6954 CLASH_DETECTION is always defined now.
6955
6956 2014-03-25 Eli Zaretskii <eliz@gnu.org>
6957
6958 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
6959 DLL handle, to speed up thread startup.
6960
6961 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
6962
6963 Handle sigmask better with nested signal handlers (Bug#15561).
6964 * atimer.c (sigmask_atimers): Remove.
6965 Remaining use rewritten to use body of this function.
6966 * atimer.c (block_atimers, unblock_atimers):
6967 * callproc.c (block_child_signal, unblock_child_signal):
6968 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
6969 New arg OLDSET. All callers changed.
6970 * atimer.c (block_atimers, unblock_atimers):
6971 * callproc.c (block_child_signal, unblock_child_signal):
6972 * keyboard.c (handle_interrupt):
6973 * sound.c (vox_configure, vox_close):
6974 Restore the old signal mask rather than unilaterally clearing bits
6975 from the mask, in case a handler is running within another
6976 handler. All callers changed.
6977 * lisp.h, process.c, process.h, term.c:
6978 Adjust decls and callers to match new API.
6979 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
6980 signal handlers aren't supposed to use floating point anyway.
6981 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
6982
6983 2014-03-23 Daniel Colascione <dancol@dancol.org>
6984
6985 Split gc_sweep into discrete functions for legibility and better
6986 stack traces.
6987
6988 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
6989 (sweep_vectors): Fix typo in comment.
6990 (sweep_conses, sweep_floats, sweep_intervals)
6991 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
6992 (gc_sweep): Call new functions, to which existing functionality is
6993 moved.
6994 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
6995
6996 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
6997
6998 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
6999
7000 2014-03-23 Daniel Colascione <dancol@dancol.org>
7001
7002 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
7003 only if xic_style calls for it. This change allows Emacs to work
7004 with ibus. Also, don't leak resources if create_frame_xic fails,
7005 and stop caching xic_style across different displays.
7006 (supported_xim_styles): Make const.
7007 (best_xim_style): Remove first parameter: it's always just
7008 supported_xim_styles. Change to look at supported_xim_styles
7009 directly.
7010
7011 2014-03-23 Daniel Colascione <dancol@dancol.org>
7012
7013 * term.c (init_tty): Rearrange condition for clarity; print
7014 appropriate diagnostic.
7015
7016 2014-03-23 Daniel Colascione <dancol@dancol.org>
7017
7018 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
7019 array. (ASAN caught.)
7020
7021 2014-03-22 Glenn Morris <rgm@gnu.org>
7022
7023 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
7024
7025 2014-03-22 Daniel Colascione <dancol@dancol.org>
7026
7027 * process.c (conv_sockaddr_to_lisp): When extracting the string
7028 names of AF_LOCAL sockets, stop before reading uninitialized memory.
7029
7030 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7031
7032 Fix regression introduced by patch for Bug#10500.
7033 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
7034 * w32term.c (x_draw_image_relief): Likewise.
7035
7036 2014-03-21 Martin Rudalics <rudalics@gmx.at>
7037
7038 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
7039 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
7040 maximize a frame for odd default fonts.
7041
7042 2014-03-21 Glenn Morris <rgm@gnu.org>
7043
7044 * minibuf.c (history-length): Increase default from 30 to 100.
7045
7046 2014-03-21 Daniel Colascione <dancol@dancol.org>
7047
7048 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
7049 every time we switch to minibuffer.
7050
7051 * alloc.c (lisp_align_malloc, allocate_string_data)
7052 (allocate_vectorlike): Allow mmap allocation of lisp objects.
7053 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
7054
7055 2014-03-21 Eli Zaretskii <eliz@gnu.org>
7056
7057 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
7058 support more "verbs".
7059
7060 2014-03-21 Daniel Colascione <dancol@dancol.org>
7061
7062 Always prohibit dumping a dumped Emacs.
7063
7064 * emacs.c (might_dump): New variable.
7065 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
7066 * lisp.h (might_dump): Declare.
7067 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
7068
7069 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
7070
7071 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
7072
7073 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
7074
7075 * doc.c (store_function_docstring): Warn when we don't know where to
7076 put a docstring.
7077 (Fsubstitute_command_keys): Don't advertise the fact that
7078 text-properties are dropped, since we think it's a bug that we'll fix.
7079
7080 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
7081 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
7082 * frame.c (frame_garbaged): Make "docstring" more precise.
7083
7084 2014-03-20 Glenn Morris <rgm@gnu.org>
7085
7086 * charset.c (init_charset): When we cannot find the charsets directory,
7087 mention if EMACSDATA is set.
7088
7089 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
7090
7091 * fns.c (Frandom): Fix rare bug where the result isn't random.
7092
7093 Fix porting inconsistency about rounding to even.
7094 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
7095 This way, the unusual !HAVE_RINT case acts like the usual
7096 HAVE_RINT case, and we can fix the documentation accordingly.
7097
7098 2014-03-19 Eli Zaretskii <eliz@gnu.org>
7099
7100 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
7101 (w32_wnd_proc): Initialize the dwHoverTime member of
7102 TRACKMOUSEEVENT structure.
7103
7104 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
7105
7106 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
7107
7108 2014-03-16 Eli Zaretskii <eliz@gnu.org>
7109
7110 * search.c (find_newline): Speed up the function when using the
7111 newline cache, by halving the number of calls to
7112 region_cache_forward and region_cache_backward. (Bug#16830)
7113
7114 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
7115
7116 * buffer.c (Fset_buffer): Document return value (bug#17015).
7117
7118 2014-03-14 Martin Rudalics <rudalics@gmx.at>
7119
7120 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
7121 nil, always resize character wise to avoid potential loss of the
7122 mode line (Bug#16923 related).
7123
7124 2014-03-12 Martin Rudalics <rudalics@gmx.at>
7125
7126 * frame.c (x_set_frame_parameters): Always calculate new sizes
7127 pixelwise to avoid potential loss when rounding.
7128
7129 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
7130
7131 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
7132 * xterm.c (x_free_frame_resources): Free all allocated cursors.
7133
7134 2014-03-10 Eli Zaretskii <eliz@gnu.org>
7135
7136 * w32.c (fstatat): Don't add an extra slash if the argument ends
7137 with a slash: this fails the subsequent call to stat_worker on
7138 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
7139
7140 2014-03-09 Martin Rudalics <rudalics@gmx.at>
7141
7142 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
7143
7144 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
7145
7146 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
7147
7148 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
7149 when frame is only on one screen (Bug#14713).
7150
7151 2014-03-08 Eli Zaretskii <eliz@gnu.org>
7152
7153 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
7154 there's a valid wrap point in the display line, the last glyph
7155 cannot "just barely fit" on this row, because display_line doesn't
7156 let it. Instead, proceed as if the last glyph didn't fit, so that
7157 we eventually back up the iterator to the wrap point. This avoids
7158 delusional behavior of move_it_to, whereby it proceeds to the next
7159 display line, but sets current_x to zero for all the glyphs that
7160 without word-wrap would fit on the previous display line.
7161 One result was that visual-order cursor movement behaved erratically
7162 under word-wrap.
7163 (Fmove_point_visually): Add code to find the x coordinate of the
7164 last character before wrap point, under word-wrap on a TTY.
7165
7166 2014-03-07 Eli Zaretskii <eliz@gnu.org>
7167
7168 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
7169 also return value of MOVE_POS_MATCH_OR_ZV from
7170 move_it_in_display_line_to, when moving from beginning of line to
7171 point's position. (Bug#16961)
7172
7173 2014-03-07 Martin Rudalics <rudalics@gmx.at>
7174
7175 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
7176 * window.c (Fselect_window): Explain NORECORD and
7177 `buffer-list-update-hook' in doc-string.
7178
7179 2014-03-06 Martin Rudalics <rudalics@gmx.at>
7180
7181 * window.c (Fother_window_for_scrolling): Check that
7182 Vother_window_scroll_buffer is a buffer.
7183
7184 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
7185
7186 * xterm.c (xim_initialize): Always pass a copy of resource name
7187 to XRegisterIMInstantiateCallback and eassert whether return
7188 value is True. Passing copy is important because Xlib doesn't
7189 make its own copy and resource name argument usually points to
7190 SSDATA (Vx_resource_name), which may be changed from Lisp.
7191 (xim_close_display): For XUnregisterIMInstantiateCallback,
7192 always eassert return value and pass exactly the same values
7193 as were used for XRegisterIMInstantiateCallback.
7194 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
7195 sources to check why if you are interested.
7196
7197 2014-03-05 Martin Rudalics <rudalics@gmx.at>
7198
7199 * dispnew.c (change_frame_size_1): Add new_lines instead of
7200 new_height, the latter may be still zero if passed as such.
7201 * window.c (Fwindow_pixel_height): Mention bottom divider in
7202 doc-string.
7203
7204 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
7205
7206 Fix "resource temporarily unavailable" with xgselect
7207 (Bug#16925).
7208 * xgselect.c: Include <stdbool.h>.
7209 (xg_select) [!USE_GTK]: Don't lose track of errno.
7210
7211 Fix minor --enable-gcc-warnings issues.
7212 * widget.c (update_various_frame_slots, EmacsFrameResize):
7213 Avoid unused locals. Prefer 'if' to '#if' when either will do.
7214
7215 2014-03-04 Ken Brown <kbrown@cornell.edu>
7216
7217 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
7218 represent the actual adjustment needed for alignment.
7219
7220 2014-03-04 Eli Zaretskii <eliz@gnu.org>
7221
7222 * gmalloc.c (aligned_alloc): Don't allocate more memory than
7223 needed, and don't reallocate if the initial allocation already
7224 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
7225
7226 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7227
7228 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
7229 (Bug#16932)
7230
7231 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
7232
7233 * cmds.c (delete-char): Update docstring pointing out that the
7234 function ignores `delete-active-region' and `overwrite-mode'.
7235
7236 2014-03-03 Eli Zaretskii <eliz@gnu.org>
7237
7238 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
7239
7240 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
7241 allocated buffer due to alignment.
7242 (freehook): If the block to be freed was allocated by
7243 'aligned_alloc', find its real pointer before calling 'free'.
7244 (Bug#16901)
7245 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
7246 backtrace.
7247
7248 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
7249
7250 * font.c (toplevel): Adjust comment about font cache layout.
7251 (font_clear_cache): Fix to match real font cache layout.
7252 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
7253 (Fframe_font_cache) [FONT_DEBUG]: New function.
7254 (syms_of_font) [FONT_DEBUG]: Defsubr it.
7255
7256 Avoid crashes when X fonts are erroneously freed on reused X
7257 'Display *' connection data (Bug#16069). Note that X font
7258 resources still may be leaked, but currently there is no way
7259 to completely avoid it.
7260 * xterm.h (struct x_display_info): New member x_id. Add comments.
7261 * xterm.c (x_display_id): New variable.
7262 (x_term_init): Assign identifier to each opened X connection.
7263 * xfont.c (struct xfont): New member x_display_id.
7264 (xfont_open): Initialize it with frame's display id.
7265 (xfont_close): Check whether font's display id matches the one
7266 recorded for the given display. Adjust comment.
7267 * xftfont.c (struct xftfont_info):
7268 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
7269
7270 2014-03-01 Martin Rudalics <rudalics@gmx.at>
7271
7272 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
7273 * window.c (Fother_window_for_scrolling): Don't try to scroll a
7274 killed Vother_window_scroll_buffer.
7275 (Vother_window_scroll_buffer): Fix doc-string accordingly.
7276
7277 2014-03-01 Eli Zaretskii <eliz@gnu.org>
7278
7279 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
7280 that start with more than 2 slashes as UNCs. (Bug#16751)
7281
7282 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
7283
7284 Fix a few crashes and leaks when cloning C strings.
7285 * alloc.c, lisp.h (dupstring): New function.
7286 * gtkutil.c (xg_get_font):
7287 * term.c (tty_default_color_capabilities):
7288 * xsettings.c (store_monospaced_changed)
7289 (store_font_name_changed, parse_settings)
7290 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
7291 This avoids some unlikely crashes due to accessing freed storage,
7292 and avoids some minor memory leaks in the more-typical case.
7293
7294 2014-02-28 Martin Rudalics <rudalics@gmx.at>
7295
7296 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
7297 cursor when modeline can't be dragged (Bug#16647).
7298
7299 2014-02-28 Glenn Morris <rgm@gnu.org>
7300
7301 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
7302 from custom-delayed-init-variables. (Bug#11565)
7303
7304 2014-02-27 Martin Rudalics <rudalics@gmx.at>
7305
7306 More fixes for mouse glyph calculations (Bug#16647).
7307 * window.c (coordinates_in_window): In intersection of
7308 horizontal and vertical window dividers prefer the horizontal
7309 one. Add some extra parens to last fix.
7310 (window_relative_x_coord): Return x-coordinate for header and
7311 mode line too.
7312 * xdisp.c (remember_mouse_glyph): In text area don't extend
7313 glyph into mode line to show the vertical drag cursor there
7314 immediately. Subdivide mouse glyphs in right fringes to show a
7315 horizontal drag cursor as soon as we enter the "grabbable width"
7316 portion. Handle vertical border case separately. Do not
7317 subdivide window divider areas.
7318 (note_mouse_highlight): On bottom divider of bottommost windows
7319 show vertical drag cursor only when the minibuffer window can be
7320 resized.
7321
7322 2014-02-27 Eli Zaretskii <eliz@gnu.org>
7323
7324 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
7325 reset by the face of the object just displayed. See also bug#76.
7326 (get_next_display_element): If the string came from a display
7327 property, examine the box face attribute at it->position, not at
7328 it->current.pos, since the latter was not updated yet. (Bug#16870)
7329 (handle_face_prop): Improve commentary.
7330
7331 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
7332
7333 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
7334 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
7335
7336 2014-02-26 Martin Rudalics <rudalics@gmx.at>
7337
7338 Fixes around Bug#16647.
7339 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
7340 ON_BOTTOM_DIVIDER cases.
7341 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
7342 only if the window has no right divider.
7343 (Fcoordinates_in_window_p): Fix doc-string.
7344
7345 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
7346
7347 * lread.c (Funintern): Fix doc to match advertised calling convention.
7348
7349 2014-02-24 Daniel Colascione <dancol@dancol.org>
7350
7351 * keyboard.c (read_char): Close race that resulted in lost events.
7352
7353 2014-02-22 Glenn Morris <rgm@gnu.org>
7354
7355 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
7356 * window.c (window-resize-pixelwise): Doc fixes.
7357
7358 * process.c (Finternal_default_process_filter)
7359 (Finternal_default_process_sentinel): Doc tweaks.
7360
7361 2014-02-21 Glenn Morris <rgm@gnu.org>
7362
7363 * process.c (Fprocess_buffer, Faccept_process_output)
7364 (Finternal_default_process_filter, Finternal_default_process_sentinel):
7365 Doc fixes.
7366
7367 2014-02-21 Martin Rudalics <rudalics@gmx.at>
7368
7369 * window.c (Fwindow_scroll_bar_width): New function.
7370
7371 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
7372
7373 Pacify GCC when configuring with --enable-gcc-warnings.
7374 * xdisp.c (move_it_in_display_line_to) [lint]:
7375 Initialize recently-added local.
7376
7377 2014-02-21 Daniel Colascione <dancol@dancol.org>
7378
7379 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
7380
7381 2014-02-20 Eli Zaretskii <eliz@gnu.org>
7382
7383 * xdisp.c (init_iterator): Don't dereference a bogus face
7384 pointer. (Bug#16819)
7385 (try_cursor_movement): Don't use cursor position if
7386 set_cursor_from_row failed to compute it. This avoids assertion
7387 violations in MATRIX_ROW.
7388 (move_it_in_display_line_to): Save the iterator state in ppos_it
7389 only once per call. Reimplement the method used to return to the
7390 best candidate position if all the positions found in display line
7391 are beyond TO_CHARPOS. This cuts down the number of calls to
7392 bidi_shelve_cache, which moves a lot of stuff when lines are long
7393 and include bidirectional text. (Bug#15555)
7394
7395 2014-02-20 Glenn Morris <rgm@gnu.org>
7396
7397 * data.c (Fdefalias): Doc fix.
7398
7399 2014-02-19 Eli Zaretskii <eliz@gnu.org>
7400
7401 * xdisp.c (display_line): Fix horizontal scrolling of large images
7402 when fringes are turned off. This comes at a price of not
7403 displaying the truncation/continuation glyphs in this case.
7404 (Bug#16806)
7405
7406 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
7407 CreateDIBSection returns an error indication, zero out *ximg after
7408 destroying the image. This avoids crashes in memory allocations
7409 due to the fact that some of the callers also call
7410 x_destroy_x_image, which will attempt to free an already free'd
7411 block of memory.
7412
7413 2014-02-18 Martin Rudalics <rudalics@gmx.at>
7414
7415 * widget.c (update_various_frame_slots): Don't set
7416 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
7417
7418 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
7419
7420 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
7421
7422 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
7423
7424 temacs --daemon fix (Bug#16599).
7425 * emacs.c (main): Initialize daemon_pipe[1] here ...
7426 (syms_of_emacs): ... instead of here.
7427
7428 2014-02-16 Anders Lindgern <andlind@gmail.com>
7429
7430 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
7431 is set (Bug#16505).
7432
7433 2014-02-16 Daniel Colascione <dancol@dancol.org>
7434
7435 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
7436 (xd_get_connection_address): Use it.
7437 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
7438 xd_get_connection_address because the latter signals if the bus
7439 we're trying to close is already disconnected.
7440
7441 2014-02-13 Eli Zaretskii <eliz@gnu.org>
7442
7443 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
7444 argument to CreateThread. This avoids segfaults on Windows 9X.
7445 Reported by oslsachem <oslsachem@gmail.com>.
7446
7447 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
7448
7449 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
7450 * unexhp9k800.c (unexec_error): New function, to simplify the code.
7451 (check_lseek): New function, to report lseek errors.
7452 (save_data_space, update_file_ptrs, read_header, write_header)
7453 (copy_file, copy_rest, unexec): Use these news functions.
7454 (update_file_ptrs): Don't assume wraparound behavior when
7455 converting a large size_t value to off_t.
7456
7457 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
7458
7459 * composite.c (fill_gstring_header): Pass positions as C integers
7460 and move parameters checking to...
7461 (Fcomposition_get_gstring): ...this function. Handle case when
7462 buffer positions are in reversed order and avoid crash (Bug#16739).
7463 Adjust docstring.
7464 * buffer.c (validate_region): Mention current buffer in error message.
7465
7466 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
7467
7468 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
7469
7470 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
7471
7472 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
7473
7474 2014-02-11 Glenn Morris <rgm@gnu.org>
7475
7476 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
7477 Replace refs to "OpenStep" in messages.
7478
7479 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
7480
7481 Avoid "." at end of error diagnostics.
7482 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
7483 * font.c (Ffont_at):
7484 * nsfns.m (ns_display_info_for_name):
7485 * nsselect.m (Fx_own_selection_internal):
7486 * nsterm.m (performDragOperation:):
7487 Remove "." from end of diagnostic.
7488
7489 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
7490
7491 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
7492 unintuitive (bug#15824).
7493 (Fyes_or_no_p): Doc fix (bug#15456).
7494
7495 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
7496
7497 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
7498 and avoid warning.
7499 * eval.c (call_debugger): When exiting the debugger, do not allow
7500 max_specpdl_size less than actual binding depth (Bug#16603).
7501 (syms_of_eval): Adjust docstring.
7502
7503 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
7504
7505 * cmds.c (Fself_insert_command): Output a clearer error message on
7506 negative repetitions (bug#9476).
7507
7508 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
7509
7510 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7511
7512 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
7513
7514 * minibuf.c (Fread_string): Doc clarification (bug#15422).
7515
7516 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
7517
7518 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
7519
7520 * keyboard.c (Frecursive_edit): Fix typo in docstring.
7521
7522 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7523
7524 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
7525
7526 * keyboard.c (Frecursive_edit): Say more precicely how throwing
7527 `exit' works (bug#15865).
7528
7529 2014-02-07 Martin Rudalics <rudalics@gmx.at>
7530
7531 Constrain window box/body sizes and margin widths (Bug#16649).
7532 * xdisp.c (window_box_width): Don't return less than zero.
7533 (window_box_left_offset, window_box_right_offset): Don't return
7534 more than the window's pixel width.
7535 * window.c (window_body_height, window_body_width): Don't return
7536 negative value.
7537 (window_resize_apply): Adjust margin width, if necessary.
7538
7539 2014-02-07 Glenn Morris <rgm@gnu.org>
7540
7541 * nsterm.m (syms_of_nsterm): Doc fix.
7542
7543 2014-02-06 Eli Zaretskii <eliz@gnu.org>
7544
7545 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
7546 New variables: pointers through which to call the respective APIs.
7547 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
7548 (filename_from_ansi, sys_link, check_windows_init_file):
7549 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
7550 This is required on Windows 9X, where we dynamically load
7551 UNICOWS.DLL which has their non-stub implementations.
7552 (maybe_load_unicows_dll): Assign addresses to these 2 function
7553 pointers after loading UNICOWS.DLL.
7554
7555 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
7556 MultiByteToWideChar and WideCharToMultiByte through function
7557 pointers.
7558
7559 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
7560 New declarations.
7561
7562 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
7563
7564 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
7565 for OSX >= 10.9 if separate spaces are used.
7566 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
7567
7568 2014-02-06 Glenn Morris <rgm@gnu.org>
7569
7570 * buffer.c (cache-long-scans): Doc fix.
7571
7572 2014-02-05 Eli Zaretskii <eliz@gnu.org>
7573
7574 * w32fns.c (Fw32_shell_execute): Doc fix.
7575
7576 2014-02-05 Bastien Guerry <bzg@gnu.org>
7577
7578 * syntax.c (Fforward_word): Call Fconstrain_to_field with
7579 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
7580
7581 2014-02-05 Martin Rudalics <rudalics@gmx.at>
7582
7583 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
7584 outside the window (Bug#16649).
7585
7586 * xdisp.c (note_mouse_highlight): When entering a margin area show
7587 a non-text cursor (Bug#16647).
7588
7589 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
7590
7591 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
7592 It prompted a compile-time diagnostic on GNU/Linux.
7593 Simplify to remove the need for the label.
7594
7595 2014-02-04 Eli Zaretskii <eliz@gnu.org>
7596
7597 * w32menu.c (w32_popup_dialog): Don't condition the whole function
7598 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
7599 to show it; otherwise return 'unsupported--w32-dialog' to signal
7600 to the caller that emulation with menus is necessary.
7601 This resurrects code inadvertently deleted by the 2013-10-08 commit.
7602 (Bug#16636)
7603 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
7604
7605 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
7606 by HAVE_DIALOGS.
7607
7608 * menu.c (Fx_popup_dialog): Don't condition the call to
7609 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
7610 special symbol 'unsupported--w32-dialog', emulate the dialog with
7611 a menu by calling x-popup-menu.
7612
7613 * menu.h (Qunsupported__w32_dialog): New extern variable.
7614
7615 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
7616
7617 * keyboard.c (kbd_buffer_get_event): Read file notification events
7618 also in batch mode.
7619
7620 * xgselect.c (xg_select): Read glib events in any case, even if
7621 there are no file descriptors to watch for. (Bug#16519)
7622
7623 2014-02-03 Martin Rudalics <rudalics@gmx.at>
7624
7625 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
7626 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
7627 * w32term.c (w32_draw_window_divider): Handle first and last
7628 pixels specially.
7629 * w32term.h (w32_fill_area_abs): New function.
7630 * xdisp.c (x_draw_right_divider): Don't draw over bottom
7631 divider.
7632 * xfaces.c (realize_basic_faces): Handle new face ids.
7633 * xfns.c (Fx_create_frame): Call x_default_parameter for right
7634 and bottom divider width.
7635 * xterm.c (x_draw_window_divider): Handle first and last pixels
7636 specially.
7637
7638 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
7639
7640 * print.c (Fexternal_debugging_output): Add cast to pacify
7641 --enable-gcc-warnings.
7642 * eval.c (call_debugger): Grow specpdl if the debugger was
7643 entered due to specpdl overflow (Bug#16603) and allow more
7644 specpdl space for the debugger itself.
7645
7646 2014-02-02 Martin Rudalics <rudalics@gmx.at>
7647
7648 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
7649 (Bug#16619)
7650
7651 2014-02-01 Eli Zaretskii <eliz@gnu.org>
7652
7653 * w32fns.c (Ffile_system_info): Use WINAPI in the function
7654 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
7655
7656 * print.c (Fexternal_debugging_output): If the argument character
7657 is non-ASCII, encode it with the current locale's encoding before
7658 writing the result to the terminal. (Bug#16448)
7659
7660 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
7661 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
7662 for it. (Bug#16558)
7663
7664 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
7665
7666 * process.c (create_process): Reset SIGPROF handler in the child.
7667 * callproc.c (call_process): Likewise.
7668
7669 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
7670
7671 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
7672
7673 2014-01-29 Eli Zaretskii <eliz@gnu.org>
7674
7675 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
7676 of zero to print strings, GDB doesn't like it.
7677
7678 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
7679 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
7680 we still use correct addresses. (Bug#16576)
7681
7682 2014-01-27 K. Handa <handa@gnu.org>
7683
7684 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
7685 to preserve the code detection behavior of 24.3.
7686 * coding.h (struct coding_system): New member detected_utf8_bytes.
7687 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
7688 (decode_coding_gap): Use short cut for UTF-8 file reading only
7689 when coding->detected_utf8_bytes equals to coding->src_bytes.
7690 * fileio.c (Finsert_file_contents): Cancel the previous change.
7691
7692 2014-01-29 Martin Rudalics <rudalics@gmx.at>
7693
7694 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
7695 that are not visible.
7696
7697 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
7698
7699 * xmenu.c (create_and_show_popup_menu): Handle case when no key
7700 is grabbed (Bug#16565).
7701
7702 2014-01-28 Martin Rudalics <rudalics@gmx.at>
7703
7704 * xdisp.c (last_max_ascent): Re-remove after erroneously
7705 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
7706 from 2013-03-29.
7707 (move_it_to): Re-remove reference to last_max_ascent.
7708 (Fwindow_text_pixel_size): Add iterator's max_ascent and
7709 max_descent here instead of calling line_bottom_y.
7710 Fix doc-string.
7711
7712 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
7713
7714 * terminal.c (initial_free_frame_resources): New function.
7715 (init_initial_terminal): Install new hook to free face cache
7716 on initial frame and avoid memory leak. For details, see
7717 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
7718 * xfaces.c (free_frame_faces): Adjust comment.
7719
7720 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7721
7722 * data.c (Fstring_to_number): Document results if unparsable
7723 (Bug#16551).
7724
7725 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
7726
7727 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
7728
7729 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7730
7731 When decoding, prefer ptrdiff_t to int for buffer positions etc.
7732 * coding.c (detect_coding_utf_8, emacs_mule_char)
7733 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
7734 (check_utf_8, decode_coding):
7735 * coding.h (struct coding_system.errors):
7736 Use ptrdiff_t, not int, for integer values derived from buffer and
7737 string positions.
7738
7739 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
7740 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
7741 before invoking decode_coding_gap, since there's just one block.
7742
7743 2014-01-25 Martin Rudalics <rudalics@gmx.at>
7744
7745 Fix handling of face attributes in Fx_create_frame (Bug#16529).
7746 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
7747 too early. Again run change_frame_size before assigning menu-
7748 and tool-bar-lines.
7749
7750 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
7751
7752 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
7753 arrives, call x_check_fullscreen, in case the new display has a
7754 different resolution. (Bug#16517)
7755
7756 2014-01-25 Eli Zaretskii <eliz@gnu.org>
7757
7758 * term.c (read_menu_input): If the selected frame changes, exit
7759 the menu.
7760 (tty_menu_show): If the selected frame changes while we displayed
7761 a menu, throw to top level. (Bug#16479)
7762
7763 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
7764
7765 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
7766
7767 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
7768
7769 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
7770 * data.c (count_one_bits_word): Fix bug (negated comparison)
7771 when BITS_PER_ULL < BITS_PER_BITS_WORD.
7772
7773 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
7774
7775 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
7776 Avoid undefined behavior by initializing display property bit of a
7777 string processed by the bidirectional iterator. For details, see
7778 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
7779
7780 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
7781
7782 Minor cleanup of previous change.
7783 * image.c (imagemagick_error, Fimagemagick_types):
7784 Omit some recently-introduced and unnecessary casts and assignments.
7785
7786 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
7787
7788 Fix two memory leaks discovered with Valgrind.
7789 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
7790 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
7791
7792 2014-01-22 Martin Rudalics <rudalics@gmx.at>
7793
7794 Fixes in window size functions around Bug#16430 and Bug#16470.
7795 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
7796 (Fwindow_mode_line_height, Fwindow_header_line_height)
7797 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7798 Minor doc-string adjustments.
7799 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
7800 Rewrite doc-strings.
7801 (window_body_height, window_body_width): Do not count partially
7802 visible lines/columns when PIXELWISE is nil (Bug#16470).
7803 (Qfloor, Qceiling): New symbols.
7804
7805 2014-01-21 Eli Zaretskii <eliz@gnu.org>
7806
7807 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
7808 when the image cache is not yet allocated. (Bug#16509)
7809
7810 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
7811
7812 * buffer.c (Fkill_buffer): When killing an indirect buffer,
7813 re-attach intervals to its base buffer (Bug#16502).
7814 * intervals.c (set_interval_object): Move from here...
7815 * intervals.h (set_interval_object): ... to here. Fix comments.
7816
7817 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
7818
7819 Avoid undefined behavior by initializing buffer redisplay bit.
7820 Reported by Dmitry Antipov in
7821 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
7822 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
7823
7824 Revert some of the CANNOT_DUMP fix (Bug#16494).
7825 * lread.c (init_lread): Fix typo: NILP, not !NILP.
7826
7827 2014-01-19 Eli Zaretskii <eliz@gnu.org>
7828
7829 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
7830 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
7831 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
7832 they are replaced by macros that expand into direct calls to the
7833 corresponding functions from GDI32.DLL.
7834 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
7835 variables in the Cygwin build, they are unused.
7836
7837 2014-01-19 K. Handa <handa@gnu.org>
7838
7839 * composite.c (composition_update_it): Fix previous change.
7840
7841 2014-01-18 Eli Zaretskii <eliz@gnu.org>
7842
7843 Fix file name handling on MS-Windows 9X.
7844 * w32.c (maybe_load_unicows_dll): New function.
7845
7846 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
7847 on, to make sure we can convert file names to and from UTF-8 on
7848 Windows 9X. This fixes a failure to start up because Emacs cannot
7849 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
7850
7851 * w32font.c [WINDOWSNT]: Include w32.h.
7852 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
7853 of implementing the same stuff.
7854 Remove now unused g_b_init_is_windows_9x.
7855
7856 * w32.h (maybe_load_unicows_dll): Add prototype.
7857
7858 2014-01-17 Eli Zaretskii <eliz@gnu.org>
7859
7860 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
7861 switch to single keyboard. Prevents daemon crashes when a new
7862 client connects while we show a TTY menu in an existing client.
7863 (Bug#16479)
7864
7865 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
7866
7867 Fix MinGW64 porting problem with _setjmp.
7868 Reported by Eli Zaretskii in:
7869 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
7870 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
7871 the old _setjmp and _longjmp. All uses changed.
7872
7873 2014-01-13 Daniel Colascione <dancol@dancol.org>
7874
7875 * textprop.c (Fremove_list_of_text_properties):
7876 Correctly handle reaching the end of the interval tree. (Bug#15344)
7877
7878 2014-01-13 Martin Rudalics <rudalics@gmx.at>
7879
7880 * xdisp.c (resize_mini_window): Round height to a multiple of
7881 frame's line height. Fix bug in calculation of window start
7882 position (Bug#16424).
7883
7884 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
7885
7886 * macfont.m: Include termchar.h.
7887 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
7888 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
7889 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
7890 *_WITH_GC_* to take face and f as parameters.
7891 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
7892 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
7893
7894 2014-01-13 Daniel Colascione <dancol@dancol.org>
7895
7896 Fix menu item updating in the presence of the Unity global menu
7897 GTK+ module.
7898
7899 * gtkutil.h (xg_have_tear_offs): Add frame parameter
7900 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
7901 tear-off.
7902 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7903 updating menus; explain why.
7904 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
7905 problem it's supposed to solve and it interferes with detecting
7906 the presence of a global menu.
7907 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
7908 parameter.
7909
7910 2014-01-11 K. Handa <handa@gnu.org>
7911
7912 * composite.c (composition_update_it): Fix indexing of
7913 LGSTRING_CHAR (Bug#15984).
7914
7915 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
7916
7917 * unexw32.c (_start) [__MINGW64__]: Define to __start.
7918
7919 2014-01-11 Eli Zaretskii <eliz@gnu.org>
7920
7921 * xdisp.c (try_window_id): Don't use this function's optimizations
7922 if overlays in the buffer displayed by the window have changed
7923 since last redisplay. (Bug#16347)
7924 (message_dolog): Fix indentation.
7925
7926 2014-01-11 Martin Rudalics <rudalics@gmx.at>
7927
7928 * frame.c (frame_resize_pixelwise): Fix doc-string.
7929
7930 2014-01-10 Martin Rudalics <rudalics@gmx.at>
7931
7932 Fix handling of internal borders (Bug#16348).
7933 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
7934 Remove internal border width from pixel width of windows.
7935 (change_frame_size_1): Don't return early when frame's pixel
7936 size changes - we still have to record the new sizes in the
7937 frame structure.
7938 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
7939 also when toolbar gets larger.
7940 * window.c (check_frame_size): Include internal_border_width in
7941 check.
7942 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
7943 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
7944 In non-toolkit/non-GTK version clear internal border.
7945 * xterm.c (x_clear_under_internal_border): New function for
7946 non-toolkit/non-GTK version.
7947 (x_after_update_window_line): In non-toolkit/non-GTK version
7948 don't do that.
7949 (handle_one_xevent, x_set_window_size):
7950 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7951 * xterm.h (x_clear_under_internal_border): Extern it.
7952
7953 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
7954
7955 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
7956 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
7957 it again.
7958
7959 2014-01-06 Eli Zaretskii <eliz@gnu.org>
7960
7961 * xdisp.c (redisplay_window): Don't skip window redisplay if the
7962 last value of point is not equal to buffer's point. (Bug#16129)
7963
7964 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
7965
7966 Spelling fixes.
7967 * nsterm.h (updateCollectionBehavior): Rename from
7968 updateCollectionBehaviour. All uses changed.
7969
7970 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
7971 * Makefile.in (SETFATTR): New macro.
7972 (temacs$(EXEEXT)): Use it.
7973
7974 2014-01-04 Martin Rudalics <rudalics@gmx.at>
7975
7976 Fix maximization behavior on Windows (Bug#16300).
7977 * w32fns.c (w32_fullscreen_rect): Don't handle
7978 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
7979 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
7980 of SetWindowPos. Restore last placement also when leaving
7981 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
7982 but the FULLSCREEN_BOTH case.
7983
7984 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
7985
7986 Port to C89.
7987 * data.c (arithcompare_driver):
7988 * fileio.c (Fcar_less_than_car):
7989 * fns.c (internal_equal):
7990 * frame.c (delete_frame):
7991 * lisp.h (enum More_Lisp_Bits):
7992 * lread.c (read1):
7993 Avoid C99 constructs that don't work in C89.
7994 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
7995 to port to C89, which doesn't have 'long long'.
7996 (count_trailing_zero_bits): Use them.
7997
7998 2014-01-03 Chong Yidong <cyd@gnu.org>
7999
8000 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
8001
8002 2014-01-02 Martin Rudalics <rudalics@gmx.at>
8003
8004 Further adjust frame/window scrollbar width calculations.
8005 * window.c (apply_window_adjustment):
8006 Set windows_or_buffers_changed.
8007 (Fwindow_scroll_bars): Return actual scrollbar width.
8008 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
8009 For non-toolkit builds again use 14 as minimum width and set
8010 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
8011 * xterm.c (XTset_vertical_scroll_bar): Take width from
8012 WINDOW_SCROLL_BAR_AREA_WIDTH.
8013 (x_new_font): Rename wid to unit. Base calculation of new
8014 scrollbar width on toolkit used and make it analogous to that of
8015 x_set_scroll_bar_default_width.
8016 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
8017 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
8018 of GetSystemMetrics.
8019 * w32term.c (w32_set_vertical_scroll_bar): Take width from
8020 WINDOW_SCROLL_BAR_AREA_WIDTH.
8021 (x_new_font): Make it correspond to changes in xterm.c.
8022
8023 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
8024
8025 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
8026 This is a cleaner way to fix the MinGW-w64 porting problem.
8027 Check for INTPTR_MAX misconfiguration.
8028
8029 2014-01-01 Eli Zaretskii <eliz@gnu.org>
8030
8031 * search.c (newline_cache_on_off, find_newline): In indirect
8032 buffers, use the newline cache of the base buffer.
8033
8034 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
8035 buffer, invalidate the caches of its base buffer. (Bug#16265)
8036
8037 * indent.c (width_run_cache_on_off, compute_motion): In indirect
8038 buffers, use the width-run cache of the base buffer.
8039
8040 * xdisp.c (redisplay_window): When the window displays an indirect
8041 buffer, and the character widths in the display table have
8042 changed, invalidate the width-run cache of the corresponding base
8043 buffer.
8044
8045 * fileio.c (Finsert_file_contents): When invalidating the newline
8046 cache, consider the case of inserting into indirect buffer.
8047
8048 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
8049 In indirect buffers, use the paragraph cache of the base buffer.
8050
8051 2013-12-31 Martin Rudalics <rudalics@gmx.at>
8052
8053 * window.c (grow_mini_window): Fix last change.
8054
8055 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
8056
8057 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
8058
8059 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
8060
8061 * w32term.c (w32_initialize): Use LCID and LOWORD.
8062
8063 * w32proc.c (create_child): Use pid_t for 5th argument.
8064 (IsValidLocale): Don't provide prototype for MinGW64.
8065 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
8066 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
8067
8068 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
8069 MinGW64 doesn't support.
8070
8071 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
8072
8073 * w32.c (set_named_security_info): New function.
8074 (acl_set_file): Fall back on set_named_security_info if
8075 set_file_security fails.
8076 (g_b_init_set_named_security_info_w)
8077 (g_b_init_set_named_security_info_a): New static variables.
8078 (globals_of_w32): Initialize them to zero.
8079 (set_named_security_info): Set them to non-zero if the
8080 corresponding API is available.
8081 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
8082 New function typedefs.
8083
8084 2013-12-31 Martin Rudalics <rudalics@gmx.at>
8085
8086 Some more fixes following pixelwise resize changes including one
8087 for Bug#16306.
8088 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
8089 of frame_resize_pixelwise.
8090 * widget.c (pixel_to_text_size): New function.
8091 (update_wm_hints): Have size hints respect value of
8092 frame_resize_pixelwise.
8093 (EmacsFrameResize): Alway process resize requests pixelwise.
8094 * window.c (grow_mini_window): Make sure mini window is at least
8095 one line tall.
8096 * xdisp.c (display_menu_bar): Make sure menubar extends till
8097 right end of frame.
8098 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
8099 (x_set_tool_bar_lines): Calculate pixelwise.
8100 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
8101 frame_resize_pixelwise.
8102
8103 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
8104
8105 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
8106 variables not used there.
8107
8108 2013-12-30 Eli Zaretskii <eliz@gnu.org>
8109
8110 * w32.c (sys_umask): New function. (Bug#16299)
8111
8112 2013-12-30 Martin Rudalics <rudalics@gmx.at>
8113
8114 * dispnew.c (change_frame_size_1): Take old width of root window
8115 from that window's pixel width. (Bug#16284)
8116
8117 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
8118
8119 Plain copy-file no longer chmods an existing destination (Bug#16133).
8120 * fileio.c (realmask): Now a static var, not a local.
8121 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
8122 Remove arg STATPTR. All uses changed.
8123 (Fcopy_file): Do not alter permissions of existing destinations,
8124 unless PRESERVE-PERMISSIONS (renamed from
8125 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
8126 Avoid race when testing for existing destinations and for
8127 when input and output files are the same.
8128 If changing the group fails, adjust both default and
8129 preserved permissions so that access is not granted to the
8130 wrong group.
8131 (Fset_default_file_modes, init_fileio): Update realmask.
8132 (Fdefault_file_modes): Use realmask instead of calling umask.
8133
8134 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
8135
8136 Fix pipe bug with OS X emacs --daemon (Bug#16262).
8137 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
8138 flags on the daemon pipe ends before execing.
8139
8140 2013-12-28 Eli Zaretskii <eliz@gnu.org>
8141
8142 * w32fns.c (Fx_create_frame): Error out if called from a TTY
8143 session. (Bug#14739)
8144
8145 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
8146
8147 * callproc.c (Vexec_path): Document that exec-directory is in it.
8148
8149 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
8150
8151 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
8152 default.
8153
8154 2013-12-27 Chong Yidong <cyd@gnu.org>
8155
8156 * data.c (Fsymbol_function): Doc fix.
8157
8158 2013-12-26 Martin Rudalics <rudalics@gmx.at>
8159
8160 Some more tinkering with Bug#16051.
8161 * window.c (resize_frame_windows): Don't let the size of the
8162 root window drop below the frame's default character size.
8163 Never ever delete any subwindows - let the window manager do the
8164 clipping.
8165
8166 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
8167 of toolbar lines needed when they exceed the height of the root
8168 window.
8169 (unwind_create_frame_1): New function.
8170 (Fx_create_frame): Generally inhibit calling the window
8171 configuration change hook here. Remove extra call to
8172 change_frame_size - it's not needed when we don't run the
8173 configuration change hook.
8174
8175 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
8176
8177 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
8178 On my Fedora 19 platform the core dumps were so big that
8179 my desktop became nearly catatonic.
8180 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
8181 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
8182 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
8183 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
8184 a clang-only syntax.
8185 * conf_post.h (__has_feature): New macro, if not already defined.
8186 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
8187 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
8188
8189 2013-12-25 Eli Zaretskii <eliz@gnu.org>
8190
8191 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
8192 is a file name. (Bug#16252)
8193
8194 2013-12-25 Chong Yidong <cyd@gnu.org>
8195
8196 * keyboard.c (Voverriding_terminal_local_map)
8197 (Voverriding_local_map): Doc fix.
8198
8199 * keymap.c (Vemulation_mode_map_alists): Doc fix.
8200
8201 2013-12-24 Eli Zaretskii <eliz@gnu.org>
8202
8203 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
8204 file name when it is submitted to ShellExecute. Simplify code.
8205 Don't test DOCUMENT for being a string, as that is enforced by
8206 CHECK_STRING. Doc fix.
8207
8208 2013-12-23 Eli Zaretskii <eliz@gnu.org>
8209
8210 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
8211 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
8212 redisplay_tool_bar does. Improve and fix commentary.
8213 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
8214 limits of the glyph matrices. (Bug#16051)
8215 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
8216 only when the new size is different from the old one, and the new
8217 size can be achieved given the frame height.
8218
8219 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
8220
8221 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
8222
8223 2013-12-23 Glenn Morris <rgm@gnu.org>
8224
8225 * lread.c (Fload): Mention load-prefer-newer in doc.
8226
8227 2013-12-22 Martin Rudalics <rudalics@gmx.at>
8228
8229 Handle Bug#16207 by being more restrictive when running hooks.
8230 * window.c (unwind_change_frame): New function.
8231 (Fset_window_configuration): Don't run configuration change hook
8232 while the frame configuration is unsafe. Call select_window
8233 twice.
8234
8235 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
8236
8237 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
8238
8239 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
8240
8241 * nsterm.h: Declare EmacsColor category.
8242
8243 * nsterm.m (NSColor): Implement EmacsColor category.
8244 (ns_get_color): Use colorUsingDefaultColorSpace.
8245 (ns_get_color, ns_term_init): Use colorForEmacsRed.
8246
8247 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
8248
8249 2013-12-21 Eli Zaretskii <eliz@gnu.org>
8250
8251 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
8252 having the PNG_NORETURN attribute, to avoid compiler warning in
8253 my_png_error.
8254
8255 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8256
8257 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
8258
8259 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
8260 fringe background extension.
8261 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
8262 because they are now always the same as `left' and `width',
8263 respectively. Remove code for the case that `width' and
8264 `sb_width' are different.
8265
8266 2013-12-20 Martin Rudalics <rudalics@gmx.at>
8267
8268 Remove scroll_bar_actual_width from frames.
8269 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
8270 * frame.c (Fscroll_bar_width): Return scroll bar area width.
8271 (x_figure_window_size):
8272 * nsterm.m (x_set_window_size):
8273 * widget.c (set_frame_size):
8274 * w32term.c (x_set_window_size):
8275 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
8276 scroll_bar_actual_width.
8277
8278 Convert scroll_bar members to integers on Windows.
8279 * w32term.h (struct scroll_bar): Convert top, left, width,
8280 height, start, end and dragging to integers.
8281 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
8282 scroll_bar members.
8283 * w32term.c (w32_set_scroll_bar_thumb)
8284 (w32_scroll_bar_handle_click): Remove XINT conversions for
8285 scroll_bar members. Treat bar->dragging as integer.
8286 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
8287 first element. Remove XINT conversions for scroll_bar members.
8288 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
8289 Remove XINT conversions for scroll_bar members.
8290
8291 Fix assignment for new window total sizes.
8292 * window.c (Fwindow_resize_apply_total): Assign values for
8293 minibuffer window.
8294
8295 2013-12-20 Chong Yidong <cyd@gnu.org>
8296
8297 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
8298 argument to `append'.
8299
8300 2013-12-19 Eli Zaretskii <eliz@gnu.org>
8301
8302 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
8303 current text face, for extending the face of the display margins.
8304 (Bug#16192)
8305
8306 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8307 Doc fix. (Bug#16190)
8308
8309 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
8310
8311 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
8312 Remove.
8313
8314 * nsterm.m (Qfile, Qurl): New.
8315 (EV_MODIFIERS2): New macro.
8316 (EV_MODIFIERS): Use EV_MODIFIERS2.
8317 (ns_term_init): Remove font and color from DND, does not work on
8318 newer OSX, and other ports don't have them.
8319 (performDragOperation:): Handle modifiers used during drag.
8320 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
8321 Remove global Lisp variables used to communicate with ns-win.el.
8322 Remove font and color handling.
8323 (syms_of_nsterm): Defsym Qfile and Qurl.
8324
8325 2013-12-19 Anders Lindgren <andlind@gmail.com>
8326
8327 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
8328 (ns_constrain_all_frames, x_set_offset): Remove assignment to
8329 dont_constrain.
8330 (updateFrameSize:, windowWillResize:toSize:): Add trace.
8331 (constrainFrameRect): Remove special case nr_screens == 1.
8332 Don't constrain size to size of view.
8333
8334 * nsterm.h (ns_output): Remove dont_constrain.
8335
8336 2013-12-19 Anders Lindgren <andlind@gmail.com>
8337
8338 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
8339
8340 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
8341
8342 Minor fixes for recent openp changes.
8343 * lisp.h (GCPRO7): New macro.
8344 * lread.c (openp): Use bool for boolean; all callers changed.
8345 Protect save_string from GC. Don't assume that file descriptors
8346 are nonzero. Redo save_mtime comparison to avoid bogus GCC
8347 warning about uninitialized variable.
8348
8349 2013-12-18 Eli Zaretskii <eliz@gnu.org>
8350
8351 * w32fns.c (emacs_abort): Use intptr_t as argument of
8352 INT_BUFSIZE_BOUND, to avoid compiler warnings.
8353
8354 2013-12-18 Glenn Morris <rgm@gnu.org>
8355
8356 * lread.c (Fload): Pass load_prefer_newer to openp.
8357 Don't bother checking mtime if openp already did it.
8358 (openp): Add `newer' argument, to check all suffixes
8359 and find the newest file.
8360 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
8361 * callproc.c (call_process):
8362 * charset.c (load_charset_map_from_file):
8363 * emacs.c (init_cmdargs):
8364 * image.c (x_create_bitmap_from_file, x_find_image_file):
8365 * lisp.h (openp):
8366 * lread.c (Flocate_file_internal):
8367 * process.c (Fformat_network_address):
8368 * sound.c (Fplay_sound_internal):
8369 * w32.c (check_windows_init_file):
8370 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
8371
8372 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
8373
8374 2013-12-17 Eli Zaretskii <eliz@gnu.org>
8375
8376 * w32.c (getloadavg): Don't index samples[] array with negative
8377 indices. Recover from wall-clock time being set backwards.
8378
8379 * w32term.c (w32_initialize): Declare the argument of
8380 set_user_model as const.
8381
8382 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
8383 (w32_menu_show): Constify some arguments passed to MessageBox.
8384
8385 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
8386 to initialize Lisp objects.
8387
8388 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
8389 initialize Lisp objects.
8390
8391 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
8392 use variables used only on X under that condition.
8393
8394 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
8395 variables not used there.
8396
8397 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8398
8399 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
8400 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
8401
8402 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8403
8404 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
8405 code, revealed in presence of R2L characters, character
8406 compositions, and display vectors. A better fix for Bug#16148.
8407 (extend_face_to_end_of_line): Don't reference tool_bar_window in
8408 GTK and NS builds, they don't have this member of struct frame.
8409
8410 * dispextern.h (struct composition_it): Correct a comment for the
8411 'width' member.
8412
8413 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8414
8415 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
8416 This prevents a compilation error on C compilers that do not
8417 default functions to return 'int' if not declared. Also, add
8418 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
8419 since it now uses inline functions.
8420
8421 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8422
8423 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
8424 display margins on mode line, header line, and in the frame's
8425 tool-bar window. (Bug#16165)
8426
8427 2013-12-16 Andreas Schwab <schwab@suse.de>
8428
8429 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
8430
8431 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
8432
8433 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
8434 `CHECK_LIST_CONS'.
8435
8436 2013-12-16 Martin Rudalics <rudalics@gmx.at>
8437
8438 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
8439
8440 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
8441
8442 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
8443 intended to find bogus pointers in font objects (Bug#16140).
8444 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
8445 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
8446 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
8447 Disable for MS-Windows due to Bug#15876; apparently this
8448 requires more or less substantial changes in fontset code.
8449 * xfont.c (xfont_close):
8450 * xftfont.c (xftfont_close): Call x_display_info_for_display
8451 to check whether 'Display *' is valid (Bug#16093 and probably
8452 Bug#16069).
8453
8454 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8455
8456 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
8457 Reported by Juanma Barranquero <lekktu@gmail.com>.
8458
8459 * process.c (Fprocess_send_eof): Don't crash if someone tries to
8460 open a pty on MS-Windows. (Bug#16152)
8461
8462 * emacs.c (decode_env_path): Fix bogus comparison against
8463 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
8464
8465 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
8466
8467 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
8468 (Fx_file_dialog): Add parentheses around && to silence warning.
8469
8470 * w32term.c (construct_drag_n_drop): Remove unused local variable.
8471
8472 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8473
8474 * xdisp.c (extend_face_to_end_of_line): Extend background of
8475 non-default face in margin areas as well. (Bug#16151)
8476 (display_line): Call extend_face_to_end_of_line for continued
8477 lines as well, if the display margins have non-zero width.
8478 (set_glyph_string_background_width): When needed, set the
8479 extends_to_end_of_line_p flag on glyph strings to be drawn in
8480 margin areas, not only in the text area.
8481
8482 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
8483 startup.
8484
8485 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
8486
8487 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
8488 Don't worry about verify_error being t, since it has to be a list.
8489
8490 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
8491
8492 Use bool for boolean, focusing on headers.
8493 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
8494 No need to include <stdbool.h>, since conf_post.h does it now.
8495 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
8496 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
8497 (SET_PER_BUFFER_VALUE_P):
8498 * ccl.c, ccl.h (setup_ccl_program):
8499 * ccl.h (CHECK_CCL_PROGRAM):
8500 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
8501 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
8502 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
8503 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
8504 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
8505 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
8506 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
8507 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
8508 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
8509 (CHARSET_FAST_MAP_SET):
8510 * coding.c (decode_coding_ccl, encode_coding_ccl):
8511 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
8512 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
8513 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
8514 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
8515 (decode_coding_c_string):
8516 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
8517 * conf_post.h (has_attribute):
8518 * dispextern.h (trace_redisplay_p)
8519 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
8520 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
8521 (SET_GLYPH_FROM_CHAR_GLYPH)
8522 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
8523 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
8524 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
8525 (cursor_in_mouse_face_p):
8526 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
8527 (blank_row, prepare_desired_row)
8528 (build_frame_matrix_from_leaf_window, make_current)
8529 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
8530 (update_window, scrolling_window, update_frame_line):
8531 * disptab.h (GLYPH_FOLLOW_ALIASES):
8532 * editfns.c (Fformat):
8533 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
8534 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
8535 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
8536 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
8537 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
8538 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
8539 (FONT_DEFERRED_LOG):
8540 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
8541 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
8542 (FRAME_MOUSE_UPDATE):
8543 * fringe.c (Fdefine_fringe_bitmap):
8544 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
8545 (x_create_bitmap_from_xpm_data, xpm_load_image):
8546 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
8547 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
8548 (MERGE_INTERVAL_CACHE):
8549 * keymap.h (KEYMAPP):
8550 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
8551 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
8552 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
8553 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
8554 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
8555 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
8556 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
8557 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
8558 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
8559 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
8560 (SETUP_BUFFER_SYNTAX_TABLE):
8561 * systime.h (timespec_valid_p):
8562 * term.c (save_and_enable_current_matrix):
8563 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
8564 * xdisp.c (in_display_vector_p, display_tool_bar_line)
8565 (redisplay_internal, try_window_reusing_current_matrix)
8566 (sync_frame_with_window_matrix_rows, try_window_id)
8567 (display_menu_bar, display_tty_menu_item, display_mode_line)
8568 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
8569 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
8570 * xmenu.c (xmenu_show):
8571 * xterm.c (use_xim, x_term_init):
8572 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
8573 (struct x_bitmap_record):
8574 Use bool for booleans.
8575 * ccl.c (struct buffer_text):
8576 * ccl.h (struct ccl_program):
8577 * charset.h (struct charset):
8578 * cm.h (struct cm):
8579 * coding.h (struct iso_2022_spec, struct coding_system):
8580 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
8581 (struct glyph_string, struct face, struct face_cache)
8582 (struct bidi_string_data, struct bidi_it)
8583 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
8584 (struct image):
8585 * editfns.c (Fformat):
8586 * frame.h (struct frame):
8587 * fringe.c (struct fringe_bitmap):
8588 * intervals.h (struct interval):
8589 * keyboard.h (struct kboard):
8590 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
8591 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
8592 (struct Lisp_Buffer_Local_Value, union specbinding):
8593 * macfont.m (struct macfont_info):
8594 * process.h (struct Lisp_Process):
8595 * termchar.h (struct tty_display_info):
8596 * window.h (struct window):
8597 * xterm.h (struct x_output):
8598 Use bool_bf for boolean bit-fields.
8599 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
8600 All callers changed.
8601 * ccl.h (struct ccl_program): Remove unused members private_state,
8602 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
8603 eight_bit_control.
8604 (struct ccl_spec): Remove unused members cr_carryover,
8605 eight_bit_carryover.
8606 * conf_post.h: Include <stdbool.h>.
8607 (bool_bf): New type.
8608 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
8609 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
8610 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
8611 'do { ... } while (false)' brackets.
8612 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
8613 Args must now be expressions; all callers changed.
8614 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
8615 (PRODUCE_GLYPHS): Simplify use of boolean.
8616 * fileio.c (Fcopy_file):
8617 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
8618 * lisp.h (UNGCPRO): Return void, not int.
8619 (FOR_EACH_TAIL): Use void expression, not int expression.
8620 * region-cache.c: Reindent.
8621 * region-cache.h: Copy comments from region-cache.c, to fix
8622 incorrect remarks about booleans.
8623
8624 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8625
8626 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
8627 when character at point is displayed from a display vector.
8628 (Bug#16148)
8629
8630 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
8631
8632 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
8633 now a list of certificate validation checks that will abort a
8634 connection with an error.
8635 (Fgnutls_boot): Document it and use it.
8636
8637 2013-12-14 Martin Rudalics <rudalics@gmx.at>
8638
8639 * w32term.c (w32_enable_frame_resize_hack): New variable.
8640 (x_set_window_size): Use it to hack frame resizing on Windows
8641 (Bug#16028).
8642
8643 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8644
8645 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
8646 Windows-specific code to w32.c. Change error message text to
8647 match that of Posix platforms.
8648
8649 * w32.c (w32_copy_file): New function, most of the code copied and
8650 reworked from Fcopy_file. Improve error handling. Plug memory
8651 leak when errors are thrown. Support file names outside of the
8652 current codepage. (Bug#7100)
8653
8654 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8655
8656 * lread.c (load_path_default): Prototype.
8657
8658 2013-12-13 Glenn Morris <rgm@gnu.org>
8659
8660 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
8661 (dump_path): Remove.
8662 (load-path-default): Remove `changed' argument.
8663 Do not set dump_path permanently. Simplify.
8664 (init_lread): Simplify.
8665 (syms_of_lread): Remove dump_path.
8666
8667 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8668
8669 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
8670 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
8671 2013-12-12 font-related change to avoid Bug#16128, which
8672 is quite hard to fix without even more substantial changes.
8673
8674 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8675
8676 * font.c (font_close_object): Check for live frame (Bug#16128).
8677
8678 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8679
8680 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
8681 Return ptrdiff_t, not int, since it's a buffer size.
8682 Reindent/reparen some macros to a more Gnuish style.
8683
8684 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
8685
8686 Avoid undefined behavior with huge regexp interval counts.
8687 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
8688 since it's now specialized to interval counts. All uses changed.
8689 Do not assume wraparound on signed integer overflow.
8690 (regex_compile): Simplify based on the above changes.
8691
8692 2013-12-12 Eli Zaretskii <eliz@gnu.org>
8693
8694 Support file names on MS-Windows that use characters outside of
8695 the current system codepage. (Bug#7100)
8696
8697 * w32.c (get_file_security, set_file_security)
8698 (create_symbolic_link): Separate pointers and boolean flags for
8699 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
8700 non-zero, else the former.
8701 (codepage_for_filenames, filename_to_utf16, )
8702 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
8703 New functions.
8704 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
8705 characters.
8706 (normalize_filename): Lose the DBCS code, now works on UTF-8.
8707 Accept only one argument; all callers changed.
8708 (dostounix_filename): Remove the second argument, now works in
8709 UTF-8. All callers changed.
8710 (parse_root): Lose DBCS code.
8711 (get_long_basename, w32_get_short_filename, init_environment)
8712 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
8713 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
8714 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
8715 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
8716 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
8717 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
8718 otherwise.
8719 (ansi_encode_filename): New function.
8720 (get_emacs_configuration, get_emacs_configuration_options):
8721 Functions deleted.
8722 (add_volume_info, GetCachedVolumeInformation): Run the input file
8723 name through unixtodos_filename, to ensure it is stored and
8724 referenced in canonical form.
8725 (get_volume_info): Lose the DBCS code, now works in UTF-8.
8726 (logon_network_drive, sys_link, utime): Improve error handling.
8727 (sys_access): New function.
8728 (hashval, generate_inode_val): Unused functions deleted.
8729 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
8730 (check_windows_init_file): Convert error message from UTF-8 to
8731 ANSI codepage, for display in the message box.
8732 (globals_of_w32): Set w32_unicode_filenames according to the OS
8733 version.
8734
8735 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
8736 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8737 (syms_of_w32term): Declare w32-unicode-filenames.
8738
8739 * w32proc.c (new_child, delete_child): Remove code that handled
8740 unused pending_deletion and input_file members of the child struct.
8741 (create_child, sys_spawnve): Convert all file names to ANSI
8742 codepage. Use ANSI APIs explicitly; forcibly fail if any file
8743 name cannot be encoded in ANSI codepage. Don't use
8744 unixtodos_filename, mirror slashes by hand.
8745 (record_infile, record_pending_deletion): Functions deleted.
8746 (Fw32_short_file_name): Call w32_get_short_filename instead of
8747 GetShortPathName.
8748
8749 * w32notify.c (add_watch): Work in Unicode mode when
8750 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8751 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
8752 instead, do the same with Lisp primitives.
8753
8754 * w32fns.c (file_dialog_callback, Fx_file_dialog)
8755 (Fsystem_move_file_to_trash, Fw32_shell_execute)
8756 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
8757 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
8758 (Fw32_shell_execute): Improve error reporting.
8759 (Fdefault_printer_name): Ifdef away for Cygwin.
8760
8761 * w32.h (struct _child_process): Remove input_file and
8762 pending_deletion members that are no longer used.
8763 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
8764 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
8765 (ansi_encode_filename): New and updated prototypes.
8766
8767 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
8768 APIs explicitly.
8769 (unexec): Don't use dostounix_filename, it expects a file name in
8770 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
8771 ANSI encoding.
8772
8773 * fileio.c (Ffile_name_directory, file_name_as_directory)
8774 (directory_file_name, Fexpand_file_name)
8775 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
8776 arguments of dostounix_filename.
8777 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
8778 use MAX_UTF8_PATH for size of file-name strings.
8779 (emacs_readlinkat): Build an explicitly unibyte string for file
8780 names.
8781 (syms_of_fileio) <file-name-coding-system>:
8782 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
8783
8784 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
8785 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
8786 directories to UTF-8.
8787 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
8788 environment, and each element of the input PATH, to UTF-8.
8789
8790 * dired.c (file_attributes): Use build_unibyte_string explicitly
8791 to make Lisp strings from user and group names.
8792
8793 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
8794 decode_file.
8795
8796 * coding.c (decode_file_name, encode_file_name): New functions.
8797
8798 * termcap.c (tgetent): Adapt to the change in arguments of
8799 dostounix_filename.
8800
8801 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
8802 names.
8803
8804 * msdos.c (dostounix_filename, init_environment): Adapt to the
8805 change in arguments of dostounix_filename.
8806
8807 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
8808 [WINDOWSNT]: Encode file names passed to the image libraries in
8809 ANSI codepage.
8810
8811 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
8812 [WINDOWSNT]: Convert file names to the current ANSI codepage.
8813
8814 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
8815 arguments of dostounix_filename.
8816
8817 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8818
8819 * font.h (struct font_entity) [HAVE_NS]: New field to record
8820 font driver which was used to create this entity.
8821 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
8822 frame where the font was opened.
8823 (font_close_object): Add prototype.
8824 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
8825 (font_close_object): Not static any more. Lost frame arg.
8826 Adjust comment and users.
8827 * alloc.c (cleanup_vector): Call font_close_object to adjust
8828 per-frame font counters correctly. If HAVE_NS, also call
8829 driver-specific cleanup for font-entity objects.
8830 * ftfont.c (ftfont_open):
8831 * nsfont.m (nsfont_open):
8832 * w32font.c (w32font_open_internal):
8833 * xfont.c (xfont_open):
8834 * xftfont.c (xftfont_open): Save frame pointer in font object.
8835 * macfont.m (macfont_open): Likewise.
8836 (macfont_descriptor_entity): Save driver pointer to be able
8837 to call its free_entity routine when font-entity is swept.
8838 * ftxfont.c (ftxfont_open): Add eassert because frame
8839 pointer should be saved by ftfont_driver.open.
8840
8841 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8842
8843 * xterm.c (x_make_frame_visible): Restore hack which is needed when
8844 input polling is used. This is still meaningful for Cygwin, see
8845 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
8846 * keyboard.c (poll_for_input_1, input_polling_used):
8847 Define unconditionally.
8848 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
8849 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
8850 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
8851 (font_for_char): Prefer ptrdiff_t to int for buffer position.
8852 (face_for_char): Likewise. Rearrange eassert and return ASCII
8853 face for CHAR_BYTE8_P.
8854 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
8855
8856 2013-12-11 Ken Brown <kbrown@cornell.edu>
8857
8858 * dispextern.h (erase_phys_cursor):
8859 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
8860
8861 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
8862
8863 * nsterm.m (x_free_frame_resources):
8864 * term.c (tty_free_frame_resources):
8865 * xterm.c (x_free_frame_resources): Do not check for non-NULL
8866 face cache because it's implied by free_frame_faces anyway.
8867 * w32term.c (x_free_frame_resources): Likewise. Do not call
8868 free_frame_faces twice.
8869
8870 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
8871
8872 * editfns.c (Fformat_time_string): Mention %F in the doc.
8873
8874 2013-12-11 Martin Rudalics <rudalics@gmx.at>
8875
8876 * window.c (resize_frame_windows): Don't return immediately when
8877 the root window's size doesn't change - the minibuffer window
8878 may still have to be repositioned/resized.
8879 * xfns.c (Fx_create_frame): Always change the frame size after
8880 initializing the frame's faces.
8881 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
8882 change_frame_size should already have done it.
8883 (x_new_font): Assign new tool- and menu-bar heights.
8884 (x_set_window_size_1): Account for tool- and menu-bar heights
8885 (Bug#16013). Don't set pixel sizes since change_frame_size
8886 should already have done it.
8887
8888 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
8889
8890 Remove the option of using libcrypto.
8891 * Makefile.in (LIB_CRYPTO): Remove.
8892 (LIBES): Don't use it.
8893
8894 2013-12-11 Juri Linkov <juri@jurta.org>
8895
8896 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
8897 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
8898
8899 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
8900
8901 * xdisp.c (display_tool_bar_line): Don't extend on a previously
8902 drawn tool bar items (Bug#16058).
8903 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
8904
8905 2013-12-09 Ken Brown <kbrown@cornell.edu>
8906
8907 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
8908
8909 * lisp.h (get_frame_param): Adjust conditions for prototype
8910 declaration.
8911
8912 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
8913
8914 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
8915 Avoid unused macro warning if configured --without-xft.
8916
8917 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
8918
8919 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
8920
8921 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
8922
8923 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
8924
8925 * emacs.c (main): Call fixup_locale a second time for GNUstep.
8926
8927 2013-12-08 Martin Rudalics <rudalics@gmx.at>
8928
8929 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
8930
8931 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
8932
8933 Use libcrypto's checksum implementations if available, for speed.
8934 * Makefile.in (LIB_CRYPTO): New macro.
8935 (LIBES): Use it.
8936
8937 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
8938 The macro didn't conform to C99 due to type mismatch,
8939 which caused compilation failure with Sun C 5.12,
8940 and it was confusing anyway. Include window.h to declare
8941 redisplay_other_windows.
8942
8943 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
8944
8945 * window.c (set_window_buffer): Update mode line (bug#16084).
8946
8947 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
8948
8949 Fix minor problems found by static checking.
8950 * keyboard.c (poll_for_input_1, input_polling_used):
8951 Define only if HAVE_NTGUI.
8952 * xmenu.c (popup_activate_callback): Omit unnecessary
8953 check against USE_X_TOOLKIT, which must be defined here anyway.
8954 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
8955 Now static.
8956
8957 2013-12-07 Martin Rudalics <rudalics@gmx.at>
8958
8959 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
8960
8961 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
8962
8963 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
8964
8965 * nsterm.m (x_set_window_size): Remove fprintf.
8966 (init): Define always. Set applicationDidFinishLaunchingCalled
8967 for GNUstep.
8968 (applicationDidFinishLaunching:):
8969 Set applicationDidFinishLaunchingCalled.
8970 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
8971 not called.
8972
8973 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
8974
8975 Pixel resize changes for NS (Bug#16049).
8976 * nsterm.m (x_set_window_size): Change parameters rows/cols to
8977 height/width. row/cols are locals.
8978 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
8979 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
8980 (windowWillResize): Remove gsextra. Calculate extra as in
8981 updateFrameSize.
8982 (x_new_font): Don't change frame size if fullscreen.
8983 Change size pixelwise.
8984
8985 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
8986 comment in xfns.c. Change to pixelwise call.
8987
8988 2013-12-06 Eli Zaretskii <eliz@gnu.org>
8989
8990 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
8991 (Bug#16070)
8992
8993 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
8994
8995 * xterm.c (input_signal_count): Remove.
8996 (x_dispatch_event): Define unconditionally.
8997 (x_make_frame_visible): Process X events until the frame
8998 is really visible (Bug#16027).
8999 * xterm.h (x_dispatch_event): Declare unconditionally.
9000
9001 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
9002
9003 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
9004
9005 * nsterm.m (x_set_window_size): Handle pixelwise.
9006
9007 2013-12-05 Martin Rudalics <rudalics@gmx.at>
9008
9009 * w32term.c (x_new_font):
9010 * xterm.c (x_new_font): Calculate new frame size from new font
9011 size (Bug#16028).
9012
9013 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9014
9015 * lisp.h (FOR_EACH_TAIL): New macro.
9016 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
9017
9018 * window.c (select_window): Call second wset_redisplay before we change
9019 selected_window (bug#16034).
9020
9021 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
9022
9023 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
9024
9025 2013-12-04 Eli Zaretskii <eliz@gnu.org>
9026
9027 * w32xfns.c: Include window.h, to avoid a compiler warning.
9028
9029 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
9030
9031 * window.c (window_scroll): Mark window for redisplay (bug#16034).
9032 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
9033 window_scroll takes care of it.
9034 (Fset_window_point, Fdelete_other_windows_internal)
9035 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
9036 (Fsplit_window_internal, Fdelete_window_internal)
9037 (Fresize_mini_window_internal, Fset_window_configuration)
9038 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
9039 cause redisplay instead of forcing a complete redisplay.
9040 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
9041 we're only affecting the selected_window.
9042
9043 2013-12-04 Eli Zaretskii <eliz@gnu.org>
9044
9045 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
9046 directional control characters. Update type and category
9047 determination according to the UBA from Unicode v6.3.
9048 (bidi_category_t): New category EXPLICIT_FORMATTING.
9049
9050 * dispextern.h (bidi_type_t): Update to include new bidirectional
9051 properties introduced with Unicode v6.3. (Bug#16043)
9052
9053 2013-12-04 Martin Rudalics <rudalics@gmx.at>
9054
9055 * xterm.c (XTflash): Fix coordinate of bottom area to flash
9056 (Bug#16044).
9057
9058 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
9059
9060 * font.c (font_list_entities): Remove dummy assignment.
9061 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
9062 used on graphic displays only. Remove unused 'font_encoder' member.
9063 (struct font_bitmap): Remove unused 'extra' member.
9064 * nsfont.m (nsfont_open):
9065 * w32font.c (w32font_open_internal):
9066 * ftfont.c (ftfont_get_bitmap): Adjust users.
9067
9068 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
9069
9070 Use bool for boolean.
9071 * tparam.c (tparam1):
9072 * undo.c (record_point, record_property_change):
9073 Use bool for boolean, for local vars that are always true or false.
9074
9075 Minor integer overflow fixes (Bug#16033).
9076 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
9077 This improves on the previous fix to this function.
9078 (window_resize_check): When summing up pixel counts, don't rely on
9079 undefined behavior if the sum overflows.
9080
9081 2013-12-03 Martin Rudalics <rudalics@gmx.at>
9082
9083 * window.c (Fset_window_new_pixel): Don't choke at negative
9084 argument value (Bug#16033).
9085
9086 * xfns.c (Fx_create_frame): Add another call to change_frame_size
9087 to avoid crash in window_box_height.
9088
9089 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
9090 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
9091 calculation.
9092 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
9093
9094 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
9095
9096 Minor integer overflow fixes.
9097 * window.c (Fset_window_new_pixel, grow_mini_window):
9098 * xdisp.c (Fwindow_text_pixel_size):
9099 Avoid undefined behavior on signed integer overflow.
9100 * xfns.c (x_set_mouse_color):
9101 Check that drag shape fits in 'unsigned', since that's what X wants.
9102
9103 2013-12-02 Eli Zaretskii <eliz@gnu.org>
9104
9105 Improve reporting of fatal exception on MS-Windows.
9106 * w32fns.c (my_exception_handler): New function.
9107 (globals_of_w32fns): Set it up as the unhandled exception
9108 handler. Initialize exception code and address to zeros.
9109 (emacs_abort): If the exception code and address are available,
9110 print them at the beginning of the backtrace. Fix the format of
9111 printing addresses (was producing 0x0x12345678 on XP).
9112 (Bug#15994)
9113
9114 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
9115
9116 * eval.c (Fbacktrace__locals): New function.
9117 (syms_of_eval): Defsubr it.
9118
9119 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
9120
9121 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
9122 Define here to unify between...
9123 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
9124 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
9125
9126 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9127
9128 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
9129
9130 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
9131 fringe background extension.
9132 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
9133 because they are now always the same as `left' and `width',
9134 respectively. Remove code for the case that `width' and
9135 `sb_width' are different.
9136
9137 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
9138
9139 Fix minor problems found by static checking.
9140 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
9141 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
9142 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
9143
9144 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
9145
9146 * image.c (imagemagick_compute_animated_image): Don't crash if we
9147 have an animation with different-sized images (bug#15313).
9148
9149 2013-11-30 Martin Rudalics <rudalics@gmx.at>
9150
9151 Remove some unused items introduced during pixelwise change.
9152 * window.c (window_resize_total_check): Remove unused function.
9153 * xdisp.c (remember_mouse_glyph): Remove unused label.
9154 (Ftool_bar_height): Move declaration inside #if.
9155 * xterm.c (x_set_window_size): Don't use r and c.
9156
9157 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
9158
9159 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
9160 `value' and `endp'.
9161
9162 * window.c (Fset_window_configuration): Comment out unused variables.
9163
9164 * w32term.c (w32_read_socket): Remove unused variable `buf'.
9165
9166 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
9167
9168 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
9169
9170 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
9171
9172 * gnutls.c (gnutls_audit_log_function): Only declare and define if
9173 HAVE_GNUTLS3 (Bug#16001).
9174
9175 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
9176 if interrupts are deferred (Bug#15801).
9177
9178 2013-11-30 Martin Rudalics <rudalics@gmx.at>
9179
9180 Support resizing frames and windows pixelwise.
9181 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
9182 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
9183 (struct glyph_matrix): Replace window_left_col and
9184 window_top_line by window_pixel_left and window_pixel_top.
9185 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
9186 Minor rewrite.
9187 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
9188 (draw_window_divider, move_it_to, x_draw_right_divider)
9189 (x_draw_bottom_divider, change_frame_size): Add or fix
9190 declarations.
9191 * dispnew.c (change_frame_size_1): Change prototype.
9192 (adjust_glyph_matrix, required_matrix_width)
9193 (adjust_frame_glyphs_for_window_redisplay): Use pixel
9194 values instead of lines and columns.
9195 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
9196 WINDOW_TOTAL_FRINGE_WIDTH.
9197 (handle_window_change_signal, do_pending_window_change)
9198 (init_display): Adjusts calls of change_frame_size.
9199 (change_frame_size, change_frame_size_1): Handle pixelwise
9200 changes.
9201 * frame.c (Qright_divider_width, Qbottom_divider_width):
9202 New Lisp objects.
9203 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
9204 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
9205 (x_set_internal_border_width, x_set_vertical_scroll_bars)
9206 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
9207 values.
9208 (set_frame_param): New function.
9209 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
9210 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
9211 (Ffringe_width, Fborder_width, Fright_divider_width)
9212 (Fbottom_divider_width): New functions, defsubr them.
9213 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
9214 New argument pixelwise.
9215 (struct frame_parm_table): New members Qright_divider_width and
9216 Qbottom_divider_width.
9217 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
9218 (x_report_frame_params): Handle Qright_divider_width and
9219 Qbottom_divider_width.
9220 (x_set_right_divider_width, x_set_bottom_divider_width):
9221 New functions.
9222 (frame_resize_pixelwise): New option.
9223 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
9224 new_pixelwise, right_divider_width and bottom_divider_width;
9225 remove total_lines; rename text_lines, text_cols, new_text_lines
9226 and new_text_cols to text_height, text_width, new_height and
9227 new_width respectively.
9228 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
9229 FRAME_TEXT_WIDTH respectively.
9230 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
9231 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
9232 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
9233 New macros.
9234 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
9235 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
9236 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
9237 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
9238 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
9239 (FRAME_TOTAL_COLS_ARG): Remove macro.
9240 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
9241 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
9242 (x_wm_set_size_hint): Handle frame pixel sizes.
9243 * indent.c (compute_motion, Fcompute_motion):
9244 Call window_body_width instead of window_body_cols.
9245 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
9246 (make_lispy_position): Handle right and bottom dividers.
9247 (Fsuspend_emacs): Pixelize call of change_frame_size.
9248 * keyboard.h: Extern Qright_divider, Qbottom_divider.
9249 * lisp.h: Extern set_frame_param.
9250 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
9251 x_set_window_size.
9252 (Fx_create_frame): Add entry for vertical_drag_cursor.
9253 Pixelize call of change_frame_size.
9254 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
9255 * nsterm.m (ns_update_window_end): Optionally draw right
9256 divider.
9257 (x_set_window_size): Add argument pixelwise.
9258 Call check_frame_size and change_frame_size with pixelwise zero.
9259 (ns_draw_window_divider): New function.
9260 (ns_redisplay_interface): Add ns_draw_window_divider.
9261 (updateFrameSize:): Call change_frame_size with pixelwise zero.
9262 (x_new_font): Call x_set_window_size with pixelwise zero.
9263 * print.c (print_object): For a window print its sequence
9264 number again.
9265 * term.c (Fresume_tty): Pixelize call of change_frame_size.
9266 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
9267 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9268 (w32_createwindow): Use scroll bar area width.
9269 (w32_wnd_proc): Handle bottom divider width.
9270 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
9271 (Fx_create_frame): Default divider width parameters.
9272 Caclulate sizes pixelwise. Add vertical drag cursor support.
9273 (x_create_tip_frame): Default divider widths to zero.
9274 Pixelize call to change_frame_size.
9275 (Fx_show_tip): Add handling of divider widths. Pixelize window
9276 position and sizes.
9277 (Fw32_frame_rect): New function.
9278 (frame_parm_handler w32_frame_parm_handlers): Add divider
9279 widths.
9280 (Vx_window_vertical_drag_shape): Add variable.
9281 * w32inevt.c (resize_event, maybe_generate_resize_event):
9282 Pixelize change_frame_size calls.
9283 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
9284 call.
9285 * w32term.c (w32_draw_window_divider): New function.
9286 (x_update_window_end): Handle right divider.
9287 (w32_draw_fringe_bitmap, x_scroll_run)
9288 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
9289 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
9290 Calculate new frame sizes pixelwise.
9291 (x_new_font): Pixelize call to x_set_window_size.
9292 (x_check_fullscreen): Pixelize call to change_frame_size.
9293 (x_set_window_size_1, x_set_window_size): New argument
9294 pixelwise. Calculate pixelwise.
9295 (x_wm_set_size_hint): Use scroll bar area width.
9296 (w32_redisplay_interface): Add w32_draw_window_divider.
9297 * w32term.h (struct w32_output): Add vertical drag cursor.
9298 * widget.c (set_frame_size, update_wm_hints)
9299 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
9300 change_frame_size.
9301 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
9302 * window.c (sequence_number): Restore.
9303 (Fwindow_pixel_width, Fwindow_pixel_height)
9304 (Fwindow_mode_line_height, Fwindow_header_line_height)
9305 (window_pixel_to_total, Frun_window_scroll_functions)
9306 (Fset_window_new_pixel, window_resize_apply_total)
9307 (Fwindow_resize_apply_total): New functions.
9308 (window_body_height, window_body_width): Rename from
9309 window_body_lines. New argument PIXELWISE.
9310 Calculate pixelwise.
9311 (Fwindow_body_height, Fwindow_body_width): New argument
9312 PIXELWISE.
9313 (coordinates_in_window, window_relative_x_coord): Use window's
9314 pixel width instead of total width.
9315 (replace_window, recombine_windows): Initialize pixel values.
9316 (resize_root_window, resize_frame_windows, grow_mini_window)
9317 (shrink_mini_window): New argument PIXELWISE.
9318 Calculate pixelwise.
9319 (Fdelete_other_windows_internal, adjust_window_margins)
9320 (window_resize_check, window_resize_apply)
9321 (Fdelete_window_internal, Fresize_mini_window_internal)
9322 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
9323 (check_frame_size): Rename arguments. New argument PIXELWISE.
9324 Calculate pixelwise.
9325 (set_window_buffer): Make samebuf bool. Run configuration change
9326 hook only if buffer changed.
9327 (Fset_window_buffer): Rewrite doc-string.
9328 (make_window): Initialize new_pixel slot.
9329 (Fwindow_resize_apply): Check pixel size of root window.
9330 (Fsplit_window_internal): Call 2nd argument pixel_size.
9331 Calculate pixelwise.
9332 (Fscroll_left, Fscroll_right): Call window_body_width instead of
9333 window_body_cols.
9334 (save_window_data): New slots frame_text_width,
9335 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
9336 (saved_window): New slots pixel_left, pixel_top, pixel_height,
9337 pixel_width.
9338 (Fcurrent_window_configuration, Fset_window_configuration)
9339 (save_window_save, compare_window_configurations): Handle new
9340 slots in save_window_data and saved_window.
9341 (Fset_window_scroll_bars): Fix doc-string.
9342 (window_resize_pixelwise): New variable.
9343 (coordinates_in_window, Fcoordinates_in_window_p):
9344 Handle dividers.
9345 (make_parent_window): Adjust sequence_number.
9346 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
9347 New functions.
9348 * window.h (struct window): New members new_pixel, pixel_left,
9349 pixel_top, pixel_width, pixel_height. Restore sequence_number.
9350 (wset_new_pixel): New function.
9351 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
9352 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
9353 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
9354 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
9355 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
9356 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
9357 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
9358 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
9359 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
9360 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
9361 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
9362 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
9363 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
9364 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
9365 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
9366 Rewrite.
9367 (resize_frame_windows, grow_mini_window, shrink_mini_window)
9368 (window_body_width, check_frame_size): Adapt external declarations.
9369 * xdisp.c (last_max_ascent): New integer.
9370 (window_text_bottom_y): Handle bottom divider.
9371 (window_box_width, window_box_height): Calculate pixelwise.
9372 (get_glyph_string_clip_rects): Handle right divider.
9373 (remember_mouse_glyph): When windows are resized pixelwise
9374 proceed with width and height set to 1.
9375 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
9376 WINDOW_TOTAL_WIDTH.
9377 (move_it_to): Calculate and return maximum x position
9378 encountered.
9379 (Fwindow_text_pixel_size): New function.
9380 (resize_mini_window, update_tool_bar): Calculate pixelwise.
9381 (tool_bar_lines_needed): Rename to tool_bar_height.
9382 Calculate pixelwise.
9383 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
9384 Calculate pixelwise.
9385 (redisplay_tool_bar): Calculate pixelwise.
9386 (redisplay_window): Calculate pixelwise. Handle dividers.
9387 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
9388 (x_draw_vertical_border): Handle dividers.
9389 (define_frame_cursor1): Handle vertical drag cursor.
9390 (x_draw_right_divider, x_draw_bottom_divider): New functions.
9391 (expose_window): Calculate pixelwise. Handle dividers.
9392 (init_xdisp): Initialize pixel values.
9393 * xfaces.c (Qwindow_divider): New face.
9394 (realize_basic_faces): Realize it.
9395 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
9396 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9397 (x_set_scroll_bar_default_width): Default actual width to 16.
9398 (Fx_create_frame): Set sizes pixelwise.
9399 (x_create_tip_frame): Default divider widths to zero.
9400 Pixelize call of change_frame_size.
9401 (Fx_show_tip): Handle divider widths. Initial pixel position
9402 and sizes.
9403 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
9404 (Vx_window_vertical_drag_shape): New option.
9405 * xmenu.c (free_frame_menubar): Pixelize call of
9406 x_set_window_size.
9407 * xterm.c (x_draw_window_divider): New function.
9408 (x_update_window_end): Optionally draw right divider.
9409 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
9410 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
9411 (handle_one_xevent, x_new_font): Calculate pixelwise.
9412 (x_set_window_size_1, x_set_window_size): New argument
9413 pixelwise. Calculate pixelwise.
9414 (x_wm_set_size_hint): Pixelize call of check_frame_size.
9415 (struct x_redisplay_interface): Add x_draw_window_divider.
9416 * xterm.h (struct x_output): Add vertical_drag_cursor.
9417
9418 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
9419
9420 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
9421 Set invisible frames's `redisplay' when a full redisplay is requested.
9422 (redisplay_window): Set must_be_updated_p instead (bug#15999).
9423 (redisplay_mode_lines): Don't set must_be_updated_p any more.
9424 (display_mode_lines): Set it here instead.
9425
9426 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
9427
9428 * dispextern.h (set_window_update_flags): Remove.
9429
9430 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9431
9432 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
9433
9434 * xdisp.c (REDISPLAY_SOME_P): New macro.
9435 (redisplay_internal): Use it (bug#15999).
9436 (prepare_menu_bars, redisplay_window): Use it as well.
9437
9438 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
9439
9440 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
9441
9442 * w32font.c (g_b_init_get_char_width_32_w): New static var.
9443 (globals_of_w32font): Zero it out.
9444 (GetCharWidth32W_Proc): New function pointer.
9445 (get_char_width_32_w): New function.
9446 (compute_metrics): If get_glyph_outline_w returns an error, try
9447 get_char_width_32_w before declaring a failure. This avoids
9448 punishing raster (a.k.a. "bitmap") fonts by slowing down
9449 redisplay. (Bug#6364).
9450
9451 2013-11-29 Eli Zaretskii <eliz@gnu.org>
9452
9453 * xdisp.c (clear_mouse_face): Don't invalidate the entire
9454 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9455 highlight needs to be redisplayed. (Bug#15913)
9456
9457 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
9458
9459 Fix minor problems found by static checking.
9460 * buffer.h (struct buffer_text, struct buffer):
9461 * frame.h (struct frame):
9462 * window.h (struct window):
9463 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
9464 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
9465 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
9466 no-longer-valid use of HAVE_MENUS.
9467 * xdisp.c (propagate_buffer_redisplay): Now static.
9468
9469 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9470
9471 * xmenu.c (Fmenu_or_popup_active_p):
9472 * window.c (Fset_window_configuration):
9473 * menu.c (Fx_popup_menu, Fx_popup_dialog):
9474 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
9475 * fns.c (Fyes_or_no_p):
9476 * editfns.c (Fmessage_box, Fmessage_or_box):
9477 * alloc.c (make_save_ptr_ptr):
9478 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
9479
9480 * window.c (Fset_window_configuration): Move select_window later.
9481
9482 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
9483
9484 Refine redisplay optimizations to only redisplay *some* frames/windows
9485 rather than all of them.
9486 * xdisp.c (REDISPLAY_SOME): New constant.
9487 (redisplay_other_windows, wset_redisplay, fset_redisplay)
9488 (bset_redisplay, bset_update_mode_line): New functions.
9489 (message_dolog): Use bset_redisplay.
9490 (clear_garbaged_frames): Use fset_redisplay.
9491 (echo_area_display): Use wset_redisplay.
9492 (buffer_shared_and_changed): Remove.
9493 (prepare_menu_bars): Call Vpre_redisplay_function before updating
9494 frame titles. Compute the actual set of windows redisplayed.
9495 Don't update frame titles and menu bars for frames that don't need to
9496 be redisplayed.
9497 (propagate_buffer_redisplay): New function.
9498 (AINC): New macro.
9499 (redisplay_internal): Use it. Be more selective in the set of windows
9500 we redisplay. Propagate windows_or_buffers_changed to
9501 update_mode_lines a bit later to simplify the code.
9502 (mark_window_display_accurate_1): Reset window and buffer's
9503 `redisplay' flag.
9504 (redisplay_window): Do nothing if neither the window nor the buffer nor
9505 the frame needs redisplay.
9506 * window.h (struct window): Add `redisplay' field.
9507 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
9508 (redisplay_other_windows, window_list): New declarations.
9509 * window.c (select_window, Fset_window_start): Use wset_redisplay.
9510 (window_list): Not static any more.
9511 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
9512 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
9513 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
9514 * frame.c (Fmake_frame_visible): Don't redisplay everything.
9515 * frame.h (struct frame): Add `redisplay' field.
9516 Move `external_menu_bar' bitfield next to other bit-fields.
9517 (SET_FRAME_GARBAGED): Use fset_redisplay.
9518 (SET_FRAME_VISIBLE): Don't garbage the frame;
9519 Use redisplay_other_windows.
9520 * buffer.h (struct buffer): Add `redisplay' field.
9521 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
9522 (modify_overlay): Use bset_redisplay.
9523 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
9524
9525 2013-11-28 Eli Zaretskii <eliz@gnu.org>
9526
9527 Support w32 file notifications in batch mode.
9528 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
9529 invalid (which happens in batch mode). If non-interactive, call
9530 handle_file_notifications to store file notification events in the
9531 input queue. (Bug#15933)
9532
9533 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9534
9535 * w32inevt.c (handle_file_notifications): Now external, not static.
9536
9537 * w32term.h (handle_file_notifications): Provide prototype.
9538
9539 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
9540 init_crit, since init_display, which does that otherwise, is not
9541 called.
9542
9543 2013-11-27 Glenn Morris <rgm@gnu.org>
9544
9545 * Makefile.in ($(lispsource)/international/charprop.el): New.
9546 (emacs$(EXEEXT)): Depend on charprop.el.
9547
9548 2013-11-27 Eli Zaretskii <eliz@gnu.org>
9549
9550 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
9551 deleting portions of the buffer under non-nil REPLACE argument.
9552 (Bug#15973)
9553
9554 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
9555 directory, watch it and not its parent.
9556 (add_watch): Allow empty string in FILE.
9557
9558 2013-11-27 Martin Rudalics <rudalics@gmx.at>
9559
9560 * window.c (Fset_window_start, window_resize_apply)
9561 (window_scroll): Reset window_end_valid (Bug#15957).
9562
9563 2013-11-27 Glenn Morris <rgm@gnu.org>
9564
9565 * Makefile.in (leimdir): Now in lisp source directory.
9566 ($(leimdir)/leim-list.el): Just use ../leim .
9567 * epaths.in (PATH_DUMPLOADSEARCH):
9568 * lread.c (load_path_default):
9569 * nsterm.m (ns_load_path): No more leim directory.
9570
9571 2013-11-26 Andreas Schwab <schwab@suse.de>
9572
9573 * .gdbinit (xgettype): Add cast.
9574
9575 2013-11-26 Glenn Morris <rgm@gnu.org>
9576
9577 Preload leim-list.el.
9578 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
9579 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
9580 is a single directory.
9581
9582 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
9583
9584 bool-vector-subsetp is now the normal direction (Bug#15912).
9585 * data.c (Fbool_vector_subsetp): Test whether the first argument
9586 is a subset of the second one, not the reverse. Add doc string.
9587
9588 Fix minor problems found by static checking.
9589 * lread.c (load_path_default): Now static.
9590 * textprop.c (text_property_stickiness): Be consistent about the
9591 test used when deciding whether to consider the previous character.
9592 This simplifies the code a bit.
9593
9594 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
9595
9596 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
9597
9598 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
9599 (syms_of_frame): Don't defsubr them.
9600
9601 2013-11-25 Glenn Morris <rgm@gnu.org>
9602
9603 * lread.c (load_path_default): Change the sense of the argument.
9604 (init_lread): When EMACSLOADPATH is set, do not ignore changes
9605 from dump_path. When it is not, avoid checking dump_path twice.
9606
9607 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
9608 uninstalled dump_path against installed Vload_path. (Bug#15964)
9609
9610 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
9611
9612 Export get_pos_property to Elisp.
9613 * editfns.c (Fget_pos_property): Rename from get_pos_property.
9614 (syms_of_editfns): Export it to Elisp.
9615
9616 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
9617
9618 2013-11-23 Romain Francoise <romain@orebokech.com>
9619
9620 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
9621 initialization here ...
9622 (syms_of_fileio): ... from here.
9623
9624 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
9625
9626 * lread.c (init_lread): Fix int/Lisp_Object mixup.
9627 Please use --enable-check-lisp-object-type.
9628
9629 2013-11-23 Glenn Morris <rgm@gnu.org>
9630
9631 * process.c (get_process): Explicit error for dead buffers.
9632
9633 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
9634
9635 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
9636
9637 2013-11-23 Glenn Morris <rgm@gnu.org>
9638
9639 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
9640 * lread.c (load_path_check): Take path to check as argument.
9641 (load_path_default): New, split from init_lread.
9642 (init_lread): Move calc of default load-path to load_path_default.
9643 Empty elements in EMACSLOADPATH now stand for the default.
9644 (load-path): Doc fix.
9645 * emacs.c (decode_env_path): Add option to treat empty elements
9646 as nil rather than ".".
9647 * callproc.c (init_callproc_1, init_callproc):
9648 * image.c (Vx_bitmap_file_path):
9649 * lisp.h (decode_env_path):
9650 * lread.c (Vsource_directory):
9651 Update for new argument spec of decode_env_path.
9652
9653 2013-11-22 Eli Zaretskii <eliz@gnu.org>
9654
9655 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
9656 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
9657
9658 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
9659
9660 Fix some dependency problems that cause unnecessary recompiles.
9661 Reported by RMS in
9662 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
9663 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
9664 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
9665 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
9666 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
9667 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
9668 (boostrap-clean): No need to remove stamp-oldxmenu.
9669
9670 Fix recently introduced bool vector overrun.
9671 This was due to an optimization that went awry.
9672 Reported by Glenn Morris in
9673 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
9674 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
9675 for empty vectors, undoing the 2013-11-18 change.
9676 * data.c (bool_vector_binop_driver): Rely on this.
9677 Fix bug that occasionally overran the destination.
9678 * lisp.h (struct Lisp_Bool_vector): Document this.
9679
9680 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
9681
9682 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
9683 to handle dialogs.
9684
9685 * nsterm.m (init, run, stop:): Comment out for now, does not work
9686 with dialogs.
9687
9688 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
9689
9690 * charset.c (syms_of_charset): Don't read past end of string.
9691
9692 2013-11-19 Glenn Morris <rgm@gnu.org>
9693
9694 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
9695
9696 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
9697
9698 Add hooks to run on gaining/losing focus. (Bug#15029)
9699 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
9700 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
9701 (syms_of_frame): Add focus-in-hook, focus-out-hook.
9702
9703 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
9704
9705 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
9706 The old names predated the API change that put destination at end.
9707
9708 Improve API of recently-added bool vector functions (Bug#15912).
9709 The old API had (bool-vector-count-matches A B)
9710 and (bool-vector-count-matches-at A B I), which gave the
9711 misleading impression that the two functions were variants, one
9712 with a location I. The new API has (bool-vector-count-population A)
9713 and (bool-vector-count-consecutive A B I) to make the distinction
9714 clearer. The first function no longer has a B argument, since the
9715 caller can easily determine the number of nils if the length and
9716 number of ts is known.
9717 * data.c (Fbool_vector_count_population): Rename from
9718 bool_vector_count_matches, and accept just 1 argument.
9719 (Fbool_vector_count_consecutive): Rename from
9720 Fbool_vector_count_matches_at.
9721
9722 Always allocate at least one bits_word per bool vector.
9723 See Daniel Colascione in:
9724 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
9725 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
9726 * data.c (bool_vector_binop_driver): Rely on this. Tune.
9727 * lisp.h (struct Lisp_Bool_vector): Document this.
9728
9729 2013-11-18 Eli Zaretskii <eliz@gnu.org>
9730
9731 * insdel.c (invalidate_buffer_caches): New function, consolidated
9732 from part of prepare_to_modify_buffer.
9733 (insert_from_gap, prepare_to_modify_buffer):
9734 * coding.c (code_convert_region, code_convert_string):
9735 Call invalidate_buffer_caches. (Bug#15841)
9736
9737 * lisp.h (invalidate_buffer_caches): Add prototype.
9738
9739 2013-11-17 Eli Zaretskii <eliz@gnu.org>
9740
9741 * w32term.c (x_update_window_end): Don't invalidate the entire
9742 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9743 highlight needs to be redisplayed. (Bug#15913)
9744
9745 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
9746
9747 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
9748
9749 2013-11-16 Eli Zaretskii <eliz@gnu.org>
9750
9751 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
9752 while we are using Vprin1_to_string_buffer.
9753
9754 * keymap.c (describe_map): Don't crash if PT is 1 both before and
9755 after inserting the description string. (Bug#15907)
9756
9757 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9758
9759 * data.c: Work around bogus GCC diagnostic about shift count.
9760 Reported by Eli Zaretskii in
9761 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
9762 (pre_value): New function.
9763 (count_trailing_zero_bits): Use it.
9764
9765 2013-11-15 Eli Zaretskii <eliz@gnu.org>
9766
9767 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
9768 assume C macros are not supported even under -g3 in these old GCC
9769 versions.
9770
9771 2013-11-15 Leo Liu <sdl.web@gmail.com>
9772
9773 * minibuf.c (Ftry_completion, Fall_completions)
9774 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
9775
9776 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9777
9778 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
9779 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
9780 This avoids placing unnecessary constants into the Emacs code.
9781
9782 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9783
9784 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
9785 for Cygwin w32 build.
9786
9787 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
9788 for Cygwin w32 build. (Bug#15892)
9789
9790 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
9791
9792 Simplify, port and tune bool vector implementation.
9793 * alloc.c (bool_vector_exact_payload_bytes)
9794 (bool_vector_payload_bytes): Remove.
9795 (bool_vector_fill): Return its argument.
9796 * alloc.c (bool_vector_fill):
9797 * lread.c (read1):
9798 * print.c (print_object):
9799 Simplify by using bool_vector_bytes.
9800 * alloc.c (make_uninit_bool_vector):
9801 New function, broken out from Fmake_bool_vector.
9802 (Fmake_bool_vector): Use it. Use tail call.
9803 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
9804 * data.c (BITS_PER_ULL): New constant.
9805 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
9806 if long long versions don't exist.
9807 (shift_right_ull): New function.
9808 (count_one_bits_word): New function, replacing popcount_bits_word
9809 macro. Don't assume that bits_word is no wider than long long.
9810 (count_one_bits_word, count_trailing_zero_bits):
9811 Don't assume that bits_word is no wider than long long.
9812 * data.c (bool_vector_binop_driver, bool_vector_not):
9813 * fns.c (Fcopy_sequence):
9814 * lread.c (read1):
9815 Create an uninitialized destination, to avoid needless work.
9816 (internal_equal): Simplify.
9817 (Ffillarray): Prefer tail call.
9818 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
9819 contain at least one word.
9820 (bits_word_to_host_endian): Prefer if to #if. Don't assume
9821 chars are narrower than ints.
9822 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
9823 * fns.c (Fcopy_sequence):
9824 Simplify and tune.
9825 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
9826 Don't try to port to hosts where bits_word values have holes; the
9827 code wouldn't work there anyway. Verify this assumption, though.
9828 (bool_vector_bytes): New function.
9829 (make_uninit_bool_vector): New decl.
9830 (bool_vector_fill): Now returns Lisp_Object.
9831
9832 * xfns.c (xic_create_fontsetname):
9833 * xrdb.c (gethomedir): Prefer tail calls.
9834
9835 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
9836
9837 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
9838 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
9839
9840 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
9841 that requires a return value.
9842 (Fset_buffer_modified_p): Take advantage of this change to do
9843 a tail call.
9844
9845 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9846
9847 * buffer.c (Frestore_buffer_modified_p): Sync it with
9848 Fset_buffer_modified_p.
9849 (Fforce_mode_line_update): New function, moved from subr.el.
9850 (Fset_buffer_modified_p): Use them.
9851 (syms_of_buffer): Defsubr Fforce_mode_line_update.
9852
9853 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
9854
9855 * search.c (find_newline): Rewrite to prefer offsets to pointers.
9856 This avoids undefined behavior when subtracting pointers into
9857 different aways. On my platform it also makes the code a tad
9858 smaller and presumably faster.
9859
9860 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9861
9862 * keyboard.c (command_loop_1): Use region-extract-function.
9863 * insdel.c (Qregion_extract_function): Not static any more (can we
9864 stop pretending that these vars can benefit from being marked static?).
9865
9866 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9867
9868 * search.c (find_newline): If buffer text is relocated during the
9869 "dumb loop", adjust C pointers into buffer text to follow suit.
9870 (Bug#15841)
9871
9872 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
9873
9874 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
9875 for conversion (Bug#15837).
9876
9877 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9878
9879 * fileio.c (Finsert_file_contents): Invalidate the newline cache
9880 for the entire range of inserted characters. (Bug#15841)
9881
9882 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
9883
9884 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
9885 unspecified.
9886 (realize_default_face): Remove assignment to distant-foreground if
9887 unspecified (Bug#15815).
9888
9889 2013-11-08 Eli Zaretskii <eliz@gnu.org>
9890
9891 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
9892 cache-long-scans disabled, since we don't want to call
9893 prepare_to_modify_buffer (in insert_1_both) for each message we
9894 display.
9895
9896 * buffer.h (bset_cache_long_scans): New INLINE function, moved
9897 from buffer.c. Improve commentary to the buffer field setter
9898 functions.
9899
9900 * buffer.c (bset_cache_long_scans): Static function deleted.
9901 Improve commentary to the buffer field setter functions.
9902 (init_buffer_once): Default for cache-long-scans changed to t.
9903 (Bug#15797)
9904
9905 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
9906
9907 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
9908
9909 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
9910 This bug was introduced in my 2013-06-21 change, and caused
9911 struct Lisp_Sub_Char_Table objects to be given too many slots,
9912 which broke 'make -C admin/unidata'.
9913
9914 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
9915
9916 Import changes from mac-port 4.5.
9917 * macfont.m (mac_font_copy_default_descriptors_for_language)
9918 (mac_font_copy_default_name_for_charset_and_languages): Declare.
9919 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
9920 (macfont_language_default_font_names): New.
9921 (macfont_list): Rearrange language/charset code.
9922 (macfont_close): Don't check for macfont_info->cache.
9923 (mac_ctfont_create_preferred_family_for_attributes): New font
9924 selection code, call
9925 mac_font_copy_default_name_for_charset_and_languages.
9926 (mac_font_copy_default_descriptors_for_language)
9927 (mac_font_copy_default_name_for_charset_and_languages): New functions.
9928
9929 * macfont.h (kCTVersionNumber10_9): Define if not defined.
9930
9931 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 Port to C11 aligned_alloc, and fix some integer overflows.
9934 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
9935 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
9936 and use of posix_memalign replaced with aligned_alloc.
9937 (aligned_alloc): New function, defined or declared as needed.
9938 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
9939 Don't undef; configure.ac now does this.
9940 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
9941 (calloc, aligned_alloc): Check for integer overflow.
9942 (aligned_alloc): Rename from memalign. All uses changed.
9943 (memalign): New function, an alias for aligned_alloc.
9944
9945 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9946
9947 * xdisp.c (redisplay_internal): Fix typo in last change.
9948
9949 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9950
9951 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
9952
9953 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9954
9955 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
9956 redisplay--mode-lines-cause.
9957 (redisplay_internal): Keep them uptodate. Remove redundant check of
9958 buffer_shared_and_changed.
9959 * *.[chm]: Number every assignment to update_mode_lines so we
9960 can track why it is set.
9961
9962 2013-11-06 Eli Zaretskii <eliz@gnu.org>
9963
9964 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
9965
9966 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9967
9968 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
9969 can track why it is set.
9970
9971 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9972
9973 Integer-related fixes for term.c etc.
9974 * dispextern.h (face_tty_specified_color): New function.
9975 * term.c (turn_on_face): Don't rely on undefined behavior when
9976 assigning an out-of-range value to 'long'.
9977 Simplify test for toggling highlight.
9978 (tty_capable_p): Omit last two (unused) args. All callers changed.
9979 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
9980 (read_menu_input, tty_menu_activate, tty_menu_show):
9981 * xfaces.c (x_supports_face_attributes_p)
9982 (tty_supports_face_attributes_p):
9983 Use bool for boolean. All callers changed.
9984 (tty_supports_face_attributes_p): Omit defaults for color indices;
9985 no longer needed. Simplify tail call.
9986
9987 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9988
9989 * xdisp.c (prepare_menu_bars): Mark static.
9990 * lisp.h (prepare_menu_bars): Don't declare.
9991 * xselect.c (x_handle_selection_clear):
9992 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
9993
9994 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
9995
9996 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
9997 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
9998
9999 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
10000
10001 * keyboard.c (Fcommand_error_default_function): Rename from
10002 Fdefault_error_output.
10003
10004 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
10005
10006 * keyboard.c (Fdefault_error_output): New function, extracted from
10007 cmd_error_internal.
10008 (syms_of_keyboard): Use it for Vcommand_error_function.
10009
10010 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
10011
10012 * eval.c (handlerlist_sentinel): New variable (bug#15802).
10013 (init_eval): Use it to ensure handlerlist is non-NULL.
10014 (unwind_to_catch): Make sure we never set handlerlist to NULL.
10015 (Fsignal): Adjust NULLness test of handlerlist.
10016 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
10017
10018 2013-11-05 Eli Zaretskii <eliz@gnu.org>
10019
10020 * callproc.c (call_process): Call prepare_to_modify_buffer before
10021 decoding text read from the sub-process, as the decoded stuff will
10022 be inserted into the buffer. This will invalidate the various
10023 caches maintained for the buffer. (Bug#15148)
10024
10025 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
10026
10027 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
10028 string of glyphless-char-display.
10029
10030 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
10031
10032 * nsfns.m (ns_get_name_from_ioreg): New function.
10033 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
10034 OSX >= 10.9. Use ns_get_name_from_ioreg.
10035
10036 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
10037
10038 Simplify and port recent bool vector changes.
10039 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
10040 only in this file. Use a more-efficient implementation if the
10041 second argument is a power of 2.
10042 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
10043 Remove no-longer-necessary compile-time checks.
10044 (bool_vector_exact_payload_bytes): New function.
10045 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
10046 exact payload changed to call the new function. Do not assume
10047 that the arg or result fits in ptrdiff_t.
10048 (bool_vector_fill): New function.
10049 (Fmake_bool_vector): Use it. Don't assume bit counts fit
10050 in ptrdiff_t.
10051 (vroundup_ct): Don't assume arg fits in size_t.
10052 * category.c (SET_CATEGORY_SET): Remove. All callers now just
10053 invoke set_category_set.
10054 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
10055 All callers changed. Use bool_vector_set.
10056 * category.h (XCATEGORY_SET): Remove; no longer needed.
10057 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
10058 bool_vector_bitref.
10059 * data.c (Faref): Use bool_vector_ref.
10060 (Faset): Use bool_vector_set.
10061 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
10062 (Fbool_vector_not, Fbool_vector_count_matches)
10063 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
10064 * fns.c (concat): Use bool_vector_ref.
10065 (Ffillarray): Use bool_vector_fill.
10066 (mapcar1): Use bool_vector_ref.
10067 (sxhash_bool_vector): Hash words, not bytes.
10068 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
10069 a constant, since it's now used in #if.
10070 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
10071 unsigned char on unusual architectures, so that we no longer
10072 assume that the number of bits per bits_word is a power of two or
10073 is a multiple of 8 or of CHAR_BIT.
10074 (Qt): Add forward decl.
10075 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
10076 at least as strictly as bits_word.
10077 (bool_vector_data, bool_vector_uchar_data): New accessors.
10078 All data structure accesses changed to use them.
10079 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
10080 (bool_vector_set): New functions.
10081 (bool_vector_fill): New decl.
10082 (ROUNDUP): Move to alloc.c as described above.
10083
10084 Fix recent gnutls changes.
10085 * gnutls.c (Fgnutls_boot): Don't assume C99.
10086 * process.c (wait_reading_process_output): Fix typo in recent change.
10087
10088 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
10089
10090 * process.c (wait_reading_process_output, read_process_output)
10091 (send_process): Check gnutls_state is not NULL.
10092
10093 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
10094 (Fgnutls_boot): Set process gnutls_p later, after initialization.
10095
10096 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
10097
10098 * nsterm.m (init, run, stop:): New methods in EmacsApp for
10099 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
10100
10101 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
10102 OSX >= 10.9.
10103
10104 * nsfns.m (Fx_create_frame): Fix memory leak.
10105
10106 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
10107 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
10108 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
10109
10110 2013-11-04 Eli Zaretskii <eliz@gnu.org>
10111
10112 * xdisp.c (message3_nolog, message_with_string): Encode the string
10113 before writing it to the terminal in a non-interactive session.
10114
10115 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
10116 sure we concatenate them into a unibyte string.
10117
10118 * fileio.c (make_temp_name): Encode PREFIX, and decode the
10119 resulting temporary name before returning it to the caller.
10120 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
10121 is a unibyte string, convert NAME to a unibyte string to ensure
10122 that the result is also a unibyte string.
10123
10124 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
10125 create unibyte strings from default paths and directory/file
10126 names.
10127
10128 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
10129 string.
10130
10131 * callproc.c (init_callproc): Use build_unibyte_string to make
10132 sure we create unibyte strings from default paths and
10133 directory/file names.
10134
10135 * buffer.c (init_buffer): Don't store default-directory of
10136 *scratch* in multibyte form. The original problem which led to
10137 that is described in
10138 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
10139 but it was solved long ago. (Bug#15260)
10140
10141 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
10142
10143 Port to stricter C99 platforms.
10144 Especially, C99 prohibits nesting a struct X inside struct Y if
10145 struct X has a flexible array member.
10146 * alloc.c (struct sdata): New type.
10147 (sdata): Implement in terms of struct sdata.
10148 Remove u member; all uses replaced by next_vector, set_next_vector.
10149 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
10150 (SDATA_DATA_OFFSET): Now a constant, not a macro.
10151 (struct sblock): Rename first_data member to data, which is now
10152 a flexible array member. All uses changed.
10153 (next_vector, set_next_vector, large_vector_vec): New functions.
10154 (vector_alignment): New constant.
10155 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
10156 (struct large-vector): Now merely a NEXT member, since the old approach
10157 ran afoul of stricter C99. All uses changed to use
10158 large_vector_vec or large_vector_offset.
10159 (large_vector_offset): New constant.
10160 * dispnew.c: Include tparam.h, for tgetent.
10161 Do not include term.h; no longer needed.
10162 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
10163 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
10164 (struct Lisp_Vector): Use a flexible array member for contents,
10165 instead of a union with a member that is an array of size 1.
10166 All uses changed.
10167 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
10168 fact that the struct no longer contains a union.
10169 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
10170 (struct Lisp_Save_Value, struct Lisp_Free):
10171 Use unsigned, not int, for spacers, to avoid c99 warning.
10172 (union specbinding): Use unsigned, not bool, for bitfield, as
10173 bool is not portable to pre-C99 hosts.
10174
10175 2013-11-04 Glenn Morris <rgm@gnu.org>
10176
10177 * emacs.c (usage_message): Mention that `-L :...' appends.
10178
10179 2013-11-02 Glenn Morris <rgm@gnu.org>
10180
10181 * Makefile.in (abs_builddir): Remove.
10182 (bootstrap_exe): Use relative filename.
10183
10184 Use relative filenames in TAGS files.
10185 * Makefile.in (abs_srcdir): Remove it again.
10186 (.PHONY): Remove frc.
10187 (maintainer-clean): No more TAGS-LISP file.
10188 (TAGS): Pass relative file names to etags.
10189 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
10190
10191 * Makefile.in (abs_srcdir): New, set by configure.
10192 (lispdir): Remove.
10193 (maintainer-clean): Remove pointless echo. That should be in the
10194 top-level Makefile, if anywhere. Delete TAGS-LISP.
10195 (extraclean): No s/ and m/ directories for some time.
10196 (TAGS): Also depend on ctagsfiles3.
10197 Remove no-longer-defined S_FILE.
10198 Pass absolute filenames to etags once more.
10199 (TAGS-LISP): Replace lispdir with its expansion.
10200 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
10201 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
10202
10203 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
10204
10205 * xfaces.c (check_lface_attrs, realize_default_face):
10206 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
10207 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
10208
10209 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
10210
10211 * emacs.c (original_pwd): Remove global var by making it local.
10212 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
10213
10214 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
10215
10216 * xfaces.c: Declare color_distance.
10217 (QCdistant_foreground): New variable.
10218 (NEAR_SAME_COLOR_THRESHOLD): New define.
10219 (load_color2): New function.
10220 (load_color): Call load_color2.
10221 (load_face_colors): Call load_color2 and if distant-color is specified
10222 calculate distant and use distant-color if colors are near.
10223 (LFACE_DISTANT_FOREGROUND): New define.
10224 (merge_face_ref, Finternal_set_lisp_face_attribute)
10225 (Finternal_get_lisp_face_attribute)
10226 (x_supports_face_attributes_p): Handle distant-foreground similar to
10227 foreground.
10228 (syms_of_xfaces): DEFSYM QCdistant_foreground.
10229
10230 * dispextern.h (lface_attribute_index):
10231 Add LFACE_DISTANT_FOREGROUND_INDEX.
10232
10233 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
10234
10235 * image.c (pbm_next_char): New function.
10236 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
10237 (pbm_scan_number): Use it.
10238 (Qlibjpeg_version): New variable.
10239 (syms_of_image): DEFSYM and initialize it.
10240
10241 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
10242
10243 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
10244
10245 2013-10-31 Glenn Morris <rgm@gnu.org>
10246
10247 * emacs.c (original_pwd): New char.
10248 (main): If using --chdir, store original_pwd.
10249 (init_cmdargs): When setting Vinvocation_directory based on a
10250 relative argv[0], use original_pwd if set. (Bug#15768)
10251
10252 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10253
10254 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
10255
10256 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
10257
10258 * insdel.c: Fix minor problems found by static checking.
10259 (Qregion_extract_function): Now static.
10260 (prepare_to_modify_buffer_1): Remove unused locals.
10261
10262 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10263
10264 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
10265 (syms_of_xdisp): Declare pre-redisplay-function.
10266 (markpos_of_region): Remove function.
10267 (init_iterator, compute_stop_pos, handle_face_prop)
10268 (face_before_or_after_it_pos, reseat_to_string)
10269 (get_next_display_element, window_buffer_changed)
10270 (redisplay_internal, try_cursor_movement, redisplay_window)
10271 (try_window_reusing_current_matrix, try_window_id, display_line)
10272 (note_mode_line_or_margin_highlight, note_mouse_highlight)
10273 (display_string, mouse_face_from_buffer_pos): Remove region handling.
10274 * window.h (struct window): Remove field `region_showing'.
10275 * dispextern.h (struct it): Remove region_beg/end_charpos.
10276 (face_at_buffer_position, face_for_overlay_string)
10277 (face_at_string_position): Update prototypes.
10278 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
10279 (face_at_string_position): Remove `region_beg' and `region_end' args.
10280 * fontset.c (Finternal_char_font):
10281 * font.c (font_at, font_range): Adjust calls accordingly.
10282 * insdel.c (Qregion_extract_function): New var.
10283 (syms_of_insdel): Initialize it.
10284 (prepare_to_modify_buffer_1): Use it.
10285
10286 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10287
10288 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
10289 * ftxfont.c (ftxfont_get_gcs):
10290 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
10291 * xfaces.c (x_free_colors, x_free_dpy_colors)
10292 (x_create_gc, unload_color):
10293 * xselect.c (x_property_data_to_lisp):
10294 * xsettings.c (parse_settings):
10295 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
10296 (get_bits_and_offset): Adjust definition.
10297 * frame.c (XParseGeometry): Adjust locals.
10298 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
10299 * regex.h (toplevel): Likewise for reg_syntax_t.
10300
10301 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10302
10303 * eval.c (run_hook_with_args): Use FUNCTIONP.
10304
10305 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10306
10307 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
10308 fields, drop 'allocated_p' member and use -1 for uninitialized value.
10309 * w32term.h (struct w32_output): Similarly but do not use -1 because...
10310 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
10311 on MS-Windows anyway.
10312 (free_face_colors): Define only if HAVE_X_WINDOWS and...
10313 (free_realized_face): ...adjust user.
10314 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
10315 white relief pixels to -1.
10316 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
10317 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
10318 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
10319
10320 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
10321
10322 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
10323 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
10324 in practice now. All callers changed.
10325
10326 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
10327
10328 * dispextern.h (struct face): Use bitfields for 'underline_type'
10329 and 'box' members. Remove set-but-unused members 'pixmap_w' and
10330 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
10331 'stipple' member. Move 'lface' member up to help...
10332 * xfaces.c (make_realized_face): ...this function to find and
10333 clear just the members that need clearing.
10334 (load_face_colors, realize_x_face):
10335 * xdisp.c (extend_face_to_end_of_line): Adjust user.
10336
10337 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
10338
10339 * xftfont.c (struct xftfont_info): Remove set-but-unused
10340 'screen' member.
10341 (xftfont_open): Adjust user.
10342 (xftfont_get_colors): Remove useless prototype.
10343
10344 2013-10-26 Eli Zaretskii <eliz@gnu.org>
10345
10346 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
10347 before passing them to 'unexec'. (Bug#15260)
10348
10349 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
10350
10351 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
10352
10353 2013-10-25 Eli Zaretskii <eliz@gnu.org>
10354
10355 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
10356 the changed signature of the font driver's 'close' method.
10357
10358 * w32font.h (w32font_close): Adjust the prototype to the change in
10359 function definition.
10360
10361 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
10362
10363 * w32uniscribe.c (uniscribe_close): Adapt the call to
10364 w32font_close to its new prototype.
10365
10366 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
10367
10368 Omit unused frame argument of font API's close function.
10369 * font.h (struct font): Drop frame argument. Adjust comment.
10370 * font.c (font_clear_cache, font_close_object): Adjust users.
10371 * ftfont.c (ftfont_close):
10372 * ftxfont.c (ftxfont_close):
10373 * macfont.m (macfont_close):
10374 * nsfont.m (nsfont_close):
10375 * w32font.c (w32font_close):
10376 * xfont.c (xfont_close):
10377 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
10378 tweak comments and make functions safe if called more than once for
10379 the same font object.
10380
10381 Perform font-specific cleanup when font object is swept by GC. See
10382 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
10383 * alloc.c (cleanup_vector): New function.
10384 (sweep_vector): Call it for each reclaimed vector object.
10385 * font.h (struct font): Adjust comment.
10386
10387 2013-10-24 Glenn Morris <rgm@gnu.org>
10388
10389 * Makefile.in (abs_top_srcdir): New, set by configure.
10390
10391 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
10392
10393 Adjust recent font-related changes to fix bug#15686.
10394 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
10395 is a live window system frame, mark its default font too.
10396
10397 2013-10-23 Glenn Morris <rgm@gnu.org>
10398
10399 * Makefile.in (RUN_TEMACS): Make relative (again).
10400 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
10401 (bootstrap-emacs$(EXEEXT)):
10402 Quote entities that might contain whitespace.
10403
10404 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
10405
10406 Port to Solaris 10 and its bundled GCC. Reported by Timothy C. Burt.
10407 * floatfns.c (isfinite, isnan): Redefine unconditionally.
10408
10409 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
10410
10411 Do not allow font caches to grow too large.
10412 * alloc.c (compact_font_cache_entry, compact_font_caches):
10413 New functions or stub if not HAVE_WINDOW_SYSTEM.
10414 (compact_undo_list): Factor out from Fgarbage_collect.
10415 Add comment.
10416 (mark_face_cache): Mark face font. Move down to avoid
10417 extra prototypes.
10418 (mark_terminals): Do not mark font cache here.
10419 (Fgarbage_collect): Call compaction functions described
10420 above. Adjust comment.
10421
10422 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
10423
10424 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
10425 chdir to HOME (bug#15607).
10426
10427 * nsterm.m (Qcocoa, Qgnustep): New variables.
10428 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
10429 (ns_get_color): Make selection color work for GNUstep also.
10430
10431 2013-10-18 Eli Zaretskii <eliz@gnu.org>
10432
10433 * keyboard.c (make_lispy_event): Remove GPM-specific code that
10434 handles mouse clicks. Instead, let GPM use the same code as all
10435 the other mice use. See the discussion starting at
10436 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
10437 for the details of the problem with the menu bar this fixes.
10438
10439 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
10440
10441 Remove port-specific display name lists to avoid extra
10442 complexity and data duplication with display info lists.
10443 * xterm.h (x_display_name_list): Remove declaration.
10444 * xterm.c (x_display_name_list): Remove.
10445 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
10446 * xfns.c (x_display_info_for_name, Fx_display_list):
10447 Likewise. Use x_display_list where appropriate.
10448 * w32term.h (w32_display_name_list): Remove declaration.
10449 * w32term.c (w32_display_name_list): Remove.
10450 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
10451 Adjust users.
10452 * w32fns.c (x_display_info_for_name, Fx_display_list):
10453 Likewise. Use x_display_list where appropriate.
10454 * nsterm.h (ns_display_name_list): Remove declaration.
10455 * nsterm.m (ns_display_name_list): Remove.
10456 (ns_term_init, syms_of_nsterm): Adjust users.
10457 * nsfns.m (ns_display_info_for_name, Fx_display_list):
10458 Likewise. Use x_display_list where appropriate.
10459 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
10460 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
10461 (mark_terminals): Mark per-terminal font cache.
10462
10463 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
10464
10465 Don't run timers in input-pending-p. Its new check-timers param
10466 provides the prior behavior. (Bug#15045).
10467 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
10468
10469 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
10470
10471 Make some functions static in non-Microsoft builds.
10472 On my platform (Fedora 19 x86-64), this shrinks the
10473 Emacs executable (text+data) by 0.25%.
10474 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
10475 (load_color) [!MSDOS]:
10476 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
10477 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
10478 * lisp.h (check_existing):
10479 * process.h (conv_sockaddr_to_lisp, network_interface_list)
10480 (network_interface_info) [!WINDOWSNT]:
10481 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
10482 Remove extern decls.
10483 * fileio.c (check_existing):
10484 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
10485 * process.c (conv_sockaddr_to_lisp, network_interface_list)
10486 (network_interface_info) [!WINDOWSNT]:
10487 * term.c (encode_terminal_code) [!WINDOWSNT]:
10488 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
10489 * xfaces.c (load_color) [!MSDOS]:
10490 Now static.
10491 * fileio.c (check_existing, check_executable, check_writable):
10492 * process.c (network_interface_list, network_interface_info):
10493 Move earlier, so that we don't need forward decls.
10494 * gnutls.c (fn_gnutls_transport_set_errno)
10495 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
10496 Remove; unused.
10497 * w32.c (init_environment): Use faccessat rather than
10498 check_existing, partly for consistency with the rest of the code
10499 in this file, partly so that check_existing can be static.
10500
10501 Make VALMASK visible to GDB even if clang is used (Bug#15574).
10502 * emacs.c (MAIN_PROGRAM): New macro.
10503 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
10504 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
10505
10506 bool vector int width fixes
10507 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
10508 (Fbool_vector_count_matches_at):
10509 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
10510 can exceed PTRDIFF_MAX, at least in theory.
10511 (Fbool_vector_count_matches_at):
10512 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
10513
10514 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
10515
10516 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
10517 (struct sockaddr): Add forward decl, for platforms that lack it.
10518
10519 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
10520
10521 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
10522 Qnil (Bug#15628).
10523
10524 2013-10-16 Eli Zaretskii <eliz@gnu.org>
10525
10526 * w32.c (network_interface_get_info, network_interface_list)
10527 (network_interface_info): New functions. (Bug#15610)
10528 (GetAdaptersInfo_Proc): New typedef.
10529 (get_adapters_info): New wrapper function.
10530 (globals_of_w32): Initialize g_b_init_get_adapters_info.
10531
10532 * process.h (network_interface_list, network_interface_info):
10533 New prototypes.
10534
10535 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
10536 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
10537 all systems. Return non-nil for systems that HAVE_NET_IF_H and
10538 for WINDOWSNT. Doc fix.
10539 (syms_of_process): Defsubr Snetwork_interface_list and
10540 Snetwork_interface_info unconditionally.
10541
10542 * menu.c (have_boxes): Fix redundant simulation of radio buttons
10543 in NS GUI sessions. (Bug#15629)
10544
10545 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
10546
10547 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
10548
10549 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10550
10551 * print.c (print_object): Print " ..." when truncating bool vectors.
10552
10553 2013-10-15 Eli Zaretskii <eliz@gnu.org>
10554
10555 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
10556 standard mouse buttons.
10557
10558 * termhooks.h (struct input_event): Remove incorrect commentary.
10559
10560 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10561
10562 Disallow bool vector operations on mixed-length operands.
10563 The old behavior left garbage in the result vector sometimes,
10564 and didn't seem to be useful.
10565 * data.c (Qwrong_length_argument): New static var.
10566 (wrong_length_argument): New function.
10567 (bool_vector_binop_driver): Check that args agree in length.
10568
10569 * keyboard.c, keyboard.h (all_kboards): Now static.
10570
10571 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
10572
10573 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
10574 note from the lispref.
10575
10576 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
10577
10578 * nsterm.h (struct ns_display_info): Remove set-but-unused
10579 member image_cache (image caches are per-terminal anyway).
10580 (FRAME_X_IMAGE_CACHE): Remove.
10581 * nsterm.m (ns_initialize_display_info): Adjust user.
10582
10583 2013-10-14 Eli Zaretskii <eliz@gnu.org>
10584
10585 * w32proc.c: Include mingw_time.h.
10586
10587 * w32.c: Include mingw_time.h.
10588
10589 Implement scrolling of TTY menus when the screen is too short.
10590
10591 * term.c (tty_menu_display): Accept an additional argument, the
10592 menu item from which to start displaying the menu. Account for
10593 the value of Y when limiting the menu to the number of available
10594 screen lines.
10595 (mi_result): New enumeration.
10596 (read_menu_input): Return enumerated value. When the y coordinate
10597 hits min_y or max_y, return scroll indication instead of wrapping
10598 around the menu.
10599 (tty_menu_activate): Handle the scrolling indications from
10600 read_menu_input. Compute the first menu item to display and pass
10601 it to tty_menu_display.
10602
10603 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10604
10605 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
10606 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
10607 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
10608 Adjust to match the change described below.
10609 (struct terminal): Move must_write_spaces, line_ins_del_ok,
10610 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
10611 memory_below_frame members to...
10612 * termchar.h (struct tty_display_info): ...here because they're
10613 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
10614 * term.c (init_tty):
10615 * nsterm.m (ns_create_terminal):
10616 * w32term.c (w32_create_terminal):
10617 * xterm.c (x_create_terminal): Adjust users.
10618 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
10619 to filter out non-TTY frames. Adjust comment.
10620 (scrolling): Adjust user. Prefer eassert for debugging check.
10621
10622 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10623
10624 * xfaces.c (PT_PER_INCH): Remove unused macro.
10625 * termhooks.h (struct terminal): Remove set-but-unused
10626 member fast_clear_end_of_line.
10627 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
10628 * nsterm.m (ns_create_terminal):
10629 * term.c (init_tty):
10630 * w32term.c (w32_create_terminal):
10631 * xterm.c (x_create_terminal): Adjust users.
10632
10633 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
10634
10635 * lisp.h (bool_vector_size): New function.
10636 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
10637 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10638 (Fbool_vector_not, Fbool_vector_count_matches_at):
10639 Remove uses of 'eassume' that should no longer be needed,
10640 because they are subsumed by the 'eassume' in bool_vector_size.
10641
10642 2013-10-12 Eli Zaretskii <eliz@gnu.org>
10643
10644 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
10645 after inclusion of gif_lib.h, thus fixing compiler warnings caused
10646 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
10647
10648 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10649
10650 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
10651 have different dimensions. (Bug#15575)
10652
10653 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
10654 visibility.
10655
10656 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
10657
10658 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10659
10660 * term.c (tty_menu_show): Never return with unbalanced
10661 specpdl. Use eassert for debugging check. Adjust style.
10662
10663 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10664
10665 * term.c (read_menu_input): Make selection of menu items
10666 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10667 (tty_menu_activate): Fix off-by-one error when computing max_y.
10668
10669 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
10670
10671 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
10672 audit logging (only used with GnuTLS 3.x) and enable it.
10673
10674 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10675
10676 * dispnew.c (redraw_frame): Remove useless #ifdef because
10677 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
10678 Also, move TTY fflush to...
10679 * term.c (tty_update_end): ...this function.
10680
10681 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10682
10683 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
10684 the end of the frame's glyph matrix. (Bug#15575)
10685
10686 * term.c (tty_menu_display): Don't move cursor while overwriting
10687 frame's glyphs with menu items. Limit the number of items
10688 displayed to what can be shown on the available screen lines,
10689 excluding the echo area.
10690 (tty_menu_activate): Limit the Y coordinate allowed by
10691 read_menu_input to the last screen line used for menu display.
10692
10693 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
10694
10695 * lisp.h (eassume): New macro.
10696 Also, include <verify.h>, for 'assume'.
10697 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
10698 (vroundup, vector_nbytes):
10699 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10700 (Fbool_vector_not, Fbool_vector_count_matches)
10701 (Fbool_vector_count_matches_at):
10702 Use eassume, not eassert.
10703 * casetab.c (set_identity, shuffle):
10704 * composite.c (composition_gstring_put_cache):
10705 * dispnew.c (update_frame_1):
10706 * ftfont.c (ftfont_shape_by_flt):
10707 * image.c (gif_load):
10708 * intervals.c (offset_intervals):
10709 * macfont.m (macfont_shape):
10710 Remove calls to 'assume' that are no longer needed, because
10711 --enable-gcc-warnings no longer generates bogus warnings
10712 when these calls are removed.
10713
10714 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10715
10716 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
10717
10718 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
10719
10720 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
10721 (Qsubstitute_env_in_file_name): New var.
10722 (syms_of_fileio): Define it.
10723
10724 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10725
10726 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
10727 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
10728 (Bug#15575)
10729
10730 * term.c (save_and_enable_current_matrix): Don't allocate and
10731 don't save margin areas.
10732 (restore_desired_matrix): Don't restore margin areas.
10733 (free_saved_screen): Don't free margin areas.
10734
10735 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
10736
10737 * image.c: Pacify --enable-gcc-warnings.
10738 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
10739 #define only if used.
10740
10741 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10742
10743 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
10744 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
10745 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
10746 (gif_load): For giflib v5.x and later, display the error message
10747 produced by giflib when its functions fail.
10748 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
10749 (Bug#15531)
10750
10751 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10752
10753 * keyboard.c (last_event_timestamp): Remove. For X selection and
10754 GTK popup menus, it may be obtained from per-frame X display info.
10755 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
10756 (process_special_events): Adjust users.
10757 * keyboard.h (last_event_timestamp): Remove declaration.
10758 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
10759 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
10760 * menu.h (xmenu_show): Adjust prototype.
10761 * menu.c (Fx_popup_menu): Adjust user.
10762 * xselect.c (x_own_selection, x_get_foreign_selection)
10763 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
10764
10765 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10766
10767 * keyboard.c (init_kboard): Now static. Add arg
10768 to denote window system. Adjust comment.
10769 (init_keyboard): Adjust user.
10770 (allocate_kboard): New function.
10771 (syms_of_keyboard):
10772 * nsterm.m (ns_term_init):
10773 * term.c (init_tty):
10774 * w32term.c (w32_create_terminal):
10775 * xterm.c (x_term_init): Use it.
10776 * keyboard.h (init_kboard): Remove prototype.
10777 (allocate_kboard): Add prototype.
10778
10779 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
10780
10781 * image.c (GIFLIB_MAJOR): Ensure it's defined.
10782 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
10783
10784 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10785
10786 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
10787
10788 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10789
10790 * term.c (tty_menu_activate): Flush the output stream after
10791 showing the cursor, and don't mark the frame garbaged at exit from
10792 the function. Fixes redisplay glitches when moving from one menu
10793 to another.
10794
10795 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
10796
10797 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
10798 or throw error (Bug#15570).
10799
10800 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10801
10802 * intervals.c (temp_set_point_both): Move test into 'eassert',
10803 for speed.
10804
10805 * lisp.h (eassert): Don't use 'assume'.
10806 Sometimes 'assume' wins in performance, and sometimes it loses,
10807 so it shouldn't be used all the time. Perhaps we need two
10808 flavors of 'eassert', one for where 'assume' is far more likely
10809 to help or to hurt; but that can be done later.
10810 Reported by Dmitry Antipov in
10811 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
10812 Also, don't include <verify.h>; no longer needed.
10813
10814 2013-10-09 Glenn Morris <rgm@gnu.org>
10815
10816 * eval.c (Fcond): Doc tweak.
10817
10818 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10819
10820 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
10821 expressions with side effects to eassert. (Bug#15565)
10822
10823 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
10824
10825 * fns.c (hashfn_user_defined): Allow hash functions to return any
10826 Lisp_Object.
10827
10828 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10829
10830 Fix minor problems found by static checking.
10831 * dispnew.c (save_current_matrix): Omit unnecessary casts.
10832 * dispnew.c (update_frame_with_menu): Mark debug local as used.
10833 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
10834 * keyboard.c (read_menu_command): Remove unused local.
10835 * lisp.h (read_menu_command): New decl.
10836 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
10837 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
10838 Return ptrdiff_t, not int.
10839 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
10840 not int, for benefit of xpalloc.
10841 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
10842 and xpalloc.
10843 (have_menus_p): Remove; unused.
10844 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
10845 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
10846 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
10847 Now static.
10848 (save_and_enable_current_matrix): Omit unnecessary casts.
10849 (read_menu_input): Omit local extern decl (now in lisp.h).
10850 Don't access uninitialized storage if mouse_get_xy fails.
10851 (tty_menu_activate): Mark local as initialized, for lint.
10852 (tty_menu_activate, tty_meny_show): Remove unused locals.
10853
10854 2013-10-08 Eli Zaretskii <eliz@gnu.org>
10855
10856 Support menus on text-mode terminals.
10857 * xterm.h (xw_popup_dialog): Add prototype.
10858
10859 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
10860 (xmenu_show): Block input here, instead in Fx_popup_menu.
10861 (xw_popup_dialog): New function, with X-specific bits of popup
10862 dialogs.
10863
10864 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
10865 New functions.
10866
10867 * window.c (Fset_window_configuration): Use run-time tests of the
10868 frame type instead of compile-time conditionals, when menu-bar
10869 lines are considered.
10870
10871 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
10872 (w32_popup_dialog): New prototypes.
10873
10874 * w32menu.c (Fx_popup_dialog): Function deleted.
10875 (w32_popup_dialog): New function, with w32 specific bits of popup
10876 dialogs. Block input here.
10877
10878 * w32inevt.c (w32_console_read_socket): Minor change to add
10879 debugging TTY events.
10880
10881 * w32fns.c (show_hourglass): If returning early because the frame
10882 is not a GUI frame, unblock input.
10883
10884 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
10885 (cursorY): New functions.
10886
10887 * termhooks.h (cursorX, cursorY): Prototypes of functions on
10888 WINDOWSNT, macros that call curX and curY elsewhere.
10889
10890 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
10891
10892 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
10893 specific function to hide and show cursor on a text-mode terminal.
10894 (tty_menu_struct, struct tty_menu_state): New structures.
10895 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
10896 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
10897 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
10898 (tty_menu_locate, save_and_enable_current_matrix)
10899 (restore_desired_matrix, screen_update, read_menu_input)
10900 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
10901 (tty_pop_down_menu, tty_menu_last_menubar_item)
10902 (tty_menu_new_item_coords, tty_menu_show): New functions.
10903 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
10904
10905 * nsterm.h (ns_popup_dialog): Adjust prototype.
10906
10907 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
10908 of in x-popup-menu.
10909 (ns_popup_dialog): Adapt order of arguments to the other
10910 *_menu_show implementations.
10911 (Fx_popup_dialog): Function deleted.
10912
10913 * msdos.c (x_set_menu_bar_lines): Delete unused function.
10914
10915 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
10916
10917 * menu.c (have_boxes): New function.
10918 (single_keymap_panes): Use it instead of a compile-time
10919 conditional.
10920 (single_menu_item): Use run-time tests of the frame type instead
10921 of compile-time conditionals.
10922 (encode_menu_string): New function.
10923 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
10924 the macro, since different types of frame need different encoding
10925 of menu items.
10926 (digest_single_submenu): Use run-time tests of frame type instead
10927 of, or in addition to, compile-time conditionals.
10928 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
10929 (Fx_popup_menu): Detect when the function is called from keyboard
10930 on a TTY. Don't barf when invoked on a text-mode frame.
10931 Check frame type at run time, instead of compile-time conditionals for
10932 invoking terminal-specific menu-show functions.
10933 Call tty_menu_show on text-mode frames.
10934 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
10935 run time to determine which alternative to invoke; support dialogs
10936 on TTYs.
10937
10938 * keyboard.h <Qmouse_movement>: Declare.
10939
10940 * keyboard.c <Qmouse_movement>: Now extern.
10941 <Qecho_keystrokes>: New static variable.
10942 (read_key_sequence): Accept an additional argument, a flag to
10943 prevent redisplay during reading of the key sequence. All callers
10944 changed.
10945 (read_menu_command): New function.
10946 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
10947 autosave.
10948 (toolkit_menubar_in_use): New function.
10949 (make_lispy_event): Use it instead of a compile-time test.
10950
10951 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
10952 window-system being available.
10953
10954 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
10955 to x-popup-dialog on the frame type, they all now support popup
10956 dialogs.
10957
10958 * dispnew.c (save_current_matrix): Save the margin areas.
10959 (restore_current_matrix): Restore margin areas.
10960 (update_frame_with_menu): New function.
10961
10962 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
10963 Add prototypes.
10964
10965 * alloc.c (make_save_ptr): Now compiled unconditionally.
10966
10967 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10968
10969 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
10970 (redraw_frame, update_frame): Adjust users.
10971 * dispextern.h (set_window_update_flags): Adjust prototype.
10972 * xdisp.c (redisplay_internal): When updating all frames with zero
10973 windows_or_buffers_changed, assume that only the windows that shows
10974 current buffer should be really updated.
10975
10976 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10977
10978 Do not allocate huge temporary memory areas and objects while encoding
10979 for file I/O, thus reducing an enormous memory usage for large buffers.
10980 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
10981 * coding.h (struct coding_system): New member raw_destination.
10982 * coding.c (setup_coding_system): Initialize it to zero.
10983 (encode_coding_object): If raw_destination is set, do not create
10984 dst_object. Add comment.
10985 * fileio.c (toplevel): New constant E_WRITE_MAX.
10986 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
10987 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
10988
10989 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
10990
10991 * nsterm.m (windowDidExitFullScreen:)
10992 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
10993
10994 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10995
10996 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
10997 * keyboard.c (unblock_input_to): Don't process pending signals
10998 if a fatal error is in progress.
10999
11000 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
11001 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
11002 they're talking about words in Lisp bool vectors.
11003 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
11004 * data.c (popcount_bits_word): Rename from popcount_size_t.
11005 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
11006 All uses changed.
11007
11008 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
11009
11010 Improve support for popcount and counting trailing zeros (Bug#15550).
11011 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
11012 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
11013 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
11014 (popcount_size_t_msc, popcount_size_t_gcc):
11015 Remove; now done by Gnulib.
11016 (popcount_size_t): Now a macro that defers to Gnulib.
11017 (count_trailing_zero_bits): Return int, for consistency with
11018 Gnulib and because Emacs prefers signed to unsigned int.
11019 Don't assume that size_t is either unsigned int or unsigned long
11020 or unsigned long long.
11021 (size_t_to_host_endian): Do not assume that size_t is either
11022 exactly 32 or exactly 64 bits wide.
11023 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
11024 etc., so that it's now an enum constant, not a macro.
11025 No need to assume that it's either 32 or 64.
11026
11027 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
11028
11029 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
11030 on >= 10.7.
11031
11032 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
11033
11034 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
11035 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
11036
11037 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 emacs_read and emacs_write now use void *, not char *.
11040 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
11041 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
11042 Buffer arg is now void *, not char *. This matches plain
11043 'read' and 'write' better, and avoids a constraint violation
11044 on Solaris 9 with Oracle Studio.
11045
11046 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
11047
11048 * alloc.c (Fmake_string): For ASCII char initializer, prefer
11049 memset to explicit loop. Otherwise copy largest possible chunk
11050 from initialized to uninitialized part, thus allowing the longer
11051 memcpy runs and reducing the number of loop iterations.
11052
11053 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
11054
11055 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
11056 hide toolbar (Bug#15388).
11057 (windowDidEnterFullScreen:): If presentation options are zero,
11058 set them here (Bug#15388).
11059 (ns_update_auto_hide_menu_bar): Remove runtime check.
11060 Don't auto hide dock unless menubar is also auto hidden.
11061
11062 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
11063
11064 * editfns.c (message): Mention batch mode in doc string.
11065
11066 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
11067
11068 * nsterm.m (check_native_fs): Remove erroneous comment.
11069
11070 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
11071
11072 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
11073 uses find_newline instead of scan_newline and so doesn't move point.
11074
11075 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
11076
11077 Use hardware support for byteswapping on glibc x86 etc.
11078 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
11079 whereas the old swap64 needed 30.
11080 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
11081 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
11082 Use byteswap.h's macros to swap bytes.
11083 * lisp.h (swap16, swap32, swap64): Remove.
11084 All uses replaced by bswap_16, bswap_32, bswap_64.
11085
11086 * bytecode.c (exec_byte_code): Use some more volatile variables
11087 to work around local variables getting clobbered by longjmp.
11088 Port to pre-C99, which doesn't allow decls after stmts.
11089
11090 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
11091
11092 * lisp.h (eassert): Assume that COND is true when optimizing.
11093 In other words, take on the behavior of eassert_and_assume.
11094 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
11095 (eassert_and_assume): Remove. All uses replaced by eassert.
11096
11097 * xdisp.c (Qglyphless_char): Now static.
11098
11099 Adjust to merge from gnulib.
11100 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
11101 * lisp.h: Include <verify.h>, for 'assume'.
11102
11103 * eval.c (clobbered_eassert): New macro.
11104 (internal_catch, internal_condition_case)
11105 (internal_condition_case_1, internal_condition_case_2)
11106 (internal_condition_case_n): Use it instead of eassert
11107 when the argument contains locals clobbered by longjmp.
11108 Don't use clobbered locals outside of clobbered_eassert.
11109 (internal_lisp_condition_case): Use a volatile variable
11110 to work around a local variable's getting clobbered.
11111
11112 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11113
11114 * lisp.h (struct handler): Merge struct handler and struct catchtag.
11115 (PUSH_HANDLER): New macro.
11116 (catchlist): Remove.
11117 (handlerlist): Always declare.
11118
11119 * eval.c (catchlist): Remove (merge with handlerlist).
11120 (handlerlist, lisp_eval_depth): Not static any more.
11121 (internal_catch, internal_condition_case, internal_condition_case_1)
11122 (internal_condition_case_2, internal_condition_case_n):
11123 Use PUSH_HANDLER.
11124 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
11125 handlerlist/catchlist.
11126 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
11127 handlerlist which can only handle a single condition-case handler at
11128 a time.
11129 (find_handler_clause): Simplify since we only a single branch here
11130 any more.
11131
11132 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
11133 and Bpophandler.
11134 (bcall0): New function.
11135 (exec_byte_code): Add corresponding cases. Improve error message when
11136 encountering an invalid byte-code. Let Bunwind_protect accept
11137 a function (rather than a list of expressions) as argument.
11138
11139 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
11140 and make them unconditional now that they're heap-allocated.
11141
11142 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11143
11144 * charset.c (Fdecode_char, Fencode_char): Remove description of
11145 `restriction' arg. now that it's hidden by advertised-calling-convention.
11146
11147 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
11148
11149 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
11150 Remove unused variable (from mac-port).
11151 (macfont_draw): Use s->ybase for correct y position.
11152
11153 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11154
11155 * frame.h (struct frame): Drop has_minibuffer member because...
11156 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
11157 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
11158
11159 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11160
11161 * window.h (struct window): Prefer enum text_cursor_kinds to int
11162 for phys_cursor_type member. Move the latter, phys_cursor_width,
11163 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
11164 * window.c (replace_window, make_window): Adjust users.
11165
11166 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
11167
11168 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
11169 this module is never compiled otherwise.
11170
11171 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
11172
11173 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
11174 (Bug#15500).
11175
11176 2013-09-29 Eli Zaretskii <eliz@gnu.org>
11177
11178 * xdisp.c (get_next_display_element): Don't call face_for_font in
11179 a build configured --without-x. (Bug#15484)
11180
11181 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
11182
11183 * window.c (calc_absolute_offset): #elif should be #elif defined.
11184
11185 * frame.c (delete_frame): Block/unblock input to overcome race
11186 condition (Bug#15475).
11187
11188 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
11189
11190 * frame.c (delete_frame): Record selected frame only after
11191 calling Qdelete_frame_functions (Bug#15477).
11192
11193 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
11194
11195 * nsterm.m (ns_selection_color): Remove.
11196 (ns_get_color): Check for ns_selection_(fg|bg)_color using
11197 NSColor selectedText(Background)Color. Only for COCOA.
11198 (ns_term_init): Remove assignment of ns_selection_color, logic
11199 moved to ns_get_color.
11200
11201 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
11202 NS_SELECTION_COLOR_DEFAULT.
11203 (NS_SELECTION_FG_COLOR_DEFAULT): New.
11204
11205 2013-09-28 Eli Zaretskii <eliz@gnu.org>
11206
11207 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
11208 frame' does not have the tool_bar_window member.
11209
11210 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
11211
11212 Signal error when reading an empty byte-code object (Bug#15405)
11213 * lread.c (read1): Signal error.
11214 * alloc.c (make_byte_code): eassert header size.
11215 (sweep_vectors): Change an int to size_t.
11216
11217 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11218
11219 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
11220 instead of ints, as it's the usual style for offsetof constants. See:
11221 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
11222
11223 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
11224 This is ugly, but it should fix the performance problem for older
11225 GCC versions in the short run. I'll look into integrating the
11226 Gnulib module for popcount, as a better fix.
11227 See the thread starting in:
11228 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
11229 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
11230 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
11231 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
11232 (popcount_size_t): Use it.
11233
11234 2013-09-24 Daniel Colascione <dancol@dancol.org>
11235
11236 * process.c (Fnetwork_interface_info): Fix build break due to
11237 vector changes.
11238
11239 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11240
11241 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
11242 Prefer signed to unsigned integers where either will do.
11243 No need for 'const' on locals that do not escape.
11244 Omit easserts with unnecessary and unportable assumptions about
11245 alignment. Avoid unnecessary casts to char *.
11246
11247 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11248
11249 Use union for the payload of struct Lisp_Vector.
11250 This helps to avoid a few glitches dictated by C's aliasing rules.
11251 * lisp.h (struct Lisp_Vector): Use union for next and
11252 contents member. Adjust comment. Change related users.
11253 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
11254 Related users changed.
11255 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
11256 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
11257 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
11258 * xfaces.c, xfont.c, xmenu.c: Related users changed.
11259
11260 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11261
11262 Optimize glyph row clearing and copying routines.
11263 * dispextern.h (struct glyph_row): Change layout of struct
11264 glyph_row to help copy_row_except_pointers. Adjust comment.
11265 * dispnew.c (null_row): Remove.
11266 (clear_glyph_row): Use offsetof and memset to find and clear
11267 just the members that need clearing. Adjust comment.
11268 (copy_row_except_pointers): Likewise for copying.
11269
11270 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11271
11272 Some minor cleanups of recently-added bool vector code.
11273 * conf_post.h (assume): Always return void. Use lint version
11274 only if GCC and MSC versions don't apply.
11275 * conf_post.h (assume):
11276 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
11277 Depend on _MSC_VER, not __MSC_VER, for consistency with
11278 the rest of Emacs.
11279 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
11280 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
11281 (bool_vector_binop_driver, count_trailing_zero_bits)
11282 (size_t_to_host_endian): Now static, not static inline;
11283 the latter isn't needed with modern compilers and doesn't
11284 work with older compilers anyway.
11285
11286 * alloc.c (valgrind_p): Use bool for boolean.
11287
11288 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11289
11290 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
11291 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
11292 (display_last_displayed_message_p, message_buf_print)
11293 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
11294 Use bool for boolean.
11295 * dispextern.h (cancel_line, init_desired_glyphs):
11296 Remove ancient leftover.
11297 (help_echo_showing_p, hourglass_shown_p):
11298 * lisp.h (noninteractive_need_newline): Adjust declaration.
11299
11300 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11301
11302 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11303 Move to...
11304 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11305 ...this file and convert the latter to static. Adjust comment.
11306 (make_initial_frame):
11307 * window.c (init_window_once): Adjust user.
11308 * frame.h (last_nonminibuf_frame): Remove declaration.
11309 * lisp.h (selected_frame): Likewise.
11310 * msdos.c (the_only_display_info): Adjust comment.
11311
11312 2013-09-23 Eli Zaretskii <eliz@gnu.org>
11313
11314 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
11315 computing the end column of mouse-highlight that comes from
11316 display or overlay strings. (Bug#15437)
11317 (note_mouse_highlight): Adapt calculation of last argument to
11318 mouse_face_from_string_pos to the above change.
11319
11320 * conf_post.h (__has_builtin): Define to zero, if undefined, on
11321 all platforms, not just for clang.
11322
11323 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
11324
11325 * filelock.c (lock_file_1): Rearrange to remove compiler warning
11326 about excess arguments to snprintf.
11327
11328 * conf_post.h(assume): Use __builtin_unreachable for clang.
11329
11330 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
11331
11332 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
11333 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
11334
11335 2013-09-23 Daniel Colascione <dancol@dancol.org>
11336
11337 * alloc.c (USE_VALGRIND): New macro; on by default
11338 when ENABLE_CHECKING.
11339 (mark_maybe_object, mark_maybe_pointer)
11340 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
11341 valgrind purposes.
11342 (valgrind_p) [USE_VALGRIND]: New variable.
11343 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
11344
11345 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
11346
11347 * process.c (wait_reading_process_output): Change int pnamelen to
11348 socklen_t.
11349
11350 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
11351 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
11352 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
11353 argument to unsigned long to avoid warning.
11354 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
11355
11356 * conf_post.h (assume): Fix compiler error: x shall be cond.
11357
11358 2013-09-22 Daniel Colascione <dancol@dancol.org>
11359
11360 * xfns.c (x_get_monitor_attributes): Suppress unused variable
11361 warning when compiling without a window system.
11362
11363 2013-09-22 Daniel Colascione <dancol@dancol.org>
11364
11365 * data.c (Qbool_vector_p): New symbol.
11366 (bool_vector_spare_mask, popcount_size_t_generic)
11367 (popcount_size_t_msc, popcount_size_t_gcc)
11368 (popcount_size_t)
11369 (bool_vector_binop_driver)
11370 (count_trailing_zero_bits, size_t_to_host_endian)
11371 (Fbool_vector_exclusive_or)
11372 (Fbool_vector_union)
11373 (Fbool_vector_intersection, Fbool_vector_set_difference)
11374 (Fbool_vector_subsetp, Fbool_vector_not)
11375 (Fbool_vector_count_matches)
11376 (Fbool_vector_count_matches_at): New functions.
11377 (syms_of_data): Intern new symbol, functions.
11378 * alloc.c (bool_vector_payload_bytes): New function.
11379 (Fmake_bool_vector): Instead of calling Fmake_vector,
11380 which performs redundant initialization and argument checking,
11381 just call allocate_vector ourselves. Make sure we clear any
11382 terminating padding to zero.
11383 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
11384 instead of open-coding the size calculation.
11385 (vroundup_ct): New macro.
11386 (vroundup): Assume argument >= 0; invoke vroundup_ct.
11387 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
11388 * composite.c (composition_gstring_put_cache):
11389 Change lint_assume to assume.
11390 * conf_post.h (assume): New macro.
11391 (lint_assume): Remove.
11392 * dispnew.c (update_frame_1): Change lint_assume to assume.
11393 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
11394 to assume.
11395 * image.c (gif_load): Change lint_assume to assume.
11396 * lisp.h (eassert_and_assume): New macro.
11397 (Qbool_vector_p): Declare.
11398 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
11399 (swap16, swap32, swap64): New inline functions.
11400 * macfont.m (macfont_shape): Change lint_assume to assume.
11401 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
11402 * xsettings.c (parse_settings): Use new swap16 and
11403 swap32 from lisp.h instead of file-specific macros.
11404
11405 2013-09-22 Eli Zaretskii <eliz@gnu.org>
11406
11407 * xdisp.c (try_window_id): Don't abort if cursor row could not be
11408 found (which can legitimately happen when the glyph row at the
11409 window start is disabled in the current_matrix. (Bug#15365)
11410
11411 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
11412
11413 Fix syntax.h bug introduced by recent INLINE change.
11414 syntax.h defined an extern inline function SYNTAX_ENTRY that was
11415 conditionally compiled one way in some modules, and a different
11416 way in others. This doesn't work with extern inline functions,
11417 which must have the same definition in all modules, because the
11418 defining code might be shared across modules, depending on the
11419 implementation. Symptoms reported by Martin Rudalics in:
11420 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
11421 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
11422 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
11423 overriding the corresponding functions in syntax.h.
11424 * syntax.h (syntax_property_entry, syntax_property_with_flags)
11425 (syntax_property): New inline functions.
11426 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
11427 Rewrite in terms of these new functions.
11428
11429 2013-09-21 Eli Zaretskii <eliz@gnu.org>
11430
11431 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
11432 not chars_in_text, whose result depends on the multibyteness of
11433 the current buffer. (Bug#15426)
11434
11435 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
11436
11437 Port recent change to hosts where pointers aren't 'long'.
11438 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
11439 Don't assume that pointers are the same width as 'long'.
11440 Add a compile-time check that a pointer fits into two X slots.
11441
11442 A simpler, centralized INLINE.
11443 * conf_post.h (INLINE): Define only if not already defined.
11444 This allows us to use a single INLINE, defined by one file
11445 per executable.
11446 * emacs.c (INLINE): Define it.
11447 Also, include category.h, charset.h, composite.h, dispextern.h,
11448 syntax.h, systime.h, so that their INLINE definitions are expanded
11449 properly for Emacs.
11450 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
11451 * buffer.h, buffer.c (BUFFER_INLINE):
11452 * category.h, category.c (CATEGORY_INLINE):
11453 * character.h, character.c (CHARACTER_INLINE):
11454 * charset.h, charset.c (CHARSET_INLINE):
11455 * composite.h, composite.c (COMPOSITE_INLINE):
11456 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
11457 * frame.h, frame.c (FRAME_INLINE):
11458 * intervals.h, intervals.c (INTERVALS_INLINE):
11459 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
11460 * lisp.h, alloc.c (LISP_INLINE):
11461 * process.h, process.c (PROCESS_INLINE):
11462 * syntax.h, syntax.c (SYNTAX_INLINE):
11463 * systime.h, sysdep.c (SYSTIME_INLINE):
11464 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
11465 * window.h, window.c (WINDOW_INLINE):
11466 Remove. All uses replaced with INLINE.
11467
11468 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
11469
11470 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
11471 to avoid Bug#15398.
11472
11473 2013-09-19 Eli Zaretskii <eliz@gnu.org>
11474
11475 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
11476 'const char *' to avoid compiler warnings due to similar change in
11477 the prototype of x_get_string_resource.
11478
11479 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11480
11481 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
11482 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
11483 going to replace static variables below. Adjust comments.
11484 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
11485 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
11486 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
11487 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
11488 Related users changed.
11489 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
11490 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
11491 last_mouse_movement_time, going to replace static variables below.
11492 Adjust comments.
11493 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
11494 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
11495 Remove.
11496 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
11497 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
11498 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
11499 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
11500 static variables below.
11501 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
11502 (last_mouse_scroll_bar): Remove.
11503 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
11504 (mouseExited): Related users changed.
11505
11506 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11507
11508 Do not use external array to process X scroll bar messages.
11509 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
11510 (x_send_scroll_bar_event): Pack window pointer into two slots
11511 of XClientMessageEvent if we're 64-bit. Adjust comment.
11512 (x_scroll_bar_to_input_event): Unpack accordingly.
11513
11514 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11515
11516 Ifdef away recent changes which aren't relevant to NS port.
11517 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
11518 [!HAVE_NS]: Declare as such.
11519 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
11520 [!HAVE_NS]: Define as such.
11521
11522 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11523
11524 * frame.c (x_redo_mouse_highlight): New function
11525 to factor out common code used in W32 and X ports.
11526 * dispextern.h (x_redo_mouse_highlight): Add prototype.
11527 * xterm.h (struct x_display_info):
11528 * w32term.h (struct w32_display_info):
11529 * nsterm.h (struct ns_display_info): New members
11530 last_mouse_motion_frame, last_mouse_motion_x and
11531 last_mouse_motion_y, going to replace static variables below.
11532 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
11533 (redo_mouse_highlight): Remove.
11534 (note_mouse_movement, syms_of_xterm): Adjust user.
11535 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
11536 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
11537 (redo_mouse_highlight): Remove.
11538 (note_mouse_movement, syms_of_w32term): Adjust user.
11539 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
11540 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
11541 Remove.
11542 (note_mouse_movement, mouseMoved, syms_of_nsterm):
11543 * nsfns.m (compute_tip_xy): Adjust user.
11544
11545 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11546
11547 * frame.c (x_mouse_grabbed): New function.
11548 * dispextern.h (x_mouse_grabbed): Add prototype.
11549 (last_mouse_frame): Remove declaration.
11550 * xterm.h (struct x_display_info):
11551 * w32term.h (struct w32_display_info):
11552 * nsterm.h (struct ns_display_info): New member
11553 last_mouse_frame, going to replace...
11554 * xdisp.c (last_mouse_frame): ...global variable.
11555 (note_tool_bar_highlight):
11556 * w32term.c (w32_mouse_position, w32_read_socket):
11557 * xterm.c (XTmouse_position, handle_one_xevent):
11558 Use x_mouse_grabbed.
11559 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
11560
11561 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11562
11563 * w32term.c (w32_read_socket): Avoid temporary
11564 variables in a call to x_real_positions.
11565 * xterm.c (handle_one_xevent): Likewise.
11566
11567 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11568
11569 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
11570 (x_icon_type): Remove prototype.
11571 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
11572 * frame.c (x_icon_type): Remove.
11573 * w32term.c (x_make_frame_visible, x_iconify_frame):
11574 * xterm.c (x_make_frame_visible, x_iconify_frame):
11575 Use x_set_bitmap_icon to factor out common code.
11576
11577 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11578
11579 * dispextern.h (check_x_display_info, x_get_string_resource):
11580 Declare here just once and unify the latter.
11581 * frame.c (check_x_display_info, x_get_string_resource):
11582 * nsterm.h (check_x_display_info):
11583 * xrdb.c (x_get_string_resource):
11584 * xterm.h (check_x_display_info): Remove prototypes.
11585 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
11586 * w32reg.c (x_get_string_resource): Likewise.
11587 (w32_get_rdb_resource): Adjust user.
11588
11589 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11590
11591 * xterm.h (struct x_display_info): New member
11592 x_pending_autoraise_frame, going to replace...
11593 * xterm.c (pending_autoraise_frame): ...static variable.
11594 (x_new_focus_frame, XTread_socket): Adjust users.
11595 * w32term.h (struct w32_display_info): New member
11596 w32_pending_autoraise_frame, going to replace...
11597 * w32term.c (pending_autoraise_frame): ...global variable.
11598 (x_new_focus_frame, w32_read_socket): Adjust users.
11599
11600 2013-09-17 Glenn Morris <rgm@gnu.org>
11601
11602 * xdisp.c (message_dolog): If we create *Messages*,
11603 switch it to messages-buffer-mode.
11604
11605 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
11606
11607 Don't overuse 'const' in types of locals.
11608 * bidi.c (bidi_count_bytes):
11609 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
11610 (xg_event_is_for_scrollbar):
11611 * xselect.c (x_handle_property_notify)
11612 (x_handle_selection_notify, x_handle_dnd_message):
11613 * xsettings.c, xsettings.h (xft_settings_event):
11614 * xterm.c (x_handle_net_wm_state, handle_one_event)
11615 (x_menubar_window_to_frame, x_detect_focus_change)
11616 (construct_mouse_click, note_mouse_movement)
11617 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11618 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11619 (handle_one_xevent, x_handle_net_wm_state):
11620 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
11621 (x_handle_dnd_message):
11622 Avoid unnecessary 'const', typically the second 'const' in
11623 'const foo * const arg', a 'const' that does not affect the API
11624 and doesn't significantly help the human reader.
11625
11626 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11627
11628 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
11629 only if Glib < 2.36.0.
11630 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
11631 * xsettings.c (init_gconf, init_gsettings): Do not check
11632 for g_type_init.
11633 * xterm.c (handle_one_xevent): Do not call to x_clear_area
11634 if GTK >= 2.7.0.
11635 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
11636
11637 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
11638
11639 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
11640 before calling g_type_init.
11641
11642 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
11643
11644 * nsterm.m (syms_of_nsterm): ... to here.
11645
11646 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11647
11648 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
11649 (ignore_next_mouse_click_timeout): Use Time as X does.
11650 (handle_one_xevent): Avoid cast and use unsigned comparison.
11651
11652 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11653
11654 Do not copy X event in handle_one_xevent except KeyPress case.
11655 Wnen XEvent is processed, it is unlikely to be changed except
11656 KeyPress case, so we can avoid copying and use const pointer to
11657 const data to make sure that an event is not changed elsewhere.
11658 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
11659 const' and do not create local copy except for the KeyPress event.
11660 Use casts to avoid a few glitches. Adjust formatting. Add comments.
11661 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
11662 (x_handle_net_wm_state, x_menubar_window_to_frame)
11663 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
11664 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11665 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
11666 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
11667 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
11668 (x_handle_dnd_message):
11669 * xsettings.c (xft_settings_event):
11670 Use 'const XEvent * const' where appropriate.
11671 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
11672
11673 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11674
11675 Fix X event waiting to handle multiple frames.
11676 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
11677 * xterm.c (pending_event_wait): Remove. Adjust users.
11678 (x_detect_focus_change): Pass frame arg.
11679 (handle_one_xevent): Find related frame early and clear per-frame
11680 wait_event_type only if this is an event for the relevant frame.
11681 (x_wait_for_event): Use per-frame wait_event_type.
11682
11683 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
11684
11685 * nsfns.m (Fx_create_frame): Fix font driver registration for
11686 GNUstep.
11687
11688 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
11689 for syms_of_macfont.
11690
11691 * nsterm.m: Include macfont.h.
11692 (ns_tmp_flags, ns_tmp_font): Remove.
11693 (ns_compute_glyph_string_overhangs): Check for driver Qns.
11694 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
11695 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
11696 (changeFont:): Fix code style. Check for font driver type when
11697 getiing font.
11698
11699 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
11700 (f)->descent.
11701
11702 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
11703 (nsfont_open): Set font driver type.
11704 Set font->ascent and font->descent. Figure out font instead of
11705 ns_tmp_font, and flags instead of ns_tmp_flags.
11706 Fix indentation. Remove call to ns_draw_text_decoration,
11707 moved to nsterm.
11708
11709 * nsfns.m: Include macfont.h.
11710 (Fx_create_frame): Register macfont driver, make a better default font.
11711 (Fns_popup_font_panel): Get font from macfont driver, if used.
11712
11713 * macfont.m, macfont.h, macuvs.h: New files.
11714
11715 * font.h: Declare syms_of_macfont.
11716
11717 * font.c (syms_of_font): Call syms_of_macfont.
11718
11719 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
11720
11721 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11722
11723 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
11724 and it is always zero for others, so I assume that this is an ancient
11725 leftover which nobody will want to change any more.
11726 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
11727 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
11728 * frame.c (x_set_scroll_bar_width):
11729 * w32fns.c (w32_createscrollbar):
11730 * w32term.c (w32_set_vertical_scroll_bar):
11731 * xfns.c (x_set_scroll_bar_default_width):
11732 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
11733 (x_scroll_bar_expose): Related users changed.
11734
11735 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11736
11737 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
11738 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
11739 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
11740 Define as such.
11741 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
11742 Define once here...
11743 * nsterm.h, w32term.h, xterm.h: ...and not here.
11744 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
11745 Remove unused Xisms.
11746 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
11747 these modules are never compiled otherwise.
11748
11749 2013-09-14 Eli Zaretskii <eliz@gnu.org>
11750
11751 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
11752 Doc fix. (Bug#15375)
11753
11754 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11755
11756 Unify Fx_focus_frame between all ports.
11757 * frame.h (x_focus_frame): New prototype.
11758 * xfns.c (Fx_focus_frame): Remove.
11759 (syms_of_xfns): Do not defsubr it.
11760 (x_focus_frame): X implementation.
11761 * nsfns.m (Fx_focus_frame): Remove.
11762 (syms_of_nsfns): Do not defsubr it.
11763 (x_focus_frame): NS implementation.
11764 * w32term.c (Fx_focus_frame): Remove.
11765 (x_focus_on_frame): Rename to...
11766 (x_focus_frame): W32 implementation.
11767 * w32term.h (x_focus_on_frame): Remove prototype.
11768 * w32fns.c (Fx_focus_frame): Remove.
11769 (syms_of_w32fns): Do not defsubr it.
11770 * frame.c (Fx_focus_frame): Define here.
11771 (syms_of_frame): Defsubr here.
11772 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
11773
11774 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11775
11776 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
11777 All of them are replaced with FRAME_DISPLAY_INFO, defined in
11778 each port to reference the port-specific window system data.
11779 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
11780 (FRAME_DISPLAY_INFO): Define.
11781 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
11782 (FRAME_DISPLAY_INFO): Define. Adjust users.
11783 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
11784 (FRAME_DISPLAY_INFO): Define. Adjust users.
11785 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
11786 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
11787 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
11788 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
11789 * xselect.c, xterm.c: All related users changed.
11790
11791 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11792
11793 * xterm.h (x_window_to_frame, x_any_window_to_frame)
11794 (x_menubar_window_to_frame): Remove prototypes.
11795 * xfns.c (x_window_to_frame, x_any_window_to_frame)
11796 (x_menubar_window_to_frame, x_top_window_to_frame):
11797 Move from here...
11798 * xterm.c (x_window_to_frame, x_any_window_to_frame)
11799 (x_menubar_window_to_frame, x_top_window_to_frame):
11800 ...to here and convert all but the last to static.
11801
11802 2013-09-12 Eli Zaretskii <eliz@gnu.org>
11803
11804 * lisp.mk (lisp): Add w32-common-fns.elc.
11805
11806 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
11807
11808 * charset.c (char_charset): Document an exception for char-charset.
11809
11810 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11811
11812 * xterm.h (x_display_info): New field last_user_time...
11813 * xterm.c (toplevel): ...to replace static last_user_time.
11814 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
11815
11816 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11817
11818 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
11819 scroll bar values to prevent thumb from disappear and update comment.
11820
11821 2013-09-11 Glenn Morris <rgm@gnu.org>
11822
11823 * emacs.c (usage_message): Possessive apostrophe tweak.
11824
11825 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11826
11827 * nsterm.m (syms_of_nsterm): Use Qns.
11828 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
11829 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
11830 * xfns.c (x_display_info_for_name, Fx_open_connection):
11831 Remove old '#if 0' code.
11832 (syms_of_xfns): Use Qx.
11833 * termhooks.h (fullscreen_hook): Remove the leftover.
11834 (struct terminal): Fix typo in comment.
11835
11836 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11837
11838 Cleaning up a few X scroll bar bits.
11839 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
11840 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11841 New member last_seen_part, going to replace...
11842 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
11843 (xt_action_hook) [USE_LUCID]: Adjust user.
11844 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
11845 Lucid-specific scroll bar support.
11846 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
11847 to int and adjust to use last_seen_part member.
11848 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
11849 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11850 Initialize last_seen_part.
11851
11852 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11853
11854 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
11855 insert-buffer-substring an empty string.
11856
11857 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11858
11859 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
11860 avoiding a GCC warning.
11861
11862 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11863
11864 Ifdef away frame tool bar code when it is not really used.
11865 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
11866 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
11867 and minimize_tool_bar_window_p under the above.
11868 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
11869 (fset_tool_bar_window): Likewise.
11870 * dispnew.c (clear_current_matrices, clear_desired_matrices)
11871 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
11872 (change_frame_size_1):
11873 * window.c (window_from_coordinates, Frecenter): Adjust users.
11874 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
11875 code is not really used.
11876 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
11877 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
11878 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
11879 [!USE_GTK && !HAVE_NS]: Define as such.
11880 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
11881 (note_mouse_highlight, expose_frame):
11882 * xfns.c (x_set_tool_bar_lines):
11883 * xterm.c (handle_one_xevent): Adjust users.
11884
11885 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11886
11887 Fix corruption with multiple emacsclient -t instances (Bug#15222).
11888 This bug was introduced by my 2013-08-26 patch, which incorrectly
11889 assumed that the terminfo implementation doesn't use termcap buffers.
11890 * term.c (init_tty) [TERMINFO]: Remove optimization, as
11891 these buffers apparently are used after all.
11892 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
11893 (struct tty_display_info): Define members termcap_term_buffer and
11894 termcap_strings_buffer even if TERMINFO.
11895
11896 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11897
11898 Fix last change.
11899 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
11900 'usage' docstring entry to pacify make-docfile.
11901
11902 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
11903
11904 Change comparison functions =, <, >, <=, >= to take many arguments.
11905 * data.c: Change comparison functions' interface and implementation.
11906 * lisp.h: Make arithcompare available for efficient two arg
11907 comparisons.
11908 * bytecode.c: Use arithcompare.
11909 * fileio.c: Use new interface.
11910
11911 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11912
11913 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
11914
11915 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
11916
11917 * eval.c (Feval): Document the new use of `lexical'.
11918
11919 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11920
11921 Review and drop old frame resize hack.
11922 * frame.h (struct frame): Remove force_flush_display_p.
11923 * dispnew.c (update_frame): Adjust user and don't call
11924 flush_frame here. The comment has said that there was an issues
11925 with redisplaying fringes, but I don't see any differences with
11926 and without this hack. Hopefully we can continue without it.
11927 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
11928 current frame matrices twice if resized_p is set.
11929
11930 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11931
11932 Do not populate pure Xism x_sync to other ports.
11933 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
11934 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
11935 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
11936 * w32term.h (x_sync): Remove prototype.
11937
11938 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11939
11940 Cleanup frame flushing.
11941 * dispextern.h (struct redisplay_interface):
11942 Drop flush_display_optional because flush_display is enough
11943 for X and flushing via RIF is just a no-op for others.
11944 * frame.h (flush_frame): New function.
11945 * dispnew.c (update_frame):
11946 * minibuf.c (read_minibuf):
11947 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
11948 Use it.
11949 * keyboard.c (detect_input_pending_run_timers): Do not flush
11950 all frames but selected one in redisplay_preserve_echo_area.
11951 * nsterm.m (ns_flush): Remove no-op.
11952 (ns_redisplay_interface): Adjust user.
11953 * w32term.h (x_flush): Remove no-op.
11954 (w32_redisplay_interface): Adjust user.
11955 * xterm.c (x_flush): Simplify because we do not flush all
11956 frames at once any more. Adjust comment.
11957 (x_redisplay_interface): Adjust user.
11958
11959 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
11960
11961 Port --without-x --enable-gcc-warnings to Fedora 19.
11962 * gfilenotify.c (globals_of_gfilenotify):
11963 Call g_type_init only if using an older glib version that needs it.
11964
11965 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11966
11967 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11968 (last_glyphless_glyph_merged_face_id): Remove declarations.
11969 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
11970 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11971 (last_glyphless_glyph_merged_face_id): Now static.
11972 (merge_escape_glyph_face): New function, refactored from...
11973 (get_next_display_element): ...here.
11974 (merge_glyphless_glyph_face): New function, refactored from...
11975 (produce_glyphless_glyph): ...here...
11976 * term.c (produce_glyphless_glyph): ...and here.
11977
11978 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
11979
11980 * eval.c (eval_sub): Only call Ffunction if necessary.
11981
11982 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11983
11984 Attempt to make redisplay more selective when changing cursor type.
11985 * frame.h (struct frame): New bitfield cursor_type_changed.
11986 * xdisp.c (cursor_type_changed): Remove.
11987 (try_cursor_movement, redisplay_window, try_window_id)
11988 (set_frame_cursor_types, try_window_reusing_current_matrix):
11989 Adjust to use per-frame bitfield.
11990 (redisplay_internal): Look for cursor type change on each visible
11991 frame and consider all frames if cursor type has been changed on
11992 the frame other than selected. If cursor type has been changed on
11993 selected frame only, do not use fast update.
11994
11995 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11996
11997 Attempt to make redisplay more selective when changing fonts.
11998 * frame.h (struct frame): New bitfield fonts_changed.
11999 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
12000 (adjust_frame_glyphs): Add prototype.
12001 * dispnew.c (fonts_changed_p): Remove.
12002 (adjust_glyphs): Remove because we do not
12003 adjust matrices on all frames at once any more.
12004 (adjust_frame_glyphs): Block and unblock input here.
12005 (adjust_glyph_matrix): Use fonts_changed.
12006 (change_frame_size_1): Use adjust_frame_glyphs.
12007 * font.c (font_open_entity): Use fonts_changed.
12008 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
12009 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
12010 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
12011 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
12012 (shrink_mini_window, Fresize_mini_window_internal)
12013 (window_scroll_pixel_based, Fset_window_configuration)
12014 (apply_window_adjustment, Fset_window_vscroll):
12015 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
12016 Use adjust_frame_glyphs.
12017 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
12018 (try_window_reusing_current_matrix, try_window_id, display_line)
12019 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
12020 (redisplay_internal): Consider fonts_changed and adjust frame
12021 matrices for each frame only if the frame is visible. If font
12022 has been changed on some frame during full redisplay, retry
12023 only visible frames where the font has been actually changed.
12024
12025 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12026
12027 Cache current header and mode line height for each window.
12028 * window.h (struct window): New fields mode_line_height
12029 and header_line_height.
12030 * window.c (make_window): Initialize them.
12031 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
12032 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
12033 (current_mode_line_height, current_header_line_height):
12034 Remove declaration.
12035 * xdisp.c (current_mode_line_height, current_header_line_height):
12036 Remove.
12037 (pos_visible_p, init_xdisp): Adjust user.
12038 (redisplay_window): Invalidate mode_line_height and
12039 header_line_height if current and desired matrices do not agree.
12040
12041 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12042
12043 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
12044 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
12045
12046 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12047
12048 Make --without-x compatible with --enable-gcc-warnings.
12049 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
12050 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
12051 members under HAVE_WINDOW_SYSTEM.
12052 * keyboard.c (make_lispy_focus_out): Likewise.
12053 (record_menu_key): Move under HAVE_MENUS.
12054 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
12055 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
12056 (syms_of_xdisp): Adjust user.
12057 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
12058 (start_hourglass, cancel_hourglass):
12059 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
12060 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
12061 and CLEAR_FONT_TABLE_NFONTS.
12062 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
12063 Declare only if HAVE_WINDOW_SYSTEM.
12064 (lface_same_font_attributes_p, clear_face_gcs): Define only
12065 if HAVE_WINDOW_SYSTEM.
12066
12067 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
12068
12069 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
12070 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
12071 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
12072
12073 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
12074
12075 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
12076
12077 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
12078
12079 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
12080 This fixes a type error on hosts where ptrdiff_t is wider than int.
12081
12082 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
12083
12084 * keyboard.c (read_key_sequence_vs): New function.
12085 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
12086 common code.
12087
12088 * callint.c (Fcall_interactively): Always return a vector for 'K'.
12089
12090 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
12091
12092 Makefile improvements.
12093 * Makefile.in (config.status): Don't use double-colon rules, as
12094 they are not portable according to POSIX. Fix shell typo with `;
12095 I guess this rule has never been tested?
12096 (VCSWITNESS): New macro, to override any environment var.
12097
12098 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
12099
12100 * xterm.h (struct x_display_info): Do not track X connection
12101 fd separately because it is always available from Display.
12102 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
12103 Adjust users.
12104
12105 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12106
12107 * buffer.c (drop_overlay):
12108 * fileio.c (restore_point_unwind): Prefer unchain_marker to
12109 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
12110
12111 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12112
12113 * buffer.c (Fmake_overlay, Fmove_overlay):
12114 * intervals.c (set_point_from_marker):
12115 * print.c (PRINTPREPARE): Prefer signal_error
12116 to plain error and report unsuitable marker too.
12117
12118 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
12119
12120 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
12121 for 'dragging' member.
12122 (struct x_output): Remove set-but-unused leftovers
12123 'left_before_move' and 'top_before_move'.
12124 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
12125 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
12126 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
12127 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
12128 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
12129 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
12130 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
12131 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
12132
12133 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
12134
12135 * nsfont.m (INVALID_GLYPH): New define.
12136 (nsfont_encode_char): Use INVALID_GLYPH.
12137 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
12138
12139 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12140
12141 * xterm.c (x_last_mouse_movement_time): Revert last change.
12142 This code should use XDisplayMotionBufferSize to check display's
12143 motion history first, and there are few other issues as well.
12144 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
12145 (handle_one_xevent): Adjust user.
12146
12147 2013-09-02 Martin Rudalics <rudalics@gmx.at>
12148
12149 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
12150 * frame.c (Flast_nonminibuf_frame): ... to here.
12151 (check_minibuf_window): Don't abort if no window was found
12152 (Bug#15247).
12153
12154 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12155
12156 Use XGetMotionEvents to ask the last mouse motion time from X server.
12157 * xterm.c (X_MOTION_HISTORY): Default to 1.
12158 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
12159 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
12160 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
12161 Ifdef away legacy code.
12162 (XTmouse_position, x_scroll_bar_report_motion):
12163 Use x_last_mouse_movement_time.
12164 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
12165 UnmapNotify event.
12166
12167 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12168
12169 * msdos.c (last_mouse_window): Move to...
12170 (dos_rawgetc): ...this function and adjust comment.
12171 * nsterm.m (last_window): Rename to last_mouse_window, move to...
12172 (mouseMoved): ...this function and adjust comment.
12173 * w32term.c (last_window): Likewise with...
12174 (w32_read_socket): ...this function.
12175 * xterm.c (last_window): Likewise with...
12176 (handle_one_xevent): ...this function.
12177
12178 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12179
12180 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
12181 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
12182 (handle_one_xevent): ...to here.
12183 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
12184 otherwise.
12185
12186 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
12187
12188 * msdos.c (IT_set_terminal_window): Remove no-op.
12189 (initialize_msdos_display): Adjust terminal setup.
12190 * w32console.c (w32con_set_terminal_window): Remove no-op.
12191 (initialize_w32_display): Adjust terminal setup.
12192 * w32term.c (w32_set_terminal_window): Remove no-op.
12193 (w32_create_terminal): Adjust terminal setup.
12194 * xterm.c (XTset_terminal_window): Remove no-op.
12195 (x_create_terminal): Adjust terminal setup.
12196
12197 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
12198
12199 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
12200 Remove no-ops.
12201 (ns_create_terminal): Adjust terminal setup.
12202 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
12203 Remove no-ops.
12204 (w32_create_terminal): Adjust terminal setup.
12205 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
12206 Remove no-ops.
12207 (x_create_terminal): Adjust terminal setup.
12208
12209 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
12210
12211 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
12212 (CLIP_TEXT_POS_FROM_MARKER): New macro.
12213 * dispnew.c (buffer_posn_from_coords):
12214 * window.c (Fwindow_end, displayed_window_lines):
12215 * xdisp.c (redisplay_mode_lines): Use it.
12216
12217 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
12218
12219 * fontset.c (face_for_char): Check char in the current face font first
12220 if HAVE_NS (Bug#15138).
12221
12222 2013-08-31 Martin Rudalics <rudalics@gmx.at>
12223
12224 * window.c (temp_output_buffer_show): Make sure window returned
12225 by display_buffer is live (Bug#15213).
12226
12227 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
12228
12229 Minor cleanup to avoid forward declarations.
12230 * coding.h (struct ccl_spec): Remove forward declaration.
12231 * composite.h (toplevel): Include font.h.
12232 (struct composition_it, struct face, struct font_metrics):
12233 Remove forward declaration.
12234 * dispextern.h (struct image, struct atimer): Likewise.
12235 * emacsgtkfixed.h (struct frame): Likewise.
12236 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
12237 * font.h (struct font_driver, struct font, struct glyph_string)
12238 (struct face): Remove forward declaration.
12239 * fontset.h (struct face, struct font): Likewise.
12240 * frame.h (toplevel): Style cleanup.
12241 (enum output_method): Move to...
12242 * termhooks.h (enum output_method): ...here.
12243 (struct glyph, struct frame, struct ns_display_info)
12244 (struct x_display_info, struct w32_display_info):
12245 Remove forward declaration.
12246 * xterm.h (toplevel): Include termhooks.h.
12247 (struct font, struct window, struct glyph_matrix, struct frame)
12248 (struct input_event, struct face, struct image): Remove forward
12249 declaration.
12250 * gtkutil.h (struct _widget_value): Likewise.
12251 * keyboard.h (toplevel): Include termhooks.h.
12252 (struct input_event): Remove forward declaration.
12253
12254 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12255
12256 * intervals.c (set_point_from_marker): New function.
12257 * editfns.c (Fgoto_char):
12258 * process.c (Finternal_default_process_filter):
12259 * window.c (select_window_1): Use it.
12260 * buffer.h (set_point_from_marker): Add prototype.
12261
12262 2013-08-29 Eli Zaretskii <eliz@gnu.org>
12263
12264 * w32.c (term_winsock): Call release_listen_threads before calling
12265 WSACleanup.
12266 (_sys_wait_accept): Wait for accept event in a loop with a finite
12267 timeout, instead of waiting indefinitely. Will hopefully avoid
12268 hanging during exit because WSACleanup deadlocks waiting for the
12269 event object to be released. (Bug#14333)
12270
12271 * w32proc.c (release_listen_threads): New function, signals all
12272 the reader threads that listen for connections to stop waiting.
12273
12274 * w32.h (release_listen_threads): Add prototype.
12275
12276 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12277
12278 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
12279 field of new marker (for sanity and safety).
12280 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
12281 anyway because XMISCTYPE is a function and can't be an lvalue).
12282
12283 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12284
12285 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
12286 (x_after_update_window_line, x_scroll_bar_create)
12287 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
12288 (handle_one_xevent, x_clear_frame_area):
12289 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
12290 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
12291 * xterm.h (x_clear_area): Adjust prototype.
12292
12293 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12294
12295 Hook scanning and indentation functions to find_newline. This helps
12296 to avoid duplicated code and renders more respect to newline cache.
12297 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
12298 * cmds.c (Fforward_line):
12299 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
12300 Use find_newline and avoid unnecessary point movements.
12301 * search.c (scan_newline): Implement on top of find_newline.
12302
12303 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
12304
12305 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
12306 scoped code (bug#11258).
12307
12308 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
12309
12310 * nsterm.m (last_window): New variable.
12311 (EV_TRAILER2): New macro.
12312 (EV_TRAILER): Call EV_TRAILER2.
12313 (mouseMoved:): Add support for mouse-autoselect-window
12314 on nextstep (Bug#6888).
12315
12316 2013-08-28 Andreas Schwab <schwab@suse.de>
12317
12318 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
12319 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
12320 Remove unused macro definitions.
12321 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
12322 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
12323 Only define if emacs.
12324
12325 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12326
12327 Prefer enum glyph_row_area to int where appropriate.
12328 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
12329 Fix comment.
12330 (window_box, window_box_width, window_box_left, window_box_left_offset)
12331 (window_box_right, window_box_right_offset): Adjust prototypes.
12332 * xdisp.c (window_box, window_box_width, window_box_left)
12333 (window_box_left_offset, window_box_right, window_box_right_offset):
12334 Use enum glyph_row_area. Adjust users and tweak comment where needed.
12335 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
12336 * nsterm.m (ns_clip_to_row):
12337 * w32term.c (w32_clip_to_row):
12338 * xterm.c (x_clip_to_row): Likewise.
12339
12340 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12341
12342 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
12343 (Fprevious_overlay_change): Fast path for buffer with no overlays.
12344
12345 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
12346
12347 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
12348 for portability to hosts where /bin/sh has problems.
12349
12350 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12351
12352 Redesign redisplay interface to drop global output_cursor.
12353 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
12354 (toplevel): Remove declaration of output_cursor.
12355 (set_output_cursor, x_cursor_to): Remove prototype.
12356 * window.h (struct window): New member output_cursor.
12357 (output_cursor_to): New function to replace RIF member.
12358 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
12359 (update_text_area, set_window_cursor_after_update): Use it.
12360 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
12361 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12362 * nsterm.m (ns_update_window_begin, ns_update_window_end):
12363 * w32term.c (x_update_window_begin, x_update_window_end):
12364 * xterm.c (x_update_window_begin, x_update_window_end):
12365 Adjust to use per-window output cursor.
12366
12367 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
12368
12369 Simplify SELECT_TYPE-related code.
12370 Like EMACS_TIME, this portability layer is no longer needed, since
12371 Emacs has been using fd_set as a portability layer for some time.
12372 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
12373 (SELECT_TYPE): Remove. All uses changed to fd_set.
12374 (fd_set) [!FD_SET]: New typedef.
12375
12376 Simplify EMACS_TIME-related code.
12377 This portability layer is no longer needed, since Emacs has been
12378 using struct timespec as a portability layer for some time.
12379 * atimer.h, buffer.h, dispextern.h, xgselect.h:
12380 Include <time.h> rather than "systime.h"; that's all that's needed now.
12381 * dispnew.c: Include <timespec.h> rather than "systime.h";
12382 that's all that's needed now.
12383 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
12384 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
12385 TIMESPEC_RESOLUTION.
12386 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
12387 LOG10_TIMESPEC_RESOLUTION.
12388 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
12389 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
12390 (make_emacs_time): Remove. All used changed to make_timespec.
12391 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
12392 (current_timespec): Rename from current_emacs_time. All uses changed.
12393 (add_emacs_time): Remove. All uses changed to timespec_add.
12394 (sub_emacs_time): Remove. All uses change dot timespec_sub.
12395 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
12396 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
12397 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
12398 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
12399 (current_timespec): Rename from current_emacs_time. All uses changed.
12400 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
12401 changed to timespec_cmp.
12402 * xgselect.c: Include <timespec.h>, since our .h files don't.
12403
12404 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12405
12406 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
12407 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
12408 Remove the leftovers.
12409 * gtkutil.c (toplevel): Do not declare Qxft but include
12410 font.h to do so.
12411 * image.c (toplevel): Do not declare Vlibrary_cache because
12412 it's already done in lisp.h.
12413
12414 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12415
12416 * lisp.h (Mouse_HLInfo): Move from here...
12417 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
12418 (reset_mouse_highlight): New function.
12419 * msdos.c (dos_set_window_size, IT_update_begin)
12420 (internal_terminal_init):
12421 * nsterm.m (ns_update_window_end, x_free_frame_resources)
12422 (ns_initialize_display_info):
12423 * w32console.c (initialize_w32_display):
12424 * w32term.c (x_update_window_end, x_free_frame_resources)
12425 (w32_initialize_display_info):
12426 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
12427 * window.c (Fdelete_other_windows_internal):
12428 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
12429 * termchar.h (toplevel):
12430 * xterm.h (toplevel): Include dispextern.h.
12431
12432 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12433
12434 Fix minor problems found by static checking.
12435 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
12436 (expect): Avoid nested-if warning.
12437 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
12438 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
12439 * nsterm.h, nsterm.m (ns_select):
12440 * xgselect.c, xgselect.h (xg_select):
12441 Adjust signature to better match pselect's.
12442 * nsterm.m (ns_select):
12443 Don't set *TIMEOUT, since pselect doesn't.
12444 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
12445 diagnostic about assigning const char * to it.
12446 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
12447
12448 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
12449
12450 * lread.c (substitute_object_recurse): Handle hash-tables as well
12451 (bug#15190).
12452
12453 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12454
12455 Fix unlikely core dump in init_tty, and simplify terminfo case.
12456 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
12457 The old version incorrectly dumped core if malloc returned a
12458 buffer containing only non-NUL bytes.
12459 (init_tty): Do not allocate or free termcap buffers; the
12460 struct does that for us now.
12461 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
12462 (struct tty_display_info): Define members termcap_term_buffer and
12463 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
12464 use them. Allocate them directly in struct rather than indirectly
12465 via a pointer, to simplify init_tty.
12466
12467 * frame.c (check_minibuf_window): Initialize 'window' properly,
12468 so that Emacs reliably aborts later if 'window' is not initialized.
12469
12470 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
12471
12472 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
12473 of VoidSymbol (Bug#15154).
12474
12475 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12476
12477 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
12478 mouse_face_beg_y and mouse_face_end_y.
12479 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
12480 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
12481 Adjust users and update comment where appropriate.
12482
12483 2013-08-26 Martin Rudalics <rudalics@gmx.at>
12484
12485 * frame.c (check_minibuf_window): New function.
12486 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
12487 Call check_minibuf_window (Bug#15183).
12488
12489 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12490
12491 * window.h (struct window): Replace last_cursor with last_cursor_vpos
12492 because this is the only last cursor data we need to keep and consult.
12493 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
12494 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
12495 Adjust users.
12496
12497 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12498
12499 Fix recovering from possible decompression error.
12500 Since insert_from_gap doesn't always move point, we can't use PT as
12501 the position where the partially decompressed data ends, and
12502 should count how many bytes was produced so far.
12503 * decompress.c (struct decompress_unwind_data): Add nbytes member.
12504 (unwind_decompress): Really delete partially uncompressed data.
12505 (Fzlib_decompress_region): Take decompressed data size into account.
12506
12507 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12508
12509 * syntax.c (init_syntax_once): Adjust comment and do an early
12510 initialization of Qchar_table_extra_slots just once...
12511 * casetab.c (init_casetab_once):
12512 * category.c (init_category_once):
12513 * character.c (syms_of_character):
12514 * coding.c (syms_of_coding):
12515 * xdisp.c (syms_of_xdisp): ...and omit it here.
12516
12517 2013-08-24 Eli Zaretskii <eliz@gnu.org>
12518
12519 * xdisp.c (get_next_display_element): Don't apply to characters
12520 from a display vector the logic of setting it->end_of_box_run_p
12521 suitable for characters from a buffer. (Bug#15175)
12522
12523 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
12524 to handle directories, rather than '_utime' which doesn't.
12525 (Bug#15176)
12526
12527 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
12528
12529 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
12530 or fullscreen (Bug#14627).
12531
12532 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
12533
12534 System-dependent integer overflow fixes.
12535 * process.c (Fset_process_window_size): Signal an error if
12536 the window size is outside the range supported by the lower level.
12537 * sysdep.c (set_window_size): Return negative on error,
12538 nonnegative on success, rather than -1, 0, 1 on not in system,
12539 failure, success. This is simpler. Caller changed.
12540 (serial_configure): Remove unnecessary initialization of local.
12541 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
12542 size fits in unsigned long; this isn't true on some 32-bit hosts.
12543 Avoid buffer overrun if some future version of /proc/meminfo has a
12544 variable name longer than 20 bytes.
12545 (system_process_attributes) [__FreeBSD__]:
12546 Don't assume hw.availpages fits in 'int'.
12547
12548 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
12549
12550 Don't let very long directory names overrun the stack.
12551 Fix some related minor problems involving "//", vfork.
12552 * callproc.c (encode_current_directory): New function.
12553 (call_process): Don't append "/"; not needed.
12554 * fileio.c (file_name_as_directory_slop): New constant.
12555 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
12556 this can save the caller having to alloca.
12557 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
12558 Use SAFE_ALLOCA, not alloca.
12559 (directory_file_name, Fexpand_file_name): Leave leading "//"
12560 alone, since it can be special even on POSIX platforms.
12561 * callproc.c (call_process):
12562 * process.c (Fformat_network_address):
12563 * sysdep.c (sys_subshell):
12564 Use encode_current_directory rather than rolling our own.
12565 (create_process): No need to encode directory; caller does that now.
12566 * process.h (encode_current_directory): New decl.
12567 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
12568 Rework to avoid 'goto xyzzy;'.
12569
12570 2013-08-23 Eli Zaretskii <eliz@gnu.org>
12571
12572 * xdisp.c (handle_face_prop): If the default face was remapped use
12573 the remapped face for strings from prefix properties. (Bug#15155)
12574
12575 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12576
12577 Minor cleanup for redisplay interface and few related functions.
12578 * frame.h (enum text_cursor_kinds): Move from here...
12579 * dispextern.h (enum text_cursor_kinds): ...to here.
12580 (toplevel): Drop unnecessary declarations.
12581 (struct redisplay_interface): Use bool and enum text_cursor_kinds
12582 in update_window_end_hook and draw_window_cursor functions.
12583 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
12584 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
12585 * w32term.c (x_update_window_end, w32_draw_window_cursor):
12586 * xterm.c (x_update_window_end, x_draw_window_cursor):
12587 * xdisp.c (display_and_set_cursor, update_window_cursor)
12588 (update_cursor_in_window_tree, x_update_cursor): Use bool and
12589 enum text_cursor_kinds where appropriate.
12590
12591 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12592
12593 Redesign redisplay interface to drop updated_row and updated_area.
12594 * dispextern.h (updated_row, updated_area): Remove declaration.
12595 (struct redisplay_interface): Pass glyph row and row area parameters
12596 to write_glyphs, insert_glyphs and clear_end_of_line functions.
12597 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12598 Adjust prototypes.
12599 * dispnew.c (updated_row, updated_area): Remove.
12600 (redraw_overlapped_rows, update_window_line): Adjust user.
12601 (update_marginal_area, update_text_area): Likewise. Pass updated row
12602 as a parameter. Prefer enum glyph_row_area to int where appropriate.
12603 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12604 Adjust users.
12605
12606 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
12607
12608 * process.c (flush_pending_output): Remove stub.
12609 All uses removed.
12610
12611 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12612
12613 * callproc.c: Fix race that killed background processes (Bug#15144).
12614 (call_process): New arg TEMPFILE_INDEX. Callers changed.
12615 Record deleted process-id in critical section, not afterwards.
12616 Don't mistakenly kill process created by a call-process invocation
12617 that discards output and does not wait.
12618
12619 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
12620
12621 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
12622 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
12623 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
12624 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
12625 to shut up compiler in mark_object.
12626 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
12627
12628 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12629
12630 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
12631 We can't portably rely on PTY_OPEN doing that, even if
12632 it calls posix_openpt with O_CLOEXEC.
12633
12634 2013-08-20 Kenichi Handa <handa@gnu.org>
12635
12636 * character.c (string_char): Improve commentary.
12637
12638 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
12639
12640 * image.c (SIGNATURE_DIGESTSIZE): Remove.
12641 (struct animation_cache): Make signature a flexible array member.
12642 All uses changed. This is a tad slower but may insulate us better
12643 from future changes to ImageMagick.
12644
12645 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12646
12647 * image.c: Shrink memory needed for animation cache.
12648 (SIGNATURE_DIGESTSIZE): New constant.
12649 (struct animation_cache): Make 'signature' a fixed size array of bytes.
12650 (imagemagick_create_cache): Copy the signature. This saves
12651 several KB of memory that ImageMagick wastes per signature.
12652 Don't bother updating the update_time, as the caller does that now.
12653 (imagemagick_prune_animation_cache): Don't destroy the signature, as
12654 it's a fixed size struct member now.
12655 (imagemagick_get_animation_cache): Always destroy the signature,
12656 as it's now imagemagick_create_cache's responsibility to copy it.
12657 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
12658 and use memcmp rather than strcmp.
12659 eassert that ImageMagick returns a signature of the specified length.
12660
12661 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
12662
12663 * image.c (imagemagick_get_animation_cache): Don't segfault on
12664 each invocation.
12665 (imagemagick_get_animation_cache): Revert to previous definition
12666 so that it actually works. But keep the memory leak fix.
12667 (imagemagick_get_animation_cache): Fix memory leak.
12668
12669 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12670
12671 * image.c: Fix animation cache signature memory leak.
12672 Fix some other minor performance problems while we're at it.
12673 (imagemagick_create_cache): Clear just the members that
12674 need clearing. Don't set update_time, as caller does that now.
12675 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
12676 Simplify by using pointer-to-pointer instead of a prev pointer.
12677 (imagemagick_prune_animation_cache): Use make_emacs_time rather
12678 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
12679 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
12680 it's already a copy. Free the signature probe unless it's cached.
12681
12682 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
12683 This was introduced by my 2013-08-12 fix for Bug#15035.
12684
12685 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
12686
12687 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
12688 (imagemagick_prune_animation_cache): Now static.
12689
12690 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
12691
12692 * image.c (imagemagick_get_animation_cache): Don't segfault when
12693 pruning all entries.
12694
12695 2013-08-18 Ken Brown <kbrown@cornell.edu>
12696
12697 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
12698 static heap if ENABLE_CHECKING is defined.
12699 (max_bss_sbrk_ptr): New variable.
12700 (bss_sbrk): Use it.
12701 (report_sheap_usage): Report maximum static heap usage instead of
12702 ending static heap usage.
12703
12704 2013-08-17 Eli Zaretskii <eliz@gnu.org>
12705
12706 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
12707 of zlib_initialized according to the results of calling
12708 init_zlib_functions.
12709
12710 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
12711
12712 * image.c: Implement an ImageMagick per-image cache.
12713 (imagemagick_get_animation_cache): Fix a double-free error.
12714 (imagemagick_load_image): Remove the ping_wand code, which only
12715 apparently saved time on invalid animated images, and slowed down
12716 everything else. Optimize for the common case.
12717
12718 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
12719
12720 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
12721
12722 * editfns.c (insert_before_markers): Mention overlay in the doc string.
12723
12724 * marker.c (set_marker): Remove documentation of undefined behavior.
12725
12726 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12727
12728 * image.c (imagemagick_compute_animated_image): Animate correctly
12729 when sub-images are smaller than the main image.
12730 (imagemagick_compute_animated_image): Setting the iterator row to
12731 zero is apparently not allowed.
12732 (imagemagick_compute_animated_image): Allow images that say they
12733 have sub-images that are bigger than the main image, but just crop
12734 them.
12735
12736 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
12737
12738 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
12739
12740 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12741
12742 * image.c (imagemagick_compute_animated_image): Respect the GIF
12743 disposal methods.
12744
12745 2013-08-15 Ken Brown <kbrown@cornell.edu>
12746
12747 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
12748 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
12749 needed.
12750
12751 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
12752
12753 Fix minor problems found by static checking.
12754 * frame.c (delete_frame):
12755 * xdisp.c (next_element_from_display_vector):
12756 Avoid uninitialized local.
12757 * image.c (imagemagick_compute_animated_image): Port to C89.
12758 Prefer usual GNU indentation style for loops.
12759 Be more careful about bizarrely large sizes, by using ptrdiff_t
12760 instead of int.
12761
12762 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12763
12764 Fix infinite frame selection loop (Bug#15025).
12765 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
12766
12767 2013-08-15 Eli Zaretskii <eliz@gnu.org>
12768
12769 * xdisp.c (compute_window_start_on_continuation_line):
12770 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
12771 to make sure we end up setting the window start at the leftmost
12772 visible character of the display line. This avoids funky
12773 horizontal shifting because the window start is not kept on the
12774 same position. (Bug#15090)
12775 (next_element_from_display_vector): Support 'box' face attribute
12776 in the face definitions of a display vector. (Bug#15099)
12777
12778 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12779
12780 * image.c (imagemagick_compute_animated_image): Implement animated
12781 images (bug#14700).
12782 (imagemagick_compute_animated_image): Fix some compilation
12783 warnings. Implement a very simple cache to make the animation
12784 usable at all, but it should be replaced with a per-image cache.
12785
12786 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12787
12788 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
12789 to do `for' loops over alist values.
12790 * buffer.h (FOR_EACH_BUFFER):
12791 * process.c (FOR_EACH_PROCESS): Use it.
12792 (handle_child_signal, status_notify, Fget_buffer_process)
12793 (kill_buffer_processes): Use FOR_EACH_PROCESS.
12794
12795 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12796
12797 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
12798 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
12799 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
12800 to xzalloc and so avoid redundant call to memset.
12801 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
12802 members because it is allocated with xzalloc and so already zeroed.
12803
12804 2013-08-14 Ken Brown <kbrown@cornell.edu>
12805
12806 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
12807 (Bug#15094).
12808
12809 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12810
12811 Utility function and macro to copy Lisp string to C string.
12812 * lisp.h (xlispstrdupa): New macro.
12813 (xlispstrdup): New prototype.
12814 * alloc.c (xlispstrdup): New function.
12815 * callint.c (Fcall_interactively):
12816 * fileio.c (Ffile_name_directory, Fexpand_file_name)
12817 (Fsubstitute_in_file_name):
12818 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
12819 * image.c (x_create_bitmap_from_file):
12820 * w32term.c (w32_term_init):
12821 * xterm.c (x_term_init): Use xlispstrdup.
12822
12823 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12824
12825 * image.c (imagemagick_load_image): Make animated pictures work.
12826 There's still some problems with background color settings, though
12827 (bug#14700).
12828
12829 * decompress.c (unwind_decompress): Always restore point.
12830
12831 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
12832
12833 * marker.c (set_marker): Reformat documentation.
12834
12835 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
12836
12837 * xdisp.c (cursor_type_changed): Now static.
12838
12839 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
12840 Use changed. This avoids the need to call xmalloc and for the
12841 caller to call xfree, and avoids memory leaks in some situations.
12842
12843 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12844
12845 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
12846 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
12847 (redisplay_window): If window_end_valid is cleared due to non-zero
12848 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
12849 so do not call to try_cursor_movement for that window.
12850
12851 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12852
12853 * window.h (struct window): Convert window_end_pos and
12854 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
12855 (wset_window_end_pos, wset_window_end_vpos): Remove.
12856 * dispnew.c (adjust_glyph_matrix):
12857 * window.c (Fwindow_end, replace_window, set_window_buffer)
12858 (make_window):
12859 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
12860 (set_vertical_scroll_bar, redisplay_window, try_window)
12861 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
12862 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
12863 (note_mouse_highlight): Adjust users.
12864 (try_cursor_movement): Likewise. Convert old precondition to eassert.
12865 Add comment.
12866
12867 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12868
12869 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
12870 * image.c (imagemagick_filename_hint): Use `const char *' and
12871 prefer SSDATA to SDATA to avoid warnings.
12872
12873 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12874
12875 Cleanup window fringes, margins and scroll bars adjustments.
12876 * window.c (set_window_fringes, set_window_margins)
12877 (set_window_scroll_bars, apply_window_adjustment): New functions.
12878 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
12879 (Fset_window_scroll_bars): Use them.
12880
12881 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12882
12883 * window.h (struct window): Convert scroll_bar_width
12884 from Lisp_Object to integer. Adjust comment.
12885 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
12886 Adjust users.
12887 * window.c (wset_scroll_bar_width): Remove.
12888 (make_window): Initialize scroll_bar_width.
12889 (Fsplit_window_internal): Use direct assignment.
12890 (Fset_window_configuration, save_window_save):
12891 Convert Lisp_Object to integer and back where appropriate.
12892 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
12893 bar was actually changed, and mention this in docstring.
12894
12895 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12896
12897 * decompress.c: Minor simplifications.
12898 (Fzlib_decompress_region): Don't bother verifying
12899 that avail_out <= UINT_MAX, as that was confusing.
12900 Mention the restriction in a comment instead.
12901 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
12902
12903 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12904
12905 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
12906 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
12907
12908 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12909
12910 * image.c (imagemagick_filename_hint): Check for errors in the
12911 alist structure.
12912
12913 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12914
12915 * window.c (Fwindow_margins): Return nil when there's no marginal
12916 area, as per the documented API.
12917
12918 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
12919 Fmake_vector, as scroll bar's struct members are not all Lisp
12920 objects now. This avoids crashes in GC.
12921
12922 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
12923 bool, so its address could be taken.
12924
12925 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12926
12927 * image.c (imagemagick_filename_hint): New function to possibly
12928 apply `image-content-type-suffixes'.
12929 (imagemagick_load_image): Use it.
12930
12931 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12932
12933 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
12934 if loading zlib failed.
12935
12936 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12937
12938 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
12939 2013-08-13 checkin below. Change bool to BOOL, rule is:
12940 All Obj-C code uses BOOL, except for interfaces callable from C.
12941
12942 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
12943
12944 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12945
12946 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
12947 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
12948 bool instead of BOOL.
12949 * w32term.h (struct scroll_bar): Convert fringe_extended_p
12950 from Lisp_Object to bitfield. Adjust comment.
12951 * w32term.c (x_scroll_bar_create): Adjust user.
12952 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
12953 * xterm.c (XTset_vertical_scroll_bar): Likewise.
12954 Use bool for boolean.
12955 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
12956 to `unsigned int' when defining a bitfield.
12957
12958 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12959
12960 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
12961
12962 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12963
12964 * window.h (struct window): Convert left_margin_cols and
12965 right_margin_cols from Lisp_Objects to integers. Adjust comment.
12966 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
12967 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
12968 Adjust users.
12969 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
12970 Adjust comment.
12971 (showing_window_margins_p, update_window_line, update_frame_1):
12972 * fringe.c (draw_fringe_bitmap_1):
12973 * xdisp.c (window_box_width): Adjust users.
12974 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
12975 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
12976 Use direct assignment.
12977 (Fset_window_configuration, save_window_save, Fwindow_margins):
12978 Convert Lisp_Object to integer and back where appropriate.
12979 (Fset_window_margins): Adjust user. Return t if any margin
12980 was actually changed, and mention this in docstring.
12981
12982 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
12983
12984 * syntax.c (forward_word):
12985 * cmds.c (forward_char, backward_char): Mention the optional argument.
12986
12987 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12988
12989 * window.h (struct window): Convert left_fringe_width
12990 and right_fringe_width from Lisp_Objects to integers.
12991 Adjust comment.
12992 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
12993 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
12994 * window.c (wset_left_fringe_width, wset_right_fringe_width):
12995 Remove.
12996 (make_window): Initialize new integer fields to -1.
12997 (Fsplit_window_internal): Use direct assignment.
12998 (Fset_window_configuration, save_window_save):
12999 Convert Lisp_Object to integer and back where appropriate.
13000 (Fset_window_fringes): Adjust user. Return t if any fringe
13001 was actually changed, and mention this in docstring.
13002
13003 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13004
13005 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
13006 * nsfns.m (x_set_cursor_type):
13007 * w32fns.c (x_set_cursor_type):
13008 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
13009 * xdisp.c (set_frame_cursor_types): ...but in common code.
13010
13011 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13012
13013 * font.c (clear_font_cache): New function, stripped from...
13014 (Fclear_font_cache): ...here, which now uses the function
13015 above. Adjust comment.
13016 * font.h (clear_font_cache): Add prototype.
13017 * xfaces.c (clear_face_cache): Use clear_font_cache.
13018
13019 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
13020
13021 * window.c (Fset_window_start): Compare `w', not `window' because
13022 `w' might not be equal to `window' after call to decode_live_window.
13023
13024 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13025
13026 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
13027 This fixes a problem introduced by the Bug#15035 patch
13028 when using GPG. Reported by Herbert J. Skuhra.
13029
13030 2013-08-12 Eli Zaretskii <eliz@gnu.org>
13031
13032 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
13033 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
13034 not yet initialized.
13035
13036 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13037
13038 * decompress.c (Fzlib_decompress_region): Support zlib
13039 decompression, too, and rename.
13040
13041 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13042
13043 Minor zlib configuration tweaks.
13044 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
13045 Don't assume presence of fn_inflateInit2_ zlib internal function.
13046
13047 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13048
13049 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
13050 include the zlib prefix.
13051
13052 2013-08-12 Eli Zaretskii <eliz@gnu.org>
13053
13054 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
13055 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
13056 define static variables that are pointers to zlib functions to be
13057 dynamically loaded.
13058 (init_zlib_functions) [WINDOWSNT]: New function.
13059 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
13060 New macros.
13061 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
13062 macros instead of invoking the zlib functions directly.
13063 (syms_of_decompress): DEFSYM Qzlib_dll.
13064 Staticpro Szlib_available_p.
13065
13066 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
13067
13068 Avoid looping over all frame windows to freeze and unfreeze.
13069 * window.h (struct window): Drop frozen_window_start_p.
13070 (freeze_window_starts): Drop prototype.
13071 * frame.h (struct frame): New frozen_window_starts flag.
13072 (FRAME_WINDOWS_FROZEN): New macro.
13073 * window.c (freeze_window_start, freeze_window_starts):
13074 Remove.
13075 (select_window, replace_window): Adjust users.
13076 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
13077 (window_frozen_p): New function.
13078 (redisplay_window): Use it.
13079
13080 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
13081
13082 Fix some fd issues when running subprocesses (Bug#15035).
13083 Fix bugs that can leak files or file descriptors on errors.
13084 Don't unlink open temp files, as that's hard for users to diagnose
13085 when things go awry (e.g., temp disk exhausted).
13086 Don't bother to lock temp files. Check for invalid recursion.
13087 * callproc.c (synch_process_fd): Remove. All uses removed.
13088 (synch_process_tempfile): New var or macro.
13089 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
13090 New constants.
13091 (record_kill_process): New arg, the temp name. All callers changed.
13092 (delete_temp_file): Now just a simple wrapper around unlink.
13093 (call_process_kill): New arg, the call_process_fd array.
13094 Close them all. Clear synch_process_pid. Remove the temp file,
13095 or arrange for it to be removed.
13096 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
13097 that's been moved to synch_process_tempfile. Caller changed.
13098 Do not remove the tempfile; that's now call_process_kill's
13099 responsibility.
13100 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
13101 call_process_kill; the caller now does that.
13102 (call_process_cleanup): Do not close the process fd; that's now
13103 call_process_kill's responsibility.
13104 (Fcall_process): Implement via new function call_process, which
13105 has most of the old body of Fcall_process, but with a different API.
13106 (call_process): New function that does not open or close filefd if
13107 it is nonnegative. Record which fds need to be closed, and let
13108 call_process_kill close (and remove the tempfile, on MSDOS) on error.
13109 Signal an error if invoked recursively (could be done via a hook).
13110 Simplify creation of the tempfile in the MSDOS case.
13111 Don't create the output file until after checking for the executable.
13112 Report any failure to open /dev/null.
13113 Don't open /dev/null for writing twice; once is enough.
13114 Don't create pipe if all output is being discarded or sent to file.
13115 Don't worry about setting up the coding system or reading from the
13116 pipe if all output is being discarded.
13117 Hoist fd_error local into top level, to lessen block nesting.
13118 Don't record deleted pid here; now done by Fcall_process_region.
13119 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
13120 and note its success in synch_process_tempfile.
13121 Do not leak resources when child_setup fails.
13122 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
13123 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
13124 (create_temp_file): Now returns open fd, with an additional
13125 Lisp_Object * argument to return the name. All callers changed.
13126 Do not close the file; rewind it instead, and leave it open for
13127 the caller. Do not lock the temp file. Unwind-protect the file
13128 and the file-descriptor.
13129 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
13130 If an asynchrounous process, record it here, not in call_process.
13131 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
13132 * eval.c (set_unwind_protect): New function.
13133 * fileio.c (write_region): New function, generalized from the
13134 old Fwrite_region. Do not lock temp files.
13135 (Fwrite_region): Use it.
13136 * lisp.h (set_unwind_protect, write_region): New decls.
13137 * process.c: Include <verify.h>.
13138 (make_process): Mark fds as initially closed.
13139 (deleted_pid_list): Now a list of pid-filename pairs.
13140 All uses changed.
13141 (close_process_fd): New function.
13142 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
13143 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
13144 New constants. Verify that their number matches PROCESS_OPEN_FDS.
13145 (create_process, create_pty, Fmake_serial_process)
13146 (server_accept_connection): Record which fds need to be closed,
13147 and let deactivate_process close them.
13148 (Fmake_network_process): Do not discard the unwind-protect
13149 until it's safe to do so.
13150 (deactivate_process): Close the fds opened by create_process etc.
13151 (Fprocess_send_eof): Adjust to new way of recording open fds.
13152 Report an error if /dev/null can't be opened, instead of aborting.
13153 * process.h (PROCESS_OPEN_FDS): New constant.
13154 (struct Lisp_Process): New member open_fds.
13155 (record_kill_process, record_deleted_pid): Adjust signatures.
13156 (record_deleted_pid): Move decl here ...
13157 * syswait.h (record_deleted_pid): ... from here.
13158
13159 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
13160
13161 * decompress.c: Fix bugs with large buffers and weird inputs.
13162 Tune a bit. Reindent as per usual Emacs style.
13163 (BUFFER_SIZE): Remove.
13164 (Fdecompress_gzipped_region): Do not mishandle input buffers with
13165 more than UINT_MAX bytes. Decompress into the gap instead of into
13166 an auto buffer, as this should avoid copying. Return nil if
13167 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
13168 set immediate_quit; we shouldn't trust zlib code that much.
13169
13170 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13171
13172 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
13173 errors, and really move the gap to where we want it.
13174
13175 * lisp.h: Include decompress.c support.
13176
13177 * emacs.c (main): Include decompress.c support.
13178
13179 * Makefile.in: Include -lz if present.
13180
13181 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
13182
13183 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
13184 (initWithTitle:): Initialize frame to 0.
13185 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
13186 (fillWithWidgetValue:frame:): Rename from
13187 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
13188
13189 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
13190 fillWithWidgetValue:frame:
13191
13192 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
13193 remove memory leak warnings.
13194
13195 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
13196 (ns_check_menu_open): Handle menu == nil. Remove assignment to
13197 menu_pending_title.
13198
13199 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
13200 (x_activate_menubar): Update the whole menu.
13201 (trackingNotification:): Call ns_check_menu_open if tracking ends.
13202 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
13203 current event is not NSSystemDefined (Bug#15001).
13204 Call ns_check_menu_open only if trackingMenu is 2.
13205 (menuDidClose:): New method, decrease trackingMenu.
13206 (fillWithWidgetValue:setDelegate:): New method.
13207 (fillWithWidgetValue:): Call the above.
13208
13209 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
13210
13211 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
13212
13213 Omit some unnecessary casts.
13214 Many of these go back to the old pre-C89 days, when they may have
13215 been needed, but we've been assuming C89 or later for a while now.
13216 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
13217 (live_float_p, live_misc_p, live_vector_p):
13218 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
13219 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
13220 (defvar_per_buffer):
13221 * callint.c (Fcall_interactively):
13222 * doc.c (Fsubstitute_command_keys):
13223 * filelock.c (get_boot_time):
13224 * frame.c (xrdb_get_resource):
13225 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
13226 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
13227 (xg_get_file_name_from_selector, menuitem_destroy_callback)
13228 (menuitem_highlight_callback, menu_destroy_callback)
13229 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
13230 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
13231 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
13232 (xg_tool_bar_help_callback, tb_size_cb):
13233 * image.c (xpm_alloc_color, png_read_from_memory)
13234 (png_read_from_file, png_load_body, our_memory_skip_input_data)
13235 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
13236 (syms_of_image):
13237 * keymap.c (describe_map):
13238 * nsfns.m (Fns_display_monitor_attributes_list):
13239 * nsmenu.m (process_dialog:):
13240 * nsterm.m (hold_event):
13241 * process.c (wait_reading_process_output):
13242 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
13243 * scroll.c (do_direct_scrolling, scrolling_1):
13244 * termcap.c (tgetent):
13245 * window.c (check_window_containing, add_window_to_list)
13246 (freeze_window_starts):
13247 * xdisp.c (compare_overlay_entries, vmessage):
13248 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
13249 (x_get_monitor_attributes_xrandr)
13250 (Fx_display_monitor_attributes_list, x_display_info_for_name)
13251 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
13252 * xfont.c (xfont_match, xfont_open):
13253 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
13254 (menubar_selection_callback, menu_position_func)
13255 (popup_selection_callback, create_and_show_popup_menu)
13256 (dialog_selection_callback, create_and_show_dialog):
13257 * xrdb.c (x_get_string_resource)
13258 (main) [TESTRM]:
13259 * xsmfns.c (x_session_check_input):
13260 * xterm.c (x_draw_glyphless_glyph_string_foreground)
13261 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
13262 (xaw_jump_callback, xaw_scroll_callback):
13263 Omit unnecessary casts.
13264
13265 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
13266
13267 Minor string-length refactoring.
13268 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
13269 * frame.c (make_monitor_attribute_list):
13270 Prefer build_string to strlen + make_string.
13271
13272 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
13273
13274 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
13275 don't check minor_code (Bug#14417).
13276
13277 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13278
13279 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
13280 vertical positions instead. This avoids calling MATRIX_ROW with
13281 row numbers that are possibly beyond valid limits. (Bug#15064)
13282
13283 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
13284
13285 Use xstrdup and build_unibyte_string where applicable.
13286 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
13287 * xfns.c (x_window):
13288 * xrdb.c (x_get_customization_string):
13289 * xterm.c (xim_initialize):
13290 * w32fns.c (w32_window): Use xstrdup.
13291 (w32_display_monitor_attributes_list):
13292 * emacs.c (init_cmdargs):
13293 * keyboard.c (PUSH_C_STR):
13294 * nsfont.m (nsfont_open):
13295 * sysdep.c (system_process_attributes):
13296 * w32.c (system_process_attributes):
13297 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
13298
13299 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13300
13301 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
13302 variables of these types so that GDB would know about them, as aid
13303 for debugging fatal exceptions. (Bug#15024) See also
13304 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
13305 discussions.
13306
13307 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
13308
13309 * nsterm.m (ns_update_begin): Don't change clip path if it would be
13310 larger than the NSWindow (Bug#14934).
13311
13312 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13313
13314 Redesign redisplay interface to drop global variable updated_window.
13315 Always pass currently updated window as a parameter to update routines.
13316 * dispextern.h (updated_window): Remove declaration.
13317 (struct redisplay_interface): Pass window parameter to
13318 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
13319 and after_update_window_hook.
13320 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
13321 Adjust prototypes.
13322 * dispnew.c (updated_window): Remove.
13323 (redraw_overlapped_rows, update_marginal_area, update_text_area)
13324 (update_window_line): Adjust to match redisplay interface changes.
13325 * nsterm.m (ns_update_window_begin, ns_update_window_end)
13326 (ns_scroll_run, ns_after_update_window_line):
13327 * w32term.c (x_update_window_begin, x_update_window_end)
13328 (x_after_update_window_line, x_scroll_run):
13329 * xterm.c (x_update_window_begin, x_update_window_end)
13330 (x_after_update_window_line, x_scroll_run):
13331 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
13332 Likewise. Adjust comments where appropriate.
13333 (x_cursor_to): Simplify because this is always called during window
13334 update (but install debugging check anyway).
13335 (expose_window): Check must_be_updated_p flag to see whether this
13336 function is called during window update.
13337
13338 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13339
13340 Do not reset window modification event counters excessively.
13341 These leftovers and poor man's tricky methods to catch extra
13342 redisplay's attention are no longer needed.
13343 * frame.c (set_menu_bar_lines_1):
13344 * minibuf.c (read_minibuf_unwind):
13345 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
13346 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
13347 (window_scroll_line_based, Fset_window_configuration):
13348 * xdisp.c (redisplay_window): Do not reset last_modified and
13349 last_overlay_modified counters.
13350
13351 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
13352
13353 * xselect.c (x_send_client_event): Set send_event and serial, memset
13354 data.l as it might be bigger than data.b. Use 24 bit mask to
13355 XSendEvent (Bug#15034).
13356
13357 2013-08-07 Eli Zaretskii <eliz@gnu.org>
13358
13359 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
13360 for TTY frames that are not the top frame on their console.
13361 (Bug#14616)
13362
13363 2013-08-07 Martin Rudalics <rudalics@gmx.at>
13364
13365 * w32term.c (w32fullscreen_hook): Really maximize frame when
13366 asked for (Bug#14841).
13367
13368 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13369
13370 Prefer selected_window to Fselected_window, likewise for frames.
13371 * buffer.c (Fbuffer_swap_text):
13372 * data.c (Fvariable_binding_locus):
13373 * window.c (run_window_configuration_change_hook): Adjust users.
13374 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
13375 Use decode_live_frame.
13376
13377 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13378
13379 Be more careful if selected window shows the buffer other than current,
13380 use window_outdated only if this is not so. This change should also
13381 address some weird issues discussed in Bug#13012.
13382 * window.h (window_outdated): New prototype.
13383 * window.c (window_outdated): Now here. Convert from static and
13384 always assume window's buffer.
13385 (Fwindow_end, Fwindow_line_height): Use it.
13386 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
13387 and always assume window's buffer.
13388 (redisplay_window): Adjust user.
13389 (redisplay_internal): Call to reconsider_clip_changes once and
13390 check whether mode line should be updated only if selected window
13391 shows current buffer.
13392 (run_window_scroll_functions): Use eassert for debugging check.
13393 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
13394
13395 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13396
13397 * window.c (window_scroll, window_scroll_pixel_based)
13398 (window_scroll_line_based): Use bool for booleans.
13399
13400 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
13401
13402 * process.c: Fix minor off-by-one issues in descriptor counts.
13403 This shouldn't fix any real bugs, but it cleans up the code a bit.
13404 (max_process_desc, max_input_desc): -1, not 0, means none.
13405 All uses changed.
13406 (delete_input_desc): New function.
13407 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
13408 (deactivate_process): Scan backwards when recomuting max_process_desc;
13409 that should be faster.
13410 (init_process_emacs): Initialize max_input_desc.
13411
13412 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13413
13414 Use region cache to speedup bidi_find_paragraph_start.
13415 * buffer.h (struct buffer): New member bidi_paragraph_cache.
13416 Rename cache_long_line_scans to cache_long_scans.
13417 * buffer.c (bset_cache_long_line_scans): Rename to
13418 bset_cache_long_scans.
13419 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
13420 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
13421 into account.
13422 (syms_of_buffer): Rename cache-long-line-scans to
13423 cache-long-scans. Adjust docstring.
13424 * search.c (newline_cache_on_off):
13425 * indent.c (width_run_cache_on_off): Adjust users.
13426 * bidi.c (bidi_paragraph_cache_on_off): New function.
13427 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
13428 * insdel.c (prepare_to_modify_buffer):
13429 Invalidate bidi_paragraph_cache if enabled.
13430
13431 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13432
13433 Invalidate region caches only if buffer text is going to be changed.
13434 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
13435 (modify_text): ...new prototype.
13436 (prepare_to_modify_buffer_1): New prototype.
13437 * textprop.c (modify_region): Rename to...
13438 (modify_text_properties): ...new function.
13439 (add_text_properties_1, set_text_properties, Fremove_text_properties)
13440 (Fremove_list_of_text_properties): Adjust users.
13441 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
13442 (modify_text): ...new function.
13443 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
13444 (prepare_to_modify_buffer_1): ...new function.
13445 * casefiddle.c (casify_region):
13446 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
13447 (Ftranspose_regions): Use modify_text.
13448
13449 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
13450
13451 * lisp.mk (lisp): Add nadvice.elc.
13452
13453 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
13454
13455 New macro to iterate over live buffers similar to frames.
13456 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
13457 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
13458 Declare buffer-related variables here to offload lisp.h.
13459 * buffer.c (Vbuffer_alist): Adjust comment.
13460 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
13461 (other_buffer_safely):
13462 * data.c (store_symval_forwarding):
13463 * dispnew.c (Fframe_or_buffer_changed_p):
13464 * fileio.c (Fdo_auto_save):
13465 * filelock.c (unlock_all_files):
13466 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
13467
13468 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
13469
13470 Fix some minor races in hosts lacking mkostemp (Bug#15015).
13471 * callproc.c (create_temp_file):
13472 * filelock.c (create_lock_file):
13473 Assume mkostemp, since it's now provided by Gnulib.
13474
13475 2013-08-04 Eli Zaretskii <eliz@gnu.org>
13476
13477 * w32.c (mkostemp): New function.
13478 (mktemp): Remove, no longer used. Most of the code reused in
13479 mkostemp. (Bug#15015)
13480 (mktemp): Don't undef.
13481
13482 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
13483
13484 * dispnew.c (glyph_matrix_count, glyph_pool_count):
13485 Move under GLYPH_DEBUG and ENABLE_CHECKING.
13486 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
13487 (free_glyph_pool, check_glyph_memory): Likewise for
13488 all users. Adjust comments where appropriate.
13489
13490 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
13491
13492 * composite.h: Minor fixups.
13493 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
13494 to fix a misspelling, and change it to an inline function while
13495 we're at it (it need not be a macro). All uses changed.
13496 (composition_method, composition_valid_p):
13497 Rewrite to avoid assignments in if-conditions.
13498
13499 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13500
13501 Do not use global Lisp_Object in composition macros.
13502 * composite.h (composition_temp): Remove declaration.
13503 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
13504 (composition_method, composition_valid_p): ...inline functions.
13505 (compose_region): Remove the leftover.
13506 * composite.c (composition_temp): Remove.
13507 (run_composition_function, update_compositions)
13508 (composition_compute_stop_pos, composition_adjust_point)
13509 (Ffind_composition_internal):
13510 * coding.c (handle_composition_annotation):
13511 * xdisp.c (handle_composition_prop, check_point_in_composition):
13512 Related users changed.
13513
13514 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13515
13516 Drop FRAME_PTR typedef.
13517 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
13518 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
13519 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
13520 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
13521 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
13522 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
13523 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
13524 All related users changed.
13525
13526 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13527
13528 * eval.c (default_toplevel_binding): New function.
13529 (Fdefvar): Use it.
13530 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
13531 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
13532 (syms_of_eval): Export them.
13533 * data.c (Fdefault_value): Micro cleanup.
13534 * term.c (init_tty): Use "false".
13535
13536 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13537
13538 Fix X GC leak in GTK and raw (no toolkit) X ports.
13539 * xterm.c (x_free_frame_resources): If white and black relief
13540 GCs are allocated, always free them here.
13541 * xfns.c (x_make_gc): Omit redundant initialization.
13542 * widget.c (create_frame_gcs): Remove the leftover.
13543 (EmacsFrameDestroy): Do nothing because all GCs are now freed
13544 in x_free_frame_resources.
13545
13546 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
13547
13548 * nsterm.m (windowWillResize:toSize:): Only change title if
13549 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
13550 modifying it.
13551 (viewDidEndLiveResize): New method.
13552
13553 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
13554 inside NS_IMPL_COCOA.
13555
13556 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13557
13558 * insdel.c (adjust_after_replace, replace_range, del_range_2):
13559 Do not check whether undo is enabled because record_insert and
13560 record_delete does that themselves.
13561
13562 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13563
13564 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
13565 member which is not really used any more.
13566 (FRAME_XIC_BASE_FONTNAME): Remove.
13567 * xfns.c (xic_free_fontset): Adjust user.
13568 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
13569 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
13570 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
13571 (xdialog_show): Use eassert for debugging check.
13572 * w32term.c (x_unfocus_frame): Remove unused dummy function.
13573
13574 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
13575
13576 * fileio.c, fns.c (merge): Move extern decl from here ...
13577 * lisp.h (merge): ... to here.
13578
13579 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13580
13581 Fix last font-related change.
13582 * w32font.h (w32font_list_internal, w32font_match_internal):
13583 Fix prototype.
13584 * w32uniscribe.c (uniscribe_list, uniscribe_match)
13585 (uniscribe_list_family): Adjust to match font API change.
13586 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
13587 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
13588
13589 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13590
13591 * frame.h (FRAME_MOUSE_UPDATE):
13592 * nsterm.m (ns_frame_up_to_date): Omit redundant check
13593 whether hlinfo->mouse_face_mouse_frame is non-NULL.
13594
13595 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13596
13597 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
13598 * font.h (struct font_driver): Change list, match, and list_family
13599 functions to accept struct frame * as first arg.
13600 * font.c (font_score, font_compare, font_sort_entities):
13601 Remove prototypes.
13602 (font_sort_entities, font_list_entities, font_select_entity)
13603 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
13604 match font API change.
13605 * xfont.c (xfont_list, xfont_match, xfont_list_family):
13606 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
13607 * ftxfont.c (ftxfont_list, ftxfont_match):
13608 * xftfont.c (xftfont_list, xftfont_match):
13609 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
13610 * w32font.c (w32font_list, w32font_match, w32font_list)
13611 (w32font_list_internal, w32_font_match_internal): Likewise.
13612 * xfaces.c (Fx_family_fonts): Adjust user.
13613
13614 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13615
13616 Do not use pure Xism x_wm_set_icon_position in non-X ports.
13617 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
13618 only if HAVE_X_WINDOWS is in use.
13619 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
13620 * nsterm.m (x_wm_set_icon_position): Remove no-op.
13621 * w32term.c (x_wm_set_icon_position): Likewise.
13622 * w32fns.c (x_icon): Adjust user.
13623
13624 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13625
13626 * xterm.c (last_mouse_press_frame): Remove the
13627 leftover which is not really used any more.
13628 (handle_one_xevent, syms_of_xterm): Adjust users.
13629 (x_flush): Call XFlush once per each X display, not frame.
13630 This is better because this code always unconditionally skips
13631 non-X frames in Vframe_list and issues the only XFlush if we
13632 have more than one X frame on the same X display.
13633 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
13634 Use bool for booleans.
13635 (x_draw_glyph_string_background, cvt_string_to_pixel)
13636 (cvt_pixel_dtor): Drop unnecessary prototypes.
13637 * xterm.h (x_display_ok): Adjust prototype.
13638
13639 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13640
13641 Drop unnecessary functions that deals with frame pixel size.
13642 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
13643 (x_pixel_height): Drop prototypes.
13644 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
13645 (x_pixel_height): Drop implementations.
13646 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
13647 which should be always valid for window frame.
13648 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
13649 * w32menu.c (Fx_popup_dialog):
13650 * xmenu.c (Fx_popup_dialog): Likewise for both.
13651
13652 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13653
13654 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
13655 frame parameters and call to Fmodify_frame_parameters just once.
13656 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
13657 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
13658 and mention nil frame in docstring.
13659
13660 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13661
13662 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
13663 (x_figure_window_size): Likewise. Adjust to return long.
13664 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
13665 (toplevel): Move Qterminal_live_p to...
13666 * terminal.c (toplevel): ...here, make it static, and...
13667 (syms_of_terminal): ...DEFSYM here.
13668 * frame.h (Qterminal_live_p): Remove declaration.
13669 (make_frame, x_figure_window_size): Adjust prototype.
13670 * nsfns.m (Fx_create_frame): Use long for window flags.
13671
13672 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
13673
13674 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
13675 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
13676 Do not assume that emacs_close (INT_MAX) is a no-op.
13677
13678 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13679
13680 * xfaces.c (make_face_cache): For struct face_cache, prefer
13681 xmalloc to xzalloc and so avoid redundant call to memset.
13682 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
13683
13684 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13685
13686 * fringe.c (draw_window_fringes, update_window_fringes)
13687 (compute_fringe_widths):
13688 * w32term.c (x_draw_glyph_string):
13689 * window.c (candidate_window_p, Frecenter):
13690 * xfaces.c (realize_basic_faces, realize_default_face)
13691 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
13692 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
13693 * xfns.c (x_set_cursor_color, xic_free_xfontset):
13694 * xmenu.c (Fx_menu_bar_open_internal):
13695 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
13696 * xsettings.c (xft_settings_event):
13697 * xterm.c (x_draw_glyph_string, x_had_errors_p):
13698 Use bool for booleans. Adjust style and comments where
13699 appropriate.
13700 * dispextern.h (draw_window_fringes, update_window_fringes)
13701 (compute_fringe_widths):
13702 * xterm.h (x_had_errors_p): Adjust prototype.
13703
13704 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13705
13706 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
13707 CHECK_LIST. Rewrite the loop to avoid useless local variable.
13708
13709 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
13710
13711 * fns.c (toplevel): Remove comment before Fsafe_length because
13712 it checks for QUIT.
13713
13714 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
13715
13716 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
13717
13718 2013-07-28 Eli Zaretskii <eliz@gnu.org>
13719
13720 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
13721 frame which got the message is still alive, before dereferencing
13722 its pointer. (Bug#14970)
13723
13724 * frame.c (delete_frame): Test "this" frame's minibuffer window to
13725 be a live window, before using it as such. (Bug#14970)
13726
13727 2013-07-27 Eli Zaretskii <eliz@gnu.org>
13728
13729 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
13730 w32_detect_focus_change instead of doing part of its job by hand.
13731 This fixes the problem whereby FOCUS_OUT events were not sent to
13732 the event queue.
13733
13734 2013-07-26 Eli Zaretskii <eliz@gnu.org>
13735
13736 * process.c (Fprocess_list): Doc fix.
13737
13738 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
13739 being re-exposed only if it didn't ask to become visible.
13740 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
13741 was previously iconified. (Bug#14841)
13742 (x_iconify_frame): Mark the frame iconified.
13743
13744 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
13745
13746 Fix minor problems found by static checking.
13747 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
13748 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
13749
13750 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
13751
13752 * eval.c (set_specpdl_old_value): New function.
13753 (unbind_to): Minor simplification.
13754 (get_backtrace_frame): New function.
13755 (Fbacktrace_frame): Use it. Add `base' argument.
13756 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
13757 (syms_of_eval): Export backtrace-eval.
13758 * xterm.c (x_focus_changed): Simplify.
13759
13760 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
13761
13762 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
13763
13764 2013-07-24 Eli Zaretskii <eliz@gnu.org>
13765
13766 * xdisp.c (redisplay_window): Instead of moving point out of
13767 scroll margin, reject the force_start method, and try scrolling
13768 instead. (Bug#14780)
13769
13770 2013-07-24 Ken Brown <kbrown@cornell.edu>
13771
13772 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
13773 (Bug#14944).
13774
13775 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
13776
13777 * eval.c (Fprogn): Do not check that BODY is a proper list.
13778 This undoes the previous change. The check slows down the
13779 interpreter, and is not needed to prevent a crash. See
13780 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
13781
13782 2013-07-23 Glenn Morris <rgm@gnu.org>
13783
13784 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
13785
13786 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
13787
13788 Port to GNU/Linux systems with tinfo but not ncurses.
13789 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
13790 to decide whether ncurses is being used. Without this change,
13791 GCC complains about tgetent not being declared, on a system
13792 that has tinfo installed but ncurses not installed.
13793
13794 * eval.c (Fprogn): Check that BODY is a proper list.
13795
13796 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
13797 * data.c (Fsetq_default):
13798 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
13799 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
13800 (Fcondition_case):
13801 Tune by taking advantage of the fact that ARGS is always a list
13802 when a function is declared to have UNEVALLED args.
13803
13804 * emacsgtkfixed.c: Port to GCC 4.6.
13805 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
13806
13807 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
13808
13809 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
13810 here to silence compiler warnings.
13811
13812 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
13813
13814 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
13815 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
13816 from messing up Emacs's 'struct frame' (Bug#14923).
13817
13818 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13819
13820 * alloc.c (make_save_ptr_ptr): Define this function.
13821 It was inadvertently omitted. It's needed only if
13822 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
13823
13824 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
13825
13826 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
13827 frame have focus (Bug#14895).
13828
13829 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13830
13831 Avoid vfork-related deadlock more cleanly.
13832 * callproc.c (child_setup): When the child's exec fails, output
13833 the program name, as that's more useful. Use O_NONBLOCK to avoid
13834 deadlock.
13835 * process.c (create_process_1): Remove; no longer needed.
13836 (create_process): Remove timer hack; no longer needed, now that
13837 the child avoids deadlock.
13838
13839 2013-07-20 Glenn Morris <rgm@gnu.org>
13840
13841 * image.c (Fimage_flush): Fix doc typo.
13842
13843 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
13844
13845 Fix array bounds violation when pty allocation fails.
13846 * process.c (PTY_NAME_SIZE): New constant.
13847 (pty_name): Remove static variable; it's now auto.
13848 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
13849 Take pty_name as an arg rather than using a static variable.
13850 All callers changed.
13851 (create_process): Recover pty_flag from process, not from volatile local.
13852 (create_pty): Stay inside array even when pty allocation fails.
13853 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
13854
13855 * lread.c (Fload): Avoid initialization only when lint checking.
13856 Mention that it's needed only for older GCCs.
13857
13858 2013-07-20 Kenichi Handa <handa@gnu.org>
13859
13860 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
13861 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
13862
13863 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
13864
13865 * lread.c (Fload): Avoid uninitialized warning.
13866
13867 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13868
13869 Fix some minor file descriptor leaks and related glitches.
13870 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
13871 (create_lock_file): Use write, not emacs_write.
13872 * image.c (slurp_file, png_load_body):
13873 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
13874 (server_accept_connection):
13875 Don't leak an fd on memory allocation failure.
13876 * image.c (slurp_file): Add a cheap heuristic for growing files.
13877 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
13878 as that's what the other routines do. Maybe input need not be
13879 blocked at all, but it's better to be consistent.
13880 Avoid undefined behavior when strlen is zero.
13881
13882 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
13883 (NSTATICS): Now a constant; doesn't need to be a macro.
13884
13885 2013-07-19 Richard Stallman <rms@gnu.org>
13886
13887 * coding.c (decode_coding_utf_8): Add simple loop for fast
13888 processing of ASCII characters.
13889
13890 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13891
13892 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
13893
13894 2013-07-19 Eli Zaretskii <eliz@gnu.org>
13895
13896 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
13897 unportable 'struct x_display_info'.
13898 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
13899 is a portable type.
13900
13901 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13902
13903 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
13904 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
13905 or fscanf fails.
13906 (system_process_attributes): Prefer plain char to unsigned char
13907 when either will do. Clean up properly if interrupted or if
13908 memory allocations fail. Don't assume sscanf succeeds.
13909 Remove no-longer-needed workaround to stop GCC from whining.
13910 Read command-line once, instead of multiple times. Check read status a
13911 bit more carefully.
13912
13913 Fix obscure porting bug with varargs functions.
13914 The code assumed that int is treated like ptrdiff_t in a vararg
13915 function, which is not a portable assumption. There was a similar
13916 -- though these days less likely -- porting problem with various
13917 assumptions that pointers of different types all smell the same as
13918 far as vararg functions is conserved. To make this problem less
13919 likely in the future, redo the API to use varargs functions.
13920 * alloc.c (make_save_value): Remove this vararg function.
13921 All uses changed to ...
13922 (make_save_int_int_int, make_save_obj_obj_obj_obj)
13923 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
13924 New functions.
13925 (make_save_ptr): Rename from make_save_pointer, for consistency with
13926 the above. Define only on platforms that need it. All uses changed.
13927
13928 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13929
13930 * keyboard.c: Try to fix typos in previous change.
13931 (DISPLAY_LIST_INFO): New macro.
13932 (kbd_buffer_get_event): Do not access members that are not present
13933 in X11. Revert inadvertent change of "!=" to "=".
13934
13935 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
13936
13937 * keyboard.c (kbd_buffer_get_event):
13938 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
13939 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
13940
13941 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13942
13943 * filelock.c: Fix unlikely file descriptor leaks.
13944 (get_boot_time_1): Rework to avoid using emacs_open.
13945 This doesn't actually fix a leak, but is better anyway.
13946 (read_lock_data): Use read, not emacs_read.
13947
13948 * doc.c: Fix minor memory and file descriptor leaks.
13949 * doc.c (get_doc_string): Fix memory leak when doc file absent.
13950 (get_doc_string, Fsnarf_documentation):
13951 Fix file descriptor leak on error.
13952
13953 * term.c: Fix minor fdopen-related file descriptor leaks.
13954 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
13955 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
13956
13957 * charset.c: Fix file descriptor leaks and errno issues.
13958 Include <errno.h>.
13959 (load_charset_map_from_file): Don't leak file descriptor on error.
13960 Use plain record_xmalloc since the allocation is larger than
13961 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
13962 of entries.
13963 * eval.c (record_unwind_protect_nothing):
13964 * fileio.c (fclose_unwind):
13965 New functions.
13966 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
13967 The replacement doesn't block input, but that no longer seems
13968 necessary.
13969
13970 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
13971
13972 * lread.c: Fix file descriptor leaks and errno issues.
13973 (Fload): Close some races that leaked fds or streams when 'load'
13974 was interrupted.
13975 (Fload, openp): Report error number of last nontrivial failure to open.
13976 ENOENT counts as trivial.
13977 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
13978 New functions.
13979 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
13980 now that the function is always called with a nonnegative arg.
13981 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
13982 All uses replaced with ...
13983 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
13984
13985 A few more minor file errno-reporting bugs.
13986 * callproc.c (Fcall_process):
13987 * doc.c (Fsnarf_documentation):
13988 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
13989 * process.c (set_socket_option):
13990 Don't let a constructor trash errno.
13991 * doc.c: Include <errno.h>.
13992
13993 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
13994
13995 * w32fns.c (unwind_create_tip_frame): Fix declaration.
13996
13997 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
13998
13999 Fix w32 bug with call-process-region (Bug#14885).
14000 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
14001 to Fcall_process when the input is empty. This simplifies the
14002 code a bit. It makes no difference on POSIXish platforms but
14003 apparently it fixes a bug on w32.
14004
14005 Fix bug where insert-file-contents closes a file twice (Bug#14839).
14006 * fileio.c (close_file_unwind): Don't close if FD is negative;
14007 this can happen when unwinding a zapped file descriptor.
14008 (Finsert_file_contents): Unwind-protect the fd before the point marker,
14009 in case Emacs runs out of memory between the two unwind-protects.
14010 Don't trash errno when closing FD.
14011 Zap the FD in the specpdl when closing it, instead of deferring
14012 the removal of the unwind-protect; this fixes a bug where a child
14013 function unwinds the stack past us.
14014
14015 New unwind-protect flavors to better type-check C callbacks.
14016 This also lessens the need to write wrappers for callbacks,
14017 and the need for make_save_pointer.
14018 * alloc.c (free_save_value):
14019 * atimer.c (run_all_atimers):
14020 Now extern.
14021 * alloc.c (safe_alloca_unwind):
14022 * atimer.c (unwind_stop_other_atimers):
14023 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
14024 * menu.c (cleanup_popup_menu) [HAVE_NS]:
14025 * minibuf.c (choose_minibuf_frame_1):
14026 * process.c (make_serial_process_unwind):
14027 * xdisp.c (pop_message_unwind):
14028 * xselect.c (queue_selection_requests_unwind):
14029 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
14030 * alloc.c (record_xmalloc):
14031 Prefer record_unwind_protect_ptr to record_unwind_protect with
14032 make_save_pointer.
14033 * alloc.c (Fgarbage_collect):
14034 Prefer record_unwind_protect_void to passing a dummy.
14035 * buffer.c (restore_buffer):
14036 * window.c (restore_window_configuration):
14037 * xfns.c, w32fns.c (do_unwind_create_frame)
14038 New wrapper. All record-unwind uses of wrappee changed.
14039 * buffer.c (set_buffer_if_live):
14040 * callproc.c (call_process_cleanup, delete_temp_file):
14041 * coding.c (code_conversion_restore):
14042 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
14043 * editfns.c (save_excursion_restore)
14044 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
14045 (save_restriction_restore):
14046 * eval.c (restore_stack_limits, un_autoload):
14047 * fns.c (require_unwind):
14048 * keyboard.c (recursive_edit_unwind, tracking_off):
14049 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
14050 * macros.c (pop_kbd_macro, restore_menu_items):
14051 * nsfns.m (unwind_create_frame):
14052 * print.c (print_unwind):
14053 * process.c (start_process_unwind):
14054 * search.c (unwind_set_match_data):
14055 * window.c (select_window_norecord, select_frame_norecord):
14056 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
14057 (fast_set_selected_frame):
14058 * xfns.c, w32fns.c (unwind_create_tip_frame):
14059 Return void, not a dummy Lisp_Object. All uses changed.
14060 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
14061 * callproc.c (call_process_kill):
14062 * fileio.c (restore_point_unwind, decide_coding_unwind)
14063 (build_annotations_unwind):
14064 * insdel.c (Fcombine_after_change_execute_1):
14065 * keyboard.c (read_char_help_form_unwind):
14066 * menu.c (unuse_menu_items):
14067 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
14068 * sound.c (sound_cleanup):
14069 * xdisp.c (unwind_redisplay):
14070 * xfns.c (clean_up_dialog):
14071 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
14072 Accept no args and return void, instead of accepting and returning
14073 a dummy Lisp_Object. All uses changed.
14074 * cygw32.c (fchdir_unwind):
14075 * fileio.c (close_file_unwind):
14076 * keyboard.c (restore_kboard_configuration):
14077 * lread.c (readevalllop_1):
14078 * process.c (wait_reading_process_output_unwind):
14079 Accept int and return void, rather than accepting an Emacs integer
14080 and returning a dummy object. In some cases this fixes an
14081 unlikely bug when the corresponding int is outside Emacs integer
14082 range. All uses changed.
14083 * dired.c (directory_files_internal_unwind):
14084 * fileio.c (do_auto_save_unwind):
14085 * gtkutil.c (pop_down_dialog):
14086 * insdel.c (reset_var_on_error):
14087 * lread.c (load_unwind):
14088 * xfns.c (clean_up_file_dialog):
14089 * xmenu.c, nsmenu.m (pop_down_menu):
14090 * xmenu.c (cleanup_widget_value_tree):
14091 * xselect.c (wait_for_property_change_unwind):
14092 Accept pointer and return void, rather than accepting an Emacs
14093 save value encapsulating the pointer and returning a dummy object.
14094 All uses changed.
14095 * editfns.c (Fformat): Update the saved pointer directly via
14096 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
14097 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
14098 (unwind_body): New function.
14099 (record_unwind_protect): First arg is now a function returning void,
14100 not a dummy Lisp_Object.
14101 (record_unwind_protect_ptr, record_unwind_protect_int)
14102 (record_unwind_protect_void): New functions.
14103 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
14104 * fileio.c (struct auto_save_unwind): New type.
14105 (do_auto_save_unwind): Use it.
14106 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
14107 * insdel.c (struct rvoe_arg): New type.
14108 (reset_var_on_error): Use it.
14109 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
14110 New constants.
14111 (specbinding_func): Remove; there are now several such functions.
14112 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
14113 (set_unwind_protect_ptr): New function.
14114 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
14115
14116 Be simpler and more consistent about reporting I/O errors.
14117 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
14118 Say "Read error" and "Write error", rather than "I/O error", or
14119 "IO error reading", or "IO error writing", when a read or write
14120 error occurs.
14121 * process.c (Fmake_network_process, wait_reading_process_output)
14122 (send_process, Fprocess_send_eof, wait_reading_process_output):
14123 Capitalize diagnostics consistently. Put "failed foo" at the
14124 start of the diagnostic, so that we don't capitalize the
14125 function name "foo". Consistently say "failed" for such
14126 diagnostics.
14127 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
14128 All callers changed. This is so it can use report_file_error.
14129 * sysdep.c (serial_open, serial_configure): Capitalize I/O
14130 diagnostics consistently as above.
14131
14132 * fileio.c (report_file_errno): Fix errno reporting bug.
14133 If the file name is neither null nor a pair, package it up as a
14134 singleton list. All callers changed, both to this function and to
14135 report_file_error. This fixes a bug where the memory allocator
14136 invoked by list1 set errno so that the immediately following
14137 report_file_error reported the wrong errno value.
14138
14139 Fix minor problems found by --enable-gcc-warnings.
14140 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
14141 * keyboard.c (kbd_buffer_get_event): Remove unused local.
14142
14143 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
14144
14145 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
14146 Set event->arg to Qt if switch-event shall be generated.
14147 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
14148
14149 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
14150
14151 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
14152 FOCUS_OUT_EVENT.
14153
14154 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
14155 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
14156 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
14157 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
14158 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
14159 and there is a focused frame.
14160 (head_table): Add focus-in and focus-out.
14161 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
14162 bind to handle-focus-in/out.
14163
14164 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
14165 (Fhandle_switch_frame): Call Fhandle_focus_in.
14166 (syms_of_frame): defsubr handle-focus-in/out.
14167
14168 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
14169
14170 Fix porting bug to older POSIXish platforms (Bug#14862).
14171 * sysdep.c (emacs_pipe): New function, that implements
14172 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
14173 This should port better to CentOS 5 and to Mac OS X 10.6.
14174 All calls to pipe2 changed.
14175
14176 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
14177 This makes the code easier to read and the executable a bit smaller.
14178 Do not replace all calls to Fcons that happen to create lists,
14179 just calls that are intended to create lists. For example, when
14180 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
14181 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
14182 Similarly for list2 through list5.
14183 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
14184 * bytecode.c (exec_byte_code):
14185 * callint.c (quotify_arg, Fcall_interactively):
14186 * callproc.c (Fcall_process, create_temp_file):
14187 * charset.c (load_charset_map_from_file)
14188 (Fdefine_charset_internal, init_charset):
14189 * coding.c (get_translation_table, detect_coding_system)
14190 (Fcheck_coding_systems_region)
14191 (Fset_terminal_coding_system_internal)
14192 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
14193 * composite.c (update_compositions, Ffind_composition_internal):
14194 * dired.c (directory_files_internal, file_name_completion)
14195 (Fsystem_users):
14196 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
14197 * doc.c (Fsnarf_documentation):
14198 * editfns.c (Fmessage_box):
14199 * emacs.c (main):
14200 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
14201 (Feval, eval_sub, Ffuncall, apply_lambda):
14202 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
14203 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
14204 (Fset_file_times, Finsert_file_contents)
14205 (Fchoose_write_coding_system, Fwrite_region):
14206 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
14207 * font.c (font_registry_charsets, font_parse_fcname)
14208 (font_prepare_cache, font_update_drivers, Flist_fonts):
14209 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
14210 * frame.c (make_frame, Fmake_terminal_frame)
14211 (x_set_frame_parameters, x_report_frame_params)
14212 (x_default_parameter, Fx_parse_geometry):
14213 * ftfont.c (syms_of_ftfont):
14214 * image.c (gif_load):
14215 * keyboard.c (command_loop_1):
14216 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
14217 (Fcopy_keymap, append_key, Fcurrent_active_maps)
14218 (Fminor_mode_key_binding, accessible_keymaps_1)
14219 (Faccessible_keymaps, Fwhere_is_internal):
14220 * lread.c (read_emacs_mule_char):
14221 * menu.c (find_and_return_menu_selection):
14222 * minibuf.c (get_minibuffer):
14223 * nsfns.m (Fns_perform_service):
14224 * nsfont.m (ns_script_to_charset):
14225 * nsmenu.m (ns_popup_dialog):
14226 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
14227 (Fx_own_selection_internal):
14228 * nsterm.m (append2):
14229 * print.c (Fredirect_debugging_output)
14230 (print_prune_string_charset):
14231 * process.c (Fdelete_process, Fprocess_contact)
14232 (Fformat_network_address, set_socket_option)
14233 (read_and_dispose_of_process_output, write_queue_push)
14234 (send_process, exec_sentinel):
14235 * sound.c (Fplay_sound_internal):
14236 * textprop.c (validate_plist, add_properties)
14237 (Fput_text_property, Fadd_face_text_property)
14238 (copy_text_properties, text_property_list, syms_of_textprop):
14239 * unexaix.c (report_error):
14240 * unexcoff.c (report_error):
14241 * unexsol.c (unexec):
14242 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
14243 (Fformat_mode_line, syms_of_xdisp):
14244 * xfaces.c (set_font_frame_param)
14245 (Finternal_lisp_face_attribute_values)
14246 (Finternal_merge_in_global_face, syms_of_xfaces):
14247 * xfns.c (x_default_scroll_bar_color_parameter)
14248 (x_default_font_parameter, x_create_tip_frame):
14249 * xfont.c (xfont_supported_scripts):
14250 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
14251 (menu_help_callback, xmenu_show):
14252 * xml.c (make_dom):
14253 * xterm.c (set_wm_state):
14254 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
14255 and similarly for list2 through list5.
14256
14257 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
14258
14259 * callproc.c (Fcall_process_region): Fix minor race and tune.
14260 (create_temp_file): New function, with the temp-file-creation part
14261 of the old Fcall_process_region. Use Fcopy_sequence to create the
14262 temp file name, rather than alloca + build_string, for simplicity.
14263 Don't bother to block input around the temp file creation;
14264 shouldn't be needed. Simplify use of mktemp.
14265 Use record_unwind_protect immediately after creating the temp file;
14266 this closes an unlikely race where the temp file was not removed.
14267 Use memcpy rather than an open-coded loop.
14268 (Fcall_process_region): Use the new function. If the input is
14269 empty, redirect from /dev/null rather than from a newly created
14270 empty temp file; this avoids unnecessary file system traffic.
14271
14272 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
14273
14274 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
14275 Simplify by making this case like the other two. This is a bit
14276 slower on obsolete hosts, but the extra complexity isn't worth it.
14277
14278 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
14279 * process.c (create_process) [!DOS_NT]:
14280 Remove now-unnecessary calls to emacs_close.
14281
14282 2013-07-13 Eli Zaretskii <eliz@gnu.org>
14283
14284 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
14285 returning early. (Bug#14850)
14286
14287 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
14288 and inhibit-iso-escape-detection attributes of 'undecided'.
14289 (Bug#14822)
14290
14291 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
14292
14293 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
14294 Reported by Herbert J. Skuhra in
14295 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
14296
14297 Don't lose top specpdl entry when memory is exhausted.
14298 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
14299 specpdl overflow here, to simplify callers; all callers changed.
14300 Always reserve an unused entry at the stack top; this avoids
14301 losing the top entry's information when memory is exhausted.
14302
14303 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14304
14305 Clean up errno reporting and fix some errno-reporting bugs.
14306 * callproc.c (Fcall_process):
14307 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
14308 * process.c (create_process, Fmake_network_process):
14309 * unexaix.c (report_error):
14310 * unexcoff.c (report_error):
14311 Be more careful about reporting the errno of failed operations.
14312 The code previously reported the wrong errno sometimes.
14313 Also, prefer report_file_errno to setting errno + report_file_error.
14314 (Fcall_process): Look at openp return value rather than at path,
14315 as that's a bit faster and clearer when there's a numeric predicate.
14316 * fileio.c (report_file_errno): New function, with most of the
14317 old contents of report_file_error.
14318 (report_file_error): Use it.
14319 (Ffile_exists_p, Ffile_accessible_directory_p):
14320 Set errno to 0 when it is junk.
14321 * fileio.c (Faccess_file):
14322 * image.c (x_create_bitmap_from_file):
14323 Use faccessat rather than opening the file, to avoid the hassle of
14324 having a file descriptor open.
14325 * lisp.h (report_file_errno): New decl.
14326 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
14327
14328 Minor EBADF fixes.
14329 * process.c (create_process, wait_reading_process_output) [AIX]:
14330 Remove obsolete SIGHUP-related code, as Emacs no longer disables
14331 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
14332 a multithreaded environment anyway).
14333 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
14334
14335 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
14336
14337 * image.c (x_find_image_file): Don't close a remote file handle.
14338
14339 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14340
14341 Fix races with threads and file descriptors.
14342 * callproc.c (Fcall_process_region):
14343 * dired.c (open_directory):
14344 * emacs.c (main, Fdaemon_initialized):
14345 * image.c (x_find_image_file):
14346 * inotify.c (Finotify_rm_watch):
14347 * lread.c (Flocate_file_internal):
14348 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
14349 * term.c (term_mouse_moveto, init_tty):
14350 * termcap.c (tgetent):
14351 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
14352 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
14353 * unexhp9k800.c, unexmacosx.c (unexec):
14354 * callproc.c (Fcall_process_region):
14355 Use emacs_close, not close.
14356 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
14357 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
14358 and posix_close function on current platforms (which all lack them).
14359 (emacs_close): Use it. This should fix the races on GNU/Linux and
14360 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
14361 and it should avoid closing random victim file descriptors on
14362 other platforms.
14363
14364 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
14365
14366 * inotify.c (uninitialized): Remove. All uses replaced by -1.
14367 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
14368 Touch up doc a bit.
14369
14370 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
14371 This is for .gdbinit xbacktrace.
14372
14373 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
14374 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
14375 (emacs_set_tty): Now static.
14376 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
14377 * term.c (tty_capable_p, tty_default_color_capabilities)
14378 (get_tty_terminal, term_mouse_movement)
14379 (handle_one_term_event, init_tty, maybe_fatal):
14380 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
14381 (tgetent, scan_file, name_match, compare_contin):
14382 * terminal.c (get_terminal):
14383 Use bool for boolean.
14384 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
14385 Prefer char to unsigned char if either will do.
14386 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
14387 (tty_write_glyphs): Prefer int to unsigned.
14388 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
14389 All callers changed.
14390 * termcap.c (tprint, main) [TEST]: Remove non-working test.
14391
14392 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14393
14394 Port to C89.
14395 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
14396 (B__dummy__): New dummy symbol, to pacify C89.
14397 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
14398 they can't grok varargs macros.
14399 * dispnew.c (add_window_display_history)
14400 (add_frame_display_history):
14401 * print.c (print_object):
14402 * xdisp.c (debug_method_add):
14403 Use %p printf format only for void pointers.
14404 * emacs.c (usage_message): New constant, replacing ...
14405 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
14406 (main): Adjust to usage reorg.
14407 * fns.c (syms_of_fns):
14408 * profiler.c (syms_of_profiler):
14409 Don't use non-constant struct initializers.
14410 * gnutls.h (gnutls_initstage_t):
14411 * lisp.h (enum Lisp_Fwd_Type):
14412 * lread.c (lisp_file_lexically_bound_p):
14413 * xsettings.c (anonymous enum):
14414 Remove trailing comma.
14415 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
14416 * lisp.h (ENUM_BF): Use unsigned if pedantic.
14417 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
14418 (DEFUN): Use it.
14419 * regex.c (const_re_char): New type, to pacify strict C89.
14420 All uses of 'const re_char' replaced to use it.
14421 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
14422 with glibc when strict C89. This change is imported from gnulib.
14423 All uses changed.
14424 (_Restrict_arr_): Rename from __restrict_arr, similarly.
14425 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
14426 Omit GNU_LINUX implementation, since it requires long long.
14427 * xterm.c (x_draw_underwave):
14428 Do not assume the traditional order of struct's members.
14429 (x_term_init): Rewrite to avoid the need for non-constant structure
14430 initializers.
14431
14432 Syntax cleanup, mostly replacing macros with functions.
14433 This removes the need for the syntax_temp hack.
14434 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
14435 * syntax.c (SYNTAX_INLINE): New macro.
14436 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
14437 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
14438 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
14439 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
14440 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
14441 (SYNTAX_COMEND_FIRST): Now functions, not macros.
14442 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
14443 Now constants, not macros.
14444 (syntax_temp) [!__GNUC__]: Remove.
14445 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
14446 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
14447 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
14448 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
14449 Move here from syntax.h; now functions, not macros. Except for the
14450 last function, these are static since only syntax.c uses them.
14451 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
14452 All uses changed. Now a function, not a macro; use this fact
14453 to simplify the code.
14454 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
14455 compiler bugs; no longer relevant.
14456 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
14457 (SYNTAX_INLINE): New macro.
14458 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
14459 for the new functions. Use bool for boolean member.
14460 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
14461 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
14462 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
14463 (SETUP_BUFFER_SYNTAX_TABLE):
14464 Now extern inline functions, not macros.
14465 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
14466 Remove; all uses replaced by implementation.
14467 (syntax_temp) [!__GNUC__]: Remove decl.
14468 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
14469
14470 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
14471
14472 * emacs.c (main): Fix syntax error.
14473
14474 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14475
14476 Timestamp fixes for undo (Bug#14824).
14477 * atimer.c (schedule_atimer):
14478 * fileio.c (Ffile_newer_than_file_p):
14479 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
14480 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
14481 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
14482 (syms_of_fileio): Remove Sclear_visited_file_name.
14483 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
14484 file doesn't exist; this avoids an ambiguity with negative timestamps.
14485 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
14486 * systime.h (make_emacs_time, invalid_emacs_time):
14487 Don't assume struct timespec layout; POSIX doesn't guarantee it.
14488 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
14489 * undo.c (record_first_change): Push (visited-file-modtime) onto
14490 undo list rather than reimplementing it by hand, incorrectly.
14491
14492 2013-07-09 Ken Brown <kbrown@cornell.edu>
14493
14494 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
14495
14496 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
14497
14498 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
14499
14500 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
14501
14502 Handle errno and exit status a bit more carefully.
14503 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
14504 number into an exit status. Instead, use EXIT_CANCELED.
14505 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
14506 * callproc.c (relocate_fd):
14507 * emacs.c (close_output_streams, main):
14508 * process.c (create_process):
14509 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
14510 Use emacs_perror for simplicity.
14511 * callproc.c (relocate_fd, main):
14512 * sysdep.c (sys_subshell):
14513 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
14514 (shut_down_emacs): Use emacs_write, not write.
14515 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
14516 * fileio.c (Fcopy_file, e_write):
14517 * nsterm.m (ns_select):
14518 * process.c (send_process):
14519 * sound.c (vox_write):
14520 Use emacs_write_sig, not emacs_write.
14521 * lisp.h (emacs_write_sig, emacs_perror): New decls.
14522 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
14523 New constants.
14524 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
14525 of write.
14526 (emacs_full_write): New function.
14527 (emacs_write): Rewrite to use it.
14528 (emacswrite_sig, emacs_perror): New functions.
14529 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
14530
14531 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
14532
14533 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
14534 on NS even if it is present. Pixmap on NS is a void*.
14535
14536 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14537
14538 Port to Ubuntu 10 (Bug#14803). Reported by T.V. Raman.
14539 * process.c (close_on_exec, accept4, process_socket):
14540 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
14541
14542 2013-07-07 Eli Zaretskii <eliz@gnu.org>
14543
14544 * w32.c (sys_dup): Declare prototype.
14545
14546 * filelock.c:
14547 * emacs.c:
14548 * callproc.c [WINDOWSNT]: Include sys/socket.h.
14549
14550 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14551
14552 Make file descriptors close-on-exec when possible (Bug#14803).
14553 This simplifies Emacs a bit, since it no longer needs to worry
14554 about closing file descriptors by hand in some cases.
14555 It also fixes some unlikely races. Not all such races, as
14556 libraries often open files internally without setting
14557 close-on-exec, but it's an improvement.
14558 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
14559 * callproc.c (Fcall_process) [!MSDOS]:
14560 * emacs.c (main) [!DOS_NT]:
14561 * nsterm.m (ns_term_init):
14562 * process.c (create_process):
14563 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
14564 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
14565 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
14566 Prefer mkostemp with O_CLOEXEC to mkstemp.
14567 * callproc.c (relocate_fd) [!WINDOWSNT]:
14568 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
14569 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
14570 now using pipe2.
14571 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
14572 Make the resulting file descriptor close-on-exec.
14573 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
14574 * lread.c (load_descriptor_list, load_descriptor_unwind):
14575 Remove; no longer needed. All uses removed.
14576 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
14577 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
14578 New functions.
14579 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
14580 (Fmake_network_process, Fnetwork_interface_list)
14581 (Fnetwork_interface_info, server_accept_connection):
14582 Make newly-created socket close-on-exec.
14583 * sysdep.c (emacs_open, emacs_fopen):
14584 Make new-created descriptor close-on-exec.
14585 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
14586 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
14587
14588 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
14589
14590 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
14591 for NS_IMPL_GNUSTEP.
14592
14593 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14594
14595 Fix openp errno handling.
14596 * callproc.c (Fcall_process): Preserve openp errno around close.
14597 * lread.c (openp): Set errno when returning -1, as some callers
14598 expect this.
14599
14600 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
14601
14602 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
14603
14604 * nsterm.h (NSSavePanel): Update comment.
14605 (NSAPP_DATA2_RUNFILEDIALOG): Define.
14606 (ns_run_file_dialog): Declare.
14607
14608 * nsfns.m: Remove panelOK.
14609 (ns_fd_data): New.
14610 (ns_run_file_dialog): New function.
14611 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
14612 event loop, so file dialog is popped up by ns_run_file_dialog, called
14613 by sendEvent (Bug#14578).
14614 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
14615
14616 2013-07-06 Eli Zaretskii <eliz@gnu.org>
14617
14618 * xdisp.c (default_line_pixel_height): New function.
14619 (pos_visible_p, move_it_vertically_backward, try_scrolling)
14620 (try_cursor_movement, redisplay_window, try_window)
14621 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
14622
14623 * window.c (window_scroll_pixel_based):
14624 use default_line_pixel_height.
14625
14626 * dispextern.h (default_line_pixel_height): Add prototype.
14627
14628 * frame.c (x_set_line_spacing): Accept a float value for
14629 line-spacing parameter, per the documentation.
14630
14631 * data.c (Fmultibyte_string_p): Doc fix.
14632
14633 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
14634
14635 Use emacs_open more consistently when opening files.
14636 This handles EINTR more consistently now, and makes it easier
14637 to introduce other uniform changes to file descriptor handling.
14638 * sysstdio.h: New file.
14639 * buffer.c (mmap_init):
14640 * cygw32.c (chdir_to_default_directory):
14641 * dispnew.c (Fopen_termscript):
14642 * emacs.c (Fdaemon_initialized):
14643 * fileio.c (Fdo_auto_save):
14644 * image.c (slurp_file, png_load_body, jpeg_load_body):
14645 * keyboard.c (Fopen_dribble_file):
14646 * lread.c (Fload):
14647 * print.c (Fredirect_debugging_output):
14648 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
14649 * termcap.c (tgetent):
14650 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
14651 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
14652 * w32term.c (w32_initialize) [CYGWIN]:
14653 * xfaces.c (Fx_load_color_file):
14654 Use emacs_open instead of plain open, and emacs_fopen instead of
14655 plain fopen.
14656 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
14657 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
14658 * callproc.c (default_output_mode): New constant.
14659 (Fcall_process): Use it to call emacs_open instead of plain creat.
14660 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
14661 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
14662 (emacs_fopen): New function.
14663 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
14664 Include <lisp.h>, for emacs_open.
14665 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
14666
14667 Remove duplicate #include directives.
14668 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
14669 * xfaces.c:
14670 Don't include stdio.h twice.
14671 * buffer.c [USE_MMAP_FOR_BUFFERS]:
14672 Don't include sys/types.h or stdio.h twice.
14673 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
14674 * lread.c: Don't include coding.h twice.
14675 * nsfont.m: Don't include frame.h twice.
14676 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
14677 * ralloc.c: Don't include <unistd.h> twice.
14678 * xdisp.c: Don't include font.h twice.
14679 * xterm.c: Don't include fontset.h twice.
14680 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
14681
14682 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14683
14684 Scale ImageMagick images more carefully.
14685 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
14686 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
14687 Be more careful about avoiding undefined behavior after
14688 integer overflow and division by zero.
14689
14690 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14691
14692 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
14693 (syms_of_w32fns): DEFSYM them.
14694 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
14695 (CCHDEVICENAME): Define macros if not defined.
14696 (struct MONITOR_INFO_EX): New struct.
14697 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
14698 (enum_display_monitors_fn): New variable.
14699 (globals_of_w32fns): Initialize it.
14700 (Fx_display_pixel_width, Fx_display_pixel_height)
14701 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
14702 multi-monitor setups in docstrings.
14703 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
14704 screen size by primary monitor's millimeter per pixel.
14705 (w32_monitor_enum, w32_display_monitor_attributes_list)
14706 (w32_display_monitor_attributes_list_fallback)
14707 (Fw32_display_monitor_attributes_list): New functions.
14708 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
14709
14710 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
14711 if not defined.
14712 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
14713
14714 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
14715
14716 * fileio.c (Qfile_notify_error): New error symbol.
14717
14718 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
14719 * inotify.c (inotify_callback, symbol_to_inotifymask)
14720 (Finotify_add_watch, Finotify_rm_watch): Use it.
14721 (inotifyevent_to_event): Exchange order of cookie and file name.
14722 (Finotify_add_watch): Adapt docstring.
14723
14724 * lisp.h (Qfile_notify_error): Declare.
14725
14726 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14727
14728 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
14729 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14730 Do not clear _malloc_thread_enabled_p, undoing the previous change,
14731 which did not work (see <http://bugs.gnu.org/14569#307>).
14732 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
14733 && (!noninteractive || initialized)). This attempts to thread
14734 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
14735
14736 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
14737
14738 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
14739 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
14740
14741 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14742
14743 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
14744 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14745 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
14746 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
14747
14748 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14749
14750 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
14751 Define to __sys_siglist.
14752
14753 2013-07-02 Eli Zaretskii <eliz@gnu.org>
14754
14755 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
14756 word-wrap, so that overflow-newline-into-fringe would work in
14757 visual-line-mode. (Bug#2749)
14758 (move_it_in_display_line_to): When the last scanned display
14759 element fits exactly on the display line, and
14760 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
14761 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
14762 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
14763 finding buffer position that corresponds to pixel coordinates,
14764 e.g. in buffer_posn_from_coords.
14765
14766 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
14767
14768 * process.c (handle_child_signal): Call catch_child_signal if
14769 NS_IMPL_GNUSTEP.
14770
14771 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14772
14773 Don't convert function pointers to void * and back.
14774 It isn't portable C, and it's easy enough to avoid.
14775 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
14776 (make_save_value): Add support for SAVE_FUNCPOINTER.
14777 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
14778 * print.c (print_object):
14779 Distinguish function from object pointers.
14780 * lisp.h (SAVE_FUNCPOINTER): New constant.
14781 (SAVE_SLOT_BITS): Adjust to it.
14782 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
14783 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
14784 (voidfuncptr): New typedef.
14785 (struct Lisp_Save_Value): New member data[0].funcpointer.
14786 (XSAVE_FUNCPOINTER): New function.
14787
14788 Simplify buildobj processing.
14789 * Makefile.in (buildobj.h): Make it a sequence of strings each
14790 followed by comma, rather than a single string. Put it into a
14791 .tmp file in case there's an error while generating it.
14792 (gl-stamp): Use .tmp for temp files.
14793 (mostlyclean): Clean .tmp files.
14794 * doc.c (buildobj): Move to just the routine that needs it.
14795 It's now an array of strings, so processing is simpler.
14796
14797 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
14798
14799 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
14800 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
14801 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14802 Invoke malloc_enable_thread even when not interactive.
14803 Reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
14804 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
14805 in this case, since the underlying bug has now been fixed.
14806
14807 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
14808
14809 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
14810 unlinking it (bug#14691).
14811
14812 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
14813
14814 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
14815 before checking whether buffer is modified. This lets
14816 `kill-buffer-query-functions' cancel killing of the buffer or save
14817 its content before `kill-buffer' asks user the "Buffer %s
14818 modified; kill anyway?" question.
14819
14820 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
14821
14822 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
14823 Let the super performKeyEquivalent deal with them (Bug#14747).
14824
14825 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
14826
14827 * widget.c (resize_cb): Remove unused local.
14828
14829 Do not use GTK 3 if it exists but cannot be compiled.
14830 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
14831 * xterm.c (x_error_handler) [!USE_GTK]:
14832 Do not use GTK 3.
14833
14834 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
14835
14836 2013-06-30 Eli Zaretskii <eliz@gnu.org>
14837
14838 * intervals.c (get_local_map): Instead of aborting, clip POSITION
14839 to the valid range of values. (Bug#14753)
14840
14841 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
14842 when moving point by using the current glyph matrix. This avoids
14843 the need to force redisplay when this function is called in a
14844 loop.
14845
14846 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
14847
14848 Fix minor problems found by static checking.
14849 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
14850 Redo the latter's body to sidestep GCC parenthesization warnings.
14851 (setup_coding_system, detect_coding, detect_coding_system): Use them.
14852 * coding.c (detect_coding, detect_coding_system):
14853 * coding.h (struct undecided_spec):
14854 Use bool for boolean.
14855 * image.c (QCmax_width, QCmax_height): Now static.
14856 * xdisp.c (Fmove_point_visually): Remove unused local.
14857
14858 2013-06-29 Eli Zaretskii <eliz@gnu.org>
14859
14860 * xdisp.c (Fmove_point_visually): New function.
14861
14862 2013-06-28 Kenichi Handa <handa@gnu.org>
14863
14864 * coding.h (define_coding_undecided_arg_index): New enum.
14865 (coding_attr_index): New members
14866 coding_attr_undecided_inhibit_null_byte_detection,
14867 coding_attr_undecided_inhibit_iso_escape_detection,
14868 coding_attr_undecided_prefer_utf_8.
14869 (undecided_spec): New struct.
14870 (struct coding_system): New member `undecided' of the member
14871 `spec'.
14872
14873 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
14874 (detect_coding): Likewise.
14875 (detect_coding_system): Likewise.
14876 (Fdefine_coding_system_internal): New coding system properties
14877 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
14878 :prefer-utf-8.
14879 (syms_of_coding): Adjust for coding_arg_undecided_max.
14880
14881 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
14882
14883 * image.c (x_from_xcolors): Remove unused local.
14884
14885 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14886
14887 Defer image data transfer between X client and server until actual
14888 display happens.
14889
14890 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
14891 and `mask_img'.
14892
14893 * image.c (Destroy_Image): Remove.
14894 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
14895 `mask_p', and `colors_p'. All uses changed.
14896 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
14897 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
14898 New macros for `flags' arg to x_clear_image_1.
14899 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
14900 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
14901 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
14902 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
14903 (image_get_x_image, image_unget_x_image): New functions or macros.
14904 (image_background, image_background_transparent, x_to_xcolors)
14905 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
14906 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
14907 instead of Destroy_Image.
14908 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
14909 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
14910 (png_load_body, jpeg_load_body, tiff_load, gif_load)
14911 (imagemagick_load_image, svg_load_image): Use them instead of
14912 x_create_x_image_and_pixmap, and x_put_x_image followed by
14913 x_destroy_x_image, respectively.
14914 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
14915 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
14916 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
14917 background_transparent fields.
14918 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
14919 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
14920
14921 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
14922
14923 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
14924 This mostly consists of undoing recent changes.
14925 * callproc.c (Fcall_process):
14926 * process.c (create_process):
14927 Do not worry about catching SIGCHLD here, undoing previous change.
14928 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
14929 * process.c, process.h (catch_child_signal):
14930 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
14931 * process.c (catch_child_handler): Don't worry about being called
14932 lazily and do not assume caller has blocked SIGCHLD, undoing
14933 previous change. Move first-time stuff back to
14934 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
14935 tickle glib, as that causes Cygwin bootstrap to fail. Do not
14936 set lib_child_handler if it's already initialized, which may
14937 help avoid problems on GNUstep.
14938
14939 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14940
14941 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
14942 * callproc.c (Fcall_process):
14943 * process.c (create_process):
14944 Make sure SIGCHLD is caught before we fork,
14945 since Emacs startup no arranges to catch SIGCHLD.
14946 * process.c (lib_child_handler): Initialize to null, not to
14947 dummy_handler.
14948 (catch_child_signal): Allow self to be called lazily.
14949 Do nothing if it's already been called.
14950 Assume caller has blocked SIGCHLD (all callers do now).
14951 * emacs.c (main): Do not catch SIGCHLD here; defer it until
14952 just before it's really needed.
14953 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
14954 since it hasn't been caught yet.
14955
14956 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
14957
14958 * image.c (compute_image_size): New function to implement
14959 :max-width and :max-height.
14960 (imagemagick_load_image): Use it.
14961
14962 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14963
14964 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
14965 * callproc.c, process.h (block_child_signal, unblock_child_signal):
14966 Now extern.
14967 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
14968 * process.c (catch_child_signal): Block SIGCHLD while futzing with
14969 the SIGCHLD handler, since the code is not atomic and (due to glib)
14970 signals may be arriving now.
14971 * sysdep.c (init_signals): Do not catch child signals here;
14972 'main' now does that later, at a safer time.
14973
14974 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
14975
14976 Clean up SIGCHLD handling a bit (Bug#14569).
14977 * process.c, process.h (catch_child_signal):
14978 Now always extern, even if !NS_IMPL_GNUSTEP.
14979 * process.c (catch_child_signal): Move glib tickler here from
14980 init_process_emacs, so that it's done earlier in Emacs
14981 initialization. Also move the noninteractive && !initialized
14982 check here from init_process_emacs. This is all a bit cleaner for
14983 GNUish platforms, and I hope it works around the Cygwin bug.
14984 * sysdep.c (init_signals): Invoke catch_child_signal here, so
14985 that glib signal handling is tickled before glib creates threads.
14986
14987 * process.c (wait_reading_process_output): Avoid int overflow
14988 when reading more than 2 GiB total from a process.
14989
14990 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
14991
14992 * process.c (create_process): Handle a couple more cases,
14993 i.e., work even if new_argv and wait_child_setup[i] are cached.
14994 Use Fcall_process's style for volatile vars.
14995
14996 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
14997
14998 * process.c (create_process): Mark PROCESS volatile.
14999
15000 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
15001
15002 Use C99-style flexible array members if available.
15003 This avoids some subtle aliasing issues, which typically
15004 aren't a problem with GCC but may be a problem elsewhere.
15005 * alloc.c (sdata): New typedef, replacing the old struct sdata.
15006 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
15007 In either case, it uses a flexible array member rather than
15008 the old struct hack. All uses changed.
15009 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
15010 Adjust to sdata reorganization.
15011 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
15012 Use offsetof (struct, flex_array_member), not sizeof (struct), as
15013 that ports better to pre-C99 non-GCC.
15014 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
15015 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
15016 as the latter has changed.
15017 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
15018 and port better to pre-C99 GCC.
15019 * image.c (struct xpm_cached_color):
15020 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
15021 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
15022 Use FLEXIBLE_ARRAY_MEMBER.
15023 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
15024 Move decl to top level so it gets checked against implementation.
15025 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
15026 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
15027
15028 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
15029
15030 * syntax.c: Integer cleanups.
15031 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
15032 All uses that need 0-or-2 changed to:
15033 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
15034 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
15035 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
15036 (char_quoted, prev_char_comend_first, back_comment)
15037 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
15038 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
15039 Use bool for boolean.
15040 (update_syntax_table, skip_chars, skip_syntaxes):
15041 Prefer int to unsigned when either will do.
15042 (back_comment): Return boolean success flag, like forw_comment,
15043 instead of positive-or-minus-1 (which might have overflowed int anyway).
15044 Don't stuff ptrdiff_t into int.
15045 (syntax_spec_code, syntax_code_spec): Now const.
15046 (Fmatching_paren, scan_lists, scan_sexps_forward):
15047 Use enum syntaxcode for syntax code.
15048 (Fmatching_paren): Check that arg is a character, not just an integer.
15049 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
15050 (Finternal_describe_syntax_value): Omit no-longer-needed
15051 comparison to 0.
15052 (skip_chars): Use char, not unsigned char, when the distinction
15053 doesn't matter.
15054 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
15055 * bytecode.c (exec_byte_code):
15056 * syntax.c (syntax_spec_code, Fchar_syntax)
15057 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
15058 (init_syntax_once):
15059 * syntax.h (SYNTAX_WITH_FLAGS):
15060 Omit unnecessary casts.
15061
15062 2013-06-20 Eli Zaretskii <eliz@gnu.org>
15063
15064 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
15065 line dimensions here, to avoid race conditions with the main
15066 thread. (Bug#14062, bug#14630, bug#14669)
15067
15068 * w32term.c (w32_draw_window_cursor): Compute the header line and
15069 mode line dimensions here.
15070 <w32_system_caret_window, w32_system_caret_hdr_height>:
15071 <w32_system_caret_mode_height>: New variables.
15072
15073 * w32term.h: Declare them.
15074
15075 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
15076
15077 * alloc.c (die): Move "assertion failed" string here ...
15078 * lisp.h (eassert): ... from here. Also, suppress evaluation of
15079 COND when SUPPRESS_CHECKING. This shrinks the executable text
15080 size by 0.8% to 2.2% when configured with --enable-checking,
15081 depending on optimization flags (GCC 4.8.1 x86-64).
15082
15083 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
15084
15085 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
15086
15087 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
15088 base is 2; this is more accurate.
15089
15090 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
15091
15092 * sound.c (string_default): Move to !WINDOWSNT section.
15093 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
15094
15095 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
15096
15097 * sound.c: Integer cleanups.
15098 Remove unnecessary forward decls.
15099 (struct sound_device): The 'file' member is now a Lisp_Object, not
15100 a char *, so that we needn't invoke alloca on a huge size.
15101 (Fplay_sound_internal): Adjust to this.
15102 (string_default): New function.
15103 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
15104 Use it to adjust to the struct sound_device change.
15105 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
15106 (be2hs) [0]: Remove.
15107
15108 * syntax.c (skip_chars): Don't use uninitialized storage
15109 when searching a multibyte buffer for characters that are not in a
15110 unibyte string that contains non-ASCII characters.
15111
15112 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
15113
15114 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
15115 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
15116
15117 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
15118
15119 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
15120
15121 2013-06-18 Kenichi Handa <handa@gnu.org>
15122
15123 * font.c (Ffont_spec): Signal an error for an invalid font name
15124 (Bug#14648).
15125
15126 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
15127
15128 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
15129 In particular this ports to 32-bit sparc Sun cc.
15130 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
15131 array with a dummy element at specpdl[-1], so that its address can
15132 be taken portably.
15133 (unbind_to): Do not copy the binding; not needed, now that we
15134 copy old_value in the one place where the copy is needed.
15135 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
15136 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
15137 (union specbinding): Rename from struct specbinding. Redo layout
15138 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
15139 which is not portable. With Sun C 5.12 32-bit sparc, the
15140 declaration causes nargs to be an unsigned bitfield, a behavior
15141 that the C standard allows; but Emacs wants nargs to be signed.
15142 The overall type is now a union of structures rather than a
15143 structure of union of structures, and the 'kind' member is now a
15144 bitfield, so that the overall type doesn't grow. All uses changed.
15145 * process.c (Fmake_serial_process): Remove unnecessary initialization.
15146
15147 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
15148
15149 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
15150 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
15151
15152 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
15153
15154 2013-06-17 Eli Zaretskii <eliz@gnu.org>
15155
15156 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
15157 unless we know that the window w's frame is a frame object.
15158 Another attempt at solving bug#14062 and bug#14630.
15159
15160 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
15161
15162 * textprop.c (property_set_type): New enum.
15163 (add_properties): Allow appending/prepending text properties.
15164 (add_text_properties_1): Factored out of Fadd_text_properties.
15165 (Fadd_text_properties): Move all the code into
15166 add_text_properties_1.
15167 (Fadd_face_text_property): New function that calls
15168 add_text_properties_1.
15169
15170 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
15171
15172 Move functions from lisp.h to individual modules when possible.
15173 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
15174 * alloc.c (XFLOAT_INIT, set_symbol_name):
15175 * buffer.c (CHECK_OVERLAY):
15176 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
15177 (set_char_table_parent):
15178 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
15179 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
15180 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
15181 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
15182 (set_blv_valcell):
15183 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
15184 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
15185 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
15186 (backtrace_args, backtrace_debug_on_exit):
15187 * floatfns.c (CHECK_FLOAT):
15188 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
15189 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
15190 (set_hash_hash, set_hash_hash_slot, set_hash_index)
15191 (set_hash_index_slot):
15192 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
15193 * marker.c (CHECK_MARKER):
15194 * textprop.c (CHECK_STRING_OR_BUFFER):
15195 * window.c (CHECK_WINDOW_CONFIGURATION):
15196 Move here from lisp.h, and make these functions static rather than
15197 extern inline.
15198 * buffer.c (Qoverlayp):
15199 * data.c (Qsubrp):
15200 * fns.c (Qhash_table_p):
15201 * window.c (Qwindow_configuration_p):
15202 Now static.
15203 * lisp.h: Remove the abovementioned defns and decls.
15204
15205 Use functions, not macros, for XINT etc (Bug#11935).
15206 In lisp.h, prefer functions to function-like macros, and
15207 constants to object-like macros, when either will do. This:
15208 . simplifies use, as there's no more need to worry about
15209 arguments' side effects being evaluated multiple times.
15210 . makes the code easier to debug on some platforms.
15211 However, when using gcc -O0, keep using function-like macros
15212 for a few critical operations, for performance reasons.
15213 This sort of thing isn't needed with gcc -Og, but -Og
15214 is a GCC 4.8 feature and isn't widely-enough available yet.
15215 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
15216 Remove enum lsb_bits; no longer needed.
15217 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
15218 * buffer.c (Qoverlap):
15219 * data.c (Qsubrp):
15220 * fns.c (Qhash_table_p):
15221 Now extern, so lisp.h can use these symbols.
15222 * dispextern.h: Include character.h, for MAX_CHAR etc.
15223 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15224 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15225 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15226 (GLYPH_CODE_P): Move here from lisp.h.
15227 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15228 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
15229 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
15230 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
15231 XUNTAG now returns void *.
15232 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
15233 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
15234 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
15235 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
15236 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
15237 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
15238 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
15239 (lisp_h_XPNTR, lisp_h_XSYMBOL):
15240 New macros, renamed from their sans-lisp_h_ counterparts.
15241 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
15242 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
15243 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
15244 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
15245 If compiling via GCC without optimization, define these as macros
15246 in addition to inline functions.
15247 To disable this, compile with -DINLINING=0.
15248 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
15249 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
15250 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
15251 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
15252 (INTMASK, VALMASK): Now macros, since static values cannot be
15253 accessed from extern inline functions.
15254 (VALMASK): Also a constant, for benefit of old GDB.
15255 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
15256 is INTEGERP, which can fold it in.
15257 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
15258 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
15259 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
15260 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
15261 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
15262 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
15263 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
15264 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
15265 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
15266 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
15267 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
15268 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
15269 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
15270 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
15271 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
15272 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
15273 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
15274 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
15275 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
15276 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
15277 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
15278 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
15279 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
15280 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
15281 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
15282 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
15283 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
15284 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
15285 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
15286 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
15287 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
15288 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
15289 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
15290 Now functions.
15291 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
15292 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
15293 (VALMASK): Define in one place rather than in two, merging the
15294 USE_LSB_TAG parts; this is simpler.
15295 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
15296 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
15297 Move up, to avoid use before definition.
15298 Also include "globals.h" earlier, for the same reason.
15299 (make_natnum): New function.
15300 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
15301 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
15302 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
15303 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
15304 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
15305 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
15306 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
15307 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
15308 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
15309 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
15310 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
15311 (Qwindow_configuration_p, Qimage): New forward declarations.
15312 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
15313 (STRING_COPYIN): Remove; unused.
15314 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
15315 (xcar_addr, xcdr_addr): New functions. All uses changed.
15316 (IEEE_FLOATING_POINT): Now a constant, not a macro.
15317 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15318 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15319 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15320 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
15321 (TYPE_RANGED_INTEGERP): Simplify.
15322 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
15323 (setlocale, fixup_locale, synchronize_system_messages_locale)
15324 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
15325 Now empty functions, not macros.
15326 (functionp): Return bool, not int.
15327 * window.c (Qwindow_configuration_p): Now extern,
15328 so window.h can use it.
15329 * window.h (Qwindowp): Move decl back to lisp.h.
15330
15331 2013-06-15 Eli Zaretskii <eliz@gnu.org>
15332
15333 * xdisp.c (Fline_pixel_height): New function, required for solving
15334 bug #14567.
15335
15336 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
15337
15338 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
15339
15340 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
15341
15342 * lread.c (syms_of_lread):
15343 * fns.c (Fprovide): Adjust to new format of after-load-alist.
15344
15345 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
15346
15347 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
15348
15349 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
15350
15351 * fileio.c (expand_file_name): Doc fix.
15352
15353 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
15354
15355 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
15356 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
15357 Wait for self, not for 0. This can't hurt on GNU or similar
15358 system, and may help with Cygwin.
15359
15360 * keyboard.c: Don't use PROP (...) as an lvalue.
15361 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
15362 Use set_prop (A, B), not PROP (A) = B.
15363
15364 2013-06-10 Eli Zaretskii <eliz@gnu.org>
15365
15366 * xdisp.c (get_it_property): Use it->window instead of generating
15367 a Lisp object from it->w.
15368
15369 2013-06-09 Eli Zaretskii <eliz@gnu.org>
15370
15371 * xdisp.c (get_it_property): If it->object is a buffer, pass to
15372 get-char-property the window that is being rendered, instead of
15373 the buffer, to support window-specific overlays. (Bug#14575)
15374 (compute_display_string_pos): When W is NULL, use the current
15375 buffer as the object to pass to get-char-property.
15376 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
15377 pointer member of the bidi iterator, since no window is pertinent
15378 to this function.
15379
15380 2013-06-08 Eli Zaretskii <eliz@gnu.org>
15381
15382 * bidi.c (bidi_fetch_char): Accept additional argument, the window
15383 being displayed, and pass it to compute_display_string_pos.
15384 (bidi_level_of_next_char, bidi_resolve_explicit_1)
15385 (bidi_paragraph_init): All callers changed.
15386
15387 * xdisp.c (init_from_display_pos, init_iterator)
15388 (handle_single_display_spec, next_overlay_string)
15389 (get_overlay_strings_1, reseat_1, reseat_to_string)
15390 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
15391 Set bidi_it.w member from it->w.
15392 (compute_display_string_pos): Accept additional argument, the
15393 window being displayed, and pass it to Fget_char_property.
15394 (Bug#14575)
15395
15396 * dispextern.h (struct bidi_it): New member w, the window being
15397 displayed.
15398 (compute_display_string_pos): Adjust prototype.
15399
15400 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
15401
15402 * xgselect.c: Remove unneeded include xterm.h.
15403
15404 * process.c (wait_reading_process_output): Check for NS before GLIB.
15405 GLIB may be linked in due to rsvg, but ns_select must be called.
15406
15407 * xgselect.c (xg_select): Remove call to window_system_available
15408 and g_main_context_pending at the top, so Gdk events (i.e. file
15409 notify) are processed when Emacs is started with -nw.
15410
15411 2013-06-07 Eli Zaretskii <eliz@gnu.org>
15412
15413 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
15414 (ctagsfiles3): New variable, includes only *.m files.
15415 (TAGS): Use an explicit language name in the regular expressions,
15416 to avoid transformation of '/SOMETHING' by MSYS to
15417 'c:\MSYS\SOMETHING'.
15418
15419 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
15420
15421 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
15422
15423 2013-06-06 Eli Zaretskii <eliz@gnu.org>
15424
15425 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
15426 still need to set the mouse pointer shape and activate help-echo.
15427 (Bug#14558)
15428
15429 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
15430
15431 A few porting etc. fixes for the new file monitor code.
15432 See the thread containing
15433 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
15434 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
15435 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
15436 (dir_monitor_callback, Fgfile_rm_watch):
15437 Use assq_no_quit instead of Fassoc, for speed.
15438 (dir_monitor_callback, Fgfile_rm_watch):
15439 eassert that the monitor is a fixnum.
15440 (dir_monitor_callback): No need for CDR_SAFE.
15441 Simplify building of lisp with alternative tails.
15442 (Fgfile_add_watch, Fgfile_rm_watch):
15443 Do not assume glib functions set errno reliably on failure.
15444 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
15445 and signal an error otherwise.
15446 (Fgfile_rm_watch): Prefer CONSP to !NILP.
15447 Use Fdelq instead of Fdelete, for speed.
15448
15449 2013-06-05 Eli Zaretskii <eliz@gnu.org>
15450
15451 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
15452 don't insist on being invoked on a highlighted tool-bar button.
15453 Avoids losing tool-bar functionality when mouse-highlight is nil.
15454 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
15455 Don't highlight when mouse-highlight is nil.
15456 (note_mouse_highlight): When mouse-highlight is nil, don't return
15457 right away; instead, run tool-bar and mode-line highlight
15458 subroutine, clear any existing highlight, and revert the mouse
15459 pointer to its default shape. (Bug#14558)
15460
15461 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15462
15463 * lisp.mk (lisp): Add prog-mode.el.
15464
15465 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
15466
15467 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
15468 * process.c (dummy_handler): New function.
15469 (lib_child_handler): New static var.
15470 (handle_child_signal): Invoke it.
15471 (catch_child_signal): If a library has set up a signal handler,
15472 save it into lib_child_handler.
15473 (init_process_emacs): If using glib and not on Windows, tickle glib's
15474 child-handling code so that it initializes its private SIGCHLD handler.
15475 * syssignal.h (SA_SIGINFO): Default to 0.
15476 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
15477 31; it should no longer be needed now.
15478
15479 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
15480
15481 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
15482
15483 * gfilenotify.c (globals_of_gfilenotify): New function.
15484 (syms_of_gfilenotify): Move global initialization there.
15485
15486 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
15487
15488 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15489
15490 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
15491 * keyboard.c (menu_bar_items, tool_bar_items):
15492 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
15493 not override local keymaps any more.
15494
15495 2013-06-04 Eli Zaretskii <eliz@gnu.org>
15496
15497 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
15498
15499 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15500
15501 * w32console.c (initialize_w32_display): Return the dimensions of
15502 the console window via 2 additional arguments, not via the current
15503 frame. This avoids crashes due to overrunning the bounds of
15504 frame's decode_mode_spec_buffer, which is not resized following
15505 the change of the frame dimensions from the initial 10x10.
15506
15507 * w32term.h (w32_initialize_display_info): Adjust prototype.
15508
15509 * term.c (init_tty): Take dimensions of the frame from the values
15510 returned by initialize_w32_display.
15511
15512 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
15513 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
15514 (LIBES): Add $(GFILENOTIFY_LIBS).
15515
15516 * w32inevt.c (handle_file_notifications): Add dummy implementation
15517 for !HAVE_W32NOTIFY.
15518
15519 * w32term.c: Wrap code with HAVE_W32NOTIFY.
15520
15521 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
15522
15523 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
15524
15525 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
15526
15527 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
15528
15529 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
15530
15531 Fix minor problems found by static checking.
15532 * data.c (pure_write_error):
15533 Use xsignal2, not Fsignal, as Fsignal might return.
15534 * eval.c (set_backtrace_debug_on_exit): Now static.
15535 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
15536 No longer inline. EXTERN_INLINE is needed only for functions
15537 defined in .h files. Reindent function header as per GNU style.
15538 (backtrace_p, backtrace_top, backtrace_next):
15539 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
15540 compiler or linker. Add extern decls to pacify gcc -Wall.
15541 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15542 Now static.
15543 * frame.c (free_monitors): Define only on platforms that need it.
15544 * nsterm.m (ns_term_init):
15545 * process.c (catch_child_signal):
15546 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
15547 defined on all porting targets these days.
15548 * process.c, process.h (catch_child_signal):
15549 Make it extern only if NS_IMPL_GNUSTEP is defined.
15550
15551 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15552
15553 * w32.c (gettimeofday): Make the signature identical to prototype
15554 in nt/inc/sys/time.h.
15555
15556 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15557
15558 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
15559 .gdbinit.
15560
15561 * keyboard.c (safe_run_hooks_error): Improve error message.
15562
15563 * data.c (pure_write_error): Add `object' argument.
15564 * puresize.h (CHECK_IMPURE): Use it.
15565
15566 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
15567
15568 * Makefile.in (NOTIFY_OBJ): New variable.
15569 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
15570
15571 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
15572 Call syms_of_gfilenotify.
15573
15574 * gfilenotify.c: New file.
15575
15576 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
15577 and Qfile_w32notify.
15578 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
15579 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
15580
15581 * lisp.h: Declare syms_of_gfilenotify.
15582
15583 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
15584
15585 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15586
15587 Merge the specpdl and backtrace stacks. Make the structure of the
15588 specpdl entries more obvious via a tagged union of structs.
15589 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
15590 (enum specbind_tag): New enum.
15591 (struct specbinding): Make it a tagged union of structs.
15592 Add a case for backtrace records.
15593 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
15594 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
15595 (backtrace_debug_on_exit): New accessors.
15596 (struct backtrace): Remove.
15597 (struct catchtag): Remove backlist field.
15598 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
15599 Move to eval.c.
15600 (Flocal_variable_p): Speed up the common case where the binding is
15601 already loaded.
15602 * eval.c (backtrace_list): Remove.
15603 (set_specpdl_symbol, set_specpdl_old_value): Remove.
15604 (set_backtrace_args, set_backtrace_nargs)
15605 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
15606 (backtrace_next): New functions.
15607 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
15608 (unwind_to_catch, internal_lisp_condition_case)
15609 (internal_condition_case, internal_condition_case_1)
15610 (internal_condition_case_2, internal_condition_case_n): Don't bother
15611 with backtrace_list any more.
15612 (Fsignal): Adjust to new backtrace format.
15613 (grow_specpdl): Move up.
15614 (record_in_backtrace): New function.
15615 (eval_sub, Ffuncall): Use it.
15616 (apply_lambda): Adjust to new backtrace format.
15617 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
15618 data.c.
15619 (specbind): Adjust to new specpdl format. Simplify.
15620 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
15621 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
15622 backtrace format.
15623 (mark_backtrace): Remove.
15624 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
15625 * xdisp.c (redisplay_internal): Use record_in_backtrace.
15626 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
15627 Use mark_specpdl.
15628 * profiler.c (record_backtrace): Use get_backtrace.
15629 (handle_profiler_signal): Use backtrace_top_function.
15630 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
15631 accessor functions.
15632
15633 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
15634
15635 * process.h (catch_child_signal): Declare.
15636
15637 * process.c (catch_child_signal): New function.
15638 (init_process_emacs): Call it.
15639
15640 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
15641 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
15642 NS_IMPL_COCOA.
15643 (x_set_cursor_type): Remove declaration.
15644 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
15645 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
15646 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
15647 (ns_get_color): Use F suffix on float.
15648 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
15649 (ns_get_rgb_color): Remove.
15650 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
15651 (note_mouse_movement): x and y are CGFloat.
15652 (ns_draw_fringe_bitmap): Remove unused rowY.
15653 Change #if to COCOA && >= 10_6.
15654 (ns_draw_window_cursor): Remove unused overspill.
15655 (ns_draw_underwave): width and x are EamcsCGFloat.
15656 (ns_draw_box): thickness is CGFloat.
15657 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
15658 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
15659 if not in main thread.
15660 (ns_get_pending_menu_title, ns_check_menu_open)
15661 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
15662 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
15663 (sendFromMainThread:): New method.
15664 (changeFont:): size is CGFloat.
15665 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
15666 Disable warning about permanent text.
15667 (characterIndexForPoint:): Adjust return type depending on GNUstep
15668 version.
15669 (mouseDown:): delta is CGFloat.
15670 (updateFrameSize): Remove unised variable f.
15671 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
15672 Cast float to EmacsCGFloat.
15673 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
15674 also to -1 when restoring.
15675 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
15676 inside NS_IMPL_COCOA.
15677 (toggleFullScreen:): Put call to toggleFullScreen inside
15678 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
15679 (setPosition:portion:whole:): por is CGFloat.
15680 (getMouseMotionPart:window:x:y:): Add F suffix to float.
15681 (mouseDown:): Use CGFloat.
15682 (mouseDragged:): Remove unised variable edge.
15683 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
15684
15685 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
15686 of CGFloat differs.
15687 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
15688 when NS_IMPL_GNUSTEP.
15689 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
15690 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
15691 (EmacsToolbar): Add clearAll. Add tag argument to
15692 addDisplayItemWithImage.
15693 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
15694
15695 * nsselect.m (ns_get_local_selection): Remove unused variable type.
15696
15697 * nsmenu.m (ns_update_menubar): Make static.
15698 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
15699 (fillWithWidgetValue:): Add cast to SEL for setAction.
15700 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
15701 (update_frame_tool_bar): Update code for GNUstep.
15702 (clearAll): New method.
15703 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
15704 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
15705 Move identifierToItem setObject and activeIdentifiers addObject before
15706 call to insertItemWithItemIdentifier.
15707 (validateVisibleItems): Fix indentation.
15708 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
15709 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
15710 UtilityWindow to aStyle, remove call to setStyleMask.
15711
15712 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
15713
15714 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
15715 (ns_charset_covers, ns_get_covering_families, nsfont_open):
15716 Use F suffix on floats.
15717 (ns_char_width): Returns CGFloat.
15718 (ns_ascii_average_width): w is CGFloat instead of float.
15719 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
15720 DPSxshow.
15721 (ns_glyph_metrics): CGFloat instead of float.
15722
15723 * nsfns.m (x_set_foreground_color, x_set_background_color):
15724 Use EmacsCGFloat.
15725 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
15726 remove unused variables.
15727 (Fns_read_file_name): Keep track if panel is for save.
15728 Use ns_filename_from_panel/ns_directory_from_panel.
15729 (Fns_list_services): delegate only used for COCOA.
15730 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
15731 Just return the input if GNUstep.
15732 (x_screen_planes): Remove.
15733 (Fxw_color_values): Use EmacsCGFloat
15734 (Fns_display_monitor_attributes_list): Only get screen number for
15735 Cocoa.
15736 (getDirectory, getFilename): Remove from EmacsOpenPanel and
15737 EmacsSavePanel.
15738 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
15739 ns_directory_from_panel.
15740
15741 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
15742
15743 * process.c (handle_child_signal): Also use WCONTINUED.
15744 This is so that list-processes doesn't mistakenly list the process
15745 as stopped, when the process has actually been continued and is
15746 now running.
15747
15748 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
15749
15750 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
15751 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
15752 not already configured.
15753
15754 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
15755
15756 2013-05-29 Eli Zaretskii <eliz@gnu.org>
15757
15758 * Makefile.in (mostlyclean): Remove *.res files.
15759
15760 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
15761
15762 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
15763 a buffer (bug#8447).
15764
15765 2013-05-27 Eli Zaretskii <eliz@gnu.org>
15766
15767 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
15768 display vector, and we backtrack, handle the case that the
15769 previous character position is also displayed from a display
15770 vector or covered by a display string or image. (Bug#14476)
15771
15772 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
15773
15774 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15775 (struct MonitorInfo, free_monitors): Remove.
15776 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
15777 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
15778 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15779 Qframes, Qsource.
15780
15781 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15782 (struct MonitorInfo, free_monitors): Remove.
15783 (ns_screen_name): Make static.
15784 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
15785 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15786 Qframes, Qsource.
15787
15788 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15789 (struct MonitorInfo): New struct.
15790 (free_monitors, make_monitor_attribute_list): Declare.
15791
15792 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15793 New Lisp_Object:s.
15794 (free_monitors, make_monitor_attribute_list): New functions.
15795 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
15796 Qsource.
15797
15798 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
15799
15800 * callproc.c (call_process): Refine the doc string. (Bug#14045)
15801
15802 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
15803
15804 * keyboard.c: Apply keyboard decoding only to events that come directly
15805 from the tty, not from unread-command-events (bug#14368).
15806 (read_event_from_main_queue): New function, extracted from read_char.
15807 (read_decoded_char): Remove.
15808 (read_decoded_event_from_main_queue): New function to replace it.
15809 (read_char): Use it.
15810 (read_key_sequence): Use read_char rather than read_decoded_char.
15811
15812 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
15813
15814 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
15815
15816 * casetab.c (init_casetab_once): Fix last change (bug#14424).
15817
15818 2013-05-22 Kenichi Handa <handa@gnu.org>
15819
15820 The following changes are to fix the setting of
15821 buffer-file-coding-system on, for instance, C-x RET c unix RET
15822 _FILE_OF_DOS_EOL_TYPE_ RET.
15823
15824 * coding.h (struct coding_system): New member detected_utf8_chars.
15825
15826 * coding.c (detect_coding_utf_8): Count characters and check EOL
15827 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
15828 BOM is there.
15829 (setup_coding_system): Do not initialize coding->head_ascii.
15830 (check_ascii): Do not set coding->eol_seen but update it. Do not
15831 call adjust_coding_eol_type here.
15832 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
15833 If the eol-type of CODING is already specified, adjust the eol type
15834 of the found coding-system.
15835 (decode_coding_gap): Cancel previous change. Utilize the
15836 character numbers counted by detect_coding_utf_8. Fix detection
15837 of BOM for utf-8.
15838
15839 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
15840
15841 * search.c (looking_at_1): Only set last_thing_searched if the match
15842 changed the match-data (bug#14281).
15843
15844 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
15845
15846 * xdisp.c (reseat_at_previous_visible_line_start):
15847 Already declared in dispextern.h, so remove it here.
15848 (move_it_vertically_backward): Likewise.
15849
15850 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15851
15852 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
15853 (Fx_display_pixel_width, Fx_display_pixel_height)
15854 (Fx_display_mm_width, Fx_display_mm_height):
15855 Mention `display-monitor-attributes-list' in docstrings.
15856
15857 * nsfns.m (ns_get_screen): Remove function. All uses removed.
15858 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
15859 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
15860 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
15861 (Fx_display_backing_store, Fx_display_visual_class)
15862 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
15863 (Fx_display_grayscale_p, Fx_display_pixel_width)
15864 (Fx_display_pixel_height, Fx_display_planes)
15865 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
15866 (Fx_display_screens): Don't confuse X11 screens with NS screens.
15867 (Fx_display_mm_width, Fx_display_mm_height)
15868 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
15869 height for all physical monitors as in X11.
15870
15871 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
15872 Return pixel width or height for all physical monitors as in X11.
15873
15874 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
15875
15876 Port --enable-gcc-warnings to clang.
15877 * bytecode.c (exec_byte_code):
15878 * regex.c:
15879 Redo diagnostic pragmas to pacify clang, too.
15880 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
15881 * editfns.c (Fencode_time):
15882 * fileio.c (file_accessible_directory_p):
15883 * font.c (font_unparse_xlfd):
15884 Use '&"string"[index]' instead of '"string" + (index)'.
15885 * undo.c (user_error): Remove; unused.
15886
15887 2013-05-16 Eli Zaretskii <eliz@gnu.org>
15888
15889 * insdel.c (insert_1_both): Document the arguments, instead of
15890 referring to insert_1, which no longer exists.
15891
15892 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
15893 some window, increment windows_or_buffers_changed, so that
15894 *Messages* display in that window is updated. (Bug#14408)
15895
15896 * w32.c: Include epaths.h.
15897 (init_environment): Use cmdproxy.exe without leading directories.
15898 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
15899 case.
15900 (gettimeofday): Adjust signature and return value to Posix
15901 expectations.
15902
15903 * unexw32.c (open_output_file): Delete the existing emacs.exe
15904 before creating it, to break the hard link to the versioned
15905 executable.
15906
15907 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
15908 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
15909 (FIRSTFILE_OBJ): New variables.
15910 (W32_RES): Rename to EMACSRES. All users changed.
15911 (base_obj): Use $(CM_OBJ).
15912 (ALLOBJS): Use $(FIRSTFILE_OBJ).
15913 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
15914 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
15915 $(W32_RES_LINK) before $(LIBES).
15916 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
15917
15918 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15919
15920 * makefile.w32-in (DOC): Use just "DOC".
15921
15922 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
15923
15924 * process.c: Export default filters and sentinels to Elisp.
15925 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
15926 New constants.
15927 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
15928 (Fset_process_sentinel, Fformat_network_address):
15929 Default to them instead of nil.
15930 (server_accept_connection): Sentinels can't be nil any more.
15931 (read_and_dispose_of_process_output): New function, extracted from
15932 read_process_output.
15933 (read_process_output): Use it; filters can't be nil.
15934 (Finternal_default_process_filter): New function, extracted from
15935 read_process_output.
15936 (exec_sentinel_unwind): Remove function.
15937 (exec_sentinel): Don't zilch sentinel while running.
15938 (status_notify): Sentinels can't be nil.
15939 (Finternal_default_process_sentinel): New function extracted from
15940 status_notify.
15941 (setup_process_coding_systems): Default filter is not nil any more.
15942 (syms_of_process): Export new Elisp functions and initialize
15943 new constants.
15944 * lisp.h (make_lisp_proc): New function.
15945
15946 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15947
15948 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
15949
15950 2013-05-14 Eli Zaretskii <eliz@gnu.org>
15951
15952 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
15953 unless we know that the window w is a leaf window.
15954 Another attempt at solving bug#14062.
15955
15956 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
15957
15958 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
15959 fdesc (Bug#14375).
15960
15961 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
15962
15963 * image.c (gif_load): Check that subimages fit (Bug#14345).
15964
15965 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
15966
15967 * lread.c (skip_dyn_eof): New function.
15968 (read1): Use it to skip the end of a file in response to #@00.
15969
15970 * doc.c (get_doc_string): Slightly relax the sanity checking.
15971
15972 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
15973
15974 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
15975 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15976 (MonitorInfo): New struct.
15977 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
15978 (Fns_display_monitor_attributes_list): New functions.
15979 (display-usable-bounds): Remove.
15980 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
15981 Qsource.
15982
15983 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
15984
15985 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
15986 (GTK_CHECK_VERSION): New macro, if not already defined.
15987 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
15988 replaced by GTK_CHECK_VERSION.
15989
15990 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
15991
15992 * xterm.h (GTK_PREREQ): New macro.
15993 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
15994 to use this macro instead, for consistency and clarity.
15995
15996 2013-05-08 Eli Zaretskii <eliz@gnu.org>
15997
15998 * xdisp.c (row_for_charpos_p): New function, with code of
15999 cursor_row_p, but accepts an additional argument CHARPOS instead
16000 of using a hardcoded PT.
16001 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
16002 (row_containing_pos): Call row_for_charpos_p instead of partially
16003 doing the same. Fixes cursor positioning under longlines-mode
16004 when longlines-show-effect includes more than one newline, when
16005 moving the cursor vertically up.
16006
16007 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
16008
16009 * makefile.w32-in (ACL_H): New macro.
16010 ($(BLD)/fileio.$(O)): Update dependencies.
16011
16012 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16013
16014 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
16015 * Makefile.in (LIB_ACL): New macro.
16016 (LIBACL_LIBS): Remove.
16017 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
16018 * fileio.c: Include <acl.h>.
16019 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
16020 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
16021 !acl_errno_valid.
16022 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
16023 it ourselves.
16024
16025 * unexelf.c: Don't assume ElfW (Half) fits in int.
16026 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
16027 when dealing with ElfW (Half) values, since they can exceed 2**31
16028 on 64-bit OpenBSD hosts. Reported by Han Boetes (privately).
16029 (entry_address): Omit unused NUM arg. All uses changed.
16030
16031 2013-05-07 Juri Linkov <juri@jurta.org>
16032
16033 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
16034 to the string converted from number with `Fnumber_to_string'.
16035 (Bug#14254)
16036
16037 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16038
16039 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
16040 This fixes a problem introduced by my previous change.
16041
16042 2013-05-07 Glenn Morris <rgm@gnu.org>
16043
16044 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
16045
16046 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
16047
16048 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
16049
16050 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
16051
16052 Static checking by GCC 4.8.0.
16053 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
16054 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
16055 (x_get_monitor_attributes_fallback)
16056 (x_get_monitor_attributes_xinerama)
16057 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
16058 Define only if USE_GTK.
16059 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
16060 (x_get_monitor_attributes_fallback): Omit unused locals.
16061 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
16062 Use double, not float, to avoid mixed-mode floating point arithmetic.
16063
16064 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16065 Jan Djärv <jan.h.d@swipnet.se>
16066
16067 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
16068 (XINERAMA_CFLAGS): New macros.
16069 (ALL_CFLAGS, LIBES): Use them.
16070
16071 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
16072 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
16073 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
16074 (syms_of_xfns): DEFSYM them.
16075 (struct MonitorInfo): New struct.
16076 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
16077 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
16078 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
16079 (x_get_monitor_attributes_xinerama): New functions.
16080 (Fx_display_monitor_attributes_list): New primitive.
16081 (syms_of_xfns): Defsubr it.
16082
16083 * xterm.h (x_display_info): Add Xatom_net_workarea and
16084 Xatom_net_current_desktop.
16085
16086 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
16087 and dpyinfo->Xatom_net_current_desktop.
16088
16089 2013-05-06 Eli Zaretskii <eliz@gnu.org>
16090
16091 * xdisp.c (pos_visible_p): Use the special code for finding the
16092 beginning of a display property or overlay for any "replacing"
16093 display property, not just for display strings. This solves
16094 incorrect reporting of position by posn-at-point. (Bug#14241)
16095
16096 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
16097
16098 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
16099 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
16100 Verify that ElfW (Half) fits in int.
16101 (fatal): Use same signature as lisp.h.
16102 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
16103 configure and build with -DUNEXELF_DEBUG without worrying about
16104 other modules that use DEBUG.
16105 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
16106 possibly-wide integers now uses it instead of plain fprintf.
16107 (entry_address): New function, which avoids problems with 32-bit
16108 overflow on 64-bit hosts.
16109 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
16110 (round_up): Don't assume the remainder fits in int.
16111 (find_section): Use bool for boolean. Simplify debug code.
16112 (unexec): Don't assume file sizes fit in int or size_t.
16113 Omit unnecessary trailing newline in 'fatal' format.
16114 Use strerror rather than outputting decimal error number.
16115 Remove unused code when emacs is not defined;
16116 this file relies on Emacs now.
16117 Don't assume e_phnum and e_shnum are positive.
16118
16119 * regex.c: Fix problems when DEBUG is defined.
16120 (extract_number, extract_number_and_incr): Define regardless of
16121 whether DEBUG is defined; that's simpler and makes the code less
16122 likely to go stale in the normal case when DEBUG is not defined.
16123 Return int rather than taking an int * arg. All callers changed.
16124 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
16125 Remove, replacing with ...
16126 (DEBUG_PRINT): New macro. All callers changed.
16127 (DEBUG_COMPILES_ARGUMENTS): New macro.
16128 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
16129 (print_compiled_pattern, print_double_string) [DEBUG]:
16130 Use prototype rather than old-style definition.
16131 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
16132 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
16133 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
16134 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
16135 Don't assume ptrdiff_t, size_t, and long are the same width as int.
16136 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
16137 This matters only when DEBUG is defined.
16138
16139 2013-05-05 Eli Zaretskii <eliz@gnu.org>
16140
16141 * xdisp.c (set_iterator_to_next): Set the
16142 ignore_overlay_strings_at_pos_p flag only if we are _really_
16143 iterating over an overlay string, as indicated by the
16144 current.overlay_string_index member. (Bug#14306)
16145
16146 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
16147
16148 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
16149 to where it is used, to avoid autorelease issues (Bug#14050).
16150
16151 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
16152
16153 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
16154 * fileio.c (syms_of_fileio): Implement this.
16155 * filelock.c (create_lock_file): If symbolic links don't work, so
16156 we use a regular file as a lock file, do not fsync the lock file;
16157 it's not needed.
16158
16159 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
16160
16161 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
16162 (syms_of_minibuf): Adjust accodingly.
16163 * lread.c (Fread):
16164 * callint.c (Fcall_interactively): Adjust calls accordingly.
16165
16166 2013-05-04 Eli Zaretskii <eliz@gnu.org>
16167
16168 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
16169 w->contents is a buffer before computing everything else.
16170 Use parentheses to disambiguate last part of the condition.
16171
16172 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
16173 assertion violations. (Bug#14062)
16174
16175 2013-05-01 David Reitter <david.reitter@gmail.com>
16176
16177 * nsfns.m (ns_tooltip): Initialize.
16178
16179 2013-04-28 Eli Zaretskii <eliz@gnu.org>
16180
16181 * coding.c (decode_coding_gap): Don't remove the character before
16182 a newline unless it's a CR character. (Bug#14287)
16183
16184 2013-04-28 Dan Nicolaescu <dann@gnu.org>
16185
16186 * dispextern.h (struct face): Move enum face_underline_type
16187 earlier so that bitfields can be in the same word.
16188
16189 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
16190
16191 * nsfns.m (handlePanelKeys): New function.
16192 (EmacsOpenPanel:performKeyEquivalent:)
16193 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
16194 arrows/function/control and copy/paste keys (Bug#14296).
16195
16196 2013-04-27 Juri Linkov <juri@jurta.org>
16197
16198 * callint.c (Fcall_interactively): Call `Qread_number' for
16199 interactive code letter `n' instead of using duplicate code.
16200 (Bug#14254)
16201
16202 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
16203
16204 * systime.h (make_timeval): Declare as 'const'.
16205
16206 2013-04-27 Kenichi Handa <handa@gnu.org>
16207
16208 * font.c (font_open_entity): Always open a font of manageable
16209 size.
16210
16211 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
16212
16213 Port better to AIX (Bug#14258).
16214 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
16215 to pacify AIX xlc.
16216
16217 2013-04-24 Kenichi Handa <handa@gnu.org>
16218
16219 * coding.c (decode_coding_iso_2022): When an invalid escape
16220 sequence is encountered, reset the invocation and designation
16221 status to the safest one.
16222
16223 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
16224
16225 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
16226 Without this fix, "make distclean" leaves stamp-h1 behind.
16227
16228 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
16229
16230 * w32fns.c (w32_fullscreen_rect): New function to compute the
16231 window rectangle for the given fullscreen mode.
16232 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
16233 longer tunes the window size. This keeps the window's edges flush
16234 with the screen and allows the taskbar to hide itself in fullboth.
16235
16236 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
16237 window decorations and uses the entire screen.
16238
16239 * w32term.h (w32_fullscreen_rect) Add prototype.
16240 (struct w32_output): Replace normal_width, normal_height,
16241 normal_top, and normal_left members with a single normal_placement
16242 struct.
16243 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
16244 Remove macros.
16245 (FRAME_NORMAL_PLACEMENT): New macro.
16246
16247 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
16248
16249 * minibuf.c (Ftest_completion): Silence compiler warning.
16250
16251 2013-04-15 Eli Zaretskii <eliz@gnu.org>
16252
16253 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
16254 bug#14062.
16255
16256 * frame.h (WINDOW_FRAME): Protect macro and its argument with
16257 parentheses.
16258
16259 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
16260 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
16261 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
16262 parentheses where appropriate.
16263
16264 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
16265
16266 * keyboard.c (timer_start_idle): Remove no-longer-used local.
16267
16268 2013-04-14 Eli Zaretskii <eliz@gnu.org>
16269
16270 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
16271 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
16272 Mention in the doc string that setting these variables takes
16273 effect only after a call to set-window-buffer. (Bug#14200)
16274
16275 2013-04-13 Eli Zaretskii <eliz@gnu.org>
16276
16277 * indent.c (Fvertical_motion): Don't consider display strings on
16278 overlay strings as display strings on the buffer position we
16279 started from. This prevents vertical cursor motion from jumping
16280 more than one line when there's an overlay string with a display
16281 property at end of line.
16282 Reported by Karl Chen <Karl.Chen@quarl.org> in
16283 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
16284
16285 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
16286
16287 * window.c (select_window): `record_buffer' even if window is
16288 already selected (bug#14191).
16289
16290 2013-04-11 Eli Zaretskii <eliz@gnu.org>
16291
16292 * window.c (Fwindow_end): Test more flags, including the buffer's
16293 last_overlay_modified flag, to determine whether the window's
16294 display is really up-to-date. Prevents the function from
16295 returning a stale value. (Bug#14170)
16296 (Fwindow_line_height): Fix the test for up-to-date-ness of the
16297 current matrix.
16298
16299 2013-04-10 Eli Zaretskii <eliz@gnu.org>
16300
16301 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
16302 garbaged only if it is not already the top frame on its TTY.
16303 This prevents flickering due to constant redrawing of TTY frames when
16304 there are GUI frames open in the same session. (Bug#13864)
16305
16306 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
16307
16308 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
16309 of marking the idle timers directly.
16310
16311 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
16312
16313 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
16314 tables (bug#14054).
16315
16316 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
16317
16318 * window.c (select_window): Don't record_buffer while the invariant is
16319 temporarily broken (bug#14161).
16320
16321 * fns.c (Fdelq): Don't assume !NILP => CONSP.
16322
16323 2013-04-07 Eli Zaretskii <eliz@gnu.org>
16324
16325 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
16326
16327 2013-04-07 Romain Francoise <romain@orebokech.com>
16328
16329 Ignore additional platform-specific ACL errors (Bug#13702).
16330 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
16331 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
16332
16333 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
16334
16335 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
16336 f->output_data.ns.
16337
16338 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
16339
16340 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
16341 This bug was introduced by my 2013-02-25 change that simplified
16342 data_start configuration. Without this change, on GNU/Linux
16343 an Emacs configured with --enable-profiling fails immediately
16344 due to a profiler signal.
16345 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
16346 with these flags. On platforms where special flags are needed
16347 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
16348 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
16349 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
16350
16351 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
16352
16353 Get rid of some platform-specific functions examining window
16354 system and its capabilities. This is a partial rework of the
16355 2013-04-05 change.
16356 * lisp.h (have_menus_p): Remove prototype. This function is
16357 replaced with platform-independent window_system_available.
16358 (check_window_system): Move to...
16359 * frame.h (decode_window_system_frame, window_system_available):
16360 ...here, add new prototypes.
16361 * frame.c (window_system_available, decode_window_system_frame):
16362 New functions.
16363 (check_window_system): Platform-independent now.
16364 * xterm.h (x_in_use): Remove declaration.
16365 (check_x_frame):
16366 * w32term.h (check_x_frame):
16367 * nsterm.h (check_x_frame): Remove prototypes. This function
16368 is replaced with platform-independent decode_window_system_frame.
16369 * msdos.c (have_menus_p): Remove.
16370 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
16371 Remove platform-specific functions. Use check_window_system,
16372 decode_window_system_frame and check_ns_display_info where
16373 appropriate. Minor style and comment tweaks.
16374 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
16375 (check_x_frame): Likewise.
16376 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
16377 Likewise.
16378 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
16379 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
16380 * xmenu.c, xselect.c: All related users changed.
16381
16382 2013-04-03 Kenichi Handa <handa@gnu.org>
16383
16384 The following changes is to optimize the code for reading UTF-8
16385 files.
16386
16387 * coding.c (check_ascii): Rename from detect_ascii. Return value
16388 changed. Check EOL format. Do not call adjust_coding_eol_type
16389 here.
16390 (check_utf_8): New function.
16391 (adjust_coding_eol_type): Do nothing if already adjusted.
16392 (detect_coding): Compare the return value of check_ascii with
16393 coding->src_bytes. Call adjust_coding_eol_type if necessary.
16394 (decode_coding_gap): Optimize for valid UTF-8.
16395
16396 2013-03-21 Kenichi Handa <handa@gnu.org>
16397
16398 * coding.c (syms_of_coding): Cancel previous change.
16399
16400 * insdel.c (insert_from_gap): Fix previous change.
16401
16402 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
16403
16404 Consistently use platform-specific function to detect window system.
16405 * lisp.h (check_window_system): New prototype. This function is
16406 going to replace check_x, check_w32 and check_ns.
16407 (have_menus_p): Mention msdos.c in comment.
16408 * fontset.c (check_window_system_func): Remove. Adjust all users.
16409 * fontset.h (check_window_system_func): Remove prototype.
16410 * nsterm.h (check_ns):
16411 * xterm.h (check_x):
16412 * w32term.h (check_w32): Likewise.
16413 * menu.c (Fx_popup_menu): Use check_window_system.
16414 * msdos.c (check_window_system): Define for MS-DOS.
16415 * nsfns.m (check_window_system): Define for NS. Adjust all users.
16416 * w32fns.c (check_window_system): Likewise for MS-Windows.
16417 * xfns.c (check_window_system): Likewise for X.
16418 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
16419 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
16420
16421 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
16422
16423 Prefer < to > in range checks such as 0 <= i && i < N.
16424 This makes it easier to visualize quantities on a number line.
16425 This patch doesn't apply to all such range checks,
16426 only to the range checks affected by the 2013-03-24 change.
16427 This patch reverts most of the 2013-03-24 change.
16428 * alloc.c (xpalloc, Fgarbage_collect):
16429 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
16430 * character.c (string_escape_byte8):
16431 * charset.c (read_hex):
16432 * data.c (cons_to_unsigned):
16433 * dispnew.c (update_frame_1):
16434 * doc.c (Fsubstitute_command_keys):
16435 * doprnt.c (doprnt):
16436 * editfns.c (hi_time, decode_time_components):
16437 * fileio.c (file_offset):
16438 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16439 * font.c (font_intern_prop):
16440 * frame.c (x_set_alpha):
16441 * gtkutil.c (get_utf8_string):
16442 * indent.c (check_display_width):
16443 * keymap.c (Fkey_description):
16444 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
16445 * lread.c (read1):
16446 * minibuf.c (read_minibuf_noninteractive):
16447 * process.c (wait_reading_process_output):
16448 * search.c (Freplace_match):
16449 * window.c (get_phys_cursor_glyph):
16450 * xdisp.c (redisplay_internal):
16451 * xsmfns.c (smc_save_yourself_CB):
16452 Prefer < to > for range checks.
16453 * dispnew.c (sit_for): Don't mishandle NaNs.
16454 This fixes a bug introduced in the 2013-03-24 change.
16455 * editfns.c (decode_time_components): Don't hoist comparison.
16456 This fixes another bug introduced in the 2013-03-24 change.
16457
16458 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
16459
16460 * frame.h (struct frame): Drop scroll_bottom_vpos
16461 member becaue all real users are dead long ago.
16462 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
16463 * xdisp.c (redisplay_internal): Adjust user.
16464
16465 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
16466
16467 * nsmenu.m (showAtX:Y:for:): setLevel to
16468 NSPopUpMenuWindowLevel (Bug#13998).
16469
16470 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
16471
16472 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
16473 (ns_check_pending_open_menu): Declare.
16474
16475 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
16476 (x_activate_menubar): Update the menu with title that matches
16477 ns_get_pending_menu_title, and call
16478 ns_check_pending_openmenu (Bug#12698).
16479 (menuWillOpen:): New method.
16480 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
16481
16482 * nsterm.m (menu_will_open_state, menu_mouse_point)
16483 (menu_pending_title): New varaibles.
16484 (ns_get_pending_menu_title, ns_check_menu_open)
16485 (ns_check_pending_open_menu): New functions.
16486
16487 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
16488
16489 * indent.c (current_column_bol_cache): Remove leftover which is not
16490 used in Fmove_to_column any more.
16491 (current_column, scan_for_column): Adjust users.
16492 * keyboard.c (last_point_position_buffer, last_point_position_window):
16493 Remove leftovers which are not used for recording undo any more.
16494 (command_loop_1, syms_of_keyboard): Adjust users.
16495 * xdisp.c (last_max_ascent): Remove leftover which is not used in
16496 redisplay_window any more.
16497 (move_it_to): Adjust user.
16498
16499 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
16500
16501 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
16502 Update dependencies.
16503
16504 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16505
16506 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
16507 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
16508 forward references.
16509
16510 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16511
16512 * window.h (struct window): Replace hchild, vchild and buffer slots
16513 with a single slot 'contents'. This is possible because each valid
16514 window may have either the child window (in vertical or horizontal
16515 combination) or buffer to display (for the leaf window). Using that,
16516 a lot of operations to traverse and/or change window hierarchies may
16517 be simplified. New member horizontal is used to distinguish between
16518 horizontal and vertical combinations of internal windows.
16519 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
16520 (WINDOW_VERTICAL_COMBINATION_P): New macros.
16521 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
16522 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
16523 Use contents slot, not buffer, where appropriate.
16524 (wset_combination): New function.
16525 (wset_buffer): Add eassert.
16526 (Fframe_first_window): Simplify the loop reaching first window.
16527 (Fwindow_buffer): Use WINDOW_LEAF_P.
16528 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
16529 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
16530 (unshow_buffer): Convert initial debugging check to eassert.
16531 (replace_window, recombine_windows, Fdelete_other_windows_internal)
16532 (make_parent_window, window_resize_check, window_resize_apply)
16533 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
16534 (Fset_window_configuration, delete_all_child_windows, save_window_save):
16535 Adjust to match struct window changes.
16536 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
16537 (mark_window_cursors_off, count_windows, get_leaf_windows)
16538 (foreach_window_1): Simplify the loop.
16539 * alloc.c (mark_object): Do not check for the leaf window because
16540 internal windows has no glyph matrices anyway.
16541 * dispnew.c (clear_window_matrices, showing_window_margins_p)
16542 (allocate_matrices_for_window_redisplay, fake_current_matrices)
16543 (allocate_matrices_for_frame_redisplay, free_window_matrices)
16544 (build_frame_matrix_from_window_tree, mirror_make_current)
16545 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
16546 (update_window_tree, set_window_update_flags): Simplify the loop.
16547 (sync_window_with_frame_matrix_rows): Enforce live window.
16548 Use contents slot, not buffer, where appropriate.
16549 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
16550 and WINDOW_HORIZONTAL_COMBINATION_P.
16551 (make_frame_visible_1): Simplify the loop.
16552 Use contents slot, not buffer, where appropriate.
16553 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
16554 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
16555 (expose_window_tree): Likewise.
16556 Use contents slot, not buffer, where appropriate.
16557 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
16558 to avoid deleted windows. Use contents slot instead of buffer.
16559 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
16560 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
16561 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
16562 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
16563
16564 2013-03-28 Eli Zaretskii <eliz@gnu.org>
16565
16566 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
16567 identify the reasons for assertion violations in bug#14062 and
16568 similar ones.
16569 (Fx_show_tip): Fix compilation error under
16570 "--enable-check-lisp-object-type". (Bug#14073)
16571
16572 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
16573 Reported by <rzl24ozi@gmail.com>.
16574
16575 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16576
16577 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
16578 start marker...
16579 (unwind_with_echo_area_buffer): ...to restore it here.
16580 This is needed to ensure that...
16581 (redisplay_window): ...both window markers are valid here,
16582 which is verified by eassert.
16583 * editfns.c (save_excursion_save): Do not assume that
16584 selected_window always displays the buffer.
16585 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
16586 Fix comment.
16587
16588 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
16589
16590 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
16591 the upcase table.
16592
16593 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
16594
16595 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
16596
16597 2013-03-27 Eli Zaretskii <eliz@gnu.org>
16598
16599 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
16600 since MinGW's w32api headers do. This avoids compiler warnings.
16601
16602 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
16603 if already defined.
16604
16605 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16606
16607 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
16608
16609 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
16610
16611 * gtkutil.c (style_changed_cb): Check if frame is live and an
16612 X frame (Bug#14038).
16613
16614 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16615
16616 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
16617 Define only for _WIN32_WINNT less than 0x0500.
16618 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
16619 MinGW64.
16620 Move inclusion of time.h before sys/time.h, so that MinGW64 could
16621 see its own definitions of 'struct timeval' and 'struct timezone'.
16622
16623 Fix incompatibilities between MinGW.org and MinGW64 headers.
16624 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
16625
16626 * w32.c (REPARSE_DATA_BUFFER): Guard with
16627 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
16628
16629 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
16630
16631 * xterm.c: Include X11/XKBlib.h
16632 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
16633
16634 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
16635
16636 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
16637 written backwards.
16638 * blockinput.h (input_blocked_p): Likewise.
16639 * bytecode.c (exec_byte_code): Likewise.
16640 * callproc.c (call_process_kill, call_process_cleanup)
16641 (Fcall_process): Likewise.
16642 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
16643 (Fccl_execute_on_string): Likewise.
16644 * character.c (string_escape_byte8): Likewise.
16645 * charset.c (read_hex): Likewise.
16646 * cm.c (calccost): Likewise.
16647 * data.c (cons_to_unsigned): Likewise.
16648 * dired.c (directory_files_internal, file_name_completion):
16649 Likewise.
16650 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
16651 (sit_for): Likewise.
16652 * doc.c (Fsubstitute_command_keys): Likewise.
16653 * doprnt.c (doprnt): Likewise.
16654 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
16655 * emacsgtkfixed.c: Likewise.
16656 * fileio.c (file_offset, Fwrite_region): Likewise.
16657 * floatfns.c (Fexpt, fmod_float): Likewise.
16658 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16659 Likewise.
16660 * font.c (font_intern_prop): Likewise.
16661 * frame.c (x_set_alpha): Likewise.
16662 * gtkutil.c (get_utf8_string): Likewise.
16663 * indent.c (check_display_width): Likewise.
16664 * intervals.c (create_root_interval, rotate_right, rotate_left)
16665 (split_interval_right, split_interval_left)
16666 (adjust_intervals_for_insertion, delete_node)
16667 (interval_deletion_adjustment, adjust_intervals_for_deletion)
16668 (merge_interval_right, merge_interval_left, copy_intervals)
16669 (set_intervals_multibyte_1): Likewise.
16670 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
16671 * keymap.c (Fkey_description): Likewise.
16672 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
16673 * lread.c (openp, read_integer, read1, string_to_number):
16674 Likewise.
16675 * menu.c (ensure_menu_items): Likewise.
16676 * minibuf.c (read_minibuf_noninteractive): Likewise.
16677 * print.c (printchar, strout): Likewise.
16678 * process.c (create_process, Faccept_process_output)
16679 (wait_reading_process_output, read_process_output, send_process)
16680 (wait_reading_process_output): Likewise.
16681 * profiler.c (make_log, handle_profiler_signal): Likewise.
16682 * regex.c (re_exec): Likewise.
16683 * regex.h: Likewise.
16684 * search.c (looking_at_1, Freplace_match): Likewise.
16685 * sysdep.c (get_child_status, procfs_ttyname)
16686 (procfs_get_total_memory): Likewise.
16687 * systime.h (EMACS_TIME_VALID_P): Likewise.
16688 * term.c (dissociate_if_controlling_tty): Likewise.
16689 * window.c (get_phys_cursor_glyph): Likewise.
16690 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
16691 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
16692 Likewise.
16693 * xfns.c (Fx_window_property): Likewise.
16694 * xmenu.c (set_frame_menubar): Likewise.
16695 * xselect.c (x_get_window_property, x_handle_dnd_message):
16696 Likewise.
16697 * xsmfns.c (smc_save_yourself_CB): Likewise.
16698 * xterm.c (x_scroll_bar_set_handle): Likewise.
16699
16700 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
16701
16702 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
16703 to be optional or nil. Adjust comment and convert it to docstring.
16704 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
16705 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
16706
16707 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
16708
16709 Static checking by GCC 4.8-20130319.
16710 * image.c (gif_load): Assume pass < 3 to pacify GCC.
16711 * process.c (Fset_process_datagram_address)
16712 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
16713 * xdisp.c (get_char_face_and_encoding)
16714 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
16715 (get_glyph_face_and_encoding): Prepare face before possibly using it.
16716 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
16717
16718 2013-03-24 Ken Brown <kbrown@cornell.edu>
16719
16720 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
16721 fix compilation on 64-bit Cygwin, where underscores are not
16722 automatically prepended.
16723
16724 * w32term.c (w32_initialize): Silence compiler warning.
16725
16726 2013-03-23 Eli Zaretskii <eliz@gnu.org>
16727
16728 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
16729 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
16730 variables, to save and restore frame dimensions.
16731 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
16732 after returning from a 'fullscreen' configuration.
16733 use SendMessage instead of PostMessage to send the SC_RESTORE message,
16734 to avoid races between the main thread and the input thread.
16735
16736 * w32term.h (struct w32_output): New members normal_width,
16737 normal_height, normal_top, normal_left, and prev_fsmode.
16738 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
16739 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
16740 members of a frame.
16741
16742 * w32term.c (w32fullscreen_hook): Record last value of the frame's
16743 'fullscreen' parameter. Always record previous width and height
16744 of the frame, except when switching out of maximized modes, so
16745 that they could be restored correctly, instead of resetting to the
16746 default frame dimensions. Send SC_RESTORE command to the frame,
16747 unless we are going to send SC_MAXIMIZE, to restore the frame
16748 resize hints in the mouse pointer shown by the window manager.
16749 (Bug#14032)
16750
16751 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
16752
16753 * lisp.h (get_frame_param): Adjust conditions for prototype
16754 declaration.
16755
16756 2013-03-22 Ken Brown <kbrown@cornell.edu>
16757
16758 * unexcw.c: Drop unneeded inclusion of w32common.h.
16759 (report_sheap_usage): Declare.
16760 (read_exe_header): Add magic numbers for x86_64.
16761 (fixup_executable): Fix printf format specifier for unsigned long
16762 argument.
16763
16764 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
16765
16766 * frame.h (struct frame): Put menu_bar_window under #ifdef
16767 because this member is not needed when X toolkit is in use.
16768 (fset_menu_bar_window):
16769 * dispnew.c (clear_current_matrices, clear_desired_matrices)
16770 (free_glyphs, update_frame):
16771 * xdisp.c (expose_frame): Likewise.
16772 (display_menu_bar): Likewise. Remove redundant eassert.
16773 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
16774 toolkit is in use.
16775
16776 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
16777
16778 Use functions and constants to manipulate Lisp_Save_Value objects.
16779 This replaces code that used macros and strings and token-pasting.
16780 The change makes the C source a bit easier to follow,
16781 and shrinks the Emacs executable a bit.
16782 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
16783 (make_save_value): Change 1st arg from string to enum. All callers
16784 changed.
16785 (INTX): Remove.
16786 (mark_object): Use if, not #if, for GC_MARK_STACK.
16787 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
16788 (XSAVE_OBJECT): Now functions, not macros.
16789 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
16790 the constant was never used.
16791 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
16792 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
16793 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
16794 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
16795 New constants.
16796 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
16797 type3 with a single member save_type. All uses changed.
16798 (save_type, set_save_pointer, set_save_integer): New functions.
16799 * print.c (PRINTX): Remove.
16800
16801 * alloc.c: Remove redundant static declarations.
16802
16803 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16804
16805 * window.h (struct window): Convert left_col, top_line, total_lines
16806 and total_cols from Lisp_Objects to integers. Adjust comments.
16807 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
16808 Remove.
16809 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
16810 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
16811 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
16812 Adjust users where appropriate.
16813
16814 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16815
16816 * frame.h (struct frame): Drop resx and resy because the same data is
16817 available from window system-specific output context. Adjust users.
16818 (default_pixels_per_inch_x, default_pixels_per_inch_y):
16819 New functions to provide defaults when no window system available.
16820 (FRAME_RES_X, FRAME_RES_Y): New macros.
16821 (NUMVAL): Move from xdisp.c.
16822 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
16823 (Ffont_face_attributes, Fopen_font):
16824 * image.c (gs_load):
16825 * w32font.c (fill_in_logfont):
16826 * xdisp.c (calc_pixel_width_or_height):
16827 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
16828 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
16829
16830 2013-03-20 Kenichi Handa <handa@gnu.org>
16831
16832 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
16833 to 1 (temporary workaround until a bug related to ASCII
16834 optimization is fixed).
16835
16836 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
16837
16838 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
16839 Signal error if window is not internal. Adjust docstring.
16840 (delete_all_child_windows): Use combination_limit to save the buffer.
16841 (Fset_window_configuration): Adjust accordingly.
16842 * print.c (syms_of_print): Initialize debugging output not here...
16843 (init_print_once): ...but in a new function here.
16844 * lisp.h (init_print_once): Add prototype.
16845 * emacs.c (main): Add call to init_print_once. Adjust comments.
16846
16847 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
16848
16849 * window.c (window_resize_check, window_resize_apply)
16850 (window_from_coordinates, recombine_windows, set_window_buffer)
16851 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
16852 (Fsplit_window_internal, Fdelete_window_internal)
16853 (freeze_window_starts): Use bool for booleans.
16854 * window.h (window_frame_coordinates, resize_frame_windows)
16855 (freeze_window_starts, set_window_buffer): Adjust prototypes.
16856
16857 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
16858
16859 * dispnew.c (bitch_at_user): Use `user-error'.
16860
16861 2013-03-17 Ken Brown <kbrown@cornell.edu>
16862
16863 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
16864 as return type of image_background. (Bug#13981)
16865 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
16866
16867 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
16868
16869 * nsterm.m (updateFrameSize:): Change resize increments if needed.
16870 (ns_select): Don't return with result uninitialized.
16871
16872 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
16873 and getDirectory.
16874
16875 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
16876 New functions.
16877 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
16878 directories. If filename is nil, get directory name (Bug#13932).
16879 Use getFilename and getDirectory.
16880 (getFilename, getDirectory): New methods for EmacsSavePanel and
16881 EmacsOpenPanel.
16882 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
16883
16884 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
16885
16886 * coding.c (decode_coding_gap): Fix typo caught by static checking.
16887
16888 2013-03-15 Kenichi Handa <handa@gnu.org>
16889
16890 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
16891 (adjust_after_replace): Make it back to static. Delete the third
16892 arg text_at_gap_tail. Cancel the code for handling it.
16893
16894 * coding.h (struct coding_system): New member eol_seen.
16895
16896 * coding.c (detect_ascii): New function.
16897 (detect_coding): Set coding->head_ascii and coding->eol_seen only
16898 when the source bytes are actually scanned. On detecting for
16899 coding_category_utf_8_auto, call detect_ascii instead of scanning
16900 source bytes directly.
16901 (produce_chars): Call insert_from_gap with the new arg 0.
16902 (encode_coding): Likewise.
16903 (decode_coding_gap): Control ASCII optimization by the variable
16904 disable_ascii_optimization instead of #ifndef .. #endif.
16905 Deccode EOL format according to coding->eol_seen.
16906 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
16907 variable.
16908
16909 * lisp.h (adjust_after_replace): Cancel externing it.
16910 (insert_from_gap): Adjust prototype.
16911
16912 2013-03-15 Eli Zaretskii <eliz@gnu.org>
16913
16914 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
16915 FULLSCREEN_MAXIMIZED. (Bug#13935)
16916
16917 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
16918
16919 * region-cache.c (find_cache_boundary, move_cache_gap)
16920 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
16921 Simplify debugging check and convert to eassert. Adjust comment.
16922 (pp_cache): Put under ENABLE_CHECKING.
16923
16924 2013-03-14 Eli Zaretskii <eliz@gnu.org>
16925
16926 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
16927 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
16928 and WM_ACTIVATEAPP.
16929 (w32fullscreen_hook): If the frame is visible, reset
16930 f->want_fullscreen flag after changing the frame size. If the
16931 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
16932 (Bug#13953)
16933
16934 2013-03-13 Daniel Colascione <dancol@dancol.org>
16935
16936 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
16937 too so that these builds can use Cygwin's file conversion
16938 functions. (We've been building and linking cygw32.o all along
16939 and just not using it.)
16940
16941 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16942
16943 File synchronization fixes (Bug#13944).
16944 * Makefile.in (LIB_FDATASYNC): New macro.
16945 (LIBES): Use it.
16946 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
16947 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
16948 Don't worry about HAVE_FSYNC, since a substitute fsync is
16949 available if the system lacks one.
16950 (Fwrite_regin): Retry fsync if interrupted.
16951
16952 2013-03-13 Eli Zaretskii <eliz@gnu.org>
16953
16954 * w32term.c (w32_read_socket): If the Emacs frame is being
16955 activated, call w32fullscreen_hook, to make sure the new frame
16956 dimensions are in effect. (Bug#13937)
16957
16958 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
16959
16960 * xdisp.c (init_iterator): Simplify because both character and byte
16961 positions are either specified or -1. Add eassert. Adjust comment.
16962 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
16963 character and byte positions can be obtained from marker.
16964
16965 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16966
16967 Static checking by Sun C 5.12.
16968 * alloc.c (buffer_memory_full) [REL_ALLOC]:
16969 * bytecode.c (exec_byte_code):
16970 * dispnew.c (init_display):
16971 * eval.c (error):
16972 * fileio.c (Fsubstitute_in_file_name):
16973 * keyboard.c (Fevent_convert_list):
16974 * keymap.c (Fsingle_key_description):
16975 * term.c (maybe_fatal, fatal):
16976 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
16977 * xsmfns.c (Fhandle_save_session):
16978 Omit unreachable code.
16979 * keymap.c (map_keymap_char_table_item): Cast void * to
16980 a function pointer type; the C Standard requires this.
16981
16982 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
16983 Include <sys/param.h> unconditionally, as that works elsewhere and
16984 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
16985 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
16986 and FreeBSD now.
16987
16988 See ChangeLog.12 for earlier changes.
16989
16990 ;; Local Variables:
16991 ;; coding: utf-8
16992 ;; End:
16993
16994 Copyright (C) 2011-2015 Free Software Foundation, Inc.
16995
16996 This file is part of GNU Emacs.
16997
16998 GNU Emacs is free software: you can redistribute it and/or modify
16999 it under the terms of the GNU General Public License as published by
17000 the Free Software Foundation, either version 3 of the License, or
17001 (at your option) any later version.
17002
17003 GNU Emacs is distributed in the hope that it will be useful,
17004 but WITHOUT ANY WARRANTY; without even the implied warranty of
17005 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17006 GNU General Public License for more details.
17007
17008 You should have received a copy of the GNU General Public License
17009 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.