]> code.delx.au - gnu-emacs/blob - src/ChangeLog
doh, fixing year in ChangeLog entries introduced by last two commits
[gnu-emacs] / src / ChangeLog
1 2015-01-20 Dmitry Antipov <dmantipov@yandex.ru>
2
3 Prefer xlispstrdup to avoid dumb calls to strlen.
4 * nsfont.m (ns_get_family):
5 * nsterm.m (ns_term_init):
6 * w32fns.c (w32_window):
7 * xfns.c (x_window, Fx_select_font): Use xlispstrdup.
8
9 2015-01-20 Paul Eggert <eggert@cs.ucla.edu>
10
11 Correct an old fix for GTK font selection
12 * gtkutil.c (xg_get_font): Fix off-by-2 typo.
13 Fixes: bug#3228
14
15 Fix minor bugs with printing null bytes
16 * minibuf.c (read_minibuf_noninteractive):
17 * xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
18 Work even if the Lisp string contains a null byte.
19
20 Port to hypothetical case where Qnil is nonzero
21 * alloc.c (allocate_pseudovector):
22 * callint.c (Fcall_interactively):
23 * coding.c (syms_of_coding):
24 * dispnew.c (realloc_glyph_pool):
25 * fringe.c (init_fringe):
26 * lisp.h (memsetnil):
27 * xdisp.c (init_iterator):
28 Port to the currently-hypothetical case where Qnil is nonzero.
29 * dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
30 as there are no Lisp_Object values in the data here.
31 * lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
32 All uses changed. Define only if not already defined, so that one
33 can debug with -DNIL_IS_NONZERO.
34 * xdisp.c (init_iterator): Remove unnecessary initializations to 0.
35
36 2015-01-19 Eli Zaretskii <eliz@gnu.org>
37
38 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
39 Qnil is represented as zero, before using that to initialize parts
40 of the glyph structure.
41
42 * xdisp.c (init_iterator): Verify that Qnil is represented as
43 zero, before using that to initialize parts of the iterator
44 structure.
45
46 2015-01-19 Paul Eggert <eggert@cs.ucla.edu>
47
48 Prefer memset to repeatedly assigning Qnil
49 * alloc.c (allocate_pseudovector): Catch more bogus values.
50 * alloc.c (allocate_pseudovector):
51 * callint.c (Fcall_interactively):
52 * coding.c (syms_of_coding):
53 * fringe.c (init_fringe):
54 Verify that Qnil == 0.
55 * callint.c (Fcall_interactively):
56 * eval.c (Fapply, Ffuncall):
57 * fns.c (mapcar1, larger_vector):
58 * font.c (font_expand_wildcards):
59 * fringe.c (init_fringe):
60 Prefer memset to assigning zeros by hand.
61 * callint.c (Fcall_interactively):
62 Remove duplicate assignment of Qnil to args[i].
63 * coding.c (syms_of_coding):
64 Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
65 * fileio.c (Ffile_selinux_context):
66 Rewrite to avoid need for Lisp_Object array.
67 * lisp.h (XLI_BUILTIN_LISPSYM): New macro.
68 (DEFINE_LISP_SYMBOL_END): Use it.
69 (NIL_IS_ZERO): New constant.
70 (memsetnil): New function.
71
72 2015-01-16 Dmitry Antipov <dmantipov@yandex.ru>
73
74 Tune pseudovector allocation assuming Qnil == 0.
75 * alloc.c (allocate_pseudovector): Use memset for both
76 Lisp_Objects and regular slots. Add zerolen arg.
77 * lisp.h (allocate_pseudovector): Adjust prototype.
78 (ALLOCATE_PSEUDOVECTOR): Adjust user.
79 (ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
80 (allocate_hash_table, allocate_window, allocate_frame)
81 (allocate_process, allocate_terminal): Remove prototypes.
82 * fns.c (allocate_hash_table): Now static here.
83 * frame.c (allocate_frame):
84 * process.c (allocate_process):
85 * terminal.c (allocate_terminal):
86 * window.c (allocate_window): Now static here.
87 Use ALLOCATE_ZEROED_PSEUDOVECTOR. Add comment.
88
89 * lisp.h (XTERMINAL): Add eassert.
90 * process.c (make_lisp_proc): Now static here.
91
92 Prefer INLINE functions in font.h to match style used in lisp.h.
93 * font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
94 (CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
95 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
96 Now functions.
97 * font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
98 * ftfont.c (ftfont_shape):
99 * macfont.m (macfont_shape):
100 * w32uniscribe.c (uniscribe_shape):
101 * xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.
102
103 2015-01-16 Paul Eggert <eggert@cs.ucla.edu>
104
105 Give up on -Wsuggest-attribute=const
106 * decompress.c (Fzlib_available_p):
107 * gnutls.c (Fgnutls_available_p):
108 * gtkutil.h (xg_uses_old_file_dialog):
109 * xdisp.c (Ftool_bar_height):
110 * xmenu.c (popup_activated):
111 No longer const, since it's not const on at lest some
112 configurations, and we shouldn't lie to the compiler.
113
114 2015-01-15 Eli Zaretskii <eliz@gnu.org>
115
116 * fileio.c: Include binary-io.h.
117 (Fset_binary_mode): New function.
118 (syms_of_fileio): Defsubr it.
119 (syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.
120
121 2015-01-15 Teodor Zlatanov <tzz@lifelogs.com>
122
123 * gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
124 (Fgnutls_peer_status): Use it to set the :self-signed flag.
125 Rename the previous :self-signed to :unknown-ca. (Bug#19404)
126 (Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.
127
128 2015-01-14 Eli Zaretskii <eliz@gnu.org>
129
130 * w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
131 when FLAGS indicate the item is not highlighted. (Bug#19596)
132
133 2015-01-14 Martin Rudalics <rudalics@gmx.at>
134
135 * xmenu.c (update_frame_menubar): Remove garbaged code.
136
137 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
138
139 remove_slash_colon need not be inline
140 * process.c, process.h (remove_slash_colon): No longer inline.
141 This saves text bytes without hurting runtime performance.
142
143 2015-01-14 Dmitry Antipov <dmantipov@yandex.ru>
144
145 Avoid extra multibyteness check in ENCODE_FILE users.
146 * callproc.c (encode_current_directory, Fcall_process, call_process):
147 * dired.c (directory_files_internal, file_name_completion):
148 Do not check for STRING_MULTIBYTE because encode_file_name
149 is a no-op for unibyte strings.
150
151 * process.h (remove_slash_colon): New function.
152 * callproc.c (encode_current_directory, call_process):
153 * process.c (Fstart_process): Use it.
154
155 Consistently handle time zone specification.
156 * editfns.c (decode_time_zone): New function, refactored out from ...
157 (Fencode_time): ... adjusted user.
158 (Fset_time_zone_rule): Use decode_time_zone.
159
160 * editfns.c (make_buffer_string_both): If requested range intersects
161 the gap, don't move the latter but copy in two regions, thus avoiding
162 unnecessary relocation of buffer data.
163
164 2015-01-14 Paul Eggert <eggert@cs.ucla.edu>
165
166 Use bool for boolean in xmenu.c, xml.c
167 * xmenu.c (x_menu_set_in_use, popup_get_selection)
168 (Fx_menu_bar_open_internal, popup_widget_loop)
169 (x_activate_menubar, xg_crazy_callback_abort)
170 (update_frame_menubar, set_frame_menubar)
171 (initialize_frame_menubar, free_frame_menubar)
172 (create_and_show_popup_menu, x_menu_show)
173 (create_and_show_dialog, x_dialog_show):
174 * xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
175 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
176 * xrdb.c (main) [TESTRM]:
177 * xsettings.c (init_gsettings):
178 * xterm.c (XFillRectangle, xg_scroll_callback)
179 (xg_end_scroll_callback):
180 * xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
181 Use bool for boolean.
182 * xmenu.c (TRUE): Remove; no longer used.
183 (show_help_event): Remove long-unused code.
184 (set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.
185
186 2015-01-13 Paul Eggert <eggert@cs.ucla.edu>
187
188 Don't say Fnext_read_file_uses_dialog_p is const
189 It's const only if a windowing system is not used; don't say it's
190 const otherwise. See:
191 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
192 * fileio.c (next_read_file_uses_dialog_p): Remove.
193 Move guts back to ...
194 (Fnext_read_file_uses_dialog_p): ... here.
195 Don't declare as const, as make-docfile.c now has a special case
196 for this function. This is an ugly hack, but it's better than
197 lying to the compiler.
198
199 Remove now-unnecessary forward XTYPE decl
200 * lisp.h (XTYPE): Remove forward declaration. The recent merge
201 from emacs-24 fixed the problem in a better way, by moving XPNTR's
202 definition to after XTYPE's.
203
204 2015-01-13 Eli Zaretskii <eliz@gnu.org>
205
206 Fix problems with 32-bit wide-int build exposed by MinGW.
207 * lisp.h (XPNTR): Move definition to after XTYPE, to avoid
208 compilation error in an unoptimized build when !USE_LSB_TAG.
209
210 * w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
211 same larger value as for the 64-bit build.
212
213 * w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
214 avoid compiler warnings.
215
216 * w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
217 Avoid compiler warnings about cast from integer to pointer of
218 different size.
219
220 * w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
221 UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
222 casting from integer to pointer of different size.
223 (add_menu_item): Pass the help-echo string as a pointer to
224 Lisp_String, not as a Lisp_Object.
225 (w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
226 string object from its C pointer.
227
228 * w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
229 make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
230 C pointer.
231 <WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
232 (Fx_create_frame): Type-cast the result of XFASTINT to avoild
233 compiler warnings about size differences.
234 (Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
235 pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
236 (Fw32_toggle_lock_key): Pass the new state of the key as a C
237 integer; use -1 for nil. Doc fix.
238
239 * .gdbinit (xgetsym): New subroutine.
240 (xsymname, xsymbol): Use it.
241 (xprintsym): No need to call xgetptr.
242
243 2015-01-13 Martin Rudalics <rudalics@gmx.at>
244
245 * frame.c (adjust_frame_size): Make sure new numbers of
246 lines/columns get installed after font size change (Bug#19575).
247
248 2015-01-13 Dmitry Antipov <dmantipov@yandex.ru>
249
250 Add DEFUN attributes.
251 * callint.c (Finteractive):
252 * character.c (Fcharacterp, Fmax_char):
253 * data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
254 (Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
255 (Ffloatp, Fbyteorder):
256 * decompress.c (Fzlib_available_p):
257 * fns.c (Fidentity):
258 * frame.c (Fframe_windows_min_size):
259 * gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
260 * window.c (Fwindow__sanitize_window_sizes):
261 * xdisp.c (Ftool_bar_height):
262 * xfaces.c (Fface_attribute_relative_p): Add const attribute.
263 * emacs.c (Fkill_emacs):
264 * eval.c (Fthrow):
265 * keyboard.c (Ftop_level, Fexit_recursive_edit)
266 (Fabor_recursive_edit): Add noreturn attribute.
267
268 * search.c (fast_string_match_internal): New function,
269 consolidated from...
270 (fast_string_match, fast_string_match_ignore_case): ...functions
271 which are...
272 * lisp.h (fast_string_match, fast_string_match_ignore_case):
273 inlined from here now.
274 (fast_string_match_internal): Add prototype.
275 * dired.c (file_name_completion): Use fast_string_match_internal.
276
277 * fileio.c (next_read_file_uses_dialog_p): New workaround ...
278 (Fnext_read_file_uses_dialog_p): ... called from here to avoid
279 ATTRIBUTE_CONST dependency from #ifdefs. For details, see
280 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.
281
282 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
283
284 Port to 32-bit MingGW --with-wide-int
285 Problem reported by Eli Zaretskii in:
286 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
287 * lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
288 what we think it is, rather than checking only its alignment (and
289 doing so incorrectly on MinGW).
290
291 2015-01-12 Dmitry Antipov <dmantipov@yandex.ru>
292
293 * fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
294 Remove dead NILP check.
295 * image.c (Flookup_image): Use regular format for docstring.
296 * keyboard.c (apply_modifiers_uncached): Use stpcpy.
297
298 2015-01-12 Martin Rudalics <rudalics@gmx.at>
299
300 * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
301 adjust_frame_size.
302 * frame.c (frame_default_tool_bar_height): New variable.
303 (adjust_frame_size): Possibly add requested adjustment to
304 Vframe_adjust_size_history.
305 (make_frame): Initialize tool_bar_redisplayed_once slot.
306 (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
307 doc-string. Call adjust_frame_size unconditionally (the frame's
308 text size may remain unaltered but the pixel size may change).
309 (x_figure_window_size): If frame_default_tool_bar_height was
310 set, use it instead of calculating the tool bar height from
311 DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set
312 Vframe_initial_frame_tool_bar_height.
313 (Qchange_frame_size, Qxg_frame_set_char_size)
314 (Qset_window_configuration, Qx_create_frame_1)
315 (Qx_create_frame_2): New symbols.
316 (Vframe_initial_frame_tool_bar_height): Remove.
317 (Vframe_adjust_size_history): New history variable for debugging
318 frame size adjustments.
319 * frame.h (struct frame): New boolean slot
320 tool_bar_redisplayed_once.
321 (frame_default_tool_bar_height): Extern.
322 * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
323 to adjust_frame_size.
324 * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
325 Qx_create_frame_2 to adjust_frame_size.
326 * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
327 inhibit 1 when we have not redisplayed the tool bar yet.
328 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
329 Qx_create_frame_2 to adjust_frame_size.
330 * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
331 call.
332 * window.c (Fset_window_configuration): Pass
333 Qset_window_configuration to adjust_frame_size.
334 * xdisp.c (redisplay_tool_bar): Assign new height to
335 frame_default_tool_bar_height.
336 (redisplay_internal): If we haven't redisplayed this frame's
337 tool bar, call redisplay_tool_bar early so we can adjust the
338 frame size accordingly.
339 * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
340 inhibit 1 when we have not redisplayed the tool bar yet.
341 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
342 Qx_create_frame_2 to adjust_frame_size.
343
344 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
345
346 Have 'make' output better GEN names
347 * Makefile.in (gl-stamp, globals.h): Simplify by putting the new
348 contents of globals.h into gl-stamp. This lets us use AM_V_GEN
349 more naturally so that 'make' can output more-accurate names.
350
351 2015-01-11 Stefan Monnier <monnier@iro.umontreal.ca>
352
353 * buffer.c (init_buffer_once): Initialize buffer_local_flags before
354 calling reset_buffer_local_variables, and make sure we initialize
355 it completely.
356
357 2015-01-11 Dmitry Antipov <dmantipov@yandex.ru>
358
359 * coding.c (Fcoding_system_plist): Use common style for docstring.
360
361 2015-01-11 Paul Eggert <eggert@cs.ucla.edu>
362
363 Port to MSB hosts without optimization
364 E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
365 the inline function XTYPE needs to be declared before being used.
366 * lisp.h (XTYPE): New forward declaration.
367
368 2015-01-10 Paul Eggert <eggert@cs.ucla.edu>
369
370 Port to 32-bit --with-wide-int
371 Prefer symbol indexes to struct Lisp_Symbol * casted and then
372 widened, as the latter had trouble with GCC on Fedora 21 when
373 configured --with-wide-int and when used in static initializers.
374 * alloc.c (garbage_collect_1, which_symbols):
375 * lread.c (init_obarray):
376 Prefer builtin_lisp_symbol when it can be used.
377 * dispextern.h (struct image_type.type):
378 * font.c (font_property_table.key):
379 * frame.c (struct frame_parm_table.sym):
380 * keyboard.c (scroll_bar_parts, struct event_head):
381 * xdisp.c (struct props.name):
382 Use the index of a builtin symbol rather than its address.
383 All uses changed.
384 * lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
385 (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
386 symbol indexes rather than pointers, and which work better on MSB
387 hosts because they shift right before tagging. All uses changed.
388 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
389 No longer noops on wide-int hosts, since they work now.
390 (builtin_lisp_symbol): New function.
391
392 Port to HAVE_FREETYPE && !HAVE_XFT
393 * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
394 * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
395 Declare in this case too.
396
397 2015-01-10 Eli Zaretskii <eliz@gnu.org>
398
399 * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
400
401 * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
402 make_pointer_integer instead of XIL.
403 (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
404
405 * w32inevt.c (handle_file_notifications): Use make_pointer_integer
406 instead of XIL. Put a list of the descriptor, action, and file
407 name in event->arg, instead of spreading them between event->code
408 and event->arg.
409
410 * w32term.c (queue_notifications): Use make_pointer_integer
411 instead of XIL. Put a list of the descriptor, action, and file
412 name in event->arg, instead of spreading them between event->code
413 and event->arg.
414
415 * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
416 event creation to changes in w32term.c and w32inevt.c above.
417
418 2015-01-09 Paul Eggert <eggert@cs.ucla.edu>
419
420 Port Qnil==0 changes to 32-bit --with-wide-int
421 * lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
422 macro-implemented version. For the non-USE_LSB_TAG case, supply
423 a new inline function that is the inverse of the new TAG_SYMPTR.
424 (lisp_h_XUNTAGBASE, XUNTAGBASE): Remove. All uses removed.
425 (TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
426 negative number, don't allow sign bits to bleed into the encoded
427 value. Shift in zero bits instead.
428
429 Refactor pointer-to-integer conversion
430 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
431 Rename and move to lisp.h. All uses changed.
432 * lisp.h (XINTPTR, make_pointer_integer): New inline functions,
433 which are renamed from gfilenotify.c's lisp_to_monitor and
434 monitor_to_lisp, and with more-generic void * signatures.
435
436 2015-01-08 Eli Zaretskii <eliz@gnu.org>
437
438 * dispnew.c (buffer_posn_from_coords): Fix the value of the column
439 returned for right-to-left screen lines. (Before the change on
440 2014-12-30, the incorrectly-computed X pixel coordinate concealed
441 this bug.)
442
443 * .gdbinit (xsymname): New subroutine.
444 (xprintsym, initial-tbreak): Use it to access the name of a symbol
445 in a way that doesn't cause GDB to barf when it tries to
446 dereference a NULL pointer.
447
448 * xdisp.c (next_element_from_c_string): Use Lisp integer zero as
449 the object.
450 (set_cursor_from_row, try_cursor_movement, dump_glyph)
451 (insert_left_trunc_glyphs, append_space_for_newline)
452 (extend_face_to_end_of_line, highlight_trailing_whitespace)
453 (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
454 (Fbidi_resolved_levels, produce_special_glyphs)
455 (rows_from_pos_range, mouse_face_from_buffer_pos)
456 (note_mouse_highlight): Use nil as the object for glyphs inserted
457 by the display engine, and test with NILP instead of INTEGERP.
458 (Bug#19535)
459
460 * w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
461 the display engine.
462
463 * xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
464 the display engine.
465
466 * dispextern.h (struct glyph, struct it): Update comments for the
467 OBJECT members.
468
469 2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
470
471 Port new Lisp symbol init to x86 --with-wide-int
472 * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
473 Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
474 GCC (at least) does not allow a constant initializer to widen an
475 address constant.
476
477 * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
478 This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
479 Although clang doesn't need it, some other compiler might, and
480 it's easy enough to be safe.
481
482 * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
483 Apparently clang removed support for the alloc_size attribute.
484
485 Port Qnil==0 XUNTAG to clang
486 clang has undefined behavior if the program subtracts an integer
487 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
488 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
489 * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
490 (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.
491
492 Port GFileMonitor * hack to Qnil==0 platforms
493 Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
494 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
495 (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
496
497 2015-01-06 Jan Djärv <jan.h.d@swipnet.se>
498
499 * nsterm.m (x_set_window_size): Call updateFrameSize to get real
500 size instead of using widht/height. The frame may be constrained.
501
502 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
503
504 * lisp.h (XSYMBOL): Parenthesize id in forward decl.
505 Needed when neither optimizing nor inlining.
506 Also, sort decls alphabetically.
507
508 2015-01-05 Eli Zaretskii <eliz@gnu.org>
509
510 * w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
511 * w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove
512 declarations of Q* variables that represent symbols.
513
514 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
515
516 Use 0 for Qnil
517 Fixes Bug#15880.
518 If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
519 that NILP (x) is equivalent to testing whether x is 0 at the
520 machine level. The overall effects of this and the previous patch
521 shrink the size of the text segment by 2.3% and speeds up
522 compilation of all the .elc files by about 0.5% on my platform,
523 which is Fedora 20 x86-64.
524 * lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
525 (make_lisp_symbol) [USE_LSB_TAG]:
526 Symbols now tag the difference from lispsym, not the pointer.
527 (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
528 (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
529 Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
530 (XSYMBOL): New forward decl.
531 (XUNTAGBASE): New function.
532 (XUNTAG): Use it.
533
534 Compute C decls for DEFSYMs automatically
535 Fixes Bug#15880.
536 This patch also makes Q constants (e.g., Qnil) constant addresses
537 from the C point of view.
538 * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c:
539 * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
540 * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
541 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
542 * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
543 * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
544 * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
545 * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
546 * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
547 * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
548 * xselect.c, xsettings.c, xterm.c:
549 Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
550 These names are now defined automatically by make-docfile.
551 * alloc.c (init_symbol): New function.
552 (Fmake_symbol): Use it.
553 (c_symbol_p): New function.
554 (valid_lisp_object_p, purecopy): Use it.
555 * alloc.c (marked_pinned_symbols):
556 Use make_lisp_symbol instead of make_lisp_ptr.
557 (garbage_collect_1): Mark lispsym symbols.
558 (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
559 (mark_object): Use it.
560 (sweep_symbols): Sweep lispsym symbols.
561 (symbol_uses_obj): New function.
562 (which_symbols): Use it. Work for lispsym symbols, too.
563 (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
564 since Qt's address is already known now.
565 (syms_of_alloc): Add lispsym count to symbols_consed.
566 * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
567 when testing whether storage is all bits zero.
568 * dispextern.h (struct image_type):
569 * font.c (font_property_table):
570 * frame.c (struct frame_parm_table, frame_parms):
571 * keyboard.c (scroll_bar_parts, struct event_head):
572 * xdisp.c (struct props):
573 Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
574 Lisp_Object *, since Qfoo is no longer an object whose address can be
575 taken. All uses changed.
576 * eval.c (run_hook): New function. Most uses of Frun_hooks changed to
577 use it, so that they no longer need to take the address of a Lisp sym.
578 (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
579 * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
580 * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
581 DEFSYM Qdeactivate_mark before the corresponding var.
582 * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
583 instead of interning their symbols; this avoids duplicates.
584 (LISP_INITIALLY, TAG_PTR)
585 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
586 New macros.
587 (LISP_INITIALLY_ZERO): Use it.
588 (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
589 (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
590 Move decls up, to avoid forward uses. Include globals.h earlier, too.
591 (make_lisp_symbol): New function.
592 (XSETSYMBOL): Use it.
593 (DEFSYM): Now just a placeholder for make-docfile.
594 * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
595 (intern_sym): New function, with body taken from old intern_driver.
596 (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
597 All uses changed.
598 (define_symbol): New function.
599 (init_obarray): Define the C symbols taken from lispsym.
600 Use plain DEFSYM for Qt and Qnil.
601 * syntax.c (init_syntax_once): No need to worry about
602 Qchar_table_extra_slots.
603
604 2015-01-04 Paul Eggert <eggert@cs.ucla.edu>
605
606 'temacs -nw' should not call missing functions
607 Without this patch, "temacs -nw" fails with the diagnostic
608 "emacs: Symbol's function definition is void: frame-windows-min-size"
609 and messes up the tty's state.
610 * frame.c (Fframe_windows_min_size): New placeholder function.
611 (syms_of_frame): Define it.
612 * window.c (Fwindow__sanitize_window_sizes): New placeholder.
613 (syms_of_window): Define it.
614
615 Less 'make' chatter for lisp dir
616 * Makefile.in (%.elc): Adjust to compile-onefile change in
617 ../lisp/Makefile.in.
618
619 batch write-region no longer says "Wrote FOO"
620 This cuts down on 'make' chatter a bit.
621 * fileio.c (Fwrite_region):
622 Don't output "Wrote /whatever/foo.elc" if noninteractive.
623
624 2015-01-03 Paul Eggert <eggert@cs.ucla.edu>
625
626 Revert previous change to produce_composite_glyph
627 * term.c (produce_composite_glyph): Revert previous change (Bug#19496).
628
629 Pacify gcc -Wparentheses
630 * frame.c (x_set_frame_parameters): Add parens (Bug#19428).
631
632 2015-01-03 Martin Rudalics <rudalics@gmx.at>
633
634 * frame.c (x_set_frame_parameters): Call Fset_frame_size only if
635 f->can_x_set_window_size is true.
636 * xterm.c (x_set_window_size_1): Call change_frame_size with
637 text sizes instead of pixel sizes (Bug#19428).
638
639 2015-01-01 Eli Zaretskii <eliz@gnu.org>
640
641 * xdisp.c (pos_visible_p): Fix up the X coordinate for
642 right-to-left screen lines. (Bug#19473)
643
644 2015-01-01 Eli Zaretskii <eliz@gnu.org>
645
646 * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
647
648 2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
649
650 Simplify setfattr use by assuming GNU make
651 * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
652 (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
653 Simplify by using GNU make rather than shell conditionals,
654 by using ln -f rather than rm -f followed by ln,
655 and by preferring $@ to spelling out the destination.
656
657 2014-12-29 Eli Zaretskii <eliz@gnu.org>
658
659 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
660 file doesn't compile on MS-Windows.
661
662 2014-12-29 Paul Eggert <eggert@cs.ucla.edu>
663
664 Allow return value of system-name to vary. (Bug#19438)
665 * filelock.c (current_lock_owner):
666 * xrdb.c (get_environ_db):
667 * xterm.c (same_x_server):
668 * xterm.c (x_term_init):
669 Prefer (system-name) to system-name, and avoid naming
670 locals 'system-name'.
671 * editfns.c (cached_system_name): New static var.
672 (init_and_cache_system_name): New function.
673 (init_editfns, Fsystem_name): Use it.
674 (syms_of_editfns): Initialize it and Vsystem_name to the same value.
675 * sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
676 (h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
677 (init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
678 Don't create a new string if the current value is already correct.
679
680 2014-12-28 Paul Eggert <eggert@cs.ucla.edu>
681
682 Fix produce_composite_width typo
683 * term.c (produce_composite_glyph):
684 Fix typo that confused number of columns for pixel width.
685
686 2014-12-28 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
687
688 Wrap dll functions more simply
689 * decompress.c, gnutls.c, image.c, xml.c:
690 If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
691 rather than the inverse when not WINDOWSNT. This isolates the
692 fn_* business into the WINDOWSNT-specific section of the code,
693 which makes it easier to maintain the generic code.
694 * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
695 * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
696 * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
697 * xml.c (DEF_XML2_FN, LOAD_XML2_FN):
698 Remove. All uses replaced by DEF_DLL_FN.
699 * decompress.c (inflateInit2): Remove; no longer needed.
700 * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
701
702 Port memory-full checking to GnuTLS 3.3
703 Instead of using gnutls_global_set_mem_functions, check every call
704 to a GnuTLS function that might return an indication of memory
705 exhaustion. Suggested by Dmitry Antipov in:
706 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
707 * gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
708 (init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
709 (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
710 All uses removed.
711 (check_memory_full): New function.
712 (emacs_gnutls_handshake, emacs_gnutls_handle_error)
713 (gnutls_make_error, gnutls_certificate_details, Fgnutls_peer_status)
714 (Fgnutls_boot): Use it.
715 (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
716
717 2014-12-27 Paul Eggert <eggert@cs.ucla.edu>
718
719 Fix parse_settings to match internal documentation
720 * xsettings.c (parse_settings): Return the number of settings seen.
721 Count the settings changes accurately.
722 (read_settings): Don't confuse number of settings changes with
723 the return code from XGetWindowProperty.
724
725 2014-12-27 Eli Zaretskii <eliz@gnu.org>
726
727 * xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
728 composition_compute_stop_pos to the number of characters in the
729 string. (Bug#19435)
730 <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
731
732 * composite.c (composition_compute_stop_pos): If no composition
733 was found in a string before ENDPOS, and ENDPOS is the string end,
734 no need to back up to a safe point.
735
736 * dispextern.h (struct it) <end_charpos>: Improve commentary.
737
738 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
739
740 * nsimage.m (allocInitFromFile:): Initialize bmRep.
741 (dealloc): Release bmRep.
742 (setPixmapData): Make bmRep local so class member is not
743 set (Bug#19133).
744 (setPixmapData): Rename local variable bmRep to avoid compiler
745 warning.
746
747 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
748
749 * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
750 when going to fullscreen (Bug#0x180004f).
751
752 2014-12-27 Eli Zaretskii <eliz@gnu.org>
753
754 * window.c (Fwindow_body_width): Doc fix. (Bug#19395)
755
756 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
757
758 * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
759
760 2014-12-27 Eli Zaretskii <eliz@gnu.org>
761
762 * gnutls.c (gnutls_init): Fix deprecation warning from GCC.
763
764 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
765
766 Use bool for boolean in xselect.c, xsettings.c
767 * xselect.c (x_get_local_selection, struct selection_data)
768 (x_selection_request_lisp_error, struct prop_location)
769 (x_handle_selection_request, x_convert_selection)
770 (waiting_for_other_props_on_window, expect_property_change)
771 (wait_for_property_change, x_handle_property_notify)
772 (x_get_foreign_selection, x_get_window_property)
773 (receive_incremental_selection)
774 (x_get_window_property_as_lisp_data)
775 (lisp_data_to_selection_data, Fx_get_selection_internal)
776 (x_send_client_event):
777 * xselect.c, xterm.h (x_handle_dnd_message):
778 * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
779 (apply_xft_settings, read_and_apply_settings)
780 (xft_settings_event, init_gsettings, init_xsettings)
781 (syms_of_xsettings):
782 Use bool for boolean.
783 * xselect.c (x_get_window_property): Omit last arg, which was an
784 unused boolean.
785 * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
786 always true. All callers changed.
787
788 2014-12-26 Eli Zaretskii <eliz@gnu.org>
789
790 * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
791 of strcat.
792
793 * w32menu.c (add_menu_item): Use stpcpy instead of strcat.
794
795 * w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
796 strcat.
797
798 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
799
800 Use bool for boolean in xsmfns.c
801 * xsmfns.c, xterm.h (x_session_have_connection):
802 * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
803 Use bool for boolean.
804 (x_session_initialize, Fhandle_save_session):
805 Prefer NILP (x) to EQ (x, Qnil).
806
807 2014-12-25 Paul Eggert <eggert@cs.ucla.edu>
808
809 * callproc.c (child_setup):
810 * dbusbind.c (xd_signature_cat):
811 * doc.c (get_doc_string, Fsnarf_documentation):
812 * editfns.c (Fuser_full_name):
813 * frame.c (xrdb_get_resource):
814 * gtkutil.c (xg_get_file_with_chooser):
815 * tparam.c (tparam1):
816 * xfns.c (xic_create_fontsetname):
817 * xrdb.c (gethomedir, get_user_db, get_environ_db):
818 * xsmfns.c (smc_save_yourself_CB):
819 Rewrite to avoid the need for strcat, typically by using stpcpy
820 and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms.
821 * doc.c (sibling_etc):
822 * xrdb.c (xdefaults):
823 Now a top-level static constant.
824
825 2014-12-23 Didier Verna <didier@didierverna.net> (tiny change).
826
827 * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
828 C one (Bug#19396).
829
830 2014-12-22 Jan Djärv <jan.h.d@swipnet.se>
831
832 * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
833 breaks icon setting for Gtk+ except for initial frame (Bug#19403).
834
835 2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
836
837 Use bool for boolean in xterm.c
838 * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
839 (x_set_window_size, x_bitmap_icon):
840 * nsterm.m (ns_frame_raise_lower, x_new_font):
841 * termhooks.h (struct terminal.toggle_invisible_pointer_hook)
842 (struct terminal.frame_raise_lower_hook):
843 * w32term.c (w32_frame_raise_lower):
844 * xterm.c, xterm.h (x_text_icon):
845 * xterm.c (x_update_window_begin, x_update_window_end)
846 (x_update_end, x_after_update_window_line)
847 (x_set_glyph_string_gc, x_draw_glyph_string_background)
848 (x_draw_glyph_string_foreground)
849 (x_draw_composite_glyph_string_foreground)
850 (x_alloc_lighter_color, x_draw_relief_rect)
851 (x_draw_glyph_string_box, x_draw_image_relief)
852 (x_draw_image_glyph_string, x_draw_stretch_glyph_string)
853 (x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
854 (x_hide_hourglass):
855 (XFillRectangle) [HAVE_GTK3]:
856 (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
857 (x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
858 (XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
859 (x_send_scroll_bar_event, xm_scroll_callback)
860 (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
861 (x_create_toolkit_scroll_bar)
862 (x_create_horizontal_toolkit_scroll_bar)
863 (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
864 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
865 (XTset_horizontal_scroll_bar, x_scroll_bar_expose)
866 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
867 (x_scroll_bar_report_motion)
868 (x_horizontal_scroll_bar_report_motion, x_net_wm_state)
869 (handle_one_xevent, XTread_socket, x_draw_bar_cursor)
870 (x_draw_window_cursor, x_clear_errors)
871 (x_trace_wire, x_new_font, x_set_offset, wm_supports)
872 (set_wm_state, x_set_sticky, get_current_wm_state)
873 (do_ewmh_fullscreen, x_handle_net_wm_state)
874 (x_check_expected_move, x_sync_with_move, x_wait_for_event)
875 (x_set_window_size_1, XTframe_raise_lower)
876 (x_make_frame_visible, x_iconify_frame)
877 (x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
878 (x_term_init, x_process_timeouts, x_activate_timeout_atimer)
879 (x_delete_terminal, x_initialize, syms_of_xterm):
880 Use bool for boolean.
881
882 2014-12-20 Paul Eggert <eggert@cs.ucla.edu>
883
884 * composite.h (struct composition.width): Now int
885 instead of unsigned short, as we prefer signed integers.
886
887 Let charset tick grow past USHRT_MAX
888 * charset.c, charset.h (charset_ordered_list_tick):
889 Now EMACS_UINT, not unsigned short.
890 * fontset.c (reorder_font_vector): Allow the tick to grow to the
891 maximum representable Emacs integer value before wrapping it around.
892
893 Simplify unexec file mode setting
894 * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
895 Don't include <sys/stat.h> when no longer needed.
896 (unexec): Create file with correct mode in the first place,
897 rather than overwriting the mode later and fiddling with the
898 global umask in the mean time. Avoid bogus usage like
899 'umask (777)', which should have been 'umask (0777)'.
900 (mark_x): Remove. All callers removed.
901
902 2014-12-19 Paul Eggert <eggert@cs.ucla.edu>
903
904 Minor cleanups for Lisp objects and symbols
905 * alloc.c (next_vector, set_next_vector):
906 * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
907 (lisp_h_make_number) [USE_LSB_TAG]:
908 Use Lisp_Int0 instead of the mystery constant 0.
909 * alloc.c (mark_object): Always set and use po; that's simpler.
910 (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
911 Properly parenthesize definientia.
912 * bidi.c (bidi_initialize):
913 * buffer.c (init_buffer_once):
914 * nsfns.m (syms_of_nsfns):
915 * nsmenu.m (syms_of_nsmenu):
916 * nsselect.m (syms_of_nsselect):
917 Prefer DEFSYM to defining by hand.
918 * buffer.c (syms_of_buffer): Omit unneeded staticpros.
919 * data.c: Fix too-long line.
920 * lisp.h (DECLARE_GDB_SYM): New macro.
921 (DEFINE_GDB_SYMBOL_BEGIN): Use it.
922 (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
923 Declare the symbol, so it's visible to everywhere lisp.h is included.
924 Move forward decls as far forward as they can go,
925 to allow future changes to use them.
926
927 2014-12-18 Paul Eggert <eggert@cs.ucla.edu>
928
929 * gnutls.c: Include gnutls.h.
930 This to check syms_of_gnutls's API even when !HAVE_GNUTLS.
931 * image.c (svg_load): Fix pointer signedness.
932
933 2014-12-18 Martin Rudalics <rudalics@gmx.at>
934
935 * frame.c (frame_windows_min_size): New argument IGNORE.
936 (adjust_frame_size): When called from change_frame_size call
937 frame_windows_min_size with IGNORE Qt so we can ignore size
938 restrictions.
939
940 2014-12-18 Eli Zaretskii <eliz@gnu.org>
941
942 * font.c (Ffont_info): Add more font information to the vector
943 returned by the function, inspired by query-font. Doc fix.
944 (Bug#19395)
945
946 2014-12-18 Stefan Monnier <monnier@iro.umontreal.ca>
947
948 * keyboard.c (input_was_pending): New var.
949 (read_char): Use it to make sure we only skip redisplay when we can't
950 keep up with the repeat rate.
951
952 2014-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
953
954 * keyboard.c (swallow_events): Don't redisplay if there's input pending.
955
956 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
957
958 * image.c (svg_load): Watch out for nil value of current buffer's
959 filename. Re-enable filename thing for not-a-file case.
960
961 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
962
963 Partially disabled previous change.
964
965 * image.c (svg_load): Temporarily disabled filename thing for
966 not-a-file case as it can cause crashs.
967
968 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
969
970 Fix problem with images referenced within svg files. (bug#19373)
971
972 * image.c: Additional parameter 'filename' for
973 svg_load_image. Include "buffer.h". Define library function
974 rsvg_handle_set_base_uri for WINDOWSNT.
975 (init_svg_functions): Initialize rsvg_handle_set_base_uri.
976 (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
977 (svg_load): Pass a filename to svg_load_image: either name of
978 actual file or of current buffer's file.
979 (svg_load_image): New parameter 'filename', used for setting
980 base_uri, necessary for loading referenced images. (bug#19373)
981
982 2014-12-16 Paul Eggert <eggert@cs.ucla.edu>
983
984 * lread.c (init_obarray): Declare Qt as special.
985 This fixes a typo in the 2012-05-15 patch that
986 tried to declare Qt as special.
987
988 2014-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
989
990 Various fixes to use bool type and constants.
991 * dispnew.c (update_single_window): Remove arg `force_p' since it's
992 always true.
993 * xfaces.c (clear_face_cache): Use bool for the argument type.
994
995 2014-12-15 Paul Eggert <eggert@cs.ucla.edu>
996
997 Correct same_at_end when restoring window points
998 * fileio.c (Finsert_file_contents): Compute same_at_end character
999 position using the old buffer size, not the new one, since
1000 restore_window_points wants the old size.
1001 Fixes: debbugs:19161
1002
1003 2014-12-14 Alan Mackenzie <acm@muc.de>
1004
1005 New feature optionally to accelerate auto-repeated scrolling.
1006
1007 * xdisp.c: Remove "static" from declaration of Qfontification_functions.
1008
1009 * window.c (window_scroll): Bind fontification-functions to nil
1010 when scrolling by whole screens and
1011 fast-but-imprecise-scrolling is non-nil.
1012 (syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.
1013
1014 * lisp.h (bool): Declare Qfontification_functions extern.
1015
1016 2014-12-14 Eli Zaretskii <eliz@gnu.org>
1017
1018 Load system's default trusted Certificate Authorities if available.
1019 * gnutls.c (gnutls_certificate_set_x509_system_trust)
1020 [GNUTLS >= 3.0.20]: Declare for WINDOWSNT.
1021 (init_gnutls_functions)(gnutls_certificate_set_x509_system_trust)
1022 [GNUTLS >= 3.0.20]: Load from shared library for WINDOWSNT.
1023 (fn_gnutls_certificate_set_x509_system_trust) [!WINDOWSNT]:
1024 Define new macro.
1025 (Fgnutls_boot) [GNUTLS >= 3.0.20]:
1026 Call gnutls_certificate_set_x509_system_trust. Log an error message if
1027 it fails.
1028
1029 2014-12-14 Paul Eggert <eggert@cs.ucla.edu>
1030
1031 * regex.c (analyze_first): Rename from analyze_first.
1032
1033 2014-12-13 Paul Eggert <eggert@cs.ucla.edu>
1034
1035 * alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
1036 a hack involving a union.
1037
1038 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1039
1040 * gnutls.c (Fgnutls_available_p, syms_of_gnutls):
1041 Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
1042 them only once.
1043
1044 2014-12-13 Teodor Zlatanov <tzz@lifelogs.com>
1045
1046 * emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
1047
1048 * gnutls.h: Always declare syms_of_gnutls.
1049
1050 * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
1051 clarity. Let the availability check return Qnil when the GnuTLS
1052 integration is not available, instead of erroring out.
1053 (Bug#19346)
1054
1055 2014-12-13 Eli Zaretskii <eliz@gnu.org>
1056
1057 * xdisp.c (move_it_in_display_line_to, display_line):
1058 Don't disallow overflow-newline-into-fringe when word-wrap is in
1059 effect. (Bug#19300)
1060
1061 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
1062
1063 * fileio.c: Better preserve window-points during revert (bug#19161).
1064 (Qget_buffer_window_list): New var.
1065 (get_window_points_and_markers, restore_window_points): New functions.
1066 (Finsert_file_contents): Use them to save and restore window-points.
1067
1068 2014-12-11 Dmitry Antipov <dmantipov@yandex.ru>
1069
1070 * xterm.c (x_delete_terminal): Call emacs_close for X connection
1071 descriptor if called from x_connection_closed and always delete
1072 this descriptor from keyboard waiting set (Bug#19147).
1073
1074 2014-12-10 Eli Zaretskii <eliz@gnu.org>
1075
1076 * bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
1077 (bidi_cache_max_elts): New global variable.
1078 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
1079 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
1080 its initial value.
1081 (bidi_cache_search): Handle overflown cache. Improve commentary.
1082 (bidi_cache_ensure_space): Limit allocations to the current value
1083 of bidi_cache_max_elts. Force xpalloc not to over-allocate.
1084 If less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
1085 the increment to not exceed the limit.
1086 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
1087 cache, zero otherwise (meaning the cache overflowed). In the
1088 latter case, set bidi_cache_last_idx to -1.
1089 (bidi_peek_at_next_level): Handle overflown cache.
1090 (bidi_push_it): Increase the cache limit for iterating the new object.
1091 (bidi_pop_it): Decrease the cache limit back to previous value.
1092 (bidi_shelve_cache): Shelve the current value of the cache limit.
1093 (bidi_unshelve_cache): Restore the value of cache limit.
1094 (bidi_find_bracket_pairs): If the cache overflows while looking
1095 for the paired bracket, give up and let bidi_resolve_neutrals
1096 process the bracket as a simple neutral. (Bug#19322)
1097 (bidi_find_other_level_edge): If the cache overflows, fall back on
1098 Plan B, which effectively stops the reordering and restarts it on
1099 the next character (after resetting the cache).
1100 (bidi_move_to_visually_next): When the cache overflows, reset it
1101 after processing the last cached character.
1102
1103 2014-12-10 Paul Eggert <eggert@cs.ucla.edu>
1104
1105 Fix glitches in gnutls.c, mostly memory-related
1106 * gnutls.c: Sort macro definitions by name.
1107 (fn_gnutls_transport_set_errno): Omit unreachable definition.
1108 (fn_gnutls_x509_crt_get_signature): Omit unused symbol.
1109 (gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
1110 Prefer ptrdiff_t for sizes. Check for arithmetic overflow when
1111 calculating string length. Use make_uninit_string, to avoid
1112 copying the string. Cast the char, not the pointer.
1113 (gnutls_certificate_details): Use xmalloc and xfree, not malloc
1114 and free. Work even for dates past the year 9999. Use void *
1115 for buffers, to avoid casts.
1116
1117 2014-12-09 Andy Moreton <andrewjmoreton@gmail.com> (tiny change)
1118
1119 * gnutls.c (gnutls_protocol_get_name): Fix a copy/paste typo.
1120
1121 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1122
1123 * gnutls.c (Fgnutls_peer_status): Return the key exchange, cipher
1124 and MAC algorithms.
1125
1126 2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
1127
1128 * process.c: Whitespace and line-break nitpicks.
1129
1130 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
1131
1132 * gnutls.c (gnutls_certificate_details): The :signature isn't
1133 that useful, so remove it.
1134 (gnutls_certificate_details): Clean up whitespace slightly.
1135 (Fgnutls_peer_status): Return the Diffie-Hellman prime bits for
1136 the connection.
1137 (gnutls_certificate_details): Put :signature-algorithm back again,
1138 which was removed by mistake.
1139 (emacs_gnutls_handle_error): Fatal errors should be on level 1, so
1140 that they are not messaged by default (bug#16253).
1141 (Fgnutls_error_fatalp): Doc fix (bug#18210).
1142
1143 * gnutls.c: Add Windows specs for gnutls_dh_get_prime_bits.
1144
1145 2014-12-07 Jan Djärv <jan.h.d@swipnet.se>
1146
1147 * nsimage.m (setPixmapData): Make bmRep local so class member is not
1148 set (Bug#19133).
1149
1150 2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
1151
1152 * eval.c (Fsignal): Remove duplicate test.
1153 (Fautoload_do_load): Fix up docstring.
1154
1155 2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
1156
1157 * nsterm.m (represented_filename, represented_frame): New variables.
1158 (ns_set_represented_filename): New function.
1159 (sendEvent:): Set represented filename here to avoid flicker,
1160 related to Bug#18757.
1161
1162 * nsterm.h: Declare ns_set_represented_filename.
1163
1164 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
1165 at once, call ns_set_represented_filename instead.
1166
1167 2014-12-05 Eli Zaretskii <eliz@gnu.org>
1168
1169 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
1170 (struct bidi_stack): Reduce size by using bit fields and by
1171 packing sos, override, and isolate_status into a single 8-bit
1172 byte called 'flags'.
1173
1174 * bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
1175 (bidi_push_embedding_level): Construct flags from individual
1176 bits. Adapt to changes in prev_for_neutral and next_for_neutral
1177 members.
1178 (bidi_pop_embedding_level): Use ISOLATE_STATUS. Extract 'sos'
1179 from flags. Adapt to changes in prev_for_neutral,
1180 next_for_neutral, and last_strong members.
1181 (bidi_line_init): Initialize flags to zero.
1182 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
1183 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
1184
1185 2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
1186
1187 * eval.c (backtrace_eval_unrewind): Rewind also the excursions.
1188 (Fapply): Try and simplify the control flow.
1189
1190 2014-12-03 Chris Zheng <chriszheng99@gmail.com> (tiny change)
1191
1192 * gnutls.c (init_gnutls_functions, gnutls_certificate_details):
1193 Use gnutls_sign_get_name directly because
1194 gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231).
1195 (init_gnutls_functions): Load missing gnutls_server_name_set.
1196
1197 2014-12-02 Eli Zaretskii <eliz@gnu.org>
1198
1199 * bidi.c (bidi_find_first_overridden): New function.
1200
1201 * xdisp.c (Fbidi_find_overridden_directionality): New function.
1202 (syms_of_xdisp): Defsubr it.
1203
1204 * dispextern.h (bidi_find_first_overridden): Add prototype.
1205
1206 2014-12-02 Jan Djärv <jan.h.d@swipnet.se>
1207
1208 * nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
1209 to nil after release (Bug#9133).
1210
1211 2014-11-30 Paul Eggert <eggert@cs.ucla.edu>
1212
1213 Port better to AddressSanitizer.
1214 These changes suffice for temacs on x86-64 with GCC 4.9.2 and
1215 -fsanitize=address.
1216 * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
1217 Return -1 or 0, as the pipe trick doesn't work.
1218 * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
1219 * data.c (Ffset):
1220 * print.c (print_object):
1221 When a pointer-check primitive returns -1, do not assume this
1222 means the pointer is valid or that the underlying system has failed.
1223 It could just be that addresses are being sanitized so Emacs can't
1224 test for pointer validity.
1225 * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
1226 (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
1227 string validity checker doesn't work on stack-based strings.
1228
1229 2014-11-29 Paul Eggert <eggert@cs.ucla.edu>
1230
1231 Improve clarity of USE_LSB_TAG definition.
1232 Reported by Lee Duhem. Suggested by Andreas Schwab in:
1233 http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
1234 * lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
1235 VAL_MAX / 2 rather than in terms of the (more complicated)
1236 EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
1237
1238 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1239
1240 * xdisp.c (handle_single_display_spec): When ignoring a fringe
1241 bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
1242 (next_element_from_buffer): When done with overlays, reset the
1243 ignore_overlay_strings_at_pos_p flag. (Bug#19201)
1244
1245 2014-11-29 Eli Zaretskii <eliz@gnu.org>
1246
1247 * w32fns.c (Fw32_shell_execute): Convert forward slashes in
1248 DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
1249
1250 2014-11-29 Ulrich Müller <ulm@gentoo.org>
1251
1252 * Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
1253 for paxctl and setfattr. Fixes temacs startup failure with
1254 grsecurity/PaX enabled Linux kernel (bug#19067).
1255
1256 2014-11-27 Oscar Fuentes <ofv@wanadoo.es>
1257
1258 * w32.c, w32heap.c, w32term.c:
1259 Use MINGW_W64 instead of _W64.
1260
1261 2014-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
1262
1263 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
1264
1265 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
1266
1267 * gnutls.c (gnutls_ip_address_p): New function.
1268 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
1269
1270 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
1271
1272 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
1273
1274 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
1275
1276 Fix gnutls problems caught by static checking.
1277 * gnutls.c (Fgnutls_boot): Remove unused local.
1278 (Fgnutls_boot): Fix pointer signedness.
1279
1280 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
1281
1282 * gnutls.c (gnutls_certificate_details): Don't include certain
1283 certificate details on older gnutls versions (bug#19168).
1284 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
1285 (gnutls_certificate_details): Reversed check in last checkin.
1286
1287 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
1288
1289 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
1290 (Fgnutls_peer_status_warning_describe): Add function to describe a
1291 peer verification warning symbol.
1292 (Fgnutls_peer_status): Use it.
1293 (Fgnutls_boot): Use it. Minor logging fixes.
1294
1295 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
1296
1297 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
1298
1299 2014-11-24 Glenn Morris <rgm@gnu.org>
1300
1301 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
1302
1303 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
1304 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
1305
1306 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
1307
1308 * gnutls.c: Fix Windows function definition of
1309 gnutls_x509_crt_get_fingerprint.
1310
1311 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
1312
1313 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
1314
1315 * process.h: Added more fields to Lisp_Process to track
1316 certificate details.
1317
1318 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
1319 (Fgnutls_peer_status): New functions to export TLS certificate
1320 details to Emacs Lisp.
1321
1322 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
1323
1324 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
1325 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
1326 check for gtk_adjustment_configure (Bug#19149).
1327 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
1328
1329 2014-11-22 Glenn Morris <rgm@gnu.org>
1330
1331 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
1332
1333 2014-11-22 Martin Rudalics <rudalics@gmx.at>
1334
1335 Don't shrink frame when using desktop-save-mode (Bug#19048).
1336 * w32fns.c (x_set_tool_bar_lines): Always call
1337 x_change_tool_bar_height (Bug#19048).
1338 (x_change_tool_bar_height): Mark frame as garbaged since
1339 adjust_frame_size might not have done that.
1340 * xfns.c (x_set_tool_bar_lines): Always call
1341 x_change_tool_bar_height (Bug#19048).
1342 (x_change_tool_bar_height): Mark frame as garbaged since
1343 adjust_frame_size might not have done that.
1344
1345 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
1346
1347 * xml.c (parse_region): Take care of new optional parameter
1348 'discard-comments' of 'libxml-parse(html|xml)-region'.
1349 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
1350 New optional parameter 'discard-comments'.
1351
1352 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
1353
1354 Improve time stamp handling, and be more consistent about it.
1355 * editfns.c (invalid_time): New function.
1356 Use it instead of 'error ("Invalid time specification")'.
1357 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
1358 (decode_float_time, lisp_to_timespec, lisp_time_struct):
1359 New functions.
1360 (make_time_tail, make_time): Remove. All uses changed to use
1361 new functions or plain list4i.
1362 (disassemble_lisp_time): Return effective length if successful.
1363 Check that LOW is an integer, if it's combined with other components.
1364 (decode_time_components): Decode into struct lisp_time, not
1365 struct timespec, so that we can support a wide set of times
1366 regardless of whether time_t is signed. Decode plain numbers
1367 as seconds since the Epoch, and nil as the current time.
1368 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
1369 Reimplement in terms of new functions.
1370 (Fencode_time): Just use list2i.
1371 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
1372 * keyboard.c (decode_timer): Don't allow the new formats (floating
1373 point or nil) in timers.
1374 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
1375 place of the magic number '16'.
1376 (struct lisp_time): New type.
1377 (decode_time_components): Use it.
1378 (lisp_to_timespec): New decl.
1379
1380 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
1381
1382 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
1383 text property.
1384
1385 * callint.c (Fcall_interactively): Pass in nil as argument to
1386 Fbarf_if_buffer_read_only.
1387
1388 * fileio.c (Finsert_file_contents): Ditto.
1389
1390 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
1391
1392 * textprop.c (verify_interval_modification): Check buffer
1393 readedness after the last interval.
1394
1395 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
1396 the text at POSITION (new optional argument) has the
1397 `inhibit-read-only' text property set.
1398
1399 2014-11-16 Eli Zaretskii <eliz@gnu.org>
1400
1401 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
1402 errors in computing the number of pixels to scroll.
1403 Suggested by Kelly Dean <kelly@prtime.org>. (Bug#19060)
1404
1405 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1406
1407 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
1408 call updateFrameSize.
1409
1410 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
1411
1412 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1413
1414 * nsfns.m (x_set_foreground_color, x_set_background_color)
1415 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
1416 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
1417
1418 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
1419
1420 * nsterm.m (ns_send_appdefined): Check for application defined
1421 event on Cocoa (Bug#18993).
1422 (run): Restore code before the previous 18993 fix.
1423
1424 2014-11-14 David Reitter <david.reitter@gmail.com>
1425
1426 * nsterm.m (run): Set timeout for event loop to prevent hang.
1427 (Bug#18993)
1428
1429 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
1430
1431 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
1432
1433 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1434
1435 * xfont.c (xfont_list_pattern): Do not allocate font entity object
1436 for each candidate font but attempt to reuse it from previous improper
1437 candidate, if any.
1438
1439 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
1440
1441 Avoid undefined behavior in color table hashing.
1442 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
1443 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
1444 This function avoids undefined behavior with signed shift overflow.
1445
1446 2014-11-10 Eli Zaretskii <eliz@gnu.org>
1447
1448 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
1449 when the inserted text does not need decoding. (Bug#18982)
1450
1451 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
1452
1453 * nsterm.h (EmacsScroller): judge returns bool.
1454
1455 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
1456 (ns_judge_scroll_bars): Only set removed if judge returns true.
1457 (judge): Returns bool == condemned. Remove self from window.
1458 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
1459
1460 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
1461
1462 * keyboard.c (command_loop_1): Record this-command in recent-keys.
1463 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
1464
1465 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
1466
1467 * nsterm.m (ns_set_vertical_scroll_bar)
1468 (ns_set_horizontal_scroll_bar): Cleanup merge error.
1469
1470 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
1471
1472 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
1473 merely because tmo_in_millisec is nonnegative. The 1st call
1474 to g_main_context_query could succeed while the 2nd one fails.
1475
1476 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
1477
1478 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1479
1480 * nsterm.m (run): Only use non-system event loop if OSX version is
1481 exactly 10.9 (Bug#18993).
1482 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
1483 needed (Bug#18757).
1484
1485 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1486
1487 * callproc.c (encode_current_directory): Support handling of file
1488 names prepended by "/:". (Bug#18891)
1489
1490 2014-11-08 Alan Mackenzie <acm@muc.de>
1491
1492 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
1493
1494 2014-11-08 Dima Kogan <dima@secretsauce.net>
1495
1496 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
1497
1498 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1499
1500 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
1501 raises an error. (Bug#18891)
1502
1503 2014-11-08 Martin Rudalics <rudalics@gmx.at>
1504
1505 * frame.c (adjust_frame_size): Call x_set_window_size only if
1506 f->can_x_set_window_size is set.
1507 (make_frame): Initialize f->can_x_set_window_size and
1508 f->can_run_window_configuration_change_hook.
1509 (Fcan_run_window_configuration_change_hook): New function.
1510 * frame.h (frame): Split `official' into `can_x_set_window_size'
1511 and `can_run_window_configuration_change_hook'.
1512 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
1513 * w32fns.c (Fx_create_frame, x_create_tip_frame):
1514 Set f->can_x_set_window_size.
1515 * window.c (run_window_configuration_change_hook):
1516 Return immediately if either f->can_x_set_window_size or
1517 f->can_run_window_configuration_change_hook are false.
1518 (Fset_window_configuration): Instead of f->official set
1519 f->can_x_set_window_size.
1520 * xfns.c (Fx_create_frame, x_create_tip_frame):
1521 Set f->can_x_set_window_size.
1522
1523 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1524
1525 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
1526 cleanup from 2014-11-01 (Bug#18972).
1527
1528 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
1529
1530 * keyboard.c: Call gui-set-selection instead of x-set-selection.
1531 * xdisp.c (window-scroll-functions): Improve docstring.
1532
1533 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
1534
1535 Uniquify the 'size' symbol.
1536 * frame.c (Qsize):
1537 * w32notify.c (Qsize): Remove.
1538 * lisp.h (Qsize): New decl.
1539 * lread.c (Qsize): Now extern.
1540 * w32notify.c (syms_of_w32notify): No need to defsym.
1541
1542 2014-11-07 Martin Rudalics <rudalics@gmx.at>
1543
1544 * dispnew.c (change_frame_size_1): Fix call of
1545 adjust_frame_size.
1546 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
1547 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1548 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1549 (Qtool_bar_size): New constants.
1550 (frame_inhibit_resize, adjust_frame_size): New argument to
1551 handle case where frame_inhibit_implied_resize is a list.
1552 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
1553 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
1554 (x_set_right_divider_width, x_set_bottom_divider_width)
1555 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
1556 (x_set_scroll_bar_width, x_set_scroll_bar_height):
1557 Update callers.
1558 (frame-inhibit-implied-resize): Rewrite doc-string.
1559 * frame.h (frame_inhibit_resize, adjust_frame_size):
1560 Fix external declarations.
1561 (Qframe_position, Qframe_outer_size)
1562 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1563 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1564 (Qtool_bar_size): Extern them.
1565 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
1566 (xg_height_or_width_changed): Remove.
1567 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
1568 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
1569 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
1570 (xg_change_toolbar_position): Call adjust_frame_size directly.
1571 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
1572 Fix calls of adjust_frame_size.
1573 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
1574 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
1575 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1576 frame can get resized when tool-bar-lines parameter changes from
1577 or to zero.
1578 (Fw32_frame_menu_bar_size): Return fourth value.
1579 (Fw32_frame_rect): Block input around system calls
1580 (Fx_frame_geometry): New function.
1581 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
1582 * w32term.c (x_new_font): Adjust adjust_frame_size call.
1583 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
1584 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
1585 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
1586 (Fx_create_frame): Adjust adjust_frame_size calls.
1587 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1588 frame can get resized when tool-bar-lines parameter changes from
1589 or to zero.
1590 (Fx_frame_geometry): New function.
1591 * xmenu.c (update_frame_menubar): On Lucid call
1592 adjust_frame_size with one pixel less height to avoid that
1593 repeatedly adding/removing the menu bar grows the frame.
1594 (free_frame_menubar): On Motif arrange to optionally preserve
1595 the old frame height when removing the menu bar.
1596 * xterm.c (x_new_font): Adjust adjust_frame_size call.
1597
1598 2014-11-03 Eli Zaretskii <eliz@gnu.org>
1599
1600 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
1601 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
1602 frame; instead, print an error message.
1603
1604 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
1605
1606 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
1607
1608 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
1609
1610 * nsimage.m (allocInitFromFile:): Initialize bmRep.
1611 (dealloc): Release bmRep.
1612
1613 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
1614 imageListSetNext, imageListNext.
1615
1616 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
1617 (reference): Remove.
1618 (allocInitFromFile:): Remove searching ImageList and calling
1619 reference (Bug#18918).
1620 (dealloc): Remove handling if ImageList.
1621
1622 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
1623
1624 * process.c (catch_child_signal): Fix incorrect assertion.
1625
1626 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1627
1628 * macfont.m (macfont_draw):
1629 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
1630
1631 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
1632 if force_integral_p (i.e. no antialias).
1633 (macfont_draw): Check ns_antialias_text, also turn off synthetic
1634 bold if no antialias (Bug#18876).
1635
1636 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
1637 was given (Bug#18846).
1638
1639 * nsterm.h (ns_set_doc_edited): Declare taking no args.
1640
1641 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
1642 instead of in xdisp.c, function now takes void. (Bug#18884).
1643
1644 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
1645 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
1646
1647 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
1648 struct window* (Bug#18889).
1649 Remove getMouseMotionPart.
1650 (ns_output): Make icon_top/left int.
1651
1652 * nsfns.m (x_icon): icon_top/left is int.
1653
1654 * nsterm.m (ns_mouse_position): Remove unused code.
1655 (initFrame:window:, dealloc): Use window instead of win.
1656 (getMouseMotionPart:window:x:y:): Remove, unused.
1657 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
1658
1659 2014-11-01 Eli Zaretskii <eliz@gnu.org>
1660
1661 * keyboard.c (readable_events): When FLAGS include
1662 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
1663 This avoids returning non-nil from input-pending-p when only such
1664 events are in the queue. (Bug#18856)
1665
1666 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1667
1668 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
1669 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
1670 (Qforeign_selection): Remove.
1671 (ns_get_local_selection): Identation fix.
1672 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
1673
1674 * nsselect.m (ns_get_local_selection): Remove calling of
1675 functions in Vselection_converter_alist (Bug#18911).
1676 (syms_of_nsselect): Remove Vselection_converter_alist.
1677
1678 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
1679
1680 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
1681 and unnecessary initialization. Adjust comments.
1682
1683 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1684
1685 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
1686 setting it to -1.
1687 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
1688 index, not an absolute one, as that's what the function expects.
1689
1690 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
1691
1692 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
1693 font on an initial frame when running as a daemon (Bug#18869).
1694
1695 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
1696
1697 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1698
1699 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
1700 build_string, when importing a home directory. (Bug#18873)
1701
1702 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1703
1704 * dispnew.c (buffer_posn_from_coords):
1705 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
1706 account for the header-line height. (Bug#18839)
1707
1708 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
1709
1710 * xml.c (parse_region): Do not forget the first document child.
1711
1712 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
1713
1714 * nsselect.m: pasteboard_changecount is new.
1715 (ns_store_pb_change_count, ns_get_pb_change_count)
1716 (ns_get_our_change_count_for): New functions.
1717 (ns_string_to_pasteboard_internal): Correct comment.
1718 type => gtype in eassert, Call ns_store_pb_change_count.
1719 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
1720 (Fns_disown_selection_internal, Fns_selection_owner_p):
1721 Replace Vselection_alist check, with change count check.
1722 (Fns_get_selection): Initialize val to Qnil. Only get local
1723 selection if change counts match (Bug#18799).
1724 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
1725
1726 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
1727
1728 * w32proc.c (create_child): If calling a quoted batch file,
1729 pass NULL for exe. (Bug#18745)
1730
1731 2014-10-24 Eli Zaretskii <eliz@gnu.org>
1732
1733 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
1734 (bidi_resolve_brackets): Use end of string position rather than ZV
1735 when iterating over a string. (Bug#18815)
1736
1737 2014-10-24 Martin Rudalics <rudalics@gmx.at>
1738
1739 * keyboard.c (make_lispy_position): Return coordinates also when
1740 on scroll bars, fringes, margins or not in a window.
1741 * xdisp.c (show_mouse_face): Don't change cursor face during
1742 mouse tracking.
1743
1744 2014-10-23 Martin Rudalics <rudalics@gmx.at>
1745
1746 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
1747 (frame_resize_pixelwise, frame_inhibit_implied_resize):
1748 Fix doc-strings (Bug#18789).
1749
1750 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
1751
1752 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
1753
1754 2014-10-22 Eli Zaretskii <eliz@gnu.org>
1755
1756 Optimize redisplay of simple bracketed text.
1757 * bidi.c (bidi_cache_reset_to): New function.
1758 (bidi_cache_reset): Call it.
1759 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
1760 member to -1.
1761 (bidi_resolve_explicit): Reset bracket_pairing_pos and
1762 bracket_enclosed_type only if bracket_pairing_pos's value is not
1763 ZV.
1764 (MAX_BPA_STACK): Make sure the value is signed.
1765 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
1766 stop pushing values onto the stack.
1767 (bidi_find_bracket_pairs): If the bracketed text is only on the
1768 base embedding level, remove all the states cached by this
1769 function from the cache, and return zero, so that the brackets in
1770 this segment of text are processed as normal neutrals.
1771 (bidi_resolve_brackets): Detect the brackets that are to be
1772 processed as neutrals, and don't call bidi_find_bracket_pairs on
1773 them. (Bug#18778)
1774
1775 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
1776
1777 * w32select.c (Fw32_selection_exists_p): Rename from
1778 Fx_selection_exists_p.
1779 (syms_of_w32select): Adjust accordingly.
1780
1781 * w16select.c (Fw16_selection_exists_p): Rename from
1782 Fx_selection_exists_p.
1783 (syms_of_win16select): Adjust accordingly.
1784
1785 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
1786 (Fns_own_selection_internal): Tighten scoping.
1787 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
1788 (Fns_get_selection): Rename from Fx_get_selection_internal.
1789 (Fns_get_selection_internal, Fns_store_selection_internal):
1790 Remove functions.
1791 (syms_of_nsselect): Adjust accordingly.
1792
1793 2014-10-21 Martin Rudalics <rudalics@gmx.at>
1794
1795 * w32fns.c (Fw32_frame_menu_bar_size): New function.
1796 * w32term.c (x_set_window_size): Account for wrapped menu bar
1797 lines when setting up frame height (Bug#15174 and Bug#18720).
1798 (w32_add_wrapped_menu_bar_lines): New variable.
1799
1800 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
1801
1802 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
1803 move point.
1804
1805 2014-10-20 Glenn Morris <rgm@gnu.org>
1806
1807 * Merge in all changes up to 24.4 release.
1808
1809 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
1810
1811 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
1812 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
1813
1814 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
1815
1816 * xterm.c (handle_one_xevent): Check return value from
1817 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
1818 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
1819
1820 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
1821 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
1822 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
1823 Gtk+ >= 3.14 (Bug#18674).
1824 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
1825 Gtk+ >= 3.14 (Bug#18674).
1826
1827 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
1828
1829 * gtkutil.c: Remove no-longer-used code.
1830 (xg_update_menubar): Remove unused local and unnecessary call to
1831 gtk_menu_item_get_submenu.
1832 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
1833 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
1834 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
1835
1836 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
1837
1838 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
1839
1840 * xterm.h (handlebox_widget): Remove.
1841
1842 * xmenu.c (set_frame_menubar): Remove GTK block that calls
1843 xg_have_tear_offs.
1844
1845 * gtkutil.h (xg_have_tear_offs): Remove declaration.
1846
1847 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
1848 to handle Gtk versions.
1849 (xg_get_file_with_chooser): Use them.
1850 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
1851 Remove (create_menus): Remove teroff argument and code.
1852 Remove call to gtk_menu_set_title.
1853 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
1854 Adjust args to create_menus.
1855 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
1856 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
1857 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
1858 (xg_make_tool_item): Remove detach code.
1859 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
1860 (find_icon_from_name): New function.
1861 (update_frame_tool_bar): Remove GtkStockItem code, move to
1862 find_icon_from_name. Let stock be a list of icon names to try.
1863 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
1864 Replace TOOLBAR_TOP_WIDGET.
1865 (free_frame_tool_bar, xg_change_toolbar_position ):
1866 Replace TOOLBAR_TOP_WIDGET.
1867 (xg_initialize): Remove tearoff code.
1868
1869 2014-10-18 Eli Zaretskii <eliz@gnu.org>
1870
1871 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
1872 pixel from the window's cursor glyph width, since X renders hollow
1873 blocks 1 pixel wider than the 'width' parameter.
1874
1875 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
1876 glyph->pixel_width; this is now done in xterm.c.
1877
1878 Fix reordering of bracket characters in isolates.
1879 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
1880 RESOLVED_ONLY; when non-zero, return from the cache only fully
1881 resolved states. All callers changed.
1882 (CANONICAL_EQU): New macro.
1883 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
1884 equivalent of the paired closing bracket character.
1885 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
1886 the default non-negative value, to be checked later in
1887 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
1888 characters against those pushed onto the BPA stack.
1889 (bidi_record_type_for_neutral): New function.
1890 (bidi_resolve_brackets): Record next_for_neutral and
1891 prev_for_neutral when embedding level gets pushed. Force
1892 resolution of bracket pairs when entering a level run that was not
1893 yet BPA-resolved.
1894 (bidi_resolve_neutral): Add assertions before calling
1895 bidi_resolve_neutral_1.
1896 (bidi_level_of_next_char): Remove the code that attempted to
1897 resolve unresolved neutrals; that is now done by
1898 bidi_resolve_neutral.
1899
1900 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
1901
1902 2014-10-17 Eli Zaretskii <eliz@gnu.org>
1903
1904 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
1905 1-pixel R2L characters.
1906 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
1907 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
1908
1909 2014-10-16 Eli Zaretskii <eliz@gnu.org>
1910
1911 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
1912 useful.
1913
1914 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
1915
1916 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
1917 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
1918 It's not clear to me whether the initialization is needed,
1919 but it can't hurt so I played it safe.
1920
1921 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
1922
1923 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
1924
1925 2014-10-15 Eli Zaretskii <eliz@gnu.org>
1926
1927 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
1928 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
1929 Remove variable.
1930 (bidi_get_type): Return the isolate initiators and terminator types.
1931 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
1932 (bidi_fetch_char_skip_isolates, find_first_strong_char)
1933 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
1934 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
1935 for the new features.
1936 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
1937 push and pop correctly for isolates.
1938 (bidi_remember_char): Modify to accept an additional argument
1939 and record the bidi type according to its value.
1940 (bidi_cache_iterator_state): Accept an additional argument to only
1941 update an existing state. Handle the new members of struct bidi_it.
1942 (bidi_cache_find): Arguments changed: no longer accepts a level,
1943 instead accepts a flag telling it whether it is okay to return
1944 unresolved neutrals.
1945 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
1946 table. Initialize new isolate-related members.
1947 (bidi_paragraph_init): Some code factored out into
1948 find_first_strong_char.
1949 (bidi_resolve_explicit_1): Function deleted, its code incorporated
1950 into bidi_resolve_explicit.
1951 (bidi_resolve_explicit): Support the isolate initiators and
1952 terminator. Fix handling of embeddings and overrides according to
1953 new UBA requirements. Record information about previously seen
1954 characters here (moved from bidi_level_of_next_char).
1955 (bidi_resolve_weak): Adapt to changes in struct members.
1956 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
1957 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
1958 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
1959 paired bracket resolution. Handle isolate initiators and
1960 terminator.
1961 (bidi_type_of_next_char): Remove unneeded code for BN limit.
1962 (bidi_level_of_next_char): Move the code that records information
1963 about previous characters to bidi_resolve_explicit. Fix logic of
1964 resolving neutrals and make sure their cache entries are updated.
1965 Remove now unneeded special handling of PDF level.
1966
1967 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
1968 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
1969 enlarged per Unicode 6.3.
1970 (enum bidi_bracket_type_t): New data type.
1971 (struct bidi_saved_info): Leave only 2 type members out of 4.
1972 Remove bytepos.
1973 (struct bidi_stack): Add members necessary to support isolating
1974 sequences.
1975 (struct bidi_it): Add new members necessary to support isolating
1976 sequences and bracket pair resolution.
1977
1978 * xdisp.c (Fbidi_resolved_levels): New function.
1979 (syms_of_xdisp): Defsubr it.
1980 (append_glyph, append_composite_glyph, produce_image_glyph)
1981 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
1982 assertions.
1983 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
1984
1985 * term.c (append_glyph, append_composite_glyph)
1986 (append_glyphless_glyph): Convert aborts to assertions.
1987
1988 * .gdbinit (pgx): Display the character codepoint, resolved level,
1989 and bidi type also for glyphless glyphs.
1990
1991 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
1992
1993 Avoid unwanted point motion in Fline_beginning_position.
1994 * lisp.h (scan_newline_from_point): Add prototype.
1995 * search.c (scan_newline_from_point): New function, refactored from...
1996 * cmds.c (Fforward_line): ...adjusted user.
1997 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
1998 and simplify the former since the latter doesn't move point.
1999
2000 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
2001
2002 Cleanup terminal handling code.
2003 * dispextern.h (get_named_tty): Remove prototype but...
2004 * termhooks.h (get_named_terminal): ...resurrect it under
2005 more meaningful name.
2006 (get_terminal): Likewise, but with...
2007 (decode_live_terminal): ...this name.
2008 (decode_tty_terminal): Add prototype.
2009 * term.c (get_tty_terminal): Remove.
2010 (get_named_tty): Remove.
2011 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
2012 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
2013 Use decode_tty_terminal.
2014 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
2015 * terminal.c (get_terminal): Refactor to...
2016 (decode_terminal, decode_live_terminal): ...new functions.
2017 (decode_tty_terminal): Replacement for get_tty_terminal.
2018 (get_named_terminal): Likewise for get_named_tty.
2019 * coding.c (Fset_terminal_coding_system_internal)
2020 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
2021 (Fkeyboard_coding_system):
2022 * composite.c (Fcomposition_get_gstring):
2023 * dispnew.c (Fsend_string_to_terminal):
2024 * frame.c (Fmake_terminal_frame):
2025 * nsfns.m (check_ns_display_info):
2026 * w32fns.c, xfns.c (check_x_display_info):
2027 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
2028 * keyboard.c (handle_interrupt_signal, handle_interrupt)
2029 (Fset_quit_char): Use get_named_terminal.
2030 (Fset_output_flow_control, Fset_input_meta_mode):
2031 Use decode_tty_terminal.
2032
2033 2014-10-13 Eli Zaretskii <eliz@gnu.org>
2034
2035 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
2036 between 32-bit and 64-bit MinGW builds. (Bug#18699)
2037
2038 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2039
2040 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
2041 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
2042
2043 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
2044
2045 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
2046 (bug#18638).
2047
2048 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2049
2050 * editfns.c (dump_tz_string): No longer const.
2051 It might be modified.
2052
2053 * nsmenu.m (clear): Assume OS X 10.6 or later.
2054
2055 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
2056
2057 * unexmacosx.c: Remove include ppc/reloc.h.
2058 (unrelocate, copy_dysymtab): Remove PPC code.
2059 (rebase_reloc_address): Remove, only used for PPC:
2060
2061 * nsterm.m: Always include macfont.h on COCOA.
2062 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
2063 (ns_dumpglyphs_image, ns_check_menu_open)
2064 (applicationDidFinishLaunching)
2065 (antialiasThresholdDidChange:)
2066 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
2067 Remove checks for OSX <= 10.5/10.6.
2068 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
2069 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
2070 GNUSTEP.
2071
2072 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
2073 (NS_HAVE_NSINTEGER): Remove block.
2074 Remove >= OSX 10.6 tests.
2075
2076 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
2077 (x_activate_menubar, trackingNotification:): Remove check for
2078 OSX >= 10.5.
2079 (menuNeedsUpdate:): Remove check for OSX < 10.5.
2080
2081 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
2082
2083 * nsfns.m: Always include macfont.h on COCOA.
2084 (ns_filename_from_panel, ns_directory_from_panel)
2085 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
2086 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
2087
2088 * macfont.m: Remove >= 1050 check.
2089 (macfont_create_family_with_symbol)
2090 (macfont_get_glyph_for_character)
2091 (mac_font_get_glyphs_for_variants)
2092 (mac_ctfont_create_available_families, syms_of_macfont):
2093 Remove code for OSX < 10.6.
2094 (mac_font_family_group, mac_font_family_compare): Remove, only used
2095 for OSX < 10.6.
2096
2097 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
2098 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
2099
2100 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
2101 comment.
2102
2103 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
2104
2105 Fix putenv race conditions with undefined behavior (Bug#8705).
2106 Do all putenv calls before Emacs creates any threads.
2107 Use a safer way to modify the TZ environment variable in the
2108 presence of multiple threads. For further thread-safety,
2109 prefer localtime_r and gmtime_r to localtime and gmtime,
2110 and prefer struct tm's tm_gmtoff (if available) to calling
2111 both localtime_r and gmtime_r.
2112 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
2113 (init_dbusbind): ... to this new function.
2114 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
2115 * xterm.c (x_term_init): Move xputenv call from here ...
2116 (init_xterm): ... to this new function.
2117 * emacs.c (main) [USE_GTK]: Call it before creating threads.
2118 * editfns.c (HAVE_TM_GMTOFF): Default to false.
2119 (dump_tz_string): New constant.
2120 (init_editfns): Use it. This centralizes the dump_tz stuff.
2121 Call set_time_zone_rule here, so that its xputenv is done
2122 before Emacs goes multithreaded.
2123 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
2124 thread-safe enough for Emacs.
2125 (format_time_string, Fdecode_time, Fcurrent_time_string)
2126 (Fcurrent_time_zone):
2127 Prefer localtime_r and gmtime_r, which are more thread-safe, to
2128 localtime and gmtime. Remove now-unnecessary calls to block_input.
2129 (tm_gmtoff): New static function.
2130 (Fdecode_time, Fcurrent_time_zone): Use it.
2131 (Fencode_time): Use mktime_z, for better thread-safety.
2132 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
2133 i.e., not quite thread-safe but good enough for Emacs typical usage.
2134 Do not reclaim storage that is in the environment; let it leak.
2135 Always call tzset, since localtime_r does not.
2136 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
2137 This is now done in init_editfns.
2138 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
2139 New macros and declarations, for platforms lacking tzalloc & friends.
2140
2141 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
2142
2143 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
2144 On x86 platforms this works around GCC bug 63495
2145 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
2146 and more generally should fix a portability problem in Emacs.
2147 Reported by Stefan Monnier in:
2148 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
2149
2150 2014-10-08 Leo Liu <sdl.web@gmail.com>
2151
2152 Enhance terpri to allow conditionally output a newline. (Bug#18652)
2153 * keymap.c (describe_vector_princ):
2154 * keyboard.c (Fcommand_error_default_function): Adapt to change to
2155 Fterpri.
2156
2157 * print.c (printchar_stdout_last): Declare.
2158 (printchar): Record the last char written to stdout.
2159 (Fterpri): Add optional argument ENSURE.
2160
2161 2014-10-08 Eli Zaretskii <eliz@gnu.org>
2162
2163 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
2164 DELAY argument to change_frame_size, so that the frame size
2165 changes, if any are needed, are delayed until the next redisplay.
2166 This is to avoid a too early QUIT inside change_frame_size, when
2167 it calls Lisp in frame_windows_min_size, in case one of the events
2168 we've read sets the quit-flag. (Bug#18649)
2169
2170 * w32fns.c (check_x_display_info): Accept terminal objects as
2171 argument, to follow what xfns.c does.
2172
2173 2014-10-07 Glenn Morris <rgm@gnu.org>
2174
2175 * Makefile.in ($(srcdir)/macuvs.h)
2176 ($(lispsource)/international/charprop.el): Add explicit FORCE.
2177
2178 2014-10-07 Eli Zaretskii <eliz@gnu.org>
2179
2180 * decompress.c (init_zlib_functions): Move the message about zlib
2181 being unavailable from here...
2182 (Fzlib_decompress_region): ...to here. (Bug#18650)
2183
2184 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
2185
2186 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
2187 the case where an optional string is used. Adjust docstring.
2188
2189 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
2190
2191 * lisp.mk (lisp): Remove w32-common-fns.elc.
2192
2193 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
2194
2195 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
2196 These were already defined in buffer.c, and the duplicate
2197 definitions cause problems on platforms like 'gcc -fno-common'.
2198 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
2199
2200 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
2201
2202 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
2203 if toolbar is visible.
2204
2205 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
2206 0.23 (Bug#18030).
2207
2208 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
2209 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
2210 (ns_select, ns_read_socket): Use unwind_protect to decrease
2211 apploopnr (Bug#18345).
2212 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
2213 line height (Bug#17977).
2214
2215 * macfont.m: Fix indentation and import changes from macport 24.3.94.
2216 (macfont_closest_traits_index): New function.
2217 (macfont_closest_traits_index_p): Rename from
2218 macfont_closest_traits_index.
2219 (macfont_list): Use macfont_closest_traits_index_p.
2220
2221 2014-10-05 K. Handa <handa@gnu.org>
2222
2223 * coding.c (detect_coding_iso_2022): Set coding->rejected
2224 correctly when an invalid escape sequence is found (Bug#18610).
2225
2226 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
2227
2228 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
2229 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
2230 for add_tearoff_p.
2231
2232 2014-10-04 Martin Rudalics <rudalics@gmx.at>
2233
2234 * buffer.c (scroll_bar_width, scroll_bar_height):
2235 Fix doc-strings.
2236 * window.c (Fset_window_scroll_bars): Fix doc-string.
2237 (Fwindow_scroll_bars): Have it return what the doc-string says.
2238
2239 2014-10-03 Eli Zaretskii <eliz@gnu.org>
2240
2241 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
2242 iterator backwards, to resync the bidi iterator. (Bug#18584)
2243
2244 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
2245
2246 Consistently use min and max macros from lisp.h.
2247 * coding.c (min, max):
2248 * font.c (MAX):
2249 * unexhp9k800.c (min):
2250 * unexw32.c (min, max): Use definitions from lisp.h.
2251 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
2252 Adjust users.
2253 * gmalloc.c (min): Tiny style change.
2254
2255 * fileio.c (emacs_readlinkat, Finsert_file_contents):
2256 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
2257
2258 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
2259
2260 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
2261 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
2262 (X_ULONG_MAX): Move these macros to xterm.h.
2263 (x_fill_property_data): Be more generous about allowing either
2264 signed or unsigned data of the appropriate width.
2265 * xterm.h (x_display_set_last_user_time): New function.
2266 All setters of last_user_time changd to use this function.
2267 If ENABLE_CHECKING, check that the times are in range.
2268
2269 2014-10-02 Eli Zaretskii <eliz@gnu.org>
2270
2271 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
2272 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2273
2274 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
2275
2276 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
2277 make a font_object from a tty frame (Bug#18573).
2278 (Finternal_set_lisp_face_attribute): Add FIXME comment.
2279
2280 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
2281
2282 * alloc.c (mark_overlay): Assume that overlay boundaries are
2283 always markers. Add comment.
2284 * lread.c (read_internal_start): Use convenient validate_subarray.
2285 Adjust docstring.
2286 (Fread_from_string): Adjust docstring.
2287
2288 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
2289
2290 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
2291
2292 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
2293 Rename from the "x-" prefix.
2294
2295 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
2296
2297 * xselect.c (selection-converter-alist): Fix docstring.
2298
2299 2014-10-01 Eli Zaretskii <eliz@gnu.org>
2300
2301 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
2302 argument passed by the caller, when we mirror all slashes into
2303 backslashes.
2304
2305 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
2306
2307 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
2308 Resurrect old code and fix compilation with GTK < 2.13.6.
2309
2310 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
2311
2312 Use AUTO_CONS instead of SCOPED_CONS, etc.
2313 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
2314 * lisp.h (AUTO_CONS): Rename from scoped_cons.
2315 (AUTO_LIST1): Rename from scoped_list1.
2316 (AUTO_LIST2): Rename from scoped_list2.
2317 (AUTO_LIST3): Rename from scoped_list3.
2318 (AUTO_LIST4): Rename from scoped_list4.
2319 (AUTO_STRING): Rename from SCOPED_STRING.
2320 * frame.h (AUTO_FRAME_ARG):
2321 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
2322 (AUTO_LIST4, AUTO_STRING):
2323 Prepend a new argument 'name'.
2324 Declare a variable instead of yielding a value.
2325 All uses changed.
2326 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
2327
2328 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2329
2330 * w32fns.c (w32_createwindow): Accept an additional argument, an
2331 array of 2 values specifying the coordinates of the frame's
2332 top-left corner. Use these values instead of calling x_get_arg,
2333 which can cons Lisp objects, and therefore cannot be called except
2334 from the main thread. Remove redundant tests for the default
2335 values.
2336 (my_create_window): Move the calculation of the coordinates of the
2337 frame's top-left edge here. Pass them to the input thread via the
2338 second parameter of the WM_EMACS_CREATEWINDOW message.
2339 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
2340 for the details.
2341
2342 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2343
2344 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
2345 (redisplay_window): Treat the frame's frozen_window_starts flag
2346 the same way as the optional_new_start flag for the window: only
2347 obey it if the glyph row showing point will be fully visible.
2348 Likewise when the window start is in a continuation line. If,
2349 after trying everything under the 'force_start' label, point is
2350 still not fully visible, give up and scroll the window.
2351 Add debugging traces. (Bug#18545)
2352
2353 * window.c (Frecenter): Set the window's redisplay flag.
2354
2355 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2356
2357 * w32term.c (w32_read_socket): Don't use frame dimensions for
2358 resizing if GetClientRect returned an empty (0, 0, 0, 0)
2359 rectangle. Check the return value of GetClientRect, and don't use
2360 the results if it didn't succeed.
2361
2362 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
2363 in columns and lines after correcting the pixel dimensions in
2364 check_frame_size.
2365 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
2366 negative values to xrealloc. (Bug#18528)
2367
2368 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
2369
2370 * alloc.c: Remove now-unnecessary check.
2371 Suggested by Dmitry Antipov in:
2372 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
2373
2374 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
2375
2376 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
2377 to Ubuntu 14.04.1 x86-64.
2378
2379 Simplify stack-allocated Lisp objects, and make them more portable.
2380 The build_local_string macro was used in two ways: (1) string
2381 literals for which scoped allocation suffices, and (2) file name
2382 components, where it's not safe in general to assume bounded-size
2383 ASCII data. Simplify by defining a new macro SCOPED_STRING that
2384 allocates a block-scope string, and by using SCOPED_STRING for (1)
2385 and build_string for (2). Furthermore, actually use stack
2386 allocation only for objects known to have sufficient alignment.
2387 This simpler implementation means Emacs can make
2388 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
2389 GC_MAKE_GCPROS_NOOPS.
2390 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
2391 for fewer differences among implementations.
2392 (struct Lisp_String): Now GCALIGNED.
2393 (USE_STACK_LISP_OBJECTS): Default to true, since the
2394 implementation no longer insists on a nonempty GCALIGNED.
2395 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
2396 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
2397 separately. Move definiens to scoped_cons. The old definition
2398 was incorrect when GCALIGNED was defined to be empty.
2399 (union Aligned_String): New type.
2400 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
2401 implementation ports to compilers that don't align strictly enough.
2402 Don't worry about the union sizes; it's not worth bothering about.
2403 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
2404 Rewrite using USE_STACK_CONS.
2405 (scoped_cons): Assume the use of union Aligned_Cons.
2406 (lisp_string_size, make_local_string, build_local_string): Remove.
2407 Unless otherwise specified, all callers of build_local_string
2408 changed to use SCOPED_STRING.
2409 (SCOPED_STRING): New macro.
2410 * data.c (wrong_choice):
2411 * menu.c (single_menu_item):
2412 * process.c (Fformat_network_address):
2413 Hoist use of SCOPED_STRING out of a scope, so that its returned
2414 object lives long enough.
2415 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
2416 as the string might be long or might not be ASCII.
2417
2418 2014-09-29 Eli Zaretskii <eliz@gnu.org>
2419
2420 * msdos.c (internal_terminal_init): Bump version to 25.
2421
2422 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
2423
2424 Keep stack-allocated Lisp objects fast rather than versatile.
2425 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
2426 (SCOPED_CONS_INITIALIZER): New macro.
2427 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
2428 (USE_LOCAL_ALLOCA): Remove.
2429 (local_cons, local_list1, local_list2, local_list3, local_list4):
2430 Remove. Stack overflow checking makes them too slow.
2431 (make_local_vector): Likewise. Also we just don't have enough
2432 users for it.
2433 (enum LISP_STRING_OVERHEAD): Remove.
2434 (local_string_init, local_vector_init): Remove prototypes.
2435 (make_local_string, build_local_string): Redesign to target short
2436 compile-time string constants, fall back to regular string allocation
2437 where appropriate.
2438 (lisp_string_size): New function.
2439 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
2440 * alloc.c (local_string_init, local_vector_init): Remove.
2441 (verify_ascii) [ENABLE_CHECKING]: New function.
2442 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
2443 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
2444 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
2445 * xselect.c, xterm.c: All related users changed.
2446
2447 2014-09-28 Ken Brown <kbrown@cornell.edu>
2448
2449 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
2450 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
2451
2452 2014-09-27 Ken Brown <kbrown@cornell.edu>
2453
2454 Fix implementation of HYBRID_MALLOC on Cygwin.
2455 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
2456 (bss_sbrk_buffer_beg): New variable. Use it...
2457 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
2458 incorrect definition.
2459
2460 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
2461
2462 * keyboard.c (track-mouse): Rename to internal--track-mouse.
2463 Make it into a function and change arg to be a function.
2464
2465 * lisp.mk (lisp): Add elisp-mode.elc.
2466
2467 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
2468
2469 * xfns.c (x_default_scroll_bar_color_parameter):
2470 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
2471 to pacify --enable-gcc-warnings in non-scrollbar builds.
2472
2473 2014-09-26 Ken Brown <kbrown@cornell.edu>
2474
2475 * w32term.h (ALIGN_STACK): Fix the cpp condition.
2476
2477 2014-09-25 Eli Zaretskii <eliz@gnu.org>
2478
2479 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
2480 MinGW builds that use GCC before 4.2.
2481
2482 Default to stack objects on DOS_NT platforms as well.
2483 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
2484 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
2485
2486 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
2487
2488 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
2489 ALIGN_STACK attribute.
2490
2491 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
2492
2493 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
2494 ALIGN_STACK attribute.
2495
2496 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
2497 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
2498
2499 2014-09-25 Martin Rudalics <rudalics@gmx.at>
2500
2501 * frame.c (frame_inhibit_resize):
2502 * widget.c (EmacsFrameResize):
2503 * window.c (resize_frame_windows, Fset_window_configuration):
2504 * xdisp.c (expose_frame):
2505 * xfns.c (x_change_tool_bar_height):
2506 * xmenu.c (update_frame_menubar):
2507 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
2508 Remove code left dead after 2014-07-27 changes.
2509
2510 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
2511
2512 Fix local_cons etc. to not exhaust the stack when in a loop.
2513 Problem reported in:
2514 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
2515 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2516 * charset.c (load_charset_map_from_file, Ffind_charset_region)
2517 (Ffind_charset_string):
2518 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
2519 * data.c (wrong_range):
2520 * editfns.c (Fpropertize, format2):
2521 * emacs.c (init_cmdargs, decode_env_path):
2522 * fileio.c (auto_save_error):
2523 * fns.c (Fyes_or_no_p):
2524 * font.c (font_style_to_value, font_parse_xlfd)
2525 (font_parse_family_registry, font_delete_unmatched)
2526 (font_add_log):
2527 * fontset.c (Fset_fontset_font):
2528 * frame.c (x_get_arg):
2529 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
2530 (read_char_minibuf_menu_prompt):
2531 * keymap.c (silly_event_symbol_error, describe_vector):
2532 * lread.c (load_warn_old_style_backquotes):
2533 * menu.c (single_menu_item):
2534 * minibuf.c (Fread_buffer):
2535 * process.c (status_message, Fformat_network_address)
2536 (server_accept_connection):
2537 * textprop.c (copy_text_properties):
2538 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2539 * xfns.c (x_default_scroll_bar_color_parameter):
2540 * xfont.c (xfont_open):
2541 * xselect.c (x_clipboard_manager_error_1):
2542 * xterm.c (x_term_init):
2543 Put USE_LOCAL_ALLOCA at the start of the function.
2544 * fns.c (maybe_resize_hash_table): Use build_string instead of
2545 build_local_string, since we'd otherwise need a conditional
2546 USE_LOCAL_ALLOCA here, but this is just debugging output and is
2547 not worth the bother of optimization.
2548 * font.c (font_delete_unmatched): Remove by-hand code that
2549 observed MAX_ALLOCA limit, since it's now done automatically.
2550 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
2551 since build_local_string needs its sa_alloc.
2552 * lisp.h (lisp_word_count): New function.
2553 (SAFE_ALLOCA_LISP): Use it.
2554 (USE_LOCAL_ALLOCA): New macro.
2555 (local_cons, make_local_vector, make_local_string):
2556 Observe the MAX_ALLOCA limit.
2557 (LISP_STRING_OVERHEAD): New constant.
2558 (make_local_string): Use it.
2559
2560 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2561
2562 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
2563 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
2564 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
2565 and Solaris and it's likely to work on similar platforms.
2566
2567 Avoid signed integer overflow when converting Time to ptrdiff_t.
2568 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
2569 New macros.
2570 (position_to_Time, Time_to_position): New functions.
2571 (gen_help_event, kbd_buffer_get_event): Use them.
2572 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
2573 Go back to plain 'unsigned long', so that 'Time' is the same
2574 for both X and non-X builds; this is less likely to cause surprise.
2575 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
2576 are the same size; this is no longer required.
2577
2578 * keyboard.c (make_lispy_event): Avoid unnecessary tests
2579 of bit 28 and of whether an unsigned value is negative.
2580 This simplifies the code a bit, and pacifies clang 3.4.
2581
2582 2014-09-24 Eli Zaretskii <eliz@gnu.org>
2583
2584 * systime.h (Time): Define as size_t, to be consistent with 64-bit
2585 Windows builds, where 'long' is a 32-bit type.
2586
2587 * w32inevt.h (w32_console_mouse_position): Update the argument
2588 types to use 'Time'.
2589
2590 * w32term.c (w32_mouse_position)
2591 (x_horizontal_scroll_bar_report_motion)
2592 (x_scroll_bar_report_motion): Update the argument types to use
2593 'Time'.
2594
2595 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
2596
2597 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
2598 (struct input_event): ...unsigned bitfields. Likewise for
2599 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
2600 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
2601 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
2602 (kbd_buffer_get_event): Adjust users.
2603 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
2604 (make_scroll_bar_position): New function, refactored out of...
2605 (make_lispy_event): ...adjusted user.
2606 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
2607 * nsterm.m (ns_mouse_position, mouseUp):
2608 * term.c (term_mouse_position):
2609 * w32inevt.c (w32_console_mouse_position):
2610 * w32term.c (w32_mouse_position):
2611 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
2612 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
2613 Prefer enum and explicit enum members to integers and numeric values.
2614
2615 * chartab.c (uniprop_encode_value_numeric):
2616 * font.c (font_style_to_value): Use make_local_vector.
2617 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
2618 * keymap.c (append_key): Use scoped_list1.
2619
2620 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
2621 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
2622
2623 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2624
2625 Fix some slow uses and misuses of strcat.
2626 * doc.c (get_doc_string):
2627 * gtkutil.c (get_utf8_string):
2628 * xsmfns.c (x_session_initialize):
2629 Avoid recomputation of string length.
2630 * ftfont.c (ftfont_spec_pattern):
2631 * xfns.c (xic_create_fontsetname):
2632 Don't assume output buffer is initially zero.
2633
2634 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2635
2636 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
2637 All callers changed.
2638 * xterm.c (x_term_init): Use new functionality to avoid two needs
2639 to compute a string length.
2640
2641 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
2642
2643 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
2644
2645 Use known length of a Lisp string to copy it faster.
2646 * lisp.h (lispstrcpy): New function. Add comment.
2647 * callproc.c (child_setup):
2648 * dbusbind.c (xd_append_arg):
2649 * doc.c (get_doc_string):
2650 * font.c (Ffont_xlfd_name):
2651 * frame.c (xrdb_get_resource):
2652 * process.c (Fmake_network_process, network_interface_info):
2653 * w32fns.c (Fx_open_connection):
2654 * w32proc.c (sys_spawnve):
2655 * xfns.c (select_visual):
2656 * xfont.c (xfont_list):
2657 * xsmfns.c (x_session_initialize):
2658 * xterm.c (x_term_init): Use it.
2659
2660 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2661
2662 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
2663 Reported by Dmitry Antipov in thread leading to:
2664 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
2665 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
2666 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
2667 remain unfixed.
2668 * callproc.c (call_process): Save and restore sa_avail.
2669 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
2670 (AVAIL_ALLOCA): New macro.
2671 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
2672 Use it, and check against sa_avail rather than MAX_ALLOCA.
2673
2674 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2675
2676 On OSX, do not free font-specific data more than once (Bug#18501).
2677 * macfont.m (macfont_close): Release and free font-specific data
2678 only if it wasn't previously freed.
2679
2680 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
2681
2682 * unexmacosx.c (dump_it): Improve error message.
2683
2684 2014-09-22 Juri Linkov <juri@jurta.org>
2685
2686 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
2687 (Bug#10747, bug#18334)
2688
2689 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2690
2691 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
2692 units in which the position is measured. (Bug#18493)
2693
2694 * xdisp.c (redisplay_internal): Force redisplay of all windows
2695 that show a buffer whose narrowing has changed. (Bug#18490)
2696
2697 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2698
2699 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
2700 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
2701 lines, draw the hollow-box and hbar cursors on the right side of
2702 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
2703 testing on X.
2704
2705 * xterm.c (x_draw_stretch_glyph_string):
2706 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
2707 caused the block cursor to disappear on a TAB in R2L lines in
2708 every window except the leftmost one. Reported by Martin Rudalics
2709 <rudalics@gmx.at>.
2710
2711 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2712
2713 Always use matched specpdl entry to record call arguments (Bug#18473).
2714 * lisp.h (record_in_backtrace): Adjust prototype.
2715 * eval.c (record_in_backtrace): Return current specpdl level.
2716 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
2717 (eval_sub, Ffuncall): Record call arguments in matched specpdl
2718 entry and use that entry in call to backtrace_debug_on_exit.
2719 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
2720 (do_debug_on_call): Get current specpdl level as 2nd arg.
2721
2722 Prefer ptrdiff_t to int and avoid integer overflows.
2723 * fileio.c (make_temp_name):
2724 * font.c (font_parse_family_registry): Avoid integer
2725 overflow on string size calculation.
2726 * data.c (Faset): Likewise for byte index.
2727
2728 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2729
2730 Fix display of R2L lines in partial-width windows.
2731 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
2732 assigned the correct value.
2733 (extend_face_to_end_of_line): Account for truncation and
2734 continuation glyphs in R2L rows when one of the fringes is not
2735 displayed.
2736 (display_line): Don't assign negative X offset to a row if we are
2737 going to produce a truncation glyph for it. When handling
2738 truncated R2L rows, consider the width of the left fringe instead
2739 of the right one.
2740 (produce_special_glyphs): Fix bogus assignments.
2741
2742 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2743
2744 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
2745 always set to a valid value. Make sure the size passed to alloca
2746 is always positive. (Bug#18516)
2747
2748 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2749
2750 Avoid extra call to oblookup when interning symbols.
2751 * lisp.h (intern_driver): Add prototype.
2752 * lread.c (intern_driver): New function.
2753 (intern1, intern_c_string_1, Fintern):
2754 * font.c (font_intern_prop):
2755 * w32font.c (intern_font_name): Use it.
2756
2757 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
2758
2759 Minor improvements to new stack-allocated Lisp objects.
2760 * frame.h (FRAME_PARAMETER):
2761 Prefer scoped_list1 to local_list1 where either would do.
2762 * lisp.h (scoped_list4): New macro.
2763 (local_cons, local_list1, local_list2, local_list3, local_list4)
2764 (make_local_vector, make_local_string, build_local_string):
2765 Prefer functions to macros where either would do.
2766 * xdisp.c (build_desired_tool_bar_string):
2767 Prefer scoped_list4 to local_list4 where either would do.
2768
2769 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
2770
2771 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
2772 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
2773 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
2774 * frame.h (FRAME_PARAMETER): New macro.
2775 * dispnew.c (init_display):
2776 * fontset.c (Fset_fontset_font):
2777 * frame.c (x_default_parameter):
2778 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
2779 * xfns.c (x_default_scroll_bar_color_parameter)
2780 (x_default_font_parameter, x_create_tip_frame): Use it.
2781 * editfns.c (Fpropertize): Use local_cons.
2782 * process.c (status_message): Use build_local_string.
2783 * xfont.c (xfont_open): Use make_local_string.
2784 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
2785
2786 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
2787
2788 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
2789 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
2790 !__clang__. This works with GCC and with clang and is safer for
2791 compilers we don't know about.
2792 (local_cons): Rename parameter to make capture less likely.
2793
2794 2014-09-17 Samuel Bronson <naesten@gmail.com>
2795
2796 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
2797
2798 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
2799
2800 Fix minor problems found by static checking.
2801 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
2802 Remove; now unused.
2803 * buffer.h (decode_buffer): Doc and indentation fixes.
2804 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
2805
2806 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
2807
2808 Avoid clang-specific warnings.
2809 * buffer.c (init_buffer): Shut up -Wself-assign.
2810 * process.c (server_accept_connection): Shut up -Wunsequenced.
2811
2812 2014-09-16 Daniel Colascione <dancol@dancol.org>
2813
2814 * fns.c (sxhash): For symbols, use address as hash code.
2815
2816 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
2817
2818 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
2819 * charset.c (load_charset_map_from_file): Use scoped_list2
2820 and build_local_string.
2821 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2822 * emacs.c (init_cmdargs, decode_env_path):
2823 * fileio.c (Fexpand_file_name):
2824 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
2825 * frame.c (x_get_arg):
2826 * keyboard.c (safe_run_hooks_error):
2827 * lread.c (load_warn_old_style_backquotes):
2828 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2829 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
2830 * xselect.c (x_clipboard_manager_error_1)
2831 (x_clipboard_manager_save_all):
2832 * xterm.c (x_term_init): Use build_local_string.
2833
2834 Avoid more integer overflows on string size calculations.
2835 * category.c (Fmake_category_set):
2836 * xdisp.c (get_overlay_arrow_glyph_row):
2837 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
2838
2839 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2840
2841 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
2842 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
2843 error message format. Use message_with_string to have non-ASCII
2844 file names properly displayed.
2845 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
2846 when w32-unicode-filenames is non-nil, but not on Windows 9X,
2847 where these APIs are not available even in UNICOWS.DLL.
2848 Improve the format of error messages and include the file name in them
2849 where appropriate.
2850 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
2851 call play-sound-functions, per documentation.
2852
2853 * w32.c (w32_get_long_filename, w32_get_short_filename):
2854 Constify the input file name arguments.
2855
2856 * w32.h (w32_get_long_filename, w32_get_short_filename):
2857 Update prototypes.
2858
2859 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
2860
2861 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
2862 * lisp.h (local_cons, local_list1, local_list2, local_list3)
2863 [USE_LOCAL_ALLOCATORS]: New macros.
2864 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
2865 (build_local_string): Avoid argument name expansion clash with
2866 make_local_string.
2867 * alloc.c (toplevel)
2868 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
2869 Preprocessor guard to avoid impossible configuration.
2870 * charset.c (Ffind_charset_region, Ffind_charset_string):
2871 Use make_local_vector.
2872 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
2873 * textprop.c (Fput_text_property, Fadd_face_text_property):
2874 Use scoped_list2.
2875 (copy_text_properties): Use local_cons and local_list3.
2876 * chartab.c (uniprop_table):
2877 * data.c (wrong_choice, wrong_range):
2878 * doc.c (get_doc_string):
2879 * editfns.c (format2):
2880 * fileio.c (Fexpand_file_name, auto_save_error):
2881 * fns.c (Fyes_or_no_p):
2882 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
2883 * fontset.c (Fset_fontset_font):
2884 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
2885 (read_char_minibuf_menu_prompt):
2886 * keymap.c (silly_event_symbol_error, describe_vector):
2887 * menu.c (single_menu_item):
2888 * minibuf.c (Fread_buffer):
2889 * process.c (status_message, Fformat_network_address)
2890 (server_accept_connection): Use make_local_string and
2891 build_local_string. Prefer compound literals where appropriate.
2892
2893 2014-09-15 Daniel Colascione <dancol@dancol.org>
2894
2895 * fns.c (Fsort): Tweak sort docstring.
2896
2897 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2898
2899 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
2900 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
2901 set errno to EAGAIN instead, to allow the caller to retry the
2902 write after some waiting. Fixes deadlocks when Emacs exchanges a
2903 lot of data through the pipe. (Bug#18420)
2904
2905 * sound.c (Fplay_sound_internal): Encode the sound file name in
2906 the ANSI codepage. Expand it against data-directory, as per docs,
2907 not against the current directory. No need to make a local copy
2908 of the file name; pass the encoded file name directly to
2909 do_play_sound. (Bug#18463)
2910
2911 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
2912 NULL, and the file name is not encodable in ANSI codepage, return
2913 the string with "?" replacement characters, which will fail the
2914 caller. This avoids returning a random value in that case.
2915
2916 2014-09-15 Martin Rudalics <rudalics@gmx.at>
2917
2918 * window.c (Fresize_mini_window_internal): Set w->total_lines
2919 from w->pixel_height (Bug#18422).
2920
2921 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
2922
2923 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
2924 (toggleFullScreen:): Take frame_resize_pixelwise into account when
2925 setting resize increments (Bug#18435).
2926
2927 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2928
2929 * xdisp.c (pos_visible_p): Properly save and restore the iterator
2930 state around the call to line_bottom, since it can move the
2931 iterator to another screen line. This fixes off-by-one errors in
2932 the reported row in some rare cases.
2933
2934 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
2935
2936 * callproc.c (init_callproc): Fix bug introduced at
2937 2014-09-07 (Bug#18474).
2938
2939 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2940
2941 Prefer ptrdiff_t to int and avoid integer overflows.
2942 * fileio.c (make_temp_name):
2943 * font.c (font_parse_family_registry): Avoid integer
2944 overflow on string size calculation.
2945 * data.c (Faset): Likewise for byte index.
2946
2947 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
2948
2949 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
2950
2951 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2952
2953 * lisp.h (make_local_string): Nitpick indent.
2954 * print.c (Fprin1_to_string): Remove unused GCPROs.
2955
2956 More debugging aids around GCPROs.
2957 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
2958 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
2959 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
2960
2961 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
2962 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
2963
2964 Remove redundant GCPROs around Ffuncall and Fapply calls.
2965 This is safe because Ffuncall protects all of its arguments by itself.
2966 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
2967 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
2968 (call6, call7): Likewise. Use compound literals where applicable.
2969 (run_hook_with_args_2): Use compound literal.
2970
2971 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
2972
2973 Pacify --enable-gcc-warnings when no window system is used.
2974 These warnings found that subscript error, so they seem worthwhile.
2975 * composite.c (char_composable_p): Simplify a bit.
2976 * frame.c (x_set_frame_parameters): Add an IF_LINT.
2977 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
2978 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
2979 * window.c (set_window_scroll_bars):
2980 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
2981 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
2982 Ignore -Wsuggest-attribute=const.
2983 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
2984 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
2985
2986 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
2987
2988 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
2989 Use check_iso_charset_parameter instead of doing the checks by hand.
2990 (check_iso_charset_parameter): Move up. Check parameters a bit
2991 more carefully, and return true for 96-char sets. All callers changed.
2992
2993 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
2994
2995 Simplify lisp.h by removing the __COUNTER__ business.
2996 Reported by Dmitry Antipov in:
2997 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
2998 * lisp.h (make_local_vector, make_local_string)
2999 (build_local_string): Simplify by not bothering with __COUNTER__.
3000 The __COUNTER__ business wasn't working properly, and was needed
3001 only for hypothetical future expansion anyway.
3002
3003 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
3004
3005 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
3006 terms to determine bitmap color. (Bug#18437)
3007
3008 2014-09-10 Eli Zaretskii <eliz@gnu.org>
3009
3010 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
3011 translation buffer.
3012
3013 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3014
3015 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
3016
3017 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
3018
3019 * xterm.c (handle_one_xevent): Detect iconified by looking at
3020 _NET_WM_STATE_HIDDEN.
3021
3022 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
3023
3024 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
3025 These can generate a constant with the correct value but the wrong
3026 width, which doesn't work as a printf argument. All uses removed.
3027 Reported by Dmitry Antipov in:
3028 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
3029 (ENUMABLE): Remove; no longer needed.
3030 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
3031 Remove; no longer needed because of the above change.
3032 Each definiens moved to the only use.
3033
3034 Improve the experimental local and scoped allocation.
3035 * alloc.c (local_string_init, local_vector_init):
3036 New functions, defined if USE_LOCAL_ALLOCATORS.
3037 Mostly, these are moved here from lisp.h, as it's not
3038 clear it's worth making them inline.
3039 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
3040 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
3041 USE_STACK_LISP_OBJECTS, not on a laundry list.
3042 (local_string_init, local_vector_init): New decls.
3043 (union Aligned_Cons): New type.
3044 (scoped_cons): Use it. Give up on the char trick, as it's a too
3045 much of a maintenance hassle; if someone wants this speedup
3046 they'll just need to convince their compiler to align properly.
3047 Conversely, use the speedup if struct Lisp_Cons happens to
3048 be aligned even without a directive. Better yet, help it along
3049 by using union Aligned_Cons rather than struct Lisp_Cons.
3050 (pointer_valid_for_lisp_object): Remove. This check is not
3051 necessary, since make_lisp_ptr is already doing it. All uses removed.
3052 (local_vector_init, local_string_init): Move to alloc.c.
3053 (build_local_vector): Remove this awkward macro, replacing with ...
3054 (make_local_vector): New macro, which acts more like a function.
3055 Use statement expressions and use __COUNTER__ to avoid macro
3056 capture. Fall back on functions if these features are not supported.
3057 (build_local_string, make_local_string): Likewise.
3058
3059 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
3060
3061 * xterm.c (x_term_init): Consolidate duplicated code.
3062 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
3063 (x_delete_terminal): Do not close X connection fd (Bug#18403).
3064 Add eassert and mark dpyinfo as dead only if it was alive.
3065
3066 Add macros to allocate temporary Lisp objects with alloca.
3067 Respect MAX_ALLOCA and fall back to regular GC for large objects.
3068 * character.h (parse_str_as_multibyte): Move prototype to ...
3069 * lisp.h (parse_str_as_multibyte): ... here.
3070 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
3071 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
3072 New macros.
3073 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
3074 (local_string_init): New functions.
3075 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
3076 (init_alloc_once): Call it.
3077
3078 Cleanup last change and make all new stuff conditional.
3079 * lisp.h (build_local_string): Rename to ...
3080 (make_local_string): ... this macro.
3081 (build_local_string, scoped_list1, scoped_list3): New macros.
3082 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
3083 and functions as such, use regular fallbacks otherwise.
3084 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
3085 conditionally.
3086
3087 2014-09-08 Eli Zaretskii <eliz@gnu.org>
3088
3089 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
3090 always make sure the marginal areas of the row are in sync with
3091 what the window wants. (Bug#18419)
3092
3093 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
3094 existing binding of a variable, to avoid silently aborting
3095 commands that use specbind. (Bug#18331)
3096
3097 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3098
3099 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
3100 * coding.c (growable_destination): New function.
3101 (produce_chars): Use it for sanity checks. Do not fiddle with
3102 dst_end if the source and destination are both nil, as it's
3103 the caller's responsibility to avoid overlap.
3104 * keyboard.c (read_decoded_event_from_main_queue):
3105 The destination must be MAX_MULTIBYTE_LENGTH times the max source
3106 length, not 4 times, to prevent decode_coding_c_string from trying
3107 to reallocate a destination. This removes the need for the FIXME.
3108
3109 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
3110 All callers simplified. Add a comment about exec_failed, vfork,
3111 and alloca.
3112
3113 Adjust drag-and-drop fix when window is above top (Bug#18303).
3114 * xselect.c (x_fill_property_data): Don't let sign bit of negative
3115 XCDR bleed into XCAR's encoded value. Improve checks for
3116 out-of-range data while we're at it.
3117
3118 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
3119
3120 * xselect.c (x_fill_property_data): Handle negative XCDR when data
3121 is CONSP (Bug#18303).
3122
3123 2014-09-07 Eli Zaretskii <eliz@gnu.org>
3124
3125 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
3126 'alloca' gets passed arguments larger than MAX_ALLOCA.
3127
3128 * font.c (MAX): Define if not defined elsewhere.
3129
3130 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
3131
3132 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
3133 here for destination buffer, to work around what appears to be a
3134 bug in decode_coding_c_string when the source and destination are
3135 both C strings.
3136
3137 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
3138 This follows up on the recent thread in emacs-devel on alloca; see:
3139 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
3140 This patch also cleans up alloca-related glitches noted while
3141 examining the code looking for unbounded alloca.
3142 * alloc.c (listn):
3143 * callproc.c (init_callproc):
3144 Rewrite to avoid need for alloca.
3145 * buffer.c (mouse_face_overlay_overlaps)
3146 (report_overlay_modification):
3147 * buffer.h (GET_OVERLAYS_AT):
3148 * coding.c (make_subsidiaries):
3149 * doc.c (Fsnarf_documentation):
3150 * editfns.c (Fuser_full_name):
3151 * fileio.c (Ffile_name_directory, Fexpand_file_name)
3152 (search_embedded_absfilename, Fsubstitute_in_file_name):
3153 * fns.c (Fmake_hash_table):
3154 * font.c (font_vconcat_entity_vectors, font_update_drivers):
3155 * fontset.c (fontset_pattern_regexp, Ffontset_info):
3156 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
3157 (xrdb_get_resource, x_get_resource_string):
3158 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
3159 * ftxfont.c (ftxfont_draw):
3160 * image.c (xbm_load, xpm_load, jpeg_load_body):
3161 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
3162
3163 * keymap.c (Fdescribe_buffer_bindings, describe_map):
3164 * lread.c (openp):
3165 * menu.c (digest_single_submenu, find_and_call_menu_selection)
3166 (find_and_return_menu_selection):
3167 * print.c (PRINTFINISH):
3168 * process.c (Fformat_network_address):
3169 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
3170 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
3171 * sound.c (wav_play, au_play):
3172 * syntax.c (skip_chars):
3173 * term.c (tty_menu_activate, tty_menu_show):
3174 * textprop.c (get_char_property_and_overlay):
3175 * window.c (Fset_window_configuration):
3176 * xdisp.c (safe__call, next_overlay_change, vmessage)
3177 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
3178 * xfaces.c (face_at_buffer_position):
3179 * xmenu.c (x_menu_show):
3180 Use SAFE_ALLOCA etc. instead of plain alloca, since the
3181 allocation size isn't bounded.
3182 * callint.c (Fcall_interactively): Redo memory_full check
3183 so that it can be done at compile-time on some platforms.
3184 * coding.c (MAX_LOOKUP_MAX): New constant.
3185 (get_translation_table): Use it.
3186 * callproc.c (call_process): Use SAFE_NALLOCA instead of
3187 SAFE_ALLOCA, to catch integer overflows on size calculation.
3188 (exec_failed) [!DOS_NT]: New function.
3189 (child_setup) [!DOS_NT]: Use it.
3190 * editfns.c (Ftranspose_regions):
3191 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
3192 * editfns.c (check_translation):
3193 Allocate larger buffers on the heap.
3194 * eval.c (internal_lisp_condition_case):
3195 Check for MAX_ALLOCA overflow.
3196 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
3197 (Fbase64_encode_region, Fbase64_decode_region):
3198 Avoid unnecessary calls to SAFE_FREE before 'error'.
3199 * buffer.c (mouse_face_overlay_overlaps):
3200 * editfns.c (Fget_pos_property, check_translation):
3201 * eval.c (Ffuncall):
3202 * font.c (font_unparse_xlfd, font_find_for_lface):
3203 * ftfont.c (ftfont_drive_otf):
3204 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
3205 (menu_bar_items, tool_bar_items):
3206 * sound.c (Fplay_sound_internal):
3207 * xdisp.c (load_overlay_strings, dump_glyph_row):
3208 Use an ordinary auto buffer rather than alloca, since the
3209 allocation size is fixed and small.
3210 * ftfont.c: Include <c-strcase.h>.
3211 (matching_prefix): New function.
3212 (get_adstyle_property): Use it, to avoid need for alloca.
3213 * keyboard.c (echo_add_key):
3214 * keymap.c (describe_map): Use ptrdiff_t, not int.
3215 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
3216 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
3217 when counting bytes.
3218 * lisp.h (xlispstrdupa): Remove, replacing with ...
3219 (SAFE_ALLOCA_STRING): ... new macro with different API.
3220 This fixes a portability problem, namely, alloca result
3221 passed to another function. All uses changed.
3222 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
3223 not MAX_ALLOCA - 1.
3224 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
3225 (REGEX_ALLOCATE): New macros.
3226 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
3227 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
3228 Use them.
3229 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
3230 by hand.
3231 (decode_mode_spec_coding): Store directly into buf rather than
3232 into an alloca temporary and copying the temporary to the buf.
3233
3234 2014-09-06 Eli Zaretskii <eliz@gnu.org>
3235
3236 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
3237
3238 2014-09-04 Jan D <jan.h.d@swipnet.se>
3239
3240 * xterm.c (x_term_init): Don't call x_session_initialize if running
3241 as a daemon (Bug#18375).
3242
3243 * xsmfns.c: Initialize ice_fd.
3244
3245 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
3246
3247 Less chatter in 'make' output.
3248 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
3249 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
3250 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
3251
3252 2014-09-03 Martin Rudalics <rudalics@gmx.at>
3253
3254 * buffer.c (scroll-bar-height): Fix typo in doc-string.
3255 * frame.c (Vdefault_frame_horizontal_scroll_bars):
3256 Remove variable.
3257 * nsfns.m (Fx_create_frame):
3258 * w32fns.c (Fx_create_frame):
3259 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
3260 nil.
3261
3262 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3263
3264 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
3265 the reported row in the case of a window with a header line, by
3266 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
3267 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
3268
3269 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
3270
3271 * eval.c (internal_lisp_condition_case): Don't overrun the stack
3272 when configured --with-wide-int on typical 32-bit platforms.
3273
3274 2014-09-03 Eli Zaretskii <eliz@gnu.org>
3275
3276 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
3277 when HPOS is negative, for the benefit of R2L glyph rows whose
3278 newline overflows into the fringe.
3279
3280 2014-09-03 Ken Brown <kbrown@cornell.edu>
3281
3282 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
3283
3284 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
3285
3286 Minor cleanup of recent strlen-avoiding patch.
3287 * fileio.c (CHECK_LENGTH): Remove.
3288 Rewrite callers so that they don't need it.
3289 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
3290 variable wasn't set.
3291
3292 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
3293
3294 * fileio.c (CHECK_LENGTH): New macro.
3295 (Fexpand_file_name): Use it and get rid of a few more calls
3296 to strlen and strcat.
3297 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
3298 * lisp.h (egetenv): ... because of a new inline function used to
3299 avoid calls to strlen for a compile-time constants.
3300
3301 * buffer.h (decode_buffer): New function.
3302 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
3303 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
3304 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
3305 * data.c (Flocal_variables_p):
3306 * fileio.c (Fverify_visited_file_modtime):
3307 * marker.c (live_buffer): Use it.
3308
3309 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
3310
3311 Avoid extra calls to strlen in filesystem I/O routines.
3312 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
3313 the length of 'newdir' is known or may be precalculated.
3314 (file_accessible_directory_p): Prefer to pass Lisp_Object,
3315 not 'char *', and so use precalculated length.
3316 (Ffile_accessible_directory_p):
3317 * callproc.c (encode_current_directory, init_callproc):
3318 * charset.c (init_charset):
3319 * lread.c (load_path_check, load_path_default): Adjust users.
3320 * lisp.h (file_accessible_directory_p): Tweak prototype.
3321
3322 2014-09-01 Eli Zaretskii <eliz@gnu.org>
3323
3324 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
3325 locales.
3326
3327 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
3328
3329 --enable-silent-rules now suppresses more chatter.
3330 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
3331 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
3332 (am__v_CCLD_1): New macros, taken from Automake.
3333 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
3334
3335 Clean up extern decls a bit.
3336 * bytecode.c: Include blockinput.h and keyboard.h rather
3337 than rolling their APIs by hand.
3338 * emacs.c: Include regex.h and rely on its and lisp.h's API
3339 rather than rolling them by hand.
3340 * lastfile.c: Include lisp.h, to check this file's API.
3341 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
3342 New decls.
3343 * regex.h (re_max_failures): New decl.
3344 * unexcw.c, unexmacosx.c, unexw32.c:
3345 Rely on lisp.h's API rather than rolling it by hand.
3346 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
3347 Declare at top level, to pacify GCC -Wnested-externs.
3348
3349 2014-08-31 Eli Zaretskii <eliz@gnu.org>
3350
3351 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
3352 clipping rectangle become negative (i.e. large positive, since
3353 it's an unsigned data type). This can happen in R2L hscrolled
3354 glyph rows, and caused us to draw the cursor glyph on the fringe.
3355 For the details, see
3356 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
3357
3358 2014-08-31 Ken Brown <kbrown@cornell.edu>
3359
3360 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
3361 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
3362 is defined. (Bug#18368)
3363
3364 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
3365
3366 Vector-sorting fixes (Bug#18361).
3367 It's not safe to call qsort or qsort_r, since they have undefined
3368 behavior if the user-specified predicate is not a total order.
3369 Also, watch out for garbage-collection while sorting vectors.
3370 * fns.c: Include <vla.h>.
3371 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
3372 (sort_vector_compare): Remove, replacing with ....
3373 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
3374 ... these new functions.
3375 (sort_vector): Rewrite to use the new functions.
3376 GCPRO locals, since the predicate can invoke the GC.
3377 Since it's in-place return void; caller changed.
3378 (merge): Use 'inorder', for clarity.
3379
3380 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
3381 One can't hoist this out of the 'if', because intervening calls to
3382 newlocale, twolower, etc. can change errno.
3383
3384 2014-08-30 Eli Zaretskii <eliz@gnu.org>
3385
3386 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
3387 wording of the error messages.
3388 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
3389 sets errno.
3390
3391 * w32proc.c (get_lcid_callback): Accept locale specifications
3392 without the country part, as in "enu" vs "enu_USA".
3393 (w32_compare_strings): Signal an error if a locale was specified,
3394 but couldn't be translated into a valid LCID.
3395
3396 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3397
3398 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
3399
3400 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
3401
3402 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
3403 errno after towlower_l. errno's value is not specified after
3404 towlower_l. Instead, assume that towlower_l returns its argument
3405 on failure, which is portable in practice.
3406
3407 2014-08-29 Eli Zaretskii <eliz@gnu.org>
3408
3409 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
3410
3411 * w32proc.c (w32_compare_strings): Accept additional argument
3412 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
3413 if requested. If w32-collate-ignore-punctuation is non-nil, add
3414 NORM_IGNORESYMBOLS to the flags.
3415 (LINGUISTIC_IGNORECASE): Define if not already defined.
3416 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
3417
3418 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
3419 change.
3420
3421 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3422
3423 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
3424 Define substitutes for platforms that lack them.
3425 (str_collate): Add arguments locale and ignore_case.
3426
3427 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
3428 Add optional arguments LOCALE and IGNORE-CASE.
3429
3430 * lisp.h (str_collate): Adapt argument list.
3431
3432 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
3433
3434 Add vectors support to Fsort.
3435 * fns.c (sort_vector, sort_vector_compare): New functions.
3436 (sort_list): Likewise, refactored out of ...
3437 (Fsort): ... adjusted user. Mention vectors in docstring.
3438 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
3439 * alloc.c (make_save_int_obj): New function.
3440 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
3441 (make_save_int_obj): Add prototype.
3442
3443 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
3444 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
3445 Conditionally define to match system's qsort_r signature.
3446 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
3447
3448 2014-08-28 Ken Brown <kbrown@cornell.edu>
3449
3450 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
3451 dumping and the system malloc after dumping. (Bug#18222)
3452
3453 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
3454 Define as macros, expanding to hybrid_malloc, etc.
3455 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
3456 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
3457 macro.
3458 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
3459 full implementation on Cygwin. Remove Cygwin-specific code that
3460 is no longer needed.
3461 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
3462 Redefine as macros expanding to gmalloc, grealloc, etc.
3463 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
3464 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
3465 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
3466 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
3467 [HYBRID_MALLOC]:
3468 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3469 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
3470 HAVE_POSIX_MEMALIGN)]: New functions.
3471 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3472 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
3473 hybrid_aligned_alloc; declare.
3474 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3475 HAVE_POSIX_MEMALIGN)]: Define.
3476 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
3477 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3478 Define as macro, expanding to gget_current_dir_name, and define
3479 the latter.
3480 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
3481 malloc_enable_thread(). Don't initialize malloc.
3482 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
3483 no longer defined on Cygwin).
3484 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
3485 * sheap.c (bss_sbrk_buffer_end): New variable.
3486 * unexcw.c (__malloc_initialized): Remove variable.
3487 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
3488 SYSTEM_MALLOC.
3489 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
3490 Vmemory_full.
3491
3492 2014-08-28 Martin Rudalics <rudalics@gmx.at>
3493
3494 * w32term.c (w32_horizontal_scroll_bar_handle_click):
3495 In `event->y' return entire range (the size of the scroll bar minus
3496 that of the thumb).
3497 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
3498 return entire range (the scaled size of the scroll bar minus
3499 that of the slider). In `portion' return the scaled position of
3500 the slider.
3501 (xaw_jump_callback): Restore part of code for vertical scroll
3502 bar broken in change from 2014-07-27.
3503 (xaw_scroll_callback): Provide incremental scrolling with
3504 horizontal scroll bars.
3505
3506 2014-08-28 Eli Zaretskii <eliz@gnu.org>
3507
3508 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
3509
3510 * indent.c (Fvertical_motion): Fix vertical motion up through a
3511 display property after a newline. (Bug#18276)
3512
3513 * xdisp.c (display_line): Don't assume that the call to
3514 reseat_at_next_visible_line_start ends up at a character
3515 immediately following the newline on the previous line.
3516 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
3517 beyond ZV, which causes infloop in redisplay. For the details, see
3518 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
3519
3520 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
3521 coordinate for hscrolled R2L screen lines. (Bug#18277)
3522
3523 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
3524
3525 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
3526 (Bug#18051).
3527
3528 2014-08-27 Eli Zaretskii <eliz@gnu.org>
3529
3530 * syntax.c (scan_lists): Don't examine positions before BEGV.
3531 (Bug#18339)
3532
3533 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
3534
3535 Improve robustness of new string-collation code (Bug#18051).
3536 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
3537 (newlocale, wcscoll_l): Define substitutes for platforms that
3538 lack them, so as to simplify the mainline code.
3539 (str_collate): Simplify the code by assuming the above definitions.
3540 Use wcscoll_l, not uselocale, as uselocale is too fragile.
3541 For example, the old version left the Emacs in the wrong locale if
3542 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
3543 result. Report an error if newlocale fails.
3544
3545 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
3546
3547 * lisp.h (str_collate):
3548 * sysdep.c (str_collate): Return int.
3549 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
3550
3551 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3552
3553 Fix some glitches in previous change.
3554 * sysdep.c (stack_direction): Replace stack_grows_down
3555 to simplify calculation of stack boundaries.
3556 (handle_sigsegv): Check whether we really crash somewhere near
3557 to stack boundary, and handle fatal signal as usual if not.
3558 (init_sigsegv): Adjust accordingly.
3559 * keyboard.c (Vtop_level_message): Rename to
3560 Vinternal__top_level_message, as suggested by Stefan Monnier in
3561 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
3562 All related users changed.
3563
3564 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
3565
3566 Handle C stack overflow caused by too nested Lisp evaluation.
3567 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
3568 siglongjmp point to transfer control from SIGSEGV handler.
3569 * keyboard.c (return_to_command_loop, recover_top_level_message)
3570 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
3571 (regular_top_level_message): New variable.
3572 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
3573 exit from SIGSEGV handler and adjust message displayed by Vtop_level
3574 if appropriate.
3575 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
3576 new variables described above.
3577 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
3578 (stack_grows_down, sigsegv_stack, handle_sigsegv)
3579 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
3580 (init_sigsegv): New function.
3581 (init_signals): Use it.
3582
3583 2014-08-25 Ken Brown <kbrown@cornell.edu>
3584
3585 * emacs.c (main): Remove use of obsolete macro
3586 G_SLICE_ALWAYS_MALLOC.
3587
3588 2014-08-25 Eli Zaretskii <eliz@gnu.org>
3589
3590 Implement locale-sensitive string collation for MS-Windows.
3591 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
3592 New functions. (Bug#18051)
3593
3594 * w32.h (w32_compare_strings): Add prototype.
3595
3596 * w32.c <g_b_init_compare_string_w>: New global flag.
3597 (globals_of_w32): Initialize it.
3598
3599 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
3600
3601 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
3602 [WINDOWSNT]: Call str_collate on MS-Windows.
3603
3604 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
3605
3606 One more minor cleanup of font subsystem.
3607 * font.h (struct font_driver): Convert text_extents to
3608 return void because returned value is never actually used.
3609 * macfont.m (macfont_text_extents):
3610 * w32font.c (w32font_text_extents):
3611 * xftfont.c (xftfont_text_extents): Adjust to return void
3612 and assume that 'metrics' argument is always non-NULL.
3613 * ftfont.c (ftfont_text_extents):
3614 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
3615
3616 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
3617
3618 Minor cleanups of str_collate fix (Bug#18051).
3619 * fns.c (str_collate): Move decl from here ...
3620 * lisp.h (str_collate): ... to here.
3621 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
3622 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
3623 potential problems with integer overflow. Don't assume
3624 setlocale succeeds. Remove unnecessary test before restoring
3625 locale via setlocale, and free the copied setlocale string
3626 when done with it.
3627
3628 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
3629
3630 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
3631
3632 * sysdep.c (str_collate): New function. (Bug#18051)
3633
3634 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
3635
3636 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
3637 if the initial "rm -f" fails. This is for MinGW builds, where
3638 MS-Windows will not allow deleting the executable file of a
3639 running program.
3640
3641 2014-08-20 Eli Zaretskii <eliz@gnu.org>
3642
3643 * w32term.c (w32_scroll_bar_handle_click)
3644 (w32_horizontal_scroll_bar_handle_click)
3645 (x_scroll_bar_report_motion)
3646 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
3647 SB_THUMBTRACK, use the 32-bit position information returned by
3648 GetScrollInfo, not the 16-bit information returned in the Windows
3649 message sent to us.
3650
3651 2014-08-19 Eli Zaretskii <eliz@gnu.org>
3652
3653 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
3654 second coordinate ('y') reported for dragging the horizontal
3655 scroll bar thumb.
3656
3657 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3658
3659 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
3660 and text area-relative x-coordinates.
3661
3662 2014-08-17 Eli Zaretskii <eliz@gnu.org>
3663
3664 Avoid overwriting the reversed_p flags in the glyph matrices when
3665 init_iterator or start_display are called.
3666 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
3667 the glyph row here.
3668 (tool_bar_height, redisplay_tool_bar, try_window)
3669 (try_window_reusing_current_matrix, try_window_id)
3670 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
3671 reversed_p flag of the iterator's glyph row where the glyph row
3672 is going to be redrawn.
3673
3674 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
3675
3676 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
3677
3678 2014-08-16 Martin Rudalics <rudalics@gmx.at>
3679
3680 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
3681 of emacs_event return length from si.nPage to si.nMax.
3682 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
3683 interchange start and end of thumb.
3684
3685 2014-08-15 Ken Brown <kbrown@cornell.edu>
3686
3687 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
3688 ERRORCHECK mutexes. (Bug#18222)
3689
3690 2014-08-12 Martin Rudalics <rudalics@gmx.at>
3691
3692 * frame.c (set_menu_bar_lines_1): Remove.
3693 (set_menu_bar_lines): Call change_frame_size instead of
3694 set_menu_bar_lines_1.
3695
3696 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
3697
3698 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
3699 set f->official.
3700
3701 2014-08-11 Glenn Morris <rgm@gnu.org>
3702
3703 * fileio.c: Revert 2013-01-31 change, which chose coding system for
3704 writing before backing up, since it causes a more serious problem
3705 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
3706 (choose_write_coding_system): No longer callable from Lisp.
3707 Move last piece back here from Fwrite_region.
3708 (Fwrite_region, syms_of_fileio): Update for above changes.
3709
3710 2014-08-11 Martin Rudalics <rudalics@gmx.at>
3711
3712 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
3713 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
3714 (Fwindow_new_pixel, Fset_window_new_pixel)
3715 (Fset_window_new_total, Fset_window_new_normal)
3716 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
3717 See also:
3718 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
3719
3720 2014-08-11 Eli Zaretskii <eliz@gnu.org>
3721
3722 * fontset.c (Finternal_char_font): Recompute basic faces if the
3723 frame's face cache was cleared. (Bug#18162)
3724
3725 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
3726
3727 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
3728 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
3729 base buffer's undo list.
3730
3731 2014-08-10 Reuben Thomas <rrt@sc3d.org>
3732
3733 Fix a couple of recent inadvertent breaks of the MSDOS port.
3734 * msdos.c: include required menu.h
3735 * term.c: set correct menu_show_hook on MSDOS.
3736
3737 2014-08-10 Martin Rudalics <rudalics@gmx.at>
3738
3739 Fix handling of menu bar line on TTY frames (Bug#18136)
3740 (Bug#18196).
3741 * dispnew.c (handle_window_change_signal):
3742 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
3743 frame's menu bar lines subtracted from height.
3744 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
3745 frames.
3746 (adjust_frame_size): Count in menu bar when setting FrameRows.
3747 (make_terminal_frame): When setting up the frame's lines and
3748 text height don't count in the menu bar.
3749 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
3750 lines subtracted from height.
3751 (do_switch_frame): Set tty's FrameRows to number of total lines
3752 of frame.
3753 (Fframe_pixel_height, Fframe_pixel_width): If no window system
3754 is used, return total number of lines and columns.
3755 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
3756 of FRAME_LINES.
3757 * term.c (OUTPUT, tty_set_terminal_modes)
3758 (tty_set_terminal_window, tty_set_scroll_region)
3759 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
3760 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
3761 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3762 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3763 Call change_frame_size with frame's menu bar lines subtracted
3764 from height.
3765 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
3766 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
3767 FRAME_LINES.
3768
3769 2014-08-09 Reuben Thomas <rrt@sc3d.org>
3770
3771 * alloc.c (Fmemory_info): Remove a stray brace.
3772
3773 * process.c: Fix a comment typo.
3774
3775 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
3776
3777 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
3778
3779 * widgetprv.h (EmacsFramePart): Remove font.
3780
3781 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
3782 (resources, setup_frame_cursor_bits): Remove unused variables and
3783 functions, esp. wrt. font (Bug#18227).
3784
3785 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
3786
3787 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
3788
3789 2014-08-07 Reuben Thomas <rrt@sc3d.org>
3790
3791 Refer to MS-DOS using the same name everywhere.
3792
3793 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
3794 commit.
3795 * xfaces.c: ditto.
3796
3797 2014-08-05 Martin Rudalics <rudalics@gmx.at>
3798
3799 * w32term.c (w32_redeem_scroll_bar):
3800 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
3801 not redeeming scroll bars that have been turned off.
3802
3803 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
3804
3805 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
3806 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
3807 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
3808 (safe_run_hook_funcall): Adjust accordingly.
3809
3810 2014-08-04 Martin Rudalics <rudalics@gmx.at>
3811
3812 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
3813 Condition correctly according to toolkit used.
3814 * frame.c (make_initial_frame, make_terminal_frame)
3815 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
3816 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
3817 assignments according to presence of toolkit scrollbars.
3818 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
3819 Condition correctly according to toolkit used.
3820 * window.c (set_window_scroll_bars): Set horizontal scroll bar
3821 only if toolkit supports it.
3822 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
3823 present.
3824 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
3825 non-toolkit builds.
3826 (XTredeem_scroll_bar): Always redeem scroll bar if present.
3827
3828 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
3829
3830 * keyboard.c (safe_run_hook_funcall): Avoid consing around
3831 Vinhibit_quit and prefer internal_condition_case_n to pass args.
3832 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
3833 (safe_run_hooks): Remove comment which is not relevant any more.
3834
3835 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
3836
3837 Don't let big frames overrun the stack.
3838 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
3839 Use SAFE_NALLOCA, not alloca.
3840
3841 Fix bug with clang + directory_files_internal + GC (Bug#16986).
3842 * dired.c (directory_files_internal): Use a volatile variable
3843 to prevent the compiler from optimizing away all copies of a local.
3844 I wonder how many other GC-related bugs like this lurk elsewhere?
3845
3846 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
3847 * xterm.h (struct x_display_info): New member 'connection'.
3848 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
3849 so that x_delete_terminal has a file descriptor to pass to
3850 delete_keyboard_wait_descriptor.
3851
3852 Don't mishandle year-9999 dates (Bug#18176).
3853 * editfns.c (decode_time_components): Store an invalid timespec
3854 on overflow, instead of returning false, so that the caller can
3855 distinguish overflow from other errors.
3856 (lisp_time_argument, lisp_seconds_argument): If the time is out
3857 of range, signal a time overflow instead of an invalid time spec.
3858 * keyboard.c (decode_timer): Treat time overflow like other
3859 timespec errors.
3860
3861 Avoid undefined behavior with signed left shift.
3862 Caught by 'gcc -fsanitize=undefined'.
3863 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
3864 * dispnew.c (line_hash_code, scrolling):
3865 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
3866 Use 'unsigned', not 'int', for line hashes.
3867 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
3868
3869 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
3870
3871 Make compare-strings more compatible with old behavior (Bug#17903).
3872 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
3873
3874 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
3875
3876 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
3877 Don't add label between left and right buttons (Bug#18129).
3878
3879 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
3880
3881 Make functions static that no longer need to be extern.
3882 * frame.c, frame.h (set_menu_bar_lines):
3883 * keyboard.c (Qleftmost, Qrightmost):
3884 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
3885 (x_set_internal_border_width):
3886 Now static.
3887
3888 2014-08-01 Eli Zaretskii <eliz@gnu.org>
3889
3890 Fix display of R2L lines when the last character fits only partially.
3891 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
3892 for the details.
3893 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
3894 R2L row is visible only partially, give the row a negative x
3895 offset.
3896 (display_line): Fix the calculation of the glyph whose pixel width
3897 is used to decide whether the last produced glyph fits on the
3898 line. When the last glyph fits only partially, give the row a
3899 negative x offset.
3900
3901 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
3902 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
3903 pixel width of the first glyph that is hscrolled from display.
3904 (display_line): In R2L glyph rows, don't give a negative offset to
3905 row->x when the first glyph begins before first_visible_x.
3906
3907 * xdisp.c (display_line): If called with iterator set up to write
3908 to a marginal area, delay the call to handle_line_prefix until we
3909 switch back to the text area. (Bug#18035)
3910
3911 * .gdbinit (xwindow): The members total_cols, total_lines,
3912 left_col, and top_line are C integers (and has been so for the
3913 last 1.5 years).
3914
3915 2014-08-01 Andreas Schwab <schwab@suse.de>
3916
3917 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
3918 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
3919
3920 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3921
3922 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
3923 (timerfd_callback): Ignore weird events with no data. Add tight
3924 assertions and comments.
3925 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
3926 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
3927
3928 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
3929
3930 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
3931 I had confused && with ||.
3932
3933 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
3934
3935 Simplify timerfd configuration and fix some minor glitches.
3936 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
3937 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
3938 Fall back on timer_create if timerfd_create fails at runtime.
3939 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
3940 kernel primitives to do resolution. All uses removed.
3941 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
3942 (turn_on_atimers): Clear timer_create-based timers too,
3943 for consistency.
3944
3945 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
3946 Without this change, the code can access the local variable 'width'
3947 even when it has not been initialized, and likewise for 'height';
3948 in either case this leads to undefined behavior.
3949
3950 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3951
3952 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
3953 necessary, put horizontal scroll bar resources as well. See
3954 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
3955 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
3956
3957 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3958
3959 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
3960 background value to match the resource of its vertical counterpart.
3961
3962 2014-07-29 Martin Rudalics <rudalics@gmx.at>
3963
3964 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
3965 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
3966
3967 2014-07-28 Martin Rudalics <rudalics@gmx.at>
3968
3969 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
3970 change that added the top margin height to the requested height
3971 and revert (undocumented) part of 2014-07-28 change that changed
3972 the logic of whether a size change occurred.
3973
3974 2014-07-28 Eli Zaretskii <eliz@gnu.org>
3975
3976 * .gdbinit (xwindow): The members total_cols, total_lines,
3977 left_col, and top_line are C integers (and has been so for the
3978 last 1.5 years).
3979
3980 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
3981 now C integers.
3982
3983 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
3984
3985 On GNU/Linux, use timerfd for asynchronous timers.
3986 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
3987 (toplevel): Rename alarm_timer_ok to special_timer_available.
3988 [HAVE_TIMERFD]: Declare timerfd.
3989 [HAVE_CLOCK_GETRES]: Declare resolution.
3990 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
3991 system timer resolution.
3992 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
3993 (timerfd_callback) [HAVE_TIMERFD]: New function.
3994 (atimer_result, debug_timer_callback, Fdebug_timer_check)
3995 [ENABLE_CHECKING]: New function for the sake of automated tests.
3996 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
3997 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
3998 [ENABLE_CHECKING]: Defsubr test function.
3999 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
4000 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
4001 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
4002
4003 Fix --without-x build and pacify --enable-gcc-warnings.
4004 Problems reported in Bug#18122 and Bug#18124.
4005 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
4006 (frame_windows_min_size): Now static.
4007 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
4008 Define as no-op.
4009 (adjust_frame_size): Always declare prototype.
4010
4011 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
4012 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
4013 * atimer.c (timerfd_callback): Always read expiration data.
4014 Add comment.
4015 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
4016 * process.c (add_timer_wait_descriptor): Add timer descriptor
4017 to input_wait_mask and non_process_wait_mask as well.
4018
4019 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
4020
4021 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
4022
4023 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
4024
4025 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
4026 Reinstate code removed by the prevoius commit to this file.
4027
4028 2014-07-27 Martin Rudalics <rudalics@gmx.at>
4029
4030 * buffer.h (struct buffer): New fields scroll_bar_height and
4031 horizontal_scroll_bar_type.
4032 * buffer.c (bset_scroll_bar_height)
4033 (bset_horizontal_scroll_bar_type): New functions.
4034 (Fbuffer_swap_text): Handle old_pointm field.
4035 (init_buffer_once): Set defaults for scroll_bar_height and
4036 horizontal_scroll_bar_type.
4037 (syms_of_buffer): New variables scroll_bar_height and
4038 horizontal_scroll_bar_type.
4039 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
4040 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
4041 (set_vertical_scroll_bar): Remove prototype.
4042 (x_change_tool_bar_height): Add prototype.
4043 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
4044 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
4045 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
4046 and FRAME_LINES.
4047 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
4048 (update_window): Start mode_line_row->y after horizontal scroll
4049 bar.
4050 (change_frame_size_1): Call adjust_frame_size.
4051 (init_display): When changing the size of a tty frame do not
4052 pass height of menu bar.
4053 (Qframe_windows_min_size): New symbol.
4054 * frame.h (struct frame): List tool bar fields after menu bar
4055 fields. Add official, total_lines, horizontal_scroll_bars,
4056 config_scroll_bar_height and config_scroll_bar_lines fields.
4057 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
4058 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
4059 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
4060 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
4061 (FRAME_WINDOWS_HEIGHT): New macros.
4062 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
4063 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
4064 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
4065 horizontal scroll bar.
4066 (frame_inhibit_resize, adjust_frame_size)
4067 (frame_windows_min_size): Add declarations.
4068 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4069 (x_set_scroll_bar_default_height, x_set_left_fringe)
4070 (x_set_right_fringe, x_set_vertical_scroll_bars)
4071 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
4072 (x_set_scroll_bar_height): Add external declarations.
4073 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
4074 (adjust_frame_size): New functions.
4075 (make_frame): Initial horizontal_scroll_bars field.
4076 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
4077 minibuffer window.
4078 (make_initial_frame, make_terminal_frame): No horizontal scroll
4079 bar in initial and terminal frames. Use adjust_frame_size.
4080 (Fframe_total_cols): Fix doc-string.
4081 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
4082 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
4083 Rewrite using adjust_frame_size.
4084 (Qscroll_bar_height, Qhorizontal_scroll_bars)
4085 (Qframe_windows_min_size): New symbols.
4086 (x_set_frame_parameters): Remove call of check_frame_size.
4087 (x_report_frame_params): Return scroll_bar_height value.
4088 (x_set_left_fringe, x_set_right_fringe): New functions.
4089 (adjust_frame_height, x_set_internal_border_width)
4090 (x_set_fringe_width): Remove.
4091 (x_set_internal_border_width, x_set_vertical_scroll_bars)
4092 (x_set_scroll_bar_width, x_set_right_divider_width)
4093 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
4094 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
4095 New functions.
4096 (x_figure_window_size): Rewrite to make frame display the
4097 expected number of lines.
4098 (Vdefault_frame_scroll_bars): Rewrite doc-string.
4099 (Vdefault_frame_horizontal_scroll_bars)
4100 (Vframe_initial_frame_tool_bar_height)
4101 (frame_inhibit_implied_resize): New variables.
4102 * fringe.c (compute_fringe_widths): Remove.
4103 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
4104 (xg_create_horizontal_scroll_bar)
4105 (xg_update_horizontal_scrollbar_pos)
4106 (xg_set_toolkit_horizontal_scroll_bar_thumb)
4107 (xg_get_default_scrollbar_height)
4108 (xg_clear_under_internal_border): Extern.
4109 * gtkutil.c (xg_frame_resized): Don't call
4110 do_pending_window_change.
4111 (xg_frame_set_char_size): Use adjust_frame_size.
4112 (style_changed_cb): Call update_theme_scrollbar_height and
4113 x_set_scroll_bar_default_height.
4114 (x_wm_set_size_hint): Don't call check_frame_size.
4115 (update_theme_scrollbar_height)
4116 (xg_get_default_scrollbar_height)
4117 (xg_create_horizontal_scroll_bar)
4118 (xg_update_horizontal_scrollbar_pos)
4119 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
4120 (xg_create_scroll_bar): Set horizontal slot of bar.
4121 (xg_initialize): Call update_theme_scrollbar_height.
4122 (xg_clear_under_internal_border): No more static.
4123 * insdel.c (adjust_suspend_auto_hscroll): New function.
4124 (adjust_markers_for_delete, adjust_markers_for_insert)
4125 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
4126 * keyboard.c (readable_events, discard_mouse_events)
4127 (make_lispy_event): Handle horizontal scroll bar click events.
4128 (Fsuspend_emacs): When changing the size of a tty frame do not
4129 pass height of menu bar.
4130 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
4131 (Qright, Qleftmost, Qrightmost): New symbols.
4132 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
4133 FRAME_LINES.
4134 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
4135 * nsfns.m (x_set_internal_border_width): New function.
4136 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
4137 Remove extended fringe code.
4138 (x_set_window_size, x_new_font): Don't call
4139 compute_fringe_widths.
4140 * term.c (Fresume_tty): When changing the size of a tty frame do
4141 not pass height of menu bar.
4142 (clear_tty_hooks, set_tty_hooks):
4143 Clear horizontal_scroll_bar_hook.
4144 (init_tty): Frame has no horizontal scroll bars.
4145 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
4146 scroll_bar_before_handle, scroll_bar_horizontal_handle,
4147 scroll_bar_after_handle, scroll_bar_left_arrow,
4148 scroll_bar_right_arrow, scroll_bar_to_leftmost and
4149 scroll_bar_to_rightmost entries.
4150 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
4151 (struct terminal): Add set_horizontal_scroll_bar_hook.
4152 * w32console.c (initialize_w32_display):
4153 Clear horizontal_scroll_bar_hook.
4154 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
4155 FRAME_X_DISPLAY.
4156 (x_clear_under_internal_border, x_set_internal_border_width):
4157 New functions.
4158 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
4159 Set windows_or_buffers_changed when adding the menu bar.
4160 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
4161 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4162 (w32_createhscrollbar): New functions.
4163 (w32_createscrollbar): Rename to w32_createvscrollbar.
4164 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
4165 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
4166 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
4167 Add WM_EMACS_SHOWCURSOR.
4168 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
4169 case do not artificially impose WM size hints.
4170 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
4171 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
4172 cases.
4173 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
4174 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
4175 (unwind_create_frame_1): Remove.
4176 (Fx_create_frame): Make both scrollbars the system standard
4177 width and height. Use official field of frame structure to
4178 inhibit running window-configuration-change-hook.
4179 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4180 pixelwise. Handle frame's official field.
4181 (w32_frame_parm_handlers): Remove x_set_fringe_width
4182 entries. Add x_set_scroll_bar_height,
4183 x_set_horizontal_scroll_bars, x_set_left_fringe and
4184 x_set_right_fringe.
4185 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
4186 pass height of menu bar to change_frame_size.
4187 * w32menu.c (set_frame_menubar): Rewrite using
4188 frame_inhibit_resize.
4189 * w32term.h (struct w32_display_info):
4190 Add horizontal_scroll_bar_cursor and cursor_display_counter.
4191 (struct scroll_bar): Add horizontal.
4192 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4193 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4194 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
4195 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4196 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4197 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4198 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4199 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
4200 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
4201 Define instead of WM_EMACS_CREATESCROLLBAR.
4202 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
4203 WND_SCROLLBAR_INDEX.
4204 * w32term.c (horizontal_scroll_bar_min_handle)
4205 (horizontal_scroll_bar_left_border)
4206 (horizontal_scroll_bar_right_border): New integers.
4207 (x_set_frame_alpha): Replace x_highlight_frame by
4208 w32_focus_frame.
4209 (x_window_to_scroll_bar): New argument "type". Update callers
4210 accordingly.
4211 (w32_set_horizontal_scroll_bar_thumb)
4212 (x_horizontal_scroll_bar_report_motion)
4213 (w32_set_horizontal_scroll_bar)
4214 (w32_horizontal_scroll_bar_handle_click)
4215 (x_horizontal_scroll_bar_report_motion): New functions.
4216 (w32_mouse_position): Discriminate horizontal and vertical
4217 scrollbar cases.
4218 (my_create_scrollbar): Replace with two new functions
4219 my_create_vscrollbar and my_create_hscrollbar.
4220 (x_scroll_bar_create): New argument "horizontal".
4221 Update callers accordingly.
4222 (x_scroll_bar_remove, w32_condemn_scroll_bars)
4223 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
4224 scroll bar case.
4225 (w32_read_socket): Handle WM_HSCROLL cae.
4226 (x_new_font): Don't recompute fringe widths.
4227 Use frame_inhibit_resize. Calculate new menu bar height iff we
4228 build without toolkit. Always clear under internal border.
4229 (x_set_window_size): Don't check frame size or recompute
4230 fringes. Reset fullscreen status before applying sizes.
4231 Always resize as requested by pixelwise argument. Don't call
4232 do_pending_window_change.
4233 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
4234 (w32_initialize_display_info): Initialize dpyinfo's
4235 horizontal_scroll_bar_cursor entry.
4236 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
4237 (w32_initialize): Init horizontal_scroll_bar_min_handle and
4238 horizontal_scroll_bar_left_border.
4239 (w32fullscreen_hook): Intermittently resize window to normal
4240 when switching from fullscreen to maximized state.
4241 (run_window_configuration_change_hook): Don't run it if frame is
4242 not official yet.
4243 (unwind_change_frame): Remove.
4244 (Fset_window_configuration): Rewrite using frame's official field.
4245 * widget.c (set_frame_size): Don't call compute_fringe_widths.
4246 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
4247 * window.h (struct window): New fields old_pointm,
4248 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
4249 scroll_bar_height and suspend_auto_hscroll.
4250 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
4251 New functions.
4252 (sanitize_window_sizes): Extern.
4253 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
4254 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
4255 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
4256 (WINDOW_CONFIG_SCROLL_BAR_LINES)
4257 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
4258 New macros.
4259 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
4260 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
4261 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
4262 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
4263 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
4264 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
4265 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
4266 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
4267 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
4268 (Fwindow_old_point, sanitize_window_sizes): New functions.
4269 (Qwindow_sanitize_window_sizes): New symbol.
4270 (window_body_height): Count in horizontal scroll bar.
4271 (set_window_hscroll, Fscroll_left, Fscroll_right):
4272 Set suspend_auto_hscroll slot.
4273 (Fwindow_inside_edges): Count fringes pixelwise.
4274 (coordinates_in_window, Fcoordinates_in_window_p):
4275 Consider horizontal scroll bar.
4276 (check_frame_size, adjust_window_margins): Remove functions and
4277 corresponding calls.
4278 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
4279 (temp_output_buffer_show): Reset hscroll related fields.
4280 Initialize old_pointm.
4281 (make_parent_window): Initialize old_pointm.
4282 (make_window): Initialize old_pointm, horizontal scroll bar type,
4283 and scroll bar height.
4284 (resize_frame_windows): Don't count top margin in new sizes.
4285 Don't use safe sizes when shrinking a frame; let the window
4286 manager do the clipping.
4287 (Fsplit_window_internal): Inherit horizontal scroll bar type and
4288 height.
4289 (Fdelete_window_internal): Unchain old_pointm marker.
4290 (window_scroll_pixel_based, Fscroll_other_window):
4291 Adjust old_pointm.
4292 (Fwindow_text_width, Fwindow_text_height): New argument
4293 "pixelwise".
4294 (struct saved_window): New fields, old_pointm, hscroll_whole,
4295 suspend_auto_hscroll, scroll_bar_height and
4296 horizontal_scroll_bar_type.
4297 (Fset_window_configuration, save_window_save): Set new fields of
4298 saved_window.
4299 (apply_window_adjustment): Don't call adjust_window_margins.
4300 (set_window_margins): Don't change margins if new sizes don't
4301 fit into window.
4302 (set_window_scroll_bars): New argument "horizontal_type".
4303 Handle horizontal scroll bars. Don't change scroll bars if they
4304 don't fit into window.
4305 (Fset_window_scroll_bars): New argument "horizontal_type".
4306 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
4307 (compare_window_configurations): Compare horizontal scroll bar
4308 settings.
4309 * xdisp.c (window_text_bottom_y, window_box_height): Count in
4310 horizontal scroll bar height.
4311 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
4312 instead of FRAME_LINES.
4313 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
4314 ON_VERTICAL_SCROLL_BAR.
4315 (with_echo_area_buffer): Initialize old_pointm.
4316 (with_echo_area_buffer_unwind_data): Store old_pointm values in
4317 vector.
4318 (unwind_with_echo_area_buffer): Handle old_pointm.
4319 (update_tool_bar): Set do_update when the tool bar window has at
4320 least one line (since this is what the user sets).
4321 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
4322 (redisplay_tool_bar): Return early when toolbar has zero lines.
4323 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
4324 (hscroll_window_tree): Handle suspension of auto_hscroll and
4325 old_pointm.
4326 (set_horizontal_scroll_bar): New function.
4327 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
4328 more than one line. Handle horizontal scroll bars.
4329 (note_mouse_highlight): Handle horizontal scrol bars.
4330 (expose_frame): Set dimensions of XRectangle from frame's text
4331 sizes.
4332 (Vvoid_text_area_pointer): Update doc-string.
4333 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
4334 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4335 (x_set_internal_border_width): New functions.
4336 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
4337 (unwind_create_frame_1): Remove.
4338 (Fx_create_frame): Handle horizontal scroll bars. Use official
4339 field of frame structure to inhibit running
4340 window-configuration-change-hook.
4341 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4342 pixelwise. Handle frame's official field.
4343 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
4344 x_set_horizontal_scroll_bars, x_set_left_fringe,
4345 x_set_right_fringe.
4346 * xmenu.c (update_frame_menubar, free_frame_menubar):
4347 Use adjust_frame_size.
4348 * xterm.h (struct x_display_info):
4349 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
4350 slots.
4351 (struct scroll_bar): Add horizontal slot.
4352 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4353 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4354 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
4355 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4356 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4357 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4358 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4359 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
4360 (x_clear_under_internal_border): Remove.
4361 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
4362 (x_window_to_scroll_bar): New argument TYPE. Update callers.
4363 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
4364 HORIZONTAL. Update callers.
4365 (horizontal_action_hook_id): New action hook id.
4366 (x_horizontal_scroll_bar_to_input_event)
4367 (x_create_horizontal_toolkit_scroll_bar)
4368 (xt_horizontal_action_hook)
4369 (x_set_toolkit_horizontal_scroll_bar_thumb)
4370 (XTset_horizontal_scroll_bar, x_net_wm_state)
4371 (x_horizontal_scroll_bar_report_motion): New functions.
4372 (xg_scroll_callback, x_scroll_bar_handle_click):
4373 Handle horizontal scroll bars.
4374 (SCROLL_BAR_HORIZONTAL_NAME): Define.
4375 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
4376 by scroll bar.
4377 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
4378 Handle horizontal scroll bars.
4379 (handle_one_xevent): Handle horizontal scroll bar events.
4380 Call x_net_wm_state.
4381 (x_set_window_size_1, x_wm_set_size_hint): Don't call
4382 check_frame_size.
4383 (x_set_window_size): Don't call check_frame_size and
4384 do_pending_window_change.
4385 (x_term_init): Init horizontal_scroll_bar_cursor display info.
4386 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
4387 (x_scroll_bar_set_handle): Add some checks when calling
4388 x_clear_area.
4389
4390 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
4391
4392 Revert previous change.
4393 There is certainly nothing wrong with writing code like 'lo <= i
4394 && i <= hi', even if LO happens to a constant. There isn't even
4395 anything wrong in general with writing 'a <= b' if A happens to
4396 be a constant. At any rate stylistic changes shouldn't
4397 be done like this without discussion.
4398
4399 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
4400
4401 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
4402 (Fgarbage_collect): Reorder conditions that are written backwards.
4403 * data.c (cons_to_unsigned): Likewise.
4404 * dispnew.c (update_frame_1, sit_for): Likewise.
4405 * fileio.c (file_offset): Likewise.
4406 * filelock.c (read_lock_data, lock_file): Likewise.
4407 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
4408 Likewise.
4409 * font.c (font_intern_prop, font_style_symbolic): Likewise.
4410 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
4411 * lread.c (read1): Likewise.
4412 * minibuf.c (read_minibuf_noninteractive): Likewise.
4413 * nsterm.m (x_set_frame_alpha): Likewise.
4414 * process.c (wait_reading_process_output): Likewise.
4415 * region-cache.c (delete_cache_boundaries): Likewise.
4416 * xterm.c (x_set_frame_alpha): Likewise.
4417
4418 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
4419
4420 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
4421 Now static.
4422
4423 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4424
4425 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
4426 because atimer expiration is absolute rather than relative.
4427
4428 2014-07-25 Eli Zaretskii <eliz@gnu.org>
4429
4430 * w32term.h (current_popup_menu, menubar_in_use):
4431 Move declarations from w32term.c.
4432
4433 2014-07-25 Martin Rudalics <rudalics@gmx.at>
4434
4435 * w32fns.c (menubar_in_use): No more static.
4436 * w32term.c (current_popup_menu, menubar_in_use): Declare.
4437
4438 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4439
4440 Move hourglass machinery to RIF.
4441 * dispextern.h (struct redisplay_interface): New members
4442 show_hourglass and hide_hourglass. Indent comments.
4443 (show_hourglass, hide_hourglass): Remove prototypes.
4444 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
4445 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
4446 (ns_redisplay_interface): Add them.
4447 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
4448 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
4449 (w32_arrow_cursor): New function to hack around non-GUI frames.
4450 (w32_redisplay_interface): Add new functions.
4451 * w32term.h (w32_arror_cursor): Add prototype.
4452 * xdisp.c (show_hourglass): New function, refactored out from
4453 platform-dependent code.
4454 (cancel_hourglass): Now call to RIF function.
4455 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
4456 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
4457 (x_redisplay_interface): Add new functions.
4458
4459 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4460
4461 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
4462 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
4463 and complete previous change.
4464 * frame.c (adjust_frame_height): New function.
4465 (Fset_frame_height, Fset_frame_size): Use it.
4466 (x_set_frame_parameters): Take frame top margin into account.
4467
4468 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4469
4470 * frame.c (Fset_frame_height): Take frame top margin into account.
4471 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
4472 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
4473
4474 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4475
4476 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
4477 menubar_height as such. Tweak comment.
4478 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
4479 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
4480 All related users changed.
4481 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
4482 * xterm.c (handle_one_xevent):
4483 * gtkutil.c (xg_event_is_for_menubar):
4484 * xfns.c (x_window) [USE_X_TOOLKIT]:
4485 * xmenu.c (set_frame_menubar, free_frame_menubar):
4486 Prefer to use FRAME_MENUBAR_HEIGHT.
4487
4488 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
4489
4490 * frame.c (Fframe_parameters): Always report frame height without
4491 menu and tool bar lines.
4492
4493 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
4494
4495 * nsterm.m (applicationDidFinishLaunching:): Call
4496 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
4497 (antialiasThresholdDidChange:): New method for EmacsApp.
4498
4499 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
4500
4501 * macfont.m (macfont_update_antialias_threshold): Remove static.
4502
4503 * macfont.h (macfont_update_antialias_threshold): Declare.
4504
4505 2014-07-21 Eli Zaretskii <eliz@gnu.org>
4506
4507 * w32select.c (setup_windows_coding_system):
4508 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4509 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
4510
4511 * w16select.c (Fw16_get_clipboard_data):
4512 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4513 coding_system.
4514
4515 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
4516 buffer position where we are to start the iteration.
4517 (handle_invisible_prop): Record in it->stop_charpos the position
4518 where the invisible text ends. (Bug#18035)
4519 (hscroll_window_tree): Don't try hscrolling windows whose cursor
4520 row has zero buffer position as their start position.
4521 Reported by martin rudalics <rudalics@gmx.at>.
4522
4523 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
4524 infinite looping in redisplay when display lines don't have enough
4525 space to display even a single character. (Bug#18036)
4526
4527 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4528
4529 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
4530 * xfns.c (x_window): Use it to allow xfree later.
4531 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
4532 where appropriate. Use bool for booleans and remove redundant checks.
4533 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
4534 * xterm.c (x_free_frame_resources): Free shell_position.
4535
4536 2014-07-19 K. Handa <handa@gnu.org>
4537
4538 * xfaces.c (realize_x_face): Call font_load_for_lface with no
4539 mandatory font spec (Bug#17973).
4540
4541 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
4542
4543 * font.c (font_score): Return the worst score if the size of
4544 ENTITY is wrong by more than a factor 2 (Bug#17973).
4545
4546 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4547
4548 * frame.c (frame_unspecified_color): New function
4549 refactored out from ...
4550 (Fframe_parameters, Fframe_parameter): ... adjusted users.
4551 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
4552 function to ...
4553 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
4554 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
4555 * lisp.h (set_frame_param): Remove prototype.
4556 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
4557 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
4558 inlined from here.
4559
4560 Prefer 'x_display_info *' to 'Display *' in X selection code.
4561 This helps to avoid unneeded calls to x_display_info_for_display.
4562 * xterm.h (struct selection_input_event): Record 'x_display_info *'
4563 instead of 'Display *'.
4564 (SELECTION_EVENT_DPYINFO): New macro.
4565 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
4566 it as an lvalue. Mention this in comment.
4567 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
4568 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
4569 (selection_data_to_lisp_data, receive_incremental_selection):
4570 Convert to use 'x_display_info *'. Adjust users where appropriate.
4571 (lisp_data_to_selection_data): Likewise. Also pass 'struct
4572 selection data *' as last arg to not return values in args.
4573 (unexpect_property_change): Use common removal technique.
4574
4575 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4576
4577 * print.c (print_preprocess): Adjust to match changed
4578 sub char-table structure and avoid crash (Bug#18038).
4579
4580 * data.c (wrong_choice): Not static any more.
4581 * lisp.h (wrong_choice): Add prototype.
4582 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
4583 Declare namebuf as such. Tweak comment.
4584 [USE_GTK]: Likewise for tool_bar_position.
4585 (fset_tool_bar_position) [USE_GTK]: Ditto.
4586 (FRAME_TOOL_BAR_POSITION): New macro.
4587 * frame.c (x_report_frame_params):
4588 * gtkutil.c (update_frame_tool_bar):
4589 * xfns.c (Fx_create_frame): Use it.
4590 (x_set_tool_bar_position): Add meaningful diagnostic messages.
4591
4592 2014-07-16 Eli Zaretskii <eliz@gnu.org>
4593
4594 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
4595 buffer's default-directory only if it is a string. (Bug#17986)
4596
4597 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4598
4599 More precise control over values of some buffer-local variables.
4600 * keyboard.c (Qvertical_scroll_bar):
4601 * frame.c (Qleft, Qright): Move to ...
4602 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
4603 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
4604 (syms_of_buffer): DEFSYM all of the above, attach special properties.
4605 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
4606 vertical-scroll-bar, scroll-up-aggressively
4607 and scroll-down-aggressively.
4608 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
4609 Add declarations.
4610 * nsfns.m, frame.h (Qleft, Qright):
4611 * nsterm.m (Qleft): Remove declarations.
4612 * gtkutil.c (toplevel): Include buffer.h.
4613 * data.c (wrong_choice, wrong_range): New functions.
4614 (store_symval_forwarding): Handle special properties of buffer-local
4615 variables and use functions from the above to signal error, if any.
4616
4617 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
4618 values. Add comment.
4619 (struct frame): Re-arrange layout to avoid extra padding and use bit
4620 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
4621 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
4622 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
4623 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
4624 Define as no-ops because there are no scroll bars anyway.
4625 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
4626 Adjust users.
4627
4628 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
4629 Add convenient setter.
4630 (font_put_frame_data, font_get_frame_data): Use it.
4631
4632 2014-07-15 Daiki Ueno <ueno@gnu.org>
4633
4634 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
4635 pointer argument, before dereferencing.
4636 (XCHAR2B_BYTE2): Likewise.
4637
4638 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4639
4640 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
4641 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
4642 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
4643 Use record_unwind_protect_int and avoid consing.
4644 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
4645
4646 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
4647
4648 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
4649
4650 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
4651 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
4652 * emacs.c [MSDOS]:
4653 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
4654 (main) [MSDOS]: Use SET_BINARY instead of setmode.
4655 * minibuf.c: Include binary-io.h instead of fcntl.h.
4656 (read_minibuf_noninteractive):
4657 Use set_binary_mode instead of handcrafted code.
4658 Don't call emacs_set_tty if emacs_get_tty failed.
4659 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
4660 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
4661 * w32.c (pipe2): Adjust eassert to include O_BINARY.
4662
4663 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
4664 This works around a GCC compiler bug when Emacs is configured with
4665 --enable-gcc-warnings.
4666
4667 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
4668
4669 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
4670 or characters in string, respectively. Add comment.
4671 * fringe.c (Fdefine_fringe_bitmap):
4672 * fns.c (Fsubstring, substring_both): Use it.
4673 * keymap.c (Fdefine_key, Flookup_key):
4674 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
4675
4676 * term.c (tty_menu_add_pane, tty_menu_add_selection):
4677 Use menu_item_width.
4678 (tty_menu_show): Simplify because tty_menu_create never return NULL.
4679
4680 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
4681
4682 Improve behavior of 'bzr up; cd src; make -k'.
4683 * Makefile.in (top_srcdir): New var.
4684 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
4685 Use '$(top_srcdir)' instead of '$(srcdir)/..';
4686 its expansion is a bit shorter.
4687 (../config.status): Actually build config.status instead of
4688 just complaining.
4689 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
4690 New macros, copied and relocated from ../Makefile.in.
4691 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
4692 (../config.status, Makefile): New dependencies and rules,
4693 copied with relocation from ../Makefile.in. This should be more
4694 likely to rebuild the build machinery properly if you do a 'make'
4695 in the src directory.
4696
4697 2014-07-12 Eli Zaretskii <eliz@gnu.org>
4698
4699 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
4700 than 1. (Bug#17962)
4701
4702 * w32fns.c (Fx_file_dialog): Mention in the doc string the
4703 behavior on Windows 7 and later when the function is repeatedly
4704 invoked with the same value of DIR. (Bug#17950)
4705
4706 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
4707 string to match the one in w32fns.c.
4708
4709 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
4710 stdin to binary mode only if it is connected to a terminal.
4711
4712 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
4713
4714 Coalesce extern decls.
4715 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
4716 * sysdep.c (emacs_get_tty, emacs_set_tty):
4717 Move duplicate extern decls from here ...
4718 * systty.h: ... to here, so that there's just one copy.
4719
4720 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
4721
4722 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
4723
4724 * nsfns.m (Fns_popup_font_panel): Ditto.
4725
4726 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4727
4728 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
4729 not only on '\n'.
4730 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
4731
4732 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
4733 [DOS_NT]: Implement for WINDOWSNT.
4734
4735 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
4736 unsigned.
4737
4738 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4739
4740 * sysdep.c (suppress_echo_on_tty): New function.
4741 * minibuf.c (read_minibuf_noninteractive): Use it.
4742
4743 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4744
4745 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
4746 sysinfo failed. Adjust docstring.
4747
4748 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4749
4750 Implement memory-info for MS-DOS.
4751 * dosfns.c (dos_memory_info): New function.
4752 * dosfns.h (dos_memory_info): Add prototype.
4753 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
4754 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
4755 of doing some of its job.
4756
4757 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
4758 reference termios structure members.
4759
4760 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4761
4762 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
4763
4764 * minibuf.c (top): Include systty.h. Declare external
4765 emacs_get_tty and emacs_set_tty.
4766 (Vread_hide_char): New lisp variable.
4767 (read_minibuf_noninteractive): Hide characters with
4768 Vread_hide_char if it is a character. (Bug#17839)
4769
4770 2014-07-10 Eli Zaretskii <eliz@gnu.org>
4771
4772 Implement memory-info for MS-Windows.
4773 * w32.c (w32_memory_info): New function.
4774 * w32.h (w32_memory_info): Prototype it.
4775 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
4776
4777 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4778
4779 * coding.h (struct coding_system): Remove 'error_positions' (unused)
4780 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
4781 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
4782 extra padding and shrink struct coding_system by 56 bytes (x86_64).
4783 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
4784 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
4785 (decode_coding_big5, decode_coding_charset, decode_coding)
4786 (encode_coding): Adjust users.
4787
4788 * alloc.c (Fmemory_info): New function.
4789
4790 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
4791
4792 * syntax.c (back_comment): Use more-natural location for label.
4793
4794 * font.c, font.h (font_unparse_fcname): Now static.
4795 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
4796
4797 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4798
4799 Next minor cleanup of font subsystem.
4800 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
4801 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
4802 really used).
4803 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
4804 unused.
4805 * ftfont.h (ftfont_font_format): Remove prototype.
4806 * ftfont.c (ftfont_font_format): Remove; now unused.
4807 (ftfont_open):
4808 * nsfont.m (nsfont_open):
4809 * w32font.c (w32font_open_internal):
4810 * w32uniscribe.c (uniscribe_open):
4811 * xfont.c (xfont_open):
4812 * xftfont.c (xftfont_open): All users changed.
4813
4814 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
4815 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
4816
4817 2014-07-09 Eli Zaretskii <eliz@gnu.org>
4818
4819 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
4820 x_produce_glyphs does when it generates a stretch glyph that
4821 represents a TAB. (Bug#17969)
4822
4823 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
4824 and there is a display property at that position, don't call
4825 move_it_to to move to a position before window start. (Bug#17942)
4826 Fix condition for finding CHARPOS by the first call to move_it_to.
4827 (Bug#17944)
4828
4829 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
4830
4831 * syntax.c (find_defun_start): Try the cache even
4832 if !open_paren_in_column_0_is_defun_start.
4833 (back_comment): If find_defun_start was pessimistic, use the
4834 scan_sexps_forward result to improve the cache (bug#16526).
4835
4836 2014-07-09 Eli Zaretskii <eliz@gnu.org>
4837
4838 * xdisp.c (redisplay_window): If redisplay of a window ends up
4839 with point in a partially visible line at end of the window, make
4840 sure the amended position of point actually has smaller Y
4841 coordinate; if not, give up and scroll the display. (Bug#17905)
4842
4843 * window.c (window_scroll_pixel_based): When point ends up at the
4844 last fully visible line, don't let move_it_to stop at the left
4845 edge of the line and dupe us into thinking point is inside the
4846 scroll margin.
4847
4848 * w32.c (network_interface_info): Make sure the argument is a
4849 Lisp string.
4850
4851 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
4852
4853 * process.c (read_and_dispose_of_process_output): Fix typo
4854 in previous patch: we want nonnegative fds, not nonzero fds.
4855
4856 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
4857
4858 * chartab.c (char_table_translate): Move to...
4859 * character.h (char_table_translate): ... inline function here.
4860 Avoid Faref and assume that args are always valid. This helps to
4861 speedup search, which is especially important for a huge buffers.
4862 * lisp.h (char_table_translate): Remove prototype.
4863
4864 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
4865 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
4866 New function, with an intention to avoid code duplication between
4867 a few font drivers.
4868 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
4869 Add prototype.
4870 * ftfont.c (ftfont_open):
4871 * macfont.m (macfont_open):
4872 * xftfont.c (xftfont_open): Use it.
4873
4874 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
4875
4876 * process.c: Add sanity checks for file descriptors (Bug#17844).
4877 (wait_reading_process_output, Fprocess_filter_multibyte_p):
4878 Check that infd is nonnegative before using it as an fd.
4879 (read_and_dispose_of_process_output, Fprocess_send_eof):
4880 Likewise, for outfd.
4881 (wait_reading_process_output): Omit unnecessary check of infd.
4882
4883 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
4884
4885 Minor fixups related to usage of the 'long' type.
4886 * gnutls.c (emacs_gnutls_handshake):
4887 * xfaces.c (dump_realized_face):
4888 Work even if 'long' is narrower than 'void *'.
4889 * termcap.c (scan_file):
4890 * xselect.c (x_decline_selection_request)
4891 (x_reply_selection_request, x_get_window_property):
4892 * xterm.c (x_set_frame_alpha):
4893 Remove unnecessary 'L' suffixes of integer constants.
4894 * xfns.c (hack_wm_protocols):
4895 * xselect.c (x_fill_property_data):
4896 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
4897 Remove unnecessary casts to 'long'.
4898 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
4899
4900 Minor ImageMagick safety fixes.
4901 * image.c (imagemagick_compute_animated_image):
4902 Remove useless assignment to local. Avoid problems if dest_width is 0.
4903 (imagemagick_load_image): Use int for pixel counts that can't
4904 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
4905 a row width greater than the image width (or greater than LONG_MAX!).
4906
4907 2014-07-04 K. Handa <handa@gnu.org>
4908
4909 * coding.c (MIN_CHARBUF_SIZE): Delete it.
4910 (MAX_CHARBUF_EXTRA_SIZE): New macro.
4911 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
4912
4913 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4914
4915 * font.h (struct font_driver): Remove get_outline and free_outline;
4916 not used by any font driver.
4917 * ftfont.c (ftfont_driver):
4918 * macfont.m (macfont_driver):
4919 * nsfont.m (nsfont_driver):
4920 * w32font.c (w32font_driver):
4921 * w32uniscribe.c (uniscribe_font_driver):
4922 * xfont.c (xfont_driver): Related users changed.
4923 * xselect.c (x_get_window_property): Use convenient xmalloc.
4924 Call to xfree only if some data was really allocated.
4925
4926 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4927
4928 On MS-Windows, display busy cursor on all GUI frames.
4929 This is similar to what we have on X. Quickly tested by Dani Moncayo.
4930 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
4931 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
4932 Likewise.
4933 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
4934 * xdisp.c (start_hourglass): Remove Windows-specific bits.
4935
4936 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4937
4938 Use convenient alists to manage per-frame font driver-specific data.
4939 * frame.h (struct frame): Rename font_data_list to...
4940 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
4941 * font.h (struct font_data_list): Remove; no longer need a special
4942 data type.
4943 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
4944 Adjust prototypes.
4945 * font.c (font_put_frame_data, font_get_frame_data)
4946 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
4947 management.
4948 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
4949 Related users changed.
4950 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
4951 Prefer convenient xmalloc and xfree.
4952
4953 2014-07-03 Eli Zaretskii <eliz@gnu.org>
4954
4955 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
4956 the window whose glyph row is being prepared and a flag whether it
4957 is for mode/header line. Make sure the glyph row's marginal areas
4958 are in sync with what the window wants.
4959 (Bug#17892)
4960
4961 * xdisp.c (display_line, display_mode_line):
4962 Call prepare_desired_row with additional arguments, as appropriate.
4963
4964 * dispextern.h (prepare_desired_row): Adjust prototype.
4965
4966 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4967
4968 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
4969 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
4970 caused by xw_popup_dialog in daemon mode (Bug#17891).
4971
4972 2014-07-03 Eli Zaretskii <eliz@gnu.org>
4973
4974 * frame.c (do_switch_frame): When switching to another TTY frame,
4975 make sure FrameCols and FrameRows are in sync with the new frame's
4976 data. (Bug#17875)
4977
4978 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
4979
4980 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
4981 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
4982 min_char slots. Adjust comment.
4983 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
4984 Add SUB_CHAR_TABLE_OFFSET member.
4985 (make_uninit_sub_char_table): New function.
4986 (toplevel): Add compile-time assert to verify suitable member layout
4987 in Lisp_Sub_Char_Table.
4988 * alloc.c (mark_char_table): Add extra argument to denote char table
4989 subtype. Adjust to match new layout of sub char-table.
4990 (mark_object): Always mark sub char-tables with mark_char_table.
4991 * chartab.c (make_sub_char_table, copy_sub_char_table)
4992 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
4993 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
4994 (map_sub_char_table_for_charset, uniprop_table_uncompress):
4995 All related users changed.
4996 * lread.c (read1): Adjust to match new layout of sub char-table.
4997 * print.c (print_object): Likewise (Bug#17898).
4998
4999 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
5000
5001 * keymap.c (get_keyelt): Simplify.
5002 (copy_keymap_item): Remove left-over code for when we had
5003 key-shortcut caches.
5004
5005 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5006
5007 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
5008 (dealloc): Remove for EmacsScroller.
5009
5010 * nsterm.h (EmacsScroller): Remove dealloc.
5011
5012 2014-06-30 Eli Zaretskii <eliz@gnu.org>
5013
5014 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
5015
5016 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
5017
5018 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
5019 when setNeedsDisplay is called so we don't trigger redisplay for every
5020 tool bar update.
5021
5022 * nsterm.m (any_help_event_p): New variable.
5023 (mouseMoved:): Set any_help_event_p to YES if help event is
5024 generated. Remove else with empty help event that triggered redisplay
5025 for every mouse move.
5026 (windowDidResignKey:): If any_help_event_p, generate empty help event.
5027
5028 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
5029
5030 * xfns.c (Qsuppress_icon): Remove; no real users.
5031 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
5032 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
5033 (syms_of_w32fns): Don't DEFSYM it.
5034
5035 2014-06-29 Glenn Morris <rgm@gnu.org>
5036
5037 * Makefile.in (ns-app): Mark as PHONY.
5038
5039 2014-06-28 Glenn Morris <rgm@gnu.org>
5040
5041 * Makefile.in (mostlyclean): There are no libXMenu11.a,
5042 liblw.a in this directory.
5043
5044 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
5045
5046 * coding.c (encode_coding_utf_8): Correctly count produced_chars
5047 also in unibyte case. (Bug#17865)
5048
5049 2014-06-28 K. Handa <handa@gnu.org>
5050
5051 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
5052 (MIN_CHARBUF_SIZE): New macro.
5053 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
5054
5055 2014-06-27 Glenn Morris <rgm@gnu.org>
5056
5057 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
5058 with an order-only dependence on bootstrap-emacs. (Bug#2151)
5059 (.el.elc): Replace suffix rule with pattern rule.
5060 (%.elc): New pattern rule, with order-only prerequisite.
5061 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
5062 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
5063 in place of BOOTSTRAPEMACS.
5064
5065 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5066
5067 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
5068
5069 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5070
5071 Consistently use validate_subarray to verify substring.
5072 * fns.c (validate_substring): Not static any more. Adjust to
5073 use ptrdiff_t, not EMACS_INT, because string and vector limits
5074 can't exceed ptrdiff_t even if EMACS_INT is wider.
5075 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
5076 (secure_hash): Adjust user.
5077 * lisp.h (validate_subarray): Add prototype.
5078 * coding.c (Fundecodable_char_position):
5079 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
5080 Use validate_subarray. Adjust comment to mention substring.
5081
5082 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5083
5084 Do not allow out-of-range character position in Fcompare_strings.
5085 * fns.c (validate_subarray): Add prototype.
5086 (Fcompare_substring): Use validate_subarray to check ranges.
5087 Adjust comment to mention that the semantics was changed. Also see
5088 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
5089
5090 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
5091
5092 Be more consistent about the 'Qfoo' naming convention.
5093 * image.c (Fimagemagick_types):
5094 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
5095 * process.c (Fmake_network_process):
5096 Rename C local identifier 'Qfoo to avoid giving the false
5097 impression that it stands for the symbol 'foo'.
5098
5099 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
5100
5101 Simplify and cleanup character conversion stuff.
5102 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
5103 Remove prototypes.
5104 * character.c (multibyte_char_to_unibyte)
5105 (multibyte_char_to_unibyte_safe): Remove; no longer used.
5106 * character.h (make_char): Remove; unused.
5107 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
5108 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
5109 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
5110 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
5111 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
5112
5113 2014-06-22 Mario Lang <mlang@delysid.org>
5114
5115 * w32fns.c (Fw32_shell_execute): The the -> the.
5116
5117 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
5118
5119 * xmenu.c (mouse_position_for_popup):
5120 * xselect.c (mouse_position_for_drop): Do not duplicate ...
5121 * xfns.c (x_relative_mouse_position): ... and prefer this function.
5122 * menu.c (Fx_popup_menu):
5123 * xselect.c (x_handle_dnd_message): Adjust users.
5124 * menu.h (mouse_position_for_popup): Remove prototype.
5125 * xterm.h (x_relative_mouse_position): Add prototype.
5126 * xterm.c (x_find_topmost_parent): Break from the loop and do not
5127 call XFree if XQueryTree returns zero.
5128
5129 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5130
5131 * indent.c (Fvertical_motion): Doc fix.
5132 Move to the goal column, if any, with a single call to
5133 move_it_in_display_line, not in two calls. Doing this with two
5134 calls causes move_it_in_display_line apply the line-prefix
5135 handling twice instead of just once. (Bug#17823)
5136
5137 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
5138
5139 Port to OS X ACLs (Bug#17810).
5140 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
5141 ACL_TYPE_ACCESS) doesn't work.
5142
5143 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
5144
5145 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
5146 before checking key-translation-map (bug#17659).
5147
5148 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
5149
5150 * font.c (font_make_object): Avoid dangling pointer which may
5151 crash GC (Bug#17771).
5152
5153 2014-06-21 Eli Zaretskii <eliz@gnu.org>
5154
5155 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
5156 prototype of DGifCloseFile as appropriate for older and newer
5157 versions of giflib.
5158 (gif_close): New function, encapsulates the differences in the
5159 calling sequence of DGifCloseFile before v5.1.0 and after it.
5160 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
5161 error string where appropriate. (Bug#17790)
5162
5163 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
5164 macro execution, make sure point didn't move since last complete
5165 redisplay, as the condition for using the glyph matrix
5166 information. (Bug#17777)
5167
5168 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5169
5170 Minor cleanup of fonset code.
5171 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
5172 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
5173 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
5174 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
5175 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
5176 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
5177 (free_realized_fontset): Remove because a no-op since 2008.
5178 (free_face_fontset): Adjust user.
5179 (syms_of_fontset): Shrink fontset by one extra slot.
5180
5181 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
5182
5183 Omit redundant extern decls.
5184 Most of this patch is from Dmitry Antipov, in:
5185 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
5186 * commands.h (update_mode_lines):
5187 * frame.h (Qbackground_color, Qforeground_color)
5188 (x_set_menu_bar_lines):
5189 * ftfont.c (ftfont_font_format):
5190 * intervals.h (Qkeymap, Qfont):
5191 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
5192 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
5193 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
5194 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
5195 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
5196 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
5197 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
5198 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
5199 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
5200 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
5201 (Qtool_bar, Qheader_line):
5202 * macros.c (Fexecute_kbd_macro):
5203 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
5204 * xterm.c (x_delete_terminal, XSetIMValues):
5205 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
5206 (x_implicitly_set_name, popup_activated)
5207 (widget_store_internal_border):
5208 Remove redundant decls.
5209 * frame.c [USE_X_TOOLKIT]: Include widget.h.
5210 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
5211 Remove _Noreturn, as make-docfile now does that for us.
5212 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
5213 (Qregion_extract_function): New decl.
5214 * window.c, xfns.c: Include menu.h.
5215
5216 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
5217
5218 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
5219
5220 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
5221
5222 * fileio.c (Fread_file_name): Do not pass redundant args and ...
5223 * callint.c (read_file_name): ... convert to static here.
5224 * lisp.h (Fread_file_name): Do not EXFUN it.
5225 (STRING_COPYIN): Remove; unused.
5226 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
5227 (char_composable_p): ... static function. All users changed.
5228 * eval.c (toplevel): Remove redundant #include directives.
5229 * xterm.c (x_initialize): Add static to match prototype.
5230 * ccl.c (Fccl_execute_on_string):
5231 * font.c (fon_intern_prop): Use make_specified_string.
5232
5233 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
5234
5235 * Makefile.in (ns-app): Fix typo that broke build on OS X.
5236 Reported by David Caldwell in:
5237 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
5238
5239 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
5240
5241 Do not ask for XRender extension each time XFT font is opened.
5242 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
5243 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
5244
5245 2014-06-15 Glenn Morris <rgm@gnu.org>
5246
5247 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
5248
5249 2014-06-15 Eli Zaretskii <eliz@gnu.org>
5250
5251 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
5252 information if we are in the middle of executing a keyboard macro,
5253 since redisplay doesn't update the screen until the macro is
5254 finished. (Bug#17777)
5255
5256 * alloc.c (cleanup_vector): Don't dereference a font driver
5257 pointer if it is NULL. (Bug#17771)
5258
5259 2014-06-13 Glenn Morris <rgm@gnu.org>
5260
5261 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
5262 ($(lispsource)/international/charprop.el)
5263 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
5264 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
5265 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
5266 GNU make automatically passes command-line arguments to sub-makes.
5267
5268 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
5269
5270 Avoid hangs in accept-process-output (Bug#17647).
5271 * lisp.h, process.c (wait_reading_process_input):
5272 Return int, not bool. All uses changed.
5273 * process.c (SELECT_CANT_DO_WRITE_MASK):
5274 Remove macro, replacing with ...
5275 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
5276 All uses changed.
5277 (status_notify): New arg WAIT_PROC. Return int, not void.
5278 All uses changed.
5279
5280 2014-06-13 Eli Zaretskii <eliz@gnu.org>
5281
5282 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
5283 the frame is the initial frame, because the hook is not set up
5284 then, and Emacs crashes.
5285 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
5286
5287 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
5288
5289 * keymap.c (silly_event_symbol_error): Don't recommend the use
5290 of strings.
5291
5292 2014-06-11 Eli Zaretskii <eliz@gnu.org>
5293
5294 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
5295 matching overlay strings with 'cursor' property against buffer
5296 positions traversed in the glyph row. (Bug#17744)
5297
5298 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
5299
5300 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
5301 on Cocoa.
5302
5303 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
5304 determine 10.9 (Bug#17751).
5305
5306 * macfont.m (macfont_draw): Positions were not freed.
5307
5308 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
5309
5310 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
5311 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
5312 function. Also adjust comment.
5313 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
5314
5315 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
5316 * font.c (font_done_for_face):
5317 * xfaces.c (realize_non_ascii_face): Adjust user.
5318 * font.h (struct font_driver): Convert 'prepare_face' to return
5319 void because its return value is never used anyway.
5320 * xfont.c (xfont_prepare_face): Return void.
5321 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
5322 (xftfont_done_face): Use xfree.
5323
5324 * dispextern.h (last_tool_bar_item): Remove declaration.
5325 * frame.h (struct frame): New member last_tool_bar_item.
5326 * frame.c (make_frame): Initialize it.
5327 * xdisp.c (toplevel): Remove last_tool_bar_item.
5328 (handle_tool_bar_click, note_tool_bar_highlight):
5329 * w32term.c (w32_read_socket, w32_initialize):
5330 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
5331
5332 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
5333 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
5334
5335 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5336
5337 Say (accept-process-output P)'s result pertains to P if P is non-nil.
5338 * process.c (Faccept_process_output)
5339 (wait_reading_process_output): Mention that if PROCESS is non-nil,
5340 the return value is about PROCESS, not about other processes.
5341
5342 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
5343
5344 Further adjustments to mark_object and friends.
5345 Now the mark_object's stack is just 32 bytes on a 64-bit
5346 system, which means extra 20% off the stack usage.
5347 * alloc.c (mark_save_value): As before, refactored out from ...
5348 (mark_object): ... adjusted user. Also add comment.
5349
5350 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5351
5352 Fix core dump after a dropped X connection (Bug#17704).
5353 * sysdep.c (stuff_char): Don't abort merely because the selected frame
5354 is dead, as we may be shutting down.
5355
5356 2014-06-08 Glenn Morris <rgm@gnu.org>
5357
5358 * fileio.c (write-region-inhibit-fsync): Doc tweak.
5359
5360 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
5361
5362 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
5363
5364 If a C name must be extern on some platforms, make it extern on all.
5365 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
5366 (load_color):
5367 * font.h (ftxfont_driver) [HAVE_XFT]:
5368 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
5369 * lisp.h (get_frame_param):
5370 * menu.h (tty_menu_show):
5371 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
5372 * termhooks.h (encode_terminal_code):
5373 * xterm.h (x_menu_wait_for_event):
5374 Always declare.
5375 * frame.c (get_frame_param):
5376 * fringe.c (max_used_fringe_bitmap):
5377 * ftxfont.c (ftxfont_driver):
5378 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
5379 * menu.c (menu_items_inuse):
5380 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
5381 * term.c (encode_terminal_code, tty_menu_show):
5382 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
5383 * xfaces.c (load_color):
5384 * xmenu.c (x_menu_wait_for_event):
5385 Now always extern.
5386
5387 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5388
5389 Change object marking routines to minimize stack usage.
5390 This change moves a few cold paths from mark_object to NO_INLINE
5391 functions and adjusts symbol marking loop. According to GCC 4.8.2
5392 -Wstack-usage, this reduces mark_object's stack usage from 80 to
5393 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
5394 stack usage at the mark phase is reduced up to 28%. Surprisingly,
5395 it also gains up to 3% in speed (with default '-O2 -g3' flags).
5396 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
5397 refactored out from ...
5398 (mark_object): ... adjusted user. Also mark symbols in a tight
5399 inner loop.
5400 (mark_face_cache): Add NO_INLINE.
5401
5402 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5403
5404 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
5405 contains garbage on WINDOWSNT (which could potentially infloop at
5406 exit).
5407
5408 Minimize cursor motion during TTY menu updates.
5409 * term.c (tty_menu_display): Don't position cursor here.
5410 Instead, pass the cursor coordinates to update_frame_with_menu.
5411 (tty_menu_activate): Send the hide cursor command only once in an
5412 iteration through the outer 'while' loop.
5413
5414 * dispnew.c (update_frame_1): Accept an additional argument
5415 SET_CURSOR_P, and position the cursor at the end of the frame
5416 update only if that argument is non-zero. All callers changed to
5417 provide the additional argument as non-zero, except for
5418 update_frame_with_menu.
5419 (update_frame_with_menu): Accept 2 additional arguments ROW and
5420 COL; if they are non-negative, instruct update_frame_1 not to
5421 position the cursor, and instead position it according to ROW and COL.
5422
5423 * dispextern.h (update_frame_with_menu): Update prototype.
5424
5425 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5426
5427 * callproc.c (call_process): Don't check read-only if we don't insert
5428 anything (bug#17666).
5429
5430 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5431
5432 * dispnew.c (update_frame_with_menu): Set display_completed.
5433
5434 2014-06-07 Eli Zaretskii <eliz@gnu.org>
5435
5436 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
5437 only for WINDOWSNT.
5438 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
5439
5440 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
5441
5442 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
5443 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
5444
5445 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
5446
5447 * window.c (Frecenter): Signal an error if window-buffer is not
5448 current-buffer.
5449
5450 * keyboard.c (make_lispy_position): Don't include a buffer position in
5451 mode/header-line mouse events.
5452
5453 * keyboard.c (read_char): Handle (t . <event>) in the second use of
5454 Vunread_command_events (bug#17650).
5455
5456 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
5457
5458 * xterm.c (x_setup_pointer_blanking):
5459 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
5460
5461 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
5462
5463 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
5464 because it will be defined in generated config.h if needed.
5465
5466 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5467
5468 Use terminal-specific hooks to display popup dialogs.
5469 * termhooks.h (struct terminal): New field popup_dialog_hook.
5470 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
5471 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
5472 code and use popup_dialog_hook.
5473 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
5474 * nsterm.h (ns_popup_dialog): Adjust prototype.
5475 * nsterm.m (ns_create_terminal):
5476 * w32term.c (w32_create_terminal):
5477 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
5478 Setup popup_dialog_hook.
5479
5480 2014-06-04 Eli Zaretskii <eliz@gnu.org>
5481
5482 * w32heap.c (report_temacs_memory_usage): Improve the report by
5483 reporting the large blocks that are actually occupied at dump time.
5484
5485 * w32console.c (initialize_w32_display): Set the console
5486 menu_show_hook, otherwise TTY menus are broken on w32.
5487
5488 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5489
5490 Use terminal-specific hooks to display menus.
5491 * termhooks.h (struct terminal): New field menu_show_hook.
5492 * menu.h (<anonymous enum>): Bit flags for menu hooks.
5493 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
5494 Adjust prototypes.
5495 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
5496 * nsmenu.m (ns_menu_show):
5497 * w32menu.c (w32_menu_show):
5498 * xmenu.c (x_menu_show):
5499 * term.c (tty_menu_show): Adjust to use bit flags.
5500 (set_tty_hooks): Set menu_show_hook.
5501 * xterm.c (x_create_terminal):
5502 * nsterm.m (ns_create_terminal):
5503 * msdos.c (initialize_msdos_display):
5504 * w32term.c (w32_create_terminal): Likewise.
5505
5506 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
5507
5508 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
5509
5510 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5511
5512 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
5513 (FD_SET): Don't define on WINDOWSNT.
5514
5515 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5516
5517 * emacs.c: Include "sysselect.h", to define its inline functions.
5518 Reported by Glenn Morris in:
5519 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
5520
5521 Do not require libXt-devel when building with gtk.
5522 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
5523 dependency on libXt-devel.
5524 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
5525 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
5526 lwlib-widget.h now does this.
5527 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
5528
5529 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
5530
5531 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
5532 * process.c (add_read_fd, delete_read_fd, add_write_fd)
5533 (delete_write_fd, wait_reading_process_output):
5534 Remove now-redundant easserts.
5535 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
5536 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5537 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
5538 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
5539
5540 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5541
5542 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
5543 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
5544 (calloc): Don't undef, it is never defined.
5545 (HEAP_ENTRY_SHIFT): Remove unused macro.
5546
5547 * Makefile.in (C_HEAP_SWITCH): Remove.
5548 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
5549
5550 Fix MS-Windows build broken by menu changes on 2014-06-02.
5551 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
5552
5553 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
5554 Define instead of including ../lwlib/lwlib.h, which causes
5555 compilation errors due to missing X11 headers.
5556
5557 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5558
5559 * process.c (wait_reading_process_output): Omit incorrect test of
5560 p->infd against zero. Add easserts for infd having a plausible value.
5561
5562 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5563
5564 Adjust to match recent lwlib changes.
5565 * menu.h (xmalloc_widget_value): Replace by ...
5566 (make_widget_value): ... new prototype.
5567 * menu.c (xmalloc_widget_value): Replace by ...
5568 (make_widget_value): ... new function.
5569 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
5570 * gtkutil.c (malloc_widget_value, free_widget_value):
5571 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
5572 * keyboard.h (enum button_type, struct _widget_value):
5573 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
5574 Likewise.
5575 * nsmenu.m (ns_update_menubar, ns_menu_show):
5576 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
5577 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
5578 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
5579
5580 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5581
5582 * image.c (x_query_frame_background_color)
5583 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
5584 Fix --enable-gcc-warnings compilation without image libraries.
5585
5586 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5587
5588 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
5589 emulated break value only if it goes up.
5590 (sbrk): Add assertion that the INCREMENT argument is strictly
5591 zero. Improve and correct the commentary.
5592
5593 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5594
5595 Improve AIX-related merge from emacs-24.
5596 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
5597 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
5598 not on AIX; since we're on the trunk we can use enums more broadly.
5599
5600 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
5601
5602 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
5603
5604 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
5605 to min(value, whole).
5606
5607 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5608
5609 Bring back the changes to GDB-visible symbols, but only on AIX.
5610 And only if it's not pre-4.2 GCC.
5611 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5612 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5613 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5614 New macros.
5615
5616 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5617
5618 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
5619 with PT, not GPT. (Bug#16433)
5620
5621 Revert last changes to GDB-visible symbols.
5622 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
5623 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
5624 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5625 Delete macros.
5626
5627 2014-06-02 Glenn Morris <rgm@gnu.org>
5628
5629 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
5630
5631 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5632
5633 Fix port to 32-bit AIX with xlc (Bug#17598).
5634 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
5635 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
5636 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
5637 to work around a compiler bug in IBM xlc 12.1.
5638
5639 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5640
5641 * xterm.c (x_update_window_end): Don't invalidate the entire
5642 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5643 highlight needs to be redisplayed. (Bug#17588)
5644
5645 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5646
5647 Port the GDB-visible symbols to AIX.
5648 Without them, GDB doesn't work to debug Emacs, since the AIX linker
5649 optimizes away the relevant external symbols. Use enums instead;
5650 this suffices for the AIX port, which is 32-bit-only anyway.
5651 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5652 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5653 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5654 New macros.
5655
5656 Include sources used to create macuvs.h.
5657 * Makefile.in ($(srcdir)/macuvs.h): New rule.
5658 * macuvs.h: Use automatically-generated header.
5659
5660 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
5661
5662 Port signal-handling to DragonFly BSD (Bug#17646).
5663 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
5664 Move implementations from callproc.c to sysdep.c.
5665 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
5666 Move declarations from process.h to syssignal.h.
5667
5668 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
5669
5670 * callint.c (Ffuncall_interactively): Add usage.
5671
5672 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
5673
5674 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
5675
5676 2014-05-30 Eli Zaretskii <eliz@gnu.org>
5677
5678 * w32heap.c (malloc_before_dump, malloc_after_dump)
5679 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5680 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
5681 set errno where appropriate to emulate CRT functions.
5682
5683 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
5684
5685 Debugging facility to check whether 'const char *' points to
5686 relocatable data of non-pure Lisp string.
5687 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
5688 (mark_maybe_pointer): ... adjusted user.
5689 (relocatable_string_data_p): New function.
5690 * lisp.h (relocatable_string_data_p): Add prototype.
5691 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
5692 the pointer to relocatable Lisp data is not used.
5693
5694 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
5695
5696 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
5697 * atimer.c (block_atimers):
5698 * callproc.c (block_child_signal): Block SIGINT too;
5699 otherwise, its handler might now unblock signals that it shouldn't.
5700 * keyboard.c (read_char): Clear signal mask, since we may
5701 be in a SIGINT handler, and many signals may be masked.
5702 * keyboard.c (handle_interrupt):
5703 * sysdep.c (handle_arith_signal):
5704 Clear signal mask instead of just unblocking the signal that
5705 was received, since several signals may be blocked at this point.
5706
5707 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5708
5709 * Makefile.in (TEMACS_POST_LINK): Remove target.
5710 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
5711 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
5712
5713 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5714
5715 * xmenu.c (xdialog_show): Remove prototype, rename to
5716 x_dialog_show, remove 2nd arg because it's always zero
5717 and simplify accordingly.
5718 (xw_popup_dialog): Adjust user.
5719 * w32menu.c (w32_dialog_show): Adjust prototype, remove
5720 2nd arg because it's always zero and simplify accordingly.
5721 (w32_popup_dialog): Adjust user.
5722
5723 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5724
5725 * w32heap.c (report_temacs_memory_usage): New function.
5726
5727 * unexw32.c (unexec) [ENABLE_CHECKING]:
5728 Call report_temacs_memory_usage.
5729
5730 * w32heap.h (report_temacs_memory_usage): Add prototype.
5731
5732 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5733
5734 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
5735 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
5736
5737 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5738
5739 * buffer.c (init_buffer): Accept an argument 'initialized'.
5740 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
5741 mmap_regions and mmap_fd, to avoid referencing stale data from the
5742 dump phase. Add an assertion for buffer text of buffers created
5743 in temacs before this function is called. (Bug#17622)
5744 (mmap_regions_1, mmap_fd_1): Remove unused variables.
5745
5746 * lisp.h (init_buffer): Update prototype.
5747
5748 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
5749
5750 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5751
5752 * alloc.c (Fgarbage_collect): Fix compilation with
5753 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
5754
5755 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5756
5757 * frame.c, frame.h (frame_char_to_pixel_position)
5758 (frame_set_mouse_position): Now static, and made private in
5759 frame.c rather than public in frame.h.
5760
5761 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
5762
5763 Refactor mouse positioning stuff to avoid code duplication.
5764 * frame.h (frame_char_to_pixel_position): New function.
5765 (x_set_mouse_position): Rename to...
5766 (frame_set_mouse_position): ...new function.
5767 (frame_set_mouse_pixel_position): Add prototype.
5768 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
5769 Rename to frame_set_mouse_pixel_position.
5770 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
5771 Adjust users.
5772 * xterm.h, w32term.h ( x_set_mouse_position)
5773 (x_set_mouse_pixel_position): Remove prototypes.
5774
5775 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
5776
5777 On X, always make pointer visible when deleting frame (Bug#17609).
5778 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
5779 Pass frame as arg.
5780 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
5781 Adjust prototypes.
5782 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
5783 * keyboard.c (gobble_input): If there is no terminal input error,
5784 make sure the pointer is visible for all frames on this terminal.
5785 * xterm.c (x_free_frame_resources): Enable pointer visibility if
5786 it was previously disabled.
5787
5788 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
5789
5790 * data.c (Fzerop): Move to Elisp.
5791 (syms_of_data): Don't defsubr it.
5792 * keyboard.c (echo_keystrokes_p): New function.
5793 (read_char, record_menu_key, read_key_sequence): Use it.
5794
5795 * callint.c (Qfuncall_interactively): New var.
5796 (Qcall_interactively): Remove.
5797 (Ffuncall_interactively): New function.
5798 (Fcall_interactively): Use it.
5799 (syms_of_callint): Defsubr it.
5800
5801 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
5802
5803 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
5804 relocated from under us.
5805
5806 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
5807
5808 Use mmap(2) emulation for allocating buffer text on MS-Windows.
5809 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
5810 configure, not from HEAPSIZE.
5811 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
5812
5813 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
5814 for MinGW, since it no longer uses gmalloc.
5815
5816 * buffer.c: Do not define mmap allocations functions for Windows.
5817 Remove mmap_find which is unused. Remove mmap_set_vars which does
5818 nothing useful.
5819 [WINDOWSNT]: Include w32heap.h.
5820 (init_buffer): Always allocate new memory for buffers.
5821
5822 * emacs.c: Remove mmap_set_vars calls.
5823
5824 * image.c (free_image): Undef free for Windows because it is
5825 redirected to our private version.
5826
5827 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
5828 (copy_executable_and_dump_data): Remove dumping the heap section.
5829 (unexec): Restore using_dynamic_heap after dumping.
5830
5831 * w32heap.c (dumped_data_commit, malloc_after_dump)
5832 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5833 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
5834 (mmap_free): New functions.
5835
5836 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
5837
5838 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
5839
5840 * image.c (imagemagick_load_image): Use MagickRealType for local
5841 'color_scale', instead of double, to avoid a GCC warning about
5842 double promotion.
5843
5844 * xfns.c (Fx_window_property): Remove unused local.
5845
5846 Don't kill already-reaped process (Bug#17561).
5847 * process.c (process_send_signal): Fix race condition where a
5848 subprocess was reaped by a signal handler between the check for
5849 liveness and calling 'kill', which meant that Emacs could in
5850 theory kill an innocent bystander process. Do the fix by blocking
5851 SIGCHLD in a critical section that checks liveness before killing.
5852
5853 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5854
5855 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
5856
5857 2014-05-26 Ken Brown <kbrown@cornell.edu>
5858
5859 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
5860 even if !CYGWIN (see bug#17510).
5861
5862 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
5863
5864 * nsfns.m (Fns_do_applescript): Surround NSApp run
5865 with calls to ns_init_events, ns_finish_events (Bug#17424).
5866
5867 * nsterm.h (ns_init_events, ns_finish_events): Declare.
5868
5869 * nsterm.m (ns_init_events, ns_finish_events): New functions.
5870 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
5871
5872 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
5873 with calls to ns_init_events, ns_finish_events (Bug#17424).
5874
5875 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5876
5877 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
5878 if we are iterating over an object that generates glyphs for
5879 marginal areas. (Bug#17585)
5880
5881 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
5882
5883 * xdisp.c (safe__call1, safe__eval): Now static.
5884
5885 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5886
5887 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
5888 (safe_call, safe__call1): Construct a va_list argument for safe_call.
5889 (safe_call1): Call safe_call instead of safe__call directly.
5890
5891 2014-05-26 Ken Brown <kbrown@cornell.edu>
5892
5893 * w32term.c (x_delete_display) [CYGWIN]: Don't free
5894 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
5895 once. (Bug#17510)
5896
5897 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
5898
5899 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
5900 (safe__call, safe__call1, safe__eval): New functions.
5901 (safe_call): Use it.
5902 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
5903 (display_mode_element): Same for `:eval'.
5904
5905 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
5906
5907 Fix port to 32-bit AIX (Bug#17540).
5908 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
5909 twice. _text already includes this offset.
5910 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
5911
5912 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5913
5914 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
5915 when closest_pos is identical to to_charpos, don't recurse, since
5916 we already tried that, and failed. (Bug#17539)
5917
5918 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
5919 unwinding when frame's faces were not initialized yet, increment
5920 the frame's image-cache reference count before calling
5921 x_free_frame_resources. Don't dereference
5922 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
5923
5924 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
5925
5926 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
5927 nsterm.m now.
5928
5929 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
5930 macfont.m, call draw with adjusted arguments so font drivers
5931 don't need to do that.
5932
5933 * macfont.m (macfont_draw): Merge changes from Macport.
5934
5935 2014-05-24 Eli Zaretskii <eliz@gnu.org>
5936
5937 * alloc.c (garbage_collect_1): New function, with all of the guts
5938 of Fgarbage_collect.
5939 (mark_stack): Accept an argument END and don't mark Lisp objects
5940 on the stack beyond the address given by END. Calculation of END
5941 was moved to Fgarbage_collect.
5942 (Fgarbage_collect): Calculate the end address of the stack portion
5943 that needs to be examined by mark_stack, and pass that address to
5944 garbage_collect_1, which will pass it to mark_stack.
5945 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
5946 for more details about the underlying problems. In particular,
5947 this avoids dumping Emacs with the large hash-table whose value is
5948 held in purify-flag for most of the time loadup.el runs.
5949
5950 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
5951
5952 * xfns.c (x_window_property_intern): New function (code from
5953 x_window_property).
5954 (Fx_window_property): Call x_window_property_intern. If property
5955 not found and NILP (source) and outer window != inner window,
5956 check outer window for property (Bug#17537).
5957
5958 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
5959
5960 Supply malloc and alloc_size attributes for extern allocators.
5961 This documents the C API, and helps GCC generate a bit better code.
5962 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
5963 (ATTRIBUTE_MALLOC_SIZE): New macros.
5964 * gmalloc.c (malloc, realloc, calloc):
5965 * gtkutil.h (malloc_widget_value):
5966 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
5967 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
5968 Use them.
5969
5970 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
5971
5972 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
5973 * image.c (imagemagick_load_image): Port to hosts that do not use
5974 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
5975
5976 2014-05-21 Leo Liu <sdl.web@gmail.com>
5977
5978 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
5979
5980 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
5981
5982 * dbusbind.c (xd_signature): Revert last 2 patches.
5983
5984 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
5985
5986 Allow any non-nil value to count as true in bool-vector.
5987 Likewise for xd_signature in dbusbind.c.
5988 This is more consistent with the usual practice in Emacs, which is
5989 that any non-nil value counts as true.
5990 * alloc.c (Fbool_vector): Don't require args to be t or nil.
5991 * dbusbind.c (xd_signature): Likewise, for booleans.
5992 * data.c, lisp.h (Qbooleanp):
5993 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
5994
5995 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
5996
5997 * lisp.h (CHECK_BOOLEAN): New function.
5998 * alloc.c (Fbool_vector): New function.
5999 (syms_of_alloc): Defsubr it.
6000 * data.c (Qbooleanp): New symbol.
6001 (syms_of_data): DEFSYM it.
6002 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
6003
6004 * font.c (font_matching_entity): Extract font-entity object
6005 from the vector of matching entities (Bug#17486).
6006
6007 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
6008
6009 Assume C99 or later (Bug#17487).
6010 * bytecode.c (B__dummy__): Remove.
6011 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
6012 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
6013 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
6014 * regex.c (DEBUG_PRINT): Assume varargs macros.
6015 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
6016
6017 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
6018
6019 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
6020 memory for every buffer that was dumped.
6021
6022 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
6023
6024 * fns.c (Freverse): Allow vectors, bool vectors and strings.
6025 (Fnreverse): Allow vectors and bool vectors.
6026
6027 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
6028
6029 Minor cleanup for terminal setup.
6030 * termhooks.h (create_terminal): Adjust prototype.
6031 * terminal.c (create_terminal): Pass output method and RIF as args.
6032 (init_initial_terminal):
6033 * nsterm.m (ns_create_terminal):
6034 * term.c (init_tty):
6035 * w32term.c (w32_create_terminal):
6036 * xterm.c (x_create_terminal): Adjust users.
6037 Avoid redundant NULL initializers and add comments.
6038
6039 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
6040
6041 * keyboard.c (Qdeactivate_mark): Now static.
6042
6043 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
6044
6045 If available, use Xfixes extension to do pointer blanking.
6046 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
6047 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
6048 (make_invisible_cursor): Move to...
6049 * xterm.c (make_invisible_cursor): ...here.
6050 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
6051 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
6052 (x_term_init): Call to x_setup_pointer_blanking.
6053 (XTtoggle_invisible_pointer): Use blanking specific to this display.
6054 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
6055
6056 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6057
6058 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
6059
6060 2014-05-12 Glenn Morris <rgm@gnu.org>
6061
6062 * fileio.c (Ffile_executable_p): Doc tweak.
6063
6064 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
6065
6066 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
6067 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
6068
6069 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
6070
6071 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
6072
6073 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6074
6075 Fix initialization of minibuffer history variable (Bug#17430).
6076 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
6077 Move the initialization up to prevent any "value void" message.
6078
6079 2014-05-08 Samuel Bronson <naesten@gmail.com>
6080
6081 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
6082 are matched (bug#17413).
6083
6084 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
6085
6086 Stop tooltips pulling Emacs window to front (Bug#17408).
6087 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
6088 SetWindowPos invocations.
6089
6090 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
6091
6092 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
6093 not initialized (Bug#17398).
6094
6095 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
6096
6097 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
6098
6099 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
6100
6101 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
6102 [HAVE_NS]: Do not include png.h.
6103 (x_query_frame_background_color): New function.
6104 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
6105 (png_load_body): Coalesce duplicate code.
6106
6107 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
6108
6109 Consult libpng-config more consistently (Bug#17339).
6110 * Makefile.in (PNG_CFLAGS): New var.
6111 (ALL_CFLAGS): Use it.
6112 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
6113 CFLAGS now handles this.
6114
6115 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
6116
6117 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
6118 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
6119 because WCONTINUED is always defined now.
6120 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
6121
6122 2014-05-03 Eli Zaretskii <eliz@gnu.org>
6123
6124 * buffer.c (overlay_strings): Fix the wording of the commentary.
6125
6126 2014-05-01 Glenn Morris <rgm@gnu.org>
6127
6128 * floatfns.c (Fisnan):
6129 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
6130
6131 2014-05-01 Eli Zaretskii <eliz@gnu.org>
6132
6133 * term.c (tty_menu_activate): A better initialization for cursor
6134 coordinates.
6135
6136 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
6137
6138 * intervals.c: Tighten assertions.
6139 (create_root_interval): Make sure the interval is not empty.
6140 (intervals_equal): Use booleans.
6141 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
6142 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
6143 (balance_possible_root_interval): Simplify and use booleans.
6144 (split_interval_right, split_interval_left): Check LENGTH, and remove
6145 now redundant assertion.
6146 (adjust_intervals_for_insertion): Remove now redundant assertions.
6147 (delete_node, interval_deletion_adjustment)
6148 (adjust_intervals_for_deletion, merge_interval_right)
6149 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
6150 (reproduce_interval): Make sure the interval is not empty.
6151
6152 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
6153
6154 * term.c (tty_menu_activate): Don't assume row and col are initialized.
6155 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
6156 satisfaction that they would always be initialized.
6157
6158 2014-04-30 Eli Zaretskii <eliz@gnu.org>
6159
6160 * term.c (tty_menu_display): Move the cursor to the active menu item.
6161 (tty_menu_activate): Return the cursor to the active menu item
6162 after displaying the menu and after displaying help-echo.
6163 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
6164 for the details of why this is needed by screen readers and
6165 Braille displays.
6166
6167 2014-04-30 Glenn Morris <rgm@gnu.org>
6168
6169 * process.c (handle_child_signal):
6170 Handle systems without WCONTINUED. (Bug#15110, 17339)
6171
6172 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
6173
6174 * window.c (struct saved_window): Remove mark.
6175 (Fset_window_configuration, save_window_save)
6176 (compare_window_configurations): Don't touch marks any more.
6177
6178 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
6179
6180 Use bits_word for gcmarkbits.
6181 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
6182 bits_word is typically a tad more efficient for mark bits than
6183 unsigned is, so use bits_word. All uses changed.
6184 * lisp.h (BITS_PER_INT): Remove; no longer used.
6185
6186 Avoid undefined behavior in signed left shift.
6187 This ports to GCC 4.9.0 with -fsanitize=undefined.
6188 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
6189 * data.c (Fash):
6190 * regex.c (extract_number):
6191 * lisp.h (make_number, XINT):
6192 Do not shift a 1 bit left into a sign bit.
6193 * alloc.c (struct cons_block, struct float_block): Use unsigned,
6194 not int, for gcmarkbits. All uses changed.
6195
6196 2014-04-25 Eli Zaretskii <eliz@gnu.org>
6197
6198 * search.c (Fnewline_cache_check): Don't try to count newlines
6199 outside the buffer's restriction, as find_newline doesn't support that.
6200
6201 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
6202
6203 * window.c (Fset_window_configuration): Deactivate the mark before
6204 unsetting the mark.
6205 (set_window_buffer): Ignore window_initialized.
6206 (window_initialized): Remove.
6207 * keyboard.c (Qdeactivate_mark): Not static any more.
6208 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
6209 Update all callers.
6210
6211 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
6212
6213 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
6214 and to clang 3.4, which have fixed the bug. This should let us
6215 run a bit faster on these platforms when address sanitization is
6216 in effect.
6217
6218 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
6219
6220 Port to GCC 4.9.0 with --enable-gcc-warnings.
6221 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
6222 All uses removed.
6223 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
6224 a way that also works with GCC 4.9.0.
6225
6226 * search.c (Fnewline_cache_check): Remove unused locals.
6227
6228 2014-04-22 Eli Zaretskii <eliz@gnu.org>
6229
6230 * search.c (find_newline1): New subroutine.
6231 (Fnewline_cache_check): New function.
6232 (syms_of_search): Defsubr it.
6233
6234 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
6235
6236 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
6237 * keyboard.c (unblock_input): Add comment.
6238 * xgselect.c (xg_select): Prevent Glib main loop recursion.
6239
6240 2014-04-22 Daniel Colascione <dancol@dancol.org>
6241
6242 * lread.c (readevalloop_eager_expand_eval): New function
6243 that can recurse into toplevel forms.
6244 (readevalloop): Call it.
6245 * lisp.h: Declare Qprogn.
6246 * callint.c (Qprogn): No longer static.
6247
6248 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
6249
6250 * intervals.c (rotate_right, rotate_left): Fix up length computation.
6251 Also change identifiers to match the comments, and add more assertions
6252 (bug#16234).
6253
6254 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
6255
6256 * emacs.c (close_output_streams): Don't clear and restore errno.
6257
6258 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
6259
6260 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
6261 never becomes visible, i.e. using XMonad (Bug#17237).
6262
6263 2014-04-18 Eli Zaretskii <eliz@gnu.org>
6264
6265 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
6266 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
6267 (Fline_pixel_height): Don't assume that the current buffer and the
6268 selected window's buffer are one and the same. (Bug#17281)
6269
6270 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
6271 paragraph-start cache before the newline cache. (Bug#17269)
6272
6273 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
6274
6275 * term.c (tty_send_additional_strings): No need to fflush here,
6276 as callers fflush.
6277 (tty_set_terminal_modes): fflush after sending additional strings,
6278 not before.
6279
6280 2014-04-17 Daniel Colascione <dancol@dancol.org>
6281
6282 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
6283 New symbols.
6284 (tty_send_additional_strings): New function.
6285 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
6286 (syms_of_term): Intern tty-mode-set-strings and
6287 tty-mode-reset-strings.
6288
6289 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6290
6291 * window.c (save_window_save): Lookup window_point_insertion_type in
6292 the right buffer (bug#15457).
6293 (Qwindow_point_insertion_type): New var.
6294 (syms_of_window): Initialize it.
6295
6296 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6297
6298 Fix the MSDOS build.
6299 * unexcoff.c [MSDOS]: Include libc/atexit.h.
6300 (copy_text_and_data): Zero out the atexit chain pointer before
6301 dumping Emacs.
6302
6303 * termhooks.h (encode_terminal_code): Update prototype.
6304
6305 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
6306 visible for all DOS_NT ports, not just WINDOWSNT.
6307 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
6308
6309 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
6310 unless it is defined.
6311 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
6312
6313 * process.c (close_on_exec, accept4, process_socket): Move into
6314 the "ifdef subprocesses" part.
6315 (catch_child_signal): Condition by "ifdef subprocesses".
6316 (syms_of_process) <Qinternal_default_process_sentinel>
6317 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
6318
6319 * msdos.h: Add prototypes for new functions.
6320 (EINPROGRESS): Define.
6321 (O_CLOEXEC): Define to zero.
6322
6323 * msdos.c (check_window_system): Remove unnecessary an
6324 incompatible duplicate function.
6325 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
6326 New functions in support of new functionality.
6327
6328 * menu.c (single_menu_item): Add visual indication of submenu
6329 also for menus on MSDOS frames.
6330 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
6331
6332 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
6333 when async subprocesses aren't supported.
6334
6335 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
6336
6337 * emacs.c (close_output_streams): Zero out errno before calling
6338 close_stream.
6339
6340 * dired.c [MSDOS]: Include msdos.h.
6341
6342 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
6343 (DATA_START) [MSDOS]: Define.
6344 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
6345
6346 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
6347 Ifdef away for MSDOS.
6348 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
6349 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
6350 for MSDOS.
6351 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
6352 Use temporary file template that is compatible with mkostemp.
6353 Move vfork-related portions under #ifndef MSDOS.
6354 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
6355
6356 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6357
6358 * buffer.c (Foverlays_at): Add argument `sorted'.
6359
6360 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6361
6362 * insdel.c (invalidate_buffer_caches): When deleting or replacing
6363 text, invalidate the bidi_paragraph_cache upto and including the
6364 preceding newline.
6365
6366 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6367
6368 Port to IRIX 6.5 (Bug#9684).
6369 * conf_post.h (INET6) [IRIX6_5]: Define.
6370 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
6371 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
6372
6373 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6374
6375 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
6376 before passing it to system APIs.
6377
6378 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6379
6380 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
6381 make sure stack.byte_string_start is not de-adjusted by pushhandler.
6382
6383 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6384
6385 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
6386
6387 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
6388
6389 Remove DATA_SEG_BITS.
6390 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
6391 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
6392 cc, but that platform is so old that SGI itself stopped supporting
6393 it in December 2013. If you still need Emacs on IRIX, please
6394 either compile with GCC and port the undumping code, or run
6395 './configure --with-wide-int'.
6396 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
6397 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
6398 DEFINE_GDB_SYMBOL_START way to define it.
6399 (NONPOINTER_BITS): New macro.
6400 (EMACS_INT): Use it.
6401 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
6402 the problem and/or configuring --with-wide-int.
6403 (USE_LSB_TAG): Simplify, based on above changes.
6404 (gdb_DATA_SEG_BITS): Remove. All uses removed.
6405 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
6406
6407 2014-04-12 Eli Zaretskii <eliz@gnu.org>
6408
6409 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
6410 covered by a display string that ends in a newline, and that cases
6411 going back by DVPOS lines to hit the search limit, lift the limit
6412 and go back until DVPOS is reached. (Bug#17244)
6413
6414 * indent.c (Fvertical_motion): Handle correctly the case when the
6415 display string is preceded by an empty line.
6416
6417 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
6418 use S_IWRITE instead.
6419
6420 2014-04-11 Glenn Morris <rgm@gnu.org>
6421
6422 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
6423
6424 2014-04-11 Ken Brown <kbrown@cornell.edu>
6425
6426 * Makefile.in (EMACS_MANIFEST): Revert last change.
6427
6428 2014-04-10 Daniel Colascione <dancol@dancol.org>
6429
6430 * puresize.h (BASE_PURESIZE): Increase.
6431
6432 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
6433
6434 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
6435
6436 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
6437 region handling (and don't call signal_before_change) if
6438 inhibit_modification_hooks is set.
6439 (signal_before_change): Don't check inhibit_modification_hooks any more.
6440
6441 2014-04-08 Daniel Colascione <dancol@dancol.org>
6442
6443 * alloc.c (sweep_symbols, mark_object): Assert that symbol
6444 function cells contain valid lisp objects. (Modified version of
6445 patch from Dmitry).
6446
6447 * alloc.c (detect_suspicious_free): Split actual stack capturing
6448 out into new function for easier breakpoint setting.
6449 (note_suspicious_free): New function.
6450
6451 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
6452
6453 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
6454
6455 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
6456 (symbol_block_pinned): New var.
6457 (Fmake_symbol): Initialize `pinned'.
6458 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
6459 pinned and signal an error for un-purifiable objects.
6460 (pure_cons): Use it.
6461 (Fpurecopy): Use it, except for objects that can't be purified.
6462 (mark_pinned_symbols): New function.
6463 (Fgarbage_collect): Use it.
6464 (gc_sweep): Remove hack made unnecessary.
6465
6466 2014-04-07 Glenn Morris <rgm@gnu.org>
6467
6468 * keyboard.c (Fopen_dribble_file): Doc tweak.
6469
6470 2014-04-07 Ken Brown <kbrown@cornell.edu>
6471
6472 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
6473
6474 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
6475
6476 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
6477 We have a substitute execinfo.h on hosts that lack it.
6478 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
6479 isn't optimized away.
6480
6481 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
6482
6483 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
6484 * alloc.c (memory_full):
6485 * charset.c (syms_of_charset):
6486 * doc.c (Fsnarf_documentation):
6487 * emacs.c (main):
6488 * font.c (BUILD_STYLE_TABLE):
6489 * keyboard.c (make_lispy_event):
6490 * profiler.c (setup_cpu_timer):
6491 * xgselect.c (xg_select):
6492 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
6493 Use ARRAYELTS.
6494 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
6495 Replace the only use with ARRAYELTS (font_property_table).
6496 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
6497
6498 2014-04-03 Daniel Colascione <dancol@dancol.org>
6499
6500 * xterm.c (x_term_init):
6501 * xfns.c (best_xim_style):
6502 * xfaces.c (Fdump_colors):
6503 * w32fns.c (w32_default_color_map):
6504 * w32.c (init_environment, N_ENV_VARS):
6505 * unexcw.c (read_exe_header):
6506 * term.c (term_get_fkeys_1):
6507 * sysdep.c (init_baud_rate):
6508 * nsterm.m (ns_convert_key):
6509 * nsfns.m (get_geometry_from_preferences):
6510 * msdos.c (dos_set_window_size, init_environment):
6511 * macfont.m (mac_font_get_glyph_for_cid)
6512 (macfont_store_descriptor_attributes)
6513 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
6514 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
6515 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
6516 (syms_of_keyboard):
6517 * image.c (xpm_str_to_color_key):
6518 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
6519 * frame.c (x_set_frame_parameters):
6520 * fileio.c (Ffile_selinux_context):
6521 * emacs.c (sort_args):
6522 * dosfns.c (msdos_stdcolor_name):
6523 * dired.c (file_attributes):
6524 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
6525 Change expressions of the form sizeof(arr) / sizeof(arr[0])
6526 to ARRAYELTS (arr).
6527
6528 2014-04-02 Daniel Colascione <dancol@dancol.org>
6529
6530 * data.c (Ffset): Abort if we're trying to set a function call to
6531 a dead lisp object.
6532
6533 * lisp.h (ARRAYELTS): New macro.
6534
6535 * alloc.c: Include execinfo.h if available.
6536 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
6537 (suspicious_free_record): New structure.
6538 (suspicious_objects, suspicious_object_index)
6539 (suspicious_free_history, suspicious_free_history_index):
6540 New variables.
6541 (find_suspicious_object_in_range, detect_suspicious_free)
6542 (Fsuspicious_object): New functions.
6543 (cleanup_vector): Call find_suspicious_object_in_range.
6544
6545 2014-04-02 Martin Rudalics <rudalics@gmx.at>
6546
6547 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
6548 width from font width (Bug#17163).
6549
6550 * frame.c (x_set_frame_parameters): Calculate default values of
6551 new frame sizes only after all other frame parameters have been
6552 processed (Bug#17142).
6553
6554 2014-04-02 Ken Brown <kbrown@cornell.edu>
6555
6556 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
6557 (Bug#17112)
6558
6559 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6560
6561 * xterm.c (x_draw_image_glyph_string): Adjust image background
6562 width accordingly when its x position is adjusted. (Bug#17115)
6563
6564 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
6565
6566 * font.c (font_list_entities): Do not add empty vector to font cache.
6567 (font_matching_entity): Likewise. If matching entity is found, insert
6568 1-item vector with this entity instead of entity itself (Bug#17125).
6569
6570 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
6571
6572 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
6573
6574 * fns.c (validate_subarray): Rename from validate_substring,
6575 since it works for vectors too. New arg ARRAY. Optimize for the
6576 non-nil case. Instead of returning bool, throw an error if out of
6577 range, so that the caller needn't do that. All uses changed.
6578 Report original values if out of range.
6579 (Fsubstring, Fsubstring_no_properties, secure_hash):
6580 Also optimize the case where FROM is 0 or TO is the size.
6581
6582 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
6583
6584 * search.c (Freplace_match): Use make_specified_string.
6585 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
6586 to catch bogus override face of glyph strings.
6587 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
6588 Move common substring range checking code to...
6589 (validate_substring): ...this function.
6590
6591 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
6592
6593 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
6594
6595 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
6596
6597 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
6598 bar is zero height, just return (Bug#16976).
6599 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
6600
6601 * nsterm.h (EmacsView): Add wait_for_tool_bar.
6602
6603 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
6604 is nil. If waiting for toolbar to complete, force a redraw.
6605
6606 2014-03-28 Glenn Morris <rgm@gnu.org>
6607
6608 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
6609 (emacs_bugreport): New variable.
6610 (usage_message): Use PACKAGE_BUGREPORT.
6611 (syms_of_emacs) <report-emacs-bug-address>: New variable.
6612
6613 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
6614
6615 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
6616
6617 Port recent signal-related changes to FreeBSD.
6618 Reported by Herbert J. Skuhra.
6619 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
6620 Move decls from here ...
6621 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
6622
6623 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6624
6625 * w32term.c (x_draw_image_glyph_string): Fix computation of height
6626 and width of image background when it is displayed with a 'box'
6627 face. (Bug#17115)
6628
6629 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
6630
6631 More backward-compatible fix to char-equal core dump (Bug#17011).
6632 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
6633 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
6634
6635 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
6636
6637 * image.c (init_svg_functions): When loading SVG-related libraries,
6638 free already loaded libraries if the initialization fails.
6639 (rsvg_handle_set_size_callback): Remove declaration, unused.
6640
6641 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
6642
6643 Fix core dump in char-equal (Bug#17011).
6644 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
6645 unibyte buffers, as we can't tell whether the characters are
6646 actually unibyte.
6647
6648 * insdel.c (adjust_markers_for_delete): Remove unused local.
6649
6650 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
6651
6652 Have (MARKER . ADJUSTMENT) undo records always be immediately
6653 after their corresponding (TEXT . POS) record in undo list.
6654 (Bug#16818)
6655 * lisp.h (record-delete): New arg record_markers.
6656 (record_marker_adjustment): No longer needed outside undo.c.
6657 * insdel.c (adjust_markers_for_delete): Move calculation of marker
6658 adjustments to undo.c's record_marker_adjustments. Note that
6659 fileio.c's decide_coding_unwind is another caller to
6660 adjust_markers_for_delete. Because it has undo list bound to t,
6661 it does not rely on adjust_markers_for_delete to record marker
6662 adjustments.
6663 (del_range_2): Swap call to record_delete and
6664 adjust_markers_for_delete so as undo marker adjustments are
6665 recorded before current deletion's adjustments, as before.
6666 (adjust_after_replace):
6667 (replace_range): Pass value for new record_markers arg to
6668 delete_record.
6669 * undo.c (record_marker_adjustment): Rename to
6670 record_marker_adjustments and made static.
6671 (record_delete): Check record_markers arg and call
6672 record_marker_adjustments.
6673 (record_change): Pass value for new record_markers arg to
6674 delete_record.
6675 (record_point): at_boundary calculation no longer needs to account
6676 for marker adjustments.
6677
6678 2014-03-26 Martin Rudalics <rudalics@gmx.at>
6679
6680 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
6681 (Bug#17077).
6682
6683 2014-03-26 Glenn Morris <rgm@gnu.org>
6684
6685 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
6686
6687 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
6688
6689 * buffer.c (struct sortvec): Add field `spriority'.
6690 (compare_overlays): Use it.
6691 (sort_overlays): Set it.
6692
6693 2014-03-26 Eli Zaretskii <eliz@gnu.org>
6694
6695 * xdisp.c (redisplay_window): If all previous attempts to find the
6696 cursor row failed, try a few alternatives before falling back to
6697 the top-most row of the window. Use row_containing_pos. (Bug#17047)
6698
6699 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
6700
6701 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
6702 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
6703
6704 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
6705 variables on Windows.
6706
6707 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
6708
6709 * w32.c (unsetenv): Remove unused var `retval'.
6710 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
6711
6712 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
6713 (start_watching): Remove unused var `thr'.
6714
6715 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
6716 (find_child_console): Remove unnecesary var `thread_id'.
6717
6718 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
6719 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
6720
6721 2014-03-26 Glenn Morris <rgm@gnu.org>
6722
6723 * filelock.c (Flock_buffer): Doc tweak.
6724
6725 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
6726 * emacs.c (shut_down_emacs):
6727 * fileio.c (Finsert_file_contents, write_region):
6728 * filelock.c (top-level, syms_of_filelock):
6729 * insdel.c (prepare_to_modify_buffer_1):
6730 CLASH_DETECTION is always defined now.
6731
6732 2014-03-25 Eli Zaretskii <eliz@gnu.org>
6733
6734 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
6735 DLL handle, to speed up thread startup.
6736
6737 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
6738
6739 Handle sigmask better with nested signal handlers (Bug#15561).
6740 * atimer.c (sigmask_atimers): Remove.
6741 Remaining use rewritten to use body of this function.
6742 * atimer.c (block_atimers, unblock_atimers):
6743 * callproc.c (block_child_signal, unblock_child_signal):
6744 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
6745 New arg OLDSET. All callers changed.
6746 * atimer.c (block_atimers, unblock_atimers):
6747 * callproc.c (block_child_signal, unblock_child_signal):
6748 * keyboard.c (handle_interrupt):
6749 * sound.c (vox_configure, vox_close):
6750 Restore the old signal mask rather than unilaterally clearing bits
6751 from the mask, in case a handler is running within another
6752 handler. All callers changed.
6753 * lisp.h, process.c, process.h, term.c:
6754 Adjust decls and callers to match new API.
6755 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
6756 signal handlers aren't supposed to use floating point anyway.
6757 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
6758
6759 2014-03-23 Daniel Colascione <dancol@dancol.org>
6760
6761 Split gc_sweep into discrete functions for legibility and better
6762 stack traces.
6763
6764 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
6765 (sweep_vectors): Fix typo in comment.
6766 (sweep_conses, sweep_floats, sweep_intervals)
6767 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
6768 (gc_sweep): Call new functions, to which existing functionality is
6769 moved.
6770 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
6771
6772 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
6773
6774 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
6775
6776 2014-03-23 Daniel Colascione <dancol@dancol.org>
6777
6778 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
6779 only if xic_style calls for it. This change allows Emacs to work
6780 with ibus. Also, don't leak resources if create_frame_xic fails,
6781 and stop caching xic_style across different displays.
6782 (supported_xim_styles): Make const.
6783 (best_xim_style): Remove first parameter: it's always just
6784 supported_xim_styles. Change to look at supported_xim_styles
6785 directly.
6786
6787 2014-03-23 Daniel Colascione <dancol@dancol.org>
6788
6789 * term.c (init_tty): Rearrange condition for clarity; print
6790 appropriate diagnostic.
6791
6792 2014-03-23 Daniel Colascione <dancol@dancol.org>
6793
6794 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
6795 array. (ASAN caught.)
6796
6797 2014-03-22 Glenn Morris <rgm@gnu.org>
6798
6799 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
6800
6801 2014-03-22 Daniel Colascione <dancol@dancol.org>
6802
6803 * process.c (conv_sockaddr_to_lisp): When extracting the string
6804 names of AF_LOCAL sockets, stop before reading uninitialized memory.
6805
6806 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6807
6808 Fix regression introduced by patch for Bug#10500.
6809 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
6810 * w32term.c (x_draw_image_relief): Likewise.
6811
6812 2014-03-21 Martin Rudalics <rudalics@gmx.at>
6813
6814 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
6815 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
6816 maximize a frame for odd default fonts.
6817
6818 2014-03-21 Glenn Morris <rgm@gnu.org>
6819
6820 * minibuf.c (history-length): Increase default from 30 to 100.
6821
6822 2014-03-21 Daniel Colascione <dancol@dancol.org>
6823
6824 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
6825 every time we switch to minibuffer.
6826
6827 * alloc.c (lisp_align_malloc, allocate_string_data)
6828 (allocate_vectorlike): Allow mmap allocation of lisp objects.
6829 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
6830
6831 2014-03-21 Eli Zaretskii <eliz@gnu.org>
6832
6833 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
6834 support more "verbs".
6835
6836 2014-03-21 Daniel Colascione <dancol@dancol.org>
6837
6838 Always prohibit dumping a dumped Emacs.
6839
6840 * emacs.c (might_dump): New variable.
6841 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
6842 * lisp.h (might_dump): Declare.
6843 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
6844
6845 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
6846
6847 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
6848
6849 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
6850
6851 * doc.c (store_function_docstring): Warn when we don't know where to
6852 put a docstring.
6853 (Fsubstitute_command_keys): Don't advertise the fact that
6854 text-properties are dropped, since we think it's a bug that we'll fix.
6855
6856 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
6857 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
6858 * frame.c (frame_garbaged): Make "docstring" more precise.
6859
6860 2014-03-20 Glenn Morris <rgm@gnu.org>
6861
6862 * charset.c (init_charset): When we cannot find the charsets directory,
6863 mention if EMACSDATA is set.
6864
6865 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
6866
6867 * fns.c (Frandom): Fix rare bug where the result isn't random.
6868
6869 Fix porting inconsistency about rounding to even.
6870 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
6871 This way, the unusual !HAVE_RINT case acts like the usual
6872 HAVE_RINT case, and we can fix the documentation accordingly.
6873
6874 2014-03-19 Eli Zaretskii <eliz@gnu.org>
6875
6876 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
6877 (w32_wnd_proc): Initialize the dwHoverTime member of
6878 TRACKMOUSEEVENT structure.
6879
6880 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
6881
6882 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
6883
6884 2014-03-16 Eli Zaretskii <eliz@gnu.org>
6885
6886 * search.c (find_newline): Speed up the function when using the
6887 newline cache, by halving the number of calls to
6888 region_cache_forward and region_cache_backward. (Bug#16830)
6889
6890 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
6891
6892 * buffer.c (Fset_buffer): Document return value (bug#17015).
6893
6894 2014-03-14 Martin Rudalics <rudalics@gmx.at>
6895
6896 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
6897 nil, always resize character wise to avoid potential loss of the
6898 mode line (Bug#16923 related).
6899
6900 2014-03-12 Martin Rudalics <rudalics@gmx.at>
6901
6902 * frame.c (x_set_frame_parameters): Always calculate new sizes
6903 pixelwise to avoid potential loss when rounding.
6904
6905 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
6906
6907 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
6908 * xterm.c (x_free_frame_resources): Free all allocated cursors.
6909
6910 2014-03-10 Eli Zaretskii <eliz@gnu.org>
6911
6912 * w32.c (fstatat): Don't add an extra slash if the argument ends
6913 with a slash: this fails the subsequent call to stat_worker on
6914 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
6915
6916 2014-03-09 Martin Rudalics <rudalics@gmx.at>
6917
6918 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
6919
6920 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
6921
6922 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
6923
6924 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
6925 when frame is only on one screen (Bug#14713).
6926
6927 2014-03-08 Eli Zaretskii <eliz@gnu.org>
6928
6929 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
6930 there's a valid wrap point in the display line, the last glyph
6931 cannot "just barely fit" on this row, because display_line doesn't
6932 let it. Instead, proceed as if the last glyph didn't fit, so that
6933 we eventually back up the iterator to the wrap point. This avoids
6934 delusional behavior of move_it_to, whereby it proceeds to the next
6935 display line, but sets current_x to zero for all the glyphs that
6936 without word-wrap would fit on the previous display line.
6937 One result was that visual-order cursor movement behaved erratically
6938 under word-wrap.
6939 (Fmove_point_visually): Add code to find the x coordinate of the
6940 last character before wrap point, under word-wrap on a TTY.
6941
6942 2014-03-07 Eli Zaretskii <eliz@gnu.org>
6943
6944 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
6945 also return value of MOVE_POS_MATCH_OR_ZV from
6946 move_it_in_display_line_to, when moving from beginning of line to
6947 point's position. (Bug#16961)
6948
6949 2014-03-07 Martin Rudalics <rudalics@gmx.at>
6950
6951 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
6952 * window.c (Fselect_window): Explain NORECORD and
6953 `buffer-list-update-hook' in doc-string.
6954
6955 2014-03-06 Martin Rudalics <rudalics@gmx.at>
6956
6957 * window.c (Fother_window_for_scrolling): Check that
6958 Vother_window_scroll_buffer is a buffer.
6959
6960 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
6961
6962 * xterm.c (xim_initialize): Always pass a copy of resource name
6963 to XRegisterIMInstantiateCallback and eassert whether return
6964 value is True. Passing copy is important because Xlib doesn't
6965 make its own copy and resource name argument usually points to
6966 SSDATA (Vx_resource_name), which may be changed from Lisp.
6967 (xim_close_display): For XUnregisterIMInstantiateCallback,
6968 always eassert return value and pass exactly the same values
6969 as were used for XRegisterIMInstantiateCallback.
6970 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
6971 sources to check why if you are interested.
6972
6973 2014-03-05 Martin Rudalics <rudalics@gmx.at>
6974
6975 * dispnew.c (change_frame_size_1): Add new_lines instead of
6976 new_height, the latter may be still zero if passed as such.
6977 * window.c (Fwindow_pixel_height): Mention bottom divider in
6978 doc-string.
6979
6980 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
6981
6982 Fix "resource temporarily unavailable" with xgselect
6983 (Bug#16925).
6984 * xgselect.c: Include <stdbool.h>.
6985 (xg_select) [!USE_GTK]: Don't lose track of errno.
6986
6987 Fix minor --enable-gcc-warnings issues.
6988 * widget.c (update_various_frame_slots, EmacsFrameResize):
6989 Avoid unused locals. Prefer 'if' to '#if' when either will do.
6990
6991 2014-03-04 Ken Brown <kbrown@cornell.edu>
6992
6993 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
6994 represent the actual adjustment needed for alignment.
6995
6996 2014-03-04 Eli Zaretskii <eliz@gnu.org>
6997
6998 * gmalloc.c (aligned_alloc): Don't allocate more memory than
6999 needed, and don't reallocate if the initial allocation already
7000 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
7001
7002 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7003
7004 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
7005 (Bug#16932)
7006
7007 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
7008
7009 * cmds.c (delete-char): Update docstring pointing out that the
7010 function ignores `delete-active-region' and `overwrite-mode'.
7011
7012 2014-03-03 Eli Zaretskii <eliz@gnu.org>
7013
7014 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
7015
7016 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
7017 allocated buffer due to alignment.
7018 (freehook): If the block to be freed was allocated by
7019 'aligned_alloc', find its real pointer before calling 'free'.
7020 (Bug#16901)
7021 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
7022 backtrace.
7023
7024 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
7025
7026 * font.c (toplevel): Adjust comment about font cache layout.
7027 (font_clear_cache): Fix to match real font cache layout.
7028 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
7029 (Fframe_font_cache) [FONT_DEBUG]: New function.
7030 (syms_of_font) [FONT_DEBUG]: Defsubr it.
7031
7032 Avoid crashes when X fonts are erroneously freed on reused X
7033 'Display *' connection data (Bug#16069). Note that X font
7034 resources still may be leaked, but currently there is no way
7035 to completely avoid it.
7036 * xterm.h (struct x_display_info): New member x_id. Add comments.
7037 * xterm.c (x_display_id): New variable.
7038 (x_term_init): Assign identifier to each opened X connection.
7039 * xfont.c (struct xfont): New member x_display_id.
7040 (xfont_open): Initialize it with frame's display id.
7041 (xfont_close): Check whether font's display id matches the one
7042 recorded for the given display. Adjust comment.
7043 * xftfont.c (struct xftfont_info):
7044 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
7045
7046 2014-03-01 Martin Rudalics <rudalics@gmx.at>
7047
7048 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
7049 * window.c (Fother_window_for_scrolling): Don't try to scroll a
7050 killed Vother_window_scroll_buffer.
7051 (Vother_window_scroll_buffer): Fix doc-string accordingly.
7052
7053 2014-03-01 Eli Zaretskii <eliz@gnu.org>
7054
7055 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
7056 that start with more than 2 slashes as UNCs. (Bug#16751)
7057
7058 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
7059
7060 Fix a few crashes and leaks when cloning C strings.
7061 * alloc.c, lisp.h (dupstring): New function.
7062 * gtkutil.c (xg_get_font):
7063 * term.c (tty_default_color_capabilities):
7064 * xsettings.c (store_monospaced_changed)
7065 (store_font_name_changed, parse_settings)
7066 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
7067 This avoids some unlikely crashes due to accessing freed storage,
7068 and avoids some minor memory leaks in the more-typical case.
7069
7070 2014-02-28 Martin Rudalics <rudalics@gmx.at>
7071
7072 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
7073 cursor when modeline can't be dragged (Bug#16647).
7074
7075 2014-02-28 Glenn Morris <rgm@gnu.org>
7076
7077 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
7078 from custom-delayed-init-variables. (Bug#11565)
7079
7080 2014-02-27 Martin Rudalics <rudalics@gmx.at>
7081
7082 More fixes for mouse glyph calculations (Bug#16647).
7083 * window.c (coordinates_in_window): In intersection of
7084 horizontal and vertical window dividers prefer the horizontal
7085 one. Add some extra parens to last fix.
7086 (window_relative_x_coord): Return x-coordinate for header and
7087 mode line too.
7088 * xdisp.c (remember_mouse_glyph): In text area don't extend
7089 glyph into mode line to show the vertical drag cursor there
7090 immediately. Subdivide mouse glyphs in right fringes to show a
7091 horizontal drag cursor as soon as we enter the "grabbable width"
7092 portion. Handle vertical border case separately. Do not
7093 subdivide window divider areas.
7094 (note_mouse_highlight): On bottom divider of bottommost windows
7095 show vertical drag cursor only when the minibuffer window can be
7096 resized.
7097
7098 2014-02-27 Eli Zaretskii <eliz@gnu.org>
7099
7100 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
7101 reset by the face of the object just displayed. See also bug#76.
7102 (get_next_display_element): If the string came from a display
7103 property, examine the box face attribute at it->position, not at
7104 it->current.pos, since the latter was not updated yet. (Bug#16870)
7105 (handle_face_prop): Improve commentary.
7106
7107 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
7108
7109 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
7110 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
7111
7112 2014-02-26 Martin Rudalics <rudalics@gmx.at>
7113
7114 Fixes around Bug#16647.
7115 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
7116 ON_BOTTOM_DIVIDER cases.
7117 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
7118 only if the window has no right divider.
7119 (Fcoordinates_in_window_p): Fix doc-string.
7120
7121 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
7122
7123 * lread.c (Funintern): Fix doc to match advertised calling convention.
7124
7125 2014-02-24 Daniel Colascione <dancol@dancol.org>
7126
7127 * keyboard.c (read_char): Close race that resulted in lost events.
7128
7129 2014-02-22 Glenn Morris <rgm@gnu.org>
7130
7131 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
7132 * window.c (window-resize-pixelwise): Doc fixes.
7133
7134 * process.c (Finternal_default_process_filter)
7135 (Finternal_default_process_sentinel): Doc tweaks.
7136
7137 2014-02-21 Glenn Morris <rgm@gnu.org>
7138
7139 * process.c (Fprocess_buffer, Faccept_process_output)
7140 (Finternal_default_process_filter, Finternal_default_process_sentinel):
7141 Doc fixes.
7142
7143 2014-02-21 Martin Rudalics <rudalics@gmx.at>
7144
7145 * window.c (Fwindow_scroll_bar_width): New function.
7146
7147 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
7148
7149 Pacify GCC when configuring with --enable-gcc-warnings.
7150 * xdisp.c (move_it_in_display_line_to) [lint]:
7151 Initialize recently-added local.
7152
7153 2014-02-21 Daniel Colascione <dancol@dancol.org>
7154
7155 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
7156
7157 2014-02-20 Eli Zaretskii <eliz@gnu.org>
7158
7159 * xdisp.c (init_iterator): Don't dereference a bogus face
7160 pointer. (Bug#16819)
7161 (try_cursor_movement): Don't use cursor position if
7162 set_cursor_from_row failed to compute it. This avoids assertion
7163 violations in MATRIX_ROW.
7164 (move_it_in_display_line_to): Save the iterator state in ppos_it
7165 only once per call. Reimplement the method used to return to the
7166 best candidate position if all the positions found in display line
7167 are beyond TO_CHARPOS. This cuts down the number of calls to
7168 bidi_shelve_cache, which moves a lot of stuff when lines are long
7169 and include bidirectional text. (Bug#15555)
7170
7171 2014-02-20 Glenn Morris <rgm@gnu.org>
7172
7173 * data.c (Fdefalias): Doc fix.
7174
7175 2014-02-19 Eli Zaretskii <eliz@gnu.org>
7176
7177 * xdisp.c (display_line): Fix horizontal scrolling of large images
7178 when fringes are turned off. This comes at a price of not
7179 displaying the truncation/continuation glyphs in this case.
7180 (Bug#16806)
7181
7182 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
7183 CreateDIBSection returns an error indication, zero out *ximg after
7184 destroying the image. This avoids crashes in memory allocations
7185 due to the fact that some of the callers also call
7186 x_destroy_x_image, which will attempt to free an already free'd
7187 block of memory.
7188
7189 2014-02-18 Martin Rudalics <rudalics@gmx.at>
7190
7191 * widget.c (update_various_frame_slots): Don't set
7192 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
7193
7194 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
7195
7196 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
7197
7198 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
7199
7200 temacs --daemon fix (Bug#16599).
7201 * emacs.c (main): Initialize daemon_pipe[1] here ...
7202 (syms_of_emacs): ... instead of here.
7203
7204 2014-02-16 Anders Lindgern <andlind@gmail.com>
7205
7206 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
7207 is set (Bug#16505).
7208
7209 2014-02-16 Daniel Colascione <dancol@dancol.org>
7210
7211 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
7212 (xd_get_connection_address): Use it.
7213 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
7214 xd_get_connection_address because the latter signals if the bus
7215 we're trying to close is already disconnected.
7216
7217 2014-02-13 Eli Zaretskii <eliz@gnu.org>
7218
7219 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
7220 argument to CreateThread. This avoids segfaults on Windows 9X.
7221 Reported by oslsachem <oslsachem@gmail.com>.
7222
7223 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
7224
7225 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
7226 * unexhp9k800.c (unexec_error): New function, to simplify the code.
7227 (check_lseek): New function, to report lseek errors.
7228 (save_data_space, update_file_ptrs, read_header, write_header)
7229 (copy_file, copy_rest, unexec): Use these news functions.
7230 (update_file_ptrs): Don't assume wraparound behavior when
7231 converting a large size_t value to off_t.
7232
7233 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
7234
7235 * composite.c (fill_gstring_header): Pass positions as C integers
7236 and move parameters checking to...
7237 (Fcomposition_get_gstring): ...this function. Handle case when
7238 buffer positions are in reversed order and avoid crash (Bug#16739).
7239 Adjust docstring.
7240 * buffer.c (validate_region): Mention current buffer in error message.
7241
7242 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
7243
7244 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
7245
7246 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
7247
7248 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
7249
7250 2014-02-11 Glenn Morris <rgm@gnu.org>
7251
7252 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
7253 Replace refs to "OpenStep" in messages.
7254
7255 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
7256
7257 Avoid "." at end of error diagnostics.
7258 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
7259 * font.c (Ffont_at):
7260 * nsfns.m (ns_display_info_for_name):
7261 * nsselect.m (Fx_own_selection_internal):
7262 * nsterm.m (performDragOperation:):
7263 Remove "." from end of diagnostic.
7264
7265 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
7266
7267 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
7268 unintuitive (bug#15824).
7269 (Fyes_or_no_p): Doc fix (bug#15456).
7270
7271 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
7272
7273 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
7274 and avoid warning.
7275 * eval.c (call_debugger): When exiting the debugger, do not allow
7276 max_specpdl_size less than actual binding depth (Bug#16603).
7277 (syms_of_eval): Adjust docstring.
7278
7279 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
7280
7281 * cmds.c (Fself_insert_command): Output a clearer error message on
7282 negative repetitions (bug#9476).
7283
7284 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
7285
7286 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7287
7288 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
7289
7290 * minibuf.c (Fread_string): Doc clarification (bug#15422).
7291
7292 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
7293
7294 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
7295
7296 * keyboard.c (Frecursive_edit): Fix typo in docstring.
7297
7298 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7299
7300 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
7301
7302 * keyboard.c (Frecursive_edit): Say more precicely how throwing
7303 `exit' works (bug#15865).
7304
7305 2014-02-07 Martin Rudalics <rudalics@gmx.at>
7306
7307 Constrain window box/body sizes and margin widths (Bug#16649).
7308 * xdisp.c (window_box_width): Don't return less than zero.
7309 (window_box_left_offset, window_box_right_offset): Don't return
7310 more than the window's pixel width.
7311 * window.c (window_body_height, window_body_width): Don't return
7312 negative value.
7313 (window_resize_apply): Adjust margin width, if necessary.
7314
7315 2014-02-07 Glenn Morris <rgm@gnu.org>
7316
7317 * nsterm.m (syms_of_nsterm): Doc fix.
7318
7319 2014-02-06 Eli Zaretskii <eliz@gnu.org>
7320
7321 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
7322 New variables: pointers through which to call the respective APIs.
7323 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
7324 (filename_from_ansi, sys_link, check_windows_init_file):
7325 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
7326 This is required on Windows 9X, where we dynamically load
7327 UNICOWS.DLL which has their non-stub implementations.
7328 (maybe_load_unicows_dll): Assign addresses to these 2 function
7329 pointers after loading UNICOWS.DLL.
7330
7331 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
7332 MultiByteToWideChar and WideCharToMultiByte through function
7333 pointers.
7334
7335 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
7336 New declarations.
7337
7338 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
7339
7340 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
7341 for OSX >= 10.9 if separate spaces are used.
7342 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
7343
7344 2014-02-06 Glenn Morris <rgm@gnu.org>
7345
7346 * buffer.c (cache-long-scans): Doc fix.
7347
7348 2014-02-05 Eli Zaretskii <eliz@gnu.org>
7349
7350 * w32fns.c (Fw32_shell_execute): Doc fix.
7351
7352 2014-02-05 Bastien Guerry <bzg@gnu.org>
7353
7354 * syntax.c (Fforward_word): Call Fconstrain_to_field with
7355 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
7356
7357 2014-02-05 Martin Rudalics <rudalics@gmx.at>
7358
7359 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
7360 outside the window (Bug#16649).
7361
7362 * xdisp.c (note_mouse_highlight): When entering a margin area show
7363 a non-text cursor (Bug#16647).
7364
7365 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
7366
7367 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
7368 It prompted a compile-time diagnostic on GNU/Linux.
7369 Simplify to remove the need for the label.
7370
7371 2014-02-04 Eli Zaretskii <eliz@gnu.org>
7372
7373 * w32menu.c (w32_popup_dialog): Don't condition the whole function
7374 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
7375 to show it; otherwise return 'unsupported--w32-dialog' to signal
7376 to the caller that emulation with menus is necessary.
7377 This resurrects code inadvertently deleted by the 2013-10-08 commit.
7378 (Bug#16636)
7379 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
7380
7381 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
7382 by HAVE_DIALOGS.
7383
7384 * menu.c (Fx_popup_dialog): Don't condition the call to
7385 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
7386 special symbol 'unsupported--w32-dialog', emulate the dialog with
7387 a menu by calling x-popup-menu.
7388
7389 * menu.h (Qunsupported__w32_dialog): New extern variable.
7390
7391 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
7392
7393 * keyboard.c (kbd_buffer_get_event): Read file notification events
7394 also in batch mode.
7395
7396 * xgselect.c (xg_select): Read glib events in any case, even if
7397 there are no file descriptors to watch for. (Bug#16519)
7398
7399 2014-02-03 Martin Rudalics <rudalics@gmx.at>
7400
7401 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
7402 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
7403 * w32term.c (w32_draw_window_divider): Handle first and last
7404 pixels specially.
7405 * w32term.h (w32_fill_area_abs): New function.
7406 * xdisp.c (x_draw_right_divider): Don't draw over bottom
7407 divider.
7408 * xfaces.c (realize_basic_faces): Handle new face ids.
7409 * xfns.c (Fx_create_frame): Call x_default_parameter for right
7410 and bottom divider width.
7411 * xterm.c (x_draw_window_divider): Handle first and last pixels
7412 specially.
7413
7414 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
7415
7416 * print.c (Fexternal_debugging_output): Add cast to pacify
7417 --enable-gcc-warnings.
7418 * eval.c (call_debugger): Grow specpdl if the debugger was
7419 entered due to specpdl overflow (Bug#16603) and allow more
7420 specpdl space for the debugger itself.
7421
7422 2014-02-02 Martin Rudalics <rudalics@gmx.at>
7423
7424 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
7425 (Bug#16619)
7426
7427 2014-02-01 Eli Zaretskii <eliz@gnu.org>
7428
7429 * w32fns.c (Ffile_system_info): Use WINAPI in the function
7430 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
7431
7432 * print.c (Fexternal_debugging_output): If the argument character
7433 is non-ASCII, encode it with the current locale's encoding before
7434 writing the result to the terminal. (Bug#16448)
7435
7436 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
7437 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
7438 for it. (Bug#16558)
7439
7440 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
7441
7442 * process.c (create_process): Reset SIGPROF handler in the child.
7443 * callproc.c (call_process): Likewise.
7444
7445 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
7446
7447 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
7448
7449 2014-01-29 Eli Zaretskii <eliz@gnu.org>
7450
7451 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
7452 of zero to print strings, GDB doesn't like it.
7453
7454 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
7455 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
7456 we still use correct addresses. (Bug#16576)
7457
7458 2014-01-27 K. Handa <handa@gnu.org>
7459
7460 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
7461 to preserve the code detection behavior of 24.3.
7462 * coding.h (struct coding_system): New member detected_utf8_bytes.
7463 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
7464 (decode_coding_gap): Use short cut for UTF-8 file reading only
7465 when coding->detected_utf8_bytes equals to coding->src_bytes.
7466 * fileio.c (Finsert_file_contents): Cancel the previous change.
7467
7468 2014-01-29 Martin Rudalics <rudalics@gmx.at>
7469
7470 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
7471 that are not visible.
7472
7473 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
7474
7475 * xmenu.c (create_and_show_popup_menu): Handle case when no key
7476 is grabbed (Bug#16565).
7477
7478 2014-01-28 Martin Rudalics <rudalics@gmx.at>
7479
7480 * xdisp.c (last_max_ascent): Re-remove after erroneously
7481 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
7482 from 2013-03-29.
7483 (move_it_to): Re-remove reference to last_max_ascent.
7484 (Fwindow_text_pixel_size): Add iterator's max_ascent and
7485 max_descent here instead of calling line_bottom_y.
7486 Fix doc-string.
7487
7488 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
7489
7490 * terminal.c (initial_free_frame_resources): New function.
7491 (init_initial_terminal): Install new hook to free face cache
7492 on initial frame and avoid memory leak. For details, see
7493 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
7494 * xfaces.c (free_frame_faces): Adjust comment.
7495
7496 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7497
7498 * data.c (Fstring_to_number): Document results if unparsable
7499 (Bug#16551).
7500
7501 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
7502
7503 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
7504
7505 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7506
7507 When decoding, prefer ptrdiff_t to int for buffer positions etc.
7508 * coding.c (detect_coding_utf_8, emacs_mule_char)
7509 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
7510 (check_utf_8, decode_coding):
7511 * coding.h (struct coding_system.errors):
7512 Use ptrdiff_t, not int, for integer values derived from buffer and
7513 string positions.
7514
7515 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
7516 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
7517 before invoking decode_coding_gap, since there's just one block.
7518
7519 2014-01-25 Martin Rudalics <rudalics@gmx.at>
7520
7521 Fix handling of face attributes in Fx_create_frame (Bug#16529).
7522 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
7523 too early. Again run change_frame_size before assigning menu-
7524 and tool-bar-lines.
7525
7526 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
7527
7528 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
7529 arrives, call x_check_fullscreen, in case the new display has a
7530 different resolution. (Bug#16517)
7531
7532 2014-01-25 Eli Zaretskii <eliz@gnu.org>
7533
7534 * term.c (read_menu_input): If the selected frame changes, exit
7535 the menu.
7536 (tty_menu_show): If the selected frame changes while we displayed
7537 a menu, throw to top level. (Bug#16479)
7538
7539 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
7540
7541 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
7542
7543 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
7544
7545 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
7546 * data.c (count_one_bits_word): Fix bug (negated comparison)
7547 when BITS_PER_ULL < BITS_PER_BITS_WORD.
7548
7549 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
7550
7551 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
7552 Avoid undefined behavior by initializing display property bit of a
7553 string processed by the bidirectional iterator. For details, see
7554 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
7555
7556 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
7557
7558 Minor cleanup of previous change.
7559 * image.c (imagemagick_error, Fimagemagick_types):
7560 Omit some recently-introduced and unnecessary casts and assignments.
7561
7562 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
7563
7564 Fix two memory leaks discovered with Valgrind.
7565 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
7566 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
7567
7568 2014-01-22 Martin Rudalics <rudalics@gmx.at>
7569
7570 Fixes in window size functions around Bug#16430 and Bug#16470.
7571 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
7572 (Fwindow_mode_line_height, Fwindow_header_line_height)
7573 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7574 Minor doc-string adjustments.
7575 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
7576 Rewrite doc-strings.
7577 (window_body_height, window_body_width): Do not count partially
7578 visible lines/columns when PIXELWISE is nil (Bug#16470).
7579 (Qfloor, Qceiling): New symbols.
7580
7581 2014-01-21 Eli Zaretskii <eliz@gnu.org>
7582
7583 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
7584 when the image cache is not yet allocated. (Bug#16509)
7585
7586 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
7587
7588 * buffer.c (Fkill_buffer): When killing an indirect buffer,
7589 re-attach intervals to its base buffer (Bug#16502).
7590 * intervals.c (set_interval_object): Move from here...
7591 * intervals.h (set_interval_object): ... to here. Fix comments.
7592
7593 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
7594
7595 Avoid undefined behavior by initializing buffer redisplay bit.
7596 Reported by Dmitry Antipov in
7597 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
7598 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
7599
7600 Revert some of the CANNOT_DUMP fix (Bug#16494).
7601 * lread.c (init_lread): Fix typo: NILP, not !NILP.
7602
7603 2014-01-19 Eli Zaretskii <eliz@gnu.org>
7604
7605 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
7606 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
7607 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
7608 they are replaced by macros that expand into direct calls to the
7609 corresponding functions from GDI32.DLL.
7610 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
7611 variables in the Cygwin build, they are unused.
7612
7613 2014-01-19 K. Handa <handa@gnu.org>
7614
7615 * composite.c (composition_update_it): Fix previous change.
7616
7617 2014-01-18 Eli Zaretskii <eliz@gnu.org>
7618
7619 Fix file name handling on MS-Windows 9X.
7620 * w32.c (maybe_load_unicows_dll): New function.
7621
7622 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
7623 on, to make sure we can convert file names to and from UTF-8 on
7624 Windows 9X. This fixes a failure to start up because Emacs cannot
7625 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
7626
7627 * w32font.c [WINDOWSNT]: Include w32.h.
7628 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
7629 of implementing the same stuff.
7630 Remove now unused g_b_init_is_windows_9x.
7631
7632 * w32.h (maybe_load_unicows_dll): Add prototype.
7633
7634 2014-01-17 Eli Zaretskii <eliz@gnu.org>
7635
7636 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
7637 switch to single keyboard. Prevents daemon crashes when a new
7638 client connects while we show a TTY menu in an existing client.
7639 (Bug#16479)
7640
7641 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
7642
7643 Fix MinGW64 porting problem with _setjmp.
7644 Reported by Eli Zaretskii in:
7645 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
7646 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
7647 the old _setjmp and _longjmp. All uses changed.
7648
7649 2014-01-13 Daniel Colascione <dancol@dancol.org>
7650
7651 * textprop.c (Fremove_list_of_text_properties):
7652 Correctly handle reaching the end of the interval tree. (Bug#15344)
7653
7654 2014-01-13 Martin Rudalics <rudalics@gmx.at>
7655
7656 * xdisp.c (resize_mini_window): Round height to a multiple of
7657 frame's line height. Fix bug in calculation of window start
7658 position (Bug#16424).
7659
7660 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
7661
7662 * macfont.m: Include termchar.h.
7663 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
7664 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
7665 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
7666 *_WITH_GC_* to take face and f as parameters.
7667 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
7668 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
7669
7670 2014-01-13 Daniel Colascione <dancol@dancol.org>
7671
7672 Fix menu item updating in the presence of the Unity global menu
7673 GTK+ module.
7674
7675 * gtkutil.h (xg_have_tear_offs): Add frame parameter
7676 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
7677 tear-off.
7678 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7679 updating menus; explain why.
7680 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
7681 problem it's supposed to solve and it interferes with detecting
7682 the presence of a global menu.
7683 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
7684 parameter.
7685
7686 2014-01-11 K. Handa <handa@gnu.org>
7687
7688 * composite.c (composition_update_it): Fix indexing of
7689 LGSTRING_CHAR (Bug#15984).
7690
7691 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
7692
7693 * unexw32.c (_start) [__MINGW64__]: Define to __start.
7694
7695 2014-01-11 Eli Zaretskii <eliz@gnu.org>
7696
7697 * xdisp.c (try_window_id): Don't use this function's optimizations
7698 if overlays in the buffer displayed by the window have changed
7699 since last redisplay. (Bug#16347)
7700 (message_dolog): Fix indentation.
7701
7702 2014-01-11 Martin Rudalics <rudalics@gmx.at>
7703
7704 * frame.c (frame_resize_pixelwise): Fix doc-string.
7705
7706 2014-01-10 Martin Rudalics <rudalics@gmx.at>
7707
7708 Fix handling of internal borders (Bug#16348).
7709 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
7710 Remove internal border width from pixel width of windows.
7711 (change_frame_size_1): Don't return early when frame's pixel
7712 size changes - we still have to record the new sizes in the
7713 frame structure.
7714 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
7715 also when toolbar gets larger.
7716 * window.c (check_frame_size): Include internal_border_width in
7717 check.
7718 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
7719 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
7720 In non-toolkit/non-GTK version clear internal border.
7721 * xterm.c (x_clear_under_internal_border): New function for
7722 non-toolkit/non-GTK version.
7723 (x_after_update_window_line): In non-toolkit/non-GTK version
7724 don't do that.
7725 (handle_one_xevent, x_set_window_size):
7726 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7727 * xterm.h (x_clear_under_internal_border): Extern it.
7728
7729 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
7730
7731 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
7732 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
7733 it again.
7734
7735 2014-01-06 Eli Zaretskii <eliz@gnu.org>
7736
7737 * xdisp.c (redisplay_window): Don't skip window redisplay if the
7738 last value of point is not equal to buffer's point. (Bug#16129)
7739
7740 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
7741
7742 Spelling fixes.
7743 * nsterm.h (updateCollectionBehavior): Rename from
7744 updateCollectionBehaviour. All uses changed.
7745
7746 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
7747 * Makefile.in (SETFATTR): New macro.
7748 (temacs$(EXEEXT)): Use it.
7749
7750 2014-01-04 Martin Rudalics <rudalics@gmx.at>
7751
7752 Fix maximization behavior on Windows (Bug#16300).
7753 * w32fns.c (w32_fullscreen_rect): Don't handle
7754 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
7755 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
7756 of SetWindowPos. Restore last placement also when leaving
7757 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
7758 but the FULLSCREEN_BOTH case.
7759
7760 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
7761
7762 Port to C89.
7763 * data.c (arithcompare_driver):
7764 * fileio.c (Fcar_less_than_car):
7765 * fns.c (internal_equal):
7766 * frame.c (delete_frame):
7767 * lisp.h (enum More_Lisp_Bits):
7768 * lread.c (read1):
7769 Avoid C99 constructs that don't work in C89.
7770 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
7771 to port to C89, which doesn't have 'long long'.
7772 (count_trailing_zero_bits): Use them.
7773
7774 2014-01-03 Chong Yidong <cyd@gnu.org>
7775
7776 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
7777
7778 2014-01-02 Martin Rudalics <rudalics@gmx.at>
7779
7780 Further adjust frame/window scrollbar width calculations.
7781 * window.c (apply_window_adjustment):
7782 Set windows_or_buffers_changed.
7783 (Fwindow_scroll_bars): Return actual scrollbar width.
7784 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
7785 For non-toolkit builds again use 14 as minimum width and set
7786 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
7787 * xterm.c (XTset_vertical_scroll_bar): Take width from
7788 WINDOW_SCROLL_BAR_AREA_WIDTH.
7789 (x_new_font): Rename wid to unit. Base calculation of new
7790 scrollbar width on toolkit used and make it analogous to that of
7791 x_set_scroll_bar_default_width.
7792 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
7793 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
7794 of GetSystemMetrics.
7795 * w32term.c (w32_set_vertical_scroll_bar): Take width from
7796 WINDOW_SCROLL_BAR_AREA_WIDTH.
7797 (x_new_font): Make it correspond to changes in xterm.c.
7798
7799 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
7800
7801 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
7802 This is a cleaner way to fix the MinGW-w64 porting problem.
7803 Check for INTPTR_MAX misconfiguration.
7804
7805 2014-01-01 Eli Zaretskii <eliz@gnu.org>
7806
7807 * search.c (newline_cache_on_off, find_newline): In indirect
7808 buffers, use the newline cache of the base buffer.
7809
7810 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
7811 buffer, invalidate the caches of its base buffer. (Bug#16265)
7812
7813 * indent.c (width_run_cache_on_off, compute_motion): In indirect
7814 buffers, use the width-run cache of the base buffer.
7815
7816 * xdisp.c (redisplay_window): When the window displays an indirect
7817 buffer, and the character widths in the display table have
7818 changed, invalidate the width-run cache of the corresponding base
7819 buffer.
7820
7821 * fileio.c (Finsert_file_contents): When invalidating the newline
7822 cache, consider the case of inserting into indirect buffer.
7823
7824 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
7825 In indirect buffers, use the paragraph cache of the base buffer.
7826
7827 2013-12-31 Martin Rudalics <rudalics@gmx.at>
7828
7829 * window.c (grow_mini_window): Fix last change.
7830
7831 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
7832
7833 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
7834
7835 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
7836
7837 * w32term.c (w32_initialize): Use LCID and LOWORD.
7838
7839 * w32proc.c (create_child): Use pid_t for 5th argument.
7840 (IsValidLocale): Don't provide prototype for MinGW64.
7841 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
7842 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
7843
7844 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
7845 MinGW64 doesn't support.
7846
7847 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
7848
7849 * w32.c (set_named_security_info): New function.
7850 (acl_set_file): Fall back on set_named_security_info if
7851 set_file_security fails.
7852 (g_b_init_set_named_security_info_w)
7853 (g_b_init_set_named_security_info_a): New static variables.
7854 (globals_of_w32): Initialize them to zero.
7855 (set_named_security_info): Set them to non-zero if the
7856 corresponding API is available.
7857 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
7858 New function typedefs.
7859
7860 2013-12-31 Martin Rudalics <rudalics@gmx.at>
7861
7862 Some more fixes following pixelwise resize changes including one
7863 for Bug#16306.
7864 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
7865 of frame_resize_pixelwise.
7866 * widget.c (pixel_to_text_size): New function.
7867 (update_wm_hints): Have size hints respect value of
7868 frame_resize_pixelwise.
7869 (EmacsFrameResize): Alway process resize requests pixelwise.
7870 * window.c (grow_mini_window): Make sure mini window is at least
7871 one line tall.
7872 * xdisp.c (display_menu_bar): Make sure menubar extends till
7873 right end of frame.
7874 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
7875 (x_set_tool_bar_lines): Calculate pixelwise.
7876 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
7877 frame_resize_pixelwise.
7878
7879 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
7880
7881 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
7882 variables not used there.
7883
7884 2013-12-30 Eli Zaretskii <eliz@gnu.org>
7885
7886 * w32.c (sys_umask): New function. (Bug#16299)
7887
7888 2013-12-30 Martin Rudalics <rudalics@gmx.at>
7889
7890 * dispnew.c (change_frame_size_1): Take old width of root window
7891 from that window's pixel width. (Bug#16284)
7892
7893 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
7894
7895 Plain copy-file no longer chmods an existing destination (Bug#16133).
7896 * fileio.c (realmask): Now a static var, not a local.
7897 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
7898 Remove arg STATPTR. All uses changed.
7899 (Fcopy_file): Do not alter permissions of existing destinations,
7900 unless PRESERVE-PERMISSIONS (renamed from
7901 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
7902 Avoid race when testing for existing destinations and for
7903 when input and output files are the same.
7904 If changing the group fails, adjust both default and
7905 preserved permissions so that access is not granted to the
7906 wrong group.
7907 (Fset_default_file_modes, init_fileio): Update realmask.
7908 (Fdefault_file_modes): Use realmask instead of calling umask.
7909
7910 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
7911
7912 Fix pipe bug with OS X emacs --daemon (Bug#16262).
7913 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
7914 flags on the daemon pipe ends before execing.
7915
7916 2013-12-28 Eli Zaretskii <eliz@gnu.org>
7917
7918 * w32fns.c (Fx_create_frame): Error out if called from a TTY
7919 session. (Bug#14739)
7920
7921 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
7922
7923 * callproc.c (Vexec_path): Document that exec-directory is in it.
7924
7925 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
7926
7927 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
7928 default.
7929
7930 2013-12-27 Chong Yidong <cyd@gnu.org>
7931
7932 * data.c (Fsymbol_function): Doc fix.
7933
7934 2013-12-26 Martin Rudalics <rudalics@gmx.at>
7935
7936 Some more tinkering with Bug#16051.
7937 * window.c (resize_frame_windows): Don't let the size of the
7938 root window drop below the frame's default character size.
7939 Never ever delete any subwindows - let the window manager do the
7940 clipping.
7941
7942 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
7943 of toolbar lines needed when they exceed the height of the root
7944 window.
7945 (unwind_create_frame_1): New function.
7946 (Fx_create_frame): Generally inhibit calling the window
7947 configuration change hook here. Remove extra call to
7948 change_frame_size - it's not needed when we don't run the
7949 configuration change hook.
7950
7951 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
7952
7953 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
7954 On my Fedora 19 platform the core dumps were so big that
7955 my desktop became nearly catatonic.
7956 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
7957 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
7958 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
7959 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
7960 a clang-only syntax.
7961 * conf_post.h (__has_feature): New macro, if not already defined.
7962 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
7963 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
7964
7965 2013-12-25 Eli Zaretskii <eliz@gnu.org>
7966
7967 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
7968 is a file name. (Bug#16252)
7969
7970 2013-12-25 Chong Yidong <cyd@gnu.org>
7971
7972 * keyboard.c (Voverriding_terminal_local_map)
7973 (Voverriding_local_map): Doc fix.
7974
7975 * keymap.c (Vemulation_mode_map_alists): Doc fix.
7976
7977 2013-12-24 Eli Zaretskii <eliz@gnu.org>
7978
7979 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
7980 file name when it is submitted to ShellExecute. Simplify code.
7981 Don't test DOCUMENT for being a string, as that is enforced by
7982 CHECK_STRING. Doc fix.
7983
7984 2013-12-23 Eli Zaretskii <eliz@gnu.org>
7985
7986 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
7987 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
7988 redisplay_tool_bar does. Improve and fix commentary.
7989 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
7990 limits of the glyph matrices. (Bug#16051)
7991 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
7992 only when the new size is different from the old one, and the new
7993 size can be achieved given the frame height.
7994
7995 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
7996
7997 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
7998
7999 2013-12-23 Glenn Morris <rgm@gnu.org>
8000
8001 * lread.c (Fload): Mention load-prefer-newer in doc.
8002
8003 2013-12-22 Martin Rudalics <rudalics@gmx.at>
8004
8005 Handle Bug#16207 by being more restrictive when running hooks.
8006 * window.c (unwind_change_frame): New function.
8007 (Fset_window_configuration): Don't run configuration change hook
8008 while the frame configuration is unsafe. Call select_window
8009 twice.
8010
8011 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
8012
8013 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
8014
8015 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
8016
8017 * nsterm.h: Declare EmacsColor category.
8018
8019 * nsterm.m (NSColor): Implement EmacsColor category.
8020 (ns_get_color): Use colorUsingDefaultColorSpace.
8021 (ns_get_color, ns_term_init): Use colorForEmacsRed.
8022
8023 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
8024
8025 2013-12-21 Eli Zaretskii <eliz@gnu.org>
8026
8027 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
8028 having the PNG_NORETURN attribute, to avoid compiler warning in
8029 my_png_error.
8030
8031 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8032
8033 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
8034
8035 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
8036 fringe background extension.
8037 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
8038 because they are now always the same as `left' and `width',
8039 respectively. Remove code for the case that `width' and
8040 `sb_width' are different.
8041
8042 2013-12-20 Martin Rudalics <rudalics@gmx.at>
8043
8044 Remove scroll_bar_actual_width from frames.
8045 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
8046 * frame.c (Fscroll_bar_width): Return scroll bar area width.
8047 (x_figure_window_size):
8048 * nsterm.m (x_set_window_size):
8049 * widget.c (set_frame_size):
8050 * w32term.c (x_set_window_size):
8051 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
8052 scroll_bar_actual_width.
8053
8054 Convert scroll_bar members to integers on Windows.
8055 * w32term.h (struct scroll_bar): Convert top, left, width,
8056 height, start, end and dragging to integers.
8057 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
8058 scroll_bar members.
8059 * w32term.c (w32_set_scroll_bar_thumb)
8060 (w32_scroll_bar_handle_click): Remove XINT conversions for
8061 scroll_bar members. Treat bar->dragging as integer.
8062 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
8063 first element. Remove XINT conversions for scroll_bar members.
8064 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
8065 Remove XINT conversions for scroll_bar members.
8066
8067 Fix assignment for new window total sizes.
8068 * window.c (Fwindow_resize_apply_total): Assign values for
8069 minibuffer window.
8070
8071 2013-12-20 Chong Yidong <cyd@gnu.org>
8072
8073 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
8074 argument to `append'.
8075
8076 2013-12-19 Eli Zaretskii <eliz@gnu.org>
8077
8078 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
8079 current text face, for extending the face of the display margins.
8080 (Bug#16192)
8081
8082 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8083 Doc fix. (Bug#16190)
8084
8085 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
8086
8087 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
8088 Remove.
8089
8090 * nsterm.m (Qfile, Qurl): New.
8091 (EV_MODIFIERS2): New macro.
8092 (EV_MODIFIERS): Use EV_MODIFIERS2.
8093 (ns_term_init): Remove font and color from DND, does not work on
8094 newer OSX, and other ports don't have them.
8095 (performDragOperation:): Handle modifiers used during drag.
8096 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
8097 Remove global Lisp variables used to communicate with ns-win.el.
8098 Remove font and color handling.
8099 (syms_of_nsterm): Defsym Qfile and Qurl.
8100
8101 2013-12-19 Anders Lindgren <andlind@gmail.com>
8102
8103 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
8104 (ns_constrain_all_frames, x_set_offset): Remove assignment to
8105 dont_constrain.
8106 (updateFrameSize:, windowWillResize:toSize:): Add trace.
8107 (constrainFrameRect): Remove special case nr_screens == 1.
8108 Don't constrain size to size of view.
8109
8110 * nsterm.h (ns_output): Remove dont_constrain.
8111
8112 2013-12-19 Anders Lindgren <andlind@gmail.com>
8113
8114 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
8115
8116 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
8117
8118 Minor fixes for recent openp changes.
8119 * lisp.h (GCPRO7): New macro.
8120 * lread.c (openp): Use bool for boolean; all callers changed.
8121 Protect save_string from GC. Don't assume that file descriptors
8122 are nonzero. Redo save_mtime comparison to avoid bogus GCC
8123 warning about uninitialized variable.
8124
8125 2013-12-18 Eli Zaretskii <eliz@gnu.org>
8126
8127 * w32fns.c (emacs_abort): Use intptr_t as argument of
8128 INT_BUFSIZE_BOUND, to avoid compiler warnings.
8129
8130 2013-12-18 Glenn Morris <rgm@gnu.org>
8131
8132 * lread.c (Fload): Pass load_prefer_newer to openp.
8133 Don't bother checking mtime if openp already did it.
8134 (openp): Add `newer' argument, to check all suffixes
8135 and find the newest file.
8136 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
8137 * callproc.c (call_process):
8138 * charset.c (load_charset_map_from_file):
8139 * emacs.c (init_cmdargs):
8140 * image.c (x_create_bitmap_from_file, x_find_image_file):
8141 * lisp.h (openp):
8142 * lread.c (Flocate_file_internal):
8143 * process.c (Fformat_network_address):
8144 * sound.c (Fplay_sound_internal):
8145 * w32.c (check_windows_init_file):
8146 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
8147
8148 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
8149
8150 2013-12-17 Eli Zaretskii <eliz@gnu.org>
8151
8152 * w32.c (getloadavg): Don't index samples[] array with negative
8153 indices. Recover from wall-clock time being set backwards.
8154
8155 * w32term.c (w32_initialize): Declare the argument of
8156 set_user_model as const.
8157
8158 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
8159 (w32_menu_show): Constify some arguments passed to MessageBox.
8160
8161 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
8162 to initialize Lisp objects.
8163
8164 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
8165 initialize Lisp objects.
8166
8167 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
8168 use variables used only on X under that condition.
8169
8170 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
8171 variables not used there.
8172
8173 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8174
8175 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
8176 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
8177
8178 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8179
8180 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
8181 code, revealed in presence of R2L characters, character
8182 compositions, and display vectors. A better fix for Bug#16148.
8183 (extend_face_to_end_of_line): Don't reference tool_bar_window in
8184 GTK and NS builds, they don't have this member of struct frame.
8185
8186 * dispextern.h (struct composition_it): Correct a comment for the
8187 'width' member.
8188
8189 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
8190
8191 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
8192 This prevents a compilation error on C compilers that do not
8193 default functions to return 'int' if not declared. Also, add
8194 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
8195 since it now uses inline functions.
8196
8197 2013-12-16 Eli Zaretskii <eliz@gnu.org>
8198
8199 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
8200 display margins on mode line, header line, and in the frame's
8201 tool-bar window. (Bug#16165)
8202
8203 2013-12-16 Andreas Schwab <schwab@suse.de>
8204
8205 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
8206
8207 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
8208
8209 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
8210 `CHECK_LIST_CONS'.
8211
8212 2013-12-16 Martin Rudalics <rudalics@gmx.at>
8213
8214 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
8215
8216 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
8217
8218 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
8219 intended to find bogus pointers in font objects (Bug#16140).
8220 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
8221 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
8222 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
8223 Disable for MS-Windows due to Bug#15876; apparently this
8224 requires more or less substantial changes in fontset code.
8225 * xfont.c (xfont_close):
8226 * xftfont.c (xftfont_close): Call x_display_info_for_display
8227 to check whether 'Display *' is valid (Bug#16093 and probably
8228 Bug#16069).
8229
8230 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8231
8232 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
8233 Reported by Juanma Barranquero <lekktu@gmail.com>.
8234
8235 * process.c (Fprocess_send_eof): Don't crash if someone tries to
8236 open a pty on MS-Windows. (Bug#16152)
8237
8238 * emacs.c (decode_env_path): Fix bogus comparison against
8239 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
8240
8241 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
8242
8243 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
8244 (Fx_file_dialog): Add parentheses around && to silence warning.
8245
8246 * w32term.c (construct_drag_n_drop): Remove unused local variable.
8247
8248 2013-12-15 Eli Zaretskii <eliz@gnu.org>
8249
8250 * xdisp.c (extend_face_to_end_of_line): Extend background of
8251 non-default face in margin areas as well. (Bug#16151)
8252 (display_line): Call extend_face_to_end_of_line for continued
8253 lines as well, if the display margins have non-zero width.
8254 (set_glyph_string_background_width): When needed, set the
8255 extends_to_end_of_line_p flag on glyph strings to be drawn in
8256 margin areas, not only in the text area.
8257
8258 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
8259 startup.
8260
8261 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
8262
8263 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
8264 Don't worry about verify_error being t, since it has to be a list.
8265
8266 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
8267
8268 Use bool for boolean, focusing on headers.
8269 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
8270 No need to include <stdbool.h>, since conf_post.h does it now.
8271 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
8272 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
8273 (SET_PER_BUFFER_VALUE_P):
8274 * ccl.c, ccl.h (setup_ccl_program):
8275 * ccl.h (CHECK_CCL_PROGRAM):
8276 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
8277 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
8278 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
8279 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
8280 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
8281 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
8282 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
8283 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
8284 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
8285 (CHARSET_FAST_MAP_SET):
8286 * coding.c (decode_coding_ccl, encode_coding_ccl):
8287 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
8288 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
8289 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
8290 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
8291 (decode_coding_c_string):
8292 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
8293 * conf_post.h (has_attribute):
8294 * dispextern.h (trace_redisplay_p)
8295 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
8296 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
8297 (SET_GLYPH_FROM_CHAR_GLYPH)
8298 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
8299 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
8300 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
8301 (cursor_in_mouse_face_p):
8302 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
8303 (blank_row, prepare_desired_row)
8304 (build_frame_matrix_from_leaf_window, make_current)
8305 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
8306 (update_window, scrolling_window, update_frame_line):
8307 * disptab.h (GLYPH_FOLLOW_ALIASES):
8308 * editfns.c (Fformat):
8309 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
8310 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
8311 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
8312 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
8313 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
8314 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
8315 (FONT_DEFERRED_LOG):
8316 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
8317 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
8318 (FRAME_MOUSE_UPDATE):
8319 * fringe.c (Fdefine_fringe_bitmap):
8320 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
8321 (x_create_bitmap_from_xpm_data, xpm_load_image):
8322 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
8323 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
8324 (MERGE_INTERVAL_CACHE):
8325 * keymap.h (KEYMAPP):
8326 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
8327 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
8328 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
8329 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
8330 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
8331 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
8332 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
8333 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
8334 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
8335 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
8336 (SETUP_BUFFER_SYNTAX_TABLE):
8337 * systime.h (timespec_valid_p):
8338 * term.c (save_and_enable_current_matrix):
8339 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
8340 * xdisp.c (in_display_vector_p, display_tool_bar_line)
8341 (redisplay_internal, try_window_reusing_current_matrix)
8342 (sync_frame_with_window_matrix_rows, try_window_id)
8343 (display_menu_bar, display_tty_menu_item, display_mode_line)
8344 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
8345 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
8346 * xmenu.c (xmenu_show):
8347 * xterm.c (use_xim, x_term_init):
8348 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
8349 (struct x_bitmap_record):
8350 Use bool for booleans.
8351 * ccl.c (struct buffer_text):
8352 * ccl.h (struct ccl_program):
8353 * charset.h (struct charset):
8354 * cm.h (struct cm):
8355 * coding.h (struct iso_2022_spec, struct coding_system):
8356 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
8357 (struct glyph_string, struct face, struct face_cache)
8358 (struct bidi_string_data, struct bidi_it)
8359 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
8360 (struct image):
8361 * editfns.c (Fformat):
8362 * frame.h (struct frame):
8363 * fringe.c (struct fringe_bitmap):
8364 * intervals.h (struct interval):
8365 * keyboard.h (struct kboard):
8366 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
8367 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
8368 (struct Lisp_Buffer_Local_Value, union specbinding):
8369 * macfont.m (struct macfont_info):
8370 * process.h (struct Lisp_Process):
8371 * termchar.h (struct tty_display_info):
8372 * window.h (struct window):
8373 * xterm.h (struct x_output):
8374 Use bool_bf for boolean bit-fields.
8375 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
8376 All callers changed.
8377 * ccl.h (struct ccl_program): Remove unused members private_state,
8378 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
8379 eight_bit_control.
8380 (struct ccl_spec): Remove unused members cr_carryover,
8381 eight_bit_carryover.
8382 * conf_post.h: Include <stdbool.h>.
8383 (bool_bf): New type.
8384 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
8385 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
8386 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
8387 'do { ... } while (false)' brackets.
8388 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
8389 Args must now be expressions; all callers changed.
8390 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
8391 (PRODUCE_GLYPHS): Simplify use of boolean.
8392 * fileio.c (Fcopy_file):
8393 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
8394 * lisp.h (UNGCPRO): Return void, not int.
8395 (FOR_EACH_TAIL): Use void expression, not int expression.
8396 * region-cache.c: Reindent.
8397 * region-cache.h: Copy comments from region-cache.c, to fix
8398 incorrect remarks about booleans.
8399
8400 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8401
8402 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
8403 when character at point is displayed from a display vector.
8404 (Bug#16148)
8405
8406 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
8407
8408 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
8409 now a list of certificate validation checks that will abort a
8410 connection with an error.
8411 (Fgnutls_boot): Document it and use it.
8412
8413 2013-12-14 Martin Rudalics <rudalics@gmx.at>
8414
8415 * w32term.c (w32_enable_frame_resize_hack): New variable.
8416 (x_set_window_size): Use it to hack frame resizing on Windows
8417 (Bug#16028).
8418
8419 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8420
8421 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
8422 Windows-specific code to w32.c. Change error message text to
8423 match that of Posix platforms.
8424
8425 * w32.c (w32_copy_file): New function, most of the code copied and
8426 reworked from Fcopy_file. Improve error handling. Plug memory
8427 leak when errors are thrown. Support file names outside of the
8428 current codepage. (Bug#7100)
8429
8430 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8431
8432 * lread.c (load_path_default): Prototype.
8433
8434 2013-12-13 Glenn Morris <rgm@gnu.org>
8435
8436 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
8437 (dump_path): Remove.
8438 (load-path-default): Remove `changed' argument.
8439 Do not set dump_path permanently. Simplify.
8440 (init_lread): Simplify.
8441 (syms_of_lread): Remove dump_path.
8442
8443 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8444
8445 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
8446 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
8447 2013-12-12 font-related change to avoid Bug#16128, which
8448 is quite hard to fix without even more substantial changes.
8449
8450 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8451
8452 * font.c (font_close_object): Check for live frame (Bug#16128).
8453
8454 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8455
8456 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
8457 Return ptrdiff_t, not int, since it's a buffer size.
8458 Reindent/reparen some macros to a more Gnuish style.
8459
8460 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
8461
8462 Avoid undefined behavior with huge regexp interval counts.
8463 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
8464 since it's now specialized to interval counts. All uses changed.
8465 Do not assume wraparound on signed integer overflow.
8466 (regex_compile): Simplify based on the above changes.
8467
8468 2013-12-12 Eli Zaretskii <eliz@gnu.org>
8469
8470 Support file names on MS-Windows that use characters outside of
8471 the current system codepage. (Bug#7100)
8472
8473 * w32.c (get_file_security, set_file_security)
8474 (create_symbolic_link): Separate pointers and boolean flags for
8475 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
8476 non-zero, else the former.
8477 (codepage_for_filenames, filename_to_utf16, )
8478 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
8479 New functions.
8480 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
8481 characters.
8482 (normalize_filename): Lose the DBCS code, now works on UTF-8.
8483 Accept only one argument; all callers changed.
8484 (dostounix_filename): Remove the second argument, now works in
8485 UTF-8. All callers changed.
8486 (parse_root): Lose DBCS code.
8487 (get_long_basename, w32_get_short_filename, init_environment)
8488 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
8489 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
8490 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
8491 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
8492 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
8493 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
8494 otherwise.
8495 (ansi_encode_filename): New function.
8496 (get_emacs_configuration, get_emacs_configuration_options):
8497 Functions deleted.
8498 (add_volume_info, GetCachedVolumeInformation): Run the input file
8499 name through unixtodos_filename, to ensure it is stored and
8500 referenced in canonical form.
8501 (get_volume_info): Lose the DBCS code, now works in UTF-8.
8502 (logon_network_drive, sys_link, utime): Improve error handling.
8503 (sys_access): New function.
8504 (hashval, generate_inode_val): Unused functions deleted.
8505 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
8506 (check_windows_init_file): Convert error message from UTF-8 to
8507 ANSI codepage, for display in the message box.
8508 (globals_of_w32): Set w32_unicode_filenames according to the OS
8509 version.
8510
8511 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
8512 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8513 (syms_of_w32term): Declare w32-unicode-filenames.
8514
8515 * w32proc.c (new_child, delete_child): Remove code that handled
8516 unused pending_deletion and input_file members of the child struct.
8517 (create_child, sys_spawnve): Convert all file names to ANSI
8518 codepage. Use ANSI APIs explicitly; forcibly fail if any file
8519 name cannot be encoded in ANSI codepage. Don't use
8520 unixtodos_filename, mirror slashes by hand.
8521 (record_infile, record_pending_deletion): Functions deleted.
8522 (Fw32_short_file_name): Call w32_get_short_filename instead of
8523 GetShortPathName.
8524
8525 * w32notify.c (add_watch): Work in Unicode mode when
8526 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8527 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
8528 instead, do the same with Lisp primitives.
8529
8530 * w32fns.c (file_dialog_callback, Fx_file_dialog)
8531 (Fsystem_move_file_to_trash, Fw32_shell_execute)
8532 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
8533 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
8534 (Fw32_shell_execute): Improve error reporting.
8535 (Fdefault_printer_name): Ifdef away for Cygwin.
8536
8537 * w32.h (struct _child_process): Remove input_file and
8538 pending_deletion members that are no longer used.
8539 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
8540 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
8541 (ansi_encode_filename): New and updated prototypes.
8542
8543 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
8544 APIs explicitly.
8545 (unexec): Don't use dostounix_filename, it expects a file name in
8546 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
8547 ANSI encoding.
8548
8549 * fileio.c (Ffile_name_directory, file_name_as_directory)
8550 (directory_file_name, Fexpand_file_name)
8551 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
8552 arguments of dostounix_filename.
8553 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
8554 use MAX_UTF8_PATH for size of file-name strings.
8555 (emacs_readlinkat): Build an explicitly unibyte string for file
8556 names.
8557 (syms_of_fileio) <file-name-coding-system>:
8558 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
8559
8560 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
8561 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
8562 directories to UTF-8.
8563 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
8564 environment, and each element of the input PATH, to UTF-8.
8565
8566 * dired.c (file_attributes): Use build_unibyte_string explicitly
8567 to make Lisp strings from user and group names.
8568
8569 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
8570 decode_file.
8571
8572 * coding.c (decode_file_name, encode_file_name): New functions.
8573
8574 * termcap.c (tgetent): Adapt to the change in arguments of
8575 dostounix_filename.
8576
8577 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
8578 names.
8579
8580 * msdos.c (dostounix_filename, init_environment): Adapt to the
8581 change in arguments of dostounix_filename.
8582
8583 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
8584 [WINDOWSNT]: Encode file names passed to the image libraries in
8585 ANSI codepage.
8586
8587 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
8588 [WINDOWSNT]: Convert file names to the current ANSI codepage.
8589
8590 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
8591 arguments of dostounix_filename.
8592
8593 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8594
8595 * font.h (struct font_entity) [HAVE_NS]: New field to record
8596 font driver which was used to create this entity.
8597 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
8598 frame where the font was opened.
8599 (font_close_object): Add prototype.
8600 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
8601 (font_close_object): Not static any more. Lost frame arg.
8602 Adjust comment and users.
8603 * alloc.c (cleanup_vector): Call font_close_object to adjust
8604 per-frame font counters correctly. If HAVE_NS, also call
8605 driver-specific cleanup for font-entity objects.
8606 * ftfont.c (ftfont_open):
8607 * nsfont.m (nsfont_open):
8608 * w32font.c (w32font_open_internal):
8609 * xfont.c (xfont_open):
8610 * xftfont.c (xftfont_open): Save frame pointer in font object.
8611 * macfont.m (macfont_open): Likewise.
8612 (macfont_descriptor_entity): Save driver pointer to be able
8613 to call its free_entity routine when font-entity is swept.
8614 * ftxfont.c (ftxfont_open): Add eassert because frame
8615 pointer should be saved by ftfont_driver.open.
8616
8617 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8618
8619 * xterm.c (x_make_frame_visible): Restore hack which is needed when
8620 input polling is used. This is still meaningful for Cygwin, see
8621 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
8622 * keyboard.c (poll_for_input_1, input_polling_used):
8623 Define unconditionally.
8624 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
8625 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
8626 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
8627 (font_for_char): Prefer ptrdiff_t to int for buffer position.
8628 (face_for_char): Likewise. Rearrange eassert and return ASCII
8629 face for CHAR_BYTE8_P.
8630 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
8631
8632 2013-12-11 Ken Brown <kbrown@cornell.edu>
8633
8634 * dispextern.h (erase_phys_cursor):
8635 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
8636
8637 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
8638
8639 * nsterm.m (x_free_frame_resources):
8640 * term.c (tty_free_frame_resources):
8641 * xterm.c (x_free_frame_resources): Do not check for non-NULL
8642 face cache because it's implied by free_frame_faces anyway.
8643 * w32term.c (x_free_frame_resources): Likewise. Do not call
8644 free_frame_faces twice.
8645
8646 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
8647
8648 * editfns.c (Fformat_time_string): Mention %F in the doc.
8649
8650 2013-12-11 Martin Rudalics <rudalics@gmx.at>
8651
8652 * window.c (resize_frame_windows): Don't return immediately when
8653 the root window's size doesn't change - the minibuffer window
8654 may still have to be repositioned/resized.
8655 * xfns.c (Fx_create_frame): Always change the frame size after
8656 initializing the frame's faces.
8657 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
8658 change_frame_size should already have done it.
8659 (x_new_font): Assign new tool- and menu-bar heights.
8660 (x_set_window_size_1): Account for tool- and menu-bar heights
8661 (Bug#16013). Don't set pixel sizes since change_frame_size
8662 should already have done it.
8663
8664 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
8665
8666 Remove the option of using libcrypto.
8667 * Makefile.in (LIB_CRYPTO): Remove.
8668 (LIBES): Don't use it.
8669
8670 2013-12-11 Juri Linkov <juri@jurta.org>
8671
8672 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
8673 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
8674
8675 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
8676
8677 * xdisp.c (display_tool_bar_line): Don't extend on a previously
8678 drawn tool bar items (Bug#16058).
8679 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
8680
8681 2013-12-09 Ken Brown <kbrown@cornell.edu>
8682
8683 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
8684
8685 * lisp.h (get_frame_param): Adjust conditions for prototype
8686 declaration.
8687
8688 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
8689
8690 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
8691 Avoid unused macro warning if configured --without-xft.
8692
8693 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
8694
8695 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
8696
8697 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
8698
8699 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
8700
8701 * emacs.c (main): Call fixup_locale a second time for GNUstep.
8702
8703 2013-12-08 Martin Rudalics <rudalics@gmx.at>
8704
8705 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
8706
8707 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
8708
8709 Use libcrypto's checksum implementations if available, for speed.
8710 * Makefile.in (LIB_CRYPTO): New macro.
8711 (LIBES): Use it.
8712
8713 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
8714 The macro didn't conform to C99 due to type mismatch,
8715 which caused compilation failure with Sun C 5.12,
8716 and it was confusing anyway. Include window.h to declare
8717 redisplay_other_windows.
8718
8719 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
8720
8721 * window.c (set_window_buffer): Update mode line (bug#16084).
8722
8723 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
8724
8725 Fix minor problems found by static checking.
8726 * keyboard.c (poll_for_input_1, input_polling_used):
8727 Define only if HAVE_NTGUI.
8728 * xmenu.c (popup_activate_callback): Omit unnecessary
8729 check against USE_X_TOOLKIT, which must be defined here anyway.
8730 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
8731 Now static.
8732
8733 2013-12-07 Martin Rudalics <rudalics@gmx.at>
8734
8735 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
8736
8737 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
8738
8739 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
8740
8741 * nsterm.m (x_set_window_size): Remove fprintf.
8742 (init): Define always. Set applicationDidFinishLaunchingCalled
8743 for GNUstep.
8744 (applicationDidFinishLaunching:):
8745 Set applicationDidFinishLaunchingCalled.
8746 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
8747 not called.
8748
8749 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
8750
8751 Pixel resize changes for NS (Bug#16049).
8752 * nsterm.m (x_set_window_size): Change parameters rows/cols to
8753 height/width. row/cols are locals.
8754 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
8755 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
8756 (windowWillResize): Remove gsextra. Calculate extra as in
8757 updateFrameSize.
8758 (x_new_font): Don't change frame size if fullscreen.
8759 Change size pixelwise.
8760
8761 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
8762 comment in xfns.c. Change to pixelwise call.
8763
8764 2013-12-06 Eli Zaretskii <eliz@gnu.org>
8765
8766 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
8767 (Bug#16070)
8768
8769 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
8770
8771 * xterm.c (input_signal_count): Remove.
8772 (x_dispatch_event): Define unconditionally.
8773 (x_make_frame_visible): Process X events until the frame
8774 is really visible (Bug#16027).
8775 * xterm.h (x_dispatch_event): Declare unconditionally.
8776
8777 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
8778
8779 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
8780
8781 * nsterm.m (x_set_window_size): Handle pixelwise.
8782
8783 2013-12-05 Martin Rudalics <rudalics@gmx.at>
8784
8785 * w32term.c (x_new_font):
8786 * xterm.c (x_new_font): Calculate new frame size from new font
8787 size (Bug#16028).
8788
8789 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8790
8791 * lisp.h (FOR_EACH_TAIL): New macro.
8792 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
8793
8794 * window.c (select_window): Call second wset_redisplay before we change
8795 selected_window (bug#16034).
8796
8797 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
8798
8799 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
8800
8801 2013-12-04 Eli Zaretskii <eliz@gnu.org>
8802
8803 * w32xfns.c: Include window.h, to avoid a compiler warning.
8804
8805 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8806
8807 * window.c (window_scroll): Mark window for redisplay (bug#16034).
8808 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
8809 window_scroll takes care of it.
8810 (Fset_window_point, Fdelete_other_windows_internal)
8811 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
8812 (Fsplit_window_internal, Fdelete_window_internal)
8813 (Fresize_mini_window_internal, Fset_window_configuration)
8814 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
8815 cause redisplay instead of forcing a complete redisplay.
8816 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
8817 we're only affecting the selected_window.
8818
8819 2013-12-04 Eli Zaretskii <eliz@gnu.org>
8820
8821 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
8822 directional control characters. Update type and category
8823 determination according to the UBA from Unicode v6.3.
8824 (bidi_category_t): New category EXPLICIT_FORMATTING.
8825
8826 * dispextern.h (bidi_type_t): Update to include new bidirectional
8827 properties introduced with Unicode v6.3. (Bug#16043)
8828
8829 2013-12-04 Martin Rudalics <rudalics@gmx.at>
8830
8831 * xterm.c (XTflash): Fix coordinate of bottom area to flash
8832 (Bug#16044).
8833
8834 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
8835
8836 * font.c (font_list_entities): Remove dummy assignment.
8837 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
8838 used on graphic displays only. Remove unused 'font_encoder' member.
8839 (struct font_bitmap): Remove unused 'extra' member.
8840 * nsfont.m (nsfont_open):
8841 * w32font.c (w32font_open_internal):
8842 * ftfont.c (ftfont_get_bitmap): Adjust users.
8843
8844 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
8845
8846 Use bool for boolean.
8847 * tparam.c (tparam1):
8848 * undo.c (record_point, record_property_change):
8849 Use bool for boolean, for local vars that are always true or false.
8850
8851 Minor integer overflow fixes (Bug#16033).
8852 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
8853 This improves on the previous fix to this function.
8854 (window_resize_check): When summing up pixel counts, don't rely on
8855 undefined behavior if the sum overflows.
8856
8857 2013-12-03 Martin Rudalics <rudalics@gmx.at>
8858
8859 * window.c (Fset_window_new_pixel): Don't choke at negative
8860 argument value (Bug#16033).
8861
8862 * xfns.c (Fx_create_frame): Add another call to change_frame_size
8863 to avoid crash in window_box_height.
8864
8865 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
8866 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
8867 calculation.
8868 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
8869
8870 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
8871
8872 Minor integer overflow fixes.
8873 * window.c (Fset_window_new_pixel, grow_mini_window):
8874 * xdisp.c (Fwindow_text_pixel_size):
8875 Avoid undefined behavior on signed integer overflow.
8876 * xfns.c (x_set_mouse_color):
8877 Check that drag shape fits in 'unsigned', since that's what X wants.
8878
8879 2013-12-02 Eli Zaretskii <eliz@gnu.org>
8880
8881 Improve reporting of fatal exception on MS-Windows.
8882 * w32fns.c (my_exception_handler): New function.
8883 (globals_of_w32fns): Set it up as the unhandled exception
8884 handler. Initialize exception code and address to zeros.
8885 (emacs_abort): If the exception code and address are available,
8886 print them at the beginning of the backtrace. Fix the format of
8887 printing addresses (was producing 0x0x12345678 on XP).
8888 (Bug#15994)
8889
8890 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
8891
8892 * eval.c (Fbacktrace__locals): New function.
8893 (syms_of_eval): Defsubr it.
8894
8895 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
8896
8897 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
8898 Define here to unify between...
8899 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
8900 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
8901
8902 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8903
8904 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
8905
8906 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
8907 fringe background extension.
8908 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
8909 because they are now always the same as `left' and `width',
8910 respectively. Remove code for the case that `width' and
8911 `sb_width' are different.
8912
8913 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
8914
8915 Fix minor problems found by static checking.
8916 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
8917 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
8918 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
8919
8920 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
8921
8922 * image.c (imagemagick_compute_animated_image): Don't crash if we
8923 have an animation with different-sized images (bug#15313).
8924
8925 2013-11-30 Martin Rudalics <rudalics@gmx.at>
8926
8927 Remove some unused items introduced during pixelwise change.
8928 * window.c (window_resize_total_check): Remove unused function.
8929 * xdisp.c (remember_mouse_glyph): Remove unused label.
8930 (Ftool_bar_height): Move declaration inside #if.
8931 * xterm.c (x_set_window_size): Don't use r and c.
8932
8933 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
8934
8935 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
8936 `value' and `endp'.
8937
8938 * window.c (Fset_window_configuration): Comment out unused variables.
8939
8940 * w32term.c (w32_read_socket): Remove unused variable `buf'.
8941
8942 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
8943
8944 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
8945
8946 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
8947
8948 * gnutls.c (gnutls_audit_log_function): Only declare and define if
8949 HAVE_GNUTLS3 (Bug#16001).
8950
8951 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
8952 if interrupts are deferred (Bug#15801).
8953
8954 2013-11-30 Martin Rudalics <rudalics@gmx.at>
8955
8956 Support resizing frames and windows pixelwise.
8957 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
8958 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
8959 (struct glyph_matrix): Replace window_left_col and
8960 window_top_line by window_pixel_left and window_pixel_top.
8961 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
8962 Minor rewrite.
8963 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
8964 (draw_window_divider, move_it_to, x_draw_right_divider)
8965 (x_draw_bottom_divider, change_frame_size): Add or fix
8966 declarations.
8967 * dispnew.c (change_frame_size_1): Change prototype.
8968 (adjust_glyph_matrix, required_matrix_width)
8969 (adjust_frame_glyphs_for_window_redisplay): Use pixel
8970 values instead of lines and columns.
8971 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
8972 WINDOW_TOTAL_FRINGE_WIDTH.
8973 (handle_window_change_signal, do_pending_window_change)
8974 (init_display): Adjusts calls of change_frame_size.
8975 (change_frame_size, change_frame_size_1): Handle pixelwise
8976 changes.
8977 * frame.c (Qright_divider_width, Qbottom_divider_width):
8978 New Lisp objects.
8979 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
8980 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
8981 (x_set_internal_border_width, x_set_vertical_scroll_bars)
8982 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
8983 values.
8984 (set_frame_param): New function.
8985 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
8986 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
8987 (Ffringe_width, Fborder_width, Fright_divider_width)
8988 (Fbottom_divider_width): New functions, defsubr them.
8989 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
8990 New argument pixelwise.
8991 (struct frame_parm_table): New members Qright_divider_width and
8992 Qbottom_divider_width.
8993 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
8994 (x_report_frame_params): Handle Qright_divider_width and
8995 Qbottom_divider_width.
8996 (x_set_right_divider_width, x_set_bottom_divider_width):
8997 New functions.
8998 (frame_resize_pixelwise): New option.
8999 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
9000 new_pixelwise, right_divider_width and bottom_divider_width;
9001 remove total_lines; rename text_lines, text_cols, new_text_lines
9002 and new_text_cols to text_height, text_width, new_height and
9003 new_width respectively.
9004 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
9005 FRAME_TEXT_WIDTH respectively.
9006 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
9007 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
9008 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
9009 New macros.
9010 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
9011 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
9012 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
9013 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
9014 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
9015 (FRAME_TOTAL_COLS_ARG): Remove macro.
9016 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
9017 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
9018 (x_wm_set_size_hint): Handle frame pixel sizes.
9019 * indent.c (compute_motion, Fcompute_motion):
9020 Call window_body_width instead of window_body_cols.
9021 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
9022 (make_lispy_position): Handle right and bottom dividers.
9023 (Fsuspend_emacs): Pixelize call of change_frame_size.
9024 * keyboard.h: Extern Qright_divider, Qbottom_divider.
9025 * lisp.h: Extern set_frame_param.
9026 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
9027 x_set_window_size.
9028 (Fx_create_frame): Add entry for vertical_drag_cursor.
9029 Pixelize call of change_frame_size.
9030 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
9031 * nsterm.m (ns_update_window_end): Optionally draw right
9032 divider.
9033 (x_set_window_size): Add argument pixelwise.
9034 Call check_frame_size and change_frame_size with pixelwise zero.
9035 (ns_draw_window_divider): New function.
9036 (ns_redisplay_interface): Add ns_draw_window_divider.
9037 (updateFrameSize:): Call change_frame_size with pixelwise zero.
9038 (x_new_font): Call x_set_window_size with pixelwise zero.
9039 * print.c (print_object): For a window print its sequence
9040 number again.
9041 * term.c (Fresume_tty): Pixelize call of change_frame_size.
9042 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
9043 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9044 (w32_createwindow): Use scroll bar area width.
9045 (w32_wnd_proc): Handle bottom divider width.
9046 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
9047 (Fx_create_frame): Default divider width parameters.
9048 Caclulate sizes pixelwise. Add vertical drag cursor support.
9049 (x_create_tip_frame): Default divider widths to zero.
9050 Pixelize call to change_frame_size.
9051 (Fx_show_tip): Add handling of divider widths. Pixelize window
9052 position and sizes.
9053 (Fw32_frame_rect): New function.
9054 (frame_parm_handler w32_frame_parm_handlers): Add divider
9055 widths.
9056 (Vx_window_vertical_drag_shape): Add variable.
9057 * w32inevt.c (resize_event, maybe_generate_resize_event):
9058 Pixelize change_frame_size calls.
9059 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
9060 call.
9061 * w32term.c (w32_draw_window_divider): New function.
9062 (x_update_window_end): Handle right divider.
9063 (w32_draw_fringe_bitmap, x_scroll_run)
9064 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
9065 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
9066 Calculate new frame sizes pixelwise.
9067 (x_new_font): Pixelize call to x_set_window_size.
9068 (x_check_fullscreen): Pixelize call to change_frame_size.
9069 (x_set_window_size_1, x_set_window_size): New argument
9070 pixelwise. Calculate pixelwise.
9071 (x_wm_set_size_hint): Use scroll bar area width.
9072 (w32_redisplay_interface): Add w32_draw_window_divider.
9073 * w32term.h (struct w32_output): Add vertical drag cursor.
9074 * widget.c (set_frame_size, update_wm_hints)
9075 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
9076 change_frame_size.
9077 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
9078 * window.c (sequence_number): Restore.
9079 (Fwindow_pixel_width, Fwindow_pixel_height)
9080 (Fwindow_mode_line_height, Fwindow_header_line_height)
9081 (window_pixel_to_total, Frun_window_scroll_functions)
9082 (Fset_window_new_pixel, window_resize_apply_total)
9083 (Fwindow_resize_apply_total): New functions.
9084 (window_body_height, window_body_width): Rename from
9085 window_body_lines. New argument PIXELWISE.
9086 Calculate pixelwise.
9087 (Fwindow_body_height, Fwindow_body_width): New argument
9088 PIXELWISE.
9089 (coordinates_in_window, window_relative_x_coord): Use window's
9090 pixel width instead of total width.
9091 (replace_window, recombine_windows): Initialize pixel values.
9092 (resize_root_window, resize_frame_windows, grow_mini_window)
9093 (shrink_mini_window): New argument PIXELWISE.
9094 Calculate pixelwise.
9095 (Fdelete_other_windows_internal, adjust_window_margins)
9096 (window_resize_check, window_resize_apply)
9097 (Fdelete_window_internal, Fresize_mini_window_internal)
9098 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
9099 (check_frame_size): Rename arguments. New argument PIXELWISE.
9100 Calculate pixelwise.
9101 (set_window_buffer): Make samebuf bool. Run configuration change
9102 hook only if buffer changed.
9103 (Fset_window_buffer): Rewrite doc-string.
9104 (make_window): Initialize new_pixel slot.
9105 (Fwindow_resize_apply): Check pixel size of root window.
9106 (Fsplit_window_internal): Call 2nd argument pixel_size.
9107 Calculate pixelwise.
9108 (Fscroll_left, Fscroll_right): Call window_body_width instead of
9109 window_body_cols.
9110 (save_window_data): New slots frame_text_width,
9111 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
9112 (saved_window): New slots pixel_left, pixel_top, pixel_height,
9113 pixel_width.
9114 (Fcurrent_window_configuration, Fset_window_configuration)
9115 (save_window_save, compare_window_configurations): Handle new
9116 slots in save_window_data and saved_window.
9117 (Fset_window_scroll_bars): Fix doc-string.
9118 (window_resize_pixelwise): New variable.
9119 (coordinates_in_window, Fcoordinates_in_window_p):
9120 Handle dividers.
9121 (make_parent_window): Adjust sequence_number.
9122 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
9123 New functions.
9124 * window.h (struct window): New members new_pixel, pixel_left,
9125 pixel_top, pixel_width, pixel_height. Restore sequence_number.
9126 (wset_new_pixel): New function.
9127 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
9128 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
9129 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
9130 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
9131 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
9132 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
9133 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
9134 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
9135 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
9136 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
9137 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
9138 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
9139 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
9140 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
9141 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
9142 Rewrite.
9143 (resize_frame_windows, grow_mini_window, shrink_mini_window)
9144 (window_body_width, check_frame_size): Adapt external declarations.
9145 * xdisp.c (last_max_ascent): New integer.
9146 (window_text_bottom_y): Handle bottom divider.
9147 (window_box_width, window_box_height): Calculate pixelwise.
9148 (get_glyph_string_clip_rects): Handle right divider.
9149 (remember_mouse_glyph): When windows are resized pixelwise
9150 proceed with width and height set to 1.
9151 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
9152 WINDOW_TOTAL_WIDTH.
9153 (move_it_to): Calculate and return maximum x position
9154 encountered.
9155 (Fwindow_text_pixel_size): New function.
9156 (resize_mini_window, update_tool_bar): Calculate pixelwise.
9157 (tool_bar_lines_needed): Rename to tool_bar_height.
9158 Calculate pixelwise.
9159 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
9160 Calculate pixelwise.
9161 (redisplay_tool_bar): Calculate pixelwise.
9162 (redisplay_window): Calculate pixelwise. Handle dividers.
9163 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
9164 (x_draw_vertical_border): Handle dividers.
9165 (define_frame_cursor1): Handle vertical drag cursor.
9166 (x_draw_right_divider, x_draw_bottom_divider): New functions.
9167 (expose_window): Calculate pixelwise. Handle dividers.
9168 (init_xdisp): Initialize pixel values.
9169 * xfaces.c (Qwindow_divider): New face.
9170 (realize_basic_faces): Realize it.
9171 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
9172 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
9173 (x_set_scroll_bar_default_width): Default actual width to 16.
9174 (Fx_create_frame): Set sizes pixelwise.
9175 (x_create_tip_frame): Default divider widths to zero.
9176 Pixelize call of change_frame_size.
9177 (Fx_show_tip): Handle divider widths. Initial pixel position
9178 and sizes.
9179 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
9180 (Vx_window_vertical_drag_shape): New option.
9181 * xmenu.c (free_frame_menubar): Pixelize call of
9182 x_set_window_size.
9183 * xterm.c (x_draw_window_divider): New function.
9184 (x_update_window_end): Optionally draw right divider.
9185 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
9186 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
9187 (handle_one_xevent, x_new_font): Calculate pixelwise.
9188 (x_set_window_size_1, x_set_window_size): New argument
9189 pixelwise. Calculate pixelwise.
9190 (x_wm_set_size_hint): Pixelize call of check_frame_size.
9191 (struct x_redisplay_interface): Add x_draw_window_divider.
9192 * xterm.h (struct x_output): Add vertical_drag_cursor.
9193
9194 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
9195
9196 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
9197 Set invisible frames's `redisplay' when a full redisplay is requested.
9198 (redisplay_window): Set must_be_updated_p instead (bug#15999).
9199 (redisplay_mode_lines): Don't set must_be_updated_p any more.
9200 (display_mode_lines): Set it here instead.
9201
9202 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
9203
9204 * dispextern.h (set_window_update_flags): Remove.
9205
9206 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9207
9208 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
9209
9210 * xdisp.c (REDISPLAY_SOME_P): New macro.
9211 (redisplay_internal): Use it (bug#15999).
9212 (prepare_menu_bars, redisplay_window): Use it as well.
9213
9214 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
9215
9216 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
9217
9218 * w32font.c (g_b_init_get_char_width_32_w): New static var.
9219 (globals_of_w32font): Zero it out.
9220 (GetCharWidth32W_Proc): New function pointer.
9221 (get_char_width_32_w): New function.
9222 (compute_metrics): If get_glyph_outline_w returns an error, try
9223 get_char_width_32_w before declaring a failure. This avoids
9224 punishing raster (a.k.a. "bitmap") fonts by slowing down
9225 redisplay. (Bug#6364).
9226
9227 2013-11-29 Eli Zaretskii <eliz@gnu.org>
9228
9229 * xdisp.c (clear_mouse_face): Don't invalidate the entire
9230 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9231 highlight needs to be redisplayed. (Bug#15913)
9232
9233 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
9234
9235 Fix minor problems found by static checking.
9236 * buffer.h (struct buffer_text, struct buffer):
9237 * frame.h (struct frame):
9238 * window.h (struct window):
9239 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
9240 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
9241 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
9242 no-longer-valid use of HAVE_MENUS.
9243 * xdisp.c (propagate_buffer_redisplay): Now static.
9244
9245 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
9246
9247 * xmenu.c (Fmenu_or_popup_active_p):
9248 * window.c (Fset_window_configuration):
9249 * menu.c (Fx_popup_menu, Fx_popup_dialog):
9250 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
9251 * fns.c (Fyes_or_no_p):
9252 * editfns.c (Fmessage_box, Fmessage_or_box):
9253 * alloc.c (make_save_ptr_ptr):
9254 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
9255
9256 * window.c (Fset_window_configuration): Move select_window later.
9257
9258 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
9259
9260 Refine redisplay optimizations to only redisplay *some* frames/windows
9261 rather than all of them.
9262 * xdisp.c (REDISPLAY_SOME): New constant.
9263 (redisplay_other_windows, wset_redisplay, fset_redisplay)
9264 (bset_redisplay, bset_update_mode_line): New functions.
9265 (message_dolog): Use bset_redisplay.
9266 (clear_garbaged_frames): Use fset_redisplay.
9267 (echo_area_display): Use wset_redisplay.
9268 (buffer_shared_and_changed): Remove.
9269 (prepare_menu_bars): Call Vpre_redisplay_function before updating
9270 frame titles. Compute the actual set of windows redisplayed.
9271 Don't update frame titles and menu bars for frames that don't need to
9272 be redisplayed.
9273 (propagate_buffer_redisplay): New function.
9274 (AINC): New macro.
9275 (redisplay_internal): Use it. Be more selective in the set of windows
9276 we redisplay. Propagate windows_or_buffers_changed to
9277 update_mode_lines a bit later to simplify the code.
9278 (mark_window_display_accurate_1): Reset window and buffer's
9279 `redisplay' flag.
9280 (redisplay_window): Do nothing if neither the window nor the buffer nor
9281 the frame needs redisplay.
9282 * window.h (struct window): Add `redisplay' field.
9283 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
9284 (redisplay_other_windows, window_list): New declarations.
9285 * window.c (select_window, Fset_window_start): Use wset_redisplay.
9286 (window_list): Not static any more.
9287 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
9288 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
9289 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
9290 * frame.c (Fmake_frame_visible): Don't redisplay everything.
9291 * frame.h (struct frame): Add `redisplay' field.
9292 Move `external_menu_bar' bitfield next to other bit-fields.
9293 (SET_FRAME_GARBAGED): Use fset_redisplay.
9294 (SET_FRAME_VISIBLE): Don't garbage the frame;
9295 Use redisplay_other_windows.
9296 * buffer.h (struct buffer): Add `redisplay' field.
9297 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
9298 (modify_overlay): Use bset_redisplay.
9299 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
9300
9301 2013-11-28 Eli Zaretskii <eliz@gnu.org>
9302
9303 Support w32 file notifications in batch mode.
9304 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
9305 invalid (which happens in batch mode). If non-interactive, call
9306 handle_file_notifications to store file notification events in the
9307 input queue. (Bug#15933)
9308
9309 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9310
9311 * w32inevt.c (handle_file_notifications): Now external, not static.
9312
9313 * w32term.h (handle_file_notifications): Provide prototype.
9314
9315 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
9316 init_crit, since init_display, which does that otherwise, is not
9317 called.
9318
9319 2013-11-27 Glenn Morris <rgm@gnu.org>
9320
9321 * Makefile.in ($(lispsource)/international/charprop.el): New.
9322 (emacs$(EXEEXT)): Depend on charprop.el.
9323
9324 2013-11-27 Eli Zaretskii <eliz@gnu.org>
9325
9326 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
9327 deleting portions of the buffer under non-nil REPLACE argument.
9328 (Bug#15973)
9329
9330 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
9331 directory, watch it and not its parent.
9332 (add_watch): Allow empty string in FILE.
9333
9334 2013-11-27 Martin Rudalics <rudalics@gmx.at>
9335
9336 * window.c (Fset_window_start, window_resize_apply)
9337 (window_scroll): Reset window_end_valid (Bug#15957).
9338
9339 2013-11-27 Glenn Morris <rgm@gnu.org>
9340
9341 * Makefile.in (leimdir): Now in lisp source directory.
9342 ($(leimdir)/leim-list.el): Just use ../leim .
9343 * epaths.in (PATH_DUMPLOADSEARCH):
9344 * lread.c (load_path_default):
9345 * nsterm.m (ns_load_path): No more leim directory.
9346
9347 2013-11-26 Andreas Schwab <schwab@suse.de>
9348
9349 * .gdbinit (xgettype): Add cast.
9350
9351 2013-11-26 Glenn Morris <rgm@gnu.org>
9352
9353 Preload leim-list.el.
9354 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
9355 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
9356 is a single directory.
9357
9358 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
9359
9360 bool-vector-subsetp is now the normal direction (Bug#15912).
9361 * data.c (Fbool_vector_subsetp): Test whether the first argument
9362 is a subset of the second one, not the reverse. Add doc string.
9363
9364 Fix minor problems found by static checking.
9365 * lread.c (load_path_default): Now static.
9366 * textprop.c (text_property_stickiness): Be consistent about the
9367 test used when deciding whether to consider the previous character.
9368 This simplifies the code a bit.
9369
9370 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
9371
9372 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
9373
9374 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
9375 (syms_of_frame): Don't defsubr them.
9376
9377 2013-11-25 Glenn Morris <rgm@gnu.org>
9378
9379 * lread.c (load_path_default): Change the sense of the argument.
9380 (init_lread): When EMACSLOADPATH is set, do not ignore changes
9381 from dump_path. When it is not, avoid checking dump_path twice.
9382
9383 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
9384 uninstalled dump_path against installed Vload_path. (Bug#15964)
9385
9386 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
9387
9388 Export get_pos_property to Elisp.
9389 * editfns.c (Fget_pos_property): Rename from get_pos_property.
9390 (syms_of_editfns): Export it to Elisp.
9391
9392 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
9393
9394 2013-11-23 Romain Francoise <romain@orebokech.com>
9395
9396 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
9397 initialization here ...
9398 (syms_of_fileio): ... from here.
9399
9400 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
9401
9402 * lread.c (init_lread): Fix int/Lisp_Object mixup.
9403 Please use --enable-check-lisp-object-type.
9404
9405 2013-11-23 Glenn Morris <rgm@gnu.org>
9406
9407 * process.c (get_process): Explicit error for dead buffers.
9408
9409 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
9410
9411 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
9412
9413 2013-11-23 Glenn Morris <rgm@gnu.org>
9414
9415 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
9416 * lread.c (load_path_check): Take path to check as argument.
9417 (load_path_default): New, split from init_lread.
9418 (init_lread): Move calc of default load-path to load_path_default.
9419 Empty elements in EMACSLOADPATH now stand for the default.
9420 (load-path): Doc fix.
9421 * emacs.c (decode_env_path): Add option to treat empty elements
9422 as nil rather than ".".
9423 * callproc.c (init_callproc_1, init_callproc):
9424 * image.c (Vx_bitmap_file_path):
9425 * lisp.h (decode_env_path):
9426 * lread.c (Vsource_directory):
9427 Update for new argument spec of decode_env_path.
9428
9429 2013-11-22 Eli Zaretskii <eliz@gnu.org>
9430
9431 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
9432 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
9433
9434 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
9435
9436 Fix some dependency problems that cause unnecessary recompiles.
9437 Reported by RMS in
9438 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
9439 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
9440 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
9441 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
9442 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
9443 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
9444 (boostrap-clean): No need to remove stamp-oldxmenu.
9445
9446 Fix recently introduced bool vector overrun.
9447 This was due to an optimization that went awry.
9448 Reported by Glenn Morris in
9449 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
9450 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
9451 for empty vectors, undoing the 2013-11-18 change.
9452 * data.c (bool_vector_binop_driver): Rely on this.
9453 Fix bug that occasionally overran the destination.
9454 * lisp.h (struct Lisp_Bool_vector): Document this.
9455
9456 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
9457
9458 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
9459 to handle dialogs.
9460
9461 * nsterm.m (init, run, stop:): Comment out for now, does not work
9462 with dialogs.
9463
9464 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
9465
9466 * charset.c (syms_of_charset): Don't read past end of string.
9467
9468 2013-11-19 Glenn Morris <rgm@gnu.org>
9469
9470 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
9471
9472 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
9473
9474 Add hooks to run on gaining/losing focus. (Bug#15029)
9475 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
9476 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
9477 (syms_of_frame): Add focus-in-hook, focus-out-hook.
9478
9479 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
9480
9481 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
9482 The old names predated the API change that put destination at end.
9483
9484 Improve API of recently-added bool vector functions (Bug#15912).
9485 The old API had (bool-vector-count-matches A B)
9486 and (bool-vector-count-matches-at A B I), which gave the
9487 misleading impression that the two functions were variants, one
9488 with a location I. The new API has (bool-vector-count-population A)
9489 and (bool-vector-count-consecutive A B I) to make the distinction
9490 clearer. The first function no longer has a B argument, since the
9491 caller can easily determine the number of nils if the length and
9492 number of ts is known.
9493 * data.c (Fbool_vector_count_population): Rename from
9494 bool_vector_count_matches, and accept just 1 argument.
9495 (Fbool_vector_count_consecutive): Rename from
9496 Fbool_vector_count_matches_at.
9497
9498 Always allocate at least one bits_word per bool vector.
9499 See Daniel Colascione in:
9500 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
9501 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
9502 * data.c (bool_vector_binop_driver): Rely on this. Tune.
9503 * lisp.h (struct Lisp_Bool_vector): Document this.
9504
9505 2013-11-18 Eli Zaretskii <eliz@gnu.org>
9506
9507 * insdel.c (invalidate_buffer_caches): New function, consolidated
9508 from part of prepare_to_modify_buffer.
9509 (insert_from_gap, prepare_to_modify_buffer):
9510 * coding.c (code_convert_region, code_convert_string):
9511 Call invalidate_buffer_caches. (Bug#15841)
9512
9513 * lisp.h (invalidate_buffer_caches): Add prototype.
9514
9515 2013-11-17 Eli Zaretskii <eliz@gnu.org>
9516
9517 * w32term.c (x_update_window_end): Don't invalidate the entire
9518 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9519 highlight needs to be redisplayed. (Bug#15913)
9520
9521 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
9522
9523 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
9524
9525 2013-11-16 Eli Zaretskii <eliz@gnu.org>
9526
9527 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
9528 while we are using Vprin1_to_string_buffer.
9529
9530 * keymap.c (describe_map): Don't crash if PT is 1 both before and
9531 after inserting the description string. (Bug#15907)
9532
9533 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9534
9535 * data.c: Work around bogus GCC diagnostic about shift count.
9536 Reported by Eli Zaretskii in
9537 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
9538 (pre_value): New function.
9539 (count_trailing_zero_bits): Use it.
9540
9541 2013-11-15 Eli Zaretskii <eliz@gnu.org>
9542
9543 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
9544 assume C macros are not supported even under -g3 in these old GCC
9545 versions.
9546
9547 2013-11-15 Leo Liu <sdl.web@gmail.com>
9548
9549 * minibuf.c (Ftry_completion, Fall_completions)
9550 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
9551
9552 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9553
9554 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
9555 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
9556 This avoids placing unnecessary constants into the Emacs code.
9557
9558 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9559
9560 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
9561 for Cygwin w32 build.
9562
9563 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
9564 for Cygwin w32 build. (Bug#15892)
9565
9566 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
9567
9568 Simplify, port and tune bool vector implementation.
9569 * alloc.c (bool_vector_exact_payload_bytes)
9570 (bool_vector_payload_bytes): Remove.
9571 (bool_vector_fill): Return its argument.
9572 * alloc.c (bool_vector_fill):
9573 * lread.c (read1):
9574 * print.c (print_object):
9575 Simplify by using bool_vector_bytes.
9576 * alloc.c (make_uninit_bool_vector):
9577 New function, broken out from Fmake_bool_vector.
9578 (Fmake_bool_vector): Use it. Use tail call.
9579 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
9580 * data.c (BITS_PER_ULL): New constant.
9581 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
9582 if long long versions don't exist.
9583 (shift_right_ull): New function.
9584 (count_one_bits_word): New function, replacing popcount_bits_word
9585 macro. Don't assume that bits_word is no wider than long long.
9586 (count_one_bits_word, count_trailing_zero_bits):
9587 Don't assume that bits_word is no wider than long long.
9588 * data.c (bool_vector_binop_driver, bool_vector_not):
9589 * fns.c (Fcopy_sequence):
9590 * lread.c (read1):
9591 Create an uninitialized destination, to avoid needless work.
9592 (internal_equal): Simplify.
9593 (Ffillarray): Prefer tail call.
9594 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
9595 contain at least one word.
9596 (bits_word_to_host_endian): Prefer if to #if. Don't assume
9597 chars are narrower than ints.
9598 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
9599 * fns.c (Fcopy_sequence):
9600 Simplify and tune.
9601 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
9602 Don't try to port to hosts where bits_word values have holes; the
9603 code wouldn't work there anyway. Verify this assumption, though.
9604 (bool_vector_bytes): New function.
9605 (make_uninit_bool_vector): New decl.
9606 (bool_vector_fill): Now returns Lisp_Object.
9607
9608 * xfns.c (xic_create_fontsetname):
9609 * xrdb.c (gethomedir): Prefer tail calls.
9610
9611 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
9612
9613 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
9614 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
9615
9616 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
9617 that requires a return value.
9618 (Fset_buffer_modified_p): Take advantage of this change to do
9619 a tail call.
9620
9621 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9622
9623 * buffer.c (Frestore_buffer_modified_p): Sync it with
9624 Fset_buffer_modified_p.
9625 (Fforce_mode_line_update): New function, moved from subr.el.
9626 (Fset_buffer_modified_p): Use them.
9627 (syms_of_buffer): Defsubr Fforce_mode_line_update.
9628
9629 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
9630
9631 * search.c (find_newline): Rewrite to prefer offsets to pointers.
9632 This avoids undefined behavior when subtracting pointers into
9633 different aways. On my platform it also makes the code a tad
9634 smaller and presumably faster.
9635
9636 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9637
9638 * keyboard.c (command_loop_1): Use region-extract-function.
9639 * insdel.c (Qregion_extract_function): Not static any more (can we
9640 stop pretending that these vars can benefit from being marked static?).
9641
9642 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9643
9644 * search.c (find_newline): If buffer text is relocated during the
9645 "dumb loop", adjust C pointers into buffer text to follow suit.
9646 (Bug#15841)
9647
9648 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
9649
9650 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
9651 for conversion (Bug#15837).
9652
9653 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9654
9655 * fileio.c (Finsert_file_contents): Invalidate the newline cache
9656 for the entire range of inserted characters. (Bug#15841)
9657
9658 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
9659
9660 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
9661 unspecified.
9662 (realize_default_face): Remove assignment to distant-foreground if
9663 unspecified (Bug#15815).
9664
9665 2013-11-08 Eli Zaretskii <eliz@gnu.org>
9666
9667 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
9668 cache-long-scans disabled, since we don't want to call
9669 prepare_to_modify_buffer (in insert_1_both) for each message we
9670 display.
9671
9672 * buffer.h (bset_cache_long_scans): New INLINE function, moved
9673 from buffer.c. Improve commentary to the buffer field setter
9674 functions.
9675
9676 * buffer.c (bset_cache_long_scans): Static function deleted.
9677 Improve commentary to the buffer field setter functions.
9678 (init_buffer_once): Default for cache-long-scans changed to t.
9679 (Bug#15797)
9680
9681 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
9682
9683 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
9684
9685 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
9686 This bug was introduced in my 2013-06-21 change, and caused
9687 struct Lisp_Sub_Char_Table objects to be given too many slots,
9688 which broke 'make -C admin/unidata'.
9689
9690 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
9691
9692 Import changes from mac-port 4.5.
9693 * macfont.m (mac_font_copy_default_descriptors_for_language)
9694 (mac_font_copy_default_name_for_charset_and_languages): Declare.
9695 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
9696 (macfont_language_default_font_names): New.
9697 (macfont_list): Rearrange language/charset code.
9698 (macfont_close): Don't check for macfont_info->cache.
9699 (mac_ctfont_create_preferred_family_for_attributes): New font
9700 selection code, call
9701 mac_font_copy_default_name_for_charset_and_languages.
9702 (mac_font_copy_default_descriptors_for_language)
9703 (mac_font_copy_default_name_for_charset_and_languages): New functions.
9704
9705 * macfont.h (kCTVersionNumber10_9): Define if not defined.
9706
9707 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
9708
9709 Port to C11 aligned_alloc, and fix some integer overflows.
9710 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
9711 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
9712 and use of posix_memalign replaced with aligned_alloc.
9713 (aligned_alloc): New function, defined or declared as needed.
9714 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
9715 Don't undef; configure.ac now does this.
9716 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
9717 (calloc, aligned_alloc): Check for integer overflow.
9718 (aligned_alloc): Rename from memalign. All uses changed.
9719 (memalign): New function, an alias for aligned_alloc.
9720
9721 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9722
9723 * xdisp.c (redisplay_internal): Fix typo in last change.
9724
9725 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9726
9727 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
9728
9729 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9730
9731 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
9732 redisplay--mode-lines-cause.
9733 (redisplay_internal): Keep them uptodate. Remove redundant check of
9734 buffer_shared_and_changed.
9735 * *.[chm]: Number every assignment to update_mode_lines so we
9736 can track why it is set.
9737
9738 2013-11-06 Eli Zaretskii <eliz@gnu.org>
9739
9740 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
9741
9742 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9743
9744 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
9745 can track why it is set.
9746
9747 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9748
9749 Integer-related fixes for term.c etc.
9750 * dispextern.h (face_tty_specified_color): New function.
9751 * term.c (turn_on_face): Don't rely on undefined behavior when
9752 assigning an out-of-range value to 'long'.
9753 Simplify test for toggling highlight.
9754 (tty_capable_p): Omit last two (unused) args. All callers changed.
9755 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
9756 (read_menu_input, tty_menu_activate, tty_menu_show):
9757 * xfaces.c (x_supports_face_attributes_p)
9758 (tty_supports_face_attributes_p):
9759 Use bool for boolean. All callers changed.
9760 (tty_supports_face_attributes_p): Omit defaults for color indices;
9761 no longer needed. Simplify tail call.
9762
9763 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9764
9765 * xdisp.c (prepare_menu_bars): Mark static.
9766 * lisp.h (prepare_menu_bars): Don't declare.
9767 * xselect.c (x_handle_selection_clear):
9768 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
9769
9770 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
9771
9772 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
9773 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
9774
9775 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9776
9777 * keyboard.c (Fcommand_error_default_function): Rename from
9778 Fdefault_error_output.
9779
9780 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
9781
9782 * keyboard.c (Fdefault_error_output): New function, extracted from
9783 cmd_error_internal.
9784 (syms_of_keyboard): Use it for Vcommand_error_function.
9785
9786 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9787
9788 * eval.c (handlerlist_sentinel): New variable (bug#15802).
9789 (init_eval): Use it to ensure handlerlist is non-NULL.
9790 (unwind_to_catch): Make sure we never set handlerlist to NULL.
9791 (Fsignal): Adjust NULLness test of handlerlist.
9792 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
9793
9794 2013-11-05 Eli Zaretskii <eliz@gnu.org>
9795
9796 * callproc.c (call_process): Call prepare_to_modify_buffer before
9797 decoding text read from the sub-process, as the decoded stuff will
9798 be inserted into the buffer. This will invalidate the various
9799 caches maintained for the buffer. (Bug#15148)
9800
9801 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
9802
9803 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
9804 string of glyphless-char-display.
9805
9806 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
9807
9808 * nsfns.m (ns_get_name_from_ioreg): New function.
9809 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
9810 OSX >= 10.9. Use ns_get_name_from_ioreg.
9811
9812 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
9813
9814 Simplify and port recent bool vector changes.
9815 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
9816 only in this file. Use a more-efficient implementation if the
9817 second argument is a power of 2.
9818 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
9819 Remove no-longer-necessary compile-time checks.
9820 (bool_vector_exact_payload_bytes): New function.
9821 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
9822 exact payload changed to call the new function. Do not assume
9823 that the arg or result fits in ptrdiff_t.
9824 (bool_vector_fill): New function.
9825 (Fmake_bool_vector): Use it. Don't assume bit counts fit
9826 in ptrdiff_t.
9827 (vroundup_ct): Don't assume arg fits in size_t.
9828 * category.c (SET_CATEGORY_SET): Remove. All callers now just
9829 invoke set_category_set.
9830 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
9831 All callers changed. Use bool_vector_set.
9832 * category.h (XCATEGORY_SET): Remove; no longer needed.
9833 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
9834 bool_vector_bitref.
9835 * data.c (Faref): Use bool_vector_ref.
9836 (Faset): Use bool_vector_set.
9837 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
9838 (Fbool_vector_not, Fbool_vector_count_matches)
9839 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
9840 * fns.c (concat): Use bool_vector_ref.
9841 (Ffillarray): Use bool_vector_fill.
9842 (mapcar1): Use bool_vector_ref.
9843 (sxhash_bool_vector): Hash words, not bytes.
9844 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
9845 a constant, since it's now used in #if.
9846 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
9847 unsigned char on unusual architectures, so that we no longer
9848 assume that the number of bits per bits_word is a power of two or
9849 is a multiple of 8 or of CHAR_BIT.
9850 (Qt): Add forward decl.
9851 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
9852 at least as strictly as bits_word.
9853 (bool_vector_data, bool_vector_uchar_data): New accessors.
9854 All data structure accesses changed to use them.
9855 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
9856 (bool_vector_set): New functions.
9857 (bool_vector_fill): New decl.
9858 (ROUNDUP): Move to alloc.c as described above.
9859
9860 Fix recent gnutls changes.
9861 * gnutls.c (Fgnutls_boot): Don't assume C99.
9862 * process.c (wait_reading_process_output): Fix typo in recent change.
9863
9864 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
9865
9866 * process.c (wait_reading_process_output, read_process_output)
9867 (send_process): Check gnutls_state is not NULL.
9868
9869 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
9870 (Fgnutls_boot): Set process gnutls_p later, after initialization.
9871
9872 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
9873
9874 * nsterm.m (init, run, stop:): New methods in EmacsApp for
9875 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
9876
9877 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
9878 OSX >= 10.9.
9879
9880 * nsfns.m (Fx_create_frame): Fix memory leak.
9881
9882 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
9883 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
9884 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
9885
9886 2013-11-04 Eli Zaretskii <eliz@gnu.org>
9887
9888 * xdisp.c (message3_nolog, message_with_string): Encode the string
9889 before writing it to the terminal in a non-interactive session.
9890
9891 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
9892 sure we concatenate them into a unibyte string.
9893
9894 * fileio.c (make_temp_name): Encode PREFIX, and decode the
9895 resulting temporary name before returning it to the caller.
9896 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
9897 is a unibyte string, convert NAME to a unibyte string to ensure
9898 that the result is also a unibyte string.
9899
9900 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
9901 create unibyte strings from default paths and directory/file
9902 names.
9903
9904 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
9905 string.
9906
9907 * callproc.c (init_callproc): Use build_unibyte_string to make
9908 sure we create unibyte strings from default paths and
9909 directory/file names.
9910
9911 * buffer.c (init_buffer): Don't store default-directory of
9912 *scratch* in multibyte form. The original problem which led to
9913 that is described in
9914 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
9915 but it was solved long ago. (Bug#15260)
9916
9917 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
9918
9919 Port to stricter C99 platforms.
9920 Especially, C99 prohibits nesting a struct X inside struct Y if
9921 struct X has a flexible array member.
9922 * alloc.c (struct sdata): New type.
9923 (sdata): Implement in terms of struct sdata.
9924 Remove u member; all uses replaced by next_vector, set_next_vector.
9925 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
9926 (SDATA_DATA_OFFSET): Now a constant, not a macro.
9927 (struct sblock): Rename first_data member to data, which is now
9928 a flexible array member. All uses changed.
9929 (next_vector, set_next_vector, large_vector_vec): New functions.
9930 (vector_alignment): New constant.
9931 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
9932 (struct large-vector): Now merely a NEXT member, since the old approach
9933 ran afoul of stricter C99. All uses changed to use
9934 large_vector_vec or large_vector_offset.
9935 (large_vector_offset): New constant.
9936 * dispnew.c: Include tparam.h, for tgetent.
9937 Do not include term.h; no longer needed.
9938 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
9939 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
9940 (struct Lisp_Vector): Use a flexible array member for contents,
9941 instead of a union with a member that is an array of size 1.
9942 All uses changed.
9943 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
9944 fact that the struct no longer contains a union.
9945 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
9946 (struct Lisp_Save_Value, struct Lisp_Free):
9947 Use unsigned, not int, for spacers, to avoid c99 warning.
9948 (union specbinding): Use unsigned, not bool, for bitfield, as
9949 bool is not portable to pre-C99 hosts.
9950
9951 2013-11-04 Glenn Morris <rgm@gnu.org>
9952
9953 * emacs.c (usage_message): Mention that `-L :...' appends.
9954
9955 2013-11-02 Glenn Morris <rgm@gnu.org>
9956
9957 * Makefile.in (abs_builddir): Remove.
9958 (bootstrap_exe): Use relative filename.
9959
9960 Use relative filenames in TAGS files.
9961 * Makefile.in (abs_srcdir): Remove it again.
9962 (.PHONY): Remove frc.
9963 (maintainer-clean): No more TAGS-LISP file.
9964 (TAGS): Pass relative file names to etags.
9965 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
9966
9967 * Makefile.in (abs_srcdir): New, set by configure.
9968 (lispdir): Remove.
9969 (maintainer-clean): Remove pointless echo. That should be in the
9970 top-level Makefile, if anywhere. Delete TAGS-LISP.
9971 (extraclean): No s/ and m/ directories for some time.
9972 (TAGS): Also depend on ctagsfiles3.
9973 Remove no-longer-defined S_FILE.
9974 Pass absolute filenames to etags once more.
9975 (TAGS-LISP): Replace lispdir with its expansion.
9976 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
9977 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
9978
9979 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
9980
9981 * xfaces.c (check_lface_attrs, realize_default_face):
9982 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
9983 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
9984
9985 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
9986
9987 * emacs.c (original_pwd): Remove global var by making it local.
9988 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
9989
9990 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
9991
9992 * xfaces.c: Declare color_distance.
9993 (QCdistant_foreground): New variable.
9994 (NEAR_SAME_COLOR_THRESHOLD): New define.
9995 (load_color2): New function.
9996 (load_color): Call load_color2.
9997 (load_face_colors): Call load_color2 and if distant-color is specified
9998 calculate distant and use distant-color if colors are near.
9999 (LFACE_DISTANT_FOREGROUND): New define.
10000 (merge_face_ref, Finternal_set_lisp_face_attribute)
10001 (Finternal_get_lisp_face_attribute)
10002 (x_supports_face_attributes_p): Handle distant-foreground similar to
10003 foreground.
10004 (syms_of_xfaces): DEFSYM QCdistant_foreground.
10005
10006 * dispextern.h (lface_attribute_index):
10007 Add LFACE_DISTANT_FOREGROUND_INDEX.
10008
10009 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
10010
10011 * image.c (pbm_next_char): New function.
10012 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
10013 (pbm_scan_number): Use it.
10014 (Qlibjpeg_version): New variable.
10015 (syms_of_image): DEFSYM and initialize it.
10016
10017 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
10018
10019 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
10020
10021 2013-10-31 Glenn Morris <rgm@gnu.org>
10022
10023 * emacs.c (original_pwd): New char.
10024 (main): If using --chdir, store original_pwd.
10025 (init_cmdargs): When setting Vinvocation_directory based on a
10026 relative argv[0], use original_pwd if set. (Bug#15768)
10027
10028 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10029
10030 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
10031
10032 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
10033
10034 * insdel.c: Fix minor problems found by static checking.
10035 (Qregion_extract_function): Now static.
10036 (prepare_to_modify_buffer_1): Remove unused locals.
10037
10038 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10039
10040 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
10041 (syms_of_xdisp): Declare pre-redisplay-function.
10042 (markpos_of_region): Remove function.
10043 (init_iterator, compute_stop_pos, handle_face_prop)
10044 (face_before_or_after_it_pos, reseat_to_string)
10045 (get_next_display_element, window_buffer_changed)
10046 (redisplay_internal, try_cursor_movement, redisplay_window)
10047 (try_window_reusing_current_matrix, try_window_id, display_line)
10048 (note_mode_line_or_margin_highlight, note_mouse_highlight)
10049 (display_string, mouse_face_from_buffer_pos): Remove region handling.
10050 * window.h (struct window): Remove field `region_showing'.
10051 * dispextern.h (struct it): Remove region_beg/end_charpos.
10052 (face_at_buffer_position, face_for_overlay_string)
10053 (face_at_string_position): Update prototypes.
10054 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
10055 (face_at_string_position): Remove `region_beg' and `region_end' args.
10056 * fontset.c (Finternal_char_font):
10057 * font.c (font_at, font_range): Adjust calls accordingly.
10058 * insdel.c (Qregion_extract_function): New var.
10059 (syms_of_insdel): Initialize it.
10060 (prepare_to_modify_buffer_1): Use it.
10061
10062 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10063
10064 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
10065 * ftxfont.c (ftxfont_get_gcs):
10066 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
10067 * xfaces.c (x_free_colors, x_free_dpy_colors)
10068 (x_create_gc, unload_color):
10069 * xselect.c (x_property_data_to_lisp):
10070 * xsettings.c (parse_settings):
10071 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
10072 (get_bits_and_offset): Adjust definition.
10073 * frame.c (XParseGeometry): Adjust locals.
10074 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
10075 * regex.h (toplevel): Likewise for reg_syntax_t.
10076
10077 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
10078
10079 * eval.c (run_hook_with_args): Use FUNCTIONP.
10080
10081 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
10082
10083 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
10084 fields, drop 'allocated_p' member and use -1 for uninitialized value.
10085 * w32term.h (struct w32_output): Similarly but do not use -1 because...
10086 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
10087 on MS-Windows anyway.
10088 (free_face_colors): Define only if HAVE_X_WINDOWS and...
10089 (free_realized_face): ...adjust user.
10090 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
10091 white relief pixels to -1.
10092 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
10093 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
10094 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
10095
10096 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
10097
10098 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
10099 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
10100 in practice now. All callers changed.
10101
10102 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
10103
10104 * dispextern.h (struct face): Use bitfields for 'underline_type'
10105 and 'box' members. Remove set-but-unused members 'pixmap_w' and
10106 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
10107 'stipple' member. Move 'lface' member up to help...
10108 * xfaces.c (make_realized_face): ...this function to find and
10109 clear just the members that need clearing.
10110 (load_face_colors, realize_x_face):
10111 * xdisp.c (extend_face_to_end_of_line): Adjust user.
10112
10113 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
10114
10115 * xftfont.c (struct xftfont_info): Remove set-but-unused
10116 'screen' member.
10117 (xftfont_open): Adjust user.
10118 (xftfont_get_colors): Remove useless prototype.
10119
10120 2013-10-26 Eli Zaretskii <eliz@gnu.org>
10121
10122 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
10123 before passing them to 'unexec'. (Bug#15260)
10124
10125 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
10126
10127 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
10128
10129 2013-10-25 Eli Zaretskii <eliz@gnu.org>
10130
10131 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
10132 the changed signature of the font driver's 'close' method.
10133
10134 * w32font.h (w32font_close): Adjust the prototype to the change in
10135 function definition.
10136
10137 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
10138
10139 * w32uniscribe.c (uniscribe_close): Adapt the call to
10140 w32font_close to its new prototype.
10141
10142 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
10143
10144 Omit unused frame argument of font API's close function.
10145 * font.h (struct font): Drop frame argument. Adjust comment.
10146 * font.c (font_clear_cache, font_close_object): Adjust users.
10147 * ftfont.c (ftfont_close):
10148 * ftxfont.c (ftxfont_close):
10149 * macfont.m (macfont_close):
10150 * nsfont.m (nsfont_close):
10151 * w32font.c (w32font_close):
10152 * xfont.c (xfont_close):
10153 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
10154 tweak comments and make functions safe if called more than once for
10155 the same font object.
10156
10157 Perform font-specific cleanup when font object is swept by GC. See
10158 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
10159 * alloc.c (cleanup_vector): New function.
10160 (sweep_vector): Call it for each reclaimed vector object.
10161 * font.h (struct font): Adjust comment.
10162
10163 2013-10-24 Glenn Morris <rgm@gnu.org>
10164
10165 * Makefile.in (abs_top_srcdir): New, set by configure.
10166
10167 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
10168
10169 Adjust recent font-related changes to fix bug#15686.
10170 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
10171 is a live window system frame, mark its default font too.
10172
10173 2013-10-23 Glenn Morris <rgm@gnu.org>
10174
10175 * Makefile.in (RUN_TEMACS): Make relative (again).
10176 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
10177 (bootstrap-emacs$(EXEEXT)):
10178 Quote entities that might contain whitespace.
10179
10180 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
10181
10182 Port to Solaris 10 and its bundled GCC. Reported by Timothy C. Burt.
10183 * floatfns.c (isfinite, isnan): Redefine unconditionally.
10184
10185 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
10186
10187 Do not allow font caches to grow too large.
10188 * alloc.c (compact_font_cache_entry, compact_font_caches):
10189 New functions or stub if not HAVE_WINDOW_SYSTEM.
10190 (compact_undo_list): Factor out from Fgarbage_collect.
10191 Add comment.
10192 (mark_face_cache): Mark face font. Move down to avoid
10193 extra prototypes.
10194 (mark_terminals): Do not mark font cache here.
10195 (Fgarbage_collect): Call compaction functions described
10196 above. Adjust comment.
10197
10198 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
10199
10200 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
10201 chdir to HOME (bug#15607).
10202
10203 * nsterm.m (Qcocoa, Qgnustep): New variables.
10204 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
10205 (ns_get_color): Make selection color work for GNUstep also.
10206
10207 2013-10-18 Eli Zaretskii <eliz@gnu.org>
10208
10209 * keyboard.c (make_lispy_event): Remove GPM-specific code that
10210 handles mouse clicks. Instead, let GPM use the same code as all
10211 the other mice use. See the discussion starting at
10212 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
10213 for the details of the problem with the menu bar this fixes.
10214
10215 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
10216
10217 Remove port-specific display name lists to avoid extra
10218 complexity and data duplication with display info lists.
10219 * xterm.h (x_display_name_list): Remove declaration.
10220 * xterm.c (x_display_name_list): Remove.
10221 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
10222 * xfns.c (x_display_info_for_name, Fx_display_list):
10223 Likewise. Use x_display_list where appropriate.
10224 * w32term.h (w32_display_name_list): Remove declaration.
10225 * w32term.c (w32_display_name_list): Remove.
10226 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
10227 Adjust users.
10228 * w32fns.c (x_display_info_for_name, Fx_display_list):
10229 Likewise. Use x_display_list where appropriate.
10230 * nsterm.h (ns_display_name_list): Remove declaration.
10231 * nsterm.m (ns_display_name_list): Remove.
10232 (ns_term_init, syms_of_nsterm): Adjust users.
10233 * nsfns.m (ns_display_info_for_name, Fx_display_list):
10234 Likewise. Use x_display_list where appropriate.
10235 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
10236 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
10237 (mark_terminals): Mark per-terminal font cache.
10238
10239 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
10240
10241 Don't run timers in input-pending-p. Its new check-timers param
10242 provides the prior behavior. (Bug#15045).
10243 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
10244
10245 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
10246
10247 Make some functions static in non-Microsoft builds.
10248 On my platform (Fedora 19 x86-64), this shrinks the
10249 Emacs executable (text+data) by 0.25%.
10250 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
10251 (load_color) [!MSDOS]:
10252 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
10253 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
10254 * lisp.h (check_existing):
10255 * process.h (conv_sockaddr_to_lisp, network_interface_list)
10256 (network_interface_info) [!WINDOWSNT]:
10257 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
10258 Remove extern decls.
10259 * fileio.c (check_existing):
10260 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
10261 * process.c (conv_sockaddr_to_lisp, network_interface_list)
10262 (network_interface_info) [!WINDOWSNT]:
10263 * term.c (encode_terminal_code) [!WINDOWSNT]:
10264 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
10265 * xfaces.c (load_color) [!MSDOS]:
10266 Now static.
10267 * fileio.c (check_existing, check_executable, check_writable):
10268 * process.c (network_interface_list, network_interface_info):
10269 Move earlier, so that we don't need forward decls.
10270 * gnutls.c (fn_gnutls_transport_set_errno)
10271 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
10272 Remove; unused.
10273 * w32.c (init_environment): Use faccessat rather than
10274 check_existing, partly for consistency with the rest of the code
10275 in this file, partly so that check_existing can be static.
10276
10277 Make VALMASK visible to GDB even if clang is used (Bug#15574).
10278 * emacs.c (MAIN_PROGRAM): New macro.
10279 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
10280 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
10281
10282 bool vector int width fixes
10283 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
10284 (Fbool_vector_count_matches_at):
10285 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
10286 can exceed PTRDIFF_MAX, at least in theory.
10287 (Fbool_vector_count_matches_at):
10288 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
10289
10290 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
10291
10292 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
10293 (struct sockaddr): Add forward decl, for platforms that lack it.
10294
10295 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
10296
10297 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
10298 Qnil (Bug#15628).
10299
10300 2013-10-16 Eli Zaretskii <eliz@gnu.org>
10301
10302 * w32.c (network_interface_get_info, network_interface_list)
10303 (network_interface_info): New functions. (Bug#15610)
10304 (GetAdaptersInfo_Proc): New typedef.
10305 (get_adapters_info): New wrapper function.
10306 (globals_of_w32): Initialize g_b_init_get_adapters_info.
10307
10308 * process.h (network_interface_list, network_interface_info):
10309 New prototypes.
10310
10311 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
10312 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
10313 all systems. Return non-nil for systems that HAVE_NET_IF_H and
10314 for WINDOWSNT. Doc fix.
10315 (syms_of_process): Defsubr Snetwork_interface_list and
10316 Snetwork_interface_info unconditionally.
10317
10318 * menu.c (have_boxes): Fix redundant simulation of radio buttons
10319 in NS GUI sessions. (Bug#15629)
10320
10321 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
10322
10323 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
10324
10325 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10326
10327 * print.c (print_object): Print " ..." when truncating bool vectors.
10328
10329 2013-10-15 Eli Zaretskii <eliz@gnu.org>
10330
10331 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
10332 standard mouse buttons.
10333
10334 * termhooks.h (struct input_event): Remove incorrect commentary.
10335
10336 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10337
10338 Disallow bool vector operations on mixed-length operands.
10339 The old behavior left garbage in the result vector sometimes,
10340 and didn't seem to be useful.
10341 * data.c (Qwrong_length_argument): New static var.
10342 (wrong_length_argument): New function.
10343 (bool_vector_binop_driver): Check that args agree in length.
10344
10345 * keyboard.c, keyboard.h (all_kboards): Now static.
10346
10347 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
10348
10349 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
10350 note from the lispref.
10351
10352 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
10353
10354 * nsterm.h (struct ns_display_info): Remove set-but-unused
10355 member image_cache (image caches are per-terminal anyway).
10356 (FRAME_X_IMAGE_CACHE): Remove.
10357 * nsterm.m (ns_initialize_display_info): Adjust user.
10358
10359 2013-10-14 Eli Zaretskii <eliz@gnu.org>
10360
10361 * w32proc.c: Include mingw_time.h.
10362
10363 * w32.c: Include mingw_time.h.
10364
10365 Implement scrolling of TTY menus when the screen is too short.
10366
10367 * term.c (tty_menu_display): Accept an additional argument, the
10368 menu item from which to start displaying the menu. Account for
10369 the value of Y when limiting the menu to the number of available
10370 screen lines.
10371 (mi_result): New enumeration.
10372 (read_menu_input): Return enumerated value. When the y coordinate
10373 hits min_y or max_y, return scroll indication instead of wrapping
10374 around the menu.
10375 (tty_menu_activate): Handle the scrolling indications from
10376 read_menu_input. Compute the first menu item to display and pass
10377 it to tty_menu_display.
10378
10379 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10380
10381 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
10382 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
10383 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
10384 Adjust to match the change described below.
10385 (struct terminal): Move must_write_spaces, line_ins_del_ok,
10386 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
10387 memory_below_frame members to...
10388 * termchar.h (struct tty_display_info): ...here because they're
10389 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
10390 * term.c (init_tty):
10391 * nsterm.m (ns_create_terminal):
10392 * w32term.c (w32_create_terminal):
10393 * xterm.c (x_create_terminal): Adjust users.
10394 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
10395 to filter out non-TTY frames. Adjust comment.
10396 (scrolling): Adjust user. Prefer eassert for debugging check.
10397
10398 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10399
10400 * xfaces.c (PT_PER_INCH): Remove unused macro.
10401 * termhooks.h (struct terminal): Remove set-but-unused
10402 member fast_clear_end_of_line.
10403 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
10404 * nsterm.m (ns_create_terminal):
10405 * term.c (init_tty):
10406 * w32term.c (w32_create_terminal):
10407 * xterm.c (x_create_terminal): Adjust users.
10408
10409 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
10410
10411 * lisp.h (bool_vector_size): New function.
10412 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
10413 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10414 (Fbool_vector_not, Fbool_vector_count_matches_at):
10415 Remove uses of 'eassume' that should no longer be needed,
10416 because they are subsumed by the 'eassume' in bool_vector_size.
10417
10418 2013-10-12 Eli Zaretskii <eliz@gnu.org>
10419
10420 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
10421 after inclusion of gif_lib.h, thus fixing compiler warnings caused
10422 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
10423
10424 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10425
10426 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
10427 have different dimensions. (Bug#15575)
10428
10429 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
10430 visibility.
10431
10432 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
10433
10434 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10435
10436 * term.c (tty_menu_show): Never return with unbalanced
10437 specpdl. Use eassert for debugging check. Adjust style.
10438
10439 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10440
10441 * term.c (read_menu_input): Make selection of menu items
10442 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10443 (tty_menu_activate): Fix off-by-one error when computing max_y.
10444
10445 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
10446
10447 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
10448 audit logging (only used with GnuTLS 3.x) and enable it.
10449
10450 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10451
10452 * dispnew.c (redraw_frame): Remove useless #ifdef because
10453 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
10454 Also, move TTY fflush to...
10455 * term.c (tty_update_end): ...this function.
10456
10457 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10458
10459 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
10460 the end of the frame's glyph matrix. (Bug#15575)
10461
10462 * term.c (tty_menu_display): Don't move cursor while overwriting
10463 frame's glyphs with menu items. Limit the number of items
10464 displayed to what can be shown on the available screen lines,
10465 excluding the echo area.
10466 (tty_menu_activate): Limit the Y coordinate allowed by
10467 read_menu_input to the last screen line used for menu display.
10468
10469 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
10470
10471 * lisp.h (eassume): New macro.
10472 Also, include <verify.h>, for 'assume'.
10473 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
10474 (vroundup, vector_nbytes):
10475 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10476 (Fbool_vector_not, Fbool_vector_count_matches)
10477 (Fbool_vector_count_matches_at):
10478 Use eassume, not eassert.
10479 * casetab.c (set_identity, shuffle):
10480 * composite.c (composition_gstring_put_cache):
10481 * dispnew.c (update_frame_1):
10482 * ftfont.c (ftfont_shape_by_flt):
10483 * image.c (gif_load):
10484 * intervals.c (offset_intervals):
10485 * macfont.m (macfont_shape):
10486 Remove calls to 'assume' that are no longer needed, because
10487 --enable-gcc-warnings no longer generates bogus warnings
10488 when these calls are removed.
10489
10490 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10491
10492 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
10493
10494 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
10495
10496 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
10497 (Qsubstitute_env_in_file_name): New var.
10498 (syms_of_fileio): Define it.
10499
10500 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10501
10502 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
10503 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
10504 (Bug#15575)
10505
10506 * term.c (save_and_enable_current_matrix): Don't allocate and
10507 don't save margin areas.
10508 (restore_desired_matrix): Don't restore margin areas.
10509 (free_saved_screen): Don't free margin areas.
10510
10511 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
10512
10513 * image.c: Pacify --enable-gcc-warnings.
10514 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
10515 #define only if used.
10516
10517 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10518
10519 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
10520 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
10521 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
10522 (gif_load): For giflib v5.x and later, display the error message
10523 produced by giflib when its functions fail.
10524 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
10525 (Bug#15531)
10526
10527 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10528
10529 * keyboard.c (last_event_timestamp): Remove. For X selection and
10530 GTK popup menus, it may be obtained from per-frame X display info.
10531 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
10532 (process_special_events): Adjust users.
10533 * keyboard.h (last_event_timestamp): Remove declaration.
10534 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
10535 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
10536 * menu.h (xmenu_show): Adjust prototype.
10537 * menu.c (Fx_popup_menu): Adjust user.
10538 * xselect.c (x_own_selection, x_get_foreign_selection)
10539 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
10540
10541 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10542
10543 * keyboard.c (init_kboard): Now static. Add arg
10544 to denote window system. Adjust comment.
10545 (init_keyboard): Adjust user.
10546 (allocate_kboard): New function.
10547 (syms_of_keyboard):
10548 * nsterm.m (ns_term_init):
10549 * term.c (init_tty):
10550 * w32term.c (w32_create_terminal):
10551 * xterm.c (x_term_init): Use it.
10552 * keyboard.h (init_kboard): Remove prototype.
10553 (allocate_kboard): Add prototype.
10554
10555 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
10556
10557 * image.c (GIFLIB_MAJOR): Ensure it's defined.
10558 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
10559
10560 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10561
10562 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
10563
10564 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10565
10566 * term.c (tty_menu_activate): Flush the output stream after
10567 showing the cursor, and don't mark the frame garbaged at exit from
10568 the function. Fixes redisplay glitches when moving from one menu
10569 to another.
10570
10571 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
10572
10573 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
10574 or throw error (Bug#15570).
10575
10576 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10577
10578 * intervals.c (temp_set_point_both): Move test into 'eassert',
10579 for speed.
10580
10581 * lisp.h (eassert): Don't use 'assume'.
10582 Sometimes 'assume' wins in performance, and sometimes it loses,
10583 so it shouldn't be used all the time. Perhaps we need two
10584 flavors of 'eassert', one for where 'assume' is far more likely
10585 to help or to hurt; but that can be done later.
10586 Reported by Dmitry Antipov in
10587 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
10588 Also, don't include <verify.h>; no longer needed.
10589
10590 2013-10-09 Glenn Morris <rgm@gnu.org>
10591
10592 * eval.c (Fcond): Doc tweak.
10593
10594 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10595
10596 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
10597 expressions with side effects to eassert. (Bug#15565)
10598
10599 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
10600
10601 * fns.c (hashfn_user_defined): Allow hash functions to return any
10602 Lisp_Object.
10603
10604 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10605
10606 Fix minor problems found by static checking.
10607 * dispnew.c (save_current_matrix): Omit unnecessary casts.
10608 * dispnew.c (update_frame_with_menu): Mark debug local as used.
10609 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
10610 * keyboard.c (read_menu_command): Remove unused local.
10611 * lisp.h (read_menu_command): New decl.
10612 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
10613 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
10614 Return ptrdiff_t, not int.
10615 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
10616 not int, for benefit of xpalloc.
10617 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
10618 and xpalloc.
10619 (have_menus_p): Remove; unused.
10620 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
10621 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
10622 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
10623 Now static.
10624 (save_and_enable_current_matrix): Omit unnecessary casts.
10625 (read_menu_input): Omit local extern decl (now in lisp.h).
10626 Don't access uninitialized storage if mouse_get_xy fails.
10627 (tty_menu_activate): Mark local as initialized, for lint.
10628 (tty_menu_activate, tty_meny_show): Remove unused locals.
10629
10630 2013-10-08 Eli Zaretskii <eliz@gnu.org>
10631
10632 Support menus on text-mode terminals.
10633 * xterm.h (xw_popup_dialog): Add prototype.
10634
10635 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
10636 (xmenu_show): Block input here, instead in Fx_popup_menu.
10637 (xw_popup_dialog): New function, with X-specific bits of popup
10638 dialogs.
10639
10640 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
10641 New functions.
10642
10643 * window.c (Fset_window_configuration): Use run-time tests of the
10644 frame type instead of compile-time conditionals, when menu-bar
10645 lines are considered.
10646
10647 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
10648 (w32_popup_dialog): New prototypes.
10649
10650 * w32menu.c (Fx_popup_dialog): Function deleted.
10651 (w32_popup_dialog): New function, with w32 specific bits of popup
10652 dialogs. Block input here.
10653
10654 * w32inevt.c (w32_console_read_socket): Minor change to add
10655 debugging TTY events.
10656
10657 * w32fns.c (show_hourglass): If returning early because the frame
10658 is not a GUI frame, unblock input.
10659
10660 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
10661 (cursorY): New functions.
10662
10663 * termhooks.h (cursorX, cursorY): Prototypes of functions on
10664 WINDOWSNT, macros that call curX and curY elsewhere.
10665
10666 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
10667
10668 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
10669 specific function to hide and show cursor on a text-mode terminal.
10670 (tty_menu_struct, struct tty_menu_state): New structures.
10671 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
10672 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
10673 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
10674 (tty_menu_locate, save_and_enable_current_matrix)
10675 (restore_desired_matrix, screen_update, read_menu_input)
10676 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
10677 (tty_pop_down_menu, tty_menu_last_menubar_item)
10678 (tty_menu_new_item_coords, tty_menu_show): New functions.
10679 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
10680
10681 * nsterm.h (ns_popup_dialog): Adjust prototype.
10682
10683 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
10684 of in x-popup-menu.
10685 (ns_popup_dialog): Adapt order of arguments to the other
10686 *_menu_show implementations.
10687 (Fx_popup_dialog): Function deleted.
10688
10689 * msdos.c (x_set_menu_bar_lines): Delete unused function.
10690
10691 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
10692
10693 * menu.c (have_boxes): New function.
10694 (single_keymap_panes): Use it instead of a compile-time
10695 conditional.
10696 (single_menu_item): Use run-time tests of the frame type instead
10697 of compile-time conditionals.
10698 (encode_menu_string): New function.
10699 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
10700 the macro, since different types of frame need different encoding
10701 of menu items.
10702 (digest_single_submenu): Use run-time tests of frame type instead
10703 of, or in addition to, compile-time conditionals.
10704 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
10705 (Fx_popup_menu): Detect when the function is called from keyboard
10706 on a TTY. Don't barf when invoked on a text-mode frame.
10707 Check frame type at run time, instead of compile-time conditionals for
10708 invoking terminal-specific menu-show functions.
10709 Call tty_menu_show on text-mode frames.
10710 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
10711 run time to determine which alternative to invoke; support dialogs
10712 on TTYs.
10713
10714 * keyboard.h <Qmouse_movement>: Declare.
10715
10716 * keyboard.c <Qmouse_movement>: Now extern.
10717 <Qecho_keystrokes>: New static variable.
10718 (read_key_sequence): Accept an additional argument, a flag to
10719 prevent redisplay during reading of the key sequence. All callers
10720 changed.
10721 (read_menu_command): New function.
10722 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
10723 autosave.
10724 (toolkit_menubar_in_use): New function.
10725 (make_lispy_event): Use it instead of a compile-time test.
10726
10727 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
10728 window-system being available.
10729
10730 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
10731 to x-popup-dialog on the frame type, they all now support popup
10732 dialogs.
10733
10734 * dispnew.c (save_current_matrix): Save the margin areas.
10735 (restore_current_matrix): Restore margin areas.
10736 (update_frame_with_menu): New function.
10737
10738 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
10739 Add prototypes.
10740
10741 * alloc.c (make_save_ptr): Now compiled unconditionally.
10742
10743 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10744
10745 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
10746 (redraw_frame, update_frame): Adjust users.
10747 * dispextern.h (set_window_update_flags): Adjust prototype.
10748 * xdisp.c (redisplay_internal): When updating all frames with zero
10749 windows_or_buffers_changed, assume that only the windows that shows
10750 current buffer should be really updated.
10751
10752 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10753
10754 Do not allocate huge temporary memory areas and objects while encoding
10755 for file I/O, thus reducing an enormous memory usage for large buffers.
10756 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
10757 * coding.h (struct coding_system): New member raw_destination.
10758 * coding.c (setup_coding_system): Initialize it to zero.
10759 (encode_coding_object): If raw_destination is set, do not create
10760 dst_object. Add comment.
10761 * fileio.c (toplevel): New constant E_WRITE_MAX.
10762 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
10763 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
10764
10765 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
10766
10767 * nsterm.m (windowDidExitFullScreen:)
10768 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
10769
10770 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10771
10772 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
10773 * keyboard.c (unblock_input_to): Don't process pending signals
10774 if a fatal error is in progress.
10775
10776 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
10777 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
10778 they're talking about words in Lisp bool vectors.
10779 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
10780 * data.c (popcount_bits_word): Rename from popcount_size_t.
10781 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
10782 All uses changed.
10783
10784 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
10785
10786 Improve support for popcount and counting trailing zeros (Bug#15550).
10787 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
10788 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
10789 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
10790 (popcount_size_t_msc, popcount_size_t_gcc):
10791 Remove; now done by Gnulib.
10792 (popcount_size_t): Now a macro that defers to Gnulib.
10793 (count_trailing_zero_bits): Return int, for consistency with
10794 Gnulib and because Emacs prefers signed to unsigned int.
10795 Don't assume that size_t is either unsigned int or unsigned long
10796 or unsigned long long.
10797 (size_t_to_host_endian): Do not assume that size_t is either
10798 exactly 32 or exactly 64 bits wide.
10799 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
10800 etc., so that it's now an enum constant, not a macro.
10801 No need to assume that it's either 32 or 64.
10802
10803 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
10804
10805 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
10806 on >= 10.7.
10807
10808 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
10809
10810 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
10811 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
10812
10813 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
10814
10815 emacs_read and emacs_write now use void *, not char *.
10816 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
10817 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
10818 Buffer arg is now void *, not char *. This matches plain
10819 'read' and 'write' better, and avoids a constraint violation
10820 on Solaris 9 with Oracle Studio.
10821
10822 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
10823
10824 * alloc.c (Fmake_string): For ASCII char initializer, prefer
10825 memset to explicit loop. Otherwise copy largest possible chunk
10826 from initialized to uninitialized part, thus allowing the longer
10827 memcpy runs and reducing the number of loop iterations.
10828
10829 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
10830
10831 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
10832 hide toolbar (Bug#15388).
10833 (windowDidEnterFullScreen:): If presentation options are zero,
10834 set them here (Bug#15388).
10835 (ns_update_auto_hide_menu_bar): Remove runtime check.
10836 Don't auto hide dock unless menubar is also auto hidden.
10837
10838 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
10839
10840 * editfns.c (message): Mention batch mode in doc string.
10841
10842 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
10843
10844 * nsterm.m (check_native_fs): Remove erroneous comment.
10845
10846 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
10847
10848 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
10849 uses find_newline instead of scan_newline and so doesn't move point.
10850
10851 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
10852
10853 Use hardware support for byteswapping on glibc x86 etc.
10854 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
10855 whereas the old swap64 needed 30.
10856 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
10857 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
10858 Use byteswap.h's macros to swap bytes.
10859 * lisp.h (swap16, swap32, swap64): Remove.
10860 All uses replaced by bswap_16, bswap_32, bswap_64.
10861
10862 * bytecode.c (exec_byte_code): Use some more volatile variables
10863 to work around local variables getting clobbered by longjmp.
10864 Port to pre-C99, which doesn't allow decls after stmts.
10865
10866 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
10867
10868 * lisp.h (eassert): Assume that COND is true when optimizing.
10869 In other words, take on the behavior of eassert_and_assume.
10870 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
10871 (eassert_and_assume): Remove. All uses replaced by eassert.
10872
10873 * xdisp.c (Qglyphless_char): Now static.
10874
10875 Adjust to merge from gnulib.
10876 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
10877 * lisp.h: Include <verify.h>, for 'assume'.
10878
10879 * eval.c (clobbered_eassert): New macro.
10880 (internal_catch, internal_condition_case)
10881 (internal_condition_case_1, internal_condition_case_2)
10882 (internal_condition_case_n): Use it instead of eassert
10883 when the argument contains locals clobbered by longjmp.
10884 Don't use clobbered locals outside of clobbered_eassert.
10885 (internal_lisp_condition_case): Use a volatile variable
10886 to work around a local variable's getting clobbered.
10887
10888 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10889
10890 * lisp.h (struct handler): Merge struct handler and struct catchtag.
10891 (PUSH_HANDLER): New macro.
10892 (catchlist): Remove.
10893 (handlerlist): Always declare.
10894
10895 * eval.c (catchlist): Remove (merge with handlerlist).
10896 (handlerlist, lisp_eval_depth): Not static any more.
10897 (internal_catch, internal_condition_case, internal_condition_case_1)
10898 (internal_condition_case_2, internal_condition_case_n):
10899 Use PUSH_HANDLER.
10900 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
10901 handlerlist/catchlist.
10902 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
10903 handlerlist which can only handle a single condition-case handler at
10904 a time.
10905 (find_handler_clause): Simplify since we only a single branch here
10906 any more.
10907
10908 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
10909 and Bpophandler.
10910 (bcall0): New function.
10911 (exec_byte_code): Add corresponding cases. Improve error message when
10912 encountering an invalid byte-code. Let Bunwind_protect accept
10913 a function (rather than a list of expressions) as argument.
10914
10915 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
10916 and make them unconditional now that they're heap-allocated.
10917
10918 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10919
10920 * charset.c (Fdecode_char, Fencode_char): Remove description of
10921 `restriction' arg. now that it's hidden by advertised-calling-convention.
10922
10923 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
10924
10925 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
10926 Remove unused variable (from mac-port).
10927 (macfont_draw): Use s->ybase for correct y position.
10928
10929 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10930
10931 * frame.h (struct frame): Drop has_minibuffer member because...
10932 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
10933 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
10934
10935 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10936
10937 * window.h (struct window): Prefer enum text_cursor_kinds to int
10938 for phys_cursor_type member. Move the latter, phys_cursor_width,
10939 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
10940 * window.c (replace_window, make_window): Adjust users.
10941
10942 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10943
10944 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
10945 this module is never compiled otherwise.
10946
10947 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
10948
10949 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
10950 (Bug#15500).
10951
10952 2013-09-29 Eli Zaretskii <eliz@gnu.org>
10953
10954 * xdisp.c (get_next_display_element): Don't call face_for_font in
10955 a build configured --without-x. (Bug#15484)
10956
10957 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
10958
10959 * window.c (calc_absolute_offset): #elif should be #elif defined.
10960
10961 * frame.c (delete_frame): Block/unblock input to overcome race
10962 condition (Bug#15475).
10963
10964 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
10965
10966 * frame.c (delete_frame): Record selected frame only after
10967 calling Qdelete_frame_functions (Bug#15477).
10968
10969 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
10970
10971 * nsterm.m (ns_selection_color): Remove.
10972 (ns_get_color): Check for ns_selection_(fg|bg)_color using
10973 NSColor selectedText(Background)Color. Only for COCOA.
10974 (ns_term_init): Remove assignment of ns_selection_color, logic
10975 moved to ns_get_color.
10976
10977 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
10978 NS_SELECTION_COLOR_DEFAULT.
10979 (NS_SELECTION_FG_COLOR_DEFAULT): New.
10980
10981 2013-09-28 Eli Zaretskii <eliz@gnu.org>
10982
10983 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
10984 frame' does not have the tool_bar_window member.
10985
10986 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
10987
10988 Signal error when reading an empty byte-code object (Bug#15405)
10989 * lread.c (read1): Signal error.
10990 * alloc.c (make_byte_code): eassert header size.
10991 (sweep_vectors): Change an int to size_t.
10992
10993 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
10994
10995 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
10996 instead of ints, as it's the usual style for offsetof constants. See:
10997 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
10998
10999 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
11000 This is ugly, but it should fix the performance problem for older
11001 GCC versions in the short run. I'll look into integrating the
11002 Gnulib module for popcount, as a better fix.
11003 See the thread starting in:
11004 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
11005 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
11006 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
11007 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
11008 (popcount_size_t): Use it.
11009
11010 2013-09-24 Daniel Colascione <dancol@dancol.org>
11011
11012 * process.c (Fnetwork_interface_info): Fix build break due to
11013 vector changes.
11014
11015 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11016
11017 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
11018 Prefer signed to unsigned integers where either will do.
11019 No need for 'const' on locals that do not escape.
11020 Omit easserts with unnecessary and unportable assumptions about
11021 alignment. Avoid unnecessary casts to char *.
11022
11023 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11024
11025 Use union for the payload of struct Lisp_Vector.
11026 This helps to avoid a few glitches dictated by C's aliasing rules.
11027 * lisp.h (struct Lisp_Vector): Use union for next and
11028 contents member. Adjust comment. Change related users.
11029 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
11030 Related users changed.
11031 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
11032 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
11033 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
11034 * xfaces.c, xfont.c, xmenu.c: Related users changed.
11035
11036 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
11037
11038 Optimize glyph row clearing and copying routines.
11039 * dispextern.h (struct glyph_row): Change layout of struct
11040 glyph_row to help copy_row_except_pointers. Adjust comment.
11041 * dispnew.c (null_row): Remove.
11042 (clear_glyph_row): Use offsetof and memset to find and clear
11043 just the members that need clearing. Adjust comment.
11044 (copy_row_except_pointers): Likewise for copying.
11045
11046 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
11047
11048 Some minor cleanups of recently-added bool vector code.
11049 * conf_post.h (assume): Always return void. Use lint version
11050 only if GCC and MSC versions don't apply.
11051 * conf_post.h (assume):
11052 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
11053 Depend on _MSC_VER, not __MSC_VER, for consistency with
11054 the rest of Emacs.
11055 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
11056 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
11057 (bool_vector_binop_driver, count_trailing_zero_bits)
11058 (size_t_to_host_endian): Now static, not static inline;
11059 the latter isn't needed with modern compilers and doesn't
11060 work with older compilers anyway.
11061
11062 * alloc.c (valgrind_p): Use bool for boolean.
11063
11064 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11065
11066 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
11067 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
11068 (display_last_displayed_message_p, message_buf_print)
11069 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
11070 Use bool for boolean.
11071 * dispextern.h (cancel_line, init_desired_glyphs):
11072 Remove ancient leftover.
11073 (help_echo_showing_p, hourglass_shown_p):
11074 * lisp.h (noninteractive_need_newline): Adjust declaration.
11075
11076 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
11077
11078 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11079 Move to...
11080 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
11081 ...this file and convert the latter to static. Adjust comment.
11082 (make_initial_frame):
11083 * window.c (init_window_once): Adjust user.
11084 * frame.h (last_nonminibuf_frame): Remove declaration.
11085 * lisp.h (selected_frame): Likewise.
11086 * msdos.c (the_only_display_info): Adjust comment.
11087
11088 2013-09-23 Eli Zaretskii <eliz@gnu.org>
11089
11090 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
11091 computing the end column of mouse-highlight that comes from
11092 display or overlay strings. (Bug#15437)
11093 (note_mouse_highlight): Adapt calculation of last argument to
11094 mouse_face_from_string_pos to the above change.
11095
11096 * conf_post.h (__has_builtin): Define to zero, if undefined, on
11097 all platforms, not just for clang.
11098
11099 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
11100
11101 * filelock.c (lock_file_1): Rearrange to remove compiler warning
11102 about excess arguments to snprintf.
11103
11104 * conf_post.h(assume): Use __builtin_unreachable for clang.
11105
11106 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
11107
11108 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
11109 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
11110
11111 2013-09-23 Daniel Colascione <dancol@dancol.org>
11112
11113 * alloc.c (USE_VALGRIND): New macro; on by default
11114 when ENABLE_CHECKING.
11115 (mark_maybe_object, mark_maybe_pointer)
11116 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
11117 valgrind purposes.
11118 (valgrind_p) [USE_VALGRIND]: New variable.
11119 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
11120
11121 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
11122
11123 * process.c (wait_reading_process_output): Change int pnamelen to
11124 socklen_t.
11125
11126 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
11127 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
11128 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
11129 argument to unsigned long to avoid warning.
11130 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
11131
11132 * conf_post.h (assume): Fix compiler error: x shall be cond.
11133
11134 2013-09-22 Daniel Colascione <dancol@dancol.org>
11135
11136 * xfns.c (x_get_monitor_attributes): Suppress unused variable
11137 warning when compiling without a window system.
11138
11139 2013-09-22 Daniel Colascione <dancol@dancol.org>
11140
11141 * data.c (Qbool_vector_p): New symbol.
11142 (bool_vector_spare_mask, popcount_size_t_generic)
11143 (popcount_size_t_msc, popcount_size_t_gcc)
11144 (popcount_size_t)
11145 (bool_vector_binop_driver)
11146 (count_trailing_zero_bits, size_t_to_host_endian)
11147 (Fbool_vector_exclusive_or)
11148 (Fbool_vector_union)
11149 (Fbool_vector_intersection, Fbool_vector_set_difference)
11150 (Fbool_vector_subsetp, Fbool_vector_not)
11151 (Fbool_vector_count_matches)
11152 (Fbool_vector_count_matches_at): New functions.
11153 (syms_of_data): Intern new symbol, functions.
11154 * alloc.c (bool_vector_payload_bytes): New function.
11155 (Fmake_bool_vector): Instead of calling Fmake_vector,
11156 which performs redundant initialization and argument checking,
11157 just call allocate_vector ourselves. Make sure we clear any
11158 terminating padding to zero.
11159 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
11160 instead of open-coding the size calculation.
11161 (vroundup_ct): New macro.
11162 (vroundup): Assume argument >= 0; invoke vroundup_ct.
11163 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
11164 * composite.c (composition_gstring_put_cache):
11165 Change lint_assume to assume.
11166 * conf_post.h (assume): New macro.
11167 (lint_assume): Remove.
11168 * dispnew.c (update_frame_1): Change lint_assume to assume.
11169 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
11170 to assume.
11171 * image.c (gif_load): Change lint_assume to assume.
11172 * lisp.h (eassert_and_assume): New macro.
11173 (Qbool_vector_p): Declare.
11174 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
11175 (swap16, swap32, swap64): New inline functions.
11176 * macfont.m (macfont_shape): Change lint_assume to assume.
11177 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
11178 * xsettings.c (parse_settings): Use new swap16 and
11179 swap32 from lisp.h instead of file-specific macros.
11180
11181 2013-09-22 Eli Zaretskii <eliz@gnu.org>
11182
11183 * xdisp.c (try_window_id): Don't abort if cursor row could not be
11184 found (which can legitimately happen when the glyph row at the
11185 window start is disabled in the current_matrix. (Bug#15365)
11186
11187 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
11188
11189 Fix syntax.h bug introduced by recent INLINE change.
11190 syntax.h defined an extern inline function SYNTAX_ENTRY that was
11191 conditionally compiled one way in some modules, and a different
11192 way in others. This doesn't work with extern inline functions,
11193 which must have the same definition in all modules, because the
11194 defining code might be shared across modules, depending on the
11195 implementation. Symptoms reported by Martin Rudalics in:
11196 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
11197 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
11198 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
11199 overriding the corresponding functions in syntax.h.
11200 * syntax.h (syntax_property_entry, syntax_property_with_flags)
11201 (syntax_property): New inline functions.
11202 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
11203 Rewrite in terms of these new functions.
11204
11205 2013-09-21 Eli Zaretskii <eliz@gnu.org>
11206
11207 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
11208 not chars_in_text, whose result depends on the multibyteness of
11209 the current buffer. (Bug#15426)
11210
11211 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
11212
11213 Port recent change to hosts where pointers aren't 'long'.
11214 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
11215 Don't assume that pointers are the same width as 'long'.
11216 Add a compile-time check that a pointer fits into two X slots.
11217
11218 A simpler, centralized INLINE.
11219 * conf_post.h (INLINE): Define only if not already defined.
11220 This allows us to use a single INLINE, defined by one file
11221 per executable.
11222 * emacs.c (INLINE): Define it.
11223 Also, include category.h, charset.h, composite.h, dispextern.h,
11224 syntax.h, systime.h, so that their INLINE definitions are expanded
11225 properly for Emacs.
11226 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
11227 * buffer.h, buffer.c (BUFFER_INLINE):
11228 * category.h, category.c (CATEGORY_INLINE):
11229 * character.h, character.c (CHARACTER_INLINE):
11230 * charset.h, charset.c (CHARSET_INLINE):
11231 * composite.h, composite.c (COMPOSITE_INLINE):
11232 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
11233 * frame.h, frame.c (FRAME_INLINE):
11234 * intervals.h, intervals.c (INTERVALS_INLINE):
11235 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
11236 * lisp.h, alloc.c (LISP_INLINE):
11237 * process.h, process.c (PROCESS_INLINE):
11238 * syntax.h, syntax.c (SYNTAX_INLINE):
11239 * systime.h, sysdep.c (SYSTIME_INLINE):
11240 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
11241 * window.h, window.c (WINDOW_INLINE):
11242 Remove. All uses replaced with INLINE.
11243
11244 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
11245
11246 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
11247 to avoid Bug#15398.
11248
11249 2013-09-19 Eli Zaretskii <eliz@gnu.org>
11250
11251 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
11252 'const char *' to avoid compiler warnings due to similar change in
11253 the prototype of x_get_string_resource.
11254
11255 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11256
11257 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
11258 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
11259 going to replace static variables below. Adjust comments.
11260 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
11261 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
11262 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
11263 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
11264 Related users changed.
11265 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
11266 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
11267 last_mouse_movement_time, going to replace static variables below.
11268 Adjust comments.
11269 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
11270 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
11271 Remove.
11272 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
11273 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
11274 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
11275 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
11276 static variables below.
11277 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
11278 (last_mouse_scroll_bar): Remove.
11279 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
11280 (mouseExited): Related users changed.
11281
11282 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
11283
11284 Do not use external array to process X scroll bar messages.
11285 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
11286 (x_send_scroll_bar_event): Pack window pointer into two slots
11287 of XClientMessageEvent if we're 64-bit. Adjust comment.
11288 (x_scroll_bar_to_input_event): Unpack accordingly.
11289
11290 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11291
11292 Ifdef away recent changes which aren't relevant to NS port.
11293 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
11294 [!HAVE_NS]: Declare as such.
11295 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
11296 [!HAVE_NS]: Define as such.
11297
11298 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11299
11300 * frame.c (x_redo_mouse_highlight): New function
11301 to factor out common code used in W32 and X ports.
11302 * dispextern.h (x_redo_mouse_highlight): Add prototype.
11303 * xterm.h (struct x_display_info):
11304 * w32term.h (struct w32_display_info):
11305 * nsterm.h (struct ns_display_info): New members
11306 last_mouse_motion_frame, last_mouse_motion_x and
11307 last_mouse_motion_y, going to replace static variables below.
11308 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
11309 (redo_mouse_highlight): Remove.
11310 (note_mouse_movement, syms_of_xterm): Adjust user.
11311 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
11312 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
11313 (redo_mouse_highlight): Remove.
11314 (note_mouse_movement, syms_of_w32term): Adjust user.
11315 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
11316 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
11317 Remove.
11318 (note_mouse_movement, mouseMoved, syms_of_nsterm):
11319 * nsfns.m (compute_tip_xy): Adjust user.
11320
11321 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11322
11323 * frame.c (x_mouse_grabbed): New function.
11324 * dispextern.h (x_mouse_grabbed): Add prototype.
11325 (last_mouse_frame): Remove declaration.
11326 * xterm.h (struct x_display_info):
11327 * w32term.h (struct w32_display_info):
11328 * nsterm.h (struct ns_display_info): New member
11329 last_mouse_frame, going to replace...
11330 * xdisp.c (last_mouse_frame): ...global variable.
11331 (note_tool_bar_highlight):
11332 * w32term.c (w32_mouse_position, w32_read_socket):
11333 * xterm.c (XTmouse_position, handle_one_xevent):
11334 Use x_mouse_grabbed.
11335 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
11336
11337 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11338
11339 * w32term.c (w32_read_socket): Avoid temporary
11340 variables in a call to x_real_positions.
11341 * xterm.c (handle_one_xevent): Likewise.
11342
11343 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11344
11345 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
11346 (x_icon_type): Remove prototype.
11347 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
11348 * frame.c (x_icon_type): Remove.
11349 * w32term.c (x_make_frame_visible, x_iconify_frame):
11350 * xterm.c (x_make_frame_visible, x_iconify_frame):
11351 Use x_set_bitmap_icon to factor out common code.
11352
11353 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11354
11355 * dispextern.h (check_x_display_info, x_get_string_resource):
11356 Declare here just once and unify the latter.
11357 * frame.c (check_x_display_info, x_get_string_resource):
11358 * nsterm.h (check_x_display_info):
11359 * xrdb.c (x_get_string_resource):
11360 * xterm.h (check_x_display_info): Remove prototypes.
11361 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
11362 * w32reg.c (x_get_string_resource): Likewise.
11363 (w32_get_rdb_resource): Adjust user.
11364
11365 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11366
11367 * xterm.h (struct x_display_info): New member
11368 x_pending_autoraise_frame, going to replace...
11369 * xterm.c (pending_autoraise_frame): ...static variable.
11370 (x_new_focus_frame, XTread_socket): Adjust users.
11371 * w32term.h (struct w32_display_info): New member
11372 w32_pending_autoraise_frame, going to replace...
11373 * w32term.c (pending_autoraise_frame): ...global variable.
11374 (x_new_focus_frame, w32_read_socket): Adjust users.
11375
11376 2013-09-17 Glenn Morris <rgm@gnu.org>
11377
11378 * xdisp.c (message_dolog): If we create *Messages*,
11379 switch it to messages-buffer-mode.
11380
11381 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
11382
11383 Don't overuse 'const' in types of locals.
11384 * bidi.c (bidi_count_bytes):
11385 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
11386 (xg_event_is_for_scrollbar):
11387 * xselect.c (x_handle_property_notify)
11388 (x_handle_selection_notify, x_handle_dnd_message):
11389 * xsettings.c, xsettings.h (xft_settings_event):
11390 * xterm.c (x_handle_net_wm_state, handle_one_event)
11391 (x_menubar_window_to_frame, x_detect_focus_change)
11392 (construct_mouse_click, note_mouse_movement)
11393 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11394 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11395 (handle_one_xevent, x_handle_net_wm_state):
11396 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
11397 (x_handle_dnd_message):
11398 Avoid unnecessary 'const', typically the second 'const' in
11399 'const foo * const arg', a 'const' that does not affect the API
11400 and doesn't significantly help the human reader.
11401
11402 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11403
11404 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
11405 only if Glib < 2.36.0.
11406 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
11407 * xsettings.c (init_gconf, init_gsettings): Do not check
11408 for g_type_init.
11409 * xterm.c (handle_one_xevent): Do not call to x_clear_area
11410 if GTK >= 2.7.0.
11411 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
11412
11413 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
11414
11415 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
11416 before calling g_type_init.
11417
11418 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
11419
11420 * nsterm.m (syms_of_nsterm): ... to here.
11421
11422 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11423
11424 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
11425 (ignore_next_mouse_click_timeout): Use Time as X does.
11426 (handle_one_xevent): Avoid cast and use unsigned comparison.
11427
11428 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11429
11430 Do not copy X event in handle_one_xevent except KeyPress case.
11431 Wnen XEvent is processed, it is unlikely to be changed except
11432 KeyPress case, so we can avoid copying and use const pointer to
11433 const data to make sure that an event is not changed elsewhere.
11434 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
11435 const' and do not create local copy except for the KeyPress event.
11436 Use casts to avoid a few glitches. Adjust formatting. Add comments.
11437 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
11438 (x_handle_net_wm_state, x_menubar_window_to_frame)
11439 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
11440 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11441 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
11442 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
11443 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
11444 (x_handle_dnd_message):
11445 * xsettings.c (xft_settings_event):
11446 Use 'const XEvent * const' where appropriate.
11447 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
11448
11449 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11450
11451 Fix X event waiting to handle multiple frames.
11452 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
11453 * xterm.c (pending_event_wait): Remove. Adjust users.
11454 (x_detect_focus_change): Pass frame arg.
11455 (handle_one_xevent): Find related frame early and clear per-frame
11456 wait_event_type only if this is an event for the relevant frame.
11457 (x_wait_for_event): Use per-frame wait_event_type.
11458
11459 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
11460
11461 * nsfns.m (Fx_create_frame): Fix font driver registration for
11462 GNUstep.
11463
11464 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
11465 for syms_of_macfont.
11466
11467 * nsterm.m: Include macfont.h.
11468 (ns_tmp_flags, ns_tmp_font): Remove.
11469 (ns_compute_glyph_string_overhangs): Check for driver Qns.
11470 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
11471 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
11472 (changeFont:): Fix code style. Check for font driver type when
11473 getiing font.
11474
11475 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
11476 (f)->descent.
11477
11478 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
11479 (nsfont_open): Set font driver type.
11480 Set font->ascent and font->descent. Figure out font instead of
11481 ns_tmp_font, and flags instead of ns_tmp_flags.
11482 Fix indentation. Remove call to ns_draw_text_decoration,
11483 moved to nsterm.
11484
11485 * nsfns.m: Include macfont.h.
11486 (Fx_create_frame): Register macfont driver, make a better default font.
11487 (Fns_popup_font_panel): Get font from macfont driver, if used.
11488
11489 * macfont.m, macfont.h, macuvs.h: New files.
11490
11491 * font.h: Declare syms_of_macfont.
11492
11493 * font.c (syms_of_font): Call syms_of_macfont.
11494
11495 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
11496
11497 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11498
11499 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
11500 and it is always zero for others, so I assume that this is an ancient
11501 leftover which nobody will want to change any more.
11502 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
11503 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
11504 * frame.c (x_set_scroll_bar_width):
11505 * w32fns.c (w32_createscrollbar):
11506 * w32term.c (w32_set_vertical_scroll_bar):
11507 * xfns.c (x_set_scroll_bar_default_width):
11508 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
11509 (x_scroll_bar_expose): Related users changed.
11510
11511 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11512
11513 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
11514 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
11515 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
11516 Define as such.
11517 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
11518 Define once here...
11519 * nsterm.h, w32term.h, xterm.h: ...and not here.
11520 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
11521 Remove unused Xisms.
11522 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
11523 these modules are never compiled otherwise.
11524
11525 2013-09-14 Eli Zaretskii <eliz@gnu.org>
11526
11527 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
11528 Doc fix. (Bug#15375)
11529
11530 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11531
11532 Unify Fx_focus_frame between all ports.
11533 * frame.h (x_focus_frame): New prototype.
11534 * xfns.c (Fx_focus_frame): Remove.
11535 (syms_of_xfns): Do not defsubr it.
11536 (x_focus_frame): X implementation.
11537 * nsfns.m (Fx_focus_frame): Remove.
11538 (syms_of_nsfns): Do not defsubr it.
11539 (x_focus_frame): NS implementation.
11540 * w32term.c (Fx_focus_frame): Remove.
11541 (x_focus_on_frame): Rename to...
11542 (x_focus_frame): W32 implementation.
11543 * w32term.h (x_focus_on_frame): Remove prototype.
11544 * w32fns.c (Fx_focus_frame): Remove.
11545 (syms_of_w32fns): Do not defsubr it.
11546 * frame.c (Fx_focus_frame): Define here.
11547 (syms_of_frame): Defsubr here.
11548 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
11549
11550 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11551
11552 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
11553 All of them are replaced with FRAME_DISPLAY_INFO, defined in
11554 each port to reference the port-specific window system data.
11555 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
11556 (FRAME_DISPLAY_INFO): Define.
11557 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
11558 (FRAME_DISPLAY_INFO): Define. Adjust users.
11559 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
11560 (FRAME_DISPLAY_INFO): Define. Adjust users.
11561 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
11562 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
11563 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
11564 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
11565 * xselect.c, xterm.c: All related users changed.
11566
11567 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11568
11569 * xterm.h (x_window_to_frame, x_any_window_to_frame)
11570 (x_menubar_window_to_frame): Remove prototypes.
11571 * xfns.c (x_window_to_frame, x_any_window_to_frame)
11572 (x_menubar_window_to_frame, x_top_window_to_frame):
11573 Move from here...
11574 * xterm.c (x_window_to_frame, x_any_window_to_frame)
11575 (x_menubar_window_to_frame, x_top_window_to_frame):
11576 ...to here and convert all but the last to static.
11577
11578 2013-09-12 Eli Zaretskii <eliz@gnu.org>
11579
11580 * lisp.mk (lisp): Add w32-common-fns.elc.
11581
11582 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
11583
11584 * charset.c (char_charset): Document an exception for char-charset.
11585
11586 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11587
11588 * xterm.h (x_display_info): New field last_user_time...
11589 * xterm.c (toplevel): ...to replace static last_user_time.
11590 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
11591
11592 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11593
11594 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
11595 scroll bar values to prevent thumb from disappear and update comment.
11596
11597 2013-09-11 Glenn Morris <rgm@gnu.org>
11598
11599 * emacs.c (usage_message): Possessive apostrophe tweak.
11600
11601 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11602
11603 * nsterm.m (syms_of_nsterm): Use Qns.
11604 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
11605 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
11606 * xfns.c (x_display_info_for_name, Fx_open_connection):
11607 Remove old '#if 0' code.
11608 (syms_of_xfns): Use Qx.
11609 * termhooks.h (fullscreen_hook): Remove the leftover.
11610 (struct terminal): Fix typo in comment.
11611
11612 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11613
11614 Cleaning up a few X scroll bar bits.
11615 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
11616 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11617 New member last_seen_part, going to replace...
11618 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
11619 (xt_action_hook) [USE_LUCID]: Adjust user.
11620 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
11621 Lucid-specific scroll bar support.
11622 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
11623 to int and adjust to use last_seen_part member.
11624 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
11625 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11626 Initialize last_seen_part.
11627
11628 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11629
11630 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
11631 insert-buffer-substring an empty string.
11632
11633 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11634
11635 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
11636 avoiding a GCC warning.
11637
11638 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11639
11640 Ifdef away frame tool bar code when it is not really used.
11641 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
11642 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
11643 and minimize_tool_bar_window_p under the above.
11644 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
11645 (fset_tool_bar_window): Likewise.
11646 * dispnew.c (clear_current_matrices, clear_desired_matrices)
11647 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
11648 (change_frame_size_1):
11649 * window.c (window_from_coordinates, Frecenter): Adjust users.
11650 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
11651 code is not really used.
11652 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
11653 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
11654 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
11655 [!USE_GTK && !HAVE_NS]: Define as such.
11656 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
11657 (note_mouse_highlight, expose_frame):
11658 * xfns.c (x_set_tool_bar_lines):
11659 * xterm.c (handle_one_xevent): Adjust users.
11660
11661 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11662
11663 Fix corruption with multiple emacsclient -t instances (Bug#15222).
11664 This bug was introduced by my 2013-08-26 patch, which incorrectly
11665 assumed that the terminfo implementation doesn't use termcap buffers.
11666 * term.c (init_tty) [TERMINFO]: Remove optimization, as
11667 these buffers apparently are used after all.
11668 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
11669 (struct tty_display_info): Define members termcap_term_buffer and
11670 termcap_strings_buffer even if TERMINFO.
11671
11672 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11673
11674 Fix last change.
11675 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
11676 'usage' docstring entry to pacify make-docfile.
11677
11678 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
11679
11680 Change comparison functions =, <, >, <=, >= to take many arguments.
11681 * data.c: Change comparison functions' interface and implementation.
11682 * lisp.h: Make arithcompare available for efficient two arg
11683 comparisons.
11684 * bytecode.c: Use arithcompare.
11685 * fileio.c: Use new interface.
11686
11687 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11688
11689 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
11690
11691 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
11692
11693 * eval.c (Feval): Document the new use of `lexical'.
11694
11695 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11696
11697 Review and drop old frame resize hack.
11698 * frame.h (struct frame): Remove force_flush_display_p.
11699 * dispnew.c (update_frame): Adjust user and don't call
11700 flush_frame here. The comment has said that there was an issues
11701 with redisplaying fringes, but I don't see any differences with
11702 and without this hack. Hopefully we can continue without it.
11703 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
11704 current frame matrices twice if resized_p is set.
11705
11706 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11707
11708 Do not populate pure Xism x_sync to other ports.
11709 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
11710 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
11711 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
11712 * w32term.h (x_sync): Remove prototype.
11713
11714 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11715
11716 Cleanup frame flushing.
11717 * dispextern.h (struct redisplay_interface):
11718 Drop flush_display_optional because flush_display is enough
11719 for X and flushing via RIF is just a no-op for others.
11720 * frame.h (flush_frame): New function.
11721 * dispnew.c (update_frame):
11722 * minibuf.c (read_minibuf):
11723 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
11724 Use it.
11725 * keyboard.c (detect_input_pending_run_timers): Do not flush
11726 all frames but selected one in redisplay_preserve_echo_area.
11727 * nsterm.m (ns_flush): Remove no-op.
11728 (ns_redisplay_interface): Adjust user.
11729 * w32term.h (x_flush): Remove no-op.
11730 (w32_redisplay_interface): Adjust user.
11731 * xterm.c (x_flush): Simplify because we do not flush all
11732 frames at once any more. Adjust comment.
11733 (x_redisplay_interface): Adjust user.
11734
11735 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
11736
11737 Port --without-x --enable-gcc-warnings to Fedora 19.
11738 * gfilenotify.c (globals_of_gfilenotify):
11739 Call g_type_init only if using an older glib version that needs it.
11740
11741 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11742
11743 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11744 (last_glyphless_glyph_merged_face_id): Remove declarations.
11745 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
11746 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11747 (last_glyphless_glyph_merged_face_id): Now static.
11748 (merge_escape_glyph_face): New function, refactored from...
11749 (get_next_display_element): ...here.
11750 (merge_glyphless_glyph_face): New function, refactored from...
11751 (produce_glyphless_glyph): ...here...
11752 * term.c (produce_glyphless_glyph): ...and here.
11753
11754 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
11755
11756 * eval.c (eval_sub): Only call Ffunction if necessary.
11757
11758 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11759
11760 Attempt to make redisplay more selective when changing cursor type.
11761 * frame.h (struct frame): New bitfield cursor_type_changed.
11762 * xdisp.c (cursor_type_changed): Remove.
11763 (try_cursor_movement, redisplay_window, try_window_id)
11764 (set_frame_cursor_types, try_window_reusing_current_matrix):
11765 Adjust to use per-frame bitfield.
11766 (redisplay_internal): Look for cursor type change on each visible
11767 frame and consider all frames if cursor type has been changed on
11768 the frame other than selected. If cursor type has been changed on
11769 selected frame only, do not use fast update.
11770
11771 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11772
11773 Attempt to make redisplay more selective when changing fonts.
11774 * frame.h (struct frame): New bitfield fonts_changed.
11775 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
11776 (adjust_frame_glyphs): Add prototype.
11777 * dispnew.c (fonts_changed_p): Remove.
11778 (adjust_glyphs): Remove because we do not
11779 adjust matrices on all frames at once any more.
11780 (adjust_frame_glyphs): Block and unblock input here.
11781 (adjust_glyph_matrix): Use fonts_changed.
11782 (change_frame_size_1): Use adjust_frame_glyphs.
11783 * font.c (font_open_entity): Use fonts_changed.
11784 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
11785 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
11786 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
11787 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
11788 (shrink_mini_window, Fresize_mini_window_internal)
11789 (window_scroll_pixel_based, Fset_window_configuration)
11790 (apply_window_adjustment, Fset_window_vscroll):
11791 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
11792 Use adjust_frame_glyphs.
11793 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
11794 (try_window_reusing_current_matrix, try_window_id, display_line)
11795 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
11796 (redisplay_internal): Consider fonts_changed and adjust frame
11797 matrices for each frame only if the frame is visible. If font
11798 has been changed on some frame during full redisplay, retry
11799 only visible frames where the font has been actually changed.
11800
11801 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11802
11803 Cache current header and mode line height for each window.
11804 * window.h (struct window): New fields mode_line_height
11805 and header_line_height.
11806 * window.c (make_window): Initialize them.
11807 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
11808 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
11809 (current_mode_line_height, current_header_line_height):
11810 Remove declaration.
11811 * xdisp.c (current_mode_line_height, current_header_line_height):
11812 Remove.
11813 (pos_visible_p, init_xdisp): Adjust user.
11814 (redisplay_window): Invalidate mode_line_height and
11815 header_line_height if current and desired matrices do not agree.
11816
11817 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11818
11819 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
11820 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
11821
11822 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11823
11824 Make --without-x compatible with --enable-gcc-warnings.
11825 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
11826 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
11827 members under HAVE_WINDOW_SYSTEM.
11828 * keyboard.c (make_lispy_focus_out): Likewise.
11829 (record_menu_key): Move under HAVE_MENUS.
11830 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
11831 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
11832 (syms_of_xdisp): Adjust user.
11833 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
11834 (start_hourglass, cancel_hourglass):
11835 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
11836 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
11837 and CLEAR_FONT_TABLE_NFONTS.
11838 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
11839 Declare only if HAVE_WINDOW_SYSTEM.
11840 (lface_same_font_attributes_p, clear_face_gcs): Define only
11841 if HAVE_WINDOW_SYSTEM.
11842
11843 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11844
11845 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
11846 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
11847 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
11848
11849 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
11850
11851 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
11852
11853 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
11854
11855 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
11856 This fixes a type error on hosts where ptrdiff_t is wider than int.
11857
11858 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
11859
11860 * keyboard.c (read_key_sequence_vs): New function.
11861 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
11862 common code.
11863
11864 * callint.c (Fcall_interactively): Always return a vector for 'K'.
11865
11866 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
11867
11868 Makefile improvements.
11869 * Makefile.in (config.status): Don't use double-colon rules, as
11870 they are not portable according to POSIX. Fix shell typo with `;
11871 I guess this rule has never been tested?
11872 (VCSWITNESS): New macro, to override any environment var.
11873
11874 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
11875
11876 * xterm.h (struct x_display_info): Do not track X connection
11877 fd separately because it is always available from Display.
11878 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
11879 Adjust users.
11880
11881 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11882
11883 * buffer.c (drop_overlay):
11884 * fileio.c (restore_point_unwind): Prefer unchain_marker to
11885 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
11886
11887 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11888
11889 * buffer.c (Fmake_overlay, Fmove_overlay):
11890 * intervals.c (set_point_from_marker):
11891 * print.c (PRINTPREPARE): Prefer signal_error
11892 to plain error and report unsuitable marker too.
11893
11894 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11895
11896 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
11897 for 'dragging' member.
11898 (struct x_output): Remove set-but-unused leftovers
11899 'left_before_move' and 'top_before_move'.
11900 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
11901 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
11902 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
11903 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
11904 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
11905 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11906 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
11907 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
11908
11909 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
11910
11911 * nsfont.m (INVALID_GLYPH): New define.
11912 (nsfont_encode_char): Use INVALID_GLYPH.
11913 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
11914
11915 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11916
11917 * xterm.c (x_last_mouse_movement_time): Revert last change.
11918 This code should use XDisplayMotionBufferSize to check display's
11919 motion history first, and there are few other issues as well.
11920 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
11921 (handle_one_xevent): Adjust user.
11922
11923 2013-09-02 Martin Rudalics <rudalics@gmx.at>
11924
11925 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
11926 * frame.c (Flast_nonminibuf_frame): ... to here.
11927 (check_minibuf_window): Don't abort if no window was found
11928 (Bug#15247).
11929
11930 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11931
11932 Use XGetMotionEvents to ask the last mouse motion time from X server.
11933 * xterm.c (X_MOTION_HISTORY): Default to 1.
11934 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
11935 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
11936 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
11937 Ifdef away legacy code.
11938 (XTmouse_position, x_scroll_bar_report_motion):
11939 Use x_last_mouse_movement_time.
11940 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
11941 UnmapNotify event.
11942
11943 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11944
11945 * msdos.c (last_mouse_window): Move to...
11946 (dos_rawgetc): ...this function and adjust comment.
11947 * nsterm.m (last_window): Rename to last_mouse_window, move to...
11948 (mouseMoved): ...this function and adjust comment.
11949 * w32term.c (last_window): Likewise with...
11950 (w32_read_socket): ...this function.
11951 * xterm.c (last_window): Likewise with...
11952 (handle_one_xevent): ...this function.
11953
11954 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11955
11956 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
11957 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
11958 (handle_one_xevent): ...to here.
11959 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
11960 otherwise.
11961
11962 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11963
11964 * msdos.c (IT_set_terminal_window): Remove no-op.
11965 (initialize_msdos_display): Adjust terminal setup.
11966 * w32console.c (w32con_set_terminal_window): Remove no-op.
11967 (initialize_w32_display): Adjust terminal setup.
11968 * w32term.c (w32_set_terminal_window): Remove no-op.
11969 (w32_create_terminal): Adjust terminal setup.
11970 * xterm.c (XTset_terminal_window): Remove no-op.
11971 (x_create_terminal): Adjust terminal setup.
11972
11973 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
11974
11975 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
11976 Remove no-ops.
11977 (ns_create_terminal): Adjust terminal setup.
11978 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
11979 Remove no-ops.
11980 (w32_create_terminal): Adjust terminal setup.
11981 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
11982 Remove no-ops.
11983 (x_create_terminal): Adjust terminal setup.
11984
11985 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
11986
11987 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
11988 (CLIP_TEXT_POS_FROM_MARKER): New macro.
11989 * dispnew.c (buffer_posn_from_coords):
11990 * window.c (Fwindow_end, displayed_window_lines):
11991 * xdisp.c (redisplay_mode_lines): Use it.
11992
11993 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
11994
11995 * fontset.c (face_for_char): Check char in the current face font first
11996 if HAVE_NS (Bug#15138).
11997
11998 2013-08-31 Martin Rudalics <rudalics@gmx.at>
11999
12000 * window.c (temp_output_buffer_show): Make sure window returned
12001 by display_buffer is live (Bug#15213).
12002
12003 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
12004
12005 Minor cleanup to avoid forward declarations.
12006 * coding.h (struct ccl_spec): Remove forward declaration.
12007 * composite.h (toplevel): Include font.h.
12008 (struct composition_it, struct face, struct font_metrics):
12009 Remove forward declaration.
12010 * dispextern.h (struct image, struct atimer): Likewise.
12011 * emacsgtkfixed.h (struct frame): Likewise.
12012 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
12013 * font.h (struct font_driver, struct font, struct glyph_string)
12014 (struct face): Remove forward declaration.
12015 * fontset.h (struct face, struct font): Likewise.
12016 * frame.h (toplevel): Style cleanup.
12017 (enum output_method): Move to...
12018 * termhooks.h (enum output_method): ...here.
12019 (struct glyph, struct frame, struct ns_display_info)
12020 (struct x_display_info, struct w32_display_info):
12021 Remove forward declaration.
12022 * xterm.h (toplevel): Include termhooks.h.
12023 (struct font, struct window, struct glyph_matrix, struct frame)
12024 (struct input_event, struct face, struct image): Remove forward
12025 declaration.
12026 * gtkutil.h (struct _widget_value): Likewise.
12027 * keyboard.h (toplevel): Include termhooks.h.
12028 (struct input_event): Remove forward declaration.
12029
12030 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12031
12032 * intervals.c (set_point_from_marker): New function.
12033 * editfns.c (Fgoto_char):
12034 * process.c (Finternal_default_process_filter):
12035 * window.c (select_window_1): Use it.
12036 * buffer.h (set_point_from_marker): Add prototype.
12037
12038 2013-08-29 Eli Zaretskii <eliz@gnu.org>
12039
12040 * w32.c (term_winsock): Call release_listen_threads before calling
12041 WSACleanup.
12042 (_sys_wait_accept): Wait for accept event in a loop with a finite
12043 timeout, instead of waiting indefinitely. Will hopefully avoid
12044 hanging during exit because WSACleanup deadlocks waiting for the
12045 event object to be released. (Bug#14333)
12046
12047 * w32proc.c (release_listen_threads): New function, signals all
12048 the reader threads that listen for connections to stop waiting.
12049
12050 * w32.h (release_listen_threads): Add prototype.
12051
12052 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12053
12054 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
12055 field of new marker (for sanity and safety).
12056 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
12057 anyway because XMISCTYPE is a function and can't be an lvalue).
12058
12059 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12060
12061 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
12062 (x_after_update_window_line, x_scroll_bar_create)
12063 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
12064 (handle_one_xevent, x_clear_frame_area):
12065 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
12066 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
12067 * xterm.h (x_clear_area): Adjust prototype.
12068
12069 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
12070
12071 Hook scanning and indentation functions to find_newline. This helps
12072 to avoid duplicated code and renders more respect to newline cache.
12073 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
12074 * cmds.c (Fforward_line):
12075 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
12076 Use find_newline and avoid unnecessary point movements.
12077 * search.c (scan_newline): Implement on top of find_newline.
12078
12079 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
12080
12081 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
12082 scoped code (bug#11258).
12083
12084 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
12085
12086 * nsterm.m (last_window): New variable.
12087 (EV_TRAILER2): New macro.
12088 (EV_TRAILER): Call EV_TRAILER2.
12089 (mouseMoved:): Add support for mouse-autoselect-window
12090 on nextstep (Bug#6888).
12091
12092 2013-08-28 Andreas Schwab <schwab@suse.de>
12093
12094 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
12095 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
12096 Remove unused macro definitions.
12097 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
12098 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
12099 Only define if emacs.
12100
12101 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12102
12103 Prefer enum glyph_row_area to int where appropriate.
12104 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
12105 Fix comment.
12106 (window_box, window_box_width, window_box_left, window_box_left_offset)
12107 (window_box_right, window_box_right_offset): Adjust prototypes.
12108 * xdisp.c (window_box, window_box_width, window_box_left)
12109 (window_box_left_offset, window_box_right, window_box_right_offset):
12110 Use enum glyph_row_area. Adjust users and tweak comment where needed.
12111 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
12112 * nsterm.m (ns_clip_to_row):
12113 * w32term.c (w32_clip_to_row):
12114 * xterm.c (x_clip_to_row): Likewise.
12115
12116 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12117
12118 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
12119 (Fprevious_overlay_change): Fast path for buffer with no overlays.
12120
12121 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
12122
12123 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
12124 for portability to hosts where /bin/sh has problems.
12125
12126 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
12127
12128 Redesign redisplay interface to drop global output_cursor.
12129 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
12130 (toplevel): Remove declaration of output_cursor.
12131 (set_output_cursor, x_cursor_to): Remove prototype.
12132 * window.h (struct window): New member output_cursor.
12133 (output_cursor_to): New function to replace RIF member.
12134 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
12135 (update_text_area, set_window_cursor_after_update): Use it.
12136 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
12137 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12138 * nsterm.m (ns_update_window_begin, ns_update_window_end):
12139 * w32term.c (x_update_window_begin, x_update_window_end):
12140 * xterm.c (x_update_window_begin, x_update_window_end):
12141 Adjust to use per-window output cursor.
12142
12143 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
12144
12145 Simplify SELECT_TYPE-related code.
12146 Like EMACS_TIME, this portability layer is no longer needed, since
12147 Emacs has been using fd_set as a portability layer for some time.
12148 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
12149 (SELECT_TYPE): Remove. All uses changed to fd_set.
12150 (fd_set) [!FD_SET]: New typedef.
12151
12152 Simplify EMACS_TIME-related code.
12153 This portability layer is no longer needed, since Emacs has been
12154 using struct timespec as a portability layer for some time.
12155 * atimer.h, buffer.h, dispextern.h, xgselect.h:
12156 Include <time.h> rather than "systime.h"; that's all that's needed now.
12157 * dispnew.c: Include <timespec.h> rather than "systime.h";
12158 that's all that's needed now.
12159 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
12160 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
12161 TIMESPEC_RESOLUTION.
12162 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
12163 LOG10_TIMESPEC_RESOLUTION.
12164 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
12165 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
12166 (make_emacs_time): Remove. All used changed to make_timespec.
12167 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
12168 (current_timespec): Rename from current_emacs_time. All uses changed.
12169 (add_emacs_time): Remove. All uses changed to timespec_add.
12170 (sub_emacs_time): Remove. All uses change dot timespec_sub.
12171 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
12172 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
12173 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
12174 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
12175 (current_timespec): Rename from current_emacs_time. All uses changed.
12176 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
12177 changed to timespec_cmp.
12178 * xgselect.c: Include <timespec.h>, since our .h files don't.
12179
12180 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12181
12182 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
12183 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
12184 Remove the leftovers.
12185 * gtkutil.c (toplevel): Do not declare Qxft but include
12186 font.h to do so.
12187 * image.c (toplevel): Do not declare Vlibrary_cache because
12188 it's already done in lisp.h.
12189
12190 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
12191
12192 * lisp.h (Mouse_HLInfo): Move from here...
12193 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
12194 (reset_mouse_highlight): New function.
12195 * msdos.c (dos_set_window_size, IT_update_begin)
12196 (internal_terminal_init):
12197 * nsterm.m (ns_update_window_end, x_free_frame_resources)
12198 (ns_initialize_display_info):
12199 * w32console.c (initialize_w32_display):
12200 * w32term.c (x_update_window_end, x_free_frame_resources)
12201 (w32_initialize_display_info):
12202 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
12203 * window.c (Fdelete_other_windows_internal):
12204 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
12205 * termchar.h (toplevel):
12206 * xterm.h (toplevel): Include dispextern.h.
12207
12208 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12209
12210 Fix minor problems found by static checking.
12211 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
12212 (expect): Avoid nested-if warning.
12213 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
12214 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
12215 * nsterm.h, nsterm.m (ns_select):
12216 * xgselect.c, xgselect.h (xg_select):
12217 Adjust signature to better match pselect's.
12218 * nsterm.m (ns_select):
12219 Don't set *TIMEOUT, since pselect doesn't.
12220 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
12221 diagnostic about assigning const char * to it.
12222 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
12223
12224 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
12225
12226 * lread.c (substitute_object_recurse): Handle hash-tables as well
12227 (bug#15190).
12228
12229 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
12230
12231 Fix unlikely core dump in init_tty, and simplify terminfo case.
12232 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
12233 The old version incorrectly dumped core if malloc returned a
12234 buffer containing only non-NUL bytes.
12235 (init_tty): Do not allocate or free termcap buffers; the
12236 struct does that for us now.
12237 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
12238 (struct tty_display_info): Define members termcap_term_buffer and
12239 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
12240 use them. Allocate them directly in struct rather than indirectly
12241 via a pointer, to simplify init_tty.
12242
12243 * frame.c (check_minibuf_window): Initialize 'window' properly,
12244 so that Emacs reliably aborts later if 'window' is not initialized.
12245
12246 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
12247
12248 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
12249 of VoidSymbol (Bug#15154).
12250
12251 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12252
12253 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
12254 mouse_face_beg_y and mouse_face_end_y.
12255 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
12256 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
12257 Adjust users and update comment where appropriate.
12258
12259 2013-08-26 Martin Rudalics <rudalics@gmx.at>
12260
12261 * frame.c (check_minibuf_window): New function.
12262 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
12263 Call check_minibuf_window (Bug#15183).
12264
12265 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12266
12267 * window.h (struct window): Replace last_cursor with last_cursor_vpos
12268 because this is the only last cursor data we need to keep and consult.
12269 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
12270 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
12271 Adjust users.
12272
12273 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12274
12275 Fix recovering from possible decompression error.
12276 Since insert_from_gap doesn't always move point, we can't use PT as
12277 the position where the partially decompressed data ends, and
12278 should count how many bytes was produced so far.
12279 * decompress.c (struct decompress_unwind_data): Add nbytes member.
12280 (unwind_decompress): Really delete partially uncompressed data.
12281 (Fzlib_decompress_region): Take decompressed data size into account.
12282
12283 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
12284
12285 * syntax.c (init_syntax_once): Adjust comment and do an early
12286 initialization of Qchar_table_extra_slots just once...
12287 * casetab.c (init_casetab_once):
12288 * category.c (init_category_once):
12289 * character.c (syms_of_character):
12290 * coding.c (syms_of_coding):
12291 * xdisp.c (syms_of_xdisp): ...and omit it here.
12292
12293 2013-08-24 Eli Zaretskii <eliz@gnu.org>
12294
12295 * xdisp.c (get_next_display_element): Don't apply to characters
12296 from a display vector the logic of setting it->end_of_box_run_p
12297 suitable for characters from a buffer. (Bug#15175)
12298
12299 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
12300 to handle directories, rather than '_utime' which doesn't.
12301 (Bug#15176)
12302
12303 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
12304
12305 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
12306 or fullscreen (Bug#14627).
12307
12308 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
12309
12310 System-dependent integer overflow fixes.
12311 * process.c (Fset_process_window_size): Signal an error if
12312 the window size is outside the range supported by the lower level.
12313 * sysdep.c (set_window_size): Return negative on error,
12314 nonnegative on success, rather than -1, 0, 1 on not in system,
12315 failure, success. This is simpler. Caller changed.
12316 (serial_configure): Remove unnecessary initialization of local.
12317 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
12318 size fits in unsigned long; this isn't true on some 32-bit hosts.
12319 Avoid buffer overrun if some future version of /proc/meminfo has a
12320 variable name longer than 20 bytes.
12321 (system_process_attributes) [__FreeBSD__]:
12322 Don't assume hw.availpages fits in 'int'.
12323
12324 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
12325
12326 Don't let very long directory names overrun the stack.
12327 Fix some related minor problems involving "//", vfork.
12328 * callproc.c (encode_current_directory): New function.
12329 (call_process): Don't append "/"; not needed.
12330 * fileio.c (file_name_as_directory_slop): New constant.
12331 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
12332 this can save the caller having to alloca.
12333 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
12334 Use SAFE_ALLOCA, not alloca.
12335 (directory_file_name, Fexpand_file_name): Leave leading "//"
12336 alone, since it can be special even on POSIX platforms.
12337 * callproc.c (call_process):
12338 * process.c (Fformat_network_address):
12339 * sysdep.c (sys_subshell):
12340 Use encode_current_directory rather than rolling our own.
12341 (create_process): No need to encode directory; caller does that now.
12342 * process.h (encode_current_directory): New decl.
12343 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
12344 Rework to avoid 'goto xyzzy;'.
12345
12346 2013-08-23 Eli Zaretskii <eliz@gnu.org>
12347
12348 * xdisp.c (handle_face_prop): If the default face was remapped use
12349 the remapped face for strings from prefix properties. (Bug#15155)
12350
12351 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12352
12353 Minor cleanup for redisplay interface and few related functions.
12354 * frame.h (enum text_cursor_kinds): Move from here...
12355 * dispextern.h (enum text_cursor_kinds): ...to here.
12356 (toplevel): Drop unnecessary declarations.
12357 (struct redisplay_interface): Use bool and enum text_cursor_kinds
12358 in update_window_end_hook and draw_window_cursor functions.
12359 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
12360 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
12361 * w32term.c (x_update_window_end, w32_draw_window_cursor):
12362 * xterm.c (x_update_window_end, x_draw_window_cursor):
12363 * xdisp.c (display_and_set_cursor, update_window_cursor)
12364 (update_cursor_in_window_tree, x_update_cursor): Use bool and
12365 enum text_cursor_kinds where appropriate.
12366
12367 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12368
12369 Redesign redisplay interface to drop updated_row and updated_area.
12370 * dispextern.h (updated_row, updated_area): Remove declaration.
12371 (struct redisplay_interface): Pass glyph row and row area parameters
12372 to write_glyphs, insert_glyphs and clear_end_of_line functions.
12373 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12374 Adjust prototypes.
12375 * dispnew.c (updated_row, updated_area): Remove.
12376 (redraw_overlapped_rows, update_window_line): Adjust user.
12377 (update_marginal_area, update_text_area): Likewise. Pass updated row
12378 as a parameter. Prefer enum glyph_row_area to int where appropriate.
12379 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12380 Adjust users.
12381
12382 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
12383
12384 * process.c (flush_pending_output): Remove stub.
12385 All uses removed.
12386
12387 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12388
12389 * callproc.c: Fix race that killed background processes (Bug#15144).
12390 (call_process): New arg TEMPFILE_INDEX. Callers changed.
12391 Record deleted process-id in critical section, not afterwards.
12392 Don't mistakenly kill process created by a call-process invocation
12393 that discards output and does not wait.
12394
12395 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
12396
12397 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
12398 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
12399 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
12400 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
12401 to shut up compiler in mark_object.
12402 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
12403
12404 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12405
12406 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
12407 We can't portably rely on PTY_OPEN doing that, even if
12408 it calls posix_openpt with O_CLOEXEC.
12409
12410 2013-08-20 Kenichi Handa <handa@gnu.org>
12411
12412 * character.c (string_char): Improve commentary.
12413
12414 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
12415
12416 * image.c (SIGNATURE_DIGESTSIZE): Remove.
12417 (struct animation_cache): Make signature a flexible array member.
12418 All uses changed. This is a tad slower but may insulate us better
12419 from future changes to ImageMagick.
12420
12421 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12422
12423 * image.c: Shrink memory needed for animation cache.
12424 (SIGNATURE_DIGESTSIZE): New constant.
12425 (struct animation_cache): Make 'signature' a fixed size array of bytes.
12426 (imagemagick_create_cache): Copy the signature. This saves
12427 several KB of memory that ImageMagick wastes per signature.
12428 Don't bother updating the update_time, as the caller does that now.
12429 (imagemagick_prune_animation_cache): Don't destroy the signature, as
12430 it's a fixed size struct member now.
12431 (imagemagick_get_animation_cache): Always destroy the signature,
12432 as it's now imagemagick_create_cache's responsibility to copy it.
12433 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
12434 and use memcmp rather than strcmp.
12435 eassert that ImageMagick returns a signature of the specified length.
12436
12437 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
12438
12439 * image.c (imagemagick_get_animation_cache): Don't segfault on
12440 each invocation.
12441 (imagemagick_get_animation_cache): Revert to previous definition
12442 so that it actually works. But keep the memory leak fix.
12443 (imagemagick_get_animation_cache): Fix memory leak.
12444
12445 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12446
12447 * image.c: Fix animation cache signature memory leak.
12448 Fix some other minor performance problems while we're at it.
12449 (imagemagick_create_cache): Clear just the members that
12450 need clearing. Don't set update_time, as caller does that now.
12451 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
12452 Simplify by using pointer-to-pointer instead of a prev pointer.
12453 (imagemagick_prune_animation_cache): Use make_emacs_time rather
12454 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
12455 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
12456 it's already a copy. Free the signature probe unless it's cached.
12457
12458 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
12459 This was introduced by my 2013-08-12 fix for Bug#15035.
12460
12461 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
12462
12463 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
12464 (imagemagick_prune_animation_cache): Now static.
12465
12466 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
12467
12468 * image.c (imagemagick_get_animation_cache): Don't segfault when
12469 pruning all entries.
12470
12471 2013-08-18 Ken Brown <kbrown@cornell.edu>
12472
12473 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
12474 static heap if ENABLE_CHECKING is defined.
12475 (max_bss_sbrk_ptr): New variable.
12476 (bss_sbrk): Use it.
12477 (report_sheap_usage): Report maximum static heap usage instead of
12478 ending static heap usage.
12479
12480 2013-08-17 Eli Zaretskii <eliz@gnu.org>
12481
12482 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
12483 of zlib_initialized according to the results of calling
12484 init_zlib_functions.
12485
12486 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
12487
12488 * image.c: Implement an ImageMagick per-image cache.
12489 (imagemagick_get_animation_cache): Fix a double-free error.
12490 (imagemagick_load_image): Remove the ping_wand code, which only
12491 apparently saved time on invalid animated images, and slowed down
12492 everything else. Optimize for the common case.
12493
12494 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
12495
12496 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
12497
12498 * editfns.c (insert_before_markers): Mention overlay in the doc string.
12499
12500 * marker.c (set_marker): Remove documentation of undefined behavior.
12501
12502 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12503
12504 * image.c (imagemagick_compute_animated_image): Animate correctly
12505 when sub-images are smaller than the main image.
12506 (imagemagick_compute_animated_image): Setting the iterator row to
12507 zero is apparently not allowed.
12508 (imagemagick_compute_animated_image): Allow images that say they
12509 have sub-images that are bigger than the main image, but just crop
12510 them.
12511
12512 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
12513
12514 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
12515
12516 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12517
12518 * image.c (imagemagick_compute_animated_image): Respect the GIF
12519 disposal methods.
12520
12521 2013-08-15 Ken Brown <kbrown@cornell.edu>
12522
12523 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
12524 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
12525 needed.
12526
12527 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
12528
12529 Fix minor problems found by static checking.
12530 * frame.c (delete_frame):
12531 * xdisp.c (next_element_from_display_vector):
12532 Avoid uninitialized local.
12533 * image.c (imagemagick_compute_animated_image): Port to C89.
12534 Prefer usual GNU indentation style for loops.
12535 Be more careful about bizarrely large sizes, by using ptrdiff_t
12536 instead of int.
12537
12538 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12539
12540 Fix infinite frame selection loop (Bug#15025).
12541 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
12542
12543 2013-08-15 Eli Zaretskii <eliz@gnu.org>
12544
12545 * xdisp.c (compute_window_start_on_continuation_line):
12546 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
12547 to make sure we end up setting the window start at the leftmost
12548 visible character of the display line. This avoids funky
12549 horizontal shifting because the window start is not kept on the
12550 same position. (Bug#15090)
12551 (next_element_from_display_vector): Support 'box' face attribute
12552 in the face definitions of a display vector. (Bug#15099)
12553
12554 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12555
12556 * image.c (imagemagick_compute_animated_image): Implement animated
12557 images (bug#14700).
12558 (imagemagick_compute_animated_image): Fix some compilation
12559 warnings. Implement a very simple cache to make the animation
12560 usable at all, but it should be replaced with a per-image cache.
12561
12562 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12563
12564 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
12565 to do `for' loops over alist values.
12566 * buffer.h (FOR_EACH_BUFFER):
12567 * process.c (FOR_EACH_PROCESS): Use it.
12568 (handle_child_signal, status_notify, Fget_buffer_process)
12569 (kill_buffer_processes): Use FOR_EACH_PROCESS.
12570
12571 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12572
12573 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
12574 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
12575 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
12576 to xzalloc and so avoid redundant call to memset.
12577 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
12578 members because it is allocated with xzalloc and so already zeroed.
12579
12580 2013-08-14 Ken Brown <kbrown@cornell.edu>
12581
12582 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
12583 (Bug#15094).
12584
12585 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12586
12587 Utility function and macro to copy Lisp string to C string.
12588 * lisp.h (xlispstrdupa): New macro.
12589 (xlispstrdup): New prototype.
12590 * alloc.c (xlispstrdup): New function.
12591 * callint.c (Fcall_interactively):
12592 * fileio.c (Ffile_name_directory, Fexpand_file_name)
12593 (Fsubstitute_in_file_name):
12594 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
12595 * image.c (x_create_bitmap_from_file):
12596 * w32term.c (w32_term_init):
12597 * xterm.c (x_term_init): Use xlispstrdup.
12598
12599 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12600
12601 * image.c (imagemagick_load_image): Make animated pictures work.
12602 There's still some problems with background color settings, though
12603 (bug#14700).
12604
12605 * decompress.c (unwind_decompress): Always restore point.
12606
12607 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
12608
12609 * marker.c (set_marker): Reformat documentation.
12610
12611 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
12612
12613 * xdisp.c (cursor_type_changed): Now static.
12614
12615 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
12616 Use changed. This avoids the need to call xmalloc and for the
12617 caller to call xfree, and avoids memory leaks in some situations.
12618
12619 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12620
12621 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
12622 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
12623 (redisplay_window): If window_end_valid is cleared due to non-zero
12624 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
12625 so do not call to try_cursor_movement for that window.
12626
12627 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12628
12629 * window.h (struct window): Convert window_end_pos and
12630 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
12631 (wset_window_end_pos, wset_window_end_vpos): Remove.
12632 * dispnew.c (adjust_glyph_matrix):
12633 * window.c (Fwindow_end, replace_window, set_window_buffer)
12634 (make_window):
12635 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
12636 (set_vertical_scroll_bar, redisplay_window, try_window)
12637 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
12638 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
12639 (note_mouse_highlight): Adjust users.
12640 (try_cursor_movement): Likewise. Convert old precondition to eassert.
12641 Add comment.
12642
12643 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12644
12645 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
12646 * image.c (imagemagick_filename_hint): Use `const char *' and
12647 prefer SSDATA to SDATA to avoid warnings.
12648
12649 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12650
12651 Cleanup window fringes, margins and scroll bars adjustments.
12652 * window.c (set_window_fringes, set_window_margins)
12653 (set_window_scroll_bars, apply_window_adjustment): New functions.
12654 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
12655 (Fset_window_scroll_bars): Use them.
12656
12657 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12658
12659 * window.h (struct window): Convert scroll_bar_width
12660 from Lisp_Object to integer. Adjust comment.
12661 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
12662 Adjust users.
12663 * window.c (wset_scroll_bar_width): Remove.
12664 (make_window): Initialize scroll_bar_width.
12665 (Fsplit_window_internal): Use direct assignment.
12666 (Fset_window_configuration, save_window_save):
12667 Convert Lisp_Object to integer and back where appropriate.
12668 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
12669 bar was actually changed, and mention this in docstring.
12670
12671 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12672
12673 * decompress.c: Minor simplifications.
12674 (Fzlib_decompress_region): Don't bother verifying
12675 that avail_out <= UINT_MAX, as that was confusing.
12676 Mention the restriction in a comment instead.
12677 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
12678
12679 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12680
12681 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
12682 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
12683
12684 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12685
12686 * image.c (imagemagick_filename_hint): Check for errors in the
12687 alist structure.
12688
12689 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12690
12691 * window.c (Fwindow_margins): Return nil when there's no marginal
12692 area, as per the documented API.
12693
12694 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
12695 Fmake_vector, as scroll bar's struct members are not all Lisp
12696 objects now. This avoids crashes in GC.
12697
12698 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
12699 bool, so its address could be taken.
12700
12701 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12702
12703 * image.c (imagemagick_filename_hint): New function to possibly
12704 apply `image-content-type-suffixes'.
12705 (imagemagick_load_image): Use it.
12706
12707 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12708
12709 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
12710 if loading zlib failed.
12711
12712 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12713
12714 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
12715 2013-08-13 checkin below. Change bool to BOOL, rule is:
12716 All Obj-C code uses BOOL, except for interfaces callable from C.
12717
12718 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
12719
12720 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12721
12722 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
12723 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
12724 bool instead of BOOL.
12725 * w32term.h (struct scroll_bar): Convert fringe_extended_p
12726 from Lisp_Object to bitfield. Adjust comment.
12727 * w32term.c (x_scroll_bar_create): Adjust user.
12728 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
12729 * xterm.c (XTset_vertical_scroll_bar): Likewise.
12730 Use bool for boolean.
12731 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
12732 to `unsigned int' when defining a bitfield.
12733
12734 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12735
12736 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
12737
12738 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12739
12740 * window.h (struct window): Convert left_margin_cols and
12741 right_margin_cols from Lisp_Objects to integers. Adjust comment.
12742 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
12743 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
12744 Adjust users.
12745 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
12746 Adjust comment.
12747 (showing_window_margins_p, update_window_line, update_frame_1):
12748 * fringe.c (draw_fringe_bitmap_1):
12749 * xdisp.c (window_box_width): Adjust users.
12750 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
12751 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
12752 Use direct assignment.
12753 (Fset_window_configuration, save_window_save, Fwindow_margins):
12754 Convert Lisp_Object to integer and back where appropriate.
12755 (Fset_window_margins): Adjust user. Return t if any margin
12756 was actually changed, and mention this in docstring.
12757
12758 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
12759
12760 * syntax.c (forward_word):
12761 * cmds.c (forward_char, backward_char): Mention the optional argument.
12762
12763 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12764
12765 * window.h (struct window): Convert left_fringe_width
12766 and right_fringe_width from Lisp_Objects to integers.
12767 Adjust comment.
12768 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
12769 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
12770 * window.c (wset_left_fringe_width, wset_right_fringe_width):
12771 Remove.
12772 (make_window): Initialize new integer fields to -1.
12773 (Fsplit_window_internal): Use direct assignment.
12774 (Fset_window_configuration, save_window_save):
12775 Convert Lisp_Object to integer and back where appropriate.
12776 (Fset_window_fringes): Adjust user. Return t if any fringe
12777 was actually changed, and mention this in docstring.
12778
12779 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12780
12781 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
12782 * nsfns.m (x_set_cursor_type):
12783 * w32fns.c (x_set_cursor_type):
12784 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
12785 * xdisp.c (set_frame_cursor_types): ...but in common code.
12786
12787 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12788
12789 * font.c (clear_font_cache): New function, stripped from...
12790 (Fclear_font_cache): ...here, which now uses the function
12791 above. Adjust comment.
12792 * font.h (clear_font_cache): Add prototype.
12793 * xfaces.c (clear_face_cache): Use clear_font_cache.
12794
12795 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12796
12797 * window.c (Fset_window_start): Compare `w', not `window' because
12798 `w' might not be equal to `window' after call to decode_live_window.
12799
12800 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12801
12802 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
12803 This fixes a problem introduced by the Bug#15035 patch
12804 when using GPG. Reported by Herbert J. Skuhra.
12805
12806 2013-08-12 Eli Zaretskii <eliz@gnu.org>
12807
12808 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
12809 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
12810 not yet initialized.
12811
12812 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12813
12814 * decompress.c (Fzlib_decompress_region): Support zlib
12815 decompression, too, and rename.
12816
12817 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12818
12819 Minor zlib configuration tweaks.
12820 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
12821 Don't assume presence of fn_inflateInit2_ zlib internal function.
12822
12823 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12824
12825 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
12826 include the zlib prefix.
12827
12828 2013-08-12 Eli Zaretskii <eliz@gnu.org>
12829
12830 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
12831 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
12832 define static variables that are pointers to zlib functions to be
12833 dynamically loaded.
12834 (init_zlib_functions) [WINDOWSNT]: New function.
12835 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
12836 New macros.
12837 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
12838 macros instead of invoking the zlib functions directly.
12839 (syms_of_decompress): DEFSYM Qzlib_dll.
12840 Staticpro Szlib_available_p.
12841
12842 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
12843
12844 Avoid looping over all frame windows to freeze and unfreeze.
12845 * window.h (struct window): Drop frozen_window_start_p.
12846 (freeze_window_starts): Drop prototype.
12847 * frame.h (struct frame): New frozen_window_starts flag.
12848 (FRAME_WINDOWS_FROZEN): New macro.
12849 * window.c (freeze_window_start, freeze_window_starts):
12850 Remove.
12851 (select_window, replace_window): Adjust users.
12852 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
12853 (window_frozen_p): New function.
12854 (redisplay_window): Use it.
12855
12856 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12857
12858 Fix some fd issues when running subprocesses (Bug#15035).
12859 Fix bugs that can leak files or file descriptors on errors.
12860 Don't unlink open temp files, as that's hard for users to diagnose
12861 when things go awry (e.g., temp disk exhausted).
12862 Don't bother to lock temp files. Check for invalid recursion.
12863 * callproc.c (synch_process_fd): Remove. All uses removed.
12864 (synch_process_tempfile): New var or macro.
12865 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
12866 New constants.
12867 (record_kill_process): New arg, the temp name. All callers changed.
12868 (delete_temp_file): Now just a simple wrapper around unlink.
12869 (call_process_kill): New arg, the call_process_fd array.
12870 Close them all. Clear synch_process_pid. Remove the temp file,
12871 or arrange for it to be removed.
12872 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
12873 that's been moved to synch_process_tempfile. Caller changed.
12874 Do not remove the tempfile; that's now call_process_kill's
12875 responsibility.
12876 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
12877 call_process_kill; the caller now does that.
12878 (call_process_cleanup): Do not close the process fd; that's now
12879 call_process_kill's responsibility.
12880 (Fcall_process): Implement via new function call_process, which
12881 has most of the old body of Fcall_process, but with a different API.
12882 (call_process): New function that does not open or close filefd if
12883 it is nonnegative. Record which fds need to be closed, and let
12884 call_process_kill close (and remove the tempfile, on MSDOS) on error.
12885 Signal an error if invoked recursively (could be done via a hook).
12886 Simplify creation of the tempfile in the MSDOS case.
12887 Don't create the output file until after checking for the executable.
12888 Report any failure to open /dev/null.
12889 Don't open /dev/null for writing twice; once is enough.
12890 Don't create pipe if all output is being discarded or sent to file.
12891 Don't worry about setting up the coding system or reading from the
12892 pipe if all output is being discarded.
12893 Hoist fd_error local into top level, to lessen block nesting.
12894 Don't record deleted pid here; now done by Fcall_process_region.
12895 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
12896 and note its success in synch_process_tempfile.
12897 Do not leak resources when child_setup fails.
12898 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
12899 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
12900 (create_temp_file): Now returns open fd, with an additional
12901 Lisp_Object * argument to return the name. All callers changed.
12902 Do not close the file; rewind it instead, and leave it open for
12903 the caller. Do not lock the temp file. Unwind-protect the file
12904 and the file-descriptor.
12905 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
12906 If an asynchrounous process, record it here, not in call_process.
12907 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
12908 * eval.c (set_unwind_protect): New function.
12909 * fileio.c (write_region): New function, generalized from the
12910 old Fwrite_region. Do not lock temp files.
12911 (Fwrite_region): Use it.
12912 * lisp.h (set_unwind_protect, write_region): New decls.
12913 * process.c: Include <verify.h>.
12914 (make_process): Mark fds as initially closed.
12915 (deleted_pid_list): Now a list of pid-filename pairs.
12916 All uses changed.
12917 (close_process_fd): New function.
12918 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
12919 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
12920 New constants. Verify that their number matches PROCESS_OPEN_FDS.
12921 (create_process, create_pty, Fmake_serial_process)
12922 (server_accept_connection): Record which fds need to be closed,
12923 and let deactivate_process close them.
12924 (Fmake_network_process): Do not discard the unwind-protect
12925 until it's safe to do so.
12926 (deactivate_process): Close the fds opened by create_process etc.
12927 (Fprocess_send_eof): Adjust to new way of recording open fds.
12928 Report an error if /dev/null can't be opened, instead of aborting.
12929 * process.h (PROCESS_OPEN_FDS): New constant.
12930 (struct Lisp_Process): New member open_fds.
12931 (record_kill_process, record_deleted_pid): Adjust signatures.
12932 (record_deleted_pid): Move decl here ...
12933 * syswait.h (record_deleted_pid): ... from here.
12934
12935 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
12936
12937 * decompress.c: Fix bugs with large buffers and weird inputs.
12938 Tune a bit. Reindent as per usual Emacs style.
12939 (BUFFER_SIZE): Remove.
12940 (Fdecompress_gzipped_region): Do not mishandle input buffers with
12941 more than UINT_MAX bytes. Decompress into the gap instead of into
12942 an auto buffer, as this should avoid copying. Return nil if
12943 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
12944 set immediate_quit; we shouldn't trust zlib code that much.
12945
12946 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
12947
12948 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
12949 errors, and really move the gap to where we want it.
12950
12951 * lisp.h: Include decompress.c support.
12952
12953 * emacs.c (main): Include decompress.c support.
12954
12955 * Makefile.in: Include -lz if present.
12956
12957 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
12958
12959 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
12960 (initWithTitle:): Initialize frame to 0.
12961 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
12962 (fillWithWidgetValue:frame:): Rename from
12963 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
12964
12965 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
12966 fillWithWidgetValue:frame:
12967
12968 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
12969 remove memory leak warnings.
12970
12971 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
12972 (ns_check_menu_open): Handle menu == nil. Remove assignment to
12973 menu_pending_title.
12974
12975 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
12976 (x_activate_menubar): Update the whole menu.
12977 (trackingNotification:): Call ns_check_menu_open if tracking ends.
12978 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
12979 current event is not NSSystemDefined (Bug#15001).
12980 Call ns_check_menu_open only if trackingMenu is 2.
12981 (menuDidClose:): New method, decrease trackingMenu.
12982 (fillWithWidgetValue:setDelegate:): New method.
12983 (fillWithWidgetValue:): Call the above.
12984
12985 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
12986
12987 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
12988
12989 Omit some unnecessary casts.
12990 Many of these go back to the old pre-C89 days, when they may have
12991 been needed, but we've been assuming C89 or later for a while now.
12992 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
12993 (live_float_p, live_misc_p, live_vector_p):
12994 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
12995 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
12996 (defvar_per_buffer):
12997 * callint.c (Fcall_interactively):
12998 * doc.c (Fsubstitute_command_keys):
12999 * filelock.c (get_boot_time):
13000 * frame.c (xrdb_get_resource):
13001 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
13002 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
13003 (xg_get_file_name_from_selector, menuitem_destroy_callback)
13004 (menuitem_highlight_callback, menu_destroy_callback)
13005 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
13006 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
13007 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
13008 (xg_tool_bar_help_callback, tb_size_cb):
13009 * image.c (xpm_alloc_color, png_read_from_memory)
13010 (png_read_from_file, png_load_body, our_memory_skip_input_data)
13011 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
13012 (syms_of_image):
13013 * keymap.c (describe_map):
13014 * nsfns.m (Fns_display_monitor_attributes_list):
13015 * nsmenu.m (process_dialog:):
13016 * nsterm.m (hold_event):
13017 * process.c (wait_reading_process_output):
13018 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
13019 * scroll.c (do_direct_scrolling, scrolling_1):
13020 * termcap.c (tgetent):
13021 * window.c (check_window_containing, add_window_to_list)
13022 (freeze_window_starts):
13023 * xdisp.c (compare_overlay_entries, vmessage):
13024 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
13025 (x_get_monitor_attributes_xrandr)
13026 (Fx_display_monitor_attributes_list, x_display_info_for_name)
13027 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
13028 * xfont.c (xfont_match, xfont_open):
13029 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
13030 (menubar_selection_callback, menu_position_func)
13031 (popup_selection_callback, create_and_show_popup_menu)
13032 (dialog_selection_callback, create_and_show_dialog):
13033 * xrdb.c (x_get_string_resource)
13034 (main) [TESTRM]:
13035 * xsmfns.c (x_session_check_input):
13036 * xterm.c (x_draw_glyphless_glyph_string_foreground)
13037 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
13038 (xaw_jump_callback, xaw_scroll_callback):
13039 Omit unnecessary casts.
13040
13041 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
13042
13043 Minor string-length refactoring.
13044 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
13045 * frame.c (make_monitor_attribute_list):
13046 Prefer build_string to strlen + make_string.
13047
13048 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
13049
13050 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
13051 don't check minor_code (Bug#14417).
13052
13053 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13054
13055 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
13056 vertical positions instead. This avoids calling MATRIX_ROW with
13057 row numbers that are possibly beyond valid limits. (Bug#15064)
13058
13059 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
13060
13061 Use xstrdup and build_unibyte_string where applicable.
13062 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
13063 * xfns.c (x_window):
13064 * xrdb.c (x_get_customization_string):
13065 * xterm.c (xim_initialize):
13066 * w32fns.c (w32_window): Use xstrdup.
13067 (w32_display_monitor_attributes_list):
13068 * emacs.c (init_cmdargs):
13069 * keyboard.c (PUSH_C_STR):
13070 * nsfont.m (nsfont_open):
13071 * sysdep.c (system_process_attributes):
13072 * w32.c (system_process_attributes):
13073 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
13074
13075 2013-08-09 Eli Zaretskii <eliz@gnu.org>
13076
13077 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
13078 variables of these types so that GDB would know about them, as aid
13079 for debugging fatal exceptions. (Bug#15024) See also
13080 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
13081 discussions.
13082
13083 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
13084
13085 * nsterm.m (ns_update_begin): Don't change clip path if it would be
13086 larger than the NSWindow (Bug#14934).
13087
13088 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13089
13090 Redesign redisplay interface to drop global variable updated_window.
13091 Always pass currently updated window as a parameter to update routines.
13092 * dispextern.h (updated_window): Remove declaration.
13093 (struct redisplay_interface): Pass window parameter to
13094 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
13095 and after_update_window_hook.
13096 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
13097 Adjust prototypes.
13098 * dispnew.c (updated_window): Remove.
13099 (redraw_overlapped_rows, update_marginal_area, update_text_area)
13100 (update_window_line): Adjust to match redisplay interface changes.
13101 * nsterm.m (ns_update_window_begin, ns_update_window_end)
13102 (ns_scroll_run, ns_after_update_window_line):
13103 * w32term.c (x_update_window_begin, x_update_window_end)
13104 (x_after_update_window_line, x_scroll_run):
13105 * xterm.c (x_update_window_begin, x_update_window_end)
13106 (x_after_update_window_line, x_scroll_run):
13107 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
13108 Likewise. Adjust comments where appropriate.
13109 (x_cursor_to): Simplify because this is always called during window
13110 update (but install debugging check anyway).
13111 (expose_window): Check must_be_updated_p flag to see whether this
13112 function is called during window update.
13113
13114 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
13115
13116 Do not reset window modification event counters excessively.
13117 These leftovers and poor man's tricky methods to catch extra
13118 redisplay's attention are no longer needed.
13119 * frame.c (set_menu_bar_lines_1):
13120 * minibuf.c (read_minibuf_unwind):
13121 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
13122 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
13123 (window_scroll_line_based, Fset_window_configuration):
13124 * xdisp.c (redisplay_window): Do not reset last_modified and
13125 last_overlay_modified counters.
13126
13127 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
13128
13129 * xselect.c (x_send_client_event): Set send_event and serial, memset
13130 data.l as it might be bigger than data.b. Use 24 bit mask to
13131 XSendEvent (Bug#15034).
13132
13133 2013-08-07 Eli Zaretskii <eliz@gnu.org>
13134
13135 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
13136 for TTY frames that are not the top frame on their console.
13137 (Bug#14616)
13138
13139 2013-08-07 Martin Rudalics <rudalics@gmx.at>
13140
13141 * w32term.c (w32fullscreen_hook): Really maximize frame when
13142 asked for (Bug#14841).
13143
13144 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13145
13146 Prefer selected_window to Fselected_window, likewise for frames.
13147 * buffer.c (Fbuffer_swap_text):
13148 * data.c (Fvariable_binding_locus):
13149 * window.c (run_window_configuration_change_hook): Adjust users.
13150 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
13151 Use decode_live_frame.
13152
13153 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
13154
13155 Be more careful if selected window shows the buffer other than current,
13156 use window_outdated only if this is not so. This change should also
13157 address some weird issues discussed in Bug#13012.
13158 * window.h (window_outdated): New prototype.
13159 * window.c (window_outdated): Now here. Convert from static and
13160 always assume window's buffer.
13161 (Fwindow_end, Fwindow_line_height): Use it.
13162 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
13163 and always assume window's buffer.
13164 (redisplay_window): Adjust user.
13165 (redisplay_internal): Call to reconsider_clip_changes once and
13166 check whether mode line should be updated only if selected window
13167 shows current buffer.
13168 (run_window_scroll_functions): Use eassert for debugging check.
13169 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
13170
13171 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13172
13173 * window.c (window_scroll, window_scroll_pixel_based)
13174 (window_scroll_line_based): Use bool for booleans.
13175
13176 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
13177
13178 * process.c: Fix minor off-by-one issues in descriptor counts.
13179 This shouldn't fix any real bugs, but it cleans up the code a bit.
13180 (max_process_desc, max_input_desc): -1, not 0, means none.
13181 All uses changed.
13182 (delete_input_desc): New function.
13183 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
13184 (deactivate_process): Scan backwards when recomuting max_process_desc;
13185 that should be faster.
13186 (init_process_emacs): Initialize max_input_desc.
13187
13188 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13189
13190 Use region cache to speedup bidi_find_paragraph_start.
13191 * buffer.h (struct buffer): New member bidi_paragraph_cache.
13192 Rename cache_long_line_scans to cache_long_scans.
13193 * buffer.c (bset_cache_long_line_scans): Rename to
13194 bset_cache_long_scans.
13195 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
13196 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
13197 into account.
13198 (syms_of_buffer): Rename cache-long-line-scans to
13199 cache-long-scans. Adjust docstring.
13200 * search.c (newline_cache_on_off):
13201 * indent.c (width_run_cache_on_off): Adjust users.
13202 * bidi.c (bidi_paragraph_cache_on_off): New function.
13203 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
13204 * insdel.c (prepare_to_modify_buffer):
13205 Invalidate bidi_paragraph_cache if enabled.
13206
13207 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
13208
13209 Invalidate region caches only if buffer text is going to be changed.
13210 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
13211 (modify_text): ...new prototype.
13212 (prepare_to_modify_buffer_1): New prototype.
13213 * textprop.c (modify_region): Rename to...
13214 (modify_text_properties): ...new function.
13215 (add_text_properties_1, set_text_properties, Fremove_text_properties)
13216 (Fremove_list_of_text_properties): Adjust users.
13217 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
13218 (modify_text): ...new function.
13219 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
13220 (prepare_to_modify_buffer_1): ...new function.
13221 * casefiddle.c (casify_region):
13222 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
13223 (Ftranspose_regions): Use modify_text.
13224
13225 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
13226
13227 * lisp.mk (lisp): Add nadvice.elc.
13228
13229 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
13230
13231 New macro to iterate over live buffers similar to frames.
13232 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
13233 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
13234 Declare buffer-related variables here to offload lisp.h.
13235 * buffer.c (Vbuffer_alist): Adjust comment.
13236 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
13237 (other_buffer_safely):
13238 * data.c (store_symval_forwarding):
13239 * dispnew.c (Fframe_or_buffer_changed_p):
13240 * fileio.c (Fdo_auto_save):
13241 * filelock.c (unlock_all_files):
13242 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
13243
13244 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
13245
13246 Fix some minor races in hosts lacking mkostemp (Bug#15015).
13247 * callproc.c (create_temp_file):
13248 * filelock.c (create_lock_file):
13249 Assume mkostemp, since it's now provided by Gnulib.
13250
13251 2013-08-04 Eli Zaretskii <eliz@gnu.org>
13252
13253 * w32.c (mkostemp): New function.
13254 (mktemp): Remove, no longer used. Most of the code reused in
13255 mkostemp. (Bug#15015)
13256 (mktemp): Don't undef.
13257
13258 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
13259
13260 * dispnew.c (glyph_matrix_count, glyph_pool_count):
13261 Move under GLYPH_DEBUG and ENABLE_CHECKING.
13262 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
13263 (free_glyph_pool, check_glyph_memory): Likewise for
13264 all users. Adjust comments where appropriate.
13265
13266 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
13267
13268 * composite.h: Minor fixups.
13269 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
13270 to fix a misspelling, and change it to an inline function while
13271 we're at it (it need not be a macro). All uses changed.
13272 (composition_method, composition_valid_p):
13273 Rewrite to avoid assignments in if-conditions.
13274
13275 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13276
13277 Do not use global Lisp_Object in composition macros.
13278 * composite.h (composition_temp): Remove declaration.
13279 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
13280 (composition_method, composition_valid_p): ...inline functions.
13281 (compose_region): Remove the leftover.
13282 * composite.c (composition_temp): Remove.
13283 (run_composition_function, update_compositions)
13284 (composition_compute_stop_pos, composition_adjust_point)
13285 (Ffind_composition_internal):
13286 * coding.c (handle_composition_annotation):
13287 * xdisp.c (handle_composition_prop, check_point_in_composition):
13288 Related users changed.
13289
13290 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
13291
13292 Drop FRAME_PTR typedef.
13293 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
13294 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
13295 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
13296 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
13297 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
13298 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
13299 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
13300 All related users changed.
13301
13302 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13303
13304 * eval.c (default_toplevel_binding): New function.
13305 (Fdefvar): Use it.
13306 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
13307 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
13308 (syms_of_eval): Export them.
13309 * data.c (Fdefault_value): Micro cleanup.
13310 * term.c (init_tty): Use "false".
13311
13312 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13313
13314 Fix X GC leak in GTK and raw (no toolkit) X ports.
13315 * xterm.c (x_free_frame_resources): If white and black relief
13316 GCs are allocated, always free them here.
13317 * xfns.c (x_make_gc): Omit redundant initialization.
13318 * widget.c (create_frame_gcs): Remove the leftover.
13319 (EmacsFrameDestroy): Do nothing because all GCs are now freed
13320 in x_free_frame_resources.
13321
13322 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
13323
13324 * nsterm.m (windowWillResize:toSize:): Only change title if
13325 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
13326 modifying it.
13327 (viewDidEndLiveResize): New method.
13328
13329 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
13330 inside NS_IMPL_COCOA.
13331
13332 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13333
13334 * insdel.c (adjust_after_replace, replace_range, del_range_2):
13335 Do not check whether undo is enabled because record_insert and
13336 record_delete does that themselves.
13337
13338 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13339
13340 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
13341 member which is not really used any more.
13342 (FRAME_XIC_BASE_FONTNAME): Remove.
13343 * xfns.c (xic_free_fontset): Adjust user.
13344 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
13345 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
13346 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
13347 (xdialog_show): Use eassert for debugging check.
13348 * w32term.c (x_unfocus_frame): Remove unused dummy function.
13349
13350 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
13351
13352 * fileio.c, fns.c (merge): Move extern decl from here ...
13353 * lisp.h (merge): ... to here.
13354
13355 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13356
13357 Fix last font-related change.
13358 * w32font.h (w32font_list_internal, w32font_match_internal):
13359 Fix prototype.
13360 * w32uniscribe.c (uniscribe_list, uniscribe_match)
13361 (uniscribe_list_family): Adjust to match font API change.
13362 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
13363 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
13364
13365 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13366
13367 * frame.h (FRAME_MOUSE_UPDATE):
13368 * nsterm.m (ns_frame_up_to_date): Omit redundant check
13369 whether hlinfo->mouse_face_mouse_frame is non-NULL.
13370
13371 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13372
13373 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
13374 * font.h (struct font_driver): Change list, match, and list_family
13375 functions to accept struct frame * as first arg.
13376 * font.c (font_score, font_compare, font_sort_entities):
13377 Remove prototypes.
13378 (font_sort_entities, font_list_entities, font_select_entity)
13379 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
13380 match font API change.
13381 * xfont.c (xfont_list, xfont_match, xfont_list_family):
13382 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
13383 * ftxfont.c (ftxfont_list, ftxfont_match):
13384 * xftfont.c (xftfont_list, xftfont_match):
13385 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
13386 * w32font.c (w32font_list, w32font_match, w32font_list)
13387 (w32font_list_internal, w32_font_match_internal): Likewise.
13388 * xfaces.c (Fx_family_fonts): Adjust user.
13389
13390 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13391
13392 Do not use pure Xism x_wm_set_icon_position in non-X ports.
13393 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
13394 only if HAVE_X_WINDOWS is in use.
13395 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
13396 * nsterm.m (x_wm_set_icon_position): Remove no-op.
13397 * w32term.c (x_wm_set_icon_position): Likewise.
13398 * w32fns.c (x_icon): Adjust user.
13399
13400 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13401
13402 * xterm.c (last_mouse_press_frame): Remove the
13403 leftover which is not really used any more.
13404 (handle_one_xevent, syms_of_xterm): Adjust users.
13405 (x_flush): Call XFlush once per each X display, not frame.
13406 This is better because this code always unconditionally skips
13407 non-X frames in Vframe_list and issues the only XFlush if we
13408 have more than one X frame on the same X display.
13409 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
13410 Use bool for booleans.
13411 (x_draw_glyph_string_background, cvt_string_to_pixel)
13412 (cvt_pixel_dtor): Drop unnecessary prototypes.
13413 * xterm.h (x_display_ok): Adjust prototype.
13414
13415 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13416
13417 Drop unnecessary functions that deals with frame pixel size.
13418 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
13419 (x_pixel_height): Drop prototypes.
13420 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
13421 (x_pixel_height): Drop implementations.
13422 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
13423 which should be always valid for window frame.
13424 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
13425 * w32menu.c (Fx_popup_dialog):
13426 * xmenu.c (Fx_popup_dialog): Likewise for both.
13427
13428 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13429
13430 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
13431 frame parameters and call to Fmodify_frame_parameters just once.
13432 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
13433 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
13434 and mention nil frame in docstring.
13435
13436 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13437
13438 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
13439 (x_figure_window_size): Likewise. Adjust to return long.
13440 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
13441 (toplevel): Move Qterminal_live_p to...
13442 * terminal.c (toplevel): ...here, make it static, and...
13443 (syms_of_terminal): ...DEFSYM here.
13444 * frame.h (Qterminal_live_p): Remove declaration.
13445 (make_frame, x_figure_window_size): Adjust prototype.
13446 * nsfns.m (Fx_create_frame): Use long for window flags.
13447
13448 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
13449
13450 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
13451 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
13452 Do not assume that emacs_close (INT_MAX) is a no-op.
13453
13454 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13455
13456 * xfaces.c (make_face_cache): For struct face_cache, prefer
13457 xmalloc to xzalloc and so avoid redundant call to memset.
13458 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
13459
13460 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13461
13462 * fringe.c (draw_window_fringes, update_window_fringes)
13463 (compute_fringe_widths):
13464 * w32term.c (x_draw_glyph_string):
13465 * window.c (candidate_window_p, Frecenter):
13466 * xfaces.c (realize_basic_faces, realize_default_face)
13467 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
13468 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
13469 * xfns.c (x_set_cursor_color, xic_free_xfontset):
13470 * xmenu.c (Fx_menu_bar_open_internal):
13471 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
13472 * xsettings.c (xft_settings_event):
13473 * xterm.c (x_draw_glyph_string, x_had_errors_p):
13474 Use bool for booleans. Adjust style and comments where
13475 appropriate.
13476 * dispextern.h (draw_window_fringes, update_window_fringes)
13477 (compute_fringe_widths):
13478 * xterm.h (x_had_errors_p): Adjust prototype.
13479
13480 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13481
13482 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
13483 CHECK_LIST. Rewrite the loop to avoid useless local variable.
13484
13485 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
13486
13487 * fns.c (toplevel): Remove comment before Fsafe_length because
13488 it checks for QUIT.
13489
13490 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
13491
13492 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
13493
13494 2013-07-28 Eli Zaretskii <eliz@gnu.org>
13495
13496 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
13497 frame which got the message is still alive, before dereferencing
13498 its pointer. (Bug#14970)
13499
13500 * frame.c (delete_frame): Test "this" frame's minibuffer window to
13501 be a live window, before using it as such. (Bug#14970)
13502
13503 2013-07-27 Eli Zaretskii <eliz@gnu.org>
13504
13505 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
13506 w32_detect_focus_change instead of doing part of its job by hand.
13507 This fixes the problem whereby FOCUS_OUT events were not sent to
13508 the event queue.
13509
13510 2013-07-26 Eli Zaretskii <eliz@gnu.org>
13511
13512 * process.c (Fprocess_list): Doc fix.
13513
13514 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
13515 being re-exposed only if it didn't ask to become visible.
13516 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
13517 was previously iconified. (Bug#14841)
13518 (x_iconify_frame): Mark the frame iconified.
13519
13520 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
13521
13522 Fix minor problems found by static checking.
13523 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
13524 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
13525
13526 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
13527
13528 * eval.c (set_specpdl_old_value): New function.
13529 (unbind_to): Minor simplification.
13530 (get_backtrace_frame): New function.
13531 (Fbacktrace_frame): Use it. Add `base' argument.
13532 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
13533 (syms_of_eval): Export backtrace-eval.
13534 * xterm.c (x_focus_changed): Simplify.
13535
13536 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
13537
13538 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
13539
13540 2013-07-24 Eli Zaretskii <eliz@gnu.org>
13541
13542 * xdisp.c (redisplay_window): Instead of moving point out of
13543 scroll margin, reject the force_start method, and try scrolling
13544 instead. (Bug#14780)
13545
13546 2013-07-24 Ken Brown <kbrown@cornell.edu>
13547
13548 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
13549 (Bug#14944).
13550
13551 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
13552
13553 * eval.c (Fprogn): Do not check that BODY is a proper list.
13554 This undoes the previous change. The check slows down the
13555 interpreter, and is not needed to prevent a crash. See
13556 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
13557
13558 2013-07-23 Glenn Morris <rgm@gnu.org>
13559
13560 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
13561
13562 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
13563
13564 Port to GNU/Linux systems with tinfo but not ncurses.
13565 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
13566 to decide whether ncurses is being used. Without this change,
13567 GCC complains about tgetent not being declared, on a system
13568 that has tinfo installed but ncurses not installed.
13569
13570 * eval.c (Fprogn): Check that BODY is a proper list.
13571
13572 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
13573 * data.c (Fsetq_default):
13574 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
13575 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
13576 (Fcondition_case):
13577 Tune by taking advantage of the fact that ARGS is always a list
13578 when a function is declared to have UNEVALLED args.
13579
13580 * emacsgtkfixed.c: Port to GCC 4.6.
13581 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
13582
13583 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
13584
13585 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
13586 here to silence compiler warnings.
13587
13588 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
13589
13590 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
13591 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
13592 from messing up Emacs's 'struct frame' (Bug#14923).
13593
13594 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13595
13596 * alloc.c (make_save_ptr_ptr): Define this function.
13597 It was inadvertently omitted. It's needed only if
13598 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
13599
13600 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
13601
13602 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
13603 frame have focus (Bug#14895).
13604
13605 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13606
13607 Avoid vfork-related deadlock more cleanly.
13608 * callproc.c (child_setup): When the child's exec fails, output
13609 the program name, as that's more useful. Use O_NONBLOCK to avoid
13610 deadlock.
13611 * process.c (create_process_1): Remove; no longer needed.
13612 (create_process): Remove timer hack; no longer needed, now that
13613 the child avoids deadlock.
13614
13615 2013-07-20 Glenn Morris <rgm@gnu.org>
13616
13617 * image.c (Fimage_flush): Fix doc typo.
13618
13619 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
13620
13621 Fix array bounds violation when pty allocation fails.
13622 * process.c (PTY_NAME_SIZE): New constant.
13623 (pty_name): Remove static variable; it's now auto.
13624 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
13625 Take pty_name as an arg rather than using a static variable.
13626 All callers changed.
13627 (create_process): Recover pty_flag from process, not from volatile local.
13628 (create_pty): Stay inside array even when pty allocation fails.
13629 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
13630
13631 * lread.c (Fload): Avoid initialization only when lint checking.
13632 Mention that it's needed only for older GCCs.
13633
13634 2013-07-20 Kenichi Handa <handa@gnu.org>
13635
13636 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
13637 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
13638
13639 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
13640
13641 * lread.c (Fload): Avoid uninitialized warning.
13642
13643 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13644
13645 Fix some minor file descriptor leaks and related glitches.
13646 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
13647 (create_lock_file): Use write, not emacs_write.
13648 * image.c (slurp_file, png_load_body):
13649 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
13650 (server_accept_connection):
13651 Don't leak an fd on memory allocation failure.
13652 * image.c (slurp_file): Add a cheap heuristic for growing files.
13653 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
13654 as that's what the other routines do. Maybe input need not be
13655 blocked at all, but it's better to be consistent.
13656 Avoid undefined behavior when strlen is zero.
13657
13658 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
13659 (NSTATICS): Now a constant; doesn't need to be a macro.
13660
13661 2013-07-19 Richard Stallman <rms@gnu.org>
13662
13663 * coding.c (decode_coding_utf_8): Add simple loop for fast
13664 processing of ASCII characters.
13665
13666 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13667
13668 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
13669
13670 2013-07-19 Eli Zaretskii <eliz@gnu.org>
13671
13672 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
13673 unportable 'struct x_display_info'.
13674 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
13675 is a portable type.
13676
13677 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13678
13679 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
13680 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
13681 or fscanf fails.
13682 (system_process_attributes): Prefer plain char to unsigned char
13683 when either will do. Clean up properly if interrupted or if
13684 memory allocations fail. Don't assume sscanf succeeds.
13685 Remove no-longer-needed workaround to stop GCC from whining.
13686 Read command-line once, instead of multiple times. Check read status a
13687 bit more carefully.
13688
13689 Fix obscure porting bug with varargs functions.
13690 The code assumed that int is treated like ptrdiff_t in a vararg
13691 function, which is not a portable assumption. There was a similar
13692 -- though these days less likely -- porting problem with various
13693 assumptions that pointers of different types all smell the same as
13694 far as vararg functions is conserved. To make this problem less
13695 likely in the future, redo the API to use varargs functions.
13696 * alloc.c (make_save_value): Remove this vararg function.
13697 All uses changed to ...
13698 (make_save_int_int_int, make_save_obj_obj_obj_obj)
13699 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
13700 New functions.
13701 (make_save_ptr): Rename from make_save_pointer, for consistency with
13702 the above. Define only on platforms that need it. All uses changed.
13703
13704 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13705
13706 * keyboard.c: Try to fix typos in previous change.
13707 (DISPLAY_LIST_INFO): New macro.
13708 (kbd_buffer_get_event): Do not access members that are not present
13709 in X11. Revert inadvertent change of "!=" to "=".
13710
13711 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
13712
13713 * keyboard.c (kbd_buffer_get_event):
13714 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
13715 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
13716
13717 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13718
13719 * filelock.c: Fix unlikely file descriptor leaks.
13720 (get_boot_time_1): Rework to avoid using emacs_open.
13721 This doesn't actually fix a leak, but is better anyway.
13722 (read_lock_data): Use read, not emacs_read.
13723
13724 * doc.c: Fix minor memory and file descriptor leaks.
13725 * doc.c (get_doc_string): Fix memory leak when doc file absent.
13726 (get_doc_string, Fsnarf_documentation):
13727 Fix file descriptor leak on error.
13728
13729 * term.c: Fix minor fdopen-related file descriptor leaks.
13730 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
13731 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
13732
13733 * charset.c: Fix file descriptor leaks and errno issues.
13734 Include <errno.h>.
13735 (load_charset_map_from_file): Don't leak file descriptor on error.
13736 Use plain record_xmalloc since the allocation is larger than
13737 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
13738 of entries.
13739 * eval.c (record_unwind_protect_nothing):
13740 * fileio.c (fclose_unwind):
13741 New functions.
13742 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
13743 The replacement doesn't block input, but that no longer seems
13744 necessary.
13745
13746 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
13747
13748 * lread.c: Fix file descriptor leaks and errno issues.
13749 (Fload): Close some races that leaked fds or streams when 'load'
13750 was interrupted.
13751 (Fload, openp): Report error number of last nontrivial failure to open.
13752 ENOENT counts as trivial.
13753 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
13754 New functions.
13755 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
13756 now that the function is always called with a nonnegative arg.
13757 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
13758 All uses replaced with ...
13759 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
13760
13761 A few more minor file errno-reporting bugs.
13762 * callproc.c (Fcall_process):
13763 * doc.c (Fsnarf_documentation):
13764 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
13765 * process.c (set_socket_option):
13766 Don't let a constructor trash errno.
13767 * doc.c: Include <errno.h>.
13768
13769 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
13770
13771 * w32fns.c (unwind_create_tip_frame): Fix declaration.
13772
13773 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
13774
13775 Fix w32 bug with call-process-region (Bug#14885).
13776 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
13777 to Fcall_process when the input is empty. This simplifies the
13778 code a bit. It makes no difference on POSIXish platforms but
13779 apparently it fixes a bug on w32.
13780
13781 Fix bug where insert-file-contents closes a file twice (Bug#14839).
13782 * fileio.c (close_file_unwind): Don't close if FD is negative;
13783 this can happen when unwinding a zapped file descriptor.
13784 (Finsert_file_contents): Unwind-protect the fd before the point marker,
13785 in case Emacs runs out of memory between the two unwind-protects.
13786 Don't trash errno when closing FD.
13787 Zap the FD in the specpdl when closing it, instead of deferring
13788 the removal of the unwind-protect; this fixes a bug where a child
13789 function unwinds the stack past us.
13790
13791 New unwind-protect flavors to better type-check C callbacks.
13792 This also lessens the need to write wrappers for callbacks,
13793 and the need for make_save_pointer.
13794 * alloc.c (free_save_value):
13795 * atimer.c (run_all_atimers):
13796 Now extern.
13797 * alloc.c (safe_alloca_unwind):
13798 * atimer.c (unwind_stop_other_atimers):
13799 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
13800 * menu.c (cleanup_popup_menu) [HAVE_NS]:
13801 * minibuf.c (choose_minibuf_frame_1):
13802 * process.c (make_serial_process_unwind):
13803 * xdisp.c (pop_message_unwind):
13804 * xselect.c (queue_selection_requests_unwind):
13805 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
13806 * alloc.c (record_xmalloc):
13807 Prefer record_unwind_protect_ptr to record_unwind_protect with
13808 make_save_pointer.
13809 * alloc.c (Fgarbage_collect):
13810 Prefer record_unwind_protect_void to passing a dummy.
13811 * buffer.c (restore_buffer):
13812 * window.c (restore_window_configuration):
13813 * xfns.c, w32fns.c (do_unwind_create_frame)
13814 New wrapper. All record-unwind uses of wrappee changed.
13815 * buffer.c (set_buffer_if_live):
13816 * callproc.c (call_process_cleanup, delete_temp_file):
13817 * coding.c (code_conversion_restore):
13818 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
13819 * editfns.c (save_excursion_restore)
13820 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
13821 (save_restriction_restore):
13822 * eval.c (restore_stack_limits, un_autoload):
13823 * fns.c (require_unwind):
13824 * keyboard.c (recursive_edit_unwind, tracking_off):
13825 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
13826 * macros.c (pop_kbd_macro, restore_menu_items):
13827 * nsfns.m (unwind_create_frame):
13828 * print.c (print_unwind):
13829 * process.c (start_process_unwind):
13830 * search.c (unwind_set_match_data):
13831 * window.c (select_window_norecord, select_frame_norecord):
13832 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
13833 (fast_set_selected_frame):
13834 * xfns.c, w32fns.c (unwind_create_tip_frame):
13835 Return void, not a dummy Lisp_Object. All uses changed.
13836 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
13837 * callproc.c (call_process_kill):
13838 * fileio.c (restore_point_unwind, decide_coding_unwind)
13839 (build_annotations_unwind):
13840 * insdel.c (Fcombine_after_change_execute_1):
13841 * keyboard.c (read_char_help_form_unwind):
13842 * menu.c (unuse_menu_items):
13843 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
13844 * sound.c (sound_cleanup):
13845 * xdisp.c (unwind_redisplay):
13846 * xfns.c (clean_up_dialog):
13847 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
13848 Accept no args and return void, instead of accepting and returning
13849 a dummy Lisp_Object. All uses changed.
13850 * cygw32.c (fchdir_unwind):
13851 * fileio.c (close_file_unwind):
13852 * keyboard.c (restore_kboard_configuration):
13853 * lread.c (readevalllop_1):
13854 * process.c (wait_reading_process_output_unwind):
13855 Accept int and return void, rather than accepting an Emacs integer
13856 and returning a dummy object. In some cases this fixes an
13857 unlikely bug when the corresponding int is outside Emacs integer
13858 range. All uses changed.
13859 * dired.c (directory_files_internal_unwind):
13860 * fileio.c (do_auto_save_unwind):
13861 * gtkutil.c (pop_down_dialog):
13862 * insdel.c (reset_var_on_error):
13863 * lread.c (load_unwind):
13864 * xfns.c (clean_up_file_dialog):
13865 * xmenu.c, nsmenu.m (pop_down_menu):
13866 * xmenu.c (cleanup_widget_value_tree):
13867 * xselect.c (wait_for_property_change_unwind):
13868 Accept pointer and return void, rather than accepting an Emacs
13869 save value encapsulating the pointer and returning a dummy object.
13870 All uses changed.
13871 * editfns.c (Fformat): Update the saved pointer directly via
13872 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
13873 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
13874 (unwind_body): New function.
13875 (record_unwind_protect): First arg is now a function returning void,
13876 not a dummy Lisp_Object.
13877 (record_unwind_protect_ptr, record_unwind_protect_int)
13878 (record_unwind_protect_void): New functions.
13879 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
13880 * fileio.c (struct auto_save_unwind): New type.
13881 (do_auto_save_unwind): Use it.
13882 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
13883 * insdel.c (struct rvoe_arg): New type.
13884 (reset_var_on_error): Use it.
13885 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
13886 New constants.
13887 (specbinding_func): Remove; there are now several such functions.
13888 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
13889 (set_unwind_protect_ptr): New function.
13890 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
13891
13892 Be simpler and more consistent about reporting I/O errors.
13893 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
13894 Say "Read error" and "Write error", rather than "I/O error", or
13895 "IO error reading", or "IO error writing", when a read or write
13896 error occurs.
13897 * process.c (Fmake_network_process, wait_reading_process_output)
13898 (send_process, Fprocess_send_eof, wait_reading_process_output):
13899 Capitalize diagnostics consistently. Put "failed foo" at the
13900 start of the diagnostic, so that we don't capitalize the
13901 function name "foo". Consistently say "failed" for such
13902 diagnostics.
13903 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
13904 All callers changed. This is so it can use report_file_error.
13905 * sysdep.c (serial_open, serial_configure): Capitalize I/O
13906 diagnostics consistently as above.
13907
13908 * fileio.c (report_file_errno): Fix errno reporting bug.
13909 If the file name is neither null nor a pair, package it up as a
13910 singleton list. All callers changed, both to this function and to
13911 report_file_error. This fixes a bug where the memory allocator
13912 invoked by list1 set errno so that the immediately following
13913 report_file_error reported the wrong errno value.
13914
13915 Fix minor problems found by --enable-gcc-warnings.
13916 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
13917 * keyboard.c (kbd_buffer_get_event): Remove unused local.
13918
13919 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
13920
13921 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
13922 Set event->arg to Qt if switch-event shall be generated.
13923 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
13924
13925 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
13926
13927 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
13928 FOCUS_OUT_EVENT.
13929
13930 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
13931 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
13932 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
13933 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
13934 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
13935 and there is a focused frame.
13936 (head_table): Add focus-in and focus-out.
13937 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
13938 bind to handle-focus-in/out.
13939
13940 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
13941 (Fhandle_switch_frame): Call Fhandle_focus_in.
13942 (syms_of_frame): defsubr handle-focus-in/out.
13943
13944 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
13945
13946 Fix porting bug to older POSIXish platforms (Bug#14862).
13947 * sysdep.c (emacs_pipe): New function, that implements
13948 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
13949 This should port better to CentOS 5 and to Mac OS X 10.6.
13950 All calls to pipe2 changed.
13951
13952 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
13953 This makes the code easier to read and the executable a bit smaller.
13954 Do not replace all calls to Fcons that happen to create lists,
13955 just calls that are intended to create lists. For example, when
13956 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
13957 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
13958 Similarly for list2 through list5.
13959 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
13960 * bytecode.c (exec_byte_code):
13961 * callint.c (quotify_arg, Fcall_interactively):
13962 * callproc.c (Fcall_process, create_temp_file):
13963 * charset.c (load_charset_map_from_file)
13964 (Fdefine_charset_internal, init_charset):
13965 * coding.c (get_translation_table, detect_coding_system)
13966 (Fcheck_coding_systems_region)
13967 (Fset_terminal_coding_system_internal)
13968 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
13969 * composite.c (update_compositions, Ffind_composition_internal):
13970 * dired.c (directory_files_internal, file_name_completion)
13971 (Fsystem_users):
13972 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
13973 * doc.c (Fsnarf_documentation):
13974 * editfns.c (Fmessage_box):
13975 * emacs.c (main):
13976 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
13977 (Feval, eval_sub, Ffuncall, apply_lambda):
13978 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
13979 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
13980 (Fset_file_times, Finsert_file_contents)
13981 (Fchoose_write_coding_system, Fwrite_region):
13982 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
13983 * font.c (font_registry_charsets, font_parse_fcname)
13984 (font_prepare_cache, font_update_drivers, Flist_fonts):
13985 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
13986 * frame.c (make_frame, Fmake_terminal_frame)
13987 (x_set_frame_parameters, x_report_frame_params)
13988 (x_default_parameter, Fx_parse_geometry):
13989 * ftfont.c (syms_of_ftfont):
13990 * image.c (gif_load):
13991 * keyboard.c (command_loop_1):
13992 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
13993 (Fcopy_keymap, append_key, Fcurrent_active_maps)
13994 (Fminor_mode_key_binding, accessible_keymaps_1)
13995 (Faccessible_keymaps, Fwhere_is_internal):
13996 * lread.c (read_emacs_mule_char):
13997 * menu.c (find_and_return_menu_selection):
13998 * minibuf.c (get_minibuffer):
13999 * nsfns.m (Fns_perform_service):
14000 * nsfont.m (ns_script_to_charset):
14001 * nsmenu.m (ns_popup_dialog):
14002 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
14003 (Fx_own_selection_internal):
14004 * nsterm.m (append2):
14005 * print.c (Fredirect_debugging_output)
14006 (print_prune_string_charset):
14007 * process.c (Fdelete_process, Fprocess_contact)
14008 (Fformat_network_address, set_socket_option)
14009 (read_and_dispose_of_process_output, write_queue_push)
14010 (send_process, exec_sentinel):
14011 * sound.c (Fplay_sound_internal):
14012 * textprop.c (validate_plist, add_properties)
14013 (Fput_text_property, Fadd_face_text_property)
14014 (copy_text_properties, text_property_list, syms_of_textprop):
14015 * unexaix.c (report_error):
14016 * unexcoff.c (report_error):
14017 * unexsol.c (unexec):
14018 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
14019 (Fformat_mode_line, syms_of_xdisp):
14020 * xfaces.c (set_font_frame_param)
14021 (Finternal_lisp_face_attribute_values)
14022 (Finternal_merge_in_global_face, syms_of_xfaces):
14023 * xfns.c (x_default_scroll_bar_color_parameter)
14024 (x_default_font_parameter, x_create_tip_frame):
14025 * xfont.c (xfont_supported_scripts):
14026 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
14027 (menu_help_callback, xmenu_show):
14028 * xml.c (make_dom):
14029 * xterm.c (set_wm_state):
14030 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
14031 and similarly for list2 through list5.
14032
14033 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
14034
14035 * callproc.c (Fcall_process_region): Fix minor race and tune.
14036 (create_temp_file): New function, with the temp-file-creation part
14037 of the old Fcall_process_region. Use Fcopy_sequence to create the
14038 temp file name, rather than alloca + build_string, for simplicity.
14039 Don't bother to block input around the temp file creation;
14040 shouldn't be needed. Simplify use of mktemp.
14041 Use record_unwind_protect immediately after creating the temp file;
14042 this closes an unlikely race where the temp file was not removed.
14043 Use memcpy rather than an open-coded loop.
14044 (Fcall_process_region): Use the new function. If the input is
14045 empty, redirect from /dev/null rather than from a newly created
14046 empty temp file; this avoids unnecessary file system traffic.
14047
14048 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
14049
14050 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
14051 Simplify by making this case like the other two. This is a bit
14052 slower on obsolete hosts, but the extra complexity isn't worth it.
14053
14054 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
14055 * process.c (create_process) [!DOS_NT]:
14056 Remove now-unnecessary calls to emacs_close.
14057
14058 2013-07-13 Eli Zaretskii <eliz@gnu.org>
14059
14060 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
14061 returning early. (Bug#14850)
14062
14063 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
14064 and inhibit-iso-escape-detection attributes of 'undecided'.
14065 (Bug#14822)
14066
14067 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
14068
14069 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
14070 Reported by Herbert J. Skuhra in
14071 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
14072
14073 Don't lose top specpdl entry when memory is exhausted.
14074 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
14075 specpdl overflow here, to simplify callers; all callers changed.
14076 Always reserve an unused entry at the stack top; this avoids
14077 losing the top entry's information when memory is exhausted.
14078
14079 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14080
14081 Clean up errno reporting and fix some errno-reporting bugs.
14082 * callproc.c (Fcall_process):
14083 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
14084 * process.c (create_process, Fmake_network_process):
14085 * unexaix.c (report_error):
14086 * unexcoff.c (report_error):
14087 Be more careful about reporting the errno of failed operations.
14088 The code previously reported the wrong errno sometimes.
14089 Also, prefer report_file_errno to setting errno + report_file_error.
14090 (Fcall_process): Look at openp return value rather than at path,
14091 as that's a bit faster and clearer when there's a numeric predicate.
14092 * fileio.c (report_file_errno): New function, with most of the
14093 old contents of report_file_error.
14094 (report_file_error): Use it.
14095 (Ffile_exists_p, Ffile_accessible_directory_p):
14096 Set errno to 0 when it is junk.
14097 * fileio.c (Faccess_file):
14098 * image.c (x_create_bitmap_from_file):
14099 Use faccessat rather than opening the file, to avoid the hassle of
14100 having a file descriptor open.
14101 * lisp.h (report_file_errno): New decl.
14102 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
14103
14104 Minor EBADF fixes.
14105 * process.c (create_process, wait_reading_process_output) [AIX]:
14106 Remove obsolete SIGHUP-related code, as Emacs no longer disables
14107 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
14108 a multithreaded environment anyway).
14109 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
14110
14111 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
14112
14113 * image.c (x_find_image_file): Don't close a remote file handle.
14114
14115 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
14116
14117 Fix races with threads and file descriptors.
14118 * callproc.c (Fcall_process_region):
14119 * dired.c (open_directory):
14120 * emacs.c (main, Fdaemon_initialized):
14121 * image.c (x_find_image_file):
14122 * inotify.c (Finotify_rm_watch):
14123 * lread.c (Flocate_file_internal):
14124 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
14125 * term.c (term_mouse_moveto, init_tty):
14126 * termcap.c (tgetent):
14127 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
14128 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
14129 * unexhp9k800.c, unexmacosx.c (unexec):
14130 * callproc.c (Fcall_process_region):
14131 Use emacs_close, not close.
14132 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
14133 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
14134 and posix_close function on current platforms (which all lack them).
14135 (emacs_close): Use it. This should fix the races on GNU/Linux and
14136 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
14137 and it should avoid closing random victim file descriptors on
14138 other platforms.
14139
14140 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
14141
14142 * inotify.c (uninitialized): Remove. All uses replaced by -1.
14143 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
14144 Touch up doc a bit.
14145
14146 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
14147 This is for .gdbinit xbacktrace.
14148
14149 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
14150 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
14151 (emacs_set_tty): Now static.
14152 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
14153 * term.c (tty_capable_p, tty_default_color_capabilities)
14154 (get_tty_terminal, term_mouse_movement)
14155 (handle_one_term_event, init_tty, maybe_fatal):
14156 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
14157 (tgetent, scan_file, name_match, compare_contin):
14158 * terminal.c (get_terminal):
14159 Use bool for boolean.
14160 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
14161 Prefer char to unsigned char if either will do.
14162 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
14163 (tty_write_glyphs): Prefer int to unsigned.
14164 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
14165 All callers changed.
14166 * termcap.c (tprint, main) [TEST]: Remove non-working test.
14167
14168 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14169
14170 Port to C89.
14171 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
14172 (B__dummy__): New dummy symbol, to pacify C89.
14173 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
14174 they can't grok varargs macros.
14175 * dispnew.c (add_window_display_history)
14176 (add_frame_display_history):
14177 * print.c (print_object):
14178 * xdisp.c (debug_method_add):
14179 Use %p printf format only for void pointers.
14180 * emacs.c (usage_message): New constant, replacing ...
14181 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
14182 (main): Adjust to usage reorg.
14183 * fns.c (syms_of_fns):
14184 * profiler.c (syms_of_profiler):
14185 Don't use non-constant struct initializers.
14186 * gnutls.h (gnutls_initstage_t):
14187 * lisp.h (enum Lisp_Fwd_Type):
14188 * lread.c (lisp_file_lexically_bound_p):
14189 * xsettings.c (anonymous enum):
14190 Remove trailing comma.
14191 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
14192 * lisp.h (ENUM_BF): Use unsigned if pedantic.
14193 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
14194 (DEFUN): Use it.
14195 * regex.c (const_re_char): New type, to pacify strict C89.
14196 All uses of 'const re_char' replaced to use it.
14197 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
14198 with glibc when strict C89. This change is imported from gnulib.
14199 All uses changed.
14200 (_Restrict_arr_): Rename from __restrict_arr, similarly.
14201 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
14202 Omit GNU_LINUX implementation, since it requires long long.
14203 * xterm.c (x_draw_underwave):
14204 Do not assume the traditional order of struct's members.
14205 (x_term_init): Rewrite to avoid the need for non-constant structure
14206 initializers.
14207
14208 Syntax cleanup, mostly replacing macros with functions.
14209 This removes the need for the syntax_temp hack.
14210 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
14211 * syntax.c (SYNTAX_INLINE): New macro.
14212 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
14213 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
14214 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
14215 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
14216 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
14217 (SYNTAX_COMEND_FIRST): Now functions, not macros.
14218 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
14219 Now constants, not macros.
14220 (syntax_temp) [!__GNUC__]: Remove.
14221 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
14222 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
14223 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
14224 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
14225 Move here from syntax.h; now functions, not macros. Except for the
14226 last function, these are static since only syntax.c uses them.
14227 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
14228 All uses changed. Now a function, not a macro; use this fact
14229 to simplify the code.
14230 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
14231 compiler bugs; no longer relevant.
14232 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
14233 (SYNTAX_INLINE): New macro.
14234 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
14235 for the new functions. Use bool for boolean member.
14236 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
14237 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
14238 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
14239 (SETUP_BUFFER_SYNTAX_TABLE):
14240 Now extern inline functions, not macros.
14241 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
14242 Remove; all uses replaced by implementation.
14243 (syntax_temp) [!__GNUC__]: Remove decl.
14244 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
14245
14246 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
14247
14248 * emacs.c (main): Fix syntax error.
14249
14250 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
14251
14252 Timestamp fixes for undo (Bug#14824).
14253 * atimer.c (schedule_atimer):
14254 * fileio.c (Ffile_newer_than_file_p):
14255 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
14256 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
14257 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
14258 (syms_of_fileio): Remove Sclear_visited_file_name.
14259 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
14260 file doesn't exist; this avoids an ambiguity with negative timestamps.
14261 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
14262 * systime.h (make_emacs_time, invalid_emacs_time):
14263 Don't assume struct timespec layout; POSIX doesn't guarantee it.
14264 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
14265 * undo.c (record_first_change): Push (visited-file-modtime) onto
14266 undo list rather than reimplementing it by hand, incorrectly.
14267
14268 2013-07-09 Ken Brown <kbrown@cornell.edu>
14269
14270 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
14271
14272 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
14273
14274 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
14275
14276 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
14277
14278 Handle errno and exit status a bit more carefully.
14279 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
14280 number into an exit status. Instead, use EXIT_CANCELED.
14281 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
14282 * callproc.c (relocate_fd):
14283 * emacs.c (close_output_streams, main):
14284 * process.c (create_process):
14285 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
14286 Use emacs_perror for simplicity.
14287 * callproc.c (relocate_fd, main):
14288 * sysdep.c (sys_subshell):
14289 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
14290 (shut_down_emacs): Use emacs_write, not write.
14291 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
14292 * fileio.c (Fcopy_file, e_write):
14293 * nsterm.m (ns_select):
14294 * process.c (send_process):
14295 * sound.c (vox_write):
14296 Use emacs_write_sig, not emacs_write.
14297 * lisp.h (emacs_write_sig, emacs_perror): New decls.
14298 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
14299 New constants.
14300 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
14301 of write.
14302 (emacs_full_write): New function.
14303 (emacs_write): Rewrite to use it.
14304 (emacswrite_sig, emacs_perror): New functions.
14305 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
14306
14307 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
14308
14309 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
14310 on NS even if it is present. Pixmap on NS is a void*.
14311
14312 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14313
14314 Port to Ubuntu 10 (Bug#14803). Reported by T.V. Raman.
14315 * process.c (close_on_exec, accept4, process_socket):
14316 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
14317
14318 2013-07-07 Eli Zaretskii <eliz@gnu.org>
14319
14320 * w32.c (sys_dup): Declare prototype.
14321
14322 * filelock.c:
14323 * emacs.c:
14324 * callproc.c [WINDOWSNT]: Include sys/socket.h.
14325
14326 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14327
14328 Make file descriptors close-on-exec when possible (Bug#14803).
14329 This simplifies Emacs a bit, since it no longer needs to worry
14330 about closing file descriptors by hand in some cases.
14331 It also fixes some unlikely races. Not all such races, as
14332 libraries often open files internally without setting
14333 close-on-exec, but it's an improvement.
14334 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
14335 * callproc.c (Fcall_process) [!MSDOS]:
14336 * emacs.c (main) [!DOS_NT]:
14337 * nsterm.m (ns_term_init):
14338 * process.c (create_process):
14339 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
14340 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
14341 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
14342 Prefer mkostemp with O_CLOEXEC to mkstemp.
14343 * callproc.c (relocate_fd) [!WINDOWSNT]:
14344 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
14345 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
14346 now using pipe2.
14347 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
14348 Make the resulting file descriptor close-on-exec.
14349 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
14350 * lread.c (load_descriptor_list, load_descriptor_unwind):
14351 Remove; no longer needed. All uses removed.
14352 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
14353 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
14354 New functions.
14355 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
14356 (Fmake_network_process, Fnetwork_interface_list)
14357 (Fnetwork_interface_info, server_accept_connection):
14358 Make newly-created socket close-on-exec.
14359 * sysdep.c (emacs_open, emacs_fopen):
14360 Make new-created descriptor close-on-exec.
14361 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
14362 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
14363
14364 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
14365
14366 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
14367 for NS_IMPL_GNUSTEP.
14368
14369 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14370
14371 Fix openp errno handling.
14372 * callproc.c (Fcall_process): Preserve openp errno around close.
14373 * lread.c (openp): Set errno when returning -1, as some callers
14374 expect this.
14375
14376 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
14377
14378 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
14379
14380 * nsterm.h (NSSavePanel): Update comment.
14381 (NSAPP_DATA2_RUNFILEDIALOG): Define.
14382 (ns_run_file_dialog): Declare.
14383
14384 * nsfns.m: Remove panelOK.
14385 (ns_fd_data): New.
14386 (ns_run_file_dialog): New function.
14387 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
14388 event loop, so file dialog is popped up by ns_run_file_dialog, called
14389 by sendEvent (Bug#14578).
14390 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
14391
14392 2013-07-06 Eli Zaretskii <eliz@gnu.org>
14393
14394 * xdisp.c (default_line_pixel_height): New function.
14395 (pos_visible_p, move_it_vertically_backward, try_scrolling)
14396 (try_cursor_movement, redisplay_window, try_window)
14397 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
14398
14399 * window.c (window_scroll_pixel_based):
14400 use default_line_pixel_height.
14401
14402 * dispextern.h (default_line_pixel_height): Add prototype.
14403
14404 * frame.c (x_set_line_spacing): Accept a float value for
14405 line-spacing parameter, per the documentation.
14406
14407 * data.c (Fmultibyte_string_p): Doc fix.
14408
14409 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
14410
14411 Use emacs_open more consistently when opening files.
14412 This handles EINTR more consistently now, and makes it easier
14413 to introduce other uniform changes to file descriptor handling.
14414 * sysstdio.h: New file.
14415 * buffer.c (mmap_init):
14416 * cygw32.c (chdir_to_default_directory):
14417 * dispnew.c (Fopen_termscript):
14418 * emacs.c (Fdaemon_initialized):
14419 * fileio.c (Fdo_auto_save):
14420 * image.c (slurp_file, png_load_body, jpeg_load_body):
14421 * keyboard.c (Fopen_dribble_file):
14422 * lread.c (Fload):
14423 * print.c (Fredirect_debugging_output):
14424 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
14425 * termcap.c (tgetent):
14426 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
14427 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
14428 * w32term.c (w32_initialize) [CYGWIN]:
14429 * xfaces.c (Fx_load_color_file):
14430 Use emacs_open instead of plain open, and emacs_fopen instead of
14431 plain fopen.
14432 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
14433 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
14434 * callproc.c (default_output_mode): New constant.
14435 (Fcall_process): Use it to call emacs_open instead of plain creat.
14436 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
14437 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
14438 (emacs_fopen): New function.
14439 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
14440 Include <lisp.h>, for emacs_open.
14441 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
14442
14443 Remove duplicate #include directives.
14444 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
14445 * xfaces.c:
14446 Don't include stdio.h twice.
14447 * buffer.c [USE_MMAP_FOR_BUFFERS]:
14448 Don't include sys/types.h or stdio.h twice.
14449 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
14450 * lread.c: Don't include coding.h twice.
14451 * nsfont.m: Don't include frame.h twice.
14452 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
14453 * ralloc.c: Don't include <unistd.h> twice.
14454 * xdisp.c: Don't include font.h twice.
14455 * xterm.c: Don't include fontset.h twice.
14456 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
14457
14458 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14459
14460 Scale ImageMagick images more carefully.
14461 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
14462 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
14463 Be more careful about avoiding undefined behavior after
14464 integer overflow and division by zero.
14465
14466 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14467
14468 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
14469 (syms_of_w32fns): DEFSYM them.
14470 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
14471 (CCHDEVICENAME): Define macros if not defined.
14472 (struct MONITOR_INFO_EX): New struct.
14473 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
14474 (enum_display_monitors_fn): New variable.
14475 (globals_of_w32fns): Initialize it.
14476 (Fx_display_pixel_width, Fx_display_pixel_height)
14477 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
14478 multi-monitor setups in docstrings.
14479 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
14480 screen size by primary monitor's millimeter per pixel.
14481 (w32_monitor_enum, w32_display_monitor_attributes_list)
14482 (w32_display_monitor_attributes_list_fallback)
14483 (Fw32_display_monitor_attributes_list): New functions.
14484 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
14485
14486 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
14487 if not defined.
14488 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
14489
14490 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
14491
14492 * fileio.c (Qfile_notify_error): New error symbol.
14493
14494 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
14495 * inotify.c (inotify_callback, symbol_to_inotifymask)
14496 (Finotify_add_watch, Finotify_rm_watch): Use it.
14497 (inotifyevent_to_event): Exchange order of cookie and file name.
14498 (Finotify_add_watch): Adapt docstring.
14499
14500 * lisp.h (Qfile_notify_error): Declare.
14501
14502 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14503
14504 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
14505 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14506 Do not clear _malloc_thread_enabled_p, undoing the previous change,
14507 which did not work (see <http://bugs.gnu.org/14569#307>).
14508 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
14509 && (!noninteractive || initialized)). This attempts to thread
14510 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
14511
14512 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
14513
14514 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
14515 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
14516
14517 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14518
14519 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
14520 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14521 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
14522 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
14523
14524 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14525
14526 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
14527 Define to __sys_siglist.
14528
14529 2013-07-02 Eli Zaretskii <eliz@gnu.org>
14530
14531 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
14532 word-wrap, so that overflow-newline-into-fringe would work in
14533 visual-line-mode. (Bug#2749)
14534 (move_it_in_display_line_to): When the last scanned display
14535 element fits exactly on the display line, and
14536 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
14537 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
14538 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
14539 finding buffer position that corresponds to pixel coordinates,
14540 e.g. in buffer_posn_from_coords.
14541
14542 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
14543
14544 * process.c (handle_child_signal): Call catch_child_signal if
14545 NS_IMPL_GNUSTEP.
14546
14547 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14548
14549 Don't convert function pointers to void * and back.
14550 It isn't portable C, and it's easy enough to avoid.
14551 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
14552 (make_save_value): Add support for SAVE_FUNCPOINTER.
14553 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
14554 * print.c (print_object):
14555 Distinguish function from object pointers.
14556 * lisp.h (SAVE_FUNCPOINTER): New constant.
14557 (SAVE_SLOT_BITS): Adjust to it.
14558 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
14559 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
14560 (voidfuncptr): New typedef.
14561 (struct Lisp_Save_Value): New member data[0].funcpointer.
14562 (XSAVE_FUNCPOINTER): New function.
14563
14564 Simplify buildobj processing.
14565 * Makefile.in (buildobj.h): Make it a sequence of strings each
14566 followed by comma, rather than a single string. Put it into a
14567 .tmp file in case there's an error while generating it.
14568 (gl-stamp): Use .tmp for temp files.
14569 (mostlyclean): Clean .tmp files.
14570 * doc.c (buildobj): Move to just the routine that needs it.
14571 It's now an array of strings, so processing is simpler.
14572
14573 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
14574
14575 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
14576 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
14577 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14578 Invoke malloc_enable_thread even when not interactive.
14579 Reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
14580 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
14581 in this case, since the underlying bug has now been fixed.
14582
14583 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
14584
14585 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
14586 unlinking it (bug#14691).
14587
14588 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
14589
14590 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
14591 before checking whether buffer is modified. This lets
14592 `kill-buffer-query-functions' cancel killing of the buffer or save
14593 its content before `kill-buffer' asks user the "Buffer %s
14594 modified; kill anyway?" question.
14595
14596 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
14597
14598 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
14599 Let the super performKeyEquivalent deal with them (Bug#14747).
14600
14601 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
14602
14603 * widget.c (resize_cb): Remove unused local.
14604
14605 Do not use GTK 3 if it exists but cannot be compiled.
14606 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
14607 * xterm.c (x_error_handler) [!USE_GTK]:
14608 Do not use GTK 3.
14609
14610 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
14611
14612 2013-06-30 Eli Zaretskii <eliz@gnu.org>
14613
14614 * intervals.c (get_local_map): Instead of aborting, clip POSITION
14615 to the valid range of values. (Bug#14753)
14616
14617 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
14618 when moving point by using the current glyph matrix. This avoids
14619 the need to force redisplay when this function is called in a
14620 loop.
14621
14622 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
14623
14624 Fix minor problems found by static checking.
14625 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
14626 Redo the latter's body to sidestep GCC parenthesization warnings.
14627 (setup_coding_system, detect_coding, detect_coding_system): Use them.
14628 * coding.c (detect_coding, detect_coding_system):
14629 * coding.h (struct undecided_spec):
14630 Use bool for boolean.
14631 * image.c (QCmax_width, QCmax_height): Now static.
14632 * xdisp.c (Fmove_point_visually): Remove unused local.
14633
14634 2013-06-29 Eli Zaretskii <eliz@gnu.org>
14635
14636 * xdisp.c (Fmove_point_visually): New function.
14637
14638 2013-06-28 Kenichi Handa <handa@gnu.org>
14639
14640 * coding.h (define_coding_undecided_arg_index): New enum.
14641 (coding_attr_index): New members
14642 coding_attr_undecided_inhibit_null_byte_detection,
14643 coding_attr_undecided_inhibit_iso_escape_detection,
14644 coding_attr_undecided_prefer_utf_8.
14645 (undecided_spec): New struct.
14646 (struct coding_system): New member `undecided' of the member
14647 `spec'.
14648
14649 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
14650 (detect_coding): Likewise.
14651 (detect_coding_system): Likewise.
14652 (Fdefine_coding_system_internal): New coding system properties
14653 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
14654 :prefer-utf-8.
14655 (syms_of_coding): Adjust for coding_arg_undecided_max.
14656
14657 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
14658
14659 * image.c (x_from_xcolors): Remove unused local.
14660
14661 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14662
14663 Defer image data transfer between X client and server until actual
14664 display happens.
14665
14666 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
14667 and `mask_img'.
14668
14669 * image.c (Destroy_Image): Remove.
14670 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
14671 `mask_p', and `colors_p'. All uses changed.
14672 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
14673 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
14674 New macros for `flags' arg to x_clear_image_1.
14675 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
14676 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
14677 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
14678 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
14679 (image_get_x_image, image_unget_x_image): New functions or macros.
14680 (image_background, image_background_transparent, x_to_xcolors)
14681 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
14682 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
14683 instead of Destroy_Image.
14684 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
14685 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
14686 (png_load_body, jpeg_load_body, tiff_load, gif_load)
14687 (imagemagick_load_image, svg_load_image): Use them instead of
14688 x_create_x_image_and_pixmap, and x_put_x_image followed by
14689 x_destroy_x_image, respectively.
14690 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
14691 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
14692 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
14693 background_transparent fields.
14694 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
14695 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
14696
14697 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
14698
14699 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
14700 This mostly consists of undoing recent changes.
14701 * callproc.c (Fcall_process):
14702 * process.c (create_process):
14703 Do not worry about catching SIGCHLD here, undoing previous change.
14704 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
14705 * process.c, process.h (catch_child_signal):
14706 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
14707 * process.c (catch_child_handler): Don't worry about being called
14708 lazily and do not assume caller has blocked SIGCHLD, undoing
14709 previous change. Move first-time stuff back to
14710 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
14711 tickle glib, as that causes Cygwin bootstrap to fail. Do not
14712 set lib_child_handler if it's already initialized, which may
14713 help avoid problems on GNUstep.
14714
14715 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14716
14717 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
14718 * callproc.c (Fcall_process):
14719 * process.c (create_process):
14720 Make sure SIGCHLD is caught before we fork,
14721 since Emacs startup no arranges to catch SIGCHLD.
14722 * process.c (lib_child_handler): Initialize to null, not to
14723 dummy_handler.
14724 (catch_child_signal): Allow self to be called lazily.
14725 Do nothing if it's already been called.
14726 Assume caller has blocked SIGCHLD (all callers do now).
14727 * emacs.c (main): Do not catch SIGCHLD here; defer it until
14728 just before it's really needed.
14729 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
14730 since it hasn't been caught yet.
14731
14732 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
14733
14734 * image.c (compute_image_size): New function to implement
14735 :max-width and :max-height.
14736 (imagemagick_load_image): Use it.
14737
14738 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14739
14740 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
14741 * callproc.c, process.h (block_child_signal, unblock_child_signal):
14742 Now extern.
14743 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
14744 * process.c (catch_child_signal): Block SIGCHLD while futzing with
14745 the SIGCHLD handler, since the code is not atomic and (due to glib)
14746 signals may be arriving now.
14747 * sysdep.c (init_signals): Do not catch child signals here;
14748 'main' now does that later, at a safer time.
14749
14750 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
14751
14752 Clean up SIGCHLD handling a bit (Bug#14569).
14753 * process.c, process.h (catch_child_signal):
14754 Now always extern, even if !NS_IMPL_GNUSTEP.
14755 * process.c (catch_child_signal): Move glib tickler here from
14756 init_process_emacs, so that it's done earlier in Emacs
14757 initialization. Also move the noninteractive && !initialized
14758 check here from init_process_emacs. This is all a bit cleaner for
14759 GNUish platforms, and I hope it works around the Cygwin bug.
14760 * sysdep.c (init_signals): Invoke catch_child_signal here, so
14761 that glib signal handling is tickled before glib creates threads.
14762
14763 * process.c (wait_reading_process_output): Avoid int overflow
14764 when reading more than 2 GiB total from a process.
14765
14766 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
14767
14768 * process.c (create_process): Handle a couple more cases,
14769 i.e., work even if new_argv and wait_child_setup[i] are cached.
14770 Use Fcall_process's style for volatile vars.
14771
14772 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
14773
14774 * process.c (create_process): Mark PROCESS volatile.
14775
14776 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
14777
14778 Use C99-style flexible array members if available.
14779 This avoids some subtle aliasing issues, which typically
14780 aren't a problem with GCC but may be a problem elsewhere.
14781 * alloc.c (sdata): New typedef, replacing the old struct sdata.
14782 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
14783 In either case, it uses a flexible array member rather than
14784 the old struct hack. All uses changed.
14785 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
14786 Adjust to sdata reorganization.
14787 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
14788 Use offsetof (struct, flex_array_member), not sizeof (struct), as
14789 that ports better to pre-C99 non-GCC.
14790 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
14791 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
14792 as the latter has changed.
14793 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
14794 and port better to pre-C99 GCC.
14795 * image.c (struct xpm_cached_color):
14796 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
14797 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
14798 Use FLEXIBLE_ARRAY_MEMBER.
14799 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
14800 Move decl to top level so it gets checked against implementation.
14801 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
14802 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
14803
14804 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
14805
14806 * syntax.c: Integer cleanups.
14807 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
14808 All uses that need 0-or-2 changed to:
14809 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
14810 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
14811 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
14812 (char_quoted, prev_char_comend_first, back_comment)
14813 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
14814 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
14815 Use bool for boolean.
14816 (update_syntax_table, skip_chars, skip_syntaxes):
14817 Prefer int to unsigned when either will do.
14818 (back_comment): Return boolean success flag, like forw_comment,
14819 instead of positive-or-minus-1 (which might have overflowed int anyway).
14820 Don't stuff ptrdiff_t into int.
14821 (syntax_spec_code, syntax_code_spec): Now const.
14822 (Fmatching_paren, scan_lists, scan_sexps_forward):
14823 Use enum syntaxcode for syntax code.
14824 (Fmatching_paren): Check that arg is a character, not just an integer.
14825 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
14826 (Finternal_describe_syntax_value): Omit no-longer-needed
14827 comparison to 0.
14828 (skip_chars): Use char, not unsigned char, when the distinction
14829 doesn't matter.
14830 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
14831 * bytecode.c (exec_byte_code):
14832 * syntax.c (syntax_spec_code, Fchar_syntax)
14833 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
14834 (init_syntax_once):
14835 * syntax.h (SYNTAX_WITH_FLAGS):
14836 Omit unnecessary casts.
14837
14838 2013-06-20 Eli Zaretskii <eliz@gnu.org>
14839
14840 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
14841 line dimensions here, to avoid race conditions with the main
14842 thread. (Bug#14062, bug#14630, bug#14669)
14843
14844 * w32term.c (w32_draw_window_cursor): Compute the header line and
14845 mode line dimensions here.
14846 <w32_system_caret_window, w32_system_caret_hdr_height>:
14847 <w32_system_caret_mode_height>: New variables.
14848
14849 * w32term.h: Declare them.
14850
14851 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
14852
14853 * alloc.c (die): Move "assertion failed" string here ...
14854 * lisp.h (eassert): ... from here. Also, suppress evaluation of
14855 COND when SUPPRESS_CHECKING. This shrinks the executable text
14856 size by 0.8% to 2.2% when configured with --enable-checking,
14857 depending on optimization flags (GCC 4.8.1 x86-64).
14858
14859 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
14860
14861 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
14862
14863 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
14864 base is 2; this is more accurate.
14865
14866 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
14867
14868 * sound.c (string_default): Move to !WINDOWSNT section.
14869 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
14870
14871 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
14872
14873 * sound.c: Integer cleanups.
14874 Remove unnecessary forward decls.
14875 (struct sound_device): The 'file' member is now a Lisp_Object, not
14876 a char *, so that we needn't invoke alloca on a huge size.
14877 (Fplay_sound_internal): Adjust to this.
14878 (string_default): New function.
14879 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
14880 Use it to adjust to the struct sound_device change.
14881 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
14882 (be2hs) [0]: Remove.
14883
14884 * syntax.c (skip_chars): Don't use uninitialized storage
14885 when searching a multibyte buffer for characters that are not in a
14886 unibyte string that contains non-ASCII characters.
14887
14888 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
14889
14890 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
14891 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
14892
14893 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
14894
14895 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
14896
14897 2013-06-18 Kenichi Handa <handa@gnu.org>
14898
14899 * font.c (Ffont_spec): Signal an error for an invalid font name
14900 (Bug#14648).
14901
14902 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
14903
14904 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
14905 In particular this ports to 32-bit sparc Sun cc.
14906 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
14907 array with a dummy element at specpdl[-1], so that its address can
14908 be taken portably.
14909 (unbind_to): Do not copy the binding; not needed, now that we
14910 copy old_value in the one place where the copy is needed.
14911 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
14912 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
14913 (union specbinding): Rename from struct specbinding. Redo layout
14914 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
14915 which is not portable. With Sun C 5.12 32-bit sparc, the
14916 declaration causes nargs to be an unsigned bitfield, a behavior
14917 that the C standard allows; but Emacs wants nargs to be signed.
14918 The overall type is now a union of structures rather than a
14919 structure of union of structures, and the 'kind' member is now a
14920 bitfield, so that the overall type doesn't grow. All uses changed.
14921 * process.c (Fmake_serial_process): Remove unnecessary initialization.
14922
14923 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
14924
14925 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
14926 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
14927
14928 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
14929
14930 2013-06-17 Eli Zaretskii <eliz@gnu.org>
14931
14932 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
14933 unless we know that the window w's frame is a frame object.
14934 Another attempt at solving bug#14062 and bug#14630.
14935
14936 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
14937
14938 * textprop.c (property_set_type): New enum.
14939 (add_properties): Allow appending/prepending text properties.
14940 (add_text_properties_1): Factored out of Fadd_text_properties.
14941 (Fadd_text_properties): Move all the code into
14942 add_text_properties_1.
14943 (Fadd_face_text_property): New function that calls
14944 add_text_properties_1.
14945
14946 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
14947
14948 Move functions from lisp.h to individual modules when possible.
14949 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
14950 * alloc.c (XFLOAT_INIT, set_symbol_name):
14951 * buffer.c (CHECK_OVERLAY):
14952 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
14953 (set_char_table_parent):
14954 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
14955 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
14956 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
14957 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
14958 (set_blv_valcell):
14959 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
14960 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
14961 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
14962 (backtrace_args, backtrace_debug_on_exit):
14963 * floatfns.c (CHECK_FLOAT):
14964 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
14965 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
14966 (set_hash_hash, set_hash_hash_slot, set_hash_index)
14967 (set_hash_index_slot):
14968 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
14969 * marker.c (CHECK_MARKER):
14970 * textprop.c (CHECK_STRING_OR_BUFFER):
14971 * window.c (CHECK_WINDOW_CONFIGURATION):
14972 Move here from lisp.h, and make these functions static rather than
14973 extern inline.
14974 * buffer.c (Qoverlayp):
14975 * data.c (Qsubrp):
14976 * fns.c (Qhash_table_p):
14977 * window.c (Qwindow_configuration_p):
14978 Now static.
14979 * lisp.h: Remove the abovementioned defns and decls.
14980
14981 Use functions, not macros, for XINT etc (Bug#11935).
14982 In lisp.h, prefer functions to function-like macros, and
14983 constants to object-like macros, when either will do. This:
14984 . simplifies use, as there's no more need to worry about
14985 arguments' side effects being evaluated multiple times.
14986 . makes the code easier to debug on some platforms.
14987 However, when using gcc -O0, keep using function-like macros
14988 for a few critical operations, for performance reasons.
14989 This sort of thing isn't needed with gcc -Og, but -Og
14990 is a GCC 4.8 feature and isn't widely-enough available yet.
14991 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
14992 Remove enum lsb_bits; no longer needed.
14993 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
14994 * buffer.c (Qoverlap):
14995 * data.c (Qsubrp):
14996 * fns.c (Qhash_table_p):
14997 Now extern, so lisp.h can use these symbols.
14998 * dispextern.h: Include character.h, for MAX_CHAR etc.
14999 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15000 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15001 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15002 (GLYPH_CODE_P): Move here from lisp.h.
15003 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15004 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
15005 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
15006 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
15007 XUNTAG now returns void *.
15008 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
15009 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
15010 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
15011 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
15012 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
15013 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
15014 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
15015 (lisp_h_XPNTR, lisp_h_XSYMBOL):
15016 New macros, renamed from their sans-lisp_h_ counterparts.
15017 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
15018 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
15019 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
15020 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
15021 If compiling via GCC without optimization, define these as macros
15022 in addition to inline functions.
15023 To disable this, compile with -DINLINING=0.
15024 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
15025 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
15026 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
15027 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
15028 (INTMASK, VALMASK): Now macros, since static values cannot be
15029 accessed from extern inline functions.
15030 (VALMASK): Also a constant, for benefit of old GDB.
15031 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
15032 is INTEGERP, which can fold it in.
15033 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
15034 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
15035 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
15036 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
15037 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
15038 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
15039 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
15040 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
15041 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
15042 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
15043 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
15044 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
15045 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
15046 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
15047 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
15048 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
15049 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
15050 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
15051 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
15052 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
15053 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
15054 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
15055 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
15056 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
15057 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
15058 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
15059 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
15060 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
15061 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
15062 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
15063 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
15064 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
15065 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
15066 Now functions.
15067 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
15068 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
15069 (VALMASK): Define in one place rather than in two, merging the
15070 USE_LSB_TAG parts; this is simpler.
15071 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
15072 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
15073 Move up, to avoid use before definition.
15074 Also include "globals.h" earlier, for the same reason.
15075 (make_natnum): New function.
15076 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
15077 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
15078 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
15079 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
15080 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
15081 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
15082 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
15083 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
15084 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
15085 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
15086 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
15087 (Qwindow_configuration_p, Qimage): New forward declarations.
15088 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
15089 (STRING_COPYIN): Remove; unused.
15090 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
15091 (xcar_addr, xcdr_addr): New functions. All uses changed.
15092 (IEEE_FLOATING_POINT): Now a constant, not a macro.
15093 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
15094 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
15095 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
15096 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
15097 (TYPE_RANGED_INTEGERP): Simplify.
15098 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
15099 (setlocale, fixup_locale, synchronize_system_messages_locale)
15100 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
15101 Now empty functions, not macros.
15102 (functionp): Return bool, not int.
15103 * window.c (Qwindow_configuration_p): Now extern,
15104 so window.h can use it.
15105 * window.h (Qwindowp): Move decl back to lisp.h.
15106
15107 2013-06-15 Eli Zaretskii <eliz@gnu.org>
15108
15109 * xdisp.c (Fline_pixel_height): New function, required for solving
15110 bug #14567.
15111
15112 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
15113
15114 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
15115
15116 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
15117
15118 * lread.c (syms_of_lread):
15119 * fns.c (Fprovide): Adjust to new format of after-load-alist.
15120
15121 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
15122
15123 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
15124
15125 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
15126
15127 * fileio.c (expand_file_name): Doc fix.
15128
15129 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
15130
15131 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
15132 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
15133 Wait for self, not for 0. This can't hurt on GNU or similar
15134 system, and may help with Cygwin.
15135
15136 * keyboard.c: Don't use PROP (...) as an lvalue.
15137 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
15138 Use set_prop (A, B), not PROP (A) = B.
15139
15140 2013-06-10 Eli Zaretskii <eliz@gnu.org>
15141
15142 * xdisp.c (get_it_property): Use it->window instead of generating
15143 a Lisp object from it->w.
15144
15145 2013-06-09 Eli Zaretskii <eliz@gnu.org>
15146
15147 * xdisp.c (get_it_property): If it->object is a buffer, pass to
15148 get-char-property the window that is being rendered, instead of
15149 the buffer, to support window-specific overlays. (Bug#14575)
15150 (compute_display_string_pos): When W is NULL, use the current
15151 buffer as the object to pass to get-char-property.
15152 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
15153 pointer member of the bidi iterator, since no window is pertinent
15154 to this function.
15155
15156 2013-06-08 Eli Zaretskii <eliz@gnu.org>
15157
15158 * bidi.c (bidi_fetch_char): Accept additional argument, the window
15159 being displayed, and pass it to compute_display_string_pos.
15160 (bidi_level_of_next_char, bidi_resolve_explicit_1)
15161 (bidi_paragraph_init): All callers changed.
15162
15163 * xdisp.c (init_from_display_pos, init_iterator)
15164 (handle_single_display_spec, next_overlay_string)
15165 (get_overlay_strings_1, reseat_1, reseat_to_string)
15166 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
15167 Set bidi_it.w member from it->w.
15168 (compute_display_string_pos): Accept additional argument, the
15169 window being displayed, and pass it to Fget_char_property.
15170 (Bug#14575)
15171
15172 * dispextern.h (struct bidi_it): New member w, the window being
15173 displayed.
15174 (compute_display_string_pos): Adjust prototype.
15175
15176 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
15177
15178 * xgselect.c: Remove unneeded include xterm.h.
15179
15180 * process.c (wait_reading_process_output): Check for NS before GLIB.
15181 GLIB may be linked in due to rsvg, but ns_select must be called.
15182
15183 * xgselect.c (xg_select): Remove call to window_system_available
15184 and g_main_context_pending at the top, so Gdk events (i.e. file
15185 notify) are processed when Emacs is started with -nw.
15186
15187 2013-06-07 Eli Zaretskii <eliz@gnu.org>
15188
15189 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
15190 (ctagsfiles3): New variable, includes only *.m files.
15191 (TAGS): Use an explicit language name in the regular expressions,
15192 to avoid transformation of '/SOMETHING' by MSYS to
15193 'c:\MSYS\SOMETHING'.
15194
15195 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
15196
15197 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
15198
15199 2013-06-06 Eli Zaretskii <eliz@gnu.org>
15200
15201 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
15202 still need to set the mouse pointer shape and activate help-echo.
15203 (Bug#14558)
15204
15205 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
15206
15207 A few porting etc. fixes for the new file monitor code.
15208 See the thread containing
15209 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
15210 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
15211 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
15212 (dir_monitor_callback, Fgfile_rm_watch):
15213 Use assq_no_quit instead of Fassoc, for speed.
15214 (dir_monitor_callback, Fgfile_rm_watch):
15215 eassert that the monitor is a fixnum.
15216 (dir_monitor_callback): No need for CDR_SAFE.
15217 Simplify building of lisp with alternative tails.
15218 (Fgfile_add_watch, Fgfile_rm_watch):
15219 Do not assume glib functions set errno reliably on failure.
15220 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
15221 and signal an error otherwise.
15222 (Fgfile_rm_watch): Prefer CONSP to !NILP.
15223 Use Fdelq instead of Fdelete, for speed.
15224
15225 2013-06-05 Eli Zaretskii <eliz@gnu.org>
15226
15227 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
15228 don't insist on being invoked on a highlighted tool-bar button.
15229 Avoids losing tool-bar functionality when mouse-highlight is nil.
15230 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
15231 Don't highlight when mouse-highlight is nil.
15232 (note_mouse_highlight): When mouse-highlight is nil, don't return
15233 right away; instead, run tool-bar and mode-line highlight
15234 subroutine, clear any existing highlight, and revert the mouse
15235 pointer to its default shape. (Bug#14558)
15236
15237 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15238
15239 * lisp.mk (lisp): Add prog-mode.el.
15240
15241 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
15242
15243 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
15244 * process.c (dummy_handler): New function.
15245 (lib_child_handler): New static var.
15246 (handle_child_signal): Invoke it.
15247 (catch_child_signal): If a library has set up a signal handler,
15248 save it into lib_child_handler.
15249 (init_process_emacs): If using glib and not on Windows, tickle glib's
15250 child-handling code so that it initializes its private SIGCHLD handler.
15251 * syssignal.h (SA_SIGINFO): Default to 0.
15252 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
15253 31; it should no longer be needed now.
15254
15255 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
15256
15257 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
15258
15259 * gfilenotify.c (globals_of_gfilenotify): New function.
15260 (syms_of_gfilenotify): Move global initialization there.
15261
15262 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
15263
15264 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
15265
15266 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
15267 * keyboard.c (menu_bar_items, tool_bar_items):
15268 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
15269 not override local keymaps any more.
15270
15271 2013-06-04 Eli Zaretskii <eliz@gnu.org>
15272
15273 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
15274
15275 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15276
15277 * w32console.c (initialize_w32_display): Return the dimensions of
15278 the console window via 2 additional arguments, not via the current
15279 frame. This avoids crashes due to overrunning the bounds of
15280 frame's decode_mode_spec_buffer, which is not resized following
15281 the change of the frame dimensions from the initial 10x10.
15282
15283 * w32term.h (w32_initialize_display_info): Adjust prototype.
15284
15285 * term.c (init_tty): Take dimensions of the frame from the values
15286 returned by initialize_w32_display.
15287
15288 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
15289 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
15290 (LIBES): Add $(GFILENOTIFY_LIBS).
15291
15292 * w32inevt.c (handle_file_notifications): Add dummy implementation
15293 for !HAVE_W32NOTIFY.
15294
15295 * w32term.c: Wrap code with HAVE_W32NOTIFY.
15296
15297 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
15298
15299 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
15300
15301 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
15302
15303 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
15304
15305 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
15306
15307 Fix minor problems found by static checking.
15308 * data.c (pure_write_error):
15309 Use xsignal2, not Fsignal, as Fsignal might return.
15310 * eval.c (set_backtrace_debug_on_exit): Now static.
15311 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
15312 No longer inline. EXTERN_INLINE is needed only for functions
15313 defined in .h files. Reindent function header as per GNU style.
15314 (backtrace_p, backtrace_top, backtrace_next):
15315 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
15316 compiler or linker. Add extern decls to pacify gcc -Wall.
15317 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15318 Now static.
15319 * frame.c (free_monitors): Define only on platforms that need it.
15320 * nsterm.m (ns_term_init):
15321 * process.c (catch_child_signal):
15322 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
15323 defined on all porting targets these days.
15324 * process.c, process.h (catch_child_signal):
15325 Make it extern only if NS_IMPL_GNUSTEP is defined.
15326
15327 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15328
15329 * w32.c (gettimeofday): Make the signature identical to prototype
15330 in nt/inc/sys/time.h.
15331
15332 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15333
15334 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
15335 .gdbinit.
15336
15337 * keyboard.c (safe_run_hooks_error): Improve error message.
15338
15339 * data.c (pure_write_error): Add `object' argument.
15340 * puresize.h (CHECK_IMPURE): Use it.
15341
15342 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
15343
15344 * Makefile.in (NOTIFY_OBJ): New variable.
15345 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
15346
15347 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
15348 Call syms_of_gfilenotify.
15349
15350 * gfilenotify.c: New file.
15351
15352 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
15353 and Qfile_w32notify.
15354 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
15355 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
15356
15357 * lisp.h: Declare syms_of_gfilenotify.
15358
15359 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
15360
15361 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15362
15363 Merge the specpdl and backtrace stacks. Make the structure of the
15364 specpdl entries more obvious via a tagged union of structs.
15365 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
15366 (enum specbind_tag): New enum.
15367 (struct specbinding): Make it a tagged union of structs.
15368 Add a case for backtrace records.
15369 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
15370 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
15371 (backtrace_debug_on_exit): New accessors.
15372 (struct backtrace): Remove.
15373 (struct catchtag): Remove backlist field.
15374 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
15375 Move to eval.c.
15376 (Flocal_variable_p): Speed up the common case where the binding is
15377 already loaded.
15378 * eval.c (backtrace_list): Remove.
15379 (set_specpdl_symbol, set_specpdl_old_value): Remove.
15380 (set_backtrace_args, set_backtrace_nargs)
15381 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
15382 (backtrace_next): New functions.
15383 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
15384 (unwind_to_catch, internal_lisp_condition_case)
15385 (internal_condition_case, internal_condition_case_1)
15386 (internal_condition_case_2, internal_condition_case_n): Don't bother
15387 with backtrace_list any more.
15388 (Fsignal): Adjust to new backtrace format.
15389 (grow_specpdl): Move up.
15390 (record_in_backtrace): New function.
15391 (eval_sub, Ffuncall): Use it.
15392 (apply_lambda): Adjust to new backtrace format.
15393 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
15394 data.c.
15395 (specbind): Adjust to new specpdl format. Simplify.
15396 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
15397 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
15398 backtrace format.
15399 (mark_backtrace): Remove.
15400 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
15401 * xdisp.c (redisplay_internal): Use record_in_backtrace.
15402 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
15403 Use mark_specpdl.
15404 * profiler.c (record_backtrace): Use get_backtrace.
15405 (handle_profiler_signal): Use backtrace_top_function.
15406 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
15407 accessor functions.
15408
15409 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
15410
15411 * process.h (catch_child_signal): Declare.
15412
15413 * process.c (catch_child_signal): New function.
15414 (init_process_emacs): Call it.
15415
15416 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
15417 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
15418 NS_IMPL_COCOA.
15419 (x_set_cursor_type): Remove declaration.
15420 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
15421 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
15422 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
15423 (ns_get_color): Use F suffix on float.
15424 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
15425 (ns_get_rgb_color): Remove.
15426 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
15427 (note_mouse_movement): x and y are CGFloat.
15428 (ns_draw_fringe_bitmap): Remove unused rowY.
15429 Change #if to COCOA && >= 10_6.
15430 (ns_draw_window_cursor): Remove unused overspill.
15431 (ns_draw_underwave): width and x are EamcsCGFloat.
15432 (ns_draw_box): thickness is CGFloat.
15433 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
15434 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
15435 if not in main thread.
15436 (ns_get_pending_menu_title, ns_check_menu_open)
15437 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
15438 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
15439 (sendFromMainThread:): New method.
15440 (changeFont:): size is CGFloat.
15441 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
15442 Disable warning about permanent text.
15443 (characterIndexForPoint:): Adjust return type depending on GNUstep
15444 version.
15445 (mouseDown:): delta is CGFloat.
15446 (updateFrameSize): Remove unised variable f.
15447 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
15448 Cast float to EmacsCGFloat.
15449 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
15450 also to -1 when restoring.
15451 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
15452 inside NS_IMPL_COCOA.
15453 (toggleFullScreen:): Put call to toggleFullScreen inside
15454 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
15455 (setPosition:portion:whole:): por is CGFloat.
15456 (getMouseMotionPart:window:x:y:): Add F suffix to float.
15457 (mouseDown:): Use CGFloat.
15458 (mouseDragged:): Remove unised variable edge.
15459 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
15460
15461 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
15462 of CGFloat differs.
15463 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
15464 when NS_IMPL_GNUSTEP.
15465 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
15466 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
15467 (EmacsToolbar): Add clearAll. Add tag argument to
15468 addDisplayItemWithImage.
15469 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
15470
15471 * nsselect.m (ns_get_local_selection): Remove unused variable type.
15472
15473 * nsmenu.m (ns_update_menubar): Make static.
15474 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
15475 (fillWithWidgetValue:): Add cast to SEL for setAction.
15476 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
15477 (update_frame_tool_bar): Update code for GNUstep.
15478 (clearAll): New method.
15479 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
15480 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
15481 Move identifierToItem setObject and activeIdentifiers addObject before
15482 call to insertItemWithItemIdentifier.
15483 (validateVisibleItems): Fix indentation.
15484 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
15485 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
15486 UtilityWindow to aStyle, remove call to setStyleMask.
15487
15488 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
15489
15490 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
15491 (ns_charset_covers, ns_get_covering_families, nsfont_open):
15492 Use F suffix on floats.
15493 (ns_char_width): Returns CGFloat.
15494 (ns_ascii_average_width): w is CGFloat instead of float.
15495 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
15496 DPSxshow.
15497 (ns_glyph_metrics): CGFloat instead of float.
15498
15499 * nsfns.m (x_set_foreground_color, x_set_background_color):
15500 Use EmacsCGFloat.
15501 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
15502 remove unused variables.
15503 (Fns_read_file_name): Keep track if panel is for save.
15504 Use ns_filename_from_panel/ns_directory_from_panel.
15505 (Fns_list_services): delegate only used for COCOA.
15506 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
15507 Just return the input if GNUstep.
15508 (x_screen_planes): Remove.
15509 (Fxw_color_values): Use EmacsCGFloat
15510 (Fns_display_monitor_attributes_list): Only get screen number for
15511 Cocoa.
15512 (getDirectory, getFilename): Remove from EmacsOpenPanel and
15513 EmacsSavePanel.
15514 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
15515 ns_directory_from_panel.
15516
15517 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
15518
15519 * process.c (handle_child_signal): Also use WCONTINUED.
15520 This is so that list-processes doesn't mistakenly list the process
15521 as stopped, when the process has actually been continued and is
15522 now running.
15523
15524 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
15525
15526 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
15527 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
15528 not already configured.
15529
15530 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
15531
15532 2013-05-29 Eli Zaretskii <eliz@gnu.org>
15533
15534 * Makefile.in (mostlyclean): Remove *.res files.
15535
15536 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
15537
15538 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
15539 a buffer (bug#8447).
15540
15541 2013-05-27 Eli Zaretskii <eliz@gnu.org>
15542
15543 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
15544 display vector, and we backtrack, handle the case that the
15545 previous character position is also displayed from a display
15546 vector or covered by a display string or image. (Bug#14476)
15547
15548 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
15549
15550 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15551 (struct MonitorInfo, free_monitors): Remove.
15552 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
15553 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
15554 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15555 Qframes, Qsource.
15556
15557 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15558 (struct MonitorInfo, free_monitors): Remove.
15559 (ns_screen_name): Make static.
15560 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
15561 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15562 Qframes, Qsource.
15563
15564 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15565 (struct MonitorInfo): New struct.
15566 (free_monitors, make_monitor_attribute_list): Declare.
15567
15568 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15569 New Lisp_Object:s.
15570 (free_monitors, make_monitor_attribute_list): New functions.
15571 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
15572 Qsource.
15573
15574 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
15575
15576 * callproc.c (call_process): Refine the doc string. (Bug#14045)
15577
15578 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
15579
15580 * keyboard.c: Apply keyboard decoding only to events that come directly
15581 from the tty, not from unread-command-events (bug#14368).
15582 (read_event_from_main_queue): New function, extracted from read_char.
15583 (read_decoded_char): Remove.
15584 (read_decoded_event_from_main_queue): New function to replace it.
15585 (read_char): Use it.
15586 (read_key_sequence): Use read_char rather than read_decoded_char.
15587
15588 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
15589
15590 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
15591
15592 * casetab.c (init_casetab_once): Fix last change (bug#14424).
15593
15594 2013-05-22 Kenichi Handa <handa@gnu.org>
15595
15596 The following changes are to fix the setting of
15597 buffer-file-coding-system on, for instance, C-x RET c unix RET
15598 _FILE_OF_DOS_EOL_TYPE_ RET.
15599
15600 * coding.h (struct coding_system): New member detected_utf8_chars.
15601
15602 * coding.c (detect_coding_utf_8): Count characters and check EOL
15603 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
15604 BOM is there.
15605 (setup_coding_system): Do not initialize coding->head_ascii.
15606 (check_ascii): Do not set coding->eol_seen but update it. Do not
15607 call adjust_coding_eol_type here.
15608 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
15609 If the eol-type of CODING is already specified, adjust the eol type
15610 of the found coding-system.
15611 (decode_coding_gap): Cancel previous change. Utilize the
15612 character numbers counted by detect_coding_utf_8. Fix detection
15613 of BOM for utf-8.
15614
15615 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
15616
15617 * search.c (looking_at_1): Only set last_thing_searched if the match
15618 changed the match-data (bug#14281).
15619
15620 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
15621
15622 * xdisp.c (reseat_at_previous_visible_line_start):
15623 Already declared in dispextern.h, so remove it here.
15624 (move_it_vertically_backward): Likewise.
15625
15626 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15627
15628 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
15629 (Fx_display_pixel_width, Fx_display_pixel_height)
15630 (Fx_display_mm_width, Fx_display_mm_height):
15631 Mention `display-monitor-attributes-list' in docstrings.
15632
15633 * nsfns.m (ns_get_screen): Remove function. All uses removed.
15634 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
15635 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
15636 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
15637 (Fx_display_backing_store, Fx_display_visual_class)
15638 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
15639 (Fx_display_grayscale_p, Fx_display_pixel_width)
15640 (Fx_display_pixel_height, Fx_display_planes)
15641 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
15642 (Fx_display_screens): Don't confuse X11 screens with NS screens.
15643 (Fx_display_mm_width, Fx_display_mm_height)
15644 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
15645 height for all physical monitors as in X11.
15646
15647 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
15648 Return pixel width or height for all physical monitors as in X11.
15649
15650 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
15651
15652 Port --enable-gcc-warnings to clang.
15653 * bytecode.c (exec_byte_code):
15654 * regex.c:
15655 Redo diagnostic pragmas to pacify clang, too.
15656 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
15657 * editfns.c (Fencode_time):
15658 * fileio.c (file_accessible_directory_p):
15659 * font.c (font_unparse_xlfd):
15660 Use '&"string"[index]' instead of '"string" + (index)'.
15661 * undo.c (user_error): Remove; unused.
15662
15663 2013-05-16 Eli Zaretskii <eliz@gnu.org>
15664
15665 * insdel.c (insert_1_both): Document the arguments, instead of
15666 referring to insert_1, which no longer exists.
15667
15668 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
15669 some window, increment windows_or_buffers_changed, so that
15670 *Messages* display in that window is updated. (Bug#14408)
15671
15672 * w32.c: Include epaths.h.
15673 (init_environment): Use cmdproxy.exe without leading directories.
15674 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
15675 case.
15676 (gettimeofday): Adjust signature and return value to Posix
15677 expectations.
15678
15679 * unexw32.c (open_output_file): Delete the existing emacs.exe
15680 before creating it, to break the hard link to the versioned
15681 executable.
15682
15683 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
15684 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
15685 (FIRSTFILE_OBJ): New variables.
15686 (W32_RES): Rename to EMACSRES. All users changed.
15687 (base_obj): Use $(CM_OBJ).
15688 (ALLOBJS): Use $(FIRSTFILE_OBJ).
15689 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
15690 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
15691 $(W32_RES_LINK) before $(LIBES).
15692 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
15693
15694 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15695
15696 * makefile.w32-in (DOC): Use just "DOC".
15697
15698 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
15699
15700 * process.c: Export default filters and sentinels to Elisp.
15701 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
15702 New constants.
15703 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
15704 (Fset_process_sentinel, Fformat_network_address):
15705 Default to them instead of nil.
15706 (server_accept_connection): Sentinels can't be nil any more.
15707 (read_and_dispose_of_process_output): New function, extracted from
15708 read_process_output.
15709 (read_process_output): Use it; filters can't be nil.
15710 (Finternal_default_process_filter): New function, extracted from
15711 read_process_output.
15712 (exec_sentinel_unwind): Remove function.
15713 (exec_sentinel): Don't zilch sentinel while running.
15714 (status_notify): Sentinels can't be nil.
15715 (Finternal_default_process_sentinel): New function extracted from
15716 status_notify.
15717 (setup_process_coding_systems): Default filter is not nil any more.
15718 (syms_of_process): Export new Elisp functions and initialize
15719 new constants.
15720 * lisp.h (make_lisp_proc): New function.
15721
15722 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15723
15724 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
15725
15726 2013-05-14 Eli Zaretskii <eliz@gnu.org>
15727
15728 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
15729 unless we know that the window w is a leaf window.
15730 Another attempt at solving bug#14062.
15731
15732 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
15733
15734 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
15735 fdesc (Bug#14375).
15736
15737 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
15738
15739 * image.c (gif_load): Check that subimages fit (Bug#14345).
15740
15741 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
15742
15743 * lread.c (skip_dyn_eof): New function.
15744 (read1): Use it to skip the end of a file in response to #@00.
15745
15746 * doc.c (get_doc_string): Slightly relax the sanity checking.
15747
15748 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
15749
15750 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
15751 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15752 (MonitorInfo): New struct.
15753 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
15754 (Fns_display_monitor_attributes_list): New functions.
15755 (display-usable-bounds): Remove.
15756 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
15757 Qsource.
15758
15759 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
15760
15761 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
15762 (GTK_CHECK_VERSION): New macro, if not already defined.
15763 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
15764 replaced by GTK_CHECK_VERSION.
15765
15766 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
15767
15768 * xterm.h (GTK_PREREQ): New macro.
15769 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
15770 to use this macro instead, for consistency and clarity.
15771
15772 2013-05-08 Eli Zaretskii <eliz@gnu.org>
15773
15774 * xdisp.c (row_for_charpos_p): New function, with code of
15775 cursor_row_p, but accepts an additional argument CHARPOS instead
15776 of using a hardcoded PT.
15777 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
15778 (row_containing_pos): Call row_for_charpos_p instead of partially
15779 doing the same. Fixes cursor positioning under longlines-mode
15780 when longlines-show-effect includes more than one newline, when
15781 moving the cursor vertically up.
15782
15783 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
15784
15785 * makefile.w32-in (ACL_H): New macro.
15786 ($(BLD)/fileio.$(O)): Update dependencies.
15787
15788 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15789
15790 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
15791 * Makefile.in (LIB_ACL): New macro.
15792 (LIBACL_LIBS): Remove.
15793 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
15794 * fileio.c: Include <acl.h>.
15795 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
15796 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
15797 !acl_errno_valid.
15798 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
15799 it ourselves.
15800
15801 * unexelf.c: Don't assume ElfW (Half) fits in int.
15802 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
15803 when dealing with ElfW (Half) values, since they can exceed 2**31
15804 on 64-bit OpenBSD hosts. Reported by Han Boetes (privately).
15805 (entry_address): Omit unused NUM arg. All uses changed.
15806
15807 2013-05-07 Juri Linkov <juri@jurta.org>
15808
15809 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
15810 to the string converted from number with `Fnumber_to_string'.
15811 (Bug#14254)
15812
15813 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15814
15815 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
15816 This fixes a problem introduced by my previous change.
15817
15818 2013-05-07 Glenn Morris <rgm@gnu.org>
15819
15820 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
15821
15822 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
15823
15824 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
15825
15826 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15827
15828 Static checking by GCC 4.8.0.
15829 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
15830 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
15831 (x_get_monitor_attributes_fallback)
15832 (x_get_monitor_attributes_xinerama)
15833 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
15834 Define only if USE_GTK.
15835 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
15836 (x_get_monitor_attributes_fallback): Omit unused locals.
15837 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
15838 Use double, not float, to avoid mixed-mode floating point arithmetic.
15839
15840 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15841 Jan Djärv <jan.h.d@swipnet.se>
15842
15843 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
15844 (XINERAMA_CFLAGS): New macros.
15845 (ALL_CFLAGS, LIBES): Use them.
15846
15847 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
15848 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
15849 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
15850 (syms_of_xfns): DEFSYM them.
15851 (struct MonitorInfo): New struct.
15852 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
15853 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
15854 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
15855 (x_get_monitor_attributes_xinerama): New functions.
15856 (Fx_display_monitor_attributes_list): New primitive.
15857 (syms_of_xfns): Defsubr it.
15858
15859 * xterm.h (x_display_info): Add Xatom_net_workarea and
15860 Xatom_net_current_desktop.
15861
15862 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
15863 and dpyinfo->Xatom_net_current_desktop.
15864
15865 2013-05-06 Eli Zaretskii <eliz@gnu.org>
15866
15867 * xdisp.c (pos_visible_p): Use the special code for finding the
15868 beginning of a display property or overlay for any "replacing"
15869 display property, not just for display strings. This solves
15870 incorrect reporting of position by posn-at-point. (Bug#14241)
15871
15872 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
15873
15874 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
15875 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
15876 Verify that ElfW (Half) fits in int.
15877 (fatal): Use same signature as lisp.h.
15878 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
15879 configure and build with -DUNEXELF_DEBUG without worrying about
15880 other modules that use DEBUG.
15881 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
15882 possibly-wide integers now uses it instead of plain fprintf.
15883 (entry_address): New function, which avoids problems with 32-bit
15884 overflow on 64-bit hosts.
15885 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
15886 (round_up): Don't assume the remainder fits in int.
15887 (find_section): Use bool for boolean. Simplify debug code.
15888 (unexec): Don't assume file sizes fit in int or size_t.
15889 Omit unnecessary trailing newline in 'fatal' format.
15890 Use strerror rather than outputting decimal error number.
15891 Remove unused code when emacs is not defined;
15892 this file relies on Emacs now.
15893 Don't assume e_phnum and e_shnum are positive.
15894
15895 * regex.c: Fix problems when DEBUG is defined.
15896 (extract_number, extract_number_and_incr): Define regardless of
15897 whether DEBUG is defined; that's simpler and makes the code less
15898 likely to go stale in the normal case when DEBUG is not defined.
15899 Return int rather than taking an int * arg. All callers changed.
15900 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
15901 Remove, replacing with ...
15902 (DEBUG_PRINT): New macro. All callers changed.
15903 (DEBUG_COMPILES_ARGUMENTS): New macro.
15904 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
15905 (print_compiled_pattern, print_double_string) [DEBUG]:
15906 Use prototype rather than old-style definition.
15907 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
15908 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
15909 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
15910 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
15911 Don't assume ptrdiff_t, size_t, and long are the same width as int.
15912 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
15913 This matters only when DEBUG is defined.
15914
15915 2013-05-05 Eli Zaretskii <eliz@gnu.org>
15916
15917 * xdisp.c (set_iterator_to_next): Set the
15918 ignore_overlay_strings_at_pos_p flag only if we are _really_
15919 iterating over an overlay string, as indicated by the
15920 current.overlay_string_index member. (Bug#14306)
15921
15922 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
15923
15924 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
15925 to where it is used, to avoid autorelease issues (Bug#14050).
15926
15927 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
15928
15929 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
15930 * fileio.c (syms_of_fileio): Implement this.
15931 * filelock.c (create_lock_file): If symbolic links don't work, so
15932 we use a regular file as a lock file, do not fsync the lock file;
15933 it's not needed.
15934
15935 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
15936
15937 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
15938 (syms_of_minibuf): Adjust accodingly.
15939 * lread.c (Fread):
15940 * callint.c (Fcall_interactively): Adjust calls accordingly.
15941
15942 2013-05-04 Eli Zaretskii <eliz@gnu.org>
15943
15944 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
15945 w->contents is a buffer before computing everything else.
15946 Use parentheses to disambiguate last part of the condition.
15947
15948 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
15949 assertion violations. (Bug#14062)
15950
15951 2013-05-01 David Reitter <david.reitter@gmail.com>
15952
15953 * nsfns.m (ns_tooltip): Initialize.
15954
15955 2013-04-28 Eli Zaretskii <eliz@gnu.org>
15956
15957 * coding.c (decode_coding_gap): Don't remove the character before
15958 a newline unless it's a CR character. (Bug#14287)
15959
15960 2013-04-28 Dan Nicolaescu <dann@gnu.org>
15961
15962 * dispextern.h (struct face): Move enum face_underline_type
15963 earlier so that bitfields can be in the same word.
15964
15965 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
15966
15967 * nsfns.m (handlePanelKeys): New function.
15968 (EmacsOpenPanel:performKeyEquivalent:)
15969 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
15970 arrows/function/control and copy/paste keys (Bug#14296).
15971
15972 2013-04-27 Juri Linkov <juri@jurta.org>
15973
15974 * callint.c (Fcall_interactively): Call `Qread_number' for
15975 interactive code letter `n' instead of using duplicate code.
15976 (Bug#14254)
15977
15978 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
15979
15980 * systime.h (make_timeval): Declare as 'const'.
15981
15982 2013-04-27 Kenichi Handa <handa@gnu.org>
15983
15984 * font.c (font_open_entity): Always open a font of manageable
15985 size.
15986
15987 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
15988
15989 Port better to AIX (Bug#14258).
15990 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
15991 to pacify AIX xlc.
15992
15993 2013-04-24 Kenichi Handa <handa@gnu.org>
15994
15995 * coding.c (decode_coding_iso_2022): When an invalid escape
15996 sequence is encountered, reset the invocation and designation
15997 status to the safest one.
15998
15999 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
16000
16001 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
16002 Without this fix, "make distclean" leaves stamp-h1 behind.
16003
16004 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
16005
16006 * w32fns.c (w32_fullscreen_rect): New function to compute the
16007 window rectangle for the given fullscreen mode.
16008 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
16009 longer tunes the window size. This keeps the window's edges flush
16010 with the screen and allows the taskbar to hide itself in fullboth.
16011
16012 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
16013 window decorations and uses the entire screen.
16014
16015 * w32term.h (w32_fullscreen_rect) Add prototype.
16016 (struct w32_output): Replace normal_width, normal_height,
16017 normal_top, and normal_left members with a single normal_placement
16018 struct.
16019 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
16020 Remove macros.
16021 (FRAME_NORMAL_PLACEMENT): New macro.
16022
16023 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
16024
16025 * minibuf.c (Ftest_completion): Silence compiler warning.
16026
16027 2013-04-15 Eli Zaretskii <eliz@gnu.org>
16028
16029 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
16030 bug#14062.
16031
16032 * frame.h (WINDOW_FRAME): Protect macro and its argument with
16033 parentheses.
16034
16035 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
16036 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
16037 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
16038 parentheses where appropriate.
16039
16040 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
16041
16042 * keyboard.c (timer_start_idle): Remove no-longer-used local.
16043
16044 2013-04-14 Eli Zaretskii <eliz@gnu.org>
16045
16046 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
16047 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
16048 Mention in the doc string that setting these variables takes
16049 effect only after a call to set-window-buffer. (Bug#14200)
16050
16051 2013-04-13 Eli Zaretskii <eliz@gnu.org>
16052
16053 * indent.c (Fvertical_motion): Don't consider display strings on
16054 overlay strings as display strings on the buffer position we
16055 started from. This prevents vertical cursor motion from jumping
16056 more than one line when there's an overlay string with a display
16057 property at end of line.
16058 Reported by Karl Chen <Karl.Chen@quarl.org> in
16059 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
16060
16061 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
16062
16063 * window.c (select_window): `record_buffer' even if window is
16064 already selected (bug#14191).
16065
16066 2013-04-11 Eli Zaretskii <eliz@gnu.org>
16067
16068 * window.c (Fwindow_end): Test more flags, including the buffer's
16069 last_overlay_modified flag, to determine whether the window's
16070 display is really up-to-date. Prevents the function from
16071 returning a stale value. (Bug#14170)
16072 (Fwindow_line_height): Fix the test for up-to-date-ness of the
16073 current matrix.
16074
16075 2013-04-10 Eli Zaretskii <eliz@gnu.org>
16076
16077 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
16078 garbaged only if it is not already the top frame on its TTY.
16079 This prevents flickering due to constant redrawing of TTY frames when
16080 there are GUI frames open in the same session. (Bug#13864)
16081
16082 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
16083
16084 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
16085 of marking the idle timers directly.
16086
16087 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
16088
16089 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
16090 tables (bug#14054).
16091
16092 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
16093
16094 * window.c (select_window): Don't record_buffer while the invariant is
16095 temporarily broken (bug#14161).
16096
16097 * fns.c (Fdelq): Don't assume !NILP => CONSP.
16098
16099 2013-04-07 Eli Zaretskii <eliz@gnu.org>
16100
16101 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
16102
16103 2013-04-07 Romain Francoise <romain@orebokech.com>
16104
16105 Ignore additional platform-specific ACL errors (Bug#13702).
16106 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
16107 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
16108
16109 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
16110
16111 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
16112 f->output_data.ns.
16113
16114 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
16115
16116 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
16117 This bug was introduced by my 2013-02-25 change that simplified
16118 data_start configuration. Without this change, on GNU/Linux
16119 an Emacs configured with --enable-profiling fails immediately
16120 due to a profiler signal.
16121 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
16122 with these flags. On platforms where special flags are needed
16123 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
16124 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
16125 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
16126
16127 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
16128
16129 Get rid of some platform-specific functions examining window
16130 system and its capabilities. This is a partial rework of the
16131 2013-04-05 change.
16132 * lisp.h (have_menus_p): Remove prototype. This function is
16133 replaced with platform-independent window_system_available.
16134 (check_window_system): Move to...
16135 * frame.h (decode_window_system_frame, window_system_available):
16136 ...here, add new prototypes.
16137 * frame.c (window_system_available, decode_window_system_frame):
16138 New functions.
16139 (check_window_system): Platform-independent now.
16140 * xterm.h (x_in_use): Remove declaration.
16141 (check_x_frame):
16142 * w32term.h (check_x_frame):
16143 * nsterm.h (check_x_frame): Remove prototypes. This function
16144 is replaced with platform-independent decode_window_system_frame.
16145 * msdos.c (have_menus_p): Remove.
16146 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
16147 Remove platform-specific functions. Use check_window_system,
16148 decode_window_system_frame and check_ns_display_info where
16149 appropriate. Minor style and comment tweaks.
16150 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
16151 (check_x_frame): Likewise.
16152 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
16153 Likewise.
16154 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
16155 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
16156 * xmenu.c, xselect.c: All related users changed.
16157
16158 2013-04-03 Kenichi Handa <handa@gnu.org>
16159
16160 The following changes is to optimize the code for reading UTF-8
16161 files.
16162
16163 * coding.c (check_ascii): Rename from detect_ascii. Return value
16164 changed. Check EOL format. Do not call adjust_coding_eol_type
16165 here.
16166 (check_utf_8): New function.
16167 (adjust_coding_eol_type): Do nothing if already adjusted.
16168 (detect_coding): Compare the return value of check_ascii with
16169 coding->src_bytes. Call adjust_coding_eol_type if necessary.
16170 (decode_coding_gap): Optimize for valid UTF-8.
16171
16172 2013-03-21 Kenichi Handa <handa@gnu.org>
16173
16174 * coding.c (syms_of_coding): Cancel previous change.
16175
16176 * insdel.c (insert_from_gap): Fix previous change.
16177
16178 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
16179
16180 Consistently use platform-specific function to detect window system.
16181 * lisp.h (check_window_system): New prototype. This function is
16182 going to replace check_x, check_w32 and check_ns.
16183 (have_menus_p): Mention msdos.c in comment.
16184 * fontset.c (check_window_system_func): Remove. Adjust all users.
16185 * fontset.h (check_window_system_func): Remove prototype.
16186 * nsterm.h (check_ns):
16187 * xterm.h (check_x):
16188 * w32term.h (check_w32): Likewise.
16189 * menu.c (Fx_popup_menu): Use check_window_system.
16190 * msdos.c (check_window_system): Define for MS-DOS.
16191 * nsfns.m (check_window_system): Define for NS. Adjust all users.
16192 * w32fns.c (check_window_system): Likewise for MS-Windows.
16193 * xfns.c (check_window_system): Likewise for X.
16194 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
16195 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
16196
16197 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
16198
16199 Prefer < to > in range checks such as 0 <= i && i < N.
16200 This makes it easier to visualize quantities on a number line.
16201 This patch doesn't apply to all such range checks,
16202 only to the range checks affected by the 2013-03-24 change.
16203 This patch reverts most of the 2013-03-24 change.
16204 * alloc.c (xpalloc, Fgarbage_collect):
16205 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
16206 * character.c (string_escape_byte8):
16207 * charset.c (read_hex):
16208 * data.c (cons_to_unsigned):
16209 * dispnew.c (update_frame_1):
16210 * doc.c (Fsubstitute_command_keys):
16211 * doprnt.c (doprnt):
16212 * editfns.c (hi_time, decode_time_components):
16213 * fileio.c (file_offset):
16214 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16215 * font.c (font_intern_prop):
16216 * frame.c (x_set_alpha):
16217 * gtkutil.c (get_utf8_string):
16218 * indent.c (check_display_width):
16219 * keymap.c (Fkey_description):
16220 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
16221 * lread.c (read1):
16222 * minibuf.c (read_minibuf_noninteractive):
16223 * process.c (wait_reading_process_output):
16224 * search.c (Freplace_match):
16225 * window.c (get_phys_cursor_glyph):
16226 * xdisp.c (redisplay_internal):
16227 * xsmfns.c (smc_save_yourself_CB):
16228 Prefer < to > for range checks.
16229 * dispnew.c (sit_for): Don't mishandle NaNs.
16230 This fixes a bug introduced in the 2013-03-24 change.
16231 * editfns.c (decode_time_components): Don't hoist comparison.
16232 This fixes another bug introduced in the 2013-03-24 change.
16233
16234 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
16235
16236 * frame.h (struct frame): Drop scroll_bottom_vpos
16237 member becaue all real users are dead long ago.
16238 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
16239 * xdisp.c (redisplay_internal): Adjust user.
16240
16241 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
16242
16243 * nsmenu.m (showAtX:Y:for:): setLevel to
16244 NSPopUpMenuWindowLevel (Bug#13998).
16245
16246 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
16247
16248 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
16249 (ns_check_pending_open_menu): Declare.
16250
16251 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
16252 (x_activate_menubar): Update the menu with title that matches
16253 ns_get_pending_menu_title, and call
16254 ns_check_pending_openmenu (Bug#12698).
16255 (menuWillOpen:): New method.
16256 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
16257
16258 * nsterm.m (menu_will_open_state, menu_mouse_point)
16259 (menu_pending_title): New varaibles.
16260 (ns_get_pending_menu_title, ns_check_menu_open)
16261 (ns_check_pending_open_menu): New functions.
16262
16263 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
16264
16265 * indent.c (current_column_bol_cache): Remove leftover which is not
16266 used in Fmove_to_column any more.
16267 (current_column, scan_for_column): Adjust users.
16268 * keyboard.c (last_point_position_buffer, last_point_position_window):
16269 Remove leftovers which are not used for recording undo any more.
16270 (command_loop_1, syms_of_keyboard): Adjust users.
16271 * xdisp.c (last_max_ascent): Remove leftover which is not used in
16272 redisplay_window any more.
16273 (move_it_to): Adjust user.
16274
16275 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
16276
16277 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
16278 Update dependencies.
16279
16280 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16281
16282 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
16283 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
16284 forward references.
16285
16286 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16287
16288 * window.h (struct window): Replace hchild, vchild and buffer slots
16289 with a single slot 'contents'. This is possible because each valid
16290 window may have either the child window (in vertical or horizontal
16291 combination) or buffer to display (for the leaf window). Using that,
16292 a lot of operations to traverse and/or change window hierarchies may
16293 be simplified. New member horizontal is used to distinguish between
16294 horizontal and vertical combinations of internal windows.
16295 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
16296 (WINDOW_VERTICAL_COMBINATION_P): New macros.
16297 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
16298 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
16299 Use contents slot, not buffer, where appropriate.
16300 (wset_combination): New function.
16301 (wset_buffer): Add eassert.
16302 (Fframe_first_window): Simplify the loop reaching first window.
16303 (Fwindow_buffer): Use WINDOW_LEAF_P.
16304 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
16305 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
16306 (unshow_buffer): Convert initial debugging check to eassert.
16307 (replace_window, recombine_windows, Fdelete_other_windows_internal)
16308 (make_parent_window, window_resize_check, window_resize_apply)
16309 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
16310 (Fset_window_configuration, delete_all_child_windows, save_window_save):
16311 Adjust to match struct window changes.
16312 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
16313 (mark_window_cursors_off, count_windows, get_leaf_windows)
16314 (foreach_window_1): Simplify the loop.
16315 * alloc.c (mark_object): Do not check for the leaf window because
16316 internal windows has no glyph matrices anyway.
16317 * dispnew.c (clear_window_matrices, showing_window_margins_p)
16318 (allocate_matrices_for_window_redisplay, fake_current_matrices)
16319 (allocate_matrices_for_frame_redisplay, free_window_matrices)
16320 (build_frame_matrix_from_window_tree, mirror_make_current)
16321 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
16322 (update_window_tree, set_window_update_flags): Simplify the loop.
16323 (sync_window_with_frame_matrix_rows): Enforce live window.
16324 Use contents slot, not buffer, where appropriate.
16325 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
16326 and WINDOW_HORIZONTAL_COMBINATION_P.
16327 (make_frame_visible_1): Simplify the loop.
16328 Use contents slot, not buffer, where appropriate.
16329 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
16330 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
16331 (expose_window_tree): Likewise.
16332 Use contents slot, not buffer, where appropriate.
16333 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
16334 to avoid deleted windows. Use contents slot instead of buffer.
16335 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
16336 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
16337 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
16338 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
16339
16340 2013-03-28 Eli Zaretskii <eliz@gnu.org>
16341
16342 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
16343 identify the reasons for assertion violations in bug#14062 and
16344 similar ones.
16345 (Fx_show_tip): Fix compilation error under
16346 "--enable-check-lisp-object-type". (Bug#14073)
16347
16348 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
16349 Reported by <rzl24ozi@gmail.com>.
16350
16351 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16352
16353 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
16354 start marker...
16355 (unwind_with_echo_area_buffer): ...to restore it here.
16356 This is needed to ensure that...
16357 (redisplay_window): ...both window markers are valid here,
16358 which is verified by eassert.
16359 * editfns.c (save_excursion_save): Do not assume that
16360 selected_window always displays the buffer.
16361 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
16362 Fix comment.
16363
16364 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
16365
16366 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
16367 the upcase table.
16368
16369 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
16370
16371 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
16372
16373 2013-03-27 Eli Zaretskii <eliz@gnu.org>
16374
16375 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
16376 since MinGW's w32api headers do. This avoids compiler warnings.
16377
16378 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
16379 if already defined.
16380
16381 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16382
16383 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
16384
16385 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
16386
16387 * gtkutil.c (style_changed_cb): Check if frame is live and an
16388 X frame (Bug#14038).
16389
16390 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16391
16392 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
16393 Define only for _WIN32_WINNT less than 0x0500.
16394 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
16395 MinGW64.
16396 Move inclusion of time.h before sys/time.h, so that MinGW64 could
16397 see its own definitions of 'struct timeval' and 'struct timezone'.
16398
16399 Fix incompatibilities between MinGW.org and MinGW64 headers.
16400 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
16401
16402 * w32.c (REPARSE_DATA_BUFFER): Guard with
16403 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
16404
16405 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
16406
16407 * xterm.c: Include X11/XKBlib.h
16408 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
16409
16410 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
16411
16412 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
16413 written backwards.
16414 * blockinput.h (input_blocked_p): Likewise.
16415 * bytecode.c (exec_byte_code): Likewise.
16416 * callproc.c (call_process_kill, call_process_cleanup)
16417 (Fcall_process): Likewise.
16418 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
16419 (Fccl_execute_on_string): Likewise.
16420 * character.c (string_escape_byte8): Likewise.
16421 * charset.c (read_hex): Likewise.
16422 * cm.c (calccost): Likewise.
16423 * data.c (cons_to_unsigned): Likewise.
16424 * dired.c (directory_files_internal, file_name_completion):
16425 Likewise.
16426 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
16427 (sit_for): Likewise.
16428 * doc.c (Fsubstitute_command_keys): Likewise.
16429 * doprnt.c (doprnt): Likewise.
16430 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
16431 * emacsgtkfixed.c: Likewise.
16432 * fileio.c (file_offset, Fwrite_region): Likewise.
16433 * floatfns.c (Fexpt, fmod_float): Likewise.
16434 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16435 Likewise.
16436 * font.c (font_intern_prop): Likewise.
16437 * frame.c (x_set_alpha): Likewise.
16438 * gtkutil.c (get_utf8_string): Likewise.
16439 * indent.c (check_display_width): Likewise.
16440 * intervals.c (create_root_interval, rotate_right, rotate_left)
16441 (split_interval_right, split_interval_left)
16442 (adjust_intervals_for_insertion, delete_node)
16443 (interval_deletion_adjustment, adjust_intervals_for_deletion)
16444 (merge_interval_right, merge_interval_left, copy_intervals)
16445 (set_intervals_multibyte_1): Likewise.
16446 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
16447 * keymap.c (Fkey_description): Likewise.
16448 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
16449 * lread.c (openp, read_integer, read1, string_to_number):
16450 Likewise.
16451 * menu.c (ensure_menu_items): Likewise.
16452 * minibuf.c (read_minibuf_noninteractive): Likewise.
16453 * print.c (printchar, strout): Likewise.
16454 * process.c (create_process, Faccept_process_output)
16455 (wait_reading_process_output, read_process_output, send_process)
16456 (wait_reading_process_output): Likewise.
16457 * profiler.c (make_log, handle_profiler_signal): Likewise.
16458 * regex.c (re_exec): Likewise.
16459 * regex.h: Likewise.
16460 * search.c (looking_at_1, Freplace_match): Likewise.
16461 * sysdep.c (get_child_status, procfs_ttyname)
16462 (procfs_get_total_memory): Likewise.
16463 * systime.h (EMACS_TIME_VALID_P): Likewise.
16464 * term.c (dissociate_if_controlling_tty): Likewise.
16465 * window.c (get_phys_cursor_glyph): Likewise.
16466 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
16467 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
16468 Likewise.
16469 * xfns.c (Fx_window_property): Likewise.
16470 * xmenu.c (set_frame_menubar): Likewise.
16471 * xselect.c (x_get_window_property, x_handle_dnd_message):
16472 Likewise.
16473 * xsmfns.c (smc_save_yourself_CB): Likewise.
16474 * xterm.c (x_scroll_bar_set_handle): Likewise.
16475
16476 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
16477
16478 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
16479 to be optional or nil. Adjust comment and convert it to docstring.
16480 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
16481 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
16482
16483 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
16484
16485 Static checking by GCC 4.8-20130319.
16486 * image.c (gif_load): Assume pass < 3 to pacify GCC.
16487 * process.c (Fset_process_datagram_address)
16488 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
16489 * xdisp.c (get_char_face_and_encoding)
16490 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
16491 (get_glyph_face_and_encoding): Prepare face before possibly using it.
16492 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
16493
16494 2013-03-24 Ken Brown <kbrown@cornell.edu>
16495
16496 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
16497 fix compilation on 64-bit Cygwin, where underscores are not
16498 automatically prepended.
16499
16500 * w32term.c (w32_initialize): Silence compiler warning.
16501
16502 2013-03-23 Eli Zaretskii <eliz@gnu.org>
16503
16504 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
16505 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
16506 variables, to save and restore frame dimensions.
16507 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
16508 after returning from a 'fullscreen' configuration.
16509 use SendMessage instead of PostMessage to send the SC_RESTORE message,
16510 to avoid races between the main thread and the input thread.
16511
16512 * w32term.h (struct w32_output): New members normal_width,
16513 normal_height, normal_top, normal_left, and prev_fsmode.
16514 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
16515 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
16516 members of a frame.
16517
16518 * w32term.c (w32fullscreen_hook): Record last value of the frame's
16519 'fullscreen' parameter. Always record previous width and height
16520 of the frame, except when switching out of maximized modes, so
16521 that they could be restored correctly, instead of resetting to the
16522 default frame dimensions. Send SC_RESTORE command to the frame,
16523 unless we are going to send SC_MAXIMIZE, to restore the frame
16524 resize hints in the mouse pointer shown by the window manager.
16525 (Bug#14032)
16526
16527 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
16528
16529 * lisp.h (get_frame_param): Adjust conditions for prototype
16530 declaration.
16531
16532 2013-03-22 Ken Brown <kbrown@cornell.edu>
16533
16534 * unexcw.c: Drop unneeded inclusion of w32common.h.
16535 (report_sheap_usage): Declare.
16536 (read_exe_header): Add magic numbers for x86_64.
16537 (fixup_executable): Fix printf format specifier for unsigned long
16538 argument.
16539
16540 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
16541
16542 * frame.h (struct frame): Put menu_bar_window under #ifdef
16543 because this member is not needed when X toolkit is in use.
16544 (fset_menu_bar_window):
16545 * dispnew.c (clear_current_matrices, clear_desired_matrices)
16546 (free_glyphs, update_frame):
16547 * xdisp.c (expose_frame): Likewise.
16548 (display_menu_bar): Likewise. Remove redundant eassert.
16549 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
16550 toolkit is in use.
16551
16552 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
16553
16554 Use functions and constants to manipulate Lisp_Save_Value objects.
16555 This replaces code that used macros and strings and token-pasting.
16556 The change makes the C source a bit easier to follow,
16557 and shrinks the Emacs executable a bit.
16558 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
16559 (make_save_value): Change 1st arg from string to enum. All callers
16560 changed.
16561 (INTX): Remove.
16562 (mark_object): Use if, not #if, for GC_MARK_STACK.
16563 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
16564 (XSAVE_OBJECT): Now functions, not macros.
16565 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
16566 the constant was never used.
16567 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
16568 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
16569 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
16570 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
16571 New constants.
16572 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
16573 type3 with a single member save_type. All uses changed.
16574 (save_type, set_save_pointer, set_save_integer): New functions.
16575 * print.c (PRINTX): Remove.
16576
16577 * alloc.c: Remove redundant static declarations.
16578
16579 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16580
16581 * window.h (struct window): Convert left_col, top_line, total_lines
16582 and total_cols from Lisp_Objects to integers. Adjust comments.
16583 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
16584 Remove.
16585 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
16586 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
16587 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
16588 Adjust users where appropriate.
16589
16590 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16591
16592 * frame.h (struct frame): Drop resx and resy because the same data is
16593 available from window system-specific output context. Adjust users.
16594 (default_pixels_per_inch_x, default_pixels_per_inch_y):
16595 New functions to provide defaults when no window system available.
16596 (FRAME_RES_X, FRAME_RES_Y): New macros.
16597 (NUMVAL): Move from xdisp.c.
16598 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
16599 (Ffont_face_attributes, Fopen_font):
16600 * image.c (gs_load):
16601 * w32font.c (fill_in_logfont):
16602 * xdisp.c (calc_pixel_width_or_height):
16603 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
16604 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
16605
16606 2013-03-20 Kenichi Handa <handa@gnu.org>
16607
16608 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
16609 to 1 (temporary workaround until a bug related to ASCII
16610 optimization is fixed).
16611
16612 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
16613
16614 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
16615 Signal error if window is not internal. Adjust docstring.
16616 (delete_all_child_windows): Use combination_limit to save the buffer.
16617 (Fset_window_configuration): Adjust accordingly.
16618 * print.c (syms_of_print): Initialize debugging output not here...
16619 (init_print_once): ...but in a new function here.
16620 * lisp.h (init_print_once): Add prototype.
16621 * emacs.c (main): Add call to init_print_once. Adjust comments.
16622
16623 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
16624
16625 * window.c (window_resize_check, window_resize_apply)
16626 (window_from_coordinates, recombine_windows, set_window_buffer)
16627 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
16628 (Fsplit_window_internal, Fdelete_window_internal)
16629 (freeze_window_starts): Use bool for booleans.
16630 * window.h (window_frame_coordinates, resize_frame_windows)
16631 (freeze_window_starts, set_window_buffer): Adjust prototypes.
16632
16633 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
16634
16635 * dispnew.c (bitch_at_user): Use `user-error'.
16636
16637 2013-03-17 Ken Brown <kbrown@cornell.edu>
16638
16639 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
16640 as return type of image_background. (Bug#13981)
16641 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
16642
16643 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
16644
16645 * nsterm.m (updateFrameSize:): Change resize increments if needed.
16646 (ns_select): Don't return with result uninitialized.
16647
16648 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
16649 and getDirectory.
16650
16651 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
16652 New functions.
16653 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
16654 directories. If filename is nil, get directory name (Bug#13932).
16655 Use getFilename and getDirectory.
16656 (getFilename, getDirectory): New methods for EmacsSavePanel and
16657 EmacsOpenPanel.
16658 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
16659
16660 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
16661
16662 * coding.c (decode_coding_gap): Fix typo caught by static checking.
16663
16664 2013-03-15 Kenichi Handa <handa@gnu.org>
16665
16666 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
16667 (adjust_after_replace): Make it back to static. Delete the third
16668 arg text_at_gap_tail. Cancel the code for handling it.
16669
16670 * coding.h (struct coding_system): New member eol_seen.
16671
16672 * coding.c (detect_ascii): New function.
16673 (detect_coding): Set coding->head_ascii and coding->eol_seen only
16674 when the source bytes are actually scanned. On detecting for
16675 coding_category_utf_8_auto, call detect_ascii instead of scanning
16676 source bytes directly.
16677 (produce_chars): Call insert_from_gap with the new arg 0.
16678 (encode_coding): Likewise.
16679 (decode_coding_gap): Control ASCII optimization by the variable
16680 disable_ascii_optimization instead of #ifndef .. #endif.
16681 Deccode EOL format according to coding->eol_seen.
16682 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
16683 variable.
16684
16685 * lisp.h (adjust_after_replace): Cancel externing it.
16686 (insert_from_gap): Adjust prototype.
16687
16688 2013-03-15 Eli Zaretskii <eliz@gnu.org>
16689
16690 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
16691 FULLSCREEN_MAXIMIZED. (Bug#13935)
16692
16693 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
16694
16695 * region-cache.c (find_cache_boundary, move_cache_gap)
16696 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
16697 Simplify debugging check and convert to eassert. Adjust comment.
16698 (pp_cache): Put under ENABLE_CHECKING.
16699
16700 2013-03-14 Eli Zaretskii <eliz@gnu.org>
16701
16702 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
16703 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
16704 and WM_ACTIVATEAPP.
16705 (w32fullscreen_hook): If the frame is visible, reset
16706 f->want_fullscreen flag after changing the frame size. If the
16707 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
16708 (Bug#13953)
16709
16710 2013-03-13 Daniel Colascione <dancol@dancol.org>
16711
16712 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
16713 too so that these builds can use Cygwin's file conversion
16714 functions. (We've been building and linking cygw32.o all along
16715 and just not using it.)
16716
16717 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16718
16719 File synchronization fixes (Bug#13944).
16720 * Makefile.in (LIB_FDATASYNC): New macro.
16721 (LIBES): Use it.
16722 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
16723 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
16724 Don't worry about HAVE_FSYNC, since a substitute fsync is
16725 available if the system lacks one.
16726 (Fwrite_regin): Retry fsync if interrupted.
16727
16728 2013-03-13 Eli Zaretskii <eliz@gnu.org>
16729
16730 * w32term.c (w32_read_socket): If the Emacs frame is being
16731 activated, call w32fullscreen_hook, to make sure the new frame
16732 dimensions are in effect. (Bug#13937)
16733
16734 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
16735
16736 * xdisp.c (init_iterator): Simplify because both character and byte
16737 positions are either specified or -1. Add eassert. Adjust comment.
16738 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
16739 character and byte positions can be obtained from marker.
16740
16741 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16742
16743 Static checking by Sun C 5.12.
16744 * alloc.c (buffer_memory_full) [REL_ALLOC]:
16745 * bytecode.c (exec_byte_code):
16746 * dispnew.c (init_display):
16747 * eval.c (error):
16748 * fileio.c (Fsubstitute_in_file_name):
16749 * keyboard.c (Fevent_convert_list):
16750 * keymap.c (Fsingle_key_description):
16751 * term.c (maybe_fatal, fatal):
16752 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
16753 * xsmfns.c (Fhandle_save_session):
16754 Omit unreachable code.
16755 * keymap.c (map_keymap_char_table_item): Cast void * to
16756 a function pointer type; the C Standard requires this.
16757
16758 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
16759 Include <sys/param.h> unconditionally, as that works elsewhere and
16760 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
16761 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
16762 and FreeBSD now.
16763
16764 See ChangeLog.12 for earlier changes.
16765
16766 ;; Local Variables:
16767 ;; coding: utf-8
16768 ;; End:
16769
16770 Copyright (C) 2011-2015 Free Software Foundation, Inc.
16771
16772 This file is part of GNU Emacs.
16773
16774 GNU Emacs is free software: you can redistribute it and/or modify
16775 it under the terms of the GNU General Public License as published by
16776 the Free Software Foundation, either version 3 of the License, or
16777 (at your option) any later version.
16778
16779 GNU Emacs is distributed in the hope that it will be useful,
16780 but WITHOUT ANY WARRANTY; without even the implied warranty of
16781 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16782 GNU General Public License for more details.
16783
16784 You should have received a copy of the GNU General Public License
16785 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.